@leatcom/portal-sessions 0.0.103 → 0.0.104
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.
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
(function(yt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(yt=typeof globalThis<"u"?globalThis:yt||self,x(yt.PortalSessions={},yt.React,yt.ReactDOM))})(this,function(yt,x,Pi){"use strict";var dR=Object.defineProperty;var fR=(yt,x,Pi)=>x in yt?dR(yt,x,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):yt[x]=Pi;var $n=(yt,x,Pi)=>fR(yt,typeof x!="symbol"?x+"":x,Pi);try{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},x=new yt.Error().stack;x&&(yt._sentryDebugIds=yt._sentryDebugIds||{},yt._sentryDebugIds[x]="86ecdd5a-3e50-4e78-af32-c23857e44317",yt._sentryDebugIdIdentifier="sentry-dbid-86ecdd5a-3e50-4e78-af32-c23857e44317")}catch{}{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};yt._sentryModuleMetadata=yt._sentryModuleMetadata||{},yt._sentryModuleMetadata[new yt.Error().stack]=Object.assign({},yt._sentryModuleMetadata[new yt.Error().stack],{"_sentryBundlerPluginAppKey:portal-sessions-application-key":!0})}function Tw(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function xw(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ce=Tw(x);{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"283535cbd15d2876b96ddf0da4209c98059cf67c"}}var Jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dl={exports:{}},_a={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Dh;function Ow(){if(Dh)return _a;Dh=1;var t=x,e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,c,l){var f,h={},d=null,p=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(p=c.ref);for(f in c)r.call(c,f)&&!i.hasOwnProperty(f)&&(h[f]=c[f]);if(s&&s.defaultProps)for(f in c=s.defaultProps,c)h[f]===void 0&&(h[f]=c[f]);return{$$typeof:e,type:s,key:d,ref:p,props:h,_owner:o.current}}return _a.Fragment=n,_a.jsx=a,_a.jsxs=a,_a}var Aa={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Mh;function Pw(){return Mh||(Mh=1,process.env.NODE_ENV!=="production"&&function(){var t=x,e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),u=Symbol.iterator,g="@@iterator";function m(Y){if(Y===null||typeof Y!="object")return null;var Ee=u&&Y[u]||Y[g];return typeof Ee=="function"?Ee:null}var y=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(Y){{for(var Ee=arguments.length,ke=new Array(Ee>1?Ee-1:0),je=1;je<Ee;je++)ke[je-1]=arguments[je];b("error",Y,ke)}}function b(Y,Ee,ke){{var je=y.ReactDebugCurrentFrame,mt=je.getStackAddendum();mt!==""&&(Ee+="%s",ke=ke.concat([mt]));var Pt=ke.map(function(st){return String(st)});Pt.unshift("Warning: "+Ee),Function.prototype.apply.call(console[Y],console,Pt)}}var E=!1,C=!1,S=!1,T=!1,P=!1,N;N=Symbol.for("react.module.reference");function L(Y){return!!(typeof Y=="string"||typeof Y=="function"||Y===r||Y===i||P||Y===o||Y===l||Y===f||T||Y===p||E||C||S||typeof Y=="object"&&Y!==null&&(Y.$$typeof===d||Y.$$typeof===h||Y.$$typeof===a||Y.$$typeof===s||Y.$$typeof===c||Y.$$typeof===N||Y.getModuleId!==void 0))}function U(Y,Ee,ke){var je=Y.displayName;if(je)return je;var mt=Ee.displayName||Ee.name||"";return mt!==""?ke+"("+mt+")":ke}function j(Y){return Y.displayName||"Context"}function K(Y){if(Y==null)return null;if(typeof Y.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof Y=="function")return Y.displayName||Y.name||null;if(typeof Y=="string")return Y;switch(Y){case r:return"Fragment";case n:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof Y=="object")switch(Y.$$typeof){case s:var Ee=Y;return j(Ee)+".Consumer";case a:var ke=Y;return j(ke._context)+".Provider";case c:return U(Y,Y.render,"ForwardRef");case h:var je=Y.displayName||null;return je!==null?je:K(Y.type)||"Memo";case d:{var mt=Y,Pt=mt._payload,st=mt._init;try{return K(st(Pt))}catch{return null}}}return null}var G=Object.assign,k=0,V,z,te,re,ne,se,we;function le(){}le.__reactDisabledLog=!0;function Ce(){{if(k===0){V=console.log,z=console.info,te=console.warn,re=console.error,ne=console.group,se=console.groupCollapsed,we=console.groupEnd;var Y={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:Y,log:Y,warn:Y,error:Y,group:Y,groupCollapsed:Y,groupEnd:Y})}k++}}function ye(){{if(k--,k===0){var Y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},Y,{value:V}),info:G({},Y,{value:z}),warn:G({},Y,{value:te}),error:G({},Y,{value:re}),group:G({},Y,{value:ne}),groupCollapsed:G({},Y,{value:se}),groupEnd:G({},Y,{value:we})})}k<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=y.ReactCurrentDispatcher,W;function J(Y,Ee,ke){{if(W===void 0)try{throw Error()}catch(mt){var je=mt.stack.trim().match(/\n( *(at )?)/);W=je&&je[1]||""}return`
|
|
18
|
-
`+W+Y}}var I=!1,M;{var F=typeof WeakMap=="function"?WeakMap:Map;M=new F}function B(Y,Ee){if(!Y||I)return"";{var ke=M.get(Y);if(ke!==void 0)return ke}var je;I=!0;var mt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Pt;Pt=H.current,H.current=null,Ce();try{if(Ee){var st=function(){throw Error()};if(Object.defineProperty(st.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(st,[])}catch(cn){je=cn}Reflect.construct(Y,[],st)}else{try{st.call()}catch(cn){je=cn}Y.call(st.prototype)}}else{try{throw Error()}catch(cn){je=cn}Y()}}catch(cn){if(cn&&je&&typeof cn.stack=="string"){for(var it=cn.stack.split(`
|
|
19
|
-
`),_n=je.stack.split(`
|
|
20
|
-
`),Yt=it.length-1,Xt=_n.length-1;Yt>=1&&Xt>=0&&it[Yt]!==_n[Xt];)Xt--;for(;Yt>=1&&Xt>=0;Yt--,Xt--)if(it[Yt]!==_n[Xt]){if(Yt!==1||Xt!==1)do if(Yt--,Xt--,Xt<0||it[Yt]!==_n[Xt]){var cr=`
|
|
21
|
-
`+it[Yt].replace(" at new "," at ");return Y.displayName&&cr.includes("<anonymous>")&&(cr=cr.replace("<anonymous>",Y.displayName)),typeof Y=="function"&&M.set(Y,cr),cr}while(Yt>=1&&Xt>=0);break}}}finally{I=!1,H.current=Pt,ye(),Error.prepareStackTrace=mt}var Vr=Y?Y.displayName||Y.name:"",vo=Vr?J(Vr):"";return typeof Y=="function"&&M.set(Y,vo),vo}function X(Y,Ee,ke){return B(Y,!1)}function ee(Y){var Ee=Y.prototype;return!!(Ee&&Ee.isReactComponent)}function Z(Y,Ee,ke){if(Y==null)return"";if(typeof Y=="function")return B(Y,ee(Y));if(typeof Y=="string")return J(Y);switch(Y){case l:return J("Suspense");case f:return J("SuspenseList")}if(typeof Y=="object")switch(Y.$$typeof){case c:return X(Y.render);case h:return Z(Y.type,Ee,ke);case d:{var je=Y,mt=je._payload,Pt=je._init;try{return Z(Pt(mt),Ee,ke)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,pe={},be=y.ReactDebugCurrentFrame;function fe(Y){if(Y){var Ee=Y._owner,ke=Z(Y.type,Y._source,Ee?Ee.type:null);be.setExtraStackFrame(ke)}else be.setExtraStackFrame(null)}function he(Y,Ee,ke,je,mt){{var Pt=Function.call.bind($);for(var st in Y)if(Pt(Y,st)){var it=void 0;try{if(typeof Y[st]!="function"){var _n=Error((je||"React class")+": "+ke+" type `"+st+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof Y[st]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _n.name="Invariant Violation",_n}it=Y[st](Ee,st,je,ke,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Yt){it=Yt}it&&!(it instanceof Error)&&(fe(mt),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",je||"React class",ke,st,typeof it),fe(null)),it instanceof Error&&!(it.message in pe)&&(pe[it.message]=!0,fe(mt),w("Failed %s type: %s",ke,it.message),fe(null))}}}var ve=Array.isArray;function ue(Y){return ve(Y)}function Be(Y){{var Ee=typeof Symbol=="function"&&Symbol.toStringTag,ke=Ee&&Y[Symbol.toStringTag]||Y.constructor.name||"Object";return ke}}function Re(Y){try{return at(Y),!1}catch{return!0}}function at(Y){return""+Y}function xe(Y){if(Re(Y))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Be(Y)),at(Y)}var De=y.ReactCurrentOwner,Pe={key:!0,ref:!0,__self:!0,__source:!0},ot,Ze,Ot;Ot={};function Le(Y){if($.call(Y,"ref")){var Ee=Object.getOwnPropertyDescriptor(Y,"ref").get;if(Ee&&Ee.isReactWarning)return!1}return Y.ref!==void 0}function _e(Y){if($.call(Y,"key")){var Ee=Object.getOwnPropertyDescriptor(Y,"key").get;if(Ee&&Ee.isReactWarning)return!1}return Y.key!==void 0}function $t(Y,Ee){if(typeof Y.ref=="string"&&De.current&&Ee&&De.current.stateNode!==Ee){var ke=K(De.current.type);Ot[ke]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',K(De.current.type),Y.ref),Ot[ke]=!0)}}function Ht(Y,Ee){{var ke=function(){ot||(ot=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Ee))};ke.isReactWarning=!0,Object.defineProperty(Y,"key",{get:ke,configurable:!0})}}function Cn(Y,Ee){{var ke=function(){Ze||(Ze=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",Ee))};ke.isReactWarning=!0,Object.defineProperty(Y,"ref",{get:ke,configurable:!0})}}var Yn=function(Y,Ee,ke,je,mt,Pt,st){var it={$$typeof:e,type:Y,key:Ee,ref:ke,props:st,_owner:Pt};return it._store={},Object.defineProperty(it._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(it,"_self",{configurable:!1,enumerable:!1,writable:!1,value:je}),Object.defineProperty(it,"_source",{configurable:!1,enumerable:!1,writable:!1,value:mt}),Object.freeze&&(Object.freeze(it.props),Object.freeze(it)),it};function Zr(Y,Ee,ke,je,mt){{var Pt,st={},it=null,_n=null;ke!==void 0&&(xe(ke),it=""+ke),_e(Ee)&&(xe(Ee.key),it=""+Ee.key),Le(Ee)&&(_n=Ee.ref,$t(Ee,mt));for(Pt in Ee)$.call(Ee,Pt)&&!Pe.hasOwnProperty(Pt)&&(st[Pt]=Ee[Pt]);if(Y&&Y.defaultProps){var Yt=Y.defaultProps;for(Pt in Yt)st[Pt]===void 0&&(st[Pt]=Yt[Pt])}if(it||_n){var Xt=typeof Y=="function"?Y.displayName||Y.name||"Unknown":Y;it&&Ht(st,Xt),_n&&Cn(st,Xt)}return Yn(Y,it,_n,mt,je,De.current,st)}}var Nn=y.ReactCurrentOwner,Kn=y.ReactDebugCurrentFrame;function yn(Y){if(Y){var Ee=Y._owner,ke=Z(Y.type,Y._source,Ee?Ee.type:null);Kn.setExtraStackFrame(ke)}else Kn.setExtraStackFrame(null)}var an;an=!1;function sr(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function eo(){{if(Nn.current){var Y=K(Nn.current.type);if(Y)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+Y+"`."}return""}}function He(Y){return""}var $e={};function Xe(Y){{var Ee=eo();if(!Ee){var ke=typeof Y=="string"?Y:Y.displayName||Y.name;ke&&(Ee=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+ke+">.")}return Ee}}function pt(Y,Ee){{if(!Y._store||Y._store.validated||Y.key!=null)return;Y._store.validated=!0;var ke=Xe(Ee);if($e[ke])return;$e[ke]=!0;var je="";Y&&Y._owner&&Y._owner!==Nn.current&&(je=" It was passed a child from "+K(Y._owner.type)+"."),yn(Y),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ke,je),yn(null)}}function Wt(Y,Ee){{if(typeof Y!="object")return;if(ue(Y))for(var ke=0;ke<Y.length;ke++){var je=Y[ke];sr(je)&&pt(je,Ee)}else if(sr(Y))Y._store&&(Y._store.validated=!0);else if(Y){var mt=m(Y);if(typeof mt=="function"&&mt!==Y.entries)for(var Pt=mt.call(Y),st;!(st=Pt.next()).done;)sr(st.value)&&pt(st.value,Ee)}}}function Ca(Y){{var Ee=Y.type;if(Ee==null||typeof Ee=="string")return;var ke;if(typeof Ee=="function")ke=Ee.propTypes;else if(typeof Ee=="object"&&(Ee.$$typeof===c||Ee.$$typeof===h))ke=Ee.propTypes;else return;if(ke){var je=K(Ee);he(ke,Y.props,"prop",je,Y)}else if(Ee.PropTypes!==void 0&&!an){an=!0;var mt=K(Ee);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",mt||"Unknown")}typeof Ee.getDefaultProps=="function"&&!Ee.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xi(Y){{for(var Ee=Object.keys(Y.props),ke=0;ke<Ee.length;ke++){var je=Ee[ke];if(je!=="children"&&je!=="key"){yn(Y),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",je),yn(null);break}}Y.ref!==null&&(yn(Y),w("Invalid attribute `ref` supplied to `React.Fragment`."),yn(null))}}var sn={};function yo(Y,Ee,ke,je,mt,Pt){{var st=L(Y);if(!st){var it="";(Y===void 0||typeof Y=="object"&&Y!==null&&Object.keys(Y).length===0)&&(it+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _n=He();_n?it+=_n:it+=eo();var Yt;Y===null?Yt="null":ue(Y)?Yt="array":Y!==void 0&&Y.$$typeof===e?(Yt="<"+(K(Y.type)||"Unknown")+" />",it=" Did you accidentally export a JSX literal instead of a component?"):Yt=typeof Y,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Yt,it)}var Xt=Zr(Y,Ee,ke,mt,Pt);if(Xt==null)return Xt;if(st){var cr=Ee.children;if(cr!==void 0)if(je)if(ue(cr)){for(var Vr=0;Vr<cr.length;Vr++)Wt(cr[Vr],Y);Object.freeze&&Object.freeze(cr)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Wt(cr,Y)}if($.call(Ee,"key")){var vo=K(Y),cn=Object.keys(Ee).filter(function(tl){return tl!=="key"}),Qo=cn.length>0?"{key: someKey, "+cn.join(": ..., ")+": ...}":"{key: someKey}";if(!sn[vo+Qo]){var _h=cn.length>0?"{"+cn.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Qo,vo,_h,vo),sn[vo+Qo]=!0}}return Y===r?xi(Xt):Ca(Xt),Xt}}function gt(Y,Ee,ke){return yo(Y,Ee,ke,!0)}function Ch(Y,Ee,ke){return yo(Y,Ee,ke,!1)}var br=Ch,Br=gt;Aa.Fragment=r,Aa.jsx=br,Aa.jsxs=Br}()),Aa}process.env.NODE_ENV==="production"?dl.exports=Ow():dl.exports=Pw();var v=dl.exports;const fl=x.createContext({});let Ws=class{constructor(){$n(this,"type");$n(this,"uuid");$n(this,"contact");$n(this,"inputData");$n(this,"results");$n(this,"events");$n(this,"currency");$n(this,"loyaltyProgram")}};const Lh=x.createContext({portalSession:new Ws,mutate:async()=>{}});var hl={exports:{}},pl={};/**
|
|
31
|
-
* @license React
|
|
32
|
-
* use-sync-external-store-shim.production.min.js
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
-
*
|
|
36
|
-
* This source code is licensed under the MIT license found in the
|
|
37
|
-
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var Fh;function kw(){if(Fh)return pl;Fh=1;var t=x;function e(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,o=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function s(h,d){var p=d(),u=r({inst:{value:p,getSnapshot:d}}),g=u[0].inst,m=u[1];return i(function(){g.value=p,g.getSnapshot=d,c(g)&&m({inst:g})},[h,p,d]),o(function(){return c(g)&&m({inst:g}),h(function(){c(g)&&m({inst:g})})},[h]),a(p),p}function c(h){var d=h.getSnapshot;h=h.value;try{var p=d();return!n(h,p)}catch{return!0}}function l(h,d){return d()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return pl.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:f,pl}var gl={};/**
|
|
39
|
-
* @license React
|
|
40
|
-
* use-sync-external-store-shim.development.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var jh;function Bw(){return jh||(jh=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t=x,e=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var E=arguments.length,C=new Array(E>1?E-1:0),S=1;S<E;S++)C[S-1]=arguments[S];r("error",b,C)}}function r(b,E,C){{var S=e.ReactDebugCurrentFrame,T=S.getStackAddendum();T!==""&&(E+="%s",C=C.concat([T]));var P=C.map(function(N){return String(N)});P.unshift("Warning: "+E),Function.prototype.apply.call(console[b],console,P)}}function o(b,E){return b===E&&(b!==0||1/b===1/E)||b!==b&&E!==E}var i=typeof Object.is=="function"?Object.is:o,a=t.useState,s=t.useEffect,c=t.useLayoutEffect,l=t.useDebugValue,f=!1,h=!1;function d(b,E,C){f||t.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=E();if(!h){var T=E();i(S,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),h=!0)}var P=a({inst:{value:S,getSnapshot:E}}),N=P[0].inst,L=P[1];return c(function(){N.value=S,N.getSnapshot=E,p(N)&&L({inst:N})},[b,S,E]),s(function(){p(N)&&L({inst:N});var U=function(){p(N)&&L({inst:N})};return b(U)},[b]),l(S),S}function p(b){var E=b.getSnapshot,C=b.value;try{var S=E();return!i(C,S)}catch{return!0}}function u(b,E,C){return E()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",m=!g,y=m?u:d,w=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y;gl.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),gl}process.env.NODE_ENV==="production"?hl.exports=kw():hl.exports=Bw();var Nw=hl.exports;const _o=()=>{},Xn=_o(),ml=Object,vt=t=>t===Xn,Gr=t=>typeof t=="function",Ao=(t,e)=>({...t,...e}),Rw=t=>Gr(t.then),Ys=new WeakMap;let Dw=0;const Sa=t=>{const e=typeof t,n=t&&t.constructor,r=n==Date;let o,i;if(ml(t)===t&&!r&&n!=RegExp){if(o=Ys.get(t),o)return o;if(o=++Dw+"~",Ys.set(t,o),n==Array){for(o="@",i=0;i<t.length;i++)o+=Sa(t[i])+",";Ys.set(t,o)}if(n==ml){o="#";const a=ml.keys(t).sort();for(;!vt(i=a.pop());)vt(t[i])||(o+=i+":"+Sa(t[i])+",");Ys.set(t,o)}}else o=r?t.toJSON():e=="symbol"?t.toString():e=="string"?JSON.stringify(t):""+t;return o},to=new WeakMap,yl={},Ks={},vl="undefined",zs=typeof window!=vl,wl=typeof document!=vl,Mw=()=>zs&&typeof window.requestAnimationFrame!=vl,Vh=(t,e)=>{const n=to.get(t);return[()=>!vt(e)&&t.get(e)||yl,r=>{if(!vt(e)){const o=t.get(e);e in Ks||(Ks[e]=o),n[5](e,Ao(o,r),o||yl)}},n[6],()=>!vt(e)&&e in Ks?Ks[e]:!vt(e)&&t.get(e)||yl]};let bl=!0;const Lw=()=>bl,[El,Cl]=zs&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_o,_o],Fw=()=>{const t=wl&&document.visibilityState;return vt(t)||t!=="hidden"},jw=t=>(wl&&document.addEventListener("visibilitychange",t),El("focus",t),()=>{wl&&document.removeEventListener("visibilitychange",t),Cl("focus",t)}),Vw=t=>{const e=()=>{bl=!0,t()},n=()=>{bl=!1};return El("online",e),El("offline",n),()=>{Cl("online",e),Cl("offline",n)}},Uw={isOnline:Lw,isVisible:Fw},Gw={initFocus:jw,initReconnect:Vw},Uh=!x.useId,Ia=!zs||"Deno"in window,qw=t=>Mw()?window.requestAnimationFrame(t):setTimeout(t,1),_l=Ia?x.useEffect:x.useLayoutEffect,Al=typeof navigator<"u"&&navigator.connection,Gh=!Ia&&Al&&(["slow-2g","2g"].includes(Al.effectiveType)||Al.saveData),Sl=t=>{if(Gr(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?Sa(t):"",[t,e]};let Hw=0;const Il=()=>++Hw,qh=0,Hh=1,Wh=2;var Ta={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:qh,MUTATE_EVENT:Wh,RECONNECT_EVENT:Hh};async function Yh(...t){const[e,n,r,o]=t,i=Ao({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let c=i.optimisticData;const l=d=>typeof s=="function"?s(d):s!==!1,f=i.throwOnError;if(Gr(n)){const d=n,p=[],u=e.keys();for(const g of u)!/^\$(inf|sub)\$/.test(g)&&d(e.get(g)._k)&&p.push(g);return Promise.all(p.map(h))}return h(n);async function h(d){const[p]=Sl(d);if(!p)return;const[u,g]=Vh(e,p),[m,y,w,b]=to.get(e),E=()=>{const K=m[p];return(Gr(i.revalidate)?i.revalidate(u().data,d):i.revalidate!==!1)&&(delete w[p],delete b[p],K&&K[0])?K[0](Wh).then(()=>u().data):u().data};if(t.length<3)return E();let C=r,S;const T=Il();y[p]=[T,0];const P=!vt(c),N=u(),L=N.data,U=N._c,j=vt(U)?L:U;if(P&&(c=Gr(c)?c(j,L):c,g({data:c,_c:j})),Gr(C))try{C=C(j)}catch(K){S=K}if(C&&Rw(C))if(C=await C.catch(K=>{S=K}),T!==y[p][0]){if(S)throw S;return C}else S&&P&&l(S)&&(a=!0,g({data:j,_c:Xn}));if(a&&!S)if(Gr(a)){const K=a(C,j);g({data:K,error:Xn,_c:Xn})}else g({data:C,error:Xn,_c:Xn});if(y[p][1]=Il(),Promise.resolve(E()).then(()=>{g({_c:Xn})}),S){if(f)throw S;return}return C}}const Kh=(t,e)=>{for(const n in t)t[n][0]&&t[n][0](e)},Ww=(t,e)=>{if(!to.has(t)){const n=Ao(Gw,e),r={},o=Yh.bind(Xn,t);let i=_o;const a={},s=(f,h)=>{const d=a[f]||[];return a[f]=d,d.push(h),()=>d.splice(d.indexOf(h),1)},c=(f,h,d)=>{t.set(f,h);const p=a[f];if(p)for(const u of p)u(h,d)},l=()=>{if(!to.has(t)&&(to.set(t,[r,{},{},{},o,c,s]),!Ia)){const f=n.initFocus(setTimeout.bind(Xn,Kh.bind(Xn,r,qh))),h=n.initReconnect(setTimeout.bind(Xn,Kh.bind(Xn,r,Hh)));i=()=>{f&&f(),h&&h(),to.delete(t)}}};return l(),[t,o,l,i]}return[t,to.get(t)[4]]},Yw=(t,e,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!vt(i)&&a>i||setTimeout(r,s,o)},Kw=(t,e)=>Sa(t)==Sa(e),[zh,zw]=Ww(new Map),$w=Ao({onLoadingSlow:_o,onSuccess:_o,onError:_o,onErrorRetry:Yw,onDiscarded:_o,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Gh?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Gh?5e3:3e3,compare:Kw,isPaused:()=>!1,cache:zh,mutate:zw,fallback:{}},Uw),Xw=(t,e)=>{const n=Ao(t,e);if(e){const{use:r,fallback:o}=t,{use:i,fallback:a}=e;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Ao(o,a))}return n},Qw=x.createContext({}),Jw="$inf$",$h=zs&&window.__SWR_DEVTOOLS_USE__,Zw=$h?window.__SWR_DEVTOOLS_USE__:[],eb=()=>{$h&&(window.__SWR_DEVTOOLS_REACT__=x)},tb=t=>Gr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],nb=()=>Ao($w,x.useContext(Qw)),rb=t=>(e,n,r)=>t(e,n&&((...i)=>{const[a]=Sl(e),[,,,s]=to.get(zh);if(a.startsWith(Jw))return n(...i);const c=s[a];return vt(c)?n(...i):(delete s[a],c)}),r),ob=Zw.concat(rb),ib=t=>function(...n){const r=nb(),[o,i,a]=tb(n),s=Xw(r,a);let c=t;const{use:l}=s,f=(l||[]).concat(ob);for(let h=f.length;h--;)c=f[h](c);return c(o,i||s.fetcher||null,s)},ab=(t,e,n)=>{const r=e[t]||(e[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};eb();const Xh=x.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),Tl={dedupe:!0},sb=ib((t,e,n)=>{const{cache:r,compare:o,suspense:i,fallbackData:a,revalidateOnMount:s,revalidateIfStale:c,refreshInterval:l,refreshWhenHidden:f,refreshWhenOffline:h,keepPreviousData:d}=n,[p,u,g,m]=to.get(r),[y,w]=Sl(t),b=x.useRef(!1),E=x.useRef(!1),C=x.useRef(y),S=x.useRef(e),T=x.useRef(n),P=()=>T.current,N=()=>P().isVisible()&&P().isOnline(),[L,U,j,K]=Vh(r,y),G=x.useRef({}).current,k=vt(a)?n.fallback[y]:a,V=(B,X)=>{for(const ee in G){const Z=ee;if(Z==="data"){if(!o(B[Z],X[Z])&&(!vt(B[Z])||!o(ye,X[Z])))return!1}else if(X[Z]!==B[Z])return!1}return!0},z=x.useMemo(()=>{const B=!y||!e?!1:vt(s)?P().isPaused()||i?!1:vt(c)?!0:c:s,X=fe=>{const he=Ao(fe);return delete he._k,B?{isValidating:!0,isLoading:!0,...he}:he},ee=L(),Z=K(),$=X(ee),pe=ee===Z?$:X(Z);let be=$;return[()=>{const fe=X(L());return V(fe,be)?(be.data=fe.data,be.isLoading=fe.isLoading,be.isValidating=fe.isValidating,be.error=fe.error,be):(be=fe,fe)},()=>pe]},[r,y]),te=Nw.useSyncExternalStore(x.useCallback(B=>j(y,(X,ee)=>{V(ee,X)||B()}),[r,y]),z[0],z[1]),re=!b.current,ne=p[y]&&p[y].length>0,se=te.data,we=vt(se)?k:se,le=te.error,Ce=x.useRef(we),ye=d?vt(se)?Ce.current:se:we,H=ne&&!vt(le)?!1:re&&!vt(s)?s:P().isPaused()?!1:i?vt(we)?!1:c:vt(we)||c,W=!!(y&&e&&re&&H),J=vt(te.isValidating)?W:te.isValidating,I=vt(te.isLoading)?W:te.isLoading,M=x.useCallback(async B=>{const X=S.current;if(!y||!X||E.current||P().isPaused())return!1;let ee,Z,$=!0;const pe=B||{},be=!g[y]||!pe.dedupe,fe=()=>Uh?!E.current&&y===C.current&&b.current:y===C.current,he={isValidating:!1,isLoading:!1},ve=()=>{U(he)},ue=()=>{const Re=g[y];Re&&Re[1]===Z&&delete g[y]},Be={isValidating:!0};vt(L().data)&&(Be.isLoading=!0);try{if(be&&(U(Be),n.loadingTimeout&&vt(L().data)&&setTimeout(()=>{$&&fe()&&P().onLoadingSlow(y,n)},n.loadingTimeout),g[y]=[X(w),Il()]),[ee,Z]=g[y],ee=await ee,be&&setTimeout(ue,n.dedupingInterval),!g[y]||g[y][1]!==Z)return be&&fe()&&P().onDiscarded(y),!1;he.error=Xn;const Re=u[y];if(!vt(Re)&&(Z<=Re[0]||Z<=Re[1]||Re[1]===0))return ve(),be&&fe()&&P().onDiscarded(y),!1;const at=L().data;he.data=o(at,ee)?at:ee,be&&fe()&&P().onSuccess(ee,y,n)}catch(Re){ue();const at=P(),{shouldRetryOnError:xe}=at;at.isPaused()||(he.error=Re,be&&fe()&&(at.onError(Re,y,at),(xe===!0||Gr(xe)&&xe(Re))&&(!P().revalidateOnFocus||!P().revalidateOnReconnect||N())&&at.onErrorRetry(Re,y,at,De=>{const Pe=p[y];Pe&&Pe[0]&&Pe[0](Ta.ERROR_REVALIDATE_EVENT,De)},{retryCount:(pe.retryCount||0)+1,dedupe:!0})))}return $=!1,ve(),!0},[y,r]),F=x.useCallback((...B)=>Yh(r,C.current,...B),[]);if(_l(()=>{S.current=e,T.current=n,vt(se)||(Ce.current=se)}),_l(()=>{if(!y)return;const B=M.bind(Xn,Tl);let X=0;const Z=ab(y,p,($,pe={})=>{if($==Ta.FOCUS_EVENT){const be=Date.now();P().revalidateOnFocus&&be>X&&N()&&(X=be+P().focusThrottleInterval,B())}else if($==Ta.RECONNECT_EVENT)P().revalidateOnReconnect&&N()&&B();else{if($==Ta.MUTATE_EVENT)return M();if($==Ta.ERROR_REVALIDATE_EVENT)return M(pe)}});return E.current=!1,C.current=y,b.current=!0,U({_k:w}),H&&(vt(we)||Ia?B():qw(B)),()=>{E.current=!0,Z()}},[y]),_l(()=>{let B;function X(){const Z=Gr(l)?l(L().data):l;Z&&B!==-1&&(B=setTimeout(ee,Z))}function ee(){!L().error&&(f||P().isVisible())&&(h||P().isOnline())?M(Tl).then(X):X()}return X(),()=>{B&&(clearTimeout(B),B=-1)}},[l,f,h,y]),x.useDebugValue(ye),i&&vt(we)&&y){if(!Uh&&Ia)throw new Error("Fallback data is required when using suspense in SSR.");S.current=e,T.current=n,E.current=!1;const B=m[y];if(!vt(B)){const X=F(B);Xh(X)}if(vt(le)){const X=M(Tl);vt(ye)||(X.status="fulfilled",X.value=!0),Xh(X)}else throw le}return{mutate:F,get data(){return G.data=!0,ye},get error(){return G.error=!0,le},get isValidating(){return G.isValidating=!0,J},get isLoading(){return G.isLoading=!0,I}}});function Qh(t,e){return function(){return t.apply(e,arguments)}}const{toString:cb}=Object.prototype,{getPrototypeOf:xl}=Object,$s=(t=>e=>{const n=cb.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Nr=t=>(t=t.toLowerCase(),e=>$s(e)===t),Xs=t=>e=>typeof e===t,{isArray:ki}=Array,xa=Xs("undefined");function ub(t){return t!==null&&!xa(t)&&t.constructor!==null&&!xa(t.constructor)&&ur(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Jh=Nr("ArrayBuffer");function lb(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Jh(t.buffer),e}const db=Xs("string"),ur=Xs("function"),Zh=Xs("number"),Qs=t=>t!==null&&typeof t=="object",fb=t=>t===!0||t===!1,Js=t=>{if($s(t)!=="object")return!1;const e=xl(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},hb=Nr("Date"),pb=Nr("File"),gb=Nr("Blob"),mb=Nr("FileList"),yb=t=>Qs(t)&&ur(t.pipe),vb=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||ur(t.append)&&((e=$s(t))==="formdata"||e==="object"&&ur(t.toString)&&t.toString()==="[object FormData]"))},wb=Nr("URLSearchParams"),[bb,Eb,Cb,_b]=["ReadableStream","Request","Response","Headers"].map(Nr),Ab=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Oa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),ki(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let s;for(r=0;r<a;r++)s=i[r],e.call(null,t[s],s,t)}}function ep(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}const Zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tp=t=>!xa(t)&&t!==Zo;function Ol(){const{caseless:t}=tp(this)&&this||{},e={},n=(r,o)=>{const i=t&&ep(e,o)||o;Js(e[i])&&Js(r)?e[i]=Ol(e[i],r):Js(r)?e[i]=Ol({},r):ki(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Oa(arguments[r],n);return e}const Sb=(t,e,n,{allOwnKeys:r}={})=>(Oa(e,(o,i)=>{n&&ur(o)?t[i]=Qh(o,n):t[i]=o},{allOwnKeys:r}),t),Ib=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Tb=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},xb=(t,e,n,r)=>{let o,i,a;const s={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)a=o[i],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&xl(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Ob=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Pb=t=>{if(!t)return null;if(ki(t))return t;let e=t.length;if(!Zh(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},kb=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&xl(Uint8Array)),Bb=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},Nb=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Rb=Nr("HTMLFormElement"),Db=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),np=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mb=Nr("RegExp"),rp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Oa(n,(o,i)=>{let a;(a=e(o,i,t))!==!1&&(r[i]=a||o)}),Object.defineProperties(t,r)},Lb=t=>{rp(t,(e,n)=>{if(ur(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ur(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Fb=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return ki(t)?r(t):r(String(t).split(e)),n},jb=()=>{},Vb=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Ub(t){return!!(t&&ur(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Gb=t=>{const e=new Array(10),n=(r,o)=>{if(Qs(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=ki(r)?[]:{};return Oa(r,(a,s)=>{const c=n(a,o+1);!xa(c)&&(i[s]=c)}),e[o]=void 0,i}}return r};return n(t,0)},qb=Nr("AsyncFunction"),Hb=t=>t&&(Qs(t)||ur(t))&&ur(t.then)&&ur(t.catch),op=((t,e)=>t?setImmediate:e?((n,r)=>(Zo.addEventListener("message",({source:o,data:i})=>{o===Zo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Zo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ur(Zo.postMessage)),Wb=typeof queueMicrotask<"u"?queueMicrotask.bind(Zo):typeof process<"u"&&process.nextTick||op,de={isArray:ki,isArrayBuffer:Jh,isBuffer:ub,isFormData:vb,isArrayBufferView:lb,isString:db,isNumber:Zh,isBoolean:fb,isObject:Qs,isPlainObject:Js,isReadableStream:bb,isRequest:Eb,isResponse:Cb,isHeaders:_b,isUndefined:xa,isDate:hb,isFile:pb,isBlob:gb,isRegExp:Mb,isFunction:ur,isStream:yb,isURLSearchParams:wb,isTypedArray:kb,isFileList:mb,forEach:Oa,merge:Ol,extend:Sb,trim:Ab,stripBOM:Ib,inherits:Tb,toFlatObject:xb,kindOf:$s,kindOfTest:Nr,endsWith:Ob,toArray:Pb,forEachEntry:Bb,matchAll:Nb,isHTMLForm:Rb,hasOwnProperty:np,hasOwnProp:np,reduceDescriptors:rp,freezeMethods:Lb,toObjectSet:Fb,toCamelCase:Db,noop:jb,toFiniteNumber:Vb,findKey:ep,global:Zo,isContextDefined:tp,isSpecCompliantForm:Ub,toJSONObject:Gb,isAsyncFn:qb,isThenable:Hb,setImmediate:op,asap:Wb};function Je(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}de.inherits(Je,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}}});const ip=Je.prototype,ap={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ap[t]={value:t}}),Object.defineProperties(Je,ap),Object.defineProperty(ip,"isAxiosError",{value:!0}),Je.from=(t,e,n,r,o,i)=>{const a=Object.create(ip);return de.toFlatObject(t,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Je.call(a,t.message,e,n,r,o),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const Yb=null;function Pl(t){return de.isPlainObject(t)||de.isArray(t)}function sp(t){return de.endsWith(t,"[]")?t.slice(0,-2):t}function cp(t,e,n){return t?t.concat(e).map(function(o,i){return o=sp(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function Kb(t){return de.isArray(t)&&!t.some(Pl)}const zb=de.toFlatObject(de,{},null,function(e){return/^is[A-Z]/.test(e)});function Zs(t,e,n){if(!de.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!de.isUndefined(m[g])});const r=n.metaTokens,o=n.visitor||f,i=n.dots,a=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(e);if(!de.isFunction(o))throw new TypeError("visitor must be a function");function l(u){if(u===null)return"";if(de.isDate(u))return u.toISOString();if(!c&&de.isBlob(u))throw new Je("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(u)||de.isTypedArray(u)?c&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function f(u,g,m){let y=u;if(u&&!m&&typeof u=="object"){if(de.endsWith(g,"{}"))g=r?g:g.slice(0,-2),u=JSON.stringify(u);else if(de.isArray(u)&&Kb(u)||(de.isFileList(u)||de.endsWith(g,"[]"))&&(y=de.toArray(u)))return g=sp(g),y.forEach(function(b,E){!(de.isUndefined(b)||b===null)&&e.append(a===!0?cp([g],E,i):a===null?g:g+"[]",l(b))}),!1}return Pl(u)?!0:(e.append(cp(m,g,i),l(u)),!1)}const h=[],d=Object.assign(zb,{defaultVisitor:f,convertValue:l,isVisitable:Pl});function p(u,g){if(!de.isUndefined(u)){if(h.indexOf(u)!==-1)throw Error("Circular reference detected in "+g.join("."));h.push(u),de.forEach(u,function(y,w){(!(de.isUndefined(y)||y===null)&&o.call(e,y,de.isString(w)?w.trim():w,g,d))===!0&&p(y,g?g.concat(w):[w])}),h.pop()}}if(!de.isObject(t))throw new TypeError("data must be an object");return p(t),e}function up(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function kl(t,e){this._pairs=[],t&&Zs(t,this,e)}const lp=kl.prototype;lp.append=function(e,n){this._pairs.push([e,n])},lp.toString=function(e){const n=e?function(r){return e.call(this,r,up)}:up;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function $b(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function dp(t,e,n){if(!e)return t;const r=n&&n.encode||$b;de.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(o?i=o(e,n):i=de.isURLSearchParams(e)?e.toString():new kl(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class fp{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){de.forEach(this.handlers,function(r){r!==null&&e(r)})}}const hp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Xb={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:kl,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Bl=typeof window<"u"&&typeof document<"u",Nl=typeof navigator=="object"&&navigator||void 0,Qb=Bl&&(!Nl||["ReactNative","NativeScript","NS"].indexOf(Nl.product)<0),Jb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zb=Bl&&window.location.href||"http://localhost",Rn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bl,hasStandardBrowserEnv:Qb,hasStandardBrowserWebWorkerEnv:Jb,navigator:Nl,origin:Zb},Symbol.toStringTag,{value:"Module"})),...Xb};function e4(t,e){return Zs(t,new Rn.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Rn.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function t4(t){return de.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function n4(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function pp(t){function e(n,r,o,i){let a=n[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),c=i>=n.length;return a=!a&&de.isArray(o)?o.length:a,c?(de.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!de.isObject(o[a]))&&(o[a]=[]),e(n,r,o[a],i)&&de.isArray(o[a])&&(o[a]=n4(o[a])),!s)}if(de.isFormData(t)&&de.isFunction(t.entries)){const n={};return de.forEachEntry(t,(r,o)=>{e(t4(r),o,n,0)}),n}return null}function r4(t,e,n){if(de.isString(t))try{return(e||JSON.parse)(t),de.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const Pa={transitional:hp,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=de.isObject(e);if(i&&de.isHTMLForm(e)&&(e=new FormData(e)),de.isFormData(e))return o?JSON.stringify(pp(e)):e;if(de.isArrayBuffer(e)||de.isBuffer(e)||de.isStream(e)||de.isFile(e)||de.isBlob(e)||de.isReadableStream(e))return e;if(de.isArrayBufferView(e))return e.buffer;if(de.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return e4(e,this.formSerializer).toString();if((s=de.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Zs(s?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),r4(e)):e}],transformResponse:[function(e){const n=this.transitional||Pa.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(de.isResponse(e)||de.isReadableStream(e))return e;if(e&&de.isString(e)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?Je.from(s,Je.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rn.classes.FormData,Blob:Rn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],t=>{Pa.headers[t]={}});const o4=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),i4=t=>{const e={};let n,r,o;return t&&t.split(`
|
|
47
|
-
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||e[n]&&o4[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},gp=Symbol("internals");function ka(t){return t&&String(t).trim().toLowerCase()}function ec(t){return t===!1||t==null?t:de.isArray(t)?t.map(ec):String(t)}function a4(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const s4=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Rl(t,e,n,r,o){if(de.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!de.isString(e)){if(de.isString(r))return e.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(e)}}function c4(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function u4(t,e){const n=de.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,a){return this[r].call(this,e,o,i,a)},configurable:!0})})}class Qn{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(s,c,l){const f=ka(c);if(!f)throw new Error("header name must be a non-empty string");const h=de.findKey(o,f);(!h||o[h]===void 0||l===!0||l===void 0&&o[h]!==!1)&&(o[h||c]=ec(s))}const a=(s,c)=>de.forEach(s,(l,f)=>i(l,f,c));if(de.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(de.isString(e)&&(e=e.trim())&&!s4(e))a(i4(e),n);else if(de.isHeaders(e))for(const[s,c]of e.entries())i(c,s,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=ka(e),e){const r=de.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return a4(o);if(de.isFunction(n))return n.call(this,o,r);if(de.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ka(e),e){const r=de.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Rl(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(a){if(a=ka(a),a){const s=de.findKey(r,a);s&&(!n||Rl(r,r[s],s,n))&&(delete r[s],o=!0)}}return de.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||Rl(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return de.forEach(this,(o,i)=>{const a=de.findKey(r,i);if(a){n[a]=ec(o),delete n[i];return}const s=e?c4(i):String(i).trim();s!==i&&delete n[i],n[s]=ec(o),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return de.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&de.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
48
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[gp]=this[gp]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=ka(a);r[s]||(u4(o,a),r[s]=!0)}return de.isArray(e)?e.forEach(i):i(e),this}}Qn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Qn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),de.freezeMethods(Qn);function Dl(t,e){const n=this||Pa,r=e||n,o=Qn.from(r.headers);let i=r.data;return de.forEach(t,function(s){i=s.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function mp(t){return!!(t&&t.__CANCEL__)}function Bi(t,e,n){Je.call(this,t??"canceled",Je.ERR_CANCELED,e,n),this.name="CanceledError"}de.inherits(Bi,Je,{__CANCEL__:!0});function yp(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Je("Request failed with status code "+n.status,[Je.ERR_BAD_REQUEST,Je.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function l4(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function d4(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,a;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),f=r[i];a||(a=l),n[o]=c,r[o]=l;let h=i,d=0;for(;h!==o;)d+=n[h++],h=h%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-a<e)return;const p=f&&l-f;return p?Math.round(d*1e3/p):void 0}}function f4(t,e){let n=0,r=1e3/e,o,i;const a=(l,f=Date.now())=>{n=f,o=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const f=Date.now(),h=f-n;h>=r?a(l,f):(o=l,i||(i=setTimeout(()=>{i=null,a(o)},r-h)))},()=>o&&a(o)]}const tc=(t,e,n=3)=>{let r=0;const o=d4(50,250);return f4(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,c=a-r,l=o(c),f=a<=s;r=a;const h={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&f?(s-a)/l:void 0,event:i,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(h)},n)},vp=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},wp=t=>(...e)=>de.asap(()=>t(...e)),h4=Rn.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Rn.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Rn.origin),Rn.navigator&&/(msie|trident)/i.test(Rn.navigator.userAgent)):()=>!0,p4=Rn.hasStandardBrowserEnv?{write(t,e,n,r,o,i){const a=[t+"="+encodeURIComponent(e)];de.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),de.isString(r)&&a.push("path="+r),de.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function g4(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function m4(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bp(t,e,n){let r=!g4(e);return t&&r||n==!1?m4(t,e):e}const Ep=t=>t instanceof Qn?{...t}:t;function ei(t,e){e=e||{};const n={};function r(l,f,h,d){return de.isPlainObject(l)&&de.isPlainObject(f)?de.merge.call({caseless:d},l,f):de.isPlainObject(f)?de.merge({},f):de.isArray(f)?f.slice():f}function o(l,f,h,d){if(de.isUndefined(f)){if(!de.isUndefined(l))return r(void 0,l,h,d)}else return r(l,f,h,d)}function i(l,f){if(!de.isUndefined(f))return r(void 0,f)}function a(l,f){if(de.isUndefined(f)){if(!de.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function s(l,f,h){if(h in e)return r(l,f);if(h in t)return r(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,f,h)=>o(Ep(l),Ep(f),h,!0)};return de.forEach(Object.keys(Object.assign({},t,e)),function(f){const h=c[f]||o,d=h(t[f],e[f],f);de.isUndefined(d)&&h!==s||(n[f]=d)}),n}const Cp=t=>{const e=ei({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=e;e.headers=a=Qn.from(a),e.url=dp(bp(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(de.isFormData(n)){if(Rn.hasStandardBrowserEnv||Rn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...f]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...f].join("; "))}}if(Rn.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(e)),r||r!==!1&&h4(e.url))){const l=o&&i&&p4.read(i);l&&a.set(o,l)}return e},y4=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,r){const o=Cp(t);let i=o.data;const a=Qn.from(o.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=o,f,h,d,p,u;function g(){p&&p(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function y(){if(!m)return;const b=Qn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!s||s==="text"||s==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:t,request:m};yp(function(T){n(T),g()},function(T){r(T),g()},C),m=null}"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(y)},m.onabort=function(){m&&(r(new Je("Request aborted",Je.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new Je("Network Error",Je.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const C=o.transitional||hp;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new Je(E,C.clarifyTimeoutError?Je.ETIMEDOUT:Je.ECONNABORTED,t,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&de.forEach(a.toJSON(),function(E,C){m.setRequestHeader(C,E)}),de.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),s&&s!=="json"&&(m.responseType=o.responseType),l&&([d,u]=tc(l,!0),m.addEventListener("progress",d)),c&&m.upload&&([h,p]=tc(c),m.upload.addEventListener("progress",h),m.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(f=b=>{m&&(r(!b||b.type?new Bi(null,t,m):b),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const w=l4(o.url);if(w&&Rn.protocols.indexOf(w)===-1){r(new Je("Unsupported protocol "+w+":",Je.ERR_BAD_REQUEST,t));return}m.send(i||null)})},v4=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,o;const i=function(l){if(!o){o=!0,s();const f=l instanceof Error?l:this.reason;r.abort(f instanceof Je?f:new Bi(f instanceof Error?f.message:f))}};let a=e&&setTimeout(()=>{a=null,i(new Je(`timeout ${e} of ms exceeded`,Je.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:c}=r;return c.unsubscribe=()=>de.asap(s),c}},w4=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},b4=async function*(t,e){for await(const n of E4(t))yield*w4(n,e)},E4=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},_p=(t,e,n,r)=>{const o=b4(t,e);let i=0,a,s=c=>{a||(a=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await o.next();if(l){s(),c.close();return}let h=f.byteLength;if(n){let d=i+=h;n(d)}c.enqueue(new Uint8Array(f))}catch(l){throw s(l),l}},cancel(c){return s(c),o.return()}},{highWaterMark:2})},nc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ap=nc&&typeof ReadableStream=="function",C4=nc&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},_4=Ap&&Sp(()=>{let t=!1;const e=new Request(Rn.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ip=64*1024,Ml=Ap&&Sp(()=>de.isReadableStream(new Response("").body)),rc={stream:Ml&&(t=>t.body)};nc&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!rc[e]&&(rc[e]=de.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Je(`Response type '${e}' is not supported`,Je.ERR_NOT_SUPPORT,r)})})})(new Response);const A4=async t=>{if(t==null)return 0;if(de.isBlob(t))return t.size;if(de.isSpecCompliantForm(t))return(await new Request(Rn.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(de.isArrayBufferView(t)||de.isArrayBuffer(t))return t.byteLength;if(de.isURLSearchParams(t)&&(t=t+""),de.isString(t))return(await C4(t)).byteLength},S4=async(t,e)=>{const n=de.toFiniteNumber(t.getContentLength());return n??A4(e)},Ll={http:Yb,xhr:y4,fetch:nc&&(async t=>{let{url:e,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:f,withCredentials:h="same-origin",fetchOptions:d}=Cp(t);l=l?(l+"").toLowerCase():"text";let p=v4([o,i&&i.toAbortSignal()],a),u;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&_4&&n!=="get"&&n!=="head"&&(m=await S4(f,r))!==0){let C=new Request(e,{method:"POST",body:r,duplex:"half"}),S;if(de.isFormData(r)&&(S=C.headers.get("content-type"))&&f.setContentType(S),C.body){const[T,P]=vp(m,tc(wp(c)));r=_p(C.body,Ip,T,P)}}de.isString(h)||(h=h?"include":"omit");const y="credentials"in Request.prototype;u=new Request(e,{...d,signal:p,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:r,duplex:"half",credentials:y?h:void 0});let w=await fetch(u);const b=Ml&&(l==="stream"||l==="response");if(Ml&&(s||b&&g)){const C={};["status","statusText","headers"].forEach(N=>{C[N]=w[N]});const S=de.toFiniteNumber(w.headers.get("content-length")),[T,P]=s&&vp(S,tc(wp(s),!0))||[];w=new Response(_p(w.body,Ip,T,()=>{P&&P(),g&&g()}),C)}l=l||"text";let E=await rc[de.findKey(rc,l)||"text"](w,t);return!b&&g&&g(),await new Promise((C,S)=>{yp(C,S,{data:E,headers:Qn.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:u})})}catch(y){throw g&&g(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new Je("Network Error",Je.ERR_NETWORK,t,u),{cause:y.cause||y}):Je.from(y,y&&y.code,t,u)}})};de.forEach(Ll,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Tp=t=>`- ${t}`,I4=t=>de.isFunction(t)||t===null||t===!1,xp={getAdapter:t=>{t=de.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!I4(n)&&(r=Ll[(a=String(n)).toLowerCase()],r===void 0))throw new Je(`Unknown adapter '${a}'`);if(r)break;o[a||"#"+i]=r}if(!r){const i=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
|
|
49
|
-
`+i.map(Tp).join(`
|
|
50
|
-
`):" "+Tp(i[0]):"as no adapter specified";throw new Je("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Ll};function Fl(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Bi(null,t)}function Op(t){return Fl(t),t.headers=Qn.from(t.headers),t.data=Dl.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),xp.getAdapter(t.adapter||Pa.adapter)(t).then(function(r){return Fl(t),r.data=Dl.call(t,t.transformResponse,r),r.headers=Qn.from(r.headers),r},function(r){return mp(r)||(Fl(t),r&&r.response&&(r.response.data=Dl.call(t,t.transformResponse,r.response),r.response.headers=Qn.from(r.response.headers))),Promise.reject(r)})}const Pp="1.8.2",oc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{oc[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const kp={};oc.transitional=function(e,n,r){function o(i,a){return"[Axios v"+Pp+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(e===!1)throw new Je(o(a," has been removed"+(n?" in "+n:"")),Je.ERR_DEPRECATED);return n&&!kp[a]&&(kp[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,s):!0}},oc.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function T4(t,e,n){if(typeof t!="object")throw new Je("options must be an object",Je.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],a=e[i];if(a){const s=t[i],c=s===void 0||a(s,i,t);if(c!==!0)throw new Je("option "+i+" must be "+c,Je.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Je("Unknown option "+i,Je.ERR_BAD_OPTION)}}const ic={assertOptions:T4,validators:oc},qr=ic.validators;class ti{constructor(e){this.defaults=e,this.interceptors={request:new fp,response:new fp}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
51
|
-
`+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ei(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&ic.assertOptions(r,{silentJSONParsing:qr.transitional(qr.boolean),forcedJSONParsing:qr.transitional(qr.boolean),clarifyTimeoutError:qr.transitional(qr.boolean)},!1),o!=null&&(de.isFunction(o)?n.paramsSerializer={serialize:o}:ic.assertOptions(o,{encode:qr.function,serialize:qr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ic.assertOptions(n,{baseUrl:qr.spelling("baseURL"),withXsrfToken:qr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&de.merge(i.common,i[n.method]);i&&de.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),n.headers=Qn.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let f,h=0,d;if(!c){const u=[Op.bind(this),void 0];for(u.unshift.apply(u,s),u.push.apply(u,l),d=u.length,f=Promise.resolve(n);h<d;)f=f.then(u[h++],u[h++]);return f}d=s.length;let p=n;for(h=0;h<d;){const u=s[h++],g=s[h++];try{p=u(p)}catch(m){g.call(this,m);break}}try{f=Op.call(this,p)}catch(u){return Promise.reject(u)}for(h=0,d=l.length;h<d;)f=f.then(l[h++],l[h++]);return f}getUri(e){e=ei(this.defaults,e);const n=bp(e.baseURL,e.url,e.allowAbsoluteUrls);return dp(n,e.params,e.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(e){ti.prototype[e]=function(n,r){return this.request(ei(r||{},{method:e,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,s){return this.request(ei(s||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ti.prototype[e]=n(),ti.prototype[e+"Form"]=n(!0)});class jl{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,s){r.reason||(r.reason=new Bi(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new jl(function(o){e=o}),cancel:e}}}function x4(t){return function(n){return t.apply(null,n)}}function O4(t){return de.isObject(t)&&t.isAxiosError===!0}const Vl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vl).forEach(([t,e])=>{Vl[e]=t});function Bp(t){const e=new ti(t),n=Qh(ti.prototype.request,e);return de.extend(n,ti.prototype,e,{allOwnKeys:!0}),de.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return Bp(ei(t,o))},n}const nn=Bp(Pa);nn.Axios=ti,nn.CanceledError=Bi,nn.CancelToken=jl,nn.isCancel=mp,nn.VERSION=Pp,nn.toFormData=Zs,nn.AxiosError=Je,nn.Cancel=nn.CanceledError,nn.all=function(e){return Promise.all(e)},nn.spread=x4,nn.isAxiosError=O4,nn.mergeConfig=ei,nn.AxiosHeaders=Qn,nn.formToJSON=t=>pp(de.isHTMLForm(t)?new FormData(t):t),nn.getAdapter=xp.getAdapter,nn.HttpStatusCode=Vl,nn.default=nn;const P4={UNAUTHORIZED:401,MAINTENANCE_MODE:503},k4=t=>{var n,r;const e=(n=t.response)==null?void 0:n.status;if(e&&e!==P4.UNAUTHORIZED){const o=(r=t.response)==null?void 0:r.data;console.table(o)}return Promise.reject(t)};function B4(){const t=x.useContext(fl);if(!t)throw new Error("Only use 'useApiContext' within a ApiContext Provider");return t}function Dt(){const{apiKey:t,host:e}=B4(),n=(s,c={},l={})=>a("GET",s,c,l),r=(s,c={},l={})=>a("POST",s,c,l),o=(s,c={},l={})=>a("PUT",s,c,l),i=(s,c={})=>a("DELETE",s,c),a=(s,c,l={},f={})=>{const h=nn.create({baseURL:`${e??"https://api.piggy.eu"}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${t}`},...f});return h.interceptors.response.use(void 0,k4),h.request({method:s,url:c,params:s=="GET"?l:{},data:l})};return{get:n,post:r,put:o,destroy:i}}function Np(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Np(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function So(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Np(t))&&(r&&(r+=" "),r+=e);return r}const Ba=t=>typeof t=="number"&&!isNaN(t),ni=t=>typeof t=="string",lr=t=>typeof t=="function",ac=t=>ni(t)||lr(t)?t:null,Ul=t=>x.isValidElement(t)||ni(t)||lr(t)||Ba(t);function N4(t,e,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=t;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(e,n)})})}function sc(t){let{enter:e,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=t;return function(a){let{children:s,position:c,preventExitTransition:l,done:f,nodeRef:h,isIn:d,playToast:p}=a;const u=r?`${e}--${c}`:e,g=r?`${n}--${c}`:n,m=x.useRef(0);return x.useLayoutEffect(()=>{const y=h.current,w=u.split(" "),b=E=>{E.target===h.current&&(p(),y.removeEventListener("animationend",b),y.removeEventListener("animationcancel",b),m.current===0&&E.type!=="animationcancel"&&y.classList.remove(...w))};y.classList.add(...w),y.addEventListener("animationend",b),y.addEventListener("animationcancel",b)},[]),x.useEffect(()=>{const y=h.current,w=()=>{y.removeEventListener("animationend",w),o?N4(y,f,i):f()};d||(l?w():(m.current=1,y.className+=` ${g}`,y.addEventListener("animationend",w)))},[d]),x.createElement(x.Fragment,null,s)}}function Rp(t,e){return t!=null?{content:t.content,containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,status:e}:{}}const Un=new Map;let Na=[];const Gl=new Set,R4=t=>Gl.forEach(e=>e(t)),Dp=()=>Un.size>0;function Mp(t,e){var n;if(e)return!((n=Un.get(e))==null||!n.isToastActive(t));let r=!1;return Un.forEach(o=>{o.isToastActive(t)&&(r=!0)}),r}function Lp(t,e){Ul(t)&&(Dp()||Na.push({content:t,options:e}),Un.forEach(n=>{n.buildToast(t,e)}))}function Fp(t,e){Un.forEach(n=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===n.id&&n.toggle(t,e==null?void 0:e.id):n.toggle(t,e==null?void 0:e.id)})}function D4(t){const{subscribe:e,getSnapshot:n,setProps:r}=x.useRef(function(i){const a=i.containerId||1;return{subscribe(s){const c=function(f,h,d){let p=1,u=0,g=[],m=[],y=[],w=h;const b=new Map,E=new Set,C=()=>{y=Array.from(b.values()),E.forEach(P=>P())},S=P=>{m=P==null?[]:m.filter(N=>N!==P),C()},T=P=>{const{toastId:N,onOpen:L,updateId:U,children:j}=P.props,K=U==null;P.staleId&&b.delete(P.staleId),b.set(N,P),m=[...m,P.props.toastId].filter(G=>G!==P.staleId),C(),d(Rp(P,K?"added":"updated")),K&&lr(L)&&L(x.isValidElement(j)&&j.props)};return{id:f,props:w,observe:P=>(E.add(P),()=>E.delete(P)),toggle:(P,N)=>{b.forEach(L=>{N!=null&&N!==L.props.toastId||lr(L.toggle)&&L.toggle(P)})},removeToast:S,toasts:b,clearQueue:()=>{u-=g.length,g=[]},buildToast:(P,N)=>{if((we=>{let{containerId:le,toastId:Ce,updateId:ye}=we;const H=le?le!==f:f!==1,W=b.has(Ce)&&ye==null;return H||W})(N))return;const{toastId:L,updateId:U,data:j,staleId:K,delay:G}=N,k=()=>{S(L)},V=U==null;V&&u++;const z={...w,style:w.toastStyle,key:p++,...Object.fromEntries(Object.entries(N).filter(we=>{let[le,Ce]=we;return Ce!=null})),toastId:L,updateId:U,data:j,closeToast:k,isIn:!1,className:ac(N.className||w.toastClassName),bodyClassName:ac(N.bodyClassName||w.bodyClassName),progressClassName:ac(N.progressClassName||w.progressClassName),autoClose:!N.isLoading&&(te=N.autoClose,re=w.autoClose,te===!1||Ba(te)&&te>0?te:re),deleteToast(){const we=b.get(L),{onClose:le,children:Ce}=we.props;lr(le)&&le(x.isValidElement(Ce)&&Ce.props),d(Rp(we,"removed")),b.delete(L),u--,u<0&&(u=0),g.length>0?T(g.shift()):C()}};var te,re;z.closeButton=w.closeButton,N.closeButton===!1||Ul(N.closeButton)?z.closeButton=N.closeButton:N.closeButton===!0&&(z.closeButton=!Ul(w.closeButton)||w.closeButton);let ne=P;x.isValidElement(P)&&!ni(P.type)?ne=x.cloneElement(P,{closeToast:k,toastProps:z,data:j}):lr(P)&&(ne=P({closeToast:k,toastProps:z,data:j}));const se={content:ne,props:z,staleId:K};w.limit&&w.limit>0&&u>w.limit&&V?g.push(se):Ba(G)?setTimeout(()=>{T(se)},G):T(se)},setProps(P){w=P},setToggle:(P,N)=>{b.get(P).toggle=N},isToastActive:P=>m.some(N=>N===P),getSnapshot:()=>w.newestOnTop?y.reverse():y}}(a,i,R4);Un.set(a,c);const l=c.observe(s);return Na.forEach(f=>Lp(f.content,f.options)),Na=[],()=>{l(),Un.delete(a)}},setProps(s){var c;(c=Un.get(a))==null||c.setProps(s)},getSnapshot(){var s;return(s=Un.get(a))==null?void 0:s.getSnapshot()}}}(t)).current;r(t);const o=x.useSyncExternalStore(e,n,n);return{getToastToRender:function(i){if(!o)return[];const a=new Map;return o.forEach(s=>{const{position:c}=s.props;a.has(c)||a.set(c,[]),a.get(c).push(s)}),Array.from(a,s=>i(s[0],s[1]))},isToastActive:Mp,count:o==null?void 0:o.length}}function M4(t){const[e,n]=x.useState(!1),[r,o]=x.useState(!1),i=x.useRef(null),a=x.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:c,closeToast:l,onClick:f,closeOnClick:h}=t;var d,p;function u(){n(!0)}function g(){n(!1)}function m(b){const E=i.current;a.canDrag&&E&&(a.didMove=!0,e&&g(),a.delta=t.draggableDirection==="x"?b.clientX-a.start:b.clientY-a.start,a.start!==b.clientX&&(a.canCloseOnClick=!1),E.style.transform=`translate3d(${t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,E.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",y);const b=i.current;if(a.canDrag&&a.didMove&&b){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),t.closeToast(),void t.collapseAll();b.style.transition="transform 0.2s, opacity 0.2s",b.style.removeProperty("transform"),b.style.removeProperty("opacity")}}(p=Un.get((d={id:t.toastId,containerId:t.containerId,fn:n}).containerId||1))==null||p.setToggle(d.id,d.fn),x.useEffect(()=>{if(t.pauseOnFocusLoss)return document.hasFocus()||g(),window.addEventListener("focus",u),window.addEventListener("blur",g),()=>{window.removeEventListener("focus",u),window.removeEventListener("blur",g)}},[t.pauseOnFocusLoss]);const w={onPointerDown:function(b){if(t.draggable===!0||t.draggable===b.pointerType){a.didMove=!1,document.addEventListener("pointermove",m),document.addEventListener("pointerup",y);const E=i.current;a.canCloseOnClick=!0,a.canDrag=!0,E.style.transition="none",t.draggableDirection==="x"?(a.start=b.clientX,a.removalDistance=E.offsetWidth*(t.draggablePercent/100)):(a.start=b.clientY,a.removalDistance=E.offsetHeight*(t.draggablePercent===80?1.5*t.draggablePercent:t.draggablePercent)/100)}},onPointerUp:function(b){const{top:E,bottom:C,left:S,right:T}=i.current.getBoundingClientRect();b.nativeEvent.type!=="touchend"&&t.pauseOnHover&&b.clientX>=S&&b.clientX<=T&&b.clientY>=E&&b.clientY<=C?g():u()}};return s&&c&&(w.onMouseEnter=g,t.stacked||(w.onMouseLeave=u)),h&&(w.onClick=b=>{f&&f(b),a.canCloseOnClick&&l()}),{playToast:u,pauseToast:g,isRunning:e,preventExitTransition:r,toastRef:i,eventHandlers:w}}function L4(t){let{delay:e,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:c,progress:l,rtl:f,isIn:h,theme:d}=t;const p=i||c&&l===0,u={...s,animationDuration:`${e}ms`,animationPlayState:n?"running":"paused"};c&&(u.transform=`scaleX(${l})`);const g=So("Toastify__progress-bar",c?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":f}),m=lr(a)?a({rtl:f,type:o,defaultClassName:g}):So(g,a),y={[c&&l>=1?"onTransitionEnd":"onAnimationEnd"]:c&&l<1?null:()=>{h&&r()}};return x.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":p},x.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${d} Toastify__progress-bar--${o}`}),x.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:m,style:u,...y}))}let F4=1;const jp=()=>""+F4++;function j4(t){return t&&(ni(t.toastId)||Ba(t.toastId))?t.toastId:jp()}function Ra(t,e){return Lp(t,e),e.toastId}function cc(t,e){return{...e,type:e&&e.type||t,toastId:j4(e)}}function uc(t){return(e,n)=>Ra(e,cc(t,n))}function Tt(t,e){return Ra(t,cc("default",e))}Tt.loading=(t,e)=>Ra(t,cc("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),Tt.promise=function(t,e,n){let r,{pending:o,error:i,success:a}=e;o&&(r=ni(o)?Tt.loading(o,n):Tt.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,h,d)=>{if(h==null)return void Tt.dismiss(r);const p={type:f,...s,...n,data:d},u=ni(h)?{render:h}:h;return r?Tt.update(r,{...p,...u}):Tt(u.render,{...p,...u}),d},l=lr(t)?t():t;return l.then(f=>c("success",a,f)).catch(f=>c("error",i,f)),l},Tt.success=uc("success"),Tt.info=uc("info"),Tt.error=uc("error"),Tt.warning=uc("warning"),Tt.warn=Tt.warning,Tt.dark=(t,e)=>Ra(t,cc("default",{theme:"dark",...e})),Tt.dismiss=function(t){(function(e){var n;if(Dp()){if(e==null||ni(n=e)||Ba(n))Un.forEach(r=>{r.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){const r=Un.get(e.containerId);r?r.removeToast(e.id):Un.forEach(o=>{o.removeToast(e.id)})}}else Na=Na.filter(r=>e!=null&&r.options.toastId!==e)})(t)},Tt.clearWaitingQueue=function(t){t===void 0&&(t={}),Un.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},Tt.isActive=Mp,Tt.update=function(t,e){e===void 0&&(e={});const n=((r,o)=>{var i;let{containerId:a}=o;return(i=Un.get(a||1))==null?void 0:i.toasts.get(r)})(t,e);if(n){const{props:r,content:o}=n,i={delay:100,...r,...e,toastId:e.toastId||t,updateId:jp()};i.toastId!==t&&(i.staleId=t);const a=i.render||o;delete i.render,Ra(a,i)}},Tt.done=t=>{Tt.update(t,{progress:1})},Tt.onChange=function(t){return Gl.add(t),()=>{Gl.delete(t)}},Tt.play=t=>Fp(!0,t),Tt.pause=t=>Fp(!1,t);const V4=typeof window<"u"?x.useLayoutEffect:x.useEffect,lc=t=>{let{theme:e,type:n,isLoading:r,...o}=t;return x.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ql={info:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"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"}))},warning:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"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"}))},success:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"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"}))},error:function(t){return x.createElement(lc,{...t},x.createElement("path",{d:"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"}))},spinner:function(){return x.createElement("div",{className:"Toastify__spinner"})}},U4=t=>{const{isRunning:e,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=M4(t),{closeButton:a,children:s,autoClose:c,onClick:l,type:f,hideProgressBar:h,closeToast:d,transition:p,position:u,className:g,style:m,bodyClassName:y,bodyStyle:w,progressClassName:b,progressStyle:E,updateId:C,role:S,progress:T,rtl:P,toastId:N,deleteToast:L,isIn:U,isLoading:j,closeOnClick:K,theme:G}=t,k=So("Toastify__toast",`Toastify__toast-theme--${G}`,`Toastify__toast--${f}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":K}),V=lr(g)?g({rtl:P,position:u,type:f,defaultClassName:k}):So(k,g),z=function(se){let{theme:we,type:le,isLoading:Ce,icon:ye}=se,H=null;const W={theme:we,type:le};return ye===!1||(lr(ye)?H=ye({...W,isLoading:Ce}):x.isValidElement(ye)?H=x.cloneElement(ye,W):Ce?H=ql.spinner():(J=>J in ql)(le)&&(H=ql[le](W))),H}(t),te=!!T||!c,re={closeToast:d,type:f,theme:G};let ne=null;return a===!1||(ne=lr(a)?a(re):x.isValidElement(a)?x.cloneElement(a,re):function(se){let{closeToast:we,theme:le,ariaLabel:Ce="close"}=se;return x.createElement("button",{className:`Toastify__close-button Toastify__close-button--${le}`,type:"button",onClick:ye=>{ye.stopPropagation(),we(ye)},"aria-label":Ce},x.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},x.createElement("path",{fillRule:"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"})))}(re)),x.createElement(p,{isIn:U,done:L,position:u,preventExitTransition:n,nodeRef:r,playToast:i},x.createElement("div",{id:N,onClick:l,"data-in":U,className:V,...o,style:m,ref:r},x.createElement("div",{...U&&{role:S},className:lr(y)?y({type:f}):So("Toastify__toast-body",y),style:w},z!=null&&x.createElement("div",{className:So("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},z),x.createElement("div",null,s)),ne,x.createElement(L4,{...C&&!te?{key:`pb-${C}`}:{},rtl:P,theme:G,delay:c,isRunning:e,isIn:U,closeToast:d,hide:h,type:f,style:E,className:b,controlledProgress:te,progress:T||0})))},dc=function(t,e){return e===void 0&&(e=!1),{enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}},G4=sc(dc("bounce",!0));sc(dc("slide",!0)),sc(dc("zoom")),sc(dc("flip"));const q4={position:"top-right",transition:G4,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function H4(t){let e={...q4,...t};const n=t.stacked,[r,o]=x.useState(!0),i=x.useRef(null),{getToastToRender:a,isToastActive:s,count:c}=D4(e),{className:l,style:f,rtl:h,containerId:d}=e;function p(g){const m=So("Toastify__toast-container",`Toastify__toast-container--${g}`,{"Toastify__toast-container--rtl":h});return lr(l)?l({position:g,rtl:h,defaultClassName:m}):So(m,ac(l))}function u(){n&&(o(!0),Tt.play())}return V4(()=>{if(n){var g;const m=i.current.querySelectorAll('[data-in="true"]'),y=12,w=(g=e.position)==null?void 0:g.includes("top");let b=0,E=0;Array.from(m).reverse().forEach((C,S)=>{const T=C;T.classList.add("Toastify__toast--stacked"),S>0&&(T.dataset.collapsed=`${r}`),T.dataset.pos||(T.dataset.pos=w?"top":"bot");const P=b*(r?.2:1)+(r?0:y*S);T.style.setProperty("--y",`${w?P:-1*P}px`),T.style.setProperty("--g",`${y}`),T.style.setProperty("--s",""+(1-(r?E:0))),b+=T.offsetHeight,E+=.025})}},[r,c,n]),x.createElement("div",{ref:i,className:"Toastify",id:d,onMouseEnter:()=>{n&&(o(!1),Tt.pause())},onMouseLeave:u},a((g,m)=>{const y=m.length?{...f}:{...f,pointerEvents:"none"};return x.createElement("div",{className:p(g),style:y,key:`container-${g}`},m.map(w=>{let{content:b,props:E}=w;return x.createElement(U4,{...E,stacked:n,collapseAll:u,isIn:s(E.toastId,E.containerId),style:E.style,key:`toast-${E.key}`},b)}))}))}const W4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_15_20)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23E7FBF4'/%3e%3cpath%20d='M10.6668%2017.3333L14.6668%2020L21.3335%2012'%20stroke='%23039855'%20stroke-width='1.6875'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_15_20'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Y4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_95)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FEF3F2'/%3e%3cpath%20d='M12.0003%2012L20.0003%2020M12.0003%2020L20.0003%2012'%20stroke='%23E02731'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_95'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200V0C24.8366%200%2032%207.16344%2032%2016V16C32%2024.8366%2024.8366%2032%2016%2032V32C7.16344%2032%200%2024.8366%200%2016V16Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",K4="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_17_99)'%3e%3crect%20width='32'%20height='32'%20rx='4'%20fill='%23FFFAEB'/%3e%3cpath%20d='M16.0002%2017.3333V13.3333M16.0002%2020V20.0067M23.0353%2019.3333L17.942%2010.456C17.0833%208.95867%2014.9167%208.95867%2014.058%2010.456L8.96533%2019.3333C8.11266%2020.8187%209.18933%2022.6667%2010.9073%2022.6667H21.0933C22.8107%2022.6667%2023.8873%2020.8187%2023.0353%2019.3333Z'%20stroke='%23CFAA25'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_17_99'%3e%3cpath%20d='M0%2016C0%207.16344%207.16344%200%2016%200C24.8366%200%2032%207.16344%2032%2016C32%2024.8366%2024.8366%2032%2016%2032C7.16344%2032%200%2024.8366%200%2016Z'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function z4(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const Vp={};function Hl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];typeof e[0]=="string"&&Vp[e[0]]||(typeof e[0]=="string"&&(Vp[e[0]]=new Date),z4(...e))}const Up=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}};function Gp(t,e,n){t.loadNamespaces(e,Up(t,n))}function qp(t,e,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{t.options.ns.indexOf(o)<0&&t.options.ns.push(o)}),t.loadLanguages(e,Up(t,r))}function $4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=e.languages[0],o=e.options?e.options.fallbackLng:!1,i=e.languages[e.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=e.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(r,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}function X4(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(Hl("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:n.lng,precheck:(o,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!i(o.isLanguageChangingTo,t))return!1}}):$4(t,e,n)}const Q4=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,J4={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Z4=t=>J4[t];let Wl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(Q4,Z4)};function e3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wl={...Wl,...t}}function t3(){return Wl}let Hp;function n3(t){Hp=t}function r3(){return Hp}const o3={type:"3rdParty",init(t){e3(t.options.react),n3(t)}},i3=x.createContext();class a3{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const s3=(t,e)=>{const n=x.useRef();return x.useEffect(()=>{n.current=t},[t,e]),n.current};function Wp(t,e,n,r){return t.getFixedT(e,n,r)}function c3(t,e,n,r){return x.useCallback(Wp(t,e,n,r),[t,e,n,r])}function Ve(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=e,{i18n:r,defaultNS:o}=x.useContext(i3)||{},i=n||r||r3();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new a3),!i){Hl("You will need to pass in an i18next instance by using initReactI18next");const E=(S,T)=>typeof T=="string"?T:T&&typeof T=="object"&&typeof T.defaultValue=="string"?T.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[E,{},!1];return C.t=E,C.i18n={},C.ready=!1,C}i.options.react&&i.options.react.wait!==void 0&&Hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...t3(),...i.options.react,...e},{useSuspense:s,keyPrefix:c}=a;let l=o||i.options&&i.options.defaultNS;l=typeof l=="string"?[l]:l||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(l);const f=(i.isInitialized||i.initializedStoreOnce)&&l.every(E=>X4(E,i,a)),h=c3(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),d=()=>h,p=()=>Wp(i,e.lng||null,a.nsMode==="fallback"?l:l[0],c),[u,g]=x.useState(d);let m=l.join();e.lng&&(m=`${e.lng}${m}`);const y=s3(m),w=x.useRef(!0);x.useEffect(()=>{const{bindI18n:E,bindI18nStore:C}=a;w.current=!0,!f&&!s&&(e.lng?qp(i,e.lng,l,()=>{w.current&&g(p)}):Gp(i,l,()=>{w.current&&g(p)})),f&&y&&y!==m&&w.current&&g(p);function S(){w.current&&g(p)}return E&&i&&i.on(E,S),C&&i&&i.store.on(C,S),()=>{w.current=!1,E&&i&&E.split(" ").forEach(T=>i.off(T,S)),C&&i&&C.split(" ").forEach(T=>i.store.off(T,S))}},[i,m]),x.useEffect(()=>{w.current&&f&&g(d)},[i,c,f]);const b=[u,i,f];if(b.t=u,b.i18n=i,b.ready=f,f||!f&&!s)return b;throw new Promise(E=>{e.lng?qp(i,e.lng,l,()=>E()):Gp(i,l,()=>E())})}function jt(){const{t}=Ve(),n={closeButton:!1,icon:s=>s.type==="success"?v.jsx("img",{src:W4,alt:"success"}):s.type==="error"?v.jsx("img",{src:Y4,alt:"error"}):v.jsx("img",{src:K4,alt:"warning"})},r=(s,c)=>{if(s==="success")return o(c);a(c)},o=(s=t("success"),c={})=>{Tt.success(s,{...n,...c})},i=(s=t("warning"))=>{Tt.warning(s,n)},a=(s=t("somethingWentWrong"))=>{var f,h;const c=(f=s.response)==null?void 0:f.data.errors,l=v.jsxs("div",{children:[v.jsx("p",{children:(h=s.response)==null?void 0:h.data.message}),c&&Object.keys(c).map(d=>c[d].map(p=>v.jsx("li",{children:p},p)))]});Tt.error(l,n)};return{toast:r,successToast:o,warningToast:i,errorToast:a}}const dr=t=>{const e=Dt(),{errorToast:n}=jt(),r=l=>e.get(l,t.params),{data:o,error:i,isLoading:a,isValidating:s,mutate:c}=sb(t.url,r,{shouldRetryOnError:!1,revalidateIfStale:!1});return x.useEffect(()=>{o&&t.onData&&t.onData(o==null?void 0:o.data.data,o==null?void 0:o.data.meta)},[o]),x.useEffect(()=>{i&&n(i)},[i]),{data:o,pending:s,error:i,isLoading:a,isValidating:s,mutate:c}};var Yp=(t=>(t[t.CREDIT_RECEPTION=1]="CREDIT_RECEPTION",t[t.PHYSICAL_REWARD_RECEPTION=2]="PHYSICAL_REWARD_RECEPTION",t[t.DIGITAL_REWARD_RECEPTION=3]="DIGITAL_REWARD_RECEPTION",t))(Yp||{}),Ni=(t=>(t.IDENTIFIER="identifier",t.EMAIL="email",t))(Ni||{}),fc=(t=>(t.OPT_OUT="OPT_OUT",t.OPT_IN="OPT_IN",t.DOUBLE_OPT_IN="DOUBLE_OPT_IN",t.FUNCTIONAL="FUNCTIONAL",t))(fc||{}),Da=(t=>(t.INACTIVE="INACTIVE",t.ACTIVE="ACTIVE",t.EXPIRED="EXPIRED",t.LOCKED="LOCKED",t.REDEEMED="REDEEMED",t.DEACTIVATED="DEACTIVATED",t))(Da||{});function Kp({uuid:t,children:e}){const[n,r]=x.useState(new Ws),{mutate:o,error:i}=dr({url:t,onData:s=>{const c=new Ws;c.type=s.type,c.uuid=s.uuid,c.contact=s.contact,c.currency=s.currency,c.events=s.events,c.inputData=s.input_data,c.loyaltyProgram=s.loyalty_program,c.results=s.results,r(c)}}),a=x.useMemo(()=>({uuid:t,portalSession:n,mutate:o,error:i}),[n,o,i]);return v.jsx(Lh.Provider,{value:a,children:e})}var rn=(t=>(t.GENERIC="GENERIC",t.GIFTCARD="GIFTCARD",t.REDEEM_GIFTCARD="REDEEM_GIFTCARD",t.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",t.PORTAL="PORTAL",t.PREPAID="PREPAID",t.PAY_PREPAID="PAY_PREPAID",t.TOP_UP_PREPAID="TOP_UP_PREPAID",t.POINTS_TRANSACTION="POINTS_TRANSACTION",t.VOUCHER="VOUCHER",t))(rn||{}),Ge=(t=>(t.GENERIC="/generic",t.GIFTCARD="/giftcard",t.PORTAL="/portal",t.PREPAID="/prepaid",t.PAY_PREPAID="/pay-prepaid",t.TOP_UP_PREPAID="/top-up-prepaid",t.POINTS_TRANSACTION="/points-transaction",t.VOUCHER="/voucher",t))(Ge||{}),Io=(t=>(t.CREDIT_RECEPTION="credit_reception",t.GIFTCARD_TRANSACTION="giftcard_transaction",t.VOUCHER_REDEEMED="voucher_redeemed",t.REWARD_RECEPTION="reward_reception",t.PREPAID_TRANSACTION="prepaid_transaction",t))(Io||{}),hc=(t=>(t[t.INPUT_INVALID=1003]="INPUT_INVALID",t[t.CONTACT_NOT_FOUND=55031]="CONTACT_NOT_FOUND",t))(hc||{}),An=(t=>(t.USER="user",t.ENVIRONMENT="environment",t))(An||{});const u3={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class pc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||u3,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,o){return o&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new pc(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new pc(this.logger,e)}}var Hr=new pc;class gc{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[s,c]=a;for(let l=0;l<c;l++)s.apply(s,[e,...r])})}}function Ma(){let t,e;const n=new Promise((r,o)=>{t=r,e=o});return n.resolve=t,n.reject=e,n}function zp(t){return t==null?"":""+t}function l3(t,e,n){t.forEach(r=>{e[r]&&(n[r]=e[r])})}const d3=/###/g;function La(t,e,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(d3,"."):s}function o(){return!t||typeof t=="string"}const i=typeof e!="string"?e:e.split(".");let a=0;for(;a<i.length-1;){if(o())return{};const s=r(i[a]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++a}return o()?{}:{obj:t,k:r(i[a])}}function $p(t,e,n){const{obj:r,k:o}=La(t,e,Object);if(r!==void 0||e.length===1){r[o]=n;return}let i=e[e.length-1],a=e.slice(0,e.length-1),s=La(t,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=La(t,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n}function f3(t,e,n,r){const{obj:o,k:i}=La(t,e,Object);o[i]=o[i]||[],o[i].push(n)}function mc(t,e){const{obj:n,k:r}=La(t,e);if(n)return n[r]}function h3(t,e,n){const r=mc(t,n);return r!==void 0?r:mc(e,n)}function Xp(t,e,n){for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?typeof t[r]=="string"||t[r]instanceof String||typeof e[r]=="string"||e[r]instanceof String?n&&(t[r]=e[r]):Xp(t[r],e[r],n):t[r]=e[r]);return t}function Ri(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var p3={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function g3(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>p3[e]):t}class m3{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const y3=[" ",",","?","!",";"],v3=new m3(20);function w3(t,e,n){e=e||"",n=n||"";const r=y3.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=v3.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(t);if(!i){const a=t.indexOf(n);a>0&&!o.test(t.substring(0,a))&&(i=!0)}return i}function Yl(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let i=0;i<r.length;){if(!o||typeof o!="object")return;let a,s="";for(let c=i;c<r.length;++c)if(c!==i&&(s+=n),s+=r[c],a=o[s],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&c<r.length-1)continue;i+=c-i+1;break}o=a}return o}function yc(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Qp extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.indexOf(".")>-1?s=e.split("."):(s=[e,n],r&&(Array.isArray(r)?s.push(...r):typeof r=="string"&&i?s.push(...r.split(i)):s.push(r)));const c=mc(this.data,s);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=s[0],n=s[1],r=s.slice(2).join(".")),c||!a||typeof r!="string"?c:Yl(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[e,n];r&&(s=s.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(s=e.split("."),o=n,n=s[1]),this.addNamespaces(n),$p(this.data,s,o),i.silent||this.emit("added",e,n,r,o)}addResources(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(typeof r[i]=="string"||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});o.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[e,n];e.indexOf(".")>-1&&(s=e.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let c=mc(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Xp(c,r,i):c={...c,...r},$p(this.data,s,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Jp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,o))}),e}};const Zp={};class vc extends gc{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),l3(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Hr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!w3(e,r,o);if(a&&!s){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:i};const l=e.split(r);(r!==o||r===o&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(o)}return typeof i=="string"&&(i=[i]),{key:e,namespaces:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],n),c=s[s.length-1],l=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l&&l.toLowerCase()==="cimode"){if(f){const E=n.nsSeparator||this.options.nsSeparator;return o?{res:`${c}${E}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${E}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const h=this.resolve(e,n);let d=h&&h.res;const p=h&&h.usedKey||a,u=h&&h.exactUsedKey||a,g=Object.prototype.toString.apply(d),m=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject;if(w&&d&&(typeof d!="string"&&typeof d!="boolean"&&typeof d!="number")&&m.indexOf(g)<0&&!(typeof y=="string"&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,d,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=E,h.usedParams=this.getUsedParamsDetails(n),h):E}if(i){const E=Array.isArray(d),C=E?[]:{},S=E?u:p;for(const T in d)if(Object.prototype.hasOwnProperty.call(d,T)){const P=`${S}${i}${T}`;C[T]=this.translate(P,{...n,joinArrays:!1,ns:s}),C[T]===P&&(C[T]=d[T])}d=C}}else if(w&&typeof y=="string"&&Array.isArray(d))d=d.join(y),d&&(d=this.extendTranslation(d,e,n,r));else{let E=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",T=vc.hasDefaultValue(n),P=S?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&S?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",L=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),U=L&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${P}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(d)&&T&&(E=!0,d=U),this.isValidLookup(d)||(C=!0,d=a);const K=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:d,G=T&&U!==d&&this.options.updateMissing;if(C||E||G){if(this.logger.log(G?"updateKey":"missingKey",l,c,a,G?U:d),i){const te=this.resolve(a,{...n,keySeparator:!1});te&&te.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let k=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let te=0;te<V.length;te++)k.push(V[te]);else this.options.saveMissingTo==="all"?k=this.languageUtils.toResolveHierarchy(n.lng||this.language):k.push(n.lng||this.language);const z=(te,re,ne)=>{const se=T&&ne!==d?ne:K;this.options.missingKeyHandler?this.options.missingKeyHandler(te,c,re,se,G,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(te,c,re,se,G,n),this.emit("missingKey",te,c,re,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?k.forEach(te=>{const re=this.pluralResolver.getSuffixes(te,n);L&&n[`defaultValue${this.options.pluralSeparator}zero`]&&re.indexOf(`${this.options.pluralSeparator}zero`)<0&&re.push(`${this.options.pluralSeparator}zero`),re.forEach(ne=>{z([te],a+ne,n[`defaultValue${ne}`]||U)})}):z(k,a,U))}d=this.extendTranslation(d,e,n,h,r),C&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${a}`),(C||E)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,E?d:void 0):d=this.options.parseMissingKeyHandler(d))}return o?(h.res=d,h.usedParams=this.getUsedParamsDetails(n),h):d}extendTranslation(e,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=typeof e=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(l){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let h=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,r.lng||this.language,r),l){const d=e.match(this.interpolator.nestingRegexp),p=d&&d.length;f<p&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,p=new Array(d),u=0;u<d;u++)p[u]=arguments[u];return i&&i[0]===p[0]&&!r.context?(a.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):a.translate(...p,n)},r)),r.interpolation&&this.interpolator.reset()}const s=r.postProcess||this.options.postProcess,c=typeof s=="string"?[s]:s;return e!=null&&c&&c.length&&r.applyPostProcessor!==!1&&(e=Jp.handle(c,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return typeof e=="string"&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(c,n),f=l.key;o=f;let h=l.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=n.count!==void 0&&typeof n.count!="string",p=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),u=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);h.forEach(m=>{this.isValidLookup(r)||(s=m,!Zp[`${g[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(Zp[`${g[0]}-${m}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(y=>{if(this.isValidLookup(r))return;a=y;const w=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(w,f,y,m,n);else{let E;d&&(E=this.pluralResolver.getSuffix(y,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(w.push(f+E),n.ordinal&&E.indexOf(S)===0&&w.push(f+E.replace(S,this.options.pluralSeparator)),p&&w.push(f+C)),u){const T=`${f}${this.options.contextSeparator}${n.context}`;w.push(T),d&&(w.push(T+E),n.ordinal&&E.indexOf(S)===0&&w.push(T+E.replace(S,this.options.pluralSeparator)),p&&w.push(T+C))}}let b;for(;b=w.pop();)this.isValidLookup(r)||(i=b,r=this.getResource(y,m,b,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,o):this.resourceStore.getResource(e,n,r,o)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&typeof e.replace!="string";let o=r?e.replace:e;if(r&&typeof e.count<"u"&&(o.count=e.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}function Kl(t){return t.charAt(0).toUpperCase()+t.slice(1)}class e1{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Hr.create("languageUtils")}getScriptPartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=yc(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Kl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Kl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):typeof e=="string"&&i(this.formatLanguageCode(e)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let b3=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],E3={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const C3=["v1","v2","v3"],_3=["v4"],t1={zero:0,one:1,two:2,few:3,many:4,other:5};function A3(){const t={};return b3.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:E3[e.fc]}})}),t}class S3{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Hr.create("pluralResolver"),(!this.options.compatibilityJSON||_3.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=A3()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(yc(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(o=>`${n}${o}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>t1[o]-t1[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(e,o,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(e,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let o=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!C3.includes(this.options.compatibilityJSON)}}function n1(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=h3(t,e,n);return!i&&o&&typeof n=="string"&&(i=Yl(t,n,r),i===void 0&&(i=Yl(e,n,r))),i}class I3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:c,formatSeparator:l,unescapeSuffix:f,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:p,nestingSuffix:u,nestingSuffixEscaped:g,nestingOptionsSeparator:m,maxReplaces:y,alwaysFormat:w}=e.interpolation;this.escape=n!==void 0?n:g3,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?Ri(i):a||"{{",this.suffix=s?Ri(s):c||"}}",this.formatSeparator=l||",",this.unescapePrefix=f?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Ri(d):p||Ri("$t("),this.nestingSuffix=u?Ri(u):g||Ri(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=y||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,o){let i,a,s;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(u){return u.replace(/\$/g,"$$$$")}const f=u=>{if(u.indexOf(this.formatSeparator)<0){const w=n1(n,c,u,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:u}):w}const g=u.split(this.formatSeparator),m=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(n1(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:m})};this.resetRegExp();const h=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:u=>l(u)},{regex:this.regexp,safeValue:u=>this.escapeValue?l(this.escape(u)):l(u)}].forEach(u=>{for(s=0;i=u.regex.exec(e);){const g=i[1].trim();if(a=f(g),a===void 0)if(typeof h=="function"){const y=h(e,i,o);a=typeof y=="string"?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,g))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=zp(a));const m=u.safeValue(a);if(e=e.replace(i[0],m),d?(u.regex.lastIndex+=a.length,u.regex.lastIndex-=i[0].length):u.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;function s(c,l){const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const h=c.split(new RegExp(`${f}[ ]*{`));let d=`{${h[1]}`;c=h[0],d=this.interpolate(d,a);const p=d.match(/'/g),u=d.match(/"/g);(p&&p.length%2===0&&!u||u.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),l&&(a={...l,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,g),`${c}${f}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c}for(;o=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const f=o[1].split(this.formatSeparator).map(h=>h.trim());o[1]=f.shift(),c=f,l=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===e&&typeof i!="string")return i;typeof i!="string"&&(i=zp(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${e}`),i=""),l&&(i=c.reduce((f,h)=>this.format(f,h,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),e=e.replace(o[0],i),this.regexp.lastIndex=0}return e}}function T3(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);e==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):e==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...c]=a.split(":"),l=c.join(":").trim().replace(/^'+|'+$/g,""),f=s.trim();n[f]||(n[f]=l),l==="false"&&(n[f]=!1),l==="true"&&(n[f]=!0),isNaN(l)||(n[f]=parseInt(l,10))}})}return{formatName:e,formatOptions:n}}function Di(t){const e={};return function(r,o,i){const a=o+JSON.stringify(i);let s=e[a];return s||(s=t(yc(o),i),e[a]=s),s(r)}}class x3{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Hr.create("formatter"),this.options=e,this.formats={number:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:Di((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:Di((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:Di((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:Di((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(e)}init(e){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Di(n)}format(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((s,c)=>{const{formatName:l,formatOptions:f}=T3(c);if(this.formats[l]){let h=s;try{const d=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=d.locale||d.lng||o.locale||o.lng||r;h=this.formats[l](s,p,{...f,...o,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${l}`);return s},e)}}function O3(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class P3 extends gc{constructor(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Hr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(e,n,r,o){const i={},a={},s={},c={};return e.forEach(l=>{let f=!0;n.forEach(h=>{const d=`${l}|${h}`;!r.reload&&this.store.hasResourceBundle(l,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,f=!1,a[d]===void 0&&(a[d]=!0),i[d]===void 0&&(i[d]=!0),c[h]===void 0&&(c[h]=!0)))}),f||(s[l]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const o=e.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const s={};this.queue.forEach(c=>{f3(c.loaded,[i],a),O3(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(l=>{s[l]||(s[l]={});const f=c.loaded[l];f.length&&f.forEach(h=>{s[l][h]===void 0&&(s[l][h]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(l,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(l&&f&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,r,o+1,i*2,a)},i);return}a(l,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const l=c(e,n);l&&typeof l.then=="function"?l.then(f=>s(null,f)).catch(s):s(null,l)}catch(l){s(l)}return}return c(e,n,s)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const i=this.queueLoad(e,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(e,a,s)})}saveMissing(e,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:i},l=this.backend.create.bind(this.backend);if(l.length<6)try{let f;l.length===5?f=l(e,n,r,o,c):f=l(e,n,r,o),f&&typeof f.then=="function"?f.then(h=>s(null,h)).catch(s):s(null,f)}catch(f){s(f)}else l(e,n,r,o,s,c)}!e||!e[0]||this.store.addResource(e[0],n,r,o)}}}function r1(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const r=e[3]||e[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function o1(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function wc(){}function k3(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class Fa extends gc{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=o1(e),this.services={},this.logger=Hr,this.modules={external:[]},k3(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=r1();this.options={...o,...this.options,...o1(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function i(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Hr.init(i(this.modules.logger),this.options):Hr.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=x3);const h=new e1(this.options);this.store=new Qp(this.options.resources,this.options);const d=this.services;d.logger=Hr,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new S3(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new I3(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new P3(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new vc(this.services,this.options),this.translator.on("*",function(p){for(var u=arguments.length,g=new Array(u>1?u-1:0),m=1;m<u;m++)g[m-1]=arguments[m];e.emit(p,...g)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=wc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=Ma(),l=()=>{const f=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(d),r(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const o=typeof e=="string"?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&i.indexOf(l)<0&&i.push(l)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(e,n,r){const o=Ma();return e||(e=this.languages),n||(n=this.options.ns),r||(r=wc),this.services.backendConnector.reload(e,n,i=>{o.resolve(),r(i)}),o}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Jp.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const o=Ma();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,l)=>{l?(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},s=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const l=typeof c=="string"?c:this.services.languageUtils.getBestMatchFromCodes(c);l&&(this.language||i(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(l)),this.loadResources(l,f=>{a(f,l)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),o}getFixedT(e,n,r){var o=this;const i=function(a,s){let c;if(typeof s!="object"){for(var l=arguments.length,f=new Array(l>2?l-2:0),h=2;h<l;h++)f[h-2]=arguments[h];c=o.options.overloadTranslationOptionHandler([a,s].concat(f))}else c={...s};c.lng=c.lng||i.lng,c.lngs=c.lngs||i.lngs,c.ns=c.ns||i.ns,c.keyPrefix=c.keyPrefix||r||i.keyPrefix;const d=o.options.keySeparator||".";let p;return c.keyPrefix&&Array.isArray(a)?p=a.map(u=>`${c.keyPrefix}${d}${u}`):p=c.keyPrefix?`${c.keyPrefix}${d}${a}`:a,o.t(p,c)};return typeof e=="string"?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,c)=>{const l=this.services.backendConnector.state[`${s}|${c}`];return l===-1||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!o||a(i,e)))}loadNamespaces(e,n){const r=Ma();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Ma();typeof e=="string"&&(e=[e]);const o=this.options.preload||[],i=e.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new e1(r1());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Fa(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wc;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const o={...this.options,...e,isClone:!0},i=new Fa(o);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new Qp(this.store.data,o),i.services.resourceStore=i.store),i.translator=new vc(i.services,o),i.translator.on("*",function(s){for(var c=arguments.length,l=new Array(c>1?c-1:0),f=1;f<c;f++)l[f-1]=arguments[f];i.emit(s,...l)}),i.init(o,n),i.translator.options=o,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const dn=Fa.createInstance();dn.createInstance=Fa.createInstance,dn.createInstance,dn.dir,dn.init,dn.loadResources,dn.reloadResources,dn.use,dn.changeLanguage,dn.getFixedT,dn.t,dn.exists,dn.setDefaultNamespace,dn.hasLoadedNamespace,dn.loadNamespaces,dn.loadLanguages;const Mi=(t,e="EUR")=>new Intl.NumberFormat(dn.language,{style:"currency",currency:e??"EUR"}).format(t/100),B3=t=>0 .toLocaleString(dn.language,{style:"currency",currency:t??"EUR",minimumFractionDigits:0,maximumFractionDigits:0}).replace(/\d/g,"").trim(),N3=t=>{window.parent.postMessage(t,"*")},i1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24))),a1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*7))),s1=(t,e)=>Math.abs(Math.round((e.getTime()-t.getTime())/(1e3*3600*24*365.25)));function R3(t){const{errorToast:e}=jt(),[n,r]=x.useState(),o=Dt(),i=()=>{const s={type:t.type??rn.PORTAL,api_key:t.apiKey,shop_uuid:t.shopUuid,contact_uuid:t.contactUuid};return t.cameraService&&(s.camera_service=t.cameraService),t.cameraFacingMode&&(s.facing_mode=t.cameraFacingMode),t.amountInCents&&(s.amount_in_cents=t.amountInCents),t.allowMultipleGiftcards&&(s.allow_multiple_giftcards=t.allowMultipleGiftcards),t.enableRegistration&&(s.enable_registration=t.enableRegistration),t.enableEmailIdentification&&(s.enable_email_identification=t.enableEmailIdentification),t.enableOnScreenKeyboard&&(s.enable_on_screen_keyboard=t.enableOnScreenKeyboard),t.primaryIdentificationMethod&&(s.primary_identification_method=t.primaryIdentificationMethod),t.enableMarketingPreferences&&(s.enable_marketing_preferences=t.enableMarketingPreferences),s},a=()=>{o.post("/",i(),{baseURL:`${t.host}/api/v1/portal-sessions`,headers:{Authorization:`Bearer ${t.apiKey}`}}).then(s=>{const c=new Ws;c.type=s.data.data.type,c.uuid=s.data.data.uuid,c.contact=s.data.data.contact,c.currency=s.data.data.currency,c.events=s.data.data.events,c.inputData=s.data.data.input_data,c.loyaltyProgram=s.data.data.loyalty_program,c.results=s.data.data.results,r(c)}).catch(e)};return x.useEffect(()=>a(),[]),{portalSession:n}}var c1={exports:{}};/*!
|
|
52
|
-
Copyright (c) 2018 Jed Watson.
|
|
53
|
-
Licensed under the MIT License (MIT), see
|
|
54
|
-
http://jedwatson.github.io/classnames
|
|
55
|
-
*/(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var i="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(i=o(i,r(s)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var a="";for(var s in i)e.call(i,s)&&i[s]&&(a=o(a,s));return a}function o(i,a){return a?i?i+" "+a:i+a:i}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(c1);var D3=c1.exports;const Dn=ll(D3);function zl(t){return v.jsxs("svg",{...t,"aria-hidden":"true",role:"status",className:Dn("inline h-5 w-5 animate-spin fill-[#E5E7EB]",t.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[v.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),v.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}function Er({message:t=""}){return v.jsxs("div",{className:"flex h-screen w-full items-center justify-center gap-4 text-core-gray-500",children:[v.jsx(zl,{className:"h-[48px] w-[48px]"}),t&&v.jsx("p",{className:"text-xl",children:t})]})}/**
|
|
56
|
-
* @remix-run/router v1.16.1
|
|
57
|
-
*
|
|
58
|
-
* Copyright (c) Remix Software Inc.
|
|
59
|
-
*
|
|
60
|
-
* This source code is licensed under the MIT license found in the
|
|
61
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
62
|
-
*
|
|
63
|
-
* @license MIT
|
|
64
|
-
*/function bc(){return bc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bc.apply(this,arguments)}var To;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(To||(To={}));function M3(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:n,v5Compat:r=!1}=t,o;o=e.map((p,u)=>f(p,typeof p=="string"?null:p.state,u===0?"default":void 0));let i=c(n??o.length-1),a=To.Pop,s=null;function c(p){return Math.min(Math.max(p,0),o.length-1)}function l(){return o[i]}function f(p,u,g){u===void 0&&(u=null);let m=F3(o?l().pathname:"/",p,u,g);return Cr(m.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(p)),m}function h(p){return typeof p=="string"?p:Ec(p)}return{get index(){return i},get action(){return a},get location(){return l()},createHref:h,createURL(p){return new URL(h(p),"http://localhost")},encodeLocation(p){let u=typeof p=="string"?ri(p):p;return{pathname:u.pathname||"",search:u.search||"",hash:u.hash||""}},push(p,u){a=To.Push;let g=f(p,u);i+=1,o.splice(i,o.length,g),r&&s&&s({action:a,location:g,delta:1})},replace(p,u){a=To.Replace;let g=f(p,u);o[i]=g,r&&s&&s({action:a,location:g,delta:0})},go(p){a=To.Pop;let u=c(i+p),g=o[u];i=u,s&&s({action:a,location:g,delta:p})},listen(p){return s=p,()=>{s=null}}}}function et(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Cr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function L3(){return Math.random().toString(36).substr(2,8)}function F3(t,e,n,r){return n===void 0&&(n=null),bc({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?ri(e):e,{state:n,key:e&&e.key||r||L3()})}function Ec(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ri(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}var u1;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(u1||(u1={}));function l1(t,e,n){n===void 0&&(n="/");let r=typeof e=="string"?ri(e):e,o=xo(r.pathname||"/",n);if(o==null)return null;let i=d1(t);j3(i);let a=null;for(let s=0;a==null&&s<i.length;++s){let c=X3(o);a=z3(i[s],c)}return a}function d1(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,s)=>{let c={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(et(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let l=no([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(et(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),d1(i.children,e,f,l)),!(i.path==null&&!i.index)&&e.push({path:l,score:Y3(l,i.index),routesMeta:f})};return t.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let c of f1(i.path))o(i,a,c)}),e}function f1(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=f1(r.join("/")),s=[];return s.push(...a.map(c=>c===""?i:[i,c].join("/"))),o&&s.push(...a),s.map(c=>t.startsWith("/")&&c===""?"/":c)}function j3(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:K3(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const V3=/^:[\w-]+$/,U3=3,G3=2,q3=1,H3=10,W3=-2,h1=t=>t==="*";function Y3(t,e){let n=t.split("/"),r=n.length;return n.some(h1)&&(r+=W3),e&&(r+=G3),n.filter(o=>!h1(o)).reduce((o,i)=>o+(V3.test(i)?U3:i===""?q3:H3),r)}function K3(t,e){return t.length===e.length&&t.slice(0,-1).every((r,o)=>r===e[o])?t[t.length-1]-e[e.length-1]:0}function z3(t,e){let{routesMeta:n}=t,r={},o="/",i=[];for(let a=0;a<n.length;++a){let s=n[a],c=a===n.length-1,l=o==="/"?e:e.slice(o.length)||"/",f=$l({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l);if(!f)return null;Object.assign(r,f.params);let h=s.route;i.push({params:r,pathname:no([o,f.pathname]),pathnameBase:eE(no([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=no([o,f.pathnameBase]))}return i}function $l(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=$3(t.path,t.caseSensitive,t.end),o=e.match(n);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((l,f,h)=>{let{paramName:d,isOptional:p}=f;if(d==="*"){let g=s[h]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const u=s[h];return p&&!u?l[d]=void 0:l[d]=(u||"").replace(/%2F/g,"/"),l},{}),pathname:i,pathnameBase:a,pattern:t}}function $3(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),Cr(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,c)=>(r.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,e?void 0:"i"),r]}function X3(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Cr(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function xo(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function Q3(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:o=""}=typeof t=="string"?ri(t):t;return{pathname:n?n.startsWith("/")?n:J3(n,e):e,search:tE(r),hash:nE(o)}}function J3(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Xl(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Z3(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Ql(t,e){let n=Z3(t);return e?n.map((r,o)=>o===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Jl(t,e,n,r){r===void 0&&(r=!1);let o;typeof t=="string"?o=ri(t):(o=bc({},t),et(!o.pathname||!o.pathname.includes("?"),Xl("?","pathname","search",o)),et(!o.pathname||!o.pathname.includes("#"),Xl("#","pathname","hash",o)),et(!o.search||!o.search.includes("#"),Xl("#","search","hash",o)));let i=t===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let h=e.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),h-=1;o.pathname=d.join("/")}s=h>=0?e[h]:"/"}let c=Q3(o,s),l=a&&a!=="/"&&a.endsWith("/"),f=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||f)&&(c.pathname+="/"),c}const no=t=>t.join("/").replace(/\/\/+/g,"/"),eE=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),tE=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,nE=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function rE(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const p1=["post","put","patch","delete"];new Set(p1);const oE=["get",...p1];new Set(oE);/**
|
|
65
|
-
* React Router v6.23.1
|
|
66
|
-
*
|
|
67
|
-
* Copyright (c) Remix Software Inc.
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the MIT license found in the
|
|
70
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
71
|
-
*
|
|
72
|
-
* @license MIT
|
|
73
|
-
*/function ja(){return ja=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ja.apply(this,arguments)}const Va=ce.createContext(null);process.env.NODE_ENV!=="production"&&(Va.displayName="DataRouter");const Zl=ce.createContext(null);process.env.NODE_ENV!=="production"&&(Zl.displayName="DataRouterState");const iE=ce.createContext(null);process.env.NODE_ENV!=="production"&&(iE.displayName="Await");const _r=ce.createContext(null);process.env.NODE_ENV!=="production"&&(_r.displayName="Navigation");const Li=ce.createContext(null);process.env.NODE_ENV!=="production"&&(Li.displayName="Location");const Rr=ce.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Rr.displayName="Route");const ed=ce.createContext(null);process.env.NODE_ENV!=="production"&&(ed.displayName="RouteError");function aE(t,e){let{relative:n}=e===void 0?{}:e;Fi()||(process.env.NODE_ENV!=="production"?et(!1,"useHref() may be used only in the context of a <Router> component."):et(!1));let{basename:r,navigator:o}=ce.useContext(_r),{hash:i,pathname:a,search:s}=Ua(t,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:no([r,a])),o.createHref({pathname:c,search:s,hash:i})}function Fi(){return ce.useContext(Li)!=null}function Sn(){return Fi()||(process.env.NODE_ENV!=="production"?et(!1,"useLocation() may be used only in the context of a <Router> component."):et(!1)),ce.useContext(Li).location}function sE(){return ce.useContext(Li).navigationType}const g1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function m1(t){ce.useContext(_r).static||ce.useLayoutEffect(t)}function Qt(){let{isDataRoute:t}=ce.useContext(Rr);return t?EE():cE()}function cE(){Fi()||(process.env.NODE_ENV!=="production"?et(!1,"useNavigate() may be used only in the context of a <Router> component."):et(!1));let t=ce.useContext(Va),{basename:e,future:n,navigator:r}=ce.useContext(_r),{matches:o}=ce.useContext(Rr),{pathname:i}=Sn(),a=JSON.stringify(Ql(o,n.v7_relativeSplatPath)),s=ce.useRef(!1);return m1(()=>{s.current=!0}),ce.useCallback(function(l,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&Cr(s.current,g1),!s.current)return;if(typeof l=="number"){r.go(l);return}let h=Jl(l,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:no([e,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[e,r,a,i,t])}function ji(){let{matches:t}=ce.useContext(Rr),e=t[t.length-1];return e?e.params:{}}function Ua(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=ce.useContext(_r),{matches:o}=ce.useContext(Rr),{pathname:i}=Sn(),a=JSON.stringify(Ql(o,r.v7_relativeSplatPath));return ce.useMemo(()=>Jl(t,JSON.parse(a),i,n==="path"),[t,a,i,n])}function uE(t,e){return lE(t,e)}function lE(t,e,n,r){Fi()||(process.env.NODE_ENV!=="production"?et(!1,"useRoutes() may be used only in the context of a <Router> component."):et(!1));let{navigator:o}=ce.useContext(_r),{matches:i}=ce.useContext(Rr),a=i[i.length-1],s=a?a.params:{},c=a?a.pathname:"/",l=a?a.pathnameBase:"/",f=a&&a.route;if(process.env.NODE_ENV!=="production"){let w=f&&f.path||"";w1(c,!f||w.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+w+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
74
|
-
|
|
75
|
-
`+('Please change the parent <Route path="'+w+'"> to <Route ')+('path="'+(w==="/"?"*":w+"/*")+'">.'))}let h=Sn(),d;if(e){var p;let w=typeof e=="string"?ri(e):e;l==="/"||(p=w.pathname)!=null&&p.startsWith(l)||(process.env.NODE_ENV!=="production"?et(!1,"When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was "+('matched by all parent routes. The current pathname base is "'+l+'" ')+('but pathname "'+w.pathname+'" was given in the `location` prop.')):et(!1)),d=w}else d=h;let u=d.pathname||"/",g=u;if(l!=="/"){let w=l.replace(/^\//,"").split("/");g="/"+u.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=l1(t,{pathname:g});process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Cr(f||m!=null,'No routes matched location "'+d.pathname+d.search+d.hash+'" '),process.env.NODE_ENV!=="production"&&Cr(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,'Matched leaf route at location "'+d.pathname+d.search+d.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let y=gE(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:no([l,o.encodeLocation?o.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:no([l,o.encodeLocation?o.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return e&&y?ce.createElement(Li.Provider,{value:{location:ja({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:To.Pop}},y):y}function dE(){let t=bE(),e=rE(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},a=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",t),a=ce.createElement(ce.Fragment,null,ce.createElement("p",null,"💿 Hey developer 👋"),ce.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ce.createElement("code",{style:i},"ErrorBoundary")," or"," ",ce.createElement("code",{style:i},"errorElement")," prop on your route."))),ce.createElement(ce.Fragment,null,ce.createElement("h2",null,"Unexpected Application Error!"),ce.createElement("h3",{style:{fontStyle:"italic"}},e),n?ce.createElement("pre",{style:o},n):null,a)}const fE=ce.createElement(dE,null);class hE extends ce.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?ce.createElement(Rr.Provider,{value:this.props.routeContext},ce.createElement(ed.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pE(t){let{routeContext:e,match:n,children:r}=t,o=ce.useContext(Va);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),ce.createElement(Rr.Provider,{value:e},r)}function gE(t,e,n,r){var o;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if((i=n)!=null&&i.errors)t=n.matches;else return null}let a=t,s=(o=n)==null?void 0:o.errors;if(s!=null){let f=a.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?et(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(s).join(",")):et(!1)),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<a.length;f++){let h=a[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(l=f),h.route.id){let{loaderData:d,errors:p}=n,u=h.route.loader&&d[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||u){c=!0,l>=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((f,h,d)=>{let p,u=!1,g=null,m=null;n&&(p=s&&h.route.id?s[h.route.id]:void 0,g=h.route.errorElement||fE,c&&(l<0&&d===0?(w1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,m=null):l===d&&(u=!0,m=h.route.hydrateFallbackElement||null)));let y=e.concat(a.slice(0,d+1)),w=()=>{let b;return p?b=g:u?b=m:h.route.Component?b=ce.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=f,ce.createElement(pE,{match:h,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?ce.createElement(hE,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):w()},null)}var y1=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(y1||{}),Ga=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ga||{});function td(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function mE(t){let e=ce.useContext(Va);return e||(process.env.NODE_ENV!=="production"?et(!1,td(t)):et(!1)),e}function yE(t){let e=ce.useContext(Zl);return e||(process.env.NODE_ENV!=="production"?et(!1,td(t)):et(!1)),e}function vE(t){let e=ce.useContext(Rr);return e||(process.env.NODE_ENV!=="production"?et(!1,td(t)):et(!1)),e}function nd(t){let e=vE(t),n=e.matches[e.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?et(!1,t+' can only be used on routes that contain a unique "id"'):et(!1)),n.route.id}function wE(){return nd(Ga.UseRouteId)}function bE(){var t;let e=ce.useContext(ed),n=yE(Ga.UseRouteError),r=nd(Ga.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function EE(){let{router:t}=mE(y1.UseNavigateStable),e=nd(Ga.UseNavigateStable),n=ce.useRef(!1);return m1(()=>{n.current=!0}),ce.useCallback(function(o,i){i===void 0&&(i={}),process.env.NODE_ENV!=="production"&&Cr(n.current,g1),n.current&&(typeof o=="number"?t.navigate(o):t.navigate(o,ja({fromRouteId:e},i)))},[t,e])}const v1={};function w1(t,e,n){!e&&!v1[t]&&(v1[t]=!0,process.env.NODE_ENV!=="production"&&Cr(!1,n))}const b1=ce["startTransition"];function CE(t){let{basename:e,children:n,initialEntries:r,initialIndex:o,future:i}=t,a=ce.useRef();a.current==null&&(a.current=M3({initialEntries:r,initialIndex:o,v5Compat:!0}));let s=a.current,[c,l]=ce.useState({action:s.action,location:s.location}),{v7_startTransition:f}=i||{},h=ce.useCallback(d=>{f&&b1?b1(()=>l(d)):l(d)},[l,f]);return ce.useLayoutEffect(()=>s.listen(h),[s,h]),ce.createElement(_E,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:s,future:i})}function Ar(t){let{to:e,replace:n,state:r,relative:o}=t;Fi()||(process.env.NODE_ENV!=="production"?et(!1,"<Navigate> may be used only in the context of a <Router> component."):et(!1));let{future:i,static:a}=ce.useContext(_r);process.env.NODE_ENV!=="production"&&Cr(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=ce.useContext(Rr),{pathname:c}=Sn(),l=Qt(),f=Jl(e,Ql(s,i.v7_relativeSplatPath),c,o==="path"),h=JSON.stringify(f);return ce.useEffect(()=>l(JSON.parse(h),{replace:n,state:r,relative:o}),[l,h,o,n,r]),null}function ze(t){process.env.NODE_ENV!=="production"?et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>."):et(!1)}function _E(t){let{basename:e="/",children:n=null,location:r,navigationType:o=To.Pop,navigator:i,static:a=!1,future:s}=t;Fi()&&(process.env.NODE_ENV!=="production"?et(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):et(!1));let c=e.replace(/^\/*/,"/"),l=ce.useMemo(()=>({basename:c,navigator:i,static:a,future:ja({v7_relativeSplatPath:!1},s)}),[c,s,i,a]);typeof r=="string"&&(r=ri(r));let{pathname:f="/",search:h="",hash:d="",state:p=null,key:u="default"}=r,g=ce.useMemo(()=>{let m=xo(f,c);return m==null?null:{location:{pathname:m,search:h,hash:d,state:p,key:u},navigationType:o}},[c,f,h,d,p,u,o]);return process.env.NODE_ENV!=="production"&&Cr(g!=null,'<Router basename="'+c+'"> is not able to match the URL '+('"'+f+h+d+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),g==null?null:ce.createElement(_r.Provider,{value:l},ce.createElement(Li.Provider,{children:n,value:g}))}function ro(t){let{children:e,location:n}=t;return uE(Cc(e),n)}new Promise(()=>{});function Cc(t,e){e===void 0&&(e=[]);let n=[];return ce.Children.forEach(t,(r,o)=>{if(!ce.isValidElement(r))return;let i=[...e,o];if(r.type===ce.Fragment){n.push.apply(n,Cc(r.props.children,i));return}r.type!==ze&&(process.env.NODE_ENV!=="production"?et(!1,"["+(typeof r.type=="string"?r.type:r.type.name)+"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>"):et(!1)),!r.props.index||!r.props.children||(process.env.NODE_ENV!=="production"?et(!1,"An index route cannot have child routes."):et(!1));let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Cc(r.props.children,i)),n.push(a)}),n}/**
|
|
76
|
-
* React Router DOM v6.23.1
|
|
77
|
-
*
|
|
78
|
-
* Copyright (c) Remix Software Inc.
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the MIT license found in the
|
|
81
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
82
|
-
*
|
|
83
|
-
* @license MIT
|
|
84
|
-
*/function Vi(){return Vi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vi.apply(this,arguments)}function rd(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}const _c="get",Ac="application/x-www-form-urlencoded";function Sc(t){return t!=null&&typeof t.tagName=="string"}function AE(t){return Sc(t)&&t.tagName.toLowerCase()==="button"}function SE(t){return Sc(t)&&t.tagName.toLowerCase()==="form"}function IE(t){return Sc(t)&&t.tagName.toLowerCase()==="input"}function TE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function xE(t,e){return t.button===0&&(!e||e==="_self")&&!TE(t)}let Ic=null;function OE(){if(Ic===null)try{new FormData(document.createElement("form"),0),Ic=!1}catch{Ic=!0}return Ic}const PE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function od(t){return t!=null&&!PE.has(t)?(process.env.NODE_ENV!=="production"&&Cr(!1,'"'+t+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Ac+'"')),null):t}function kE(t,e){let n,r,o,i,a;if(SE(t)){let s=t.getAttribute("action");r=s?xo(s,e):null,n=t.getAttribute("method")||_c,o=od(t.getAttribute("enctype"))||Ac,i=new FormData(t)}else if(AE(t)||IE(t)&&(t.type==="submit"||t.type==="image")){let s=t.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||s.getAttribute("action");if(r=c?xo(c,e):null,n=t.getAttribute("formmethod")||s.getAttribute("method")||_c,o=od(t.getAttribute("formenctype"))||od(s.getAttribute("enctype"))||Ac,i=new FormData(s,t),!OE()){let{name:l,type:f,value:h}=t;if(f==="image"){let d=l?l+".":"";i.append(d+"x","0"),i.append(d+"y","0")}else l&&i.append(l,h)}}else{if(Sc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_c,r=null,o=Ac,a=t}return i&&o==="text/plain"&&(a=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:a}}const BE=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],NE=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],RE=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],DE="6";try{window.__reactRouterVersion=DE}catch{}const E1=ce.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(E1.displayName="ViewTransition");const ME=ce.createContext(new Map);process.env.NODE_ENV!=="production"&&(ME.displayName="Fetchers"),process.env.NODE_ENV;const LE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,C1=ce.forwardRef(function(e,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:c,to:l,preventScrollReset:f,unstable_viewTransition:h}=e,d=rd(e,BE),{basename:p}=ce.useContext(_r),u,g=!1;if(typeof l=="string"&&FE.test(l)&&(u=l,LE))try{let b=new URL(window.location.href),E=l.startsWith("//")?new URL(b.protocol+l):new URL(l),C=xo(E.pathname,p);E.origin===b.origin&&C!=null?l=C+E.search+E.hash:g=!0}catch{process.env.NODE_ENV!=="production"&&Cr(!1,'<Link to="'+l+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let m=aE(l,{relative:o}),y=UE(l,{replace:a,state:s,target:c,preventScrollReset:f,relative:o,unstable_viewTransition:h});function w(b){r&&r(b),b.defaultPrevented||y(b)}return ce.createElement("a",Vi({},d,{href:u||m,onClick:g||i?r:w,ref:n,target:c}))});process.env.NODE_ENV!=="production"&&(C1.displayName="Link");const _1=ce.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:s,to:c,unstable_viewTransition:l,children:f}=e,h=rd(e,NE),d=Ua(c,{relative:h.relative}),p=Sn(),u=ce.useContext(Zl),{navigator:g,basename:m}=ce.useContext(_r),y=u!=null&&KE(d)&&l===!0,w=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=p.pathname,E=u&&u.navigation&&u.navigation.location?u.navigation.location.pathname:null;o||(b=b.toLowerCase(),E=E?E.toLowerCase():null,w=w.toLowerCase()),E&&m&&(E=xo(E,m)||E);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let S=b===w||!a&&b.startsWith(w)&&b.charAt(C)==="/",T=E!=null&&(E===w||!a&&E.startsWith(w)&&E.charAt(w.length)==="/"),P={isActive:S,isPending:T,isTransitioning:y},N=S?r:void 0,L;typeof i=="function"?L=i(P):L=[i,S?"active":null,T?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(P):s;return ce.createElement(C1,Vi({},h,{"aria-current":N,className:L,ref:n,style:U,to:c,unstable_viewTransition:l}),typeof f=="function"?f(P):f)});process.env.NODE_ENV!=="production"&&(_1.displayName="NavLink");const jE=ce.forwardRef((t,e)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:i,state:a,method:s=_c,action:c,onSubmit:l,relative:f,preventScrollReset:h,unstable_viewTransition:d}=t,p=rd(t,RE),u=WE(),g=YE(c,{relative:f}),m=s.toLowerCase()==="get"?"get":"post",y=w=>{if(l&&l(w),w.defaultPrevented)return;w.preventDefault();let b=w.nativeEvent.submitter,E=(b==null?void 0:b.getAttribute("formmethod"))||s;u(b||w.currentTarget,{fetcherKey:n,method:E,navigate:r,replace:i,state:a,relative:f,preventScrollReset:h,unstable_viewTransition:d})};return ce.createElement("form",Vi({ref:e,method:m,action:g,onSubmit:o?l:y},p))});process.env.NODE_ENV!=="production"&&(jE.displayName="Form"),process.env.NODE_ENV;var Tc;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Tc||(Tc={}));var A1;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(A1||(A1={}));function VE(t){return t+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function S1(t){let e=ce.useContext(Va);return e||(process.env.NODE_ENV!=="production"?et(!1,VE(t)):et(!1)),e}function UE(t,e){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s}=e===void 0?{}:e,c=Qt(),l=Sn(),f=Ua(t,{relative:a});return ce.useCallback(h=>{if(xE(h,n)){h.preventDefault();let d=r!==void 0?r:Ec(l)===Ec(f);c(t,{replace:d,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:s})}},[l,c,f,r,o,n,t,i,a,s])}function GE(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let qE=0,HE=()=>"__"+String(++qE)+"__";function WE(){let{router:t}=S1(Tc.UseSubmit),{basename:e}=ce.useContext(_r),n=wE();return ce.useCallback(function(r,o){o===void 0&&(o={}),GE();let{action:i,method:a,encType:s,formData:c,body:l}=kE(r,e);if(o.navigate===!1){let f=o.fetcherKey||HE();t.fetch(f,n,o.action||i,{preventScrollReset:o.preventScrollReset,formData:c,body:l,formMethod:o.method||a,formEncType:o.encType||s,unstable_flushSync:o.unstable_flushSync})}else t.navigate(o.action||i,{preventScrollReset:o.preventScrollReset,formData:c,body:l,formMethod:o.method||a,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[t,e,n])}function YE(t,e){let{relative:n}=e===void 0?{}:e,{basename:r}=ce.useContext(_r),o=ce.useContext(Rr);o||(process.env.NODE_ENV!=="production"?et(!1,"useFormAction must be used inside a RouteContext"):et(!1));let[i]=o.matches.slice(-1),a=Vi({},Ua(t||".",{relative:n})),s=Sn();if(t==null){a.search=s.search;let c=new URLSearchParams(a.search);c.has("index")&&c.get("index")===""&&(c.delete("index"),a.search=c.toString()?"?"+c.toString():"")}return(!t||t===".")&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:no([r,a.pathname])),Ec(a)}function KE(t,e){e===void 0&&(e={});let n=ce.useContext(E1);n==null&&(process.env.NODE_ENV!=="production"?et(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):et(!1));let{basename:r}=S1(Tc.useViewTransitionState),o=Ua(t,{relative:e.relative});if(!n.isTransitioning)return!1;let i=xo(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=xo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return $l(o.pathname,a)!=null||$l(o.pathname,i)!=null}function zE(t){const e=parseInt(t.slice(1,3),16)/255,n=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,o=Math.max(e,n,r),i=Math.min(e,n,r),a=o-i,s=(o+i)/2;let c=0;a!==0&&(c=a/(1-Math.abs(2*s-1)));let l=0;return a!==0&&(o===e?l=((n-r)/a+(n<r?6:0))*60:o===n?l=((r-e)/a+2)*60:l=((e-n)/a+4)*60),{hue:l,saturation:c,lightness:s}}function xc(t,e,n){const r=(1-Math.abs(2*n-1))*e,o=r*(1-Math.abs(t/60%2-1)),i=n-r/2;let a=0,s=0,c=0;return t<60?(a=r,s=o,c=0):t<120?(a=o,s=r,c=0):t<180?(a=0,s=r,c=o):t<240?(a=0,s=o,c=r):t<300?(a=o,s=0,c=r):(a=r,s=0,c=o),a=Math.round((a+i)*255),s=Math.round((s+i)*255),c=Math.round((c+i)*255),`#${a.toString(16).padStart(2,"0")}${s.toString(16).padStart(2,"0")}${c.toString(16).padStart(2,"0")}`}function I1(t){const{hue:e,saturation:n,lightness:r}=zE(t),o=.04,i=[{key:"50",min:97,max:99},{key:"100",min:92,max:96},{key:"200",min:85,max:91},{key:"300",min:74,max:84},{key:"400",min:58,max:73},{key:"500",min:51,max:61},{key:"600",min:36,max:50},{key:"700",min:29,max:40},{key:"800",min:24,max:33},{key:"900",min:20,max:28},{key:"950",min:0,max:19}],a={},s={},c={},l={};i.forEach(f=>{const h=(f.min+f.max)/2/100;a[f.key]=xc(e,n,h),c[f.key]=xc(0,n,h),l[f.key]=xc(120,n,h),s[f.key]=xc(e,o,h)});for(const f of i)if(r*100>=f.min&&r*100<=f.max){a[f.key]=t;break}return{primaryPalette:a,redPalette:c,greenPalette:l,grayPalette:s}}const $E=t=>{const e={primary:t.primary_color,secondary:t.secondary_color,tertiary:t.tertiary_color,quaternary:t.quaternary_color},n=document.querySelector(":root");for(const r in e)if(e[r]){const{primaryPalette:o}=I1(e[r]);for(const i in o)n.style.setProperty(`--${r}-${i}`,o[i])}if(e.primary){const{grayPalette:r,redPalette:o,greenPalette:i}=I1(e.primary);for(const a in r)n.style.setProperty(`--gray-${a}`,r[a]);for(const a in o)n.style.setProperty(`--red-${a}`,o[a]);for(const a in i)n.style.setProperty(`--green-${a}`,i[a])}};function Oo({value:t,start:e=0,duration:n=1e3,currency:r="EUR",asCurrency:o=!1}){const[i,a]=x.useState(e),s=()=>{const c=e>t?e-t:t-e;return c<=1e3?1:c/1e3};return x.useEffect(()=>{const c=setInterval(()=>{e>t?a(l=>Math.max(l-s(),t)):a(l=>Math.min(l+s(),t)),i===t&&clearInterval(c)},n/t);return()=>clearInterval(c)},[i,n,e,t]),v.jsx("div",{"data-testid":"animated-counter",children:o?Mi(i,r):i})}const XE=(t,e,n)=>{const r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((o,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},QE=({svgComponent:t,...e})=>v.jsx(t,{...e});function T1(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=T1(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function JE(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=T1(t))&&(r&&(r+=" "),r+=e);return r}const x1=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,O1=JE,Ui=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return O1(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=e,a=Object.keys(o).map(l=>{const f=n==null?void 0:n[l],h=i==null?void 0:i[l];if(f===null)return null;const d=x1(f)||x1(h);return o[l][d]}),s=n&&Object.entries(n).reduce((l,f)=>{let[h,d]=f;return d===void 0||(l[h]=d),l},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((l,f)=>{let{class:h,className:d,...p}=f;return Object.entries(p).every(u=>{let[g,m]=u;return Array.isArray(m)?m.includes({...i,...s}[g]):{...i,...s}[g]===m})?[...l,h,d]:l},[]);return O1(t,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},ZE=Ui("aspect-square",{variants:{size:{"2xs":"h-3 w-3",xs:"h-4 w-4",sm:"h-5 w-5",md:"h-6 w-6",lg:"h-7 w-7",xl:"h-8 w-8","2xl":"h-10 w-10"},variant:{primary:"fill-none stroke-core-white-900 stroke-[1.5]",secondary:"fill-none stroke-core-gray-400 stroke-[1.5] active:stroke-core-gray-900 ",discovery:"fill-none stroke-core-primary-500 stroke-[1.5] ",destructive:"fill-none stroke-core-red-700 stroke-[1.5] ",placeholder:"fill-none stroke-core-gray-300 stroke-[1.5]"},outline:{true:[],false:[]}},compoundVariants:[{variant:"placeholder",outline:!1,class:"fill-core-gray-300 stroke-width-0"}],defaultVariants:{variant:"placeholder",size:"md"}}),In=({icon:t="user",size:e="md",variant:n="placeholder",outline:r=!0})=>{if(x.isValidElement(t))return"span";const o=e6(t);return o?v.jsx(QE,{svgComponent:o,className:ZE({variant:n,size:e,outline:r})}):null};function e6(t){const[e,n]=x.useState(null),r=async()=>{try{const o=(await XE(Object.assign({"../../assets/svg/calendar.svg":()=>Promise.resolve().then(()=>Yk),"../../assets/svg/camera-switch.svg":()=>Promise.resolve().then(()=>Kk),"../../assets/svg/caret-left.svg":()=>Promise.resolve().then(()=>zk),"../../assets/svg/close.svg":()=>Promise.resolve().then(()=>$k),"../../assets/svg/crossBlack.svg":()=>Promise.resolve().then(()=>Xk),"../../assets/svg/dollar.svg":()=>Promise.resolve().then(()=>Qk),"../../assets/svg/edit.svg":()=>Promise.resolve().then(()=>Jk),"../../assets/svg/home.svg":()=>Promise.resolve().then(()=>Zk),"../../assets/svg/information.svg":()=>Promise.resolve().then(()=>eB),"../../assets/svg/mail.svg":()=>Promise.resolve().then(()=>tB),"../../assets/svg/notificationErrorV2.svg":()=>Promise.resolve().then(()=>nB),"../../assets/svg/notificationSuccessV2.svg":()=>Promise.resolve().then(()=>rB),"../../assets/svg/notificationWarningV2.svg":()=>Promise.resolve().then(()=>oB),"../../assets/svg/settings.svg":()=>Promise.resolve().then(()=>iB),"../../assets/svg/shopping-bag.svg":()=>Promise.resolve().then(()=>aB),"../../assets/svg/star.svg":()=>Promise.resolve().then(()=>sB),"../../assets/svg/user.svg":()=>Promise.resolve().then(()=>cB)}),`../../assets/svg/${t}.svg`,5)).default;n(()=>o)}catch(o){console.error(`Failed to import icon: ${t}`,o),n(null)}};return x.useEffect(()=>{r()},[t]),e}const t6=Ui("bg-core-primary-500 text-core-white-900 relative inline-flex aspect-square shrink-0 items-center antialiased rounded-full overflow-hidden uppercase",{variants:{size:{xs:"h-6 w-6 text-xs ",sm:"h-8 w-8 text-sm",md:"h-10 w-10 text-base",lg:"h-12 w-12 text-lg",xl:"h-14 w-14 text-xl","2xl":"h-16 w-16 text-2xl"}},defaultVariants:{size:"sm"}}),n6=({src:t,alt:e})=>v.jsx("img",{src:t,alt:e,className:"bg-core-white-900 aspect-square w-full grow rounded-full object-cover object-center"}),r6=({initials:t})=>v.jsx("div",{className:"h-full w-full content-center text-center",children:t}),id=({src:t,alt:e,initials:n,size:r})=>v.jsxs("div",{className:t6({size:r}),children:[t&&v.jsx(n6,{src:t,alt:e}),t&&!n&&v.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:v.jsx(In,{icon:"user",variant:"placeholder",outline:!1,size:r})}),!t&&n&&v.jsx(r6,{initials:n}),!t&&!n&&v.jsx("div",{className:"flex grow h-full w-full bg-core-gray-100 justify-center items-center",children:v.jsx(In,{icon:"user",variant:"placeholder",outline:!1,size:r})})]});id.displayName="Avatar";const o6=Ui("inline-flex items-center rounded-lg px-2 py-1 antialiased",{variants:{color:{primary:"text-core-primary-700 outline-core-primary-200 bg-core-primary-50",gray:"text-core-gray-700 outline-core-gray-200 bg-core-gray-50"},size:{sm:"text-xs leading-4 ",md:"text-sm leading-5 "},stroke:{true:"outline outline-1",false:""}},defaultVariants:{color:"primary",size:"sm",stroke:!1}}),ad=({label:t,color:e="primary",size:n="sm",stroke:r=!1})=>v.jsx("span",{className:o6({color:e,size:n,stroke:r}),children:t});ad.displayName="Badge";function i6({body:t}){return v.jsxs("div",{className:"flex gap-3 rounded-r-lg border-l-2 border-core-primary-500 bg-core-gray-50 p-4 text-sm",children:[v.jsx(In,{icon:"information",variant:"discovery"}),v.jsx("div",{children:t})]})}const a6=Ui("group inline-flex shrink-0 select-none items-center justify-center font-medium transition-colors duration-100 antialiased rounded-lg hover:shadow-none focus:outline-0 focus:outline-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",{variants:{size:{sm:"h-8 gap-1 px-2 py-1 text-xs leading-4",md:"h-10 gap-1 px-3 py-2 text-sm leading-5",lg:"h-12 gap-1 px-3 py-3 text-base leading-6"},variant:{primary:"bg-core-primary-500 text-core-white-900 outline-primary hover:bg-core-primary-600 disabled:bg-core-primary-disabled",secondary:"box-border border border-core-gray-200 bg-core-white-900 shadow-xs hover:bg-core-gray-50 disabled:opacity-30",destructive:"bg-core-red-500 text-core-white-900 hover:bg-core-red-600 focus:outline-core-red-500 disabled:bg-core-red-200","destructive-outline":"box-border border border-core-red-200 text-core-red-700 shadow-xs hover:bg-core-red-50 focus:outline-core-red-500 disabled:opacity-40","link-gray":"bg-transparent hover:bg-surface hover:underline underline-offset-2 disabled:opacity-30"}},compoundVariants:[{variant:"link-gray",size:["md","lg"],class:"px-0 py-0"}],defaultVariants:{variant:"primary",size:"md"}}),P1={primary:"primary",secondary:"secondary",destructive:"primary","destructive-outline":"destructive","link-gray":"secondary"},k1={md:"sm",lg:"md"},nt=({after:t,before:e,className:n,label:r="button",variant:o="primary",size:i="md",pending:a=!1,disabled:s=!1,onClick:c,...l})=>{const f=d=>{var p;return Dn("group-hover:opacity-70 ",(p=d.props)==null?void 0:p.className)},h=d=>{var p;return((p=d.props)==null?void 0:p.icon)??"user"};return v.jsxs("button",{className:Dn(a6({variant:o,size:i}),n),disabled:s||a,onClick:c,...l,children:[v.jsxs("span",{className:`flex items-center gap-1 ${a&&"opacity-0"}`,children:[e&&v.jsx(In,{className:f(e),icon:h(e),variant:P1[o],size:k1[i]}),v.jsx("span",{children:r}),t&&v.jsx(In,{className:Dn(f(t),`${a&&"opacity-0"}`),icon:h(t),variant:P1[o],size:k1[i]})]}),a&&v.jsx(zl,{className:"absolute"})]})};nt.displayName="Button";function Vt({children:t,id:e=x.useId()}){return v.jsx("div",{id:e,className:"flex h-full max-h-full flex-col bg-white md:h-fit md:rounded-lg md:border md:shadow-md",children:t})}function Mt({children:t}){return v.jsx("div",{className:"grow overflow-y-auto px-6 py-4",children:t})}function on({children:t}){return v.jsx("div",{className:"border-t px-6 py-4",children:t})}function Lt({children:t}){return v.jsx("div",{className:"border-b px-6",children:t})}const B1=({children:t,className:e,description:n,disabled:r,required:o=!1,tooltip:i,htmlFor:a})=>!t&&!i&&!n?null:v.jsx("label",{htmlFor:a,className:"inline-flex shrink-0 items-center gap-1 text-core-gray-800 antialiased ",children:v.jsxs("div",{className:Dn("inline-flex cursor-pointer items-center gap-1 text-sm font-medium leading-6",e,r&&"pointer-events-none text-core-gray-300"),children:[t?v.jsx("span",{className:Dn(r&&"pointer-events-none text-core-gray-300"),children:t}):null,n?v.jsx("span",{className:Dn("font-normal text-core-gray-500",r&&"text-current"),children:n}):null,o?v.jsx("span",{className:"font-normal text-core-red-500",children:"*"}):null]})}),N1=({helperText:t,error:e,disabled:n})=>t?v.jsx("span",{className:Dn("text-start text-sm leading-6 text-core-gray-500 antialiased ",e&&"text-core-red-500",n&&"text-core-gray-300"),children:t}):null;B1.displayName="Label",N1.displayName="HelperText";const Gn=Object.assign(B1,{Helper:N1}),s6=({id:t,defaultChecked:e=!1,disabled:n,onChange:r})=>{const o=n,[i,a]=x.useState(e),s=c=>{o||a(!i),r&&r(c.target.checked)};return v.jsx("div",{className:"flex h-6 w-6 items-center justify-center",children:v.jsx("input",{className:"h-4 w-4 rounded border border-core-gray-200 bg-core-white-900 text-core-primary-500 shadow-xs hover:border-core-gray-300 hover:shadow-none checked:bg-core-primary-500focus:outline-0 focus:ring-core-primary-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border disabled:border-core-gray-200 disabled:bg-core-gray-50 disabled:shadow-none disabled:checked:bg-core-gray-200",id:t,type:"checkbox",checked:i,onChange:s,disabled:o})})},R1=x.createContext(null);function D1(t=!1){const e=x.useContext(R1);if(!e&&!t)throw new Error("Checkbox.Item must be used within a CheckboxGroup or CheckboxGroup.Root");return e}const M1=x.forwardRef(({children:t,description:e,disabled:n,helperText:r,id:o,label:i,required:a,tooltip:s},c)=>{const l=x.useId(),f=o??l,h=i??e??s??r?v.jsxs("div",{className:"inline-flex flex-col",children:[v.jsx(Gn,{className:"cursor-default",description:e,required:a,tooltip:s,htmlFor:f,disabled:n,children:i}),v.jsx(Gn.Helper,{disabled:n,helperText:r})]}):null;return v.jsx(R1.Provider,{value:{disabled:n},children:v.jsxs("div",{ref:c,"aria-describedby":r?`${f}__describer`:void 0,"aria-labelledby":i?`${f}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[i??r??e??s?v.jsx("div",{className:"flex flex-col",children:h}):null,t?v.jsx("div",{className:Dn("flex flex-col gap-2"),children:t}):null]})})});M1.displayName="CheckboxGroup",Object.assign(M1,{Item:({disabled:t,label:e,defaultChecked:n})=>{const r=D1(),{disabled:o}=r??{};return v.jsx(Oc,{disabled:t??o,label:e,defaultChecked:n})}});const Oc=({id:t,children:e,defaultChecked:n=!1,description:r,disabled:o,helperText:i,label:a,required:s=!1,tooltip:c,onChange:l})=>{const f=x.useId(),h=t??f,d=!!D1(!0),p=a??r??c??i?v.jsxs("div",{className:"inline-flex flex-col",children:[v.jsx(Gn,{className:Dn(d&&"font-normal"),description:r,required:s,tooltip:c,htmlFor:h,disabled:o,children:a}),v.jsx(Gn.Helper,{disabled:o,helperText:i})]}):null;return v.jsxs("div",{className:"flex gap-3",children:[v.jsx(s6,{id:h,defaultChecked:n,disabled:o,onChange:l}),e||p]})};Oc.displayName="Checkbox";function qa(){return{subscribe:(r,o)=>{document.addEventListener(r,o)},unsubscribe:(r,o)=>{document.removeEventListener(r,o)},publish:(r,o)=>{const i=new CustomEvent(r,{detail:o});document.dispatchEvent(i)}}}function L1(t,e){x.useEffect(()=>{const n=o=>{t.current&&!t.current.contains(o.target)&&e(!1)},r=o=>{o.key==="Escape"&&e(!1)};return document.addEventListener("mousedown",n),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",r)}},[])}const c6=typeof window<"u"?x.useLayoutEffect:()=>{},u6=()=>window.visualViewport?[window.visualViewport.width,window.visualViewport.height]:[window.innerWidth,window.innerHeight],l6=()=>{const[t,e]=x.useState(),n=x.useCallback(()=>{const r=u6();e(o=>o&&o[0]===r[0]&&o[1]===r[1]?o:r)},[]);return c6(n,[n]),x.useEffect(()=>{var o;const r=()=>{n(),setTimeout(n,1e3)};return window.addEventListener("resize",r),window.addEventListener("orientationchange",r),(o=window.visualViewport)==null||o.addEventListener("resize",r),()=>{var i;window.removeEventListener("resize",r),window.removeEventListener("orientationchange",r),(i=window.visualViewport)==null||i.removeEventListener("resize",r)}},[n]),t};var F1={exports:{}};/*!
|
|
85
|
-
*
|
|
86
|
-
* react-simple-keyboard v3.7.121
|
|
87
|
-
* https://github.com/hodgef/react-simple-keyboard
|
|
88
|
-
*
|
|
89
|
-
* Copyright (c) Francisco Hodge (https://github.com/hodgef) and project contributors.
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the MIT license found in the
|
|
92
|
-
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*
|
|
94
|
-
*/(function(t,e){(function(n,r){t.exports=r(x)})(Jo,function(n){return function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(s){if("Element"in s){var c="classList",l="prototype",f=s.Element[l],h=Object,d=String[l].trim||function(){return this.replace(/^\s+|\s+$/g,"")},p=Array[l].indexOf||function(E){for(var C=0,S=this.length;C<S;C++)if(C in this&&this[C]===E)return C;return-1},u=function(E,C){this.name=E,this.code=DOMException[E],this.message=C},g=function(E,C){if(C==="")throw new u("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(C))throw new u("INVALID_CHARACTER_ERR","The token must not contain space characters.");return p.call(E,C)},m=function(E){for(var C=d.call(E.getAttribute("class")||""),S=C?C.split(/\s+/):[],T=0,P=S.length;T<P;T++)this.push(S[T]);this._updateClassName=function(){E.setAttribute("class",this.toString())}},y=m[l]=[],w=function(){return new m(this)};if(u[l]=Error[l],y.item=function(E){return this[E]||null},y.contains=function(E){return~g(this,E+"")},y.add=function(){var E,C=arguments,S=0,T=C.length,P=!1;do~g(this,E=C[S]+"")||(this.push(E),P=!0);while(++S<T);P&&this._updateClassName()},y.remove=function(){var E,C,S=arguments,T=0,P=S.length,N=!1;do for(C=g(this,E=S[T]+"");~C;)this.splice(C,1),N=!0,C=g(this,E);while(++T<P);N&&this._updateClassName()},y.toggle=function(E,C){var S=this.contains(E),T=S?C!==!0&&"remove":C!==!1&&"add";return T&&this[T](E),C===!0||C===!1?C:!S},y.replace=function(E,C){var S=g(E+"");~S&&(this.splice(S,1,C),this._updateClassName())},y.toString=function(){return this.join(" ")},h.defineProperty){var b={get:w,enumerable:!0,configurable:!0};try{h.defineProperty(f,c,b)}catch(E){E.number!==void 0&&E.number!==-2146823252||(b.enumerable=!1,h.defineProperty(f,c,b))}}else h[l].__defineGetter__&&f.__defineGetter__(c,w)}}(self),function(){var s=document.createElement("_");if(s.classList.add("c1","c2"),!s.classList.contains("c2")){var c=function(f){var h=DOMTokenList.prototype[f];DOMTokenList.prototype[f]=function(d){var p,u=arguments.length;for(p=0;p<u;p++)d=arguments[p],h.call(this,d)}};c("add"),c("remove")}if(s.classList.toggle("c3",!1),s.classList.contains("c3")){var l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(f,h){return 1 in arguments&&!this.contains(f)==!h?h:l.call(this,f)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(f,h){var d=this.toString().split(" "),p=d.indexOf(f+"");~p&&(d=d.slice(p),this.remove.apply(this,d),this.add(h),this.add.apply(this,d.slice(1)))}),s=null}())},548:function(s){s.exports=function(){var c={9306:function(d,p,u){var g=u(4901),m=u(6823),y=TypeError;d.exports=function(w){if(g(w))return w;throw new y(m(w)+" is not a function")}},5548:function(d,p,u){var g=u(3517),m=u(6823),y=TypeError;d.exports=function(w){if(g(w))return w;throw new y(m(w)+" is not a constructor")}},3506:function(d,p,u){var g=u(3925),m=String,y=TypeError;d.exports=function(w){if(g(w))return w;throw new y("Can't set "+m(w)+" as a prototype")}},6469:function(d,p,u){var g=u(8227),m=u(2360),y=u(4913).f,w=g("unscopables"),b=Array.prototype;b[w]===void 0&&y(b,w,{configurable:!0,value:m(null)}),d.exports=function(E){b[w][E]=!0}},7829:function(d,p,u){var g=u(8183).charAt;d.exports=function(m,y,w){return y+(w?g(m,y).length:1)}},8551:function(d,p,u){var g=u(34),m=String,y=TypeError;d.exports=function(w){if(g(w))return w;throw new y(m(w)+" is not an object")}},235:function(d,p,u){var g=u(9213).forEach,m=u(4598)("forEach");d.exports=m?[].forEach:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}},7916:function(d,p,u){var g=u(6080),m=u(9565),y=u(8981),w=u(6319),b=u(4209),E=u(3517),C=u(6198),S=u(4659),T=u(81),P=u(851),N=Array;d.exports=function(L){var U=y(L),j=E(this),K=arguments.length,G=K>1?arguments[1]:void 0,k=G!==void 0;k&&(G=g(G,K>2?arguments[2]:void 0));var V,z,te,re,ne,se,we=P(U),le=0;if(!we||this===N&&b(we))for(V=C(U),z=j?new this(V):N(V);V>le;le++)se=k?G(U[le],le):U[le],S(z,le,se);else for(z=j?new this:[],ne=(re=T(U,we)).next;!(te=m(ne,re)).done;le++)se=k?w(re,G,[te.value,le],!0):te.value,S(z,le,se);return z.length=le,z}},9617:function(d,p,u){var g=u(5397),m=u(5610),y=u(6198),w=function(b){return function(E,C,S){var T=g(E),P=y(T);if(P===0)return!b&&-1;var N,L=m(S,P);if(b&&C!=C){for(;P>L;)if((N=T[L++])!=N)return!0}else for(;P>L;L++)if((b||L in T)&&T[L]===C)return b||L||0;return!b&&-1}};d.exports={includes:w(!0),indexOf:w(!1)}},9213:function(d,p,u){var g=u(6080),m=u(9504),y=u(7055),w=u(8981),b=u(6198),E=u(1469),C=m([].push),S=function(T){var P=T===1,N=T===2,L=T===3,U=T===4,j=T===6,K=T===7,G=T===5||j;return function(k,V,z,te){for(var re,ne,se=w(k),we=y(se),le=b(we),Ce=g(V,z),ye=0,H=te||E,W=P?H(k,le):N||K?H(k,0):void 0;le>ye;ye++)if((G||ye in we)&&(ne=Ce(re=we[ye],ye,se),T))if(P)W[ye]=ne;else if(ne)switch(T){case 3:return!0;case 5:return re;case 6:return ye;case 2:C(W,re)}else switch(T){case 4:return!1;case 7:C(W,re)}return j?-1:L||U?U:W}};d.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},597:function(d,p,u){var g=u(9039),m=u(8227),y=u(7388),w=m("species");d.exports=function(b){return y>=51||!g(function(){var E=[];return(E.constructor={})[w]=function(){return{foo:1}},E[b](Boolean).foo!==1})}},4598:function(d,p,u){var g=u(9039);d.exports=function(m,y){var w=[][m];return!!w&&g(function(){w.call(null,y||function(){return 1},1)})}},926:function(d,p,u){var g=u(9306),m=u(8981),y=u(7055),w=u(6198),b=TypeError,E="Reduce of empty array with no initial value",C=function(S){return function(T,P,N,L){var U=m(T),j=y(U),K=w(U);if(g(P),K===0&&N<2)throw new b(E);var G=S?K-1:0,k=S?-1:1;if(N<2)for(;;){if(G in j){L=j[G],G+=k;break}if(G+=k,S?G<0:K<=G)throw new b(E)}for(;S?G>=0:K>G;G+=k)G in j&&(L=P(L,j[G],G,U));return L}};d.exports={left:C(!1),right:C(!0)}},4527:function(d,p,u){var g=u(3724),m=u(4376),y=TypeError,w=Object.getOwnPropertyDescriptor,b=g&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(E){return E instanceof TypeError}}();d.exports=b?function(E,C){if(m(E)&&!w(E,"length").writable)throw new y("Cannot set read only .length");return E.length=C}:function(E,C){return E.length=C}},7680:function(d,p,u){var g=u(9504);d.exports=g([].slice)},4488:function(d,p,u){var g=u(7680),m=Math.floor,y=function(w,b){var E=w.length;if(E<8)for(var C,S,T=1;T<E;){for(S=T,C=w[T];S&&b(w[S-1],C)>0;)w[S]=w[--S];S!==T++&&(w[S]=C)}else for(var P=m(E/2),N=y(g(w,0,P),b),L=y(g(w,P),b),U=N.length,j=L.length,K=0,G=0;K<U||G<j;)w[K+G]=K<U&&G<j?b(N[K],L[G])<=0?N[K++]:L[G++]:K<U?N[K++]:L[G++];return w};d.exports=y},7433:function(d,p,u){var g=u(4376),m=u(3517),y=u(34),w=u(8227)("species"),b=Array;d.exports=function(E){var C;return g(E)&&(C=E.constructor,(m(C)&&(C===b||g(C.prototype))||y(C)&&(C=C[w])===null)&&(C=void 0)),C===void 0?b:C}},1469:function(d,p,u){var g=u(7433);d.exports=function(m,y){return new(g(m))(y===0?0:y)}},6319:function(d,p,u){var g=u(8551),m=u(9539);d.exports=function(y,w,b,E){try{return E?w(g(b)[0],b[1]):w(b)}catch(C){m(y,"throw",C)}}},4428:function(d,p,u){var g=u(8227)("iterator"),m=!1;try{var y=0,w={next:function(){return{done:!!y++}},return:function(){m=!0}};w[g]=function(){return this},Array.from(w,function(){throw 2})}catch{}d.exports=function(b,E){try{if(!E&&!m)return!1}catch{return!1}var C=!1;try{var S={};S[g]=function(){return{next:function(){return{done:C=!0}}}},b(S)}catch{}return C}},4576:function(d,p,u){var g=u(9504),m=g({}.toString),y=g("".slice);d.exports=function(w){return y(m(w),8,-1)}},6955:function(d,p,u){var g=u(2140),m=u(4901),y=u(4576),w=u(8227)("toStringTag"),b=Object,E=y(function(){return arguments}())==="Arguments";d.exports=g?y:function(C){var S,T,P;return C===void 0?"Undefined":C===null?"Null":typeof(T=function(N,L){try{return N[L]}catch{}}(S=b(C),w))=="string"?T:E?y(S):(P=y(S))==="Object"&&m(S.callee)?"Arguments":P}},7740:function(d,p,u){var g=u(9297),m=u(5031),y=u(7347),w=u(4913);d.exports=function(b,E,C){for(var S=m(E),T=w.f,P=y.f,N=0;N<S.length;N++){var L=S[N];g(b,L)||C&&g(C,L)||T(b,L,P(E,L))}}},1436:function(d,p,u){var g=u(8227)("match");d.exports=function(m){var y=/./;try{"/./"[m](y)}catch{try{return y[g]=!1,"/./"[m](y)}catch{}}return!1}},2211:function(d,p,u){var g=u(9039);d.exports=!g(function(){function m(){}return m.prototype.constructor=null,Object.getPrototypeOf(new m)!==m.prototype})},2529:function(d){d.exports=function(p,u){return{value:p,done:u}}},6699:function(d,p,u){var g=u(3724),m=u(4913),y=u(6980);d.exports=g?function(w,b,E){return m.f(w,b,y(1,E))}:function(w,b,E){return w[b]=E,w}},6980:function(d){d.exports=function(p,u){return{enumerable:!(1&p),configurable:!(2&p),writable:!(4&p),value:u}}},4659:function(d,p,u){var g=u(3724),m=u(4913),y=u(6980);d.exports=function(w,b,E){g?m.f(w,b,y(0,E)):w[b]=E}},3640:function(d,p,u){var g=u(8551),m=u(4270),y=TypeError;d.exports=function(w){if(g(this),w==="string"||w==="default")w="string";else if(w!=="number")throw new y("Incorrect hint");return m(this,w)}},2106:function(d,p,u){var g=u(283),m=u(4913);d.exports=function(y,w,b){return b.get&&g(b.get,w,{getter:!0}),b.set&&g(b.set,w,{setter:!0}),m.f(y,w,b)}},6840:function(d,p,u){var g=u(4901),m=u(4913),y=u(283),w=u(9433);d.exports=function(b,E,C,S){S||(S={});var T=S.enumerable,P=S.name!==void 0?S.name:E;if(g(C)&&y(C,P,S),S.global)T?b[E]=C:w(E,C);else{try{S.unsafe?b[E]&&(T=!0):delete b[E]}catch{}T?b[E]=C:m.f(b,E,{value:C,enumerable:!1,configurable:!S.nonConfigurable,writable:!S.nonWritable})}return b}},9433:function(d,p,u){var g=u(4475),m=Object.defineProperty;d.exports=function(y,w){try{m(g,y,{value:w,configurable:!0,writable:!0})}catch{g[y]=w}return w}},4606:function(d,p,u){var g=u(6823),m=TypeError;d.exports=function(y,w){if(!delete y[w])throw new m("Cannot delete property "+g(w)+" of "+g(y))}},3724:function(d,p,u){var g=u(9039);d.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(d,p,u){var g=u(4475),m=u(34),y=g.document,w=m(y)&&m(y.createElement);d.exports=function(b){return w?y.createElement(b):{}}},6837:function(d){var p=TypeError;d.exports=function(u){if(u>9007199254740991)throw p("Maximum allowed index exceeded");return u}},7400:function(d){d.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(d,p,u){var g=u(4055)("span").classList,m=g&&g.constructor&&g.constructor.prototype;d.exports=m===Object.prototype?void 0:m},8834:function(d,p,u){var g=u(9392).match(/firefox\/(\d+)/i);d.exports=!!g&&+g[1]},3202:function(d,p,u){var g=u(9392);d.exports=/MSIE|Trident/.test(g)},9088:function(d,p,u){var g=u(4475),m=u(4576);d.exports=m(g.process)==="process"},9392:function(d){d.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(d,p,u){var g,m,y=u(4475),w=u(9392),b=y.process,E=y.Deno,C=b&&b.versions||E&&E.version,S=C&&C.v8;S&&(m=(g=S.split("."))[0]>0&&g[0]<4?1:+(g[0]+g[1])),!m&&w&&(!(g=w.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=w.match(/Chrome\/(\d+)/))&&(m=+g[1]),d.exports=m},9160:function(d,p,u){var g=u(9392).match(/AppleWebKit\/(\d+)\./);d.exports=!!g&&+g[1]},8727:function(d){d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(d,p,u){var g=u(4475),m=u(7347).f,y=u(6699),w=u(6840),b=u(9433),E=u(7740),C=u(2796);d.exports=function(S,T){var P,N,L,U,j,K=S.target,G=S.global,k=S.stat;if(P=G?g:k?g[K]||b(K,{}):g[K]&&g[K].prototype)for(N in T){if(U=T[N],L=S.dontCallGetSet?(j=m(P,N))&&j.value:P[N],!C(G?N:K+(k?".":"#")+N,S.forced)&&L!==void 0){if(typeof U==typeof L)continue;E(U,L)}(S.sham||L&&L.sham)&&y(U,"sham",!0),w(P,N,U,S)}}},9039:function(d){d.exports=function(p){try{return!!p()}catch{return!0}}},9228:function(d,p,u){u(7495);var g=u(9565),m=u(6840),y=u(7323),w=u(9039),b=u(8227),E=u(6699),C=b("species"),S=RegExp.prototype;d.exports=function(T,P,N,L){var U=b(T),j=!w(function(){var V={};return V[U]=function(){return 7},""[T](V)!==7}),K=j&&!w(function(){var V=!1,z=/a/;return T==="split"&&((z={}).constructor={},z.constructor[C]=function(){return z},z.flags="",z[U]=/./[U]),z.exec=function(){return V=!0,null},z[U](""),!V});if(!j||!K||N){var G=/./[U],k=P(U,""[T],function(V,z,te,re,ne){var se=z.exec;return se===y||se===S.exec?j&&!ne?{done:!0,value:g(G,z,te,re)}:{done:!0,value:g(V,te,z,re)}:{done:!1}});m(String.prototype,T,k[0]),m(S,U,k[1])}L&&E(S[U],"sham",!0)}},8745:function(d,p,u){var g=u(616),m=Function.prototype,y=m.apply,w=m.call;d.exports=typeof Reflect=="object"&&Reflect.apply||(g?w.bind(y):function(){return w.apply(y,arguments)})},6080:function(d,p,u){var g=u(7476),m=u(9306),y=u(616),w=g(g.bind);d.exports=function(b,E){return m(b),E===void 0?b:y?w(b,E):function(){return b.apply(E,arguments)}}},616:function(d,p,u){var g=u(9039);d.exports=!g(function(){var m=(function(){}).bind();return typeof m!="function"||m.hasOwnProperty("prototype")})},9565:function(d,p,u){var g=u(616),m=Function.prototype.call;d.exports=g?m.bind(m):function(){return m.apply(m,arguments)}},350:function(d,p,u){var g=u(3724),m=u(9297),y=Function.prototype,w=g&&Object.getOwnPropertyDescriptor,b=m(y,"name"),E=b&&(function(){}).name==="something",C=b&&(!g||g&&w(y,"name").configurable);d.exports={EXISTS:b,PROPER:E,CONFIGURABLE:C}},6706:function(d,p,u){var g=u(9504),m=u(9306);d.exports=function(y,w,b){try{return g(m(Object.getOwnPropertyDescriptor(y,w)[b]))}catch{}}},7476:function(d,p,u){var g=u(4576),m=u(9504);d.exports=function(y){if(g(y)==="Function")return m(y)}},9504:function(d,p,u){var g=u(616),m=Function.prototype,y=m.call,w=g&&m.bind.bind(y,y);d.exports=g?w:function(b){return function(){return y.apply(b,arguments)}}},7751:function(d,p,u){var g=u(4475),m=u(4901);d.exports=function(y,w){return arguments.length<2?(b=g[y],m(b)?b:void 0):g[y]&&g[y][w];var b}},851:function(d,p,u){var g=u(6955),m=u(5966),y=u(4117),w=u(6269),b=u(8227)("iterator");d.exports=function(E){if(!y(E))return m(E,b)||m(E,"@@iterator")||w[g(E)]}},81:function(d,p,u){var g=u(9565),m=u(9306),y=u(8551),w=u(6823),b=u(851),E=TypeError;d.exports=function(C,S){var T=arguments.length<2?b(C):S;if(m(T))return y(g(T,C));throw new E(w(C)+" is not iterable")}},6933:function(d,p,u){var g=u(9504),m=u(4376),y=u(4901),w=u(4576),b=u(655),E=g([].push);d.exports=function(C){if(y(C))return C;if(m(C)){for(var S=C.length,T=[],P=0;P<S;P++){var N=C[P];typeof N=="string"?E(T,N):typeof N!="number"&&w(N)!=="Number"&&w(N)!=="String"||E(T,b(N))}var L=T.length,U=!0;return function(j,K){if(U)return U=!1,K;if(m(this))return K;for(var G=0;G<L;G++)if(T[G]===j)return K}}}},5966:function(d,p,u){var g=u(9306),m=u(4117);d.exports=function(y,w){var b=y[w];return m(b)?void 0:g(b)}},2478:function(d,p,u){var g=u(9504),m=u(8981),y=Math.floor,w=g("".charAt),b=g("".replace),E=g("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;d.exports=function(T,P,N,L,U,j){var K=N+T.length,G=L.length,k=S;return U!==void 0&&(U=m(U),k=C),b(j,k,function(V,z){var te;switch(w(z,0)){case"$":return"$";case"&":return T;case"`":return E(P,0,N);case"'":return E(P,K);case"<":te=U[E(z,1,-1)];break;default:var re=+z;if(re===0)return V;if(re>G){var ne=y(re/10);return ne===0?V:ne<=G?L[ne-1]===void 0?w(z,1):L[ne-1]+w(z,1):V}te=L[re-1]}return te===void 0?"":te})}},4475:function(d,p,u){var g=function(m){return m&&m.Math===Math&&m};d.exports=g(typeof globalThis=="object"&&globalThis)||g(typeof window=="object"&&window)||g(typeof self=="object"&&self)||g(typeof u.g=="object"&&u.g)||g(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(d,p,u){var g=u(9504),m=u(8981),y=g({}.hasOwnProperty);d.exports=Object.hasOwn||function(w,b){return y(m(w),b)}},421:function(d){d.exports={}},397:function(d,p,u){var g=u(7751);d.exports=g("document","documentElement")},5917:function(d,p,u){var g=u(3724),m=u(9039),y=u(4055);d.exports=!g&&!m(function(){return Object.defineProperty(y("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(d,p,u){var g=u(9504),m=u(9039),y=u(4576),w=Object,b=g("".split);d.exports=m(function(){return!w("z").propertyIsEnumerable(0)})?function(E){return y(E)==="String"?b(E,""):w(E)}:w},3167:function(d,p,u){var g=u(4901),m=u(34),y=u(2967);d.exports=function(w,b,E){var C,S;return y&&g(C=b.constructor)&&C!==E&&m(S=C.prototype)&&S!==E.prototype&&y(w,S),w}},3706:function(d,p,u){var g=u(9504),m=u(4901),y=u(7629),w=g(Function.toString);m(y.inspectSource)||(y.inspectSource=function(b){return w(b)}),d.exports=y.inspectSource},1181:function(d,p,u){var g,m,y,w=u(8622),b=u(4475),E=u(34),C=u(6699),S=u(9297),T=u(7629),P=u(6119),N=u(421),L="Object already initialized",U=b.TypeError,j=b.WeakMap;if(w||T.state){var K=T.state||(T.state=new j);K.get=K.get,K.has=K.has,K.set=K.set,g=function(k,V){if(K.has(k))throw new U(L);return V.facade=k,K.set(k,V),V},m=function(k){return K.get(k)||{}},y=function(k){return K.has(k)}}else{var G=P("state");N[G]=!0,g=function(k,V){if(S(k,G))throw new U(L);return V.facade=k,C(k,G,V),V},m=function(k){return S(k,G)?k[G]:{}},y=function(k){return S(k,G)}}d.exports={set:g,get:m,has:y,enforce:function(k){return y(k)?m(k):g(k,{})},getterFor:function(k){return function(V){var z;if(!E(V)||(z=m(V)).type!==k)throw new U("Incompatible receiver, "+k+" required");return z}}}},4209:function(d,p,u){var g=u(8227),m=u(6269),y=g("iterator"),w=Array.prototype;d.exports=function(b){return b!==void 0&&(m.Array===b||w[y]===b)}},4376:function(d,p,u){var g=u(4576);d.exports=Array.isArray||function(m){return g(m)==="Array"}},4901:function(d){var p=typeof document=="object"&&document.all;d.exports=p===void 0&&p!==void 0?function(u){return typeof u=="function"||u===p}:function(u){return typeof u=="function"}},3517:function(d,p,u){var g=u(9504),m=u(9039),y=u(4901),w=u(6955),b=u(7751),E=u(3706),C=function(){},S=b("Reflect","construct"),T=/^\s*(?:class|function)\b/,P=g(T.exec),N=!T.test(C),L=function(j){if(!y(j))return!1;try{return S(C,[],j),!0}catch{return!1}},U=function(j){if(!y(j))return!1;switch(w(j)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!P(T,E(j))}catch{return!0}};U.sham=!0,d.exports=!S||m(function(){var j;return L(L.call)||!L(Object)||!L(function(){j=!0})||j})?U:L},2796:function(d,p,u){var g=u(9039),m=u(4901),y=/#|\.prototype\./,w=function(T,P){var N=E[b(T)];return N===S||N!==C&&(m(P)?g(P):!!P)},b=w.normalize=function(T){return String(T).replace(y,".").toLowerCase()},E=w.data={},C=w.NATIVE="N",S=w.POLYFILL="P";d.exports=w},2087:function(d,p,u){var g=u(34),m=Math.floor;d.exports=Number.isInteger||function(y){return!g(y)&&isFinite(y)&&m(y)===y}},4117:function(d){d.exports=function(p){return p==null}},34:function(d,p,u){var g=u(4901);d.exports=function(m){return typeof m=="object"?m!==null:g(m)}},3925:function(d,p,u){var g=u(34);d.exports=function(m){return g(m)||m===null}},6395:function(d){d.exports=!1},788:function(d,p,u){var g=u(34),m=u(4576),y=u(8227)("match");d.exports=function(w){var b;return g(w)&&((b=w[y])!==void 0?!!b:m(w)==="RegExp")}},757:function(d,p,u){var g=u(7751),m=u(4901),y=u(1625),w=u(7040),b=Object;d.exports=w?function(E){return typeof E=="symbol"}:function(E){var C=g("Symbol");return m(C)&&y(C.prototype,b(E))}},9539:function(d,p,u){var g=u(9565),m=u(8551),y=u(5966);d.exports=function(w,b,E){var C,S;m(w);try{if(!(C=y(w,"return"))){if(b==="throw")throw E;return E}C=g(C,w)}catch(T){S=!0,C=T}if(b==="throw")throw E;if(S)throw C;return m(C),E}},3994:function(d,p,u){var g=u(7657).IteratorPrototype,m=u(2360),y=u(6980),w=u(687),b=u(6269),E=function(){return this};d.exports=function(C,S,T,P){var N=S+" Iterator";return C.prototype=m(g,{next:y(+!P,T)}),w(C,N,!1,!0),b[N]=E,C}},1088:function(d,p,u){var g=u(6518),m=u(9565),y=u(6395),w=u(350),b=u(4901),E=u(3994),C=u(2787),S=u(2967),T=u(687),P=u(6699),N=u(6840),L=u(8227),U=u(6269),j=u(7657),K=w.PROPER,G=w.CONFIGURABLE,k=j.IteratorPrototype,V=j.BUGGY_SAFARI_ITERATORS,z=L("iterator"),te="keys",re="values",ne="entries",se=function(){return this};d.exports=function(we,le,Ce,ye,H,W,J){E(Ce,le,ye);var I,M,F,B=function(fe){if(fe===H&&pe)return pe;if(!V&&fe&&fe in Z)return Z[fe];switch(fe){case te:case re:case ne:return function(){return new Ce(this,fe)}}return function(){return new Ce(this)}},X=le+" Iterator",ee=!1,Z=we.prototype,$=Z[z]||Z["@@iterator"]||H&&Z[H],pe=!V&&$||B(H),be=le==="Array"&&Z.entries||$;if(be&&(I=C(be.call(new we)))!==Object.prototype&&I.next&&(y||C(I)===k||(S?S(I,k):b(I[z])||N(I,z,se)),T(I,X,!0,!0),y&&(U[X]=se)),K&&H===re&&$&&$.name!==re&&(!y&&G?P(Z,"name",re):(ee=!0,pe=function(){return m($,this)})),H)if(M={values:B(re),keys:W?pe:B(te),entries:B(ne)},J)for(F in M)(V||ee||!(F in Z))&&N(Z,F,M[F]);else g({target:le,proto:!0,forced:V||ee},M);return y&&!J||Z[z]===pe||N(Z,z,pe,{name:H}),U[le]=pe,M}},7657:function(d,p,u){var g,m,y,w=u(9039),b=u(4901),E=u(34),C=u(2360),S=u(2787),T=u(6840),P=u(8227),N=u(6395),L=P("iterator"),U=!1;[].keys&&("next"in(y=[].keys())?(m=S(S(y)))!==Object.prototype&&(g=m):U=!0),!E(g)||w(function(){var j={};return g[L].call(j)!==j})?g={}:N&&(g=C(g)),b(g[L])||T(g,L,function(){return this}),d.exports={IteratorPrototype:g,BUGGY_SAFARI_ITERATORS:U}},6269:function(d){d.exports={}},6198:function(d,p,u){var g=u(8014);d.exports=function(m){return g(m.length)}},283:function(d,p,u){var g=u(9504),m=u(9039),y=u(4901),w=u(9297),b=u(3724),E=u(350).CONFIGURABLE,C=u(3706),S=u(1181),T=S.enforce,P=S.get,N=String,L=Object.defineProperty,U=g("".slice),j=g("".replace),K=g([].join),G=b&&!m(function(){return L(function(){},"length",{value:8}).length!==8}),k=String(String).split("String"),V=d.exports=function(z,te,re){U(N(te),0,7)==="Symbol("&&(te="["+j(N(te),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),re&&re.getter&&(te="get "+te),re&&re.setter&&(te="set "+te),(!w(z,"name")||E&&z.name!==te)&&(b?L(z,"name",{value:te,configurable:!0}):z.name=te),G&&re&&w(re,"arity")&&z.length!==re.arity&&L(z,"length",{value:re.arity});try{re&&w(re,"constructor")&&re.constructor?b&&L(z,"prototype",{writable:!1}):z.prototype&&(z.prototype=void 0)}catch{}var ne=T(z);return w(ne,"source")||(ne.source=K(k,typeof te=="string"?te:"")),z};Function.prototype.toString=V(function(){return y(this)&&P(this).source||C(this)},"toString")},741:function(d){var p=Math.ceil,u=Math.floor;d.exports=Math.trunc||function(g){var m=+g;return(m>0?u:p)(m)}},5749:function(d,p,u){var g=u(788),m=TypeError;d.exports=function(y){if(g(y))throw new m("The method doesn't accept regular expressions");return y}},4213:function(d,p,u){var g=u(3724),m=u(9504),y=u(9565),w=u(9039),b=u(1072),E=u(3717),C=u(8773),S=u(8981),T=u(7055),P=Object.assign,N=Object.defineProperty,L=m([].concat);d.exports=!P||w(function(){if(g&&P({b:1},P(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var U={},j={},K=Symbol("assign detection"),G="abcdefghijklmnopqrst";return U[K]=7,G.split("").forEach(function(k){j[k]=k}),P({},U)[K]!==7||b(P({},j)).join("")!==G})?function(U,j){for(var K=S(U),G=arguments.length,k=1,V=E.f,z=C.f;G>k;)for(var te,re=T(arguments[k++]),ne=V?L(b(re),V(re)):b(re),se=ne.length,we=0;se>we;)te=ne[we++],g&&!y(z,re,te)||(K[te]=re[te]);return K}:P},2360:function(d,p,u){var g,m=u(8551),y=u(6801),w=u(8727),b=u(421),E=u(397),C=u(4055),S=u(6119),T="prototype",P="script",N=S("IE_PROTO"),L=function(){},U=function(G){return"<"+P+">"+G+"</"+P+">"},j=function(G){G.write(U("")),G.close();var k=G.parentWindow.Object;return G=null,k},K=function(){try{g=new ActiveXObject("htmlfile")}catch{}var G,k,V;K=typeof document<"u"?document.domain&&g?j(g):(k=C("iframe"),V="java"+P+":",k.style.display="none",E.appendChild(k),k.src=String(V),(G=k.contentWindow.document).open(),G.write(U("document.F=Object")),G.close(),G.F):j(g);for(var z=w.length;z--;)delete K[T][w[z]];return K()};b[N]=!0,d.exports=Object.create||function(G,k){var V;return G!==null?(L[T]=m(G),V=new L,L[T]=null,V[N]=G):V=K(),k===void 0?V:y.f(V,k)}},6801:function(d,p,u){var g=u(3724),m=u(8686),y=u(4913),w=u(8551),b=u(5397),E=u(1072);p.f=g&&!m?Object.defineProperties:function(C,S){w(C);for(var T,P=b(S),N=E(S),L=N.length,U=0;L>U;)y.f(C,T=N[U++],P[T]);return C}},4913:function(d,p,u){var g=u(3724),m=u(5917),y=u(8686),w=u(8551),b=u(6969),E=TypeError,C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,T="enumerable",P="configurable",N="writable";p.f=g?y?function(L,U,j){if(w(L),U=b(U),w(j),typeof L=="function"&&U==="prototype"&&"value"in j&&N in j&&!j[N]){var K=S(L,U);K&&K[N]&&(L[U]=j.value,j={configurable:P in j?j[P]:K[P],enumerable:T in j?j[T]:K[T],writable:!1})}return C(L,U,j)}:C:function(L,U,j){if(w(L),U=b(U),w(j),m)try{return C(L,U,j)}catch{}if("get"in j||"set"in j)throw new E("Accessors not supported");return"value"in j&&(L[U]=j.value),L}},7347:function(d,p,u){var g=u(3724),m=u(9565),y=u(8773),w=u(6980),b=u(5397),E=u(6969),C=u(9297),S=u(5917),T=Object.getOwnPropertyDescriptor;p.f=g?T:function(P,N){if(P=b(P),N=E(N),S)try{return T(P,N)}catch{}if(C(P,N))return w(!m(y.f,P,N),P[N])}},298:function(d,p,u){var g=u(4576),m=u(5397),y=u(8480).f,w=u(7680),b=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(E){return b&&g(E)==="Window"?function(C){try{return y(C)}catch{return w(b)}}(E):y(m(E))}},8480:function(d,p,u){var g=u(1828),m=u(8727).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(y){return g(y,m)}},3717:function(d,p){p.f=Object.getOwnPropertySymbols},2787:function(d,p,u){var g=u(9297),m=u(4901),y=u(8981),w=u(6119),b=u(2211),E=w("IE_PROTO"),C=Object,S=C.prototype;d.exports=b?C.getPrototypeOf:function(T){var P=y(T);if(g(P,E))return P[E];var N=P.constructor;return m(N)&&P instanceof N?N.prototype:P instanceof C?S:null}},1625:function(d,p,u){var g=u(9504);d.exports=g({}.isPrototypeOf)},1828:function(d,p,u){var g=u(9504),m=u(9297),y=u(5397),w=u(9617).indexOf,b=u(421),E=g([].push);d.exports=function(C,S){var T,P=y(C),N=0,L=[];for(T in P)!m(b,T)&&m(P,T)&&E(L,T);for(;S.length>N;)m(P,T=S[N++])&&(~w(L,T)||E(L,T));return L}},1072:function(d,p,u){var g=u(1828),m=u(8727);d.exports=Object.keys||function(y){return g(y,m)}},8773:function(d,p){var u={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,m=g&&!u.call({1:2},1);p.f=m?function(y){var w=g(this,y);return!!w&&w.enumerable}:u},2551:function(d,p,u){var g=u(6395),m=u(4475),y=u(9039),w=u(9160);d.exports=g||!y(function(){if(!(w&&w<535)){var b=Math.random();__defineSetter__.call(null,b,function(){}),delete m[b]}})},2967:function(d,p,u){var g=u(6706),m=u(34),y=u(7750),w=u(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b,E=!1,C={};try{(b=g(Object.prototype,"__proto__","set"))(C,[]),E=C instanceof Array}catch{}return function(S,T){return y(S),w(T),m(S)&&(E?b(S,T):S.__proto__=T),S}}():void 0)},3179:function(d,p,u){var g=u(2140),m=u(6955);d.exports=g?{}.toString:function(){return"[object "+m(this)+"]"}},4270:function(d,p,u){var g=u(9565),m=u(4901),y=u(34),w=TypeError;d.exports=function(b,E){var C,S;if(E==="string"&&m(C=b.toString)&&!y(S=g(C,b))||m(C=b.valueOf)&&!y(S=g(C,b))||E!=="string"&&m(C=b.toString)&&!y(S=g(C,b)))return S;throw new w("Can't convert object to primitive value")}},5031:function(d,p,u){var g=u(7751),m=u(9504),y=u(8480),w=u(3717),b=u(8551),E=m([].concat);d.exports=g("Reflect","ownKeys")||function(C){var S=y.f(b(C)),T=w.f;return T?E(S,T(C)):S}},9167:function(d,p,u){var g=u(4475);d.exports=g},1056:function(d,p,u){var g=u(4913).f;d.exports=function(m,y,w){w in m||g(m,w,{configurable:!0,get:function(){return y[w]},set:function(b){y[w]=b}})}},6682:function(d,p,u){var g=u(9565),m=u(8551),y=u(4901),w=u(4576),b=u(7323),E=TypeError;d.exports=function(C,S){var T=C.exec;if(y(T)){var P=g(T,C,S);return P!==null&&m(P),P}if(w(C)==="RegExp")return g(b,C,S);throw new E("RegExp#exec called on incompatible receiver")}},7323:function(d,p,u){var g,m,y=u(9565),w=u(9504),b=u(655),E=u(7979),C=u(8429),S=u(5745),T=u(2360),P=u(1181).get,N=u(3635),L=u(8814),U=S("native-string-replace",String.prototype.replace),j=RegExp.prototype.exec,K=j,G=w("".charAt),k=w("".indexOf),V=w("".replace),z=w("".slice),te=(m=/b*/g,y(j,g=/a/,"a"),y(j,m,"a"),g.lastIndex!==0||m.lastIndex!==0),re=C.BROKEN_CARET,ne=/()??/.exec("")[1]!==void 0;(te||ne||re||N||L)&&(K=function(se){var we,le,Ce,ye,H,W,J,I=this,M=P(I),F=b(se),B=M.raw;if(B)return B.lastIndex=I.lastIndex,we=y(K,B,F),I.lastIndex=B.lastIndex,we;var X=M.groups,ee=re&&I.sticky,Z=y(E,I),$=I.source,pe=0,be=F;if(ee&&(Z=V(Z,"y",""),k(Z,"g")===-1&&(Z+="g"),be=z(F,I.lastIndex),I.lastIndex>0&&(!I.multiline||I.multiline&&G(F,I.lastIndex-1)!==`
|
|
95
|
-
`)&&($="(?: "+$+")",be=" "+be,pe++),le=new RegExp("^(?:"+$+")",Z)),ne&&(le=new RegExp("^"+$+"$(?!\\s)",Z)),te&&(Ce=I.lastIndex),ye=y(j,ee?le:I,be),ee?ye?(ye.input=z(ye.input,pe),ye[0]=z(ye[0],pe),ye.index=I.lastIndex,I.lastIndex+=ye[0].length):I.lastIndex=0:te&&ye&&(I.lastIndex=I.global?ye.index+ye[0].length:Ce),ne&&ye&&ye.length>1&&y(U,ye[0],le,function(){for(H=1;H<arguments.length-2;H++)arguments[H]===void 0&&(ye[H]=void 0)}),ye&&X)for(ye.groups=W=T(null),H=0;H<X.length;H++)W[(J=X[H])[0]]=ye[J[1]];return ye}),d.exports=K},7979:function(d,p,u){var g=u(8551);d.exports=function(){var m=g(this),y="";return m.hasIndices&&(y+="d"),m.global&&(y+="g"),m.ignoreCase&&(y+="i"),m.multiline&&(y+="m"),m.dotAll&&(y+="s"),m.unicode&&(y+="u"),m.unicodeSets&&(y+="v"),m.sticky&&(y+="y"),y}},1034:function(d,p,u){var g=u(9565),m=u(9297),y=u(1625),w=u(7979),b=RegExp.prototype;d.exports=function(E){var C=E.flags;return C!==void 0||"flags"in b||m(E,"flags")||!y(b,E)?C:g(w,E)}},8429:function(d,p,u){var g=u(9039),m=u(4475).RegExp,y=g(function(){var E=m("a","y");return E.lastIndex=2,E.exec("abcd")!==null}),w=y||g(function(){return!m("a","y").sticky}),b=y||g(function(){var E=m("^r","gy");return E.lastIndex=2,E.exec("str")!==null});d.exports={BROKEN_CARET:b,MISSED_STICKY:w,UNSUPPORTED_Y:y}},3635:function(d,p,u){var g=u(9039),m=u(4475).RegExp;d.exports=g(function(){var y=m(".","s");return!(y.dotAll&&y.test(`
|
|
96
|
-
`)&&y.flags==="s")})},8814:function(d,p,u){var g=u(9039),m=u(4475).RegExp;d.exports=g(function(){var y=m("(?<a>b)","g");return y.exec("b").groups.a!=="b"||"b".replace(y,"$<a>c")!=="bc"})},7750:function(d,p,u){var g=u(4117),m=TypeError;d.exports=function(y){if(g(y))throw new m("Can't call method on "+y);return y}},7633:function(d,p,u){var g=u(7751),m=u(2106),y=u(8227),w=u(3724),b=y("species");d.exports=function(E){var C=g(E);w&&C&&!C[b]&&m(C,b,{configurable:!0,get:function(){return this}})}},687:function(d,p,u){var g=u(4913).f,m=u(9297),y=u(8227)("toStringTag");d.exports=function(w,b,E){w&&!E&&(w=w.prototype),w&&!m(w,y)&&g(w,y,{configurable:!0,value:b})}},6119:function(d,p,u){var g=u(5745),m=u(3392),y=g("keys");d.exports=function(w){return y[w]||(y[w]=m(w))}},7629:function(d,p,u){var g=u(6395),m=u(4475),y=u(9433),w="__core-js_shared__",b=d.exports=m[w]||y(w,{});(b.versions||(b.versions=[])).push({version:"3.37.1",mode:g?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(d,p,u){var g=u(7629);d.exports=function(m,y){return g[m]||(g[m]=y||{})}},2293:function(d,p,u){var g=u(8551),m=u(5548),y=u(4117),w=u(8227)("species");d.exports=function(b,E){var C,S=g(b).constructor;return S===void 0||y(C=g(S)[w])?E:m(C)}},8183:function(d,p,u){var g=u(9504),m=u(1291),y=u(655),w=u(7750),b=g("".charAt),E=g("".charCodeAt),C=g("".slice),S=function(T){return function(P,N){var L,U,j=y(w(P)),K=m(N),G=j.length;return K<0||K>=G?T?"":void 0:(L=E(j,K))<55296||L>56319||K+1===G||(U=E(j,K+1))<56320||U>57343?T?b(j,K):L:T?C(j,K,K+2):U-56320+(L-55296<<10)+65536}};d.exports={codeAt:S(!1),charAt:S(!0)}},706:function(d,p,u){var g=u(350).PROPER,m=u(9039),y=u(7452);d.exports=function(w){return m(function(){return!!y[w]()||"
"[w]()!=="
"||g&&y[w].name!==w})}},3802:function(d,p,u){var g=u(9504),m=u(7750),y=u(655),w=u(7452),b=g("".replace),E=RegExp("^["+w+"]+"),C=RegExp("(^|[^"+w+"])["+w+"]+$"),S=function(T){return function(P){var N=y(m(P));return 1&T&&(N=b(N,E,"")),2&T&&(N=b(N,C,"$1")),N}};d.exports={start:S(1),end:S(2),trim:S(3)}},4495:function(d,p,u){var g=u(7388),m=u(9039),y=u(4475).String;d.exports=!!Object.getOwnPropertySymbols&&!m(function(){var w=Symbol("symbol detection");return!y(w)||!(Object(w)instanceof Symbol)||!Symbol.sham&&g&&g<41})},8242:function(d,p,u){var g=u(9565),m=u(7751),y=u(8227),w=u(6840);d.exports=function(){var b=m("Symbol"),E=b&&b.prototype,C=E&&E.valueOf,S=y("toPrimitive");E&&!E[S]&&w(E,S,function(T){return g(C,this)},{arity:1})}},1296:function(d,p,u){var g=u(4495);d.exports=g&&!!Symbol.for&&!!Symbol.keyFor},1240:function(d,p,u){var g=u(9504);d.exports=g(1 .valueOf)},5610:function(d,p,u){var g=u(1291),m=Math.max,y=Math.min;d.exports=function(w,b){var E=g(w);return E<0?m(E+b,0):y(E,b)}},5397:function(d,p,u){var g=u(7055),m=u(7750);d.exports=function(y){return g(m(y))}},1291:function(d,p,u){var g=u(741);d.exports=function(m){var y=+m;return y!=y||y===0?0:g(y)}},8014:function(d,p,u){var g=u(1291),m=Math.min;d.exports=function(y){var w=g(y);return w>0?m(w,9007199254740991):0}},8981:function(d,p,u){var g=u(7750),m=Object;d.exports=function(y){return m(g(y))}},2777:function(d,p,u){var g=u(9565),m=u(34),y=u(757),w=u(5966),b=u(4270),E=u(8227),C=TypeError,S=E("toPrimitive");d.exports=function(T,P){if(!m(T)||y(T))return T;var N,L=w(T,S);if(L){if(P===void 0&&(P="default"),N=g(L,T,P),!m(N)||y(N))return N;throw new C("Can't convert object to primitive value")}return P===void 0&&(P="number"),b(T,P)}},6969:function(d,p,u){var g=u(2777),m=u(757);d.exports=function(y){var w=g(y,"string");return m(w)?w:w+""}},2140:function(d,p,u){var g={};g[u(8227)("toStringTag")]="z",d.exports=String(g)==="[object z]"},655:function(d,p,u){var g=u(6955),m=String;d.exports=function(y){if(g(y)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return m(y)}},6823:function(d){var p=String;d.exports=function(u){try{return p(u)}catch{return"Object"}}},3392:function(d,p,u){var g=u(9504),m=0,y=Math.random(),w=g(1 .toString);d.exports=function(b){return"Symbol("+(b===void 0?"":b)+")_"+w(++m+y,36)}},7040:function(d,p,u){var g=u(4495);d.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(d,p,u){var g=u(3724),m=u(9039);d.exports=g&&m(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(d,p,u){var g=u(4475),m=u(4901),y=g.WeakMap;d.exports=m(y)&&/native code/.test(String(y))},511:function(d,p,u){var g=u(9167),m=u(9297),y=u(1951),w=u(4913).f;d.exports=function(b){var E=g.Symbol||(g.Symbol={});m(E,b)||w(E,b,{value:y.f(b)})}},1951:function(d,p,u){var g=u(8227);p.f=g},8227:function(d,p,u){var g=u(4475),m=u(5745),y=u(9297),w=u(3392),b=u(4495),E=u(7040),C=g.Symbol,S=m("wks"),T=E?C.for||C:C&&C.withoutSetter||w;d.exports=function(P){return y(S,P)||(S[P]=b&&y(C,P)?C[P]:T("Symbol."+P)),S[P]}},7452:function(d){d.exports=`
|
|
97
|
-
\v\f\r \u2028\u2029\uFEFF`},8706:function(d,p,u){var g=u(6518),m=u(9039),y=u(4376),w=u(34),b=u(8981),E=u(6198),C=u(6837),S=u(4659),T=u(1469),P=u(597),N=u(8227),L=u(7388),U=N("isConcatSpreadable"),j=L>=51||!m(function(){var G=[];return G[U]=!1,G.concat()[0]!==G}),K=function(G){if(!w(G))return!1;var k=G[U];return k!==void 0?!!k:y(G)};g({target:"Array",proto:!0,arity:1,forced:!j||!P("concat")},{concat:function(G){var k,V,z,te,re,ne=b(this),se=T(ne,0),we=0;for(k=-1,z=arguments.length;k<z;k++)if(K(re=k===-1?ne:arguments[k]))for(te=E(re),C(we+te),V=0;V<te;V++,we++)V in re&&S(se,we,re[V]);else C(we+1),S(se,we++,re);return se.length=we,se}})},2008:function(d,p,u){var g=u(6518),m=u(9213).filter;g({target:"Array",proto:!0,forced:!u(597)("filter")},{filter:function(y){return m(this,y,arguments.length>1?arguments[1]:void 0)}})},3418:function(d,p,u){var g=u(6518),m=u(7916);g({target:"Array",stat:!0,forced:!u(4428)(function(y){Array.from(y)})},{from:m})},4423:function(d,p,u){var g=u(6518),m=u(9617).includes,y=u(9039),w=u(6469);g({target:"Array",proto:!0,forced:y(function(){return!Array(1).includes()})},{includes:function(b){return m(this,b,arguments.length>1?arguments[1]:void 0)}}),w("includes")},5276:function(d,p,u){var g=u(6518),m=u(7476),y=u(9617).indexOf,w=u(4598),b=m([].indexOf),E=!!b&&1/b([1],1,-0)<0;g({target:"Array",proto:!0,forced:E||!w("indexOf")},{indexOf:function(C){var S=arguments.length>1?arguments[1]:void 0;return E?b(this,C,S)||0:y(this,C,S)}})},3792:function(d,p,u){var g=u(5397),m=u(6469),y=u(6269),w=u(1181),b=u(4913).f,E=u(1088),C=u(2529),S=u(6395),T=u(3724),P="Array Iterator",N=w.set,L=w.getterFor(P);d.exports=E(Array,"Array",function(j,K){N(this,{type:P,target:g(j),index:0,kind:K})},function(){var j=L(this),K=j.target,G=j.index++;if(!K||G>=K.length)return j.target=void 0,C(void 0,!0);switch(j.kind){case"keys":return C(G,!1);case"values":return C(K[G],!1)}return C([G,K[G]],!1)},"values");var U=y.Arguments=y.Array;if(m("keys"),m("values"),m("entries"),!S&&T&&U.name!=="values")try{b(U,"name",{value:"values"})}catch{}},8598:function(d,p,u){var g=u(6518),m=u(9504),y=u(7055),w=u(5397),b=u(4598),E=m([].join);g({target:"Array",proto:!0,forced:y!==Object||!b("join",",")},{join:function(C){return E(w(this),C===void 0?",":C)}})},2062:function(d,p,u){var g=u(6518),m=u(9213).map;g({target:"Array",proto:!0,forced:!u(597)("map")},{map:function(y){return m(this,y,arguments.length>1?arguments[1]:void 0)}})},2712:function(d,p,u){var g=u(6518),m=u(926).left,y=u(4598),w=u(7388);g({target:"Array",proto:!0,forced:!u(9088)&&w>79&&w<83||!y("reduce")},{reduce:function(b){var E=arguments.length;return m(this,b,E,E>1?arguments[1]:void 0)}})},4782:function(d,p,u){var g=u(6518),m=u(4376),y=u(3517),w=u(34),b=u(5610),E=u(6198),C=u(5397),S=u(4659),T=u(8227),P=u(597),N=u(7680),L=P("slice"),U=T("species"),j=Array,K=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(G,k){var V,z,te,re=C(this),ne=E(re),se=b(G,ne),we=b(k===void 0?ne:k,ne);if(m(re)&&(V=re.constructor,(y(V)&&(V===j||m(V.prototype))||w(V)&&(V=V[U])===null)&&(V=void 0),V===j||V===void 0))return N(re,se,we);for(z=new(V===void 0?j:V)(K(we-se,0)),te=0;se<we;se++,te++)se in re&&S(z,te,re[se]);return z.length=te,z}})},6910:function(d,p,u){var g=u(6518),m=u(9504),y=u(9306),w=u(8981),b=u(6198),E=u(4606),C=u(655),S=u(9039),T=u(4488),P=u(4598),N=u(8834),L=u(3202),U=u(7388),j=u(9160),K=[],G=m(K.sort),k=m(K.push),V=S(function(){K.sort(void 0)}),z=S(function(){K.sort(null)}),te=P("sort"),re=!S(function(){if(U)return U<70;if(!(N&&N>3)){if(L)return!0;if(j)return j<603;var ne,se,we,le,Ce="";for(ne=65;ne<76;ne++){switch(se=String.fromCharCode(ne),ne){case 66:case 69:case 70:case 72:we=3;break;case 68:case 71:we=4;break;default:we=2}for(le=0;le<47;le++)K.push({k:se+le,v:we})}for(K.sort(function(ye,H){return H.v-ye.v}),le=0;le<K.length;le++)se=K[le].k.charAt(0),Ce.charAt(Ce.length-1)!==se&&(Ce+=se);return Ce!=="DGBEFHACIJK"}});g({target:"Array",proto:!0,forced:V||!z||!te||!re},{sort:function(ne){ne!==void 0&&y(ne);var se=w(this);if(re)return ne===void 0?G(se):G(se,ne);var we,le,Ce=[],ye=b(se);for(le=0;le<ye;le++)le in se&&k(Ce,se[le]);for(T(Ce,function(H){return function(W,J){return J===void 0?-1:W===void 0?1:H!==void 0?+H(W,J)||0:C(W)>C(J)?1:-1}}(ne)),we=b(Ce),le=0;le<we;)se[le]=Ce[le++];for(;le<ye;)E(se,le++);return se}})},4554:function(d,p,u){var g=u(6518),m=u(8981),y=u(5610),w=u(1291),b=u(6198),E=u(4527),C=u(6837),S=u(1469),T=u(4659),P=u(4606),N=u(597)("splice"),L=Math.max,U=Math.min;g({target:"Array",proto:!0,forced:!N},{splice:function(j,K){var G,k,V,z,te,re,ne=m(this),se=b(ne),we=y(j,se),le=arguments.length;for(le===0?G=k=0:le===1?(G=0,k=se-we):(G=le-2,k=U(L(w(K),0),se-we)),C(se+G-k),V=S(ne,k),z=0;z<k;z++)(te=we+z)in ne&&T(V,z,ne[te]);if(V.length=k,G<k){for(z=we;z<se-k;z++)re=z+G,(te=z+k)in ne?ne[re]=ne[te]:P(ne,re);for(z=se;z>se-k+G;z--)P(ne,z-1)}else if(G>k)for(z=se-k;z>we;z--)re=z+G-1,(te=z+k-1)in ne?ne[re]=ne[te]:P(ne,re);for(z=0;z<G;z++)ne[z+we]=arguments[z+2];return E(ne,se-k+G),V}})},739:function(d,p,u){var g=u(6518),m=u(9039),y=u(8981),w=u(2777);g({target:"Date",proto:!0,arity:1,forced:m(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(b){var E=y(this),C=w(E,"number");return typeof C!="number"||isFinite(C)?E.toISOString():null}})},9572:function(d,p,u){var g=u(9297),m=u(6840),y=u(3640),w=u(8227)("toPrimitive"),b=Date.prototype;g(b,w)||m(b,w,y)},2010:function(d,p,u){var g=u(3724),m=u(350).EXISTS,y=u(9504),w=u(2106),b=Function.prototype,E=y(b.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=y(C.exec);g&&!m&&w(b,"name",{configurable:!0,get:function(){try{return S(C,E(this))[1]}catch{return""}}})},3110:function(d,p,u){var g=u(6518),m=u(7751),y=u(8745),w=u(9565),b=u(9504),E=u(9039),C=u(4901),S=u(757),T=u(7680),P=u(6933),N=u(4495),L=String,U=m("JSON","stringify"),j=b(/./.exec),K=b("".charAt),G=b("".charCodeAt),k=b("".replace),V=b(1 .toString),z=/[\uD800-\uDFFF]/g,te=/^[\uD800-\uDBFF]$/,re=/^[\uDC00-\uDFFF]$/,ne=!N||E(function(){var Ce=m("Symbol")("stringify detection");return U([Ce])!=="[null]"||U({a:Ce})!=="{}"||U(Object(Ce))!=="{}"}),se=E(function(){return U("\uDF06\uD834")!=='"\\udf06\\ud834"'||U("\uDEAD")!=='"\\udead"'}),we=function(Ce,ye){var H=T(arguments),W=P(ye);if(C(W)||Ce!==void 0&&!S(Ce))return H[1]=function(J,I){if(C(W)&&(I=w(W,this,L(J),I)),!S(I))return I},y(U,null,H)},le=function(Ce,ye,H){var W=K(H,ye-1),J=K(H,ye+1);return j(te,Ce)&&!j(re,J)||j(re,Ce)&&!j(te,W)?"\\u"+V(G(Ce,0),16):Ce};U&&g({target:"JSON",stat:!0,arity:3,forced:ne||se},{stringify:function(Ce,ye,H){var W=T(arguments),J=y(ne?we:U,null,W);return se&&typeof J=="string"?k(J,z,le):J}})},2892:function(d,p,u){var g=u(6518),m=u(6395),y=u(3724),w=u(4475),b=u(9167),E=u(9504),C=u(2796),S=u(9297),T=u(3167),P=u(1625),N=u(757),L=u(2777),U=u(9039),j=u(8480).f,K=u(7347).f,G=u(4913).f,k=u(1240),V=u(3802).trim,z="Number",te=w[z],re=b[z],ne=te.prototype,se=w.TypeError,we=E("".slice),le=E("".charCodeAt),Ce=function(J){var I,M,F,B,X,ee,Z,$,pe=L(J,"number");if(N(pe))throw new se("Cannot convert a Symbol value to a number");if(typeof pe=="string"&&pe.length>2){if(pe=V(pe),(I=le(pe,0))===43||I===45){if((M=le(pe,2))===88||M===120)return NaN}else if(I===48){switch(le(pe,1)){case 66:case 98:F=2,B=49;break;case 79:case 111:F=8,B=55;break;default:return+pe}for(ee=(X=we(pe,2)).length,Z=0;Z<ee;Z++)if(($=le(X,Z))<48||$>B)return NaN;return parseInt(X,F)}}return+pe},ye=C(z,!te(" 0o1")||!te("0b1")||te("+0x1")),H=function(J){var I,M=arguments.length<1?0:te(function(F){var B=L(F,"number");return typeof B=="bigint"?B:Ce(B)}(J));return P(ne,I=this)&&U(function(){k(I)})?T(Object(M),this,H):M};H.prototype=ne,ye&&!m&&(ne.constructor=H),g({global:!0,constructor:!0,wrap:!0,forced:ye},{Number:H});var W=function(J,I){for(var M,F=y?j(I):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),B=0;F.length>B;B++)S(I,M=F[B])&&!S(J,M)&&G(J,M,K(I,M))};m&&re&&W(b[z],re),(ye||m)&&W(b[z],te)},2637:function(d,p,u){u(6518)({target:"Number",stat:!0},{isInteger:u(2087)})},9085:function(d,p,u){var g=u(6518),m=u(4213);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==m},{assign:m})},7427:function(d,p,u){var g=u(6518),m=u(3724),y=u(2551),w=u(9306),b=u(8981),E=u(4913);m&&g({target:"Object",proto:!0,forced:y},{__defineGetter__:function(C,S){E.f(b(this),C,{get:w(S),enumerable:!0,configurable:!0})}})},3851:function(d,p,u){var g=u(6518),m=u(9039),y=u(5397),w=u(7347).f,b=u(3724);g({target:"Object",stat:!0,forced:!b||m(function(){w(1)}),sham:!b},{getOwnPropertyDescriptor:function(E,C){return w(y(E),C)}})},1278:function(d,p,u){var g=u(6518),m=u(3724),y=u(5031),w=u(5397),b=u(7347),E=u(4659);g({target:"Object",stat:!0,sham:!m},{getOwnPropertyDescriptors:function(C){for(var S,T,P=w(C),N=b.f,L=y(P),U={},j=0;L.length>j;)(T=N(P,S=L[j++]))!==void 0&&E(U,S,T);return U}})},1480:function(d,p,u){var g=u(6518),m=u(9039),y=u(298).f;g({target:"Object",stat:!0,forced:m(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:y})},9773:function(d,p,u){var g=u(6518),m=u(4495),y=u(9039),w=u(3717),b=u(8981);g({target:"Object",stat:!0,forced:!m||y(function(){w.f(1)})},{getOwnPropertySymbols:function(E){var C=w.f;return C?C(b(E)):[]}})},9432:function(d,p,u){var g=u(6518),m=u(8981),y=u(1072);g({target:"Object",stat:!0,forced:u(9039)(function(){y(1)})},{keys:function(w){return y(m(w))}})},6099:function(d,p,u){var g=u(2140),m=u(6840),y=u(3179);g||m(Object.prototype,"toString",y,{unsafe:!0})},4864:function(d,p,u){var g=u(3724),m=u(4475),y=u(9504),w=u(2796),b=u(3167),E=u(6699),C=u(2360),S=u(8480).f,T=u(1625),P=u(788),N=u(655),L=u(1034),U=u(8429),j=u(1056),K=u(6840),G=u(9039),k=u(9297),V=u(1181).enforce,z=u(7633),te=u(8227),re=u(3635),ne=u(8814),se=te("match"),we=m.RegExp,le=we.prototype,Ce=m.SyntaxError,ye=y(le.exec),H=y("".charAt),W=y("".replace),J=y("".indexOf),I=y("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,B=/a/g,X=new we(F)!==F,ee=U.MISSED_STICKY,Z=U.UNSUPPORTED_Y;if(w("RegExp",g&&(!X||ee||re||ne||G(function(){return B[se]=!1,we(F)!==F||we(B)===B||String(we(F,"i"))!=="/a/i"})))){for(var $=function(fe,he){var ve,ue,Be,Re,at,xe,De=T(le,this),Pe=P(fe),ot=he===void 0,Ze=[],Ot=fe;if(!De&&Pe&&ot&&fe.constructor===$)return fe;if((Pe||T(le,fe))&&(fe=fe.source,ot&&(he=L(Ot))),fe=fe===void 0?"":N(fe),he=he===void 0?"":N(he),Ot=fe,re&&"dotAll"in F&&(ue=!!he&&J(he,"s")>-1)&&(he=W(he,/s/g,"")),ve=he,ee&&"sticky"in F&&(Be=!!he&&J(he,"y")>-1)&&Z&&(he=W(he,/y/g,"")),ne&&(Re=function(Le){for(var _e,$t=Le.length,Ht=0,Cn="",Yn=[],Zr=C(null),Nn=!1,Kn=!1,yn=0,an="";Ht<=$t;Ht++){if((_e=H(Le,Ht))==="\\")_e+=H(Le,++Ht);else if(_e==="]")Nn=!1;else if(!Nn)switch(!0){case _e==="[":Nn=!0;break;case _e==="(":ye(M,I(Le,Ht+1))&&(Ht+=2,Kn=!0),Cn+=_e,yn++;continue;case(_e===">"&&Kn):if(an===""||k(Zr,an))throw new Ce("Invalid capture group name");Zr[an]=!0,Yn[Yn.length]=[an,yn],Kn=!1,an="";continue}Kn?an+=_e:Cn+=_e}return[Cn,Yn]}(fe),fe=Re[0],Ze=Re[1]),at=b(we(fe,he),De?this:le,$),(ue||Be||Ze.length)&&(xe=V(at),ue&&(xe.dotAll=!0,xe.raw=$(function(Le){for(var _e,$t=Le.length,Ht=0,Cn="",Yn=!1;Ht<=$t;Ht++)(_e=H(Le,Ht))!=="\\"?Yn||_e!=="."?(_e==="["?Yn=!0:_e==="]"&&(Yn=!1),Cn+=_e):Cn+="[\\s\\S]":Cn+=_e+H(Le,++Ht);return Cn}(fe),ve)),Be&&(xe.sticky=!0),Ze.length&&(xe.groups=Ze)),fe!==Ot)try{E(at,"source",Ot===""?"(?:)":Ot)}catch{}return at},pe=S(we),be=0;pe.length>be;)j($,we,pe[be++]);le.constructor=$,$.prototype=le,K(m,"RegExp",$,{constructor:!0})}z("RegExp")},7495:function(d,p,u){var g=u(6518),m=u(7323);g({target:"RegExp",proto:!0,forced:/./.exec!==m},{exec:m})},8781:function(d,p,u){var g=u(350).PROPER,m=u(6840),y=u(8551),w=u(655),b=u(9039),E=u(1034),C="toString",S=RegExp.prototype,T=S[C],P=b(function(){return T.call({source:"a",flags:"b"})!=="/a/b"}),N=g&&T.name!==C;(P||N)&&m(S,C,function(){var L=y(this);return"/"+w(L.source)+"/"+w(E(L))},{unsafe:!0})},1699:function(d,p,u){var g=u(6518),m=u(9504),y=u(5749),w=u(7750),b=u(655),E=u(1436),C=m("".indexOf);g({target:"String",proto:!0,forced:!E("includes")},{includes:function(S){return!!~C(b(w(this)),b(y(S)),arguments.length>1?arguments[1]:void 0)}})},7764:function(d,p,u){var g=u(8183).charAt,m=u(655),y=u(1181),w=u(1088),b=u(2529),E="String Iterator",C=y.set,S=y.getterFor(E);w(String,"String",function(T){C(this,{type:E,string:m(T),index:0})},function(){var T,P=S(this),N=P.string,L=P.index;return L>=N.length?b(void 0,!0):(T=g(N,L),P.index+=T.length,b(T,!1))})},8543:function(d,p,u){var g=u(6518),m=u(9565),y=u(7476),w=u(3994),b=u(2529),E=u(7750),C=u(8014),S=u(655),T=u(8551),P=u(4117),N=u(4576),L=u(788),U=u(1034),j=u(5966),K=u(6840),G=u(9039),k=u(8227),V=u(2293),z=u(7829),te=u(6682),re=u(1181),ne=u(6395),se=k("matchAll"),we="RegExp String",le=we+" Iterator",Ce=re.set,ye=re.getterFor(le),H=RegExp.prototype,W=TypeError,J=y("".indexOf),I=y("".matchAll),M=!!I&&!G(function(){I("a",/./)}),F=w(function(X,ee,Z,$){Ce(this,{type:le,regexp:X,string:ee,global:Z,unicode:$,done:!1})},we,function(){var X=ye(this);if(X.done)return b(void 0,!0);var ee=X.regexp,Z=X.string,$=te(ee,Z);return $===null?(X.done=!0,b(void 0,!0)):X.global?(S($[0])===""&&(ee.lastIndex=z(Z,C(ee.lastIndex),X.unicode)),b($,!1)):(X.done=!0,b($,!1))}),B=function(X){var ee,Z,$,pe=T(this),be=S(X),fe=V(pe,RegExp),he=S(U(pe));return ee=new fe(fe===RegExp?pe.source:pe,he),Z=!!~J(he,"g"),$=!!~J(he,"u"),ee.lastIndex=C(pe.lastIndex),new F(ee,be,Z,$)};g({target:"String",proto:!0,forced:M},{matchAll:function(X){var ee,Z,$,pe,be=E(this);if(P(X)){if(M)return I(be,X)}else{if(L(X)&&(ee=S(E(U(X))),!~J(ee,"g")))throw new W("`.matchAll` does not allow non-global regexes");if(M)return I(be,X);if(($=j(X,se))===void 0&&ne&&N(X)==="RegExp"&&($=B),$)return m($,X,be)}return Z=S(be),pe=new RegExp(X,"g"),ne?m(B,pe,Z):pe[se](Z)}}),ne||se in H||K(H,se,B)},1761:function(d,p,u){var g=u(9565),m=u(9228),y=u(8551),w=u(4117),b=u(8014),E=u(655),C=u(7750),S=u(5966),T=u(7829),P=u(6682);m("match",function(N,L,U){return[function(j){var K=C(this),G=w(j)?void 0:S(j,N);return G?g(G,j,K):new RegExp(j)[N](E(K))},function(j){var K=y(this),G=E(j),k=U(L,K,G);if(k.done)return k.value;if(!K.global)return P(K,G);var V=K.unicode;K.lastIndex=0;for(var z,te=[],re=0;(z=P(K,G))!==null;){var ne=E(z[0]);te[re]=ne,ne===""&&(K.lastIndex=T(G,b(K.lastIndex),V)),re++}return re===0?null:te}]})},5440:function(d,p,u){var g=u(8745),m=u(9565),y=u(9504),w=u(9228),b=u(9039),E=u(8551),C=u(4901),S=u(4117),T=u(1291),P=u(8014),N=u(655),L=u(7750),U=u(7829),j=u(5966),K=u(2478),G=u(6682),k=u(8227)("replace"),V=Math.max,z=Math.min,te=y([].concat),re=y([].push),ne=y("".indexOf),se=y("".slice),we="a".replace(/./,"$0")==="$0",le=!!/./[k]&&/./[k]("a","$0")==="";w("replace",function(Ce,ye,H){var W=le?"$":"$0";return[function(J,I){var M=L(this),F=S(J)?void 0:j(J,k);return F?m(F,J,M,I):m(ye,N(M),J,I)},function(J,I){var M=E(this),F=N(J);if(typeof I=="string"&&ne(I,W)===-1&&ne(I,"$<")===-1){var B=H(ye,M,F,I);if(B.done)return B.value}var X=C(I);X||(I=N(I));var ee,Z=M.global;Z&&(ee=M.unicode,M.lastIndex=0);for(var $,pe=[];($=G(M,F))!==null&&(re(pe,$),Z);)N($[0])===""&&(M.lastIndex=U(F,P(M.lastIndex),ee));for(var be,fe="",he=0,ve=0;ve<pe.length;ve++){for(var ue,Be=N(($=pe[ve])[0]),Re=V(z(T($.index),F.length),0),at=[],xe=1;xe<$.length;xe++)re(at,(be=$[xe])===void 0?be:String(be));var De=$.groups;if(X){var Pe=te([Be],at,Re,F);De!==void 0&&re(Pe,De),ue=N(g(I,void 0,Pe))}else ue=K(Be,F,Re,at,De,I);Re>=he&&(fe+=se(F,he,Re)+ue,he=Re+Be.length)}return fe+se(F,he)}]},!!b(function(){var Ce=/./;return Ce.exec=function(){var ye=[];return ye.groups={a:"7"},ye},"".replace(Ce,"$<a>")!=="7"})||!we||le)},744:function(d,p,u){var g=u(9565),m=u(9504),y=u(9228),w=u(8551),b=u(4117),E=u(7750),C=u(2293),S=u(7829),T=u(8014),P=u(655),N=u(5966),L=u(6682),U=u(8429),j=u(9039),K=U.UNSUPPORTED_Y,G=Math.min,k=m([].push),V=m("".slice),z=!j(function(){var re=/(?:)/,ne=re.exec;re.exec=function(){return ne.apply(this,arguments)};var se="ab".split(re);return se.length!==2||se[0]!=="a"||se[1]!=="b"}),te="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;y("split",function(re,ne,se){var we="0".split(void 0,0).length?function(le,Ce){return le===void 0&&Ce===0?[]:g(ne,this,le,Ce)}:ne;return[function(le,Ce){var ye=E(this),H=b(le)?void 0:N(le,re);return H?g(H,le,ye,Ce):g(we,P(ye),le,Ce)},function(le,Ce){var ye=w(this),H=P(le);if(!te){var W=se(we,ye,H,Ce,we!==ne);if(W.done)return W.value}var J=C(ye,RegExp),I=ye.unicode,M=(ye.ignoreCase?"i":"")+(ye.multiline?"m":"")+(ye.unicode?"u":"")+(K?"g":"y"),F=new J(K?"^(?:"+ye.source+")":ye,M),B=Ce===void 0?4294967295:Ce>>>0;if(B===0)return[];if(H.length===0)return L(F,H)===null?[H]:[];for(var X=0,ee=0,Z=[];ee<H.length;){F.lastIndex=K?0:ee;var $,pe=L(F,K?V(H,ee):H);if(pe===null||($=G(T(F.lastIndex+(K?ee:0)),H.length))===X)ee=S(H,ee,I);else{if(k(Z,V(H,X,ee)),Z.length===B)return Z;for(var be=1;be<=pe.length-1;be++)if(k(Z,pe[be]),Z.length===B)return Z;ee=X=$}}return k(Z,V(H,X)),Z}]},te||!z,K)},2762:function(d,p,u){var g=u(6518),m=u(3802).trim;g({target:"String",proto:!0,forced:u(706)("trim")},{trim:function(){return m(this)}})},6761:function(d,p,u){var g=u(6518),m=u(4475),y=u(9565),w=u(9504),b=u(6395),E=u(3724),C=u(4495),S=u(9039),T=u(9297),P=u(1625),N=u(8551),L=u(5397),U=u(6969),j=u(655),K=u(6980),G=u(2360),k=u(1072),V=u(8480),z=u(298),te=u(3717),re=u(7347),ne=u(4913),se=u(6801),we=u(8773),le=u(6840),Ce=u(2106),ye=u(5745),H=u(6119),W=u(421),J=u(3392),I=u(8227),M=u(1951),F=u(511),B=u(8242),X=u(687),ee=u(1181),Z=u(9213).forEach,$=H("hidden"),pe="Symbol",be="prototype",fe=ee.set,he=ee.getterFor(pe),ve=Object[be],ue=m.Symbol,Be=ue&&ue[be],Re=m.RangeError,at=m.TypeError,xe=m.QObject,De=re.f,Pe=ne.f,ot=z.f,Ze=we.f,Ot=w([].push),Le=ye("symbols"),_e=ye("op-symbols"),$t=ye("wks"),Ht=!xe||!xe[be]||!xe[be].findChild,Cn=function(He,$e,Xe){var pt=De(ve,$e);pt&&delete ve[$e],Pe(He,$e,Xe),pt&&He!==ve&&Pe(ve,$e,pt)},Yn=E&&S(function(){return G(Pe({},"a",{get:function(){return Pe(this,"a",{value:7}).a}})).a!==7})?Cn:Pe,Zr=function(He,$e){var Xe=Le[He]=G(Be);return fe(Xe,{type:pe,tag:He,description:$e}),E||(Xe.description=$e),Xe},Nn=function(He,$e,Xe){He===ve&&Nn(_e,$e,Xe),N(He);var pt=U($e);return N(Xe),T(Le,pt)?(Xe.enumerable?(T(He,$)&&He[$][pt]&&(He[$][pt]=!1),Xe=G(Xe,{enumerable:K(0,!1)})):(T(He,$)||Pe(He,$,K(1,G(null))),He[$][pt]=!0),Yn(He,pt,Xe)):Pe(He,pt,Xe)},Kn=function(He,$e){N(He);var Xe=L($e),pt=k(Xe).concat(eo(Xe));return Z(pt,function(Wt){E&&!y(yn,Xe,Wt)||Nn(He,Wt,Xe[Wt])}),He},yn=function(He){var $e=U(He),Xe=y(Ze,this,$e);return!(this===ve&&T(Le,$e)&&!T(_e,$e))&&(!(Xe||!T(this,$e)||!T(Le,$e)||T(this,$)&&this[$][$e])||Xe)},an=function(He,$e){var Xe=L(He),pt=U($e);if(Xe!==ve||!T(Le,pt)||T(_e,pt)){var Wt=De(Xe,pt);return!Wt||!T(Le,pt)||T(Xe,$)&&Xe[$][pt]||(Wt.enumerable=!0),Wt}},sr=function(He){var $e=ot(L(He)),Xe=[];return Z($e,function(pt){T(Le,pt)||T(W,pt)||Ot(Xe,pt)}),Xe},eo=function(He){var $e=He===ve,Xe=ot($e?_e:L(He)),pt=[];return Z(Xe,function(Wt){!T(Le,Wt)||$e&&!T(ve,Wt)||Ot(pt,Le[Wt])}),pt};C||(ue=function(){if(P(Be,this))throw new at("Symbol is not a constructor");var He=arguments.length&&arguments[0]!==void 0?j(arguments[0]):void 0,$e=J(He),Xe=function(pt){var Wt=this===void 0?m:this;Wt===ve&&y(Xe,_e,pt),T(Wt,$)&&T(Wt[$],$e)&&(Wt[$][$e]=!1);var Ca=K(1,pt);try{Yn(Wt,$e,Ca)}catch(xi){if(!(xi instanceof Re))throw xi;Cn(Wt,$e,Ca)}};return E&&Ht&&Yn(ve,$e,{configurable:!0,set:Xe}),Zr($e,He)},le(Be=ue[be],"toString",function(){return he(this).tag}),le(ue,"withoutSetter",function(He){return Zr(J(He),He)}),we.f=yn,ne.f=Nn,se.f=Kn,re.f=an,V.f=z.f=sr,te.f=eo,M.f=function(He){return Zr(I(He),He)},E&&(Ce(Be,"description",{configurable:!0,get:function(){return he(this).description}}),b||le(ve,"propertyIsEnumerable",yn,{unsafe:!0}))),g({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:ue}),Z(k($t),function(He){F(He)}),g({target:pe,stat:!0,forced:!C},{useSetter:function(){Ht=!0},useSimple:function(){Ht=!1}}),g({target:"Object",stat:!0,forced:!C,sham:!E},{create:function(He,$e){return $e===void 0?G(He):Kn(G(He),$e)},defineProperty:Nn,defineProperties:Kn,getOwnPropertyDescriptor:an}),g({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:sr}),B(),X(ue,pe),W[$]=!0},9463:function(d,p,u){var g=u(6518),m=u(3724),y=u(4475),w=u(9504),b=u(9297),E=u(4901),C=u(1625),S=u(655),T=u(2106),P=u(7740),N=y.Symbol,L=N&&N.prototype;if(m&&E(N)&&(!("description"in L)||N().description!==void 0)){var U={},j=function(){var re=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),ne=C(L,this)?new N(re):re===void 0?N():N(re);return re===""&&(U[ne]=!0),ne};P(j,N),j.prototype=L,L.constructor=j;var K=String(N("description detection"))==="Symbol(description detection)",G=w(L.valueOf),k=w(L.toString),V=/^Symbol\((.*)\)[^)]+$/,z=w("".replace),te=w("".slice);T(L,"description",{configurable:!0,get:function(){var re=G(this);if(b(U,re))return"";var ne=k(re),se=K?te(ne,7,-1):z(ne,V,"$1");return se===""?void 0:se}}),g({global:!0,constructor:!0,forced:!0},{Symbol:j})}},1510:function(d,p,u){var g=u(6518),m=u(7751),y=u(9297),w=u(655),b=u(5745),E=u(1296),C=b("string-to-symbol-registry"),S=b("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!E},{for:function(T){var P=w(T);if(y(C,P))return C[P];var N=m("Symbol")(P);return C[P]=N,S[N]=P,N}})},2259:function(d,p,u){u(511)("iterator")},2675:function(d,p,u){u(6761),u(1510),u(7812),u(3110),u(9773)},7812:function(d,p,u){var g=u(6518),m=u(9297),y=u(757),w=u(6823),b=u(5745),E=u(1296),C=b("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!E},{keyFor:function(S){if(!y(S))throw new TypeError(w(S)+" is not a symbol");if(m(C,S))return C[S]}})},5700:function(d,p,u){var g=u(511),m=u(8242);g("toPrimitive"),m()},8344:function(d,p,u){u(8543)},3500:function(d,p,u){var g=u(4475),m=u(7400),y=u(9296),w=u(235),b=u(6699),E=function(S){if(S&&S.forEach!==w)try{b(S,"forEach",w)}catch{S.forEach=w}};for(var C in m)m[C]&&E(g[C]&&g[C].prototype);E(y)},2953:function(d,p,u){var g=u(4475),m=u(7400),y=u(9296),w=u(3792),b=u(6699),E=u(687),C=u(8227)("iterator"),S=w.values,T=function(N,L){if(N){if(N[C]!==S)try{b(N,C,S)}catch{N[C]=S}if(E(N,L,!0),m[L]){for(var U in w)if(N[U]!==w[U])try{b(N,U,w[U])}catch{N[U]=w[U]}}}};for(var P in m)T(g[P]&&g[P].prototype,P);T(y,"DOMTokenList")}},l={};function f(d){var p=l[d];if(p!==void 0)return p.exports;var u=l[d]={exports:{}};return c[d].call(u.exports,u,u.exports,f),u.exports}f.d=function(d,p){for(var u in p)f.o(p,u)&&!f.o(d,u)&&Object.defineProperty(d,u,{enumerable:!0,get:p[u]})},f.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),f.o=function(d,p){return Object.prototype.hasOwnProperty.call(d,p)},f.r=function(d){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})};var h={};return function(){function d(H){return function(W){if(Array.isArray(W))return u(W)}(H)||function(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}(H)||p(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
98
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(H,W){if(H){if(typeof H=="string")return u(H,W);var J=Object.prototype.toString.call(H).slice(8,-1);return J==="Object"&&H.constructor&&(J=H.constructor.name),J==="Map"||J==="Set"?Array.from(H):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?u(H,W):void 0}}function u(H,W){(W==null||W>H.length)&&(W=H.length);for(var J=0,I=new Array(W);J<W;J++)I[J]=H[J];return I}function g(H){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},g(H)}function m(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,w(I.key),I)}}function y(H,W,J){return(W=w(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function w(H){var W=function(J,I){if(g(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I||"default");if(g(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(J)}(H,"string");return g(W)=="symbol"?W:W+""}f.r(h),f.d(h,{SimpleKeyboard:function(){return Ce},default:function(){return ye}}),f(5276),f(8598),f(4782),f(4554),f(2010),f(7427),f(6099),f(7495),f(8781),f(5440),f(744),f(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(H){if("Element"in H){var W="classList",J="prototype",I=H.Element[J],M=Object,F=String[J].trim||function(){return this.replace(/^\s+|\s+$/g,"")},B=Array[J].indexOf||function(fe){for(var he=0,ve=this.length;he<ve;he++)if(he in this&&this[he]===fe)return he;return-1},X=function(fe,he){this.name=fe,this.code=DOMException[fe],this.message=he},ee=function(fe,he){if(he==="")throw new X("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(he))throw new X("INVALID_CHARACTER_ERR","The token must not contain space characters.");return B.call(fe,he)},Z=function(fe){for(var he=F.call(fe.getAttribute("class")||""),ve=he?he.split(/\s+/):[],ue=0,Be=ve.length;ue<Be;ue++)this.push(ve[ue]);this._updateClassName=function(){fe.setAttribute("class",this.toString())}},$=Z[J]=[],pe=function(){return new Z(this)};if(X[J]=Error[J],$.item=function(fe){return this[fe]||null},$.contains=function(fe){return~ee(this,fe+"")},$.add=function(){var fe,he=arguments,ve=0,ue=he.length,Be=!1;do~ee(this,fe=he[ve]+"")||(this.push(fe),Be=!0);while(++ve<ue);Be&&this._updateClassName()},$.remove=function(){var fe,he,ve=arguments,ue=0,Be=ve.length,Re=!1;do for(he=ee(this,fe=ve[ue]+"");~he;)this.splice(he,1),Re=!0,he=ee(this,fe);while(++ue<Be);Re&&this._updateClassName()},$.toggle=function(fe,he){var ve=this.contains(fe),ue=ve?he!==!0&&"remove":he!==!1&&"add";return ue&&this[ue](fe),he===!0||he===!1?he:!ve},$.replace=function(fe,he){var ve=ee(fe+"");~ve&&(this.splice(ve,1,he),this._updateClassName())},$.toString=function(){return this.join(" ")},M.defineProperty){var be={get:pe,enumerable:!0,configurable:!0};try{M.defineProperty(I,W,be)}catch(fe){fe.number!==void 0&&fe.number!==-2146823252||(be.enumerable=!1,M.defineProperty(I,W,be))}}else M[J].__defineGetter__&&I.__defineGetter__(W,pe)}}(self),function(){var H=document.createElement("_");if(H.classList.add("c1","c2"),!H.classList.contains("c2")){var W=function(I){var M=DOMTokenList.prototype[I];DOMTokenList.prototype[I]=function(F){var B,X=arguments.length;for(B=0;B<X;B++)F=arguments[B],M.call(this,F)}};W("add"),W("remove")}if(H.classList.toggle("c3",!1),H.classList.contains("c3")){var J=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(I,M){return 1 in arguments&&!this.contains(I)==!M?M:J.call(this,I)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(I,M){var F=this.toString().split(" "),B=F.indexOf(I+"");~B&&(F=F.slice(B),this.remove.apply(this,F),this.add(M),this.add.apply(this,F.slice(1)))}),H=null}()),f(2675),f(9463),f(2259),f(5700),f(8706),f(2008),f(3418),f(4423),f(3792),f(2062),f(6910),f(739),f(9572),f(2892),f(9085),f(3851),f(1278),f(9432),f(4864),f(1699),f(7764),f(8344),f(3500),f(2953),f(2712),f(2637),f(1480),f(1761);var b=function(){return H=function I(M){var F=M.getOptions,B=M.getCaretPosition,X=M.getCaretPositionEnd,ee=M.dispatch;(function(Z,$){if(!(Z instanceof $))throw new TypeError("Cannot call a class as a function")})(this,I),y(this,"getOptions",void 0),y(this,"getCaretPosition",void 0),y(this,"getCaretPositionEnd",void 0),y(this,"dispatch",void 0),y(this,"maxLengthReached",void 0),y(this,"isStandardButton",function(Z){return Z&&!(Z[0]==="{"&&Z[Z.length-1]==="}")}),this.getOptions=F,this.getCaretPosition=B,this.getCaretPositionEnd=X,this.dispatch=ee,I.bindMethods(I,this)},W=[{key:"getButtonType",value:function(I){return I.includes("{")&&I.includes("}")&&I!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(I){var M=this.getButtonType(I),F=I.replace("{","").replace("}",""),B="";return M!=="standardBtn"&&(B=" hg-button-".concat(F)),"hg-".concat(M).concat(B)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(I,M){return(M=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),M):M||this.getDefaultDiplay())[I]||I}},{key:"getUpdatedInput",value:function(I,M,F){var B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:F,X=arguments.length>4&&arguments[4]!==void 0&&arguments[4],ee=this.getOptions(),Z=[F,B,X],$=M;return(I==="{bksp}"||I==="{backspace}")&&$.length>0?$=this.removeAt.apply(this,[$].concat(Z)):(I==="{delete}"||I==="{forwarddelete}")&&$.length>0?$=this.removeForwardsAt.apply(this,[$].concat(Z)):I==="{space}"?$=this.addStringAt.apply(this,[$," "].concat(Z)):I!=="{tab}"||typeof ee.tabCharOnTab=="boolean"&&ee.tabCharOnTab===!1?I!=="{enter}"&&I!=="{numpadenter}"||!ee.newLineOnEnter?I.includes("numpad")&&Number.isInteger(Number(I[I.length-2]))?$=this.addStringAt.apply(this,[$,I[I.length-2]].concat(Z)):I==="{numpaddivide}"?$=this.addStringAt.apply(this,[$,"/"].concat(Z)):I==="{numpadmultiply}"?$=this.addStringAt.apply(this,[$,"*"].concat(Z)):I==="{numpadsubtract}"?$=this.addStringAt.apply(this,[$,"-"].concat(Z)):I==="{numpadadd}"?$=this.addStringAt.apply(this,[$,"+"].concat(Z)):I==="{numpaddecimal}"?$=this.addStringAt.apply(this,[$,"."].concat(Z)):I==="{"||I==="}"?$=this.addStringAt.apply(this,[$,I].concat(Z)):I.includes("{")||I.includes("}")||($=this.addStringAt.apply(this,[$,I].concat(Z))):$=this.addStringAt.apply(this,[$,`
|
|
99
|
-
`].concat(Z)):$=this.addStringAt.apply(this,[$," "].concat(Z)),ee.debug&&console.log("Input will be: "+$),$}},{key:"updateCaretPos",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],F=this.updateCaretPosAction(I,M);this.dispatch(function(B){B.setCaretPosition(F)})}},{key:"updateCaretPosAction",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],F=this.getOptions(),B=this.getCaretPosition();return B!=null&&(M?B>0&&(B-=I):B+=I),F.debug&&console.log("Caret at:",B),B}},{key:"addStringAt",value:function(I,M){var F,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I.length,ee=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return B||B===0?(F=[I.slice(0,B),M,I.slice(X)].join(""),this.isMaxLengthReached()||ee&&this.updateCaretPos(M.length)):F=I+M,F}},{key:"removeAt",value:function(I){var M,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(F===0&&B===0)return I;if(F===B){var ee=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;F&&F>=0?I.substring(F-2,F).match(ee)?(M=I.substr(0,F-2)+I.substr(F),X&&this.updateCaretPos(2,!0)):(M=I.substr(0,F-1)+I.substr(F),X&&this.updateCaretPos(1,!0)):I.slice(-2).match(ee)?(M=I.slice(0,-2),X&&this.updateCaretPos(2,!0)):(M=I.slice(0,-1),X&&this.updateCaretPos(1,!0))}else M=I.slice(0,F)+I.slice(B),X&&this.dispatch(function(Z){Z.setCaretPosition(F)});return M}},{key:"removeForwardsAt",value:function(I){var M,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return I!=null&&I.length&&F!==null?(F===B?M=I.substring(F,F+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?I.substr(0,F)+I.substr(F+2):I.substr(0,F)+I.substr(F+1):(M=I.slice(0,F)+I.slice(B),X&&this.dispatch(function(ee){ee.setCaretPosition(F)})),M):I}},{key:"handleMaxLength",value:function(I,M){var F=this.getOptions(),B=F.maxLength,X=I[F.inputName||"default"],ee=M.length-1>=B;if(M.length<=X.length)return!1;if(Number.isInteger(B))return F.debug&&console.log("maxLength (num) reached:",ee),ee?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(g(B)==="object"){var Z=M.length-1>=B[F.inputName||"default"];return F.debug&&console.log("maxLength (obj) reached:",Z),Z?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(I){return I?I.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(M,F){return F.length?M+F[0].toUpperCase()+F.slice(1):M}):""}},{key:"chunkArray",value:function(I,M){return d(Array(Math.ceil(I.length/M))).map(function(F,B){return I.slice(M*B,M+M*B)})}},{key:"escapeRegex",value:function(I){return I.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(I,M){var F=I,B=M.indexOf("");return B<I&&B!=-1&&F--,M.indexOf("")<I&&B!=-1&&F--,F<0?0:F}}],J=[{key:"bindMethods",value:function(I,M){var F,B=function(ee,Z){var $=typeof Symbol<"u"&&ee[Symbol.iterator]||ee["@@iterator"];if(!$){if(Array.isArray(ee)||($=p(ee))||Z){$&&(ee=$);var pe=0,be=function(){};return{s:be,n:function(){return pe>=ee.length?{done:!0}:{done:!1,value:ee[pe++]}},e:function(ue){throw ue},f:be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
100
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fe,he=!0,ve=!1;return{s:function(){$=$.call(ee)},n:function(){var ue=$.next();return he=ue.done,ue},e:function(ue){ve=!0,fe=ue},f:function(){try{he||$.return==null||$.return()}finally{if(ve)throw fe}}}}(Object.getOwnPropertyNames(I.prototype));try{for(B.s();!(F=B.n()).done;){var X=F.value;X==="constructor"||X==="bindMethods"||(M[X]=M[X].bind(M))}}catch(ee){B.e(ee)}finally{B.f()}}}],W&&m(H.prototype,W),J&&m(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}();y(b,"noop",function(){});var E=b;function C(H){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},C(H)}function S(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,P(I.key),I)}}function T(H,W,J){return(W=P(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function P(H){var W=function(J,I){if(C(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(C(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return C(W)=="symbol"?W:W+""}var N=function(){return H=function I(M){var F=this,B=M.dispatch,X=M.getOptions;(function(ee,Z){if(!(ee instanceof Z))throw new TypeError("Cannot call a class as a function")})(this,I),T(this,"getOptions",void 0),T(this,"dispatch",void 0),T(this,"isModifierKey",function(ee){return ee.altKey||ee.ctrlKey||ee.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(ee.code||ee.key||F.keyCodeToKey(ee==null?void 0:ee.keyCode))}),this.dispatch=B,this.getOptions=X,E.bindMethods(I,this)},(W=[{key:"handleHighlightKeyDown",value:function(I){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var F=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(B){var X,ee,Z=B.getButtonElement(F),$=B.getButtonElement("{".concat(F,"}"));if(Z)X=Z,ee=F;else{if(!$)return;X=$,ee="{".concat(F,"}")}var pe,be,fe,he,ve=function(Be){Be.style.background=M.physicalKeyboardHighlightBgColor||"#dadce4",Be.style.color=M.physicalKeyboardHighlightTextColor||"black"};if(X)if(Array.isArray(X)){if(X.forEach(function(Be){return ve(Be)}),M.physicalKeyboardHighlightPress)if(M.physicalKeyboardHighlightPressUsePointerEvents)(pe=X[0])===null||pe===void 0||(be=pe.onpointerdown)===null||be===void 0||be.call(pe,I);else if(M.physicalKeyboardHighlightPressUseClick){var ue;(ue=X[0])===null||ue===void 0||ue.click()}else B.handleButtonClicked(ee,I)}else ve(X),M.physicalKeyboardHighlightPress&&(M.physicalKeyboardHighlightPressUsePointerEvents?(fe=X)===null||fe===void 0||(he=fe.onpointerdown)===null||he===void 0||he.call(fe,I):M.physicalKeyboardHighlightPressUseClick?X.click():B.handleButtonClicked(ee,I))})}},{key:"handleHighlightKeyUp",value:function(I){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var F=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(B){var X,ee,Z,$=B.getButtonElement(F)||B.getButtonElement("{".concat(F,"}")),pe=function(be){be.removeAttribute&&be.removeAttribute("style")};$&&(Array.isArray($)?($.forEach(function(be){return pe(be)}),M.physicalKeyboardHighlightPressUsePointerEvents&&((X=$[0])===null||X===void 0||(ee=X.onpointerup)===null||ee===void 0||ee.call(X,I))):(pe($),M.physicalKeyboardHighlightPressUsePointerEvents&&($==null||(Z=$.onpointerup)===null||Z===void 0||Z.call($,I))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(I){var M,F="",B=I.code||I.key||this.keyCodeToKey(I==null?void 0:I.keyCode);return(F=B!=null&&B.includes("Numpad")||B!=null&&B.includes("Shift")||B!=null&&B.includes("Space")||B!=null&&B.includes("Backspace")||B!=null&&B.includes("Control")||B!=null&&B.includes("Alt")||B!=null&&B.includes("Meta")?I.code||"":I.key||this.keyCodeToKey(I==null?void 0:I.keyCode)||"").length>1?(M=F)===null||M===void 0?void 0:M.toLowerCase():F}},{key:"keyCodeToKey",value:function(I){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[I]||""}}])&&S(H.prototype,W),J&&S(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}();function L(H){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},L(H)}function U(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,K(I.key),I)}}function j(H,W,J){return(W=K(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function K(H){var W=function(J,I){if(L(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(L(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return L(W)=="symbol"?W:W+""}var G=function(){return H=function I(M){var F=M.utilities,B=M.options;(function(X,ee){if(!(X instanceof ee))throw new TypeError("Cannot call a class as a function")})(this,I),j(this,"utilities",void 0),j(this,"options",void 0),j(this,"candidateBoxElement",void 0),j(this,"pageIndex",0),j(this,"pageSize",void 0),this.utilities=F,this.options=B,E.bindMethods(I,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},W=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(I){var M=this,F=I.candidateValue,B=I.targetElement,X=I.onSelect;if(F&&F.length){var ee=this.utilities.chunkArray(F.split(" "),this.pageSize);this.renderPage({candidateListPages:ee,targetElement:B,pageIndex:this.pageIndex,nbPages:ee.length,onItemSelected:function(Z,$){X(Z,$),M.destroy()}})}}},{key:"renderPage",value:function(I){var M,F=this,B=I.candidateListPages,X=I.targetElement,ee=I.pageIndex,Z=I.nbPages,$=I.onItemSelected;(M=this.candidateBoxElement)===null||M===void 0||M.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var pe=document.createElement("ul");pe.className="hg-candidate-box-list",B[ee].forEach(function(Re){var at,xe=document.createElement("li"),De=function(){var Pe=new(F.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(Pe,"target",{value:xe}),Pe};xe.className="hg-candidate-box-list-item",xe.innerHTML=((at=F.options.display)===null||at===void 0?void 0:at[Re])||Re,F.options.useTouchEvents?xe.ontouchstart=function(Pe){return $(Re,Pe||De())}:xe.onclick=function(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:De();return $(Re,Pe)},pe.appendChild(xe)});var be=ee>0,fe=document.createElement("div");fe.classList.add("hg-candidate-box-prev"),be&&fe.classList.add("hg-candidate-box-btn-active");var he=function(){be&&F.renderPage({candidateListPages:B,targetElement:X,pageIndex:ee-1,nbPages:Z,onItemSelected:$})};this.options.useTouchEvents?fe.ontouchstart=he:fe.onclick=he,this.candidateBoxElement.appendChild(fe),this.candidateBoxElement.appendChild(pe);var ve=ee<Z-1,ue=document.createElement("div");ue.classList.add("hg-candidate-box-next"),ve&&ue.classList.add("hg-candidate-box-btn-active");var Be=function(){ve&&F.renderPage({candidateListPages:B,targetElement:X,pageIndex:ee+1,nbPages:Z,onItemSelected:$})};this.options.useTouchEvents?ue.ontouchstart=Be:ue.onclick=Be,this.candidateBoxElement.appendChild(ue),X.prepend(this.candidateBoxElement)}}],W&&U(H.prototype,W),J&&U(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}(),k=G;function V(H){return function(W){if(Array.isArray(W))return z(W)}(H)||function(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}(H)||function(W,J){if(W){if(typeof W=="string")return z(W,J);var I=Object.prototype.toString.call(W).slice(8,-1);return I==="Object"&&W.constructor&&(I=W.constructor.name),I==="Map"||I==="Set"?Array.from(W):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?z(W,J):void 0}}(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
101
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z(H,W){(W==null||W>H.length)&&(W=H.length);for(var J=0,I=new Array(W);J<W;J++)I[J]=H[J];return I}function te(H){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},te(H)}function re(H,W){var J=Object.keys(H);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(H);W&&(I=I.filter(function(M){return Object.getOwnPropertyDescriptor(H,M).enumerable})),J.push.apply(J,I)}return J}function ne(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,we(I.key),I)}}function se(H,W,J){return(W=we(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function we(H){var W=function(J,I){if(te(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(te(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return te(W)=="symbol"?W:W+""}var le=function(){return H=function I(M,F){var B=this;if(function(he,ve){if(!(he instanceof ve))throw new TypeError("Cannot call a class as a function")}(this,I),se(this,"input",void 0),se(this,"options",void 0),se(this,"utilities",void 0),se(this,"caretPosition",void 0),se(this,"caretPositionEnd",void 0),se(this,"keyboardDOM",void 0),se(this,"keyboardPluginClasses",void 0),se(this,"keyboardDOMClass",void 0),se(this,"buttonElements",void 0),se(this,"currentInstanceName",void 0),se(this,"allKeyboardInstances",void 0),se(this,"keyboardInstanceNames",void 0),se(this,"isFirstKeyboardInstance",void 0),se(this,"physicalKeyboard",void 0),se(this,"modules",void 0),se(this,"activeButtonClass",void 0),se(this,"holdInteractionTimeout",void 0),se(this,"holdTimeout",void 0),se(this,"isMouseHold",void 0),se(this,"initialized",void 0),se(this,"candidateBox",void 0),se(this,"keyboardRowsDOM",void 0),se(this,"defaultName","default"),se(this,"activeInputElement",null),se(this,"handleParams",function(he,ve){var ue,Be,Re;if(typeof he=="string")ue=he.split(".").join(""),Be=document.querySelector(".".concat(ue)),Re=ve;else if(he instanceof HTMLDivElement){if(!he.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ue=he.className.split(" ")[0],Be=he,Re=ve}else ue="simple-keyboard",Be=document.querySelector(".".concat(ue)),Re=he;return{keyboardDOMClass:ue,keyboardDOM:Be,options:Re}}),se(this,"getOptions",function(){return B.options}),se(this,"getCaretPosition",function(){return B.caretPosition}),se(this,"getCaretPositionEnd",function(){return B.caretPositionEnd}),se(this,"registerModule",function(he,ve){B.modules[he]||(B.modules[he]={}),ve(B.modules[he])}),se(this,"getKeyboardClassString",function(){for(var he=arguments.length,ve=new Array(he),ue=0;ue<he;ue++)ve[ue]=arguments[ue];return[B.keyboardDOMClass].concat(ve).filter(function(Be){return!!Be}).join(" ")}),typeof window<"u"){var X=this.handleParams(M,F),ee=X.keyboardDOMClass,Z=X.keyboardDOM,$=X.options,pe=$===void 0?{}:$;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Z,this.options=function(he){for(var ve=1;ve<arguments.length;ve++){var ue=arguments[ve]!=null?arguments[ve]:{};ve%2?re(Object(ue),!0).forEach(function(Be){se(he,Be,ue[Be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(he,Object.getOwnPropertyDescriptors(ue)):re(Object(ue)).forEach(function(Be){Object.defineProperty(he,Be,Object.getOwnPropertyDescriptor(ue,Be))})}return he}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(I,this);var be=this.options.inputName,fe=be===void 0?this.defaultName:be;if(this.input={},this.input[fe]="",this.keyboardDOMClass=ee,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new k({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(ee,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},W=[{key:"setCaretPosition",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I;this.caretPosition=I,this.caretPositionEnd=M}},{key:"getInputCandidates",value:function(I){var M=this,F=this.options,B=F.layoutCandidates,X=F.layoutCandidatesCaseSensitiveMatch;if(!B||te(B)!=="object")return{};var ee=Object.keys(B).filter(function(pe){var be=I.substring(0,M.getCaretPositionEnd()||0)||I,fe=new RegExp("".concat(M.utilities.escapeRegex(pe),"$"),X?"g":"gi");return!!V(be.matchAll(fe)).length});if(ee.length>1){var Z=ee.sort(function(pe,be){return be.length-pe.length})[0];return{candidateKey:Z,candidateValue:B[Z]}}if(ee.length){var $=ee[0];return{candidateKey:$,candidateValue:B[$]}}return{}}},{key:"showCandidatesBox",value:function(I,M,F){var B=this;this.candidateBox&&this.candidateBox.show({candidateValue:M,targetElement:F,onSelect:function(X,ee){var Z=B.options,$=Z.layoutCandidatesCaseSensitiveMatch,pe=Z.disableCandidateNormalization,be=Z.enableLayoutCandidatesKeyPress,fe=X;pe||(fe=X.normalize("NFD")),typeof B.options.beforeInputUpdate=="function"&&B.options.beforeInputUpdate(B);var he=B.getInput(B.options.inputName,!0),ve=B.getCaretPositionEnd()||0,ue=he.substring(0,ve||0)||he,Be=new RegExp("".concat(B.utilities.escapeRegex(I),"$"),$?"g":"gi"),Re=ue.replace(Be,fe),at=he.replace(ue,Re),xe=Re.length-ue.length,De=(ve||he.length)+xe;De<0&&(De=0),B.setInput(at,B.options.inputName,!0),B.setCaretPosition(De),be&&typeof B.options.onKeyPress=="function"&&B.options.onKeyPress(X,ee),typeof B.options.onChange=="function"&&B.options.onChange(B.getInput(B.options.inputName,!0),ee),typeof B.options.onChangeAll=="function"&&B.options.onChangeAll(B.getAllInputs(),ee)}})}},{key:"handleButtonClicked",value:function(I,M){var F=this.options,B=F.inputName,X=B===void 0?this.defaultName:B,ee=F.debug;if(I!=="{//}"){this.input[X]||(this.input[X]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Z=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(I)&&this.activeInputElement&&this.input[X]&&this.input[X]===Z&&this.caretPosition===0&&this.caretPositionEnd===Z.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(I,M);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(I,M),this.input[X]!==Z&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Z))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Z))return;var $=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput($,this.options.inputName,!0),ee&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),M==null?void 0:M.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),M),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),M),M!=null&&M.target&&this.options.enableLayoutCandidates){var pe,be=this.getInputCandidates(Z),fe=be.candidateKey,he=be.candidateValue;fe&&he?this.showCandidatesBox(fe,he,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),ee&&console.log("Key pressed:",I)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(I){this.options.syncInstanceInputs?this.dispatch(function(M){M.isMouseHold=I}):this.isMouseHold=I}},{key:"handleButtonMouseDown",value:function(I,M){var F=this;M&&(this.options.preventMouseDownDefault&&M.preventDefault(),this.options.stopMouseDownPropagation&&M.stopPropagation(),M.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(F.getMouseHold()&&(!I.includes("{")&&!I.includes("}")||I==="{delete}"||I==="{backspace}"||I==="{bksp}"||I==="{space}"||I==="{tab}")||I==="{arrowright}"||I==="{arrowleft}"||I==="{arrowup}"||I==="{arrowdown}")&&(F.options.debug&&console.log("Button held:",I),F.handleButtonHold(I)),clearTimeout(F.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(I,M){var F=this;M&&(this.options.preventMouseUpDefault&&M.preventDefault&&M.preventDefault(),this.options.stopMouseUpPropagation&&M.stopPropagation&&M.stopPropagation(),!(M.target===this.keyboardDOM||M.target&&this.keyboardDOM.contains(M.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(M.target===this.candidateBox.candidateBoxElement||M.target&&this.candidateBox.candidateBoxElement.contains(M.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(B){B.classList.remove(F.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),I&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(I,M)}},{key:"handleKeyboardContainerMouseDown",value:function(I){this.options.preventMouseDownDefault&&I.preventDefault()}},{key:"handleButtonHold",value:function(I){var M=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){M.getMouseHold()?(M.handleButtonClicked(I),M.handleButtonHold(I)):clearTimeout(M.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var I=this;this.dispatch(function(M){M.replaceInput(I.input),M.setCaretPosition(I.caretPosition,I.caretPositionEnd)})}},{key:"clearInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[I]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,M=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!M&&this.syncInstanceInputs(),this.options.rtl?""+this.input[I].replace("","").replace("","")+"":this.input[I]}},{key:"getAllInputs",value:function(){var I=this,M={};return Object.keys(this.input).forEach(function(F){M[F]=I.getInput(F,!0)}),M}},{key:"setInput",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,F=arguments.length>2?arguments[2]:void 0;this.input[M]=I,!F&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(I){this.input=I}},{key:"setOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=this.changedOptions(I);this.options=Object.assign(this.options,I),M.length&&(this.options.debug&&console.log("changedOptions",M),this.onSetOptions(M),this.render())}},{key:"changedOptions",value:function(I){var M=this;return Object.keys(I).filter(function(F){return JSON.stringify(I[F])!==JSON.stringify(M.options[F])})}},{key:"onSetOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];I.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(I.includes("layoutCandidatesPageSize")||I.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new k({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(I){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(M){I(window.SimpleKeyboardInstances[M],M)})}},{key:"addButtonTheme",value:function(I,M){var F=this;M&&I&&(I.split(" ").forEach(function(B){M.split(" ").forEach(function(X){F.options.buttonTheme||(F.options.buttonTheme=[]);var ee=!1;F.options.buttonTheme.map(function(Z){if(Z!=null&&Z.class.split(" ").includes(X)){ee=!0;var $=Z.buttons.split(" ");$.includes(B)||(ee=!0,$.push(B),Z.buttons=$.join(" "))}return Z}),ee||F.options.buttonTheme.push({class:X,buttons:I})})}),this.render())}},{key:"removeButtonTheme",value:function(I,M){var F=this;if(!I&&!M)return this.options.buttonTheme=[],void this.render();I&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(I.split(" ").forEach(function(B){var X;(X=F.options)===null||X===void 0||(X=X.buttonTheme)===null||X===void 0||X.map(function(ee,Z){if(ee&&M&&M.includes(ee.class)||!M){var $,pe,be=($=ee)===null||$===void 0?void 0:$.buttons.split(" ").filter(function(fe){return fe!==B});ee&&be!=null&&be.length?ee.buttons=be.join(" "):((pe=F.options.buttonTheme)===null||pe===void 0||pe.splice(Z,1),ee=null)}return ee})}),this.render())}},{key:"getButtonElement",value:function(I){var M,F=this.buttonElements[I];return F&&(M=F.length>1?F:F[0]),M}},{key:"inputPatternIsValid",value:function(I){var M,F=this.options.inputPattern;if((M=F instanceof RegExp?F:F[this.options.inputName||this.defaultName])&&I){var B=M.test(I);return this.options.debug&&console.log('inputPattern ("'.concat(M,'"): ').concat(B?"passed":"did not pass!")),B}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.addEventListener("keyup",this.handleKeyUp,M),document.addEventListener("keydown",this.handleKeyDown,M),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(I){this.caretEventHandler(I),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(I)}},{key:"handleKeyDown",value:function(I){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(I)}},{key:"handleMouseUp",value:function(I){this.caretEventHandler(I)}},{key:"handleTouchEnd",value:function(I){this.caretEventHandler(I)}},{key:"handleSelect",value:function(I){this.caretEventHandler(I)}},{key:"handleSelectionChange",value:function(I){navigator.userAgent.includes("Firefox")||this.caretEventHandler(I)}},{key:"caretEventHandler",value:function(I){var M,F=this;I.target.tagName&&(M=I.target.tagName.toLowerCase()),this.dispatch(function(B){var X=I.target===B.keyboardDOM||I.target&&B.keyboardDOM.contains(I.target);if(F.options.syncInstanceInputs&&Array.isArray(I.path)&&(X=I.path.some(function($){var pe;return $==null||(pe=$.hasAttribute)===null||pe===void 0?void 0:pe.call($,"data-skInstance")})),(M==="textarea"||M==="input"&&["text","search","url","tel","password"].includes(I.target.type))&&!B.options.disableCaretPositioning){var ee=I.target.selectionStart,Z=I.target.selectionEnd;B.options.rtl&&(ee=B.utilities.getRtlOffset(ee,B.getInput()),Z=B.utilities.getRtlOffset(Z,B.getInput())),B.setCaretPosition(ee,Z),F.activeInputElement=I.target,B.options.debug&&console.log("Caret at: ",B.getCaretPosition(),B.getCaretPositionEnd(),I&&I.target.tagName.toLowerCase(),"(".concat(B.keyboardDOMClass,")"),I==null?void 0:I.type)}else!B.options.disableCaretPositioning&&X||(I==null?void 0:I.type)==="selectionchange"||(B.setCaretPosition(null),F.activeInputElement=null,B.options.debug&&console.log('Caret position reset due to "'.concat(I==null?void 0:I.type,'" event'),I))})}},{key:"recurseButtons",value:function(I){var M=this;I&&Object.keys(this.buttonElements).forEach(function(F){return M.buttonElements[F].forEach(I)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.removeEventListener("keyup",this.handleKeyUp,M),document.removeEventListener("keydown",this.handleKeyDown,M),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(F){F&&(F.onpointerdown=null,F.onpointerup=null,F.onpointercancel=null,F.ontouchstart=null,F.ontouchend=null,F.ontouchcancel=null,F.onclick=null,F.onmousedown=null,F.onmouseup=null,F.remove(),F=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(I){var M=this.options.buttonTheme,F=[];return Array.isArray(M)&&M.forEach(function(B){if(B&&B.class&&typeof B.class=="string"&&B.buttons&&typeof B.buttons=="string"){var X=B.class.split(" ");B.buttons.split(" ").includes(I)&&(F=[].concat(V(F),V(X)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',B)}),F}},{key:"setDOMButtonAttributes",value:function(I,M){var F=this.options.buttonAttributes;Array.isArray(F)&&F.forEach(function(B){B.attribute&&typeof B.attribute=="string"&&B.value&&typeof B.value=="string"&&B.buttons&&typeof B.buttons=="string"?B.buttons.split(" ").includes(I)&&M(B.attribute,B.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',B)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(I){if(I.target.classList.contains("hg-button"))return I.preventDefault(),I.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var I=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(M){var F=new M(I);F.init&&F.init(I)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(I,M){return!!this.modules[I]&&this.modules[I][M]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(I,M,F,B){var X=this,ee=Array.from(I.children),Z=0;return ee.length&&F.forEach(function($,pe){var be=B[pe];if(!(be&&be>$))return!1;var fe=$-Z,he=be-Z,ve=document.createElement("div");ve.className+="hg-button-container";var ue="".concat(X.options.layoutName,"-r").concat(M,"c").concat(pe);ve.setAttribute("data-skUID",ue);var Be=ee.splice(fe,he-fe+1);Z=he-fe,Be.forEach(function(Re){return ve.appendChild(Re)}),ee.splice(fe,0,ve),I.innerHTML="",ee.forEach(function(Re){return I.appendChild(Re)}),X.options.debug&&console.log("rowDOMContainer",Be,fe,he,Z+1)}),I}},{key:"render",value:function(){var I=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var M="hg-layout-".concat(this.options.layoutName),F=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},B=this.options.useTouchEvents||!1,X=B?"hg-touch-events":"",ee=this.options.useMouseEvents||!1,Z=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,M,this.keyboardPluginClasses,X),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",F[this.options.layoutName||this.defaultName].forEach(function($,pe){var be=$.split(" ");I.options.excludeFromLayout&&I.options.excludeFromLayout[I.options.layoutName||I.defaultName]&&(be=be.filter(function(ue){return I.options.excludeFromLayout&&!I.options.excludeFromLayout[I.options.layoutName||I.defaultName].includes(ue)}));var fe=document.createElement("div");fe.className+="hg-row";var he=[],ve=[];be.forEach(function(ue,Be){var Re,at=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("[")===0,xe=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("]")===ue.length-1;at&&(he.push(Be),ue=ue.replace(/\[/g,"")),xe&&(ve.push(Be),ue=ue.replace(/\]/g,""));var De=I.utilities.getButtonClass(ue),Pe=I.utilities.getButtonDisplayName(ue,I.options.display,I.options.mergeDisplay),ot=I.options.useButtonTag?"button":"div",Ze=document.createElement(ot);Ze.className+="hg-button ".concat(De),(Re=Ze.classList).add.apply(Re,V(I.getButtonThemeClasses(ue))),I.setDOMButtonAttributes(ue,function(_e,$t){Ze.setAttribute(_e,$t)}),I.activeButtonClass="hg-activeButton",!I.utilities.pointerEventsSupported()||B||ee?B?(Ze.ontouchstart=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.ontouchend=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.ontouchcancel=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onclick=function(_e){I.setMouseHold(!1),typeof I.options.onKeyReleased!="function"&&I.handleButtonClicked(ue,_e)},Ze.onmousedown=function(_e){typeof I.options.onKeyReleased!="function"||I.isMouseHold||I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onmouseup=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onpointerdown=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onpointerup=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.onpointercancel=function(_e){I.handleButtonMouseUp(ue,_e)}),Ze.setAttribute("data-skBtn",ue);var Ot="".concat(I.options.layoutName,"-r").concat(pe,"b").concat(Be);Ze.setAttribute("data-skBtnUID",Ot);var Le=document.createElement("span");Le.innerHTML=Pe,Ze.appendChild(Le),I.buttonElements[ue]||(I.buttonElements[ue]=[]),I.buttonElements[ue].push(Ze),fe.appendChild(Ze)}),fe=I.parseRowDOMContainers(fe,pe,he,ve),I.keyboardRowsDOM.appendChild(fe)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||B||ee?B?(document.ontouchend=function($){return I.handleButtonMouseUp(void 0,$)},document.ontouchcancel=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.ontouchstart=function($){return I.handleKeyboardContainerMouseDown($)}):B||(document.onmouseup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onmousedown=function($){return I.handleKeyboardContainerMouseDown($)}):(document.onpointerup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onpointerdown=function($){return I.handleKeyboardContainerMouseDown($)}),this.onInit())}}],W&&ne(H.prototype,W),J&&ne(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}(),Ce=le,ye=le}(),h}()},442:function(s){s.exports=n}},o={};function i(s){var c=o[s];if(c!==void 0)return c.exports;var l=o[s]={exports:{}};return r[s].call(l.exports,l,l.exports,i),l.exports}i.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(c,{a:c}),c},i.d=function(s,c){for(var l in c)i.o(c,l)&&!i.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:c[l]})},i.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{KeyboardReact:function(){return g},default:function(){return m}}),i(981);var s=i(442),c=i(548),l=i.n(c);function f(y){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},f(y)}function h(y,w){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);w&&(E=E.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),b.push.apply(b,E)}return b}function d(y){for(var w=1;w<arguments.length;w++){var b=arguments[w]!=null?arguments[w]:{};w%2?h(Object(b),!0).forEach(function(E){p(y,E,b[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):h(Object(b)).forEach(function(E){Object.defineProperty(y,E,Object.getOwnPropertyDescriptor(b,E))})}return y}function p(y,w,b){var E;return E=function(C,S){if(f(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var P=T.call(C,S||"default");if(f(P)!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(w,"string"),(w=f(E)=="symbol"?E:E+"")in y?Object.defineProperty(y,w,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[w]=b,y}var u=function(y){return d(d({},y),{},{keyboardRef:null})},g=function(y){var w=y.baseClass||"react-simple-keyboard",b=s.useRef(null),E=s.useRef(null),C=s.useRef(null),S=s.useRef(y);return s.useEffect(function(){return function(){C.current&&C.current.destroy(),b.current=!1}},[]),s.useEffect(function(){var T=function(j){return d(d({},j),{},{theme:"simple-keyboard ".concat(j.theme||"hg-theme-default")})}(y);if(!b.current){b.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var P=E.current,N=".".concat(w);C.current=new(l())(P||N,T),T.keyboardRef&&T.keyboardRef(C.current)}var L=function(j,K){var G=u(K),k=u(j);return Object.keys(G).filter(function(V){return G[V]!==k[V]})}(S.current,T);if(L.length){var U=C.current;S.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",L)}},[b,w,S,y]),s.createElement("div",{className:w,ref:E})},m=g}(),a}()})})(F1);var d6=F1.exports;const f6=ll(d6);function j1({onChange:t,keyboardRef:e,layout:n,theme:r}){const[o,i]=x.useState("default"),a=s=>{(s==="{shift}"||s==="{lock}")&&i(o==="default"?"shift":"default")};return v.jsx(f6,{keyboardRef:s=>e.current=s,layoutName:o,layout:n,theme:r,onChange:t,onKeyPress:a,preventMouseDownDefault:!0})}function V1(){const{subscribe:t,unsubscribe:e,publish:n}=qa();return{initialize:(s,c)=>{t("openKeyboard",s),t("closeKeyboard",c)},terminate:(s,c)=>{e("openKeyboard",s),e("closeKeyboard",c)},open:s=>{n("openKeyboard",{inputId:s.target.id,inputValue:s.target.value})},close:()=>{n("closeKeyboard")}}}const fr="keyboard-custom-overlap-id";function h6({enabled:t}){const[e,n]=x.useState(!1),r=x.useRef(null),o=x.useRef(null),i=x.useRef(null),[a,s]=x.useState(),[c,l]=x.useState(0),{initialize:f,terminate:h}=V1(),d=w=>{var b,E;o.current=document.getElementById(w.detail.inputId),(b=r.current)==null||b.setInput(w.detail.inputValue),(E=o.current)==null||E.addEventListener("input",C=>{var T;const S=C.target;(T=r.current)==null||T.setInput(S==null?void 0:S.value)}),l(y()),n(!0)},p=()=>{l(0),n(!1)};x.useEffect(()=>(f(d,p),()=>{h(d,p)}),[e]);const u=w=>{var b,E;if(o&&o.current){g(o.current,w);const C=(b=r.current)==null?void 0:b.getCaretPosition();C&&((E=o.current)==null||E.setSelectionRange(C,C))}},g=(w,b)=>{var S;const E=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;E==null||E.call(w,b);const C=new Event("input",{bubbles:!0});w.dispatchEvent(C)},m=()=>{var w;if(!a){const b=(w=i.current)==null?void 0:w.getBoundingClientRect();return b&&b.x&&!a&&s(b),b}return a},y=()=>{var T;const w=document.querySelectorAll("#"+fr),b=m(),E=[...w].map(P=>P.getBoundingClientRect()),C=(T=o.current)==null?void 0:T.getBoundingClientRect();E.push(C),E.sort((P,N)=>P.bottom>N.bottom?-1:1);let S=0;return E.every(P=>{if(b&&b.top<P.bottom)return S=P.bottom-b.top+8,!1}),S};return t?v.jsx("div",{className:"relative",style:{height:c},children:v.jsx("div",{ref:i,className:`mobile:hidden absolute bottom-0 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&a&&"hidden"} ${!e&&!a&&"pointer-events-none opacity-0"}`,children:v.jsx(j1,{keyboardRef:r,onChange:u})})}):v.jsx(v.Fragment,{})}const oi=({id:t,name:e,label:n,description:r,required:o,type:i="text",value:a,placeholder:s,disabled:c,error:l=!1,helperText:f="",onChange:h,beforeIcon:d,afterIcon:p,autoFocus:u,onFocus:g,onBlur:m})=>{const[y,w]=x.useState(f),b=x.useRef(null),[E,C]=x.useState(!1),{open:S,close:T}=V1();x.useEffect(()=>()=>{T()},[]);const P=()=>{b.current&&w(b.current.validationMessage),C(!1),T(),m==null||m()},N=async K=>{C(!0),(async()=>S(K))().then(()=>{var k;return(k=b.current)==null?void 0:k.scrollIntoView({behavior:"smooth",block:"center"})}),g==null||g()},L=K=>{h==null||h(K)},U=x.useId(),j=t??U;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:r,disabled:c,htmlFor:j,required:o,children:n}),v.jsx("div",{className:Dn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!l&&"border-core-primary-500 ring-1 ring-core-primary-500",l&&"border-core-red-500",l&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[d&&v.jsx(In,{icon:d}),v.jsx("input",{type:i,id:j,name:e,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:a,onChange:L,onBlur:P,ref:b,placeholder:s,onFocus:N,disabled:c,autoFocus:u}),p&&v.jsx(In,{icon:p})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||y?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:l,helperText:f||y})})})]})};oi.displayName="Input";const U1=({id:t,name:e,label:n,required:r,description:o,placeholder:i,value:a,disabled:s,error:c=!1,helperText:l,onChange:f,type:h="date"})=>{const[d,p]=x.useState(!1),u=x.useId(),g=t??u;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:o,disabled:s,htmlFor:g,required:r,children:n}),v.jsx("div",{className:Dn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",s?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",d&&!c&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",c&&"border-core-red-500",c&&d&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[v.jsx("input",{type:h,id:g,name:e,value:a,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:i,onChange:f,onFocus:()=>p(!0),onBlur:()=>p(!1),disabled:s}),v.jsx(In,{icon:"calendar"})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${l?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:c,helperText:l})})})]})};U1.displayName="Input";function Tn({children:t}){return v.jsx("div",{className:"h-screen w-screen md:p-6",children:v.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:t})})}function Po({title:t,isOpen:e,onClose:n,primaryAction:r,secondaryAction:o,children:i}){const[a,s]=x.useState(e),c=x.useRef(null);x.useEffect(()=>{s(e)},[e]),x.useEffect(()=>{const h=c.current;h&&(a?h.show():h.close())},[a]);const l=()=>{n&&n(),s(!1)},f=h=>{h.key==="Escape"&&l()};return v.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${a?"flex":"hidden"}`,children:v.jsx("dialog",{ref:c,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:v.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t})})}),v.jsx(Mt,{children:i}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[r&&v.jsx(nt,{label:r.label??"",onClick:r.action,disabled:r.disabled,pending:r.loading}),o&&v.jsx(nt,{label:o.label??"",onClick:o.action,disabled:o.disabled,pending:o.loading,variant:"secondary"})]})})]})})})}function p6({option:{label:t},checked:e,onChange:n}){return v.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[v.jsx(Oc,{defaultChecked:e,onChange:n}),v.jsx("p",{children:t})]})}function g6(t){const{t:e}=Ve(),n=x.useRef(null),[r,o]=x.useState(!1);L1(n,o);const[i,a]=x.useState(""),[s,c]=x.useState(t.value.split(";")),{name:l,onChange:f}=t,h=(d,p)=>{let u=[];d?u=[...s,p]:u=s.filter(g=>g!==p),c(u),f&&f(l??"",u.join(";"))};return v.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsxs("div",{className:"relative",children:[v.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${t.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!t.disabled&&o(!r),children:[v.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${t.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:s.map(d=>{var u;const p=(u=t.options.find(g=>g.value===d))==null?void 0:u.label;return v.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[v.jsx("p",{className:"truncate",children:p}),v.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,d),children:v.jsx(In,{icon:"close"})})]},d)})}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),v.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[t.options.length>6&&v.jsx("div",{className:"px-4",children:v.jsx(oi,{placeholder:`${e("search")}...`,onChange:d=>a(d.target.value)})}),t.options.map(d=>{if(!(i&&!d.label.toLowerCase().includes(i.toLowerCase())))return v.jsx(p6,{option:d,checked:s.includes(d.value),onChange:p=>h(p,d.value)},`${d.value}_${s.includes(d.value)?"checked":"unchecked"}`)})]})]})]})}function m6({value:t,max:e,label:n}){return v.jsxs("div",{children:[v.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),v.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:v.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(t/e*100,100)}%`}})})]})}function y6({value:t,placeholder:e,open:n,setOpen:r,disabled:o}){return v.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${o?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!o&&r(!n),children:[v.jsx("span",{className:`text-sm ${o?"text-core-gray-300":"text-core-gray-800"}`,children:t||e}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function v6({label:t,children:e}){return v.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[v.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:t}),e]})}function sd(t){return v.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:t.label})}function w6(t){const e=x.useRef(null),[n,r]=x.useState(!1),[o,i]=x.useState(t.value??"");L1(e,r);const a=(c,l)=>{i(c),r(!1),t.onChange&&t.onChange(l)},s=x.Children.map(t.children,c=>{if(x.isValidElement(c)){if(c.type===sd)return v.jsx("div",{onClick:()=>a(c.props.label,c.props.value),children:c});if(c.type===v6){const l=x.Children.map(c.props.children,f=>{if(x.isValidElement(f)&&f.type===sd)return v.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f})});return x.cloneElement(c,{},...l)}}});return v.jsxs("div",{ref:e,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:t.description,disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsx("div",{children:v.jsxs("div",{className:"relative",children:[v.jsx(y6,{value:o,placeholder:t.placeholder,open:n,setOpen:r,disabled:t.disabled}),t.children&&v.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:s})]})}),v.jsx(Gn.Helper,{helperText:t.helperText})]})}var b6=Object.defineProperty,E6=(t,e)=>{for(var n in e)b6(t,n,{get:e[n],enumerable:!0})},Dr={};E6(Dr,{assign:()=>A6,colors:()=>No,createStringInterpolator:()=>md,skipAnimation:()=>z1,to:()=>K1,willAdvance:()=>yd});var cd=Wa(),Qe=t=>Ha(t,cd),ud=Wa();Qe.write=t=>Ha(t,ud);var Pc=Wa();Qe.onStart=t=>Ha(t,Pc);var ld=Wa();Qe.onFrame=t=>Ha(t,ld);var dd=Wa();Qe.onFinish=t=>Ha(t,dd);var Gi=[];Qe.setTimeout=(t,e)=>{const n=Qe.now()+e,r=()=>{const i=Gi.findIndex(a=>a.cancel==r);~i&&Gi.splice(i,1),Bo-=~i?1:0},o={time:n,handler:t,cancel:r};return Gi.splice(G1(n),0,o),Bo+=1,q1(),o};var G1=t=>~(~Gi.findIndex(e=>e.time>t)||~Gi.length);Qe.cancel=t=>{Pc.delete(t),ld.delete(t),dd.delete(t),cd.delete(t),ud.delete(t)},Qe.sync=t=>{hd=!0,Qe.batchedUpdates(t),hd=!1},Qe.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function r(...o){e=o,Qe.onStart(n)}return r.handler=t,r.cancel=()=>{Pc.delete(n),e=null},r};var fd=typeof window<"u"?window.requestAnimationFrame:()=>{};Qe.use=t=>fd=t,Qe.now=typeof performance<"u"?()=>performance.now():Date.now,Qe.batchedUpdates=t=>t(),Qe.catch=console.error,Qe.frameLoop="always",Qe.advance=()=>{Qe.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):W1()};var ko=-1,Bo=0,hd=!1;function Ha(t,e){hd?(e.delete(t),t(0)):(e.add(t),q1())}function q1(){ko<0&&(ko=0,Qe.frameLoop!=="demand"&&fd(H1))}function C6(){ko=-1}function H1(){~ko&&(fd(H1),Qe.batchedUpdates(W1))}function W1(){const t=ko;ko=Qe.now();const e=G1(ko);if(e&&(Y1(Gi.splice(0,e),n=>n.handler()),Bo-=e),!Bo){C6();return}Pc.flush(),cd.flush(t?Math.min(64,ko-t):16.667),ld.flush(),ud.flush(),dd.flush()}function Wa(){let t=new Set,e=t;return{add(n){Bo+=e==t&&!t.has(n)?1:0,t.add(n)},delete(n){return Bo-=e==t&&t.has(n)?1:0,t.delete(n)},flush(n){e.size&&(t=new Set,Bo-=e.size,Y1(e,r=>r(n)&&t.add(r)),Bo+=t.size,e=t)}}}function Y1(t,e){t.forEach(n=>{try{e(n)}catch(r){Qe.catch(r)}})}function pd(){}var _6=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),Se={arr:Array.isArray,obj:t=>!!t&&t.constructor.name==="Object",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0};function oo(t,e){if(Se.arr(t)){if(!Se.arr(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t===e}var dt=(t,e)=>t.forEach(e);function Wr(t,e,n){if(Se.arr(t)){for(let r=0;r<t.length;r++)e.call(n,t[r],`${r}`);return}for(const r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r)}var hr=t=>Se.und(t)?[]:Se.arr(t)?t:[t];function Ya(t,e){if(t.size){const n=Array.from(t);t.clear(),dt(n,e)}}var Ka=(t,...e)=>Ya(t,n=>n(...e)),gd=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),md,K1,No=null,z1=!1,yd=pd,A6=t=>{t.to&&(K1=t.to),t.now&&(Qe.now=t.now),t.colors!==void 0&&(No=t.colors),t.skipAnimation!=null&&(z1=t.skipAnimation),t.createStringInterpolator&&(md=t.createStringInterpolator),t.requestAnimationFrame&&Qe.use(t.requestAnimationFrame),t.batchedUpdates&&(Qe.batchedUpdates=t.batchedUpdates),t.willAdvance&&(yd=t.willAdvance),t.frameLoop&&(Qe.frameLoop=t.frameLoop)},za=new Set,Sr=[],vd=[],kc=0,Bc={get idle(){return!za.size&&!Sr.length},start(t){kc>t.priority?(za.add(t),Qe.onStart(S6)):($1(t),Qe(wd))},advance:wd,sort(t){if(kc)Qe.onFrame(()=>Bc.sort(t));else{const e=Sr.indexOf(t);~e&&(Sr.splice(e,1),X1(t))}},clear(){Sr=[],za.clear()}};function S6(){za.forEach($1),za.clear(),Qe(wd)}function $1(t){Sr.includes(t)||X1(t)}function X1(t){Sr.splice(I6(Sr,e=>e.priority>t.priority),0,t)}function wd(t){const e=vd;for(let n=0;n<Sr.length;n++){const r=Sr[n];kc=r.priority,r.idle||(yd(r),r.advance(t),r.idle||e.push(r))}return kc=0,vd=Sr,vd.length=0,Sr=e,Sr.length>0}function I6(t,e){const n=t.findIndex(e);return n<0?t.length:n}var T6=(t,e,n)=>Math.min(Math.max(n,t),e),x6={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Mr="[-+]?\\d*\\.?\\d+",Nc=Mr+"%";function Rc(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var O6=new RegExp("rgb"+Rc(Mr,Mr,Mr)),P6=new RegExp("rgba"+Rc(Mr,Mr,Mr,Mr)),k6=new RegExp("hsl"+Rc(Mr,Nc,Nc)),B6=new RegExp("hsla"+Rc(Mr,Nc,Nc,Mr)),N6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,R6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,D6=/^#([0-9a-fA-F]{6})$/,M6=/^#([0-9a-fA-F]{8})$/;function L6(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=D6.exec(t))?parseInt(e[1]+"ff",16)>>>0:No&&No[t]!==void 0?No[t]:(e=O6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|255)>>>0:(e=P6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|Z1(e[4]))>>>0:(e=N6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=M6.exec(t))?parseInt(e[1],16)>>>0:(e=R6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=k6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|255)>>>0:(e=B6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|Z1(e[4]))>>>0:null}function bd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Q1(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,o=2*n-r,i=bd(o,r,t+1/3),a=bd(o,r,t),s=bd(o,r,t-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function qi(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function J1(t){return(parseFloat(t)%360+360)%360/360}function Z1(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Dc(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function e0(t){let e=L6(t);if(e===null)return t;e=e||0;const n=(e&4278190080)>>>24,r=(e&16711680)>>>16,o=(e&65280)>>>8,i=(e&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var $a=(t,e,n)=>{if(Se.fun(t))return t;if(Se.arr(t))return $a({range:t,output:e,extrapolate:n});if(Se.str(t.output[0]))return md(t);const r=t,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const f=j6(l,i);return F6(l,i[f],i[f+1],o[f],o[f+1],c,a,s,r.map)}};function F6(t,e,n,r,o,i,a,s,c){let l=c?c(t):t;if(l<e){if(a==="identity")return l;a==="clamp"&&(l=e)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===o?r:e===n?t<=e?r:o:(e===-1/0?l=-l:n===1/0?l=l-e:l=(l-e)/(n-e),l=i(l),r===-1/0?l=-l:o===1/0?l=l+r:l=l*(o-r)+r,l)}function j6(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}var V6=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*t,o=e==="end"?Math.floor(r):Math.ceil(r);return T6(0,1,o/t)},Mc=1.70158,Lc=Mc*1.525,t0=Mc+1,n0=2*Math.PI/3,r0=2*Math.PI/4.5,Fc=t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,U6={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>t===0?0:Math.pow(2,10*t-10),easeOutExpo:t=>t===1?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>t===0?0:t===1?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>t0*t*t*t-Mc*t*t,easeOutBack:t=>1+t0*Math.pow(t-1,3)+Mc*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*((Lc+1)*2*t-Lc)/2:(Math.pow(2*t-2,2)*((Lc+1)*(t*2-2)+Lc)+2)/2,easeInElastic:t=>t===0?0:t===1?1:-Math.pow(2,10*t-10)*Math.sin((t*10-10.75)*n0),easeOutElastic:t=>t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*n0)+1,easeInOutElastic:t=>t===0?0:t===1?1:t<.5?-(Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*r0))/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*r0)/2+1,easeInBounce:t=>1-Fc(1-t),easeOutBounce:Fc,easeInOutBounce:t=>t<.5?(1-Fc(1-2*t))/2:(1+Fc(2*t-1))/2,steps:V6},Xa=Symbol.for("FluidValue.get"),Hi=Symbol.for("FluidValue.observers"),Ir=t=>!!(t&&t[Xa]),Jn=t=>t&&t[Xa]?t[Xa]():t,o0=t=>t[Hi]||null;function G6(t,e){t.eventObserved?t.eventObserved(e):t(e)}function Qa(t,e){const n=t[Hi];n&&n.forEach(r=>{G6(r,e)})}var i0=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");q6(this,t)}},q6=(t,e)=>a0(t,Xa,e);function Wi(t,e){if(t[Xa]){let n=t[Hi];n||a0(t,Hi,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function Ja(t,e){const n=t[Hi];if(n&&n.has(e)){const r=n.size-1;r?n.delete(e):t[Hi]=null,t.observerRemoved&&t.observerRemoved(r,e)}}var a0=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),jc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,H6=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,s0=new RegExp(`(${jc.source})(%|[a-z]+)`,"i"),W6=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Vc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,c0=t=>{const[e,n]=Y6(t);if(!e||gd())return t;const r=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||t}else{if(n&&Vc.test(n))return c0(n);if(n)return n}return t},Y6=t=>{const e=Vc.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]},Ed,K6=(t,e,n,r,o)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,u0=t=>{Ed||(Ed=No?new RegExp(`(${Object.keys(No).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(i=>Jn(i).replace(Vc,c0).replace(H6,e0).replace(Ed,e0)),n=e.map(i=>i.match(jc).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>$a({...t,output:i}));return i=>{var c;const a=!s0.test(e[0])&&((c=e.find(l=>s0.test(l)))==null?void 0:c.replace(jc,""));let s=0;return e[0].replace(jc,()=>`${o[s++](i)}${a||""}`).replace(W6,K6)}},Cd="react-spring: ",l0=t=>{const e=t;let n=!1;if(typeof e!="function")throw new TypeError(`${Cd}once requires a function parameter`);return(...r)=>{n||(e(...r),n=!0)}},z6=l0(console.warn);function $6(){z6(`${Cd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var X6=l0(console.warn);function Q6(){X6(`${Cd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Uc(t){return Se.str(t)&&(t[0]=="#"||/\d/.test(t)||!gd()&&Vc.test(t)||t in(No||{}))}var _d=gd()?x.useEffect:x.useLayoutEffect,J6=()=>{const t=x.useRef(!1);return _d(()=>(t.current=!0,()=>{t.current=!1}),[]),t};function d0(){const t=x.useState()[1],e=J6();return()=>{e.current&&t(Math.random())}}function Z6(t,e){const[n]=x.useState(()=>({inputs:e,result:t()})),r=x.useRef(),o=r.current;let i=o;return i?e&&i.inputs&&e8(e,i.inputs)||(i={inputs:e,result:t()}):i=n,x.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function e8(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var f0=t=>x.useEffect(t,t8),t8=[];function h0(t){const e=x.useRef();return x.useEffect(()=>{e.current=t}),e.current}var Za=Symbol.for("Animated:node"),n8=t=>!!t&&t[Za]===t,Yr=t=>t&&t[Za],Ad=(t,e)=>_6(t,Za,e),Gc=t=>t&&t[Za]&&t[Za].getPayload(),p0=class{constructor(){Ad(this,this)}getPayload(){return this.payload||[]}},es=class extends p0{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,Se.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new es(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return Se.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,Se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},ts=class extends es{constructor(t){super(0),this._string=null,this._toString=$a({output:[t,t]})}static create(t){return new ts(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(Se.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=$a({output:[this.getValue(),t]})),this._value=0,super.reset()}},qc={dependencies:null},Hc=class extends p0{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return Wr(this.source,(n,r)=>{n8(n)?e[r]=n.getValue(t):Ir(n)?e[r]=Jn(n):t||(e[r]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&dt(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return Wr(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){qc.dependencies&&Ir(t)&&qc.dependencies.add(t);const e=Gc(t);e&&dt(e,n=>this.add(n))}},g0=class extends Hc{constructor(t){super(t)}static create(t){return new g0(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((n,r)=>n.setValue(t[r])).some(Boolean):(super.setValue(t.map(r8)),!0)}};function r8(t){return(Uc(t)?ts:es).create(t)}function Sd(t){const e=Yr(t);return e?e.constructor:Se.arr(t)?g0:Uc(t)?ts:es}var m0=(t,e)=>{const n=!Se.fun(t)||t.prototype&&t.prototype.isReactComponent;return x.forwardRef((r,o)=>{const i=x.useRef(null),a=n&&x.useCallback(u=>{i.current=a8(o,u)},[o]),[s,c]=i8(r,e),l=d0(),f=()=>{const u=i.current;if(n&&!u)return;(u?e.applyAnimatedValues(u,s.getValue(!0)):!1)===!1&&l()},h=new o8(f,c),d=x.useRef();_d(()=>(d.current=h,dt(c,u=>Wi(u,h)),()=>{d.current&&(dt(d.current.deps,u=>Ja(u,d.current)),Qe.cancel(d.current.update))})),x.useEffect(f,[]),f0(()=>()=>{const u=d.current;dt(u.deps,g=>Ja(g,u))});const p=e.getComponentProps(s.getValue());return ce.createElement(t,{...p,ref:a})})},o8=class{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){t.type=="change"&&Qe.write(this.update)}};function i8(t,e){const n=new Set;return qc.dependencies=n,t.style&&(t={...t,style:e.createAnimatedStyle(t.style)}),t=new Hc(t),qc.dependencies=null,[t,n]}function a8(t,e){return t&&(Se.fun(t)?t(e):t.current=e),e}var y0=Symbol.for("AnimatedComponent"),s8=(t,{applyAnimatedValues:e=()=>!1,createAnimatedStyle:n=o=>new Hc(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=v0(a)||"Anonymous";return Se.str(a)?a=i[a]||(i[a]=m0(a,o)):a=a[y0]||(a[y0]=m0(a,o)),a.displayName=`Animated(${s})`,a};return Wr(t,(a,s)=>{Se.arr(t)&&(s=v0(a)),i[s]=i(a)}),{animated:i}},v0=t=>Se.str(t)?t:t&&Se.str(t.displayName)?t.displayName:Se.fun(t)&&t.name||null;function ii(t,...e){return Se.fun(t)?t(...e):t}var ns=(t,e)=>t===!0||!!(e&&t&&(Se.fun(t)?t(e):hr(t).includes(e))),w0=(t,e)=>Se.obj(t)?e&&t[e]:t,b0=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,c8=t=>t,Id=(t,e=c8)=>{let n=u8;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));const r={};for(const o of n){const i=e(t[o],o);Se.und(i)||(r[o]=i)}return r},u8=["config","onProps","onStart","onChange","onPause","onResume","onRest"],l8={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function d8(t){const e={};let n=0;if(Wr(t,(r,o)=>{l8[o]||(e[o]=r,n++)}),n)return e}function E0(t){const e=d8(t);if(e){const n={to:e};return Wr(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function rs(t){return t=Jn(t),Se.arr(t)?t.map(rs):Uc(t)?Dr.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function f8(t){for(const e in t)return!0;return!1}function Td(t){return Se.fun(t)||Se.arr(t)&&Se.obj(t[0])}function h8(t,e){var n;(n=t.ref)==null||n.delete(t),e==null||e.delete(t)}function p8(t,e){var n;e&&t.ref!==e&&((n=t.ref)==null||n.delete(t),e.add(t),t.ref=e)}var g8={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},xd={...g8.default,mass:1,damping:1,easing:U6.linear,clamp:!1},m8=class{constructor(){this.velocity=0,Object.assign(this,xd)}};function y8(t,e,n){n&&(n={...n},C0(n,e),e={...n,...e}),C0(t,e),Object.assign(t,e);for(const a in xd)t[a]==null&&(t[a]=xd[a]);let{frequency:r,damping:o}=t;const{mass:i}=t;return Se.und(r)||(r<.01&&(r=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/r,2)*i,t.friction=4*Math.PI*o*i/r),t}function C0(t,e){if(!Se.und(e.decay))t.duration=void 0;else{const n=!Se.und(e.tension)||!Se.und(e.friction);(n||!Se.und(e.frequency)||!Se.und(e.damping)||!Se.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var _0=[],v8=class{constructor(){this.changed=!1,this.values=_0,this.toValues=null,this.fromValues=_0,this.config=new m8,this.immediate=!1}};function A0(t,{key:e,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,l,f=ns(n.cancel??(r==null?void 0:r.cancel),e);if(f)p();else{Se.und(n.pause)||(o.paused=ns(n.pause,e));let u=r==null?void 0:r.pause;u!==!0&&(u=o.paused||ns(u,e)),c=ii(n.delay||0,e),u?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function h(){o.resumeQueue.add(d),o.timeouts.delete(l),l.cancel(),c=l.time-Qe.now()}function d(){c>0&&!Dr.skipAnimation?(o.delayed=!0,l=Qe.setTimeout(p,c),o.pauseQueue.add(h),o.timeouts.add(l)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(l),t<=(o.cancelId||0)&&(f=!0);try{i.start({...n,callId:t,cancel:f},a)}catch(u){s(u)}}})}var Od=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?Yi(t.get()):e.every(n=>n.noop)?S0(t.get()):Lr(t.get(),e.every(n=>n.finished)),S0=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),Lr=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),Yi=t=>({value:t,cancelled:!0,finished:!1});function I0(t,e,n,r){const{callId:o,parentId:i,onRest:a}=e,{asyncTo:s,promise:c}=n;return!i&&t===s&&!e.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const l=Id(e,(m,y)=>y==="onRest"?void 0:m);let f,h;const d=new Promise((m,y)=>(f=m,h=y)),p=m=>{const y=o<=(n.cancelId||0)&&Yi(r)||o!==n.asyncId&&Lr(r,!1);if(y)throw m.result=y,h(m),m},u=(m,y)=>{const w=new T0,b=new x0;return(async()=>{if(Dr.skipAnimation)throw os(n),b.result=Lr(r,!1),h(b),b;p(w);const E=Se.obj(m)?{...m}:{...y,to:m};E.parentId=o,Wr(l,(S,T)=>{Se.und(E[T])&&(E[T]=S)});const C=await r.start(E);return p(w),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let g;if(Dr.skipAnimation)return os(n),Lr(r,!1);try{let m;Se.arr(t)?m=(async y=>{for(const w of y)await u(w)})(t):m=Promise.resolve(t(u,r.stop.bind(r))),await Promise.all([m.then(f),d]),g=Lr(r.get(),!0,!1)}catch(m){if(m instanceof T0)g=m.result;else if(m instanceof x0)g=m.result;else throw m}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return Se.fun(a)&&Qe.batchedUpdates(()=>{a(g,r,r.item)}),g})()}function os(t,e){Ya(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var T0=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},x0=class extends Error{constructor(){super("SkipAnimationSignal")}},Pd=t=>t instanceof kd,w8=1,kd=class extends i0{constructor(){super(...arguments),this.id=w8++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Yr(this);return t&&t.getValue()}to(...t){return Dr.to(this,t)}interpolate(...t){return $6(),Dr.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Qa(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||Bc.sort(this),Qa(this,{type:"priority",parent:this,priority:t})}},ai=Symbol.for("SpringPhase"),O0=1,Bd=2,Nd=4,Rd=t=>(t[ai]&O0)>0,Ro=t=>(t[ai]&Bd)>0,is=t=>(t[ai]&Nd)>0,P0=(t,e)=>e?t[ai]|=Bd|O0:t[ai]&=~Bd,k0=(t,e)=>e?t[ai]|=Nd:t[ai]&=~Nd,b8=class extends kd{constructor(t,e){if(super(),this.animation=new v8,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Se.und(t)||!Se.und(e)){const n=Se.obj(t)?{...t}:{...e,from:t};Se.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ro(this)||this._state.asyncTo)||is(this)}get goal(){return Jn(this.animation.to)}get velocity(){const t=Yr(this);return t instanceof es?t.lastVelocity||0:t.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Rd(this)}get isAnimating(){return Ro(this)}get isPaused(){return is(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Gc(r.to);!a&&Ir(r.to)&&(o=hr(Jn(r.to))),r.values.forEach((l,f)=>{if(l.done)return;const h=l.constructor==ts?1:a?a[f].lastPosition:o[f];let d=r.immediate,p=h;if(!d){if(p=l.lastPosition,i.tension<=0){l.done=!0;return}let u=l.elapsedTime+=t;const g=r.fromValues[f],m=l.v0!=null?l.v0:l.v0=Se.arr(i.velocity)?i.velocity[f]:i.velocity;let y;const w=i.precision||(g==h?.005:Math.min(1,Math.abs(h-g)*.001));if(Se.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,E=Math.exp(-(1-b)*u);p=g+m/(1-b)*(1-E),d=Math.abs(l.lastPosition-p)<=w,y=m*E}else{y=l.lastVelocity==null?m:l.lastVelocity;const b=i.restVelocity||w/10,E=i.clamp?0:i.bounce,C=!Se.und(E),S=g==h?l.v0>0:g<h;let T,P=!1;const N=1,L=Math.ceil(t/N);for(let U=0;U<L&&(T=Math.abs(y)>b,!(!T&&(d=Math.abs(h-p)<=w,d)));++U){C&&(P=p==h||p>h==S,P&&(y=-y*E,p=h));const j=-i.tension*1e-6*(p-h),K=-i.friction*.001*y,G=(j+K)/i.mass;y=y+G*N,p=p+y*N}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,u=l.elapsedTime+=t)),b=(i.progress||0)+u/this._memoizedDuration,b=b>1?1:b<0?0:b,l.durationProgress=b),p=g+i.easing(b)*(h-g),y=(p-l.lastPosition)/t,d=b==1}l.lastVelocity=y,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?l.done=!0:e=!1,l.setValue(p,i.round)&&(n=!0)});const s=Yr(this),c=s.getValue();if(e){const l=Jn(r.to);(c!==l||n)&&!i.decay?(s.setValue(l),this._onChange(l)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(t){return Qe.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ro(this)){const{to:t,config:e}=this.animation;Qe.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return Se.und(t)?(n=this.queue||[],this.queue=[]):n=[Se.obj(t)?t:{...e,to:t}],Promise.all(n.map(r=>this._update(r))).then(r=>Od(this,r))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),os(this._state,t&&this._lastCallId),Qe.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:r}=t;n=Se.obj(n)?n[e]:n,(n==null||Td(n))&&(n=void 0),r=Se.obj(r)?r[e]:r,r==null&&(r=void 0);const o={to:n,from:r};return Rd(this)||(t.reverse&&([n,r]=[r,n]),r=Jn(r),Se.und(r)?Yr(this)||this._set(n):this._set(r)),o}_update({...t},e){const{key:n,defaultProps:r}=this;t.default&&Object.assign(r,Id(t,(a,s)=>/^on/.test(s)?w0(a,n):a)),R0(this,t,"onProps"),cs(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return A0(++this._lastCallId,{key:n,props:t,defaultProps:r,state:i,actions:{pause:()=>{is(this)||(k0(this,!0),Ka(i.pauseQueue),cs(this,"onPause",Lr(this,as(this,this.animation.to)),this))},resume:()=>{is(this)&&(k0(this,!1),Ro(this)&&this._resume(),Ka(i.resumeQueue),cs(this,"onResume",Lr(this,as(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(t.loop&&a.finished&&!(e&&a.noop)){const s=B0(t);if(s)return this._update(s,!0)}return a})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(Yi(this));const r=!Se.und(t.to),o=!Se.und(t.from);if(r||o)if(e.callId>this._lastToId)this._lastToId=e.callId;else return n(Yi(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:l}=s;let{to:f=c,from:h=l}=t;o&&!r&&(!e.default||Se.und(f))&&(f=h),e.reverse&&([f,h]=[h,f]);const d=!oo(h,l);d&&(s.from=h),h=Jn(h);const p=!oo(f,c);p&&this._focus(f);const u=Td(e.to),{config:g}=s,{decay:m,velocity:y}=g;(r||o)&&(g.velocity=0),e.config&&!u&&y8(g,ii(e.config,i),e.config!==a.config?ii(a.config,i):void 0);let w=Yr(this);if(!w||Se.und(f))return n(Lr(this,!0));const b=Se.und(e.reset)?o&&!e.default:!Se.und(h)&&ns(e.reset,i),E=b?h:this.get(),C=rs(f),S=Se.num(C)||Se.arr(C)||Uc(C),T=!u&&(!S||ns(a.immediate||e.immediate,i));if(p){const U=Sd(f);if(U!==w.constructor)if(T)w=this._set(C);else throw Error(`Cannot animate between ${w.constructor.name} and ${U.name}, as the "to" prop suggests`)}const P=w.constructor;let N=Ir(f),L=!1;if(!N){const U=b||!Rd(this)&&d;(p||U)&&(L=oo(rs(E),C),N=!L),(!oo(s.immediate,T)&&!T||!oo(g.decay,m)||!oo(g.velocity,y))&&(N=!0)}if(L&&Ro(this)&&(s.changed&&!b?N=!0:N||this._stop(c)),!u&&((N||Ir(c))&&(s.values=w.getPayload(),s.toValues=Ir(f)?null:P==ts?[1]:hr(C)),s.immediate!=T&&(s.immediate=T,!T&&!b&&this._set(c)),N)){const{onRest:U}=s;dt(C8,K=>R0(this,e,K));const j=Lr(this,as(this,c));Ka(this._pendingCalls,j),this._pendingCalls.add(n),s.changed&&Qe.batchedUpdates(()=>{var K;s.changed=!b,U==null||U(j,this),b?ii(a.onRest,j):(K=s.onStart)==null||K.call(s,j,this)})}b&&this._set(E),u?n(I0(e.to,e,this._state,this)):N?this._start():Ro(this)&&!p?this._pendingCalls.add(n):n(S0(E))}_focus(t){const e=this.animation;t!==e.to&&(o0(this)&&this._detach(),e.to=t,o0(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;Ir(e)&&(Wi(e,this),Pd(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Ir(t)&&Ja(t,this)}_set(t,e=!0){const n=Jn(t);if(!Se.und(n)){const r=Yr(this);if(!r||!oo(n,r.getValue())){const o=Sd(n);!r||r.constructor!=o?Ad(this,o.create(n)):r.setValue(n),r&&Qe.batchedUpdates(()=>{this._onChange(n,e)})}}return Yr(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,cs(this,"onStart",Lr(this,as(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),ii(this.animation.onChange,t,this)),ii(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Yr(this).reset(Jn(t.to)),t.immediate||(t.fromValues=t.values.map(e=>e.lastPosition)),Ro(this)||(P0(this,!0),is(this)||this._resume())}_resume(){Dr.skipAnimation?this.finish():Bc.start(this)}_stop(t,e){if(Ro(this)){P0(this,!1);const n=this.animation;dt(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qa(this,{type:"idle",parent:this});const r=e?Yi(this.get()):Lr(this.get(),as(this,t??n.to));Ka(this._pendingCalls,r),n.changed&&(n.changed=!1,cs(this,"onRest",r,this))}}};function as(t,e){const n=rs(e),r=rs(t.get());return oo(r,n)}function B0(t,e=t.loop,n=t.to){const r=ii(e);if(r){const o=r!==!0&&E0(r),i=(o||t).reverse,a=!o||o.reset;return ss({...t,loop:e,default:!1,pause:void 0,to:!i||Td(n)?n:void 0,from:a?t.from:void 0,reset:a,...o})}}function ss(t){const{to:e,from:n}=t=E0(t),r=new Set;return Se.obj(e)&&N0(e,r),Se.obj(n)&&N0(n,r),t.keys=r.size?Array.from(r):null,t}function E8(t){const e=ss(t);return Se.und(e.default)&&(e.default=Id(e)),e}function N0(t,e){Wr(t,(n,r)=>n!=null&&e.add(r))}var C8=["onStart","onRest","onChange","onPause","onResume"];function R0(t,e,n){t.animation[n]=e[n]!==b0(e,n)?w0(e[n],t.key):void 0}function cs(t,e,...n){var r,o,i,a;(o=(r=t.animation)[e])==null||o.call(r,...n),(a=(i=t.defaultProps)[e])==null||a.call(i,...n)}var _8=["onStart","onChange","onRest"],A8=1,S8=class{constructor(t,e){this.id=A8++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];Se.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(ss(t)),this}start(t){let{queue:e}=this;return t?e=hr(t).map(ss):this.queue=[],this._flush?this._flush(this,e):(V0(this,e),Dd(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;dt(hr(e),r=>n[r].stop(!!t))}else os(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(Se.und(t))this.start({pause:!0});else{const e=this.springs;dt(hr(t),n=>e[n].pause())}return this}resume(t){if(Se.und(t))this.start({pause:!1});else{const e=this.springs;dt(hr(t),n=>e[n].resume())}return this}each(t){Wr(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ya(t,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&e.size&&Ya(e,([s,c])=>{c.value=a,s(c,this,this._item)}),i&&(this._started=!1,Ya(n,([s,c])=>{c.value=a,s(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Qe.onFrame(this._onFrame)}};function Dd(t,e){return Promise.all(e.map(n=>D0(t,n))).then(n=>Od(t,n))}async function D0(t,e,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=e,l=Se.obj(e.default)&&e.default;a&&(e.loop=!1),o===!1&&(e.to=null),i===!1&&(e.from=null);const f=Se.arr(o)||Se.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,l&&(l.onRest=void 0)):dt(_8,g=>{const m=e[g];if(Se.fun(m)){const y=t._events[g];e[g]=({finished:w,cancelled:b})=>{const E=y.get(m);E?(w||(E.finished=!1),b&&(E.cancelled=!0)):y.set(m,{value:null,finished:w||!1,cancelled:b||!1})},l&&(l[g]=e[g])}});const h=t._state;e.pause===!h.paused?(h.paused=e.pause,Ka(e.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(e.pause=!0);const d=(r||Object.keys(t.springs)).map(g=>t.springs[g].start(e)),p=e.cancel===!0||b0(e,"cancel")===!0;(f||p&&h.asyncId)&&d.push(A0(++t._lastAsyncId,{props:e,state:h,actions:{pause:pd,resume:pd,start(g,m){p?(os(h,t._lastAsyncId),m(Yi(t))):(g.onRest=s,m(I0(f,g,h,t)))}}})),h.paused&&await new Promise(g=>{h.resumeQueue.add(g)});const u=Od(t,await Promise.all(d));if(a&&u.finished&&!(n&&u.noop)){const g=B0(e,a,o);if(g)return V0(t,[g]),D0(t,g,!0)}return c&&Qe.batchedUpdates(()=>c(u,t,t.item)),u}function M0(t,e){const n={...t.springs};return e&&dt(hr(e),r=>{Se.und(r.keys)&&(r=ss(r)),Se.obj(r.to)||(r={...r,to:void 0}),j0(n,r,o=>F0(o))}),L0(t,n),n}function L0(t,e){Wr(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Wi(n,t))})}function F0(t,e){const n=new b8;return n.key=t,e&&Wi(n,e),n}function j0(t,e,n){e.keys&&dt(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function V0(t,e){dt(e,n=>{j0(t.springs,n,r=>F0(r,t))})}var Wc=({children:t,...e})=>{const n=x.useContext(Yc),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=Z6(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Yc;return ce.createElement(i,{value:e},t)},Yc=I8(Wc,{});Wc.Provider=Yc.Provider,Wc.Consumer=Yc.Consumer;function I8(t,e){return Object.assign(t,ce.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}var T8=()=>{const t=[],e=function(r){Q6();const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){const o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return dt(t,r=>r.pause(...arguments)),this},e.resume=function(){return dt(t,r=>r.resume(...arguments)),this},e.set=function(r){dt(t,(o,i)=>{const a=Se.fun(r)?r(i,o):r;a&&o.set(a)})},e.start=function(r){const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},e.stop=function(){return dt(t,r=>r.stop(...arguments)),this},e.update=function(r){return dt(t,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return Se.fun(r)?r(i,o):r};return e._getProps=n,e};function x8(t,e,n){const r=Se.fun(e)&&e;r&&!n&&(n=[]);const o=x.useMemo(()=>r||arguments.length==3?T8():void 0,[]),i=x.useRef(0),a=d0(),s=x.useMemo(()=>({ctrls:[],queue:[],flush(y,w){const b=M0(y,w);return i.current>0&&!s.queue.length&&!Object.keys(b).some(C=>!y.springs[C])?Dd(y,w):new Promise(C=>{L0(y,b),s.queue.push(()=>{C(Dd(y,w))}),a()})}}),[]),c=x.useRef([...s.ctrls]),l=[],f=h0(t)||0;x.useMemo(()=>{dt(c.current.slice(t,f),y=>{h8(y,o),y.stop(!0)}),c.current.length=t,h(f,t)},[t]),x.useMemo(()=>{h(0,Math.min(f,t))},n);function h(y,w){for(let b=y;b<w;b++){const E=c.current[b]||(c.current[b]=new S8(null,s.flush)),C=r?r(b,E):e[b];C&&(l[b]=E8(C))}}const d=c.current.map((y,w)=>M0(y,l[w])),p=x.useContext(Wc),u=h0(p),g=p!==u&&f8(p);_d(()=>{i.current++,s.ctrls=c.current;const{queue:y}=s;y.length&&(s.queue=[],dt(y,w=>w())),dt(c.current,(w,b)=>{o==null||o.add(w),g&&w.start({default:p});const E=l[b];E&&(p8(w,E.ref),w.ref?w.queue.push(E):w.start(E))})}),f0(()=>()=>{dt(s.ctrls,y=>y.stop(!0))});const m=d.map(y=>({...y}));return o?[m,o]:m}function O8(t,e){const n=Se.fun(t),[[r],o]=x8(1,n?t:[t],n?[]:e);return n||arguments.length==2?[r,o]:r}var P8=class extends kd{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=$a(...e);const n=this._get(),r=Sd(n);Ad(this,r.create(n))}advance(t){const e=this._get(),n=this.get();oo(e,n)||(Yr(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&U0(this._active)&&Md(this)}_get(){const t=Se.arr(this.source)?this.source.map(Jn):hr(Jn(this.source));return this.calc(...t)}_start(){this.idle&&!U0(this._active)&&(this.idle=!1,dt(Gc(this),t=>{t.done=!1}),Dr.skipAnimation?(Qe.batchedUpdates(()=>this.advance()),Md(this)):Bc.start(this))}_attach(){let t=1;dt(hr(this.source),e=>{Ir(e)&&Wi(e,this),Pd(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){dt(hr(this.source),t=>{Ir(t)&&Ja(t,this)}),this._active.clear(),Md(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=hr(this.source).reduce((e,n)=>Math.max(e,(Pd(n)?n.priority:0)+1),0))}};function k8(t){return t.idle!==!1}function U0(t){return!t.size||Array.from(t).every(k8)}function Md(t){t.idle||(t.idle=!0,dt(Gc(t),e=>{e.done=!0}),Qa(t,{type:"idle",parent:t}))}Dr.assign({createStringInterpolator:u0,to:(t,e)=>new P8(t,e)});var G0=/^--/;function B8(t,e){return e==null||typeof e=="boolean"||e===""?"":typeof e=="number"&&e!==0&&!G0.test(t)&&!(us.hasOwnProperty(t)&&us[t])?e+"px":(""+e).trim()}var q0={};function N8(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=e,l=Object.values(c),f=Object.keys(c).map(h=>n||t.hasAttribute(h)?h:q0[h]||(q0[h]=h.replace(/([A-Z])/g,d=>"-"+d.toLowerCase())));o!==void 0&&(t.textContent=o);for(const h in r)if(r.hasOwnProperty(h)){const d=B8(h,r[h]);G0.test(h)?t.style.setProperty(h,d):t.style[h]=d}f.forEach((h,d)=>{t.setAttribute(h,l[d])}),i!==void 0&&(t.scrollTop=i),a!==void 0&&(t.scrollLeft=a),s!==void 0&&t.setAttribute("viewBox",s)}var us={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},R8=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),D8=["Webkit","Ms","Moz","O"];us=Object.keys(us).reduce((t,e)=>(D8.forEach(n=>t[R8(n,e)]=t[e]),t),us);var M8=/^(matrix|translate|scale|rotate|skew)/,L8=/^(translate)/,F8=/^(rotate|skew)/,Ld=(t,e)=>Se.num(t)&&t!==0?t+e:t,Kc=(t,e)=>Se.arr(t)?t.every(n=>Kc(n,e)):Se.num(t)?t===e:parseFloat(t)===e,j8=class extends Hc{constructor({x:t,y:e,z:n,...r}){const o=[],i=[];(t||e||n)&&(o.push([t||0,e||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>Ld(s,"px")).join(",")})`,Kc(a,0)])),Wr(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(M8.test(s)){if(delete r[s],Se.und(a))return;const c=L8.test(s)?"px":F8.test(s)?"deg":"";o.push(hr(a)),i.push(s==="rotate3d"?([l,f,h,d])=>[`rotate3d(${l},${f},${h},${Ld(d,c)})`,Kc(d,0)]:l=>[`${s}(${l.map(f=>Ld(f,c)).join(",")})`,Kc(l,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new V8(o,i)),super(r)}},V8=class extends i0{constructor(t,e){super(),this.inputs=t,this.transforms=e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return dt(this.inputs,(n,r)=>{const o=Jn(n[0]),[i,a]=this.transforms[r](Se.arr(o)?o:n.map(Jn));t+=" "+i,e=e&&a}),e?"none":t}observerAdded(t){t==1&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Wi(n,this)))}observerRemoved(t){t==0&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Ja(n,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Qa(this,t)}},U8=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Dr.assign({batchedUpdates:Pi.unstable_batchedUpdates,createStringInterpolator:u0,colors:x6});var G8=s8(U8,{applyAnimatedValues:N8,createAnimatedStyle:t=>new j8(t),getComponentProps:({scrollTop:t,scrollLeft:e,...n})=>n}),q8=G8.animated;function zc(t){const{rows:e}=t,n=O8({from:{opacity:0},to:{opacity:1}});return v.jsxs(q8.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(e)].map((r,o)=>v.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),v.jsx("span",{className:"sr-only",children:"Loading..."})]})}function H0({children:t,offset:e,max:n=4,initialCollapsed:r=!0}){const o=x.useRef(null),[i,a]=x.useState(0),[s,c]=x.useState(r),l=s&&x.Children.count(t)>n?n:x.Children.count(t);x.useEffect(()=>{o.current&&(i?s?o.current.style.marginBottom=`-${i-(i/l+(l-1)*(e??i/l/7.5))}px`:o.current.style.marginBottom="unset":a(o.current.offsetHeight))},[s,i]);const f=d=>(100-(l-1-d))/100,h=d=>d*(i/l-(e??i/l/7.5));return v.jsx("div",{ref:o,className:"hover:cursor-pointer",onClick:()=>l>1&&c(!s),children:x.Children.map(x.Children.toArray(t).slice(-1*l),(d,p)=>v.jsx("div",{className:`${!s&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:s&&l>1?`scaleX(${f(p)}) translateY(-${h(p)}px)`:void 0},children:d}))})}const H8=Ui("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),W8=Ui("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),Y8=({id:t,disabled:e,onChange:n,defaultChecked:r=!1,size:o="md"})=>{const i=e,[a,s]=x.useState(r),[c,l]=x.useState(!1),f=()=>{i||(s(!a),n&&n())},h=()=>{e||l(!0)},d=()=>{l(!1)},p=Dn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":c,"bg-core-primary-500 hover:bg-core-primary-600":a&&!e,"bg-core-gray-200 hover:bg-core-gray-300":!a&&!e,"bg-core-gray-100":e},W8({size:o})),u=o==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return v.jsxs("div",{className:`inline-flex items-center py-1 ${i?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:h,children:[v.jsx("input",{className:"sr-only ",id:t,type:"checkbox",checked:a,disabled:i,onBlur:d,onChange:f,onFocus:h}),v.jsx("div",{className:p,children:v.jsx("div",{className:Dn(H8({size:o}),`${a?u:""} ${i?"shadow-none":"shadow-xs"}`)})})]})},$c=({id:t,children:e,size:n="md",description:r,toggleLeft:o=!0,disabled:i,helperText:a,defaultChecked:s=!1,label:c,required:l=!1,tooltip:f,onChange:h})=>{const d=x.useId(),p=t??d;return v.jsxs("div",{className:`flex ${o?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[v.jsx(Y8,{disabled:i,defaultChecked:s,id:p,size:n,onChange:h}),e||(c||r||f||a)&&v.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[v.jsx(Gn,{className:Dn("font-normal"),description:r,required:l,tooltip:f,htmlFor:p,disabled:i,children:c}),v.jsx(Gn.Helper,{disabled:i,helperText:a})]})]})};$c.displayName="Switch";const W0=x.createContext(null);function K8(t=!1){const e=x.useContext(W0);if(!e&&!t)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return e}const Y0=x.forwardRef(({toggleLeft:t=!1,size:e="md",children:n,description:r,disabled:o,helperText:i,id:a,label:s,required:c,tooltip:l},f)=>{const h=x.useId(),d=a??h,p=s??r??l??i?v.jsxs("div",{className:"inline-flex flex-col",children:[v.jsx(Gn,{className:"cursor-default",description:r,required:c,tooltip:l,htmlFor:d,disabled:o,children:s}),v.jsx(Gn.Helper,{disabled:o,helperText:i})]}):null;return v.jsx(W0.Provider,{value:{disabled:o,toggleLeft:t,size:e},children:v.jsxs("div",{ref:f,"aria-describedby":i?`${d}__describer`:void 0,"aria-labelledby":s?`${d}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??i??r??l?v.jsx("div",{className:"flex flex-col",children:p}):null,n?v.jsx("div",{className:Dn("flex flex-col gap-2"),children:n}):null]})})});Y0.displayName="SwitchGroup",Object.assign(Y0,{Item:({disabled:t,label:e,defaultChecked:n})=>{const r=K8(),{disabled:o,size:i,toggleLeft:a}=r??{};return v.jsx($c,{toggleLeft:a,disabled:t??o,label:e,defaultChecked:n,size:i})}});const z8=({children:t})=>v.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:t}),$8=({id:t,label:e,icon:n,pathname:r,activeTab:o,setActiveTab:i})=>v.jsx(_1,{className:"flex flex-grow items-center",to:r??"",children:v.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${o===t?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>i(t),children:[v.jsx(In,{icon:n,className:"mr-2",variant:o===t?"discovery":"secondary"}),e]})}),K0=Object.prototype.toString;function Fd(t){switch(K0.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ao(t,Error)}}function Ki(t,e){return K0.call(t)===`[object ${e}]`}function z0(t){return Ki(t,"ErrorEvent")}function $0(t){return Ki(t,"DOMError")}function X8(t){return Ki(t,"DOMException")}function io(t){return Ki(t,"String")}function jd(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Vd(t){return t===null||jd(t)||typeof t!="object"&&typeof t!="function"}function zi(t){return Ki(t,"Object")}function Xc(t){return typeof Event<"u"&&ao(t,Event)}function Q8(t){return typeof Element<"u"&&ao(t,Element)}function J8(t){return Ki(t,"RegExp")}function Qc(t){return!!(t&&t.then&&typeof t.then=="function")}function Z8(t){return zi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function ao(t,e){try{return t instanceof e}catch{return!1}}function X0(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function $i(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Q0(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const o=t[r];try{X0(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function eC(t,e,n=!1){return io(t)?J8(e)?e.test(t):io(e)?n?t===e:t.includes(e):!1:!1}function si(t,e=[],n=!1){return e.some(r=>eC(t,r,n))}function tC(t,e,n=250,r,o,i,a){if(!i.exception||!i.exception.values||!a||!ao(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=nC(Ud(t,e,o,a.originalException,r,i.exception.values,s,0),n))}function Ud(t,e,n,r,o,i,a,s){if(i.length>=n+1)return i;let c=[...i];if(ao(r[o],Error)){J0(a,s);const l=t(e,r[o]),f=c.length;Z0(l,o,f,s),c=Ud(t,e,n,r[o],o,[l,...c],l,f)}return Array.isArray(r.errors)&&r.errors.forEach((l,f)=>{if(ao(l,Error)){J0(a,s);const h=t(e,l),d=c.length;Z0(h,`errors[${f}]`,d,s),c=Ud(t,e,n,l,o,[h,...c],h,d)}}),c}function J0(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Z0(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function nC(t,e){return t.map(n=>(n.value&&(n.value=$i(n.value,e)),n))}function eg(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const ci="8.34.0",bt=globalThis;function Jc(t,e,n){const r=bt,o=r.__SENTRY__=r.__SENTRY__||{},i=o[ci]=o[ci]||{};return i[t]||(i[t]=e())}const Xi=bt,rC=80;function ui(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let i=0,a=0;const s=" > ",c=s.length;let l;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||rC;for(;n&&i++<r&&(l=oC(n,f),!(l==="html"||i>1&&a+o.length*c+l.length>=h));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function oC(t,e){const n=t,r=[];if(!n||!n.tagName)return"";if(Xi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=e&&e.length?e.filter(a=>n.getAttribute(a)).map(a=>[a,n.getAttribute(a)]):null;if(o&&o.length)o.forEach(a=>{r.push(`[${a[0]}="${a[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&io(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const a of i){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function iC(){try{return Xi.document.location.href}catch{return""}}function aC(t){return Xi.document&&Xi.document.querySelector?Xi.document.querySelector(t):null}function tg(t){if(!Xi.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}const Qi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sC="Sentry Logger ",Gd=["debug","info","warn","error","log","assert","trace"],Zc={};function qd(t){if(!("console"in bt))return t();const e=bt.console,n={},r=Object.keys(Zc);r.forEach(o=>{const i=Zc[o];n[o]=e[o],e[o]=i});try{return t()}finally{r.forEach(o=>{e[o]=n[o]})}}function cC(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Qi?Gd.forEach(n=>{e[n]=(...r)=>{t&&qd(()=>{bt.console[n](`${sC}[${n}]:`,...r)})}}):Gd.forEach(n=>{e[n]=()=>{}}),e}const Te=Jc("logger",cC),uC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function lC(t){return t==="http"||t==="https"}function ls(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function dC(t){const e=uC.exec(t);if(!e){qd(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,o="",i="",a="",s=""]=e.slice(1);let c="",l=s;const f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){const h=l.match(/^\d+/);h&&(l=h[0])}return ng({host:i,pass:o,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function ng(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function fC(t){if(!Qi)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(Te.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?lC(r)?e&&isNaN(parseInt(e,10))?(Te.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(Te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function hC(t){const e=typeof t=="string"?dC(t):ng(t);if(!(!e||!fC(e)))return e}class Kr extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function pr(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);typeof o=="function"&&rg(o,r),t[e]=o}function Tr(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Qi&&Te.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function rg(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Tr(t,"__sentry_original__",e)}catch{}}function Hd(t){return t.__sentry_original__}function pC(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function og(t){if(Fd(t))return{message:t.message,name:t.name,stack:t.stack,...ag(t)};if(Xc(t)){const e={type:t.type,target:ig(t.target),currentTarget:ig(t.currentTarget),...ag(t)};return typeof CustomEvent<"u"&&ao(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function ig(t){try{return Q8(t)?ui(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ag(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function gC(t,e=40){const n=Object.keys(og(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return $i(r,e);for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(!(i.length>e))return o===n.length?i:$i(i,e)}return""}function Mn(t){return Wd(t,new Map)}function Wd(t,e){if(mC(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const o of Object.getOwnPropertyNames(t))typeof t[o]<"u"&&(r[o]=Wd(t[o],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(o=>{r.push(Wd(o,e))}),r}return t}function mC(t){if(!zi(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const sg=50,li="?",cg=/\(error: (.*)\)/,ug=/captureMessage|captureException/;function yC(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const i=[],a=n.split(`
|
|
102
|
-
`);for(let s=r;s<a.length;s++){const c=a[s];if(c.length>1024)continue;const l=cg.test(c)?c.replace(cg,"$1"):c;if(!l.match(/\S*Error: /)){for(const f of e){const h=f(l);if(h){i.push(h);break}}if(i.length>=sg+o)break}}return vC(i.slice(o))}}function vC(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(eu(e).function||"")&&e.pop(),e.reverse(),ug.test(eu(e).function||"")&&(e.pop(),ug.test(eu(e).function||"")&&e.pop()),e.slice(0,sg).map(n=>({...n,filename:n.filename||eu(e).filename,function:n.function||li}))}function eu(t){return t[t.length-1]||{}}const Yd="<anonymous>";function so(t){try{return!t||typeof t!="function"?Yd:t.name||Yd}catch{return Yd}}function lg(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const tu={},dg={};function Do(t,e){tu[t]=tu[t]||[],tu[t].push(e)}function Mo(t,e){dg[t]||(e(),dg[t]=!0)}function xr(t,e){const n=t&&tu[t];if(n)for(const r of n)try{r(e)}catch(o){Qi&&Te.error(`Error while triggering instrumentation handler.
|
|
103
|
-
Type: ${t}
|
|
104
|
-
Name: ${so(r)}
|
|
105
|
-
Error:`,o)}}function wC(t){const e="console";Do(e,t),Mo(e,bC)}function bC(){"console"in bt&&Gd.forEach(function(t){t in bt.console&&pr(bt.console,t,function(e){return Zc[t]=e,function(...n){xr("console",{args:n,level:t});const o=Zc[t];o&&o.apply(bt.console,n)}})})}const Kd=bt;function EC(){if(!("fetch"in Kd))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function zd(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function CC(){if(typeof EdgeRuntime=="string")return!0;if(!EC())return!1;if(zd(Kd.fetch))return!0;let t=!1;const e=Kd.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=zd(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){Qi&&Te.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}const fg=1e3;function ds(){return Date.now()/fg}function _C(){const{performance:t}=bt;if(!t||!t.now)return ds;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/fg}const Zn=_C(),er=(()=>{const{performance:t}=bt;if(!t||!t.now)return;const e=3600*1e3,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=o<e,a=t.timing&&t.timing.navigationStart,c=typeof a=="number"?Math.abs(a+n-r):e,l=c<e;return i||l?o<=c?t.timeOrigin:a:r})();function hg(t,e){const n="fetch";Do(n,t),Mo(n,()=>pg(void 0,e))}function AC(t){const e="fetch-body-resolved";Do(e,t),Mo(e,()=>pg(IC))}function pg(t,e=!1){e&&!CC()||pr(bt,"fetch",function(n){return function(...r){const{method:o,url:i}=TC(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:Zn()*1e3};t||xr("fetch",{...a});const s=new Error().stack;return n.apply(bt,r).then(async c=>(t?t(c):xr("fetch",{...a,endTimestamp:Zn()*1e3,response:c}),c),c=>{throw xr("fetch",{...a,endTimestamp:Zn()*1e3,error:c}),Fd(c)&&c.stack===void 0&&(c.stack=s,Tr(c,"framesToPop",1)),c})}})}async function SC(t,e){if(t&&t.body){const n=t.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let a;try{a=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(a),s&&(e(),i=!1)}catch{i=!1}finally{clearTimeout(a)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function IC(t){let e;try{e=t.clone()}catch{return}SC(e,()=>{xr("fetch-body-resolved",{endTimestamp:Zn()*1e3,response:t})})}function $d(t,e){return!!t&&typeof t=="object"&&!!t[e]}function gg(t){return typeof t=="string"?t:t?$d(t,"url")?t.url:t.toString?t.toString():"":""}function TC(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:gg(n),method:$d(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:gg(e),method:$d(e,"method")?String(e.method).toUpperCase():"GET"}}let nu=null;function mg(t){const e="error";Do(e,t),Mo(e,xC)}function xC(){nu=bt.onerror,bt.onerror=function(t,e,n,r,o){return xr("error",{column:r,error:o,line:n,msg:t,url:e}),nu&&!nu.__SENTRY_LOADER__?nu.apply(this,arguments):!1},bt.onerror.__SENTRY_INSTRUMENTED__=!0}let ru=null;function yg(t){const e="unhandledrejection";Do(e,t),Mo(e,OC)}function OC(){ru=bt.onunhandledrejection,bt.onunhandledrejection=function(t){return xr("unhandledrejection",t),ru&&!ru.__SENTRY_LOADER__?ru.apply(this,arguments):!0},bt.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function PC(){return"npm"}function kC(){const t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(o){if(t)return e.has(o)?!0:(e.add(o),!1);for(let i=0;i<e.length;i++)if(e[i]===o)return!0;return e.push(o),!1}function r(o){if(t)e.delete(o);else for(let i=0;i<e.length;i++)if(e[i]===o){e.splice(i,1);break}}return[n,r]}function zt(){const t=bt,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function vg(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Lo(t){const{message:e,event_id:n}=t;if(e)return e;const r=vg(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Xd(t,e,n){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function fs(t,e){const n=vg(t);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...e},e&&"data"in e){const i={...o&&o.data,...e.data};n.mechanism.data=i}}function wg(t){if(t&&t.__sentry_captured__)return!0;try{Tr(t,"__sentry_captured__",!0)}catch{}return!1}function BC(t){return Array.isArray(t)?t:[t]}function Fo(t,e=100,n=1/0){try{return Qd("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function bg(t,e=3,n=100*1024){const r=Fo(t,e);return MC(r)>n?bg(t,e-1,n):r}function Qd(t,e,n=1/0,r=1/0,o=kC()){const[i,a]=o;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const s=NC(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return s.replace("object ","");if(i(e))return"[Circular ~]";const l=e;if(l&&typeof l.toJSON=="function")try{const p=l.toJSON();return Qd("",p,c-1,r,o)}catch{}const f=Array.isArray(e)?[]:{};let h=0;const d=og(e);for(const p in d){if(!Object.prototype.hasOwnProperty.call(d,p))continue;if(h>=r){f[p]="[MaxProperties ~]";break}const u=d[p];f[p]=Qd(p,u,c-1,r,o),h++}return a(e),f}function NC(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(X0(e))return"[VueViewModel]";if(Z8(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${so(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=RC(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function RC(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function DC(t){return~-encodeURI(t).split(/%..|./).length}function MC(t){return DC(JSON.stringify(t))}var co;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(co||(co={}));function di(t){return new Or(e=>{e(t)})}function ou(t){return new Or((e,n)=>{n(t)})}class Or{constructor(e){Or.prototype.__init.call(this),Or.prototype.__init2.call(this),Or.prototype.__init3.call(this),Or.prototype.__init4.call(this),this._state=co.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new Or((r,o)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(a){o(a)}},i=>{if(!n)o(i);else try{r(n(i))}catch(a){o(a)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Or((n,r)=>{let o,i;return this.then(a=>{i=!1,o=a,e&&e()},a=>{i=!0,o=a,e&&e()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=e=>{this._setResult(co.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(co.REJECTED,e)}}__init3(){this._setResult=(e,n)=>{if(this._state===co.PENDING){if(Qc(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===co.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===co.RESOLVED&&n[1](this._value),this._state===co.REJECTED&&n[2](this._value),n[0]=!0)})}}}function LC(t){const e=[];function n(){return t===void 0||e.length<t}function r(a){return e.splice(e.indexOf(a),1)[0]||Promise.resolve(void 0)}function o(a){if(!n())return ou(new Kr("Not adding Promise because buffer limit was reached."));const s=a();return e.indexOf(s)===-1&&e.push(s),s.then(()=>r(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(a){return new Or((s,c)=>{let l=e.length;if(!l)return s(!0);const f=setTimeout(()=>{a&&a>0&&s(!1)},a);e.forEach(h=>{di(h).then(()=>{--l||(clearTimeout(f),s(!0))},c)})})}return{$:e,add:o,drain:i}}function fi(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}const FC=["fatal","error","warning","log","info","debug"];function jC(t){return t==="warn"?"warning":FC.includes(t)?t:"log"}const Jd="baggage",Eg="sentry-",VC=/^sentry-/,UC=8192;function Cg(t){const e=GC(t);if(!e)return;const n=Object.entries(e).reduce((r,[o,i])=>{if(o.match(VC)){const a=o.slice(Eg.length);r[a]=i}return r},{});if(Object.keys(n).length>0)return n}function _g(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,o])=>(o&&(n[`${Eg}${r}`]=o),n),{});return qC(e)}function GC(t){if(!(!t||!io(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=Ag(n);return Object.entries(r).forEach(([o,i])=>{e[o]=i}),e},{}):Ag(t)}function Ag(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function qC(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],o)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=o===0?i:`${e},${i}`;return a.length>UC?(Qi&&Te.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):a},"")}const HC=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function WC(t){if(!t)return;const e=t.match(HC);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function YC(t,e){const n=WC(t),r=Cg(e),{traceId:o,parentSpanId:i,parentSampled:a}=n||{};return n?{traceId:o||zt(),parentSpanId:i||zt().substring(16),spanId:zt().substring(16),sampled:a,dsc:r||{}}:{traceId:o||zt(),spanId:zt().substring(16)}}function Zd(t=zt(),e=zt().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function Ji(t,e=[]){return[t,e]}function KC(t,e){const[n,r]=t;return[n,[...r,e]]}function Sg(t,e){const n=t[1];for(const r of n){const o=r[0].type;if(e(r,o))return!0}return!1}function ef(t){return bt.__SENTRY__&&bt.__SENTRY__.encodePolyfill?bt.__SENTRY__.encodePolyfill(t):new TextEncoder().encode(t)}function zC(t){const[e,n]=t;let r=JSON.stringify(e);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[ef(r),i]:r.push(typeof i=="string"?ef(i):i)}for(const i of n){const[a,s]=i;if(o(`
|
|
106
|
-
${JSON.stringify(a)}
|
|
107
|
-
`),typeof s=="string"||s instanceof Uint8Array)o(s);else{let c;try{c=JSON.stringify(s)}catch{c=JSON.stringify(Fo(s))}o(c)}}return typeof r=="string"?r:$C(r)}function $C(t){const e=t.reduce((o,i)=>o+i.length,0),n=new Uint8Array(e);let r=0;for(const o of t)n.set(o,r),r+=o.length;return n}function XC(t){return[{type:"span"},t]}function QC(t){const e=typeof t.data=="string"?ef(t.data):t.data;return[Mn({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const JC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Ig(t){return JC[t]}function Tg(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function ZC(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:ls(r)},...o&&{trace:Mn({...o})}}}function e_(t,e,n){const r=[{type:"client_report"},{timestamp:ds(),discarded_events:t}];return Ji(e?{dsn:e}:{},[r])}const t_=60*1e3;function n_(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?t_:r-e}function r_(t,e){return t[e]||t.all||0}function o_(t,e,n=Date.now()){return r_(t,e)>n}function i_(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},i=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(i)for(const s of i.trim().split(",")){const[c,l,,,f]=s.split(":",5),h=parseInt(c,10),d=(isNaN(h)?60:h)*1e3;if(!l)o.all=r+d;else for(const p of l.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[p]=r+d):o[p]=r+d}else a?o.all=r+n_(a,r):e===429&&(o.all=r+60*1e3);return o}function uo(t){let e,n=t[0],r=1;for(;r<t.length;){const o=t[r],i=t[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(e=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...a)=>n.call(e,...a)),e=void 0)}return n}function iu(){return{traceId:zt(),spanId:zt().substring(16)}}const au=bt;function a_(){const t=au.chrome,e=t&&t.app&&t.app.runtime,n="history"in au&&!!au.history.pushState&&!!au.history.replaceState;return!e&&n}const tt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Zi(){return tf(bt),bt}function tf(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||ci,e[ci]=e[ci]||{}}function nf(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Zn(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:zt()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}const rf="_sentrySpan";function hs(t,e){e?Tr(t,rf,e):delete t[rf]}function su(t){return t[rf]}const s_=100;class of{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=iu()}clone(){const e=new of;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,hs(e,su(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&nf(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,[r,o]=n instanceof jo?[n.getScopeData(),n.getRequestSession()]:zi(n)?[e,e.requestSession]:[],{tags:i,extra:a,user:s,contexts:c,level:l,fingerprint:f=[],propagationContext:h}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),f.length&&(this._fingerprint=f),h&&(this._propagationContext=h),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,hs(this,void 0),this._attachments=[],this._propagationContext=iu(),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:s_;if(r<=0)return this;const o={timestamp:ds(),...e},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:su(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n&&n.event_id?n.event_id:zt();if(!this._client)return Te.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureMessage(e,n,r){const o=r&&r.event_id?r.event_id:zt();if(!this._client)return Te.warn("No client configured on scope - will not capture message!"),o;const i=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:o},this),o}captureEvent(e,n){const r=n&&n.event_id?n.event_id:zt();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(Te.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}const jo=of;function c_(){return Jc("defaultCurrentScope",()=>new jo)}function u_(){return Jc("defaultIsolationScope",()=>new jo)}class l_{constructor(e,n){let r;e?r=e:r=new jo;let o;n?o=n:o=new jo,this._stack=[{scope:r}],this._isolationScope=o}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(o){throw this._popScope(),o}return Qc(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function ea(){const t=Zi(),e=tf(t);return e.stack=e.stack||new l_(c_(),u_())}function d_(t){return ea().withScope(t)}function f_(t,e){const n=ea();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function xg(t){return ea().withScope(()=>t(ea().getIsolationScope()))}function h_(){return{withIsolationScope:xg,withScope:d_,withSetScope:f_,withSetIsolationScope:(t,e)=>xg(e),getCurrentScope:()=>ea().getScope(),getIsolationScope:()=>ea().getIsolationScope()}}function ps(t){const e=tf(t);return e.acs?e.acs:h_()}function fn(){const t=Zi();return ps(t).getCurrentScope()}function ta(){const t=Zi();return ps(t).getIsolationScope()}function p_(){return Jc("globalScope",()=>new jo)}function af(...t){const e=Zi(),n=ps(e);if(t.length===2){const[r,o]=t;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(t[0])}function Bt(){return fn().getClient()}const g_="_sentryMetrics";function sf(t){const e=t[g_];if(!e)return;const n={};for(const[,[r,o]]of e)(n[r]||(n[r]=[])).push(Mn(o));return n}const lo="sentry.source",Og="sentry.sample_rate",Vo="sentry.op",hn="sentry.origin",cf="sentry.idle_span_finish_reason",cu="sentry.measurement_unit",uu="sentry.measurement_value",m_="sentry.profile_id",uf="sentry.exclusive_time",y_=0,Pg=1,wn=2;function v_(t){if(t<400&&t>=100)return{code:Pg};if(t>=400&&t<500)switch(t){case 401:return{code:wn,message:"unauthenticated"};case 403:return{code:wn,message:"permission_denied"};case 404:return{code:wn,message:"not_found"};case 409:return{code:wn,message:"already_exists"};case 413:return{code:wn,message:"failed_precondition"};case 429:return{code:wn,message:"resource_exhausted"};case 499:return{code:wn,message:"cancelled"};default:return{code:wn,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:wn,message:"unimplemented"};case 503:return{code:wn,message:"unavailable"};case 504:return{code:wn,message:"deadline_exceeded"};default:return{code:wn,message:"internal_error"}}return{code:wn,message:"unknown_error"}}function kg(t,e){t.setAttribute("http.response.status_code",e);const n=v_(e);n.message!=="unknown_error"&&t.setStatus(n)}const Bg=0,Ng=1;function w_(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:o,parent_span_id:i,status:a,origin:s}=Et(t);return Mn({parent_span_id:i,span_id:e,trace_id:n,data:r,op:o,status:a,origin:s})}function b_(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=Et(t);return Mn({parent_span_id:r,span_id:e,trace_id:n})}function Rg(t){const{traceId:e,spanId:n}=t.spanContext(),r=pi(t);return Zd(e,n,r)}function hi(t){return typeof t=="number"?Dg(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Dg(t.getTime()):Zn()}function Dg(t){return t>9999999999?t/1e3:t}function Et(t){if(C_(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(E_(t)){const{attributes:r,startTime:o,name:i,endTime:a,parentSpanId:s,status:c}=t;return Mn({span_id:e,trace_id:n,data:r,description:i,parent_span_id:s,start_timestamp:hi(o),timestamp:hi(a)||void 0,status:Mg(c),op:r[Vo],origin:r[hn],_metrics_summary:sf(t)})}return{span_id:e,trace_id:n}}catch{return{}}}function E_(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function C_(t){return typeof t.getSpanJSON=="function"}function pi(t){const{traceFlags:e}=t.spanContext();return e===Ng}function Mg(t){if(!(!t||t.code===y_))return t.code===Pg?"ok":t.message||"unknown_error"}const gi="_sentryChildSpans",lf="_sentryRootSpan";function Lg(t,e){const n=t[lf]||t;Tr(e,lf,n),t[gi]?t[gi].add(e):Tr(t,gi,new Set([e]))}function __(t,e){t[gi]&&t[gi].delete(e)}function lu(t){const e=new Set;function n(r){if(!e.has(r)&&pi(r)){e.add(r);const o=r[gi]?Array.from(r[gi]):[];for(const i of o)n(i)}}return n(t),Array.from(e)}function Ln(t){return t[lf]||t}function qn(){const t=Zi(),e=ps(t);return e.getActiveSpan?e.getActiveSpan():su(fn())}let Fg=!1;function A_(){Fg||(Fg=!0,mg(df),yg(df))}function df(){const t=qn(),e=t&&Ln(t);if(e){const n="internal_error";tt&&Te.log(`[Tracing] Root span: ${n} -> Global error occured`),e.setStatus({code:wn,message:n})}}df.tag="sentry_tracingErrorCallback";const jg="_sentryScope",Vg="_sentryIsolationScope";function S_(t,e,n){t&&(Tr(t,Vg,n),Tr(t,jg,e))}function Ug(t){return{scope:t[jg],isolationScope:t[Vg]}}function fo(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=Bt(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class na{constructor(e={}){this._traceId=e.traceId||zt(),this._spanId=e.spanId||zt().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Bg}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}const Gg="production",qg="_frozenDsc";function Hg(t,e){Tr(t,qg,e)}function du(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},o=Mn({environment:n.environment||Gg,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",o),o}function mi(t){const e=Bt();if(!e)return{};const n=du(Et(t).trace_id||"",e),r=Ln(t),o=r[qg];if(o)return o;const i=r.spanContext().traceState,a=i&&i.get("sentry.dsc"),s=a&&Cg(a);if(s)return s;const c=Et(r),l=c.data||{},f=l[Og];f!=null&&(n.sample_rate=`${f}`);const h=l[lo],d=c.description;return h!=="url"&&d&&(n.transaction=d),fo()&&(n.sampled=String(pi(r))),e.emit("createDsc",n,r),n}function I_(t){if(!tt)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=Et(t),{spanId:o}=t.spanContext(),i=pi(t),a=Ln(t),s=a===t,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${s?"root ":""}span`,l=[`op: ${n}`,`name: ${e}`,`ID: ${o}`];if(r&&l.push(`parent ID: ${r}`),!s){const{op:f,description:h}=Et(a);l.push(`root ID: ${a.spanContext().spanId}`),f&&l.push(`root op: ${f}`),h&&l.push(`root description: ${h}`)}Te.log(`${c}
|
|
108
|
-
${l.join(`
|
|
109
|
-
`)}`)}function T_(t){if(!tt)return;const{description:e="< unknown name >",op:n="< unknown op >"}=Et(t),{spanId:r}=t.spanContext(),i=Ln(t)===t,a=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${e}" with ID ${r}`;Te.log(a)}function Wg(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(typeof e!="number"||isNaN(e)||e<0||e>1){tt&&Te.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`);return}return e}function x_(t,e){if(!fo(t))return[!1];let n;typeof t.tracesSampler=="function"?n=t.tracesSampler(e):e.parentSampled!==void 0?n=e.parentSampled:typeof t.tracesSampleRate<"u"?n=t.tracesSampleRate:n=1;const r=Wg(n);return r===void 0?(tt&&Te.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()<r?[!0,r]:(tt&&Te.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(n)})`),[!1,r]):(tt&&Te.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,r])}function O_(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function P_(t,e,n,r){const o=Tg(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:ls(e)}},a="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return Ji(i,[a])}function k_(t,e,n,r){const o=Tg(n),i=t.type&&t.type!=="replay_event"?t.type:"event";O_(t,n&&n.sdk);const a=ZC(t,o,r,e);return delete t.sdkProcessingMetadata,Ji(a,[[{type:i},t]])}function B_(t,e){function n(f){return!!f.trace_id&&!!f.public_key}const r=mi(t[0]),o=e&&e.getDsn(),i=e&&e.getOptions().tunnel,a={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&o&&{dsn:ls(o)}},s=e&&e.getOptions().beforeSendSpan,c=s?f=>s(Et(f)):f=>Et(f),l=[];for(const f of t){const h=c(f);h&&l.push(XC(h))}return Ji(a,l)}function N_(t,e,n,r=qn()){const o=r&&Ln(r);o&&o.addEvent(t,{[uu]:e,[cu]:n})}function Yg(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},o=r[cu],i=r[uu];typeof o=="string"&&typeof i=="number"&&(e[n.name]={value:i,unit:o})}),e}const Kg=1e3;class ff{constructor(e={}){this._traceId=e.traceId||zt(),this._spanId=e.spanId||zt().substring(16),this._startTime=e.startTimestamp||Zn(),this._attributes={},this.setAttributes({[hn]:"manual",[Vo]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Ng:Bg}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=hi(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this}end(e){this._endTime||(this._endTime=hi(e),T_(this),this._onSpanEnded())}getSpanJSON(){return Mn({data:this._attributes,description:this._name,op:this._attributes[Vo],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Mg(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[hn],_metrics_summary:sf(this),profile_id:this._attributes[m_],exclusive_time:this._attributes[uf],measurements:Yg(this._events),is_segment:this._isStandaloneSpan&&Ln(this)===this||void 0,segment_id:this._isStandaloneSpan?Ln(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){tt&&Te.log("[Tracing] Adding an event to span:",e);const o=zg(n)?n:r||Zn(),i=zg(n)?{}:n||{},a={name:e,time:hi(o),attributes:i};return this._events.push(a),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Bt();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===Ln(this)))return;if(this._isStandaloneSpan){this._sampled?D_(B_([this],e)):(tt&&Te.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(Ug(this).scope||fn()).captureEvent(r)}_convertSpanToTransaction(){if(!$g(Et(this)))return;this._name||(tt&&Te.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=Ug(this),o=(e||fn()).getClient()||Bt();if(this._sampled!==!0){tt&&Te.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),o&&o.recordDroppedEvent("sample_rate","transaction");return}const a=lu(this).filter(h=>h!==this&&!R_(h)).map(h=>Et(h)).filter($g),s=this._attributes[lo],c={contexts:{trace:w_(this)},spans:a.length>Kg?a.sort((h,d)=>h.start_timestamp-d.start_timestamp).slice(0,Kg):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,...Mn({dynamicSamplingContext:mi(this)})},_metrics_summary:sf(this),...s&&{transaction_info:{source:s}}},l=Yg(this._events);return l&&Object.keys(l).length&&(tt&&Te.log("[Measurements] Adding measurements to transaction event",JSON.stringify(l,void 0,2)),c.measurements=l),c}}function zg(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function $g(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function R_(t){return t instanceof ff&&t.isStandaloneSpan()}function D_(t){const e=Bt();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}const r=e.getTransport();r&&r.send(t).then(null,o=>{tt&&Te.error("Error while sending span:",o)})}const Xg="__SENTRY_SUPPRESS_TRACING__";function Uo(t){const e=Jg();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=L_(t),{forceTransaction:r,parentSpan:o}=t;return(t.scope?a=>af(t.scope,a):o!==void 0?a=>Qg(o,a):a=>a())(()=>{const a=fn(),s=j_(a);return t.onlyIfParent&&!s?new na:M_({parentSpan:s,spanArguments:n,forceTransaction:r,scope:a})})}function Qg(t,e){const n=Jg();return n.withActiveSpan?n.withActiveSpan(t,e):af(r=>(hs(r,t||void 0),e(r)))}function M_({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!fo())return new na;const o=ta();let i;if(t&&!n)i=F_(t,r,e),Lg(t,i);else if(t){const a=mi(t),{traceId:s,spanId:c}=t.spanContext(),l=pi(t);i=Zg({traceId:s,parentSpanId:c,...e},r,l),Hg(i,a)}else{const{traceId:a,dsc:s,parentSpanId:c,sampled:l}={...o.getPropagationContext(),...r.getPropagationContext()};i=Zg({traceId:a,parentSpanId:c,...e},r,l),s&&Hg(i,s)}return I_(i),S_(i,r,o),i}function L_(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=hi(t.startTime),delete r.startTime,r}return n}function Jg(){const t=Zi();return ps(t)}function Zg(t,e,n){const r=Bt(),o=r&&r.getOptions()||{},{name:i="",attributes:a}=t,[s,c]=e.getScopeData().sdkProcessingMetadata[Xg]?[!1]:x_(o,{name:i,parentSampled:n,attributes:a,transactionContext:{name:i,parentSampled:n}}),l=new ff({...t,attributes:{[lo]:"custom",...t.attributes},sampled:s});return c!==void 0&&l.setAttribute(Og,c),r&&r.emit("spanStart",l),l}function F_(t,e,n){const{spanId:r,traceId:o}=t.spanContext(),i=e.getScopeData().sdkProcessingMetadata[Xg]?!1:pi(t),a=i?new ff({...n,parentSpanId:r,traceId:o,sampled:i}):new na({traceId:o});Lg(t,a);const s=Bt();return s&&(s.emit("spanStart",a),n.endTimestamp&&s.emit("spanEnd",a)),a}function j_(t){const e=su(t);if(!e)return;const n=Bt();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?Ln(e):e}const fu={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},V_="heartbeatFailed",U_="idleTimeout",G_="finalTimeout",q_="externalFinish";function em(t,e={}){const n=new Map;let r=!1,o,i=q_,a=!e.disableAutoFinish;const s=[],{idleTimeout:c=fu.idleTimeout,finalTimeout:l=fu.finalTimeout,childSpanTimeout:f=fu.childSpanTimeout,beforeSpanEnd:h}=e,d=Bt();if(!d||!fo())return new na;const p=fn(),u=qn(),g=H_(t);g.end=new Proxy(g.end,{apply(S,T,P){h&&h(g);const[N,...L]=P,U=N||Zn(),j=hi(U),K=lu(g).filter(te=>te!==g);if(!K.length)return C(j),Reflect.apply(S,T,[j,...L]);const G=K.map(te=>Et(te).timestamp).filter(te=>!!te),k=G.length?Math.max(...G):void 0,V=Et(g).start_timestamp,z=Math.min(V?V+l/1e3:1/0,Math.max(V||-1/0,Math.min(j,k||1/0)));return C(z),Reflect.apply(S,T,[z,...L])}});function m(){o&&(clearTimeout(o),o=void 0)}function y(S){m(),o=setTimeout(()=>{!r&&n.size===0&&a&&(i=U_,g.end(S))},c)}function w(S){o=setTimeout(()=>{!r&&a&&(i=V_,g.end(S))},f)}function b(S){m(),n.set(S,!0);const T=Zn();w(T+f/1e3)}function E(S){if(n.has(S)&&n.delete(S),n.size===0){const T=Zn();y(T+c/1e3)}}function C(S){r=!0,n.clear(),s.forEach(j=>j()),hs(p,u);const T=Et(g),{start_timestamp:P}=T;if(!P)return;(T.data||{})[cf]||g.setAttribute(cf,i),Te.log(`[Tracing] Idle span "${T.op}" finished`);const L=lu(g).filter(j=>j!==g);let U=0;L.forEach(j=>{j.isRecording()&&(j.setStatus({code:wn,message:"cancelled"}),j.end(S),tt&&Te.log("[Tracing] Cancelling span since span ended early",JSON.stringify(j,void 0,2)));const K=Et(j),{timestamp:G=0,start_timestamp:k=0}=K,V=k<=S,z=(l+c)/1e3,te=G-k<=z;if(tt){const re=JSON.stringify(j,void 0,2);V?te||Te.log("[Tracing] Discarding span since it finished after idle span final timeout",re):Te.log("[Tracing] Discarding span since it happened after idle span was finished",re)}(!te||!V)&&(__(g,j),U++)}),U>0&&g.setAttribute("sentry.idle_span_discarded_spans",U)}return s.push(d.on("spanStart",S=>{if(r||S===g||Et(S).timestamp)return;lu(g).includes(S)&&b(S.spanContext().spanId)})),s.push(d.on("spanEnd",S=>{r||E(S.spanContext().spanId)})),s.push(d.on("idleSpanEnableAutoFinish",S=>{S===g&&(a=!0,y(),n.size&&w())})),e.disableAutoFinish||y(),setTimeout(()=>{r||(g.setStatus({code:wn,message:"deadline_exceeded"}),i=G_,g.end())},l),g}function H_(t){const e=Uo(t);return hs(fn(),e),tt&&Te.log("[Tracing] Started span is an idle span"),e}function hf(t,e,n,r=0){return new Or((o,i)=>{const a=t[r];if(e===null||typeof a!="function")o(e);else{const s=a({...e},n);tt&&a.id&&s===null&&Te.log(`Event processor "${a.id}" dropped event`),Qc(s)?s.then(c=>hf(t,c,n,r+1).then(o)).then(null,i):hf(t,s,n,r+1).then(o).then(null,i)}})}function W_(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=e;Y_(t,e),r&&$_(t,r),X_(t,n),K_(t,o),z_(t,i)}function tm(t,e){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:f,attachments:h,propagationContext:d,transactionName:p,span:u}=e;gs(t,"extra",n),gs(t,"tags",r),gs(t,"user",o),gs(t,"contexts",i),gs(t,"sdkProcessingMetadata",s),a&&(t.level=a),p&&(t.transactionName=p),u&&(t.span=u),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),l.length&&(t.fingerprint=[...t.fingerprint,...l]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext={...t.propagationContext,...d}}function gs(t,e,n){if(n&&Object.keys(n).length){t[e]={...t[e]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[e][r]=n[r])}}function Y_(t,e){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=e,c=Mn(n);c&&Object.keys(c).length&&(t.extra={...c,...t.extra});const l=Mn(r);l&&Object.keys(l).length&&(t.tags={...l,...t.tags});const f=Mn(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=Mn(i);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts}),a&&(t.level=a),s&&t.type!=="transaction"&&(t.transaction=s)}function K_(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function z_(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function $_(t,e){t.contexts={trace:b_(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:mi(e),...t.sdkProcessingMetadata};const n=Ln(e),r=Et(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function X_(t,e){t.fingerprint=t.fingerprint?BC(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}function Q_(t,e,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=t,c={...e,event_id:e.event_id||n.event_id||zt(),timestamp:e.timestamp||ds()},l=n.integrations||t.integrations.map(m=>m.name);J_(c,t),t5(c,l),o&&o.emit("applyFrameMetadata",e),e.type===void 0&&Z_(c,t.stackParser);const f=r5(r,n.captureContext);n.mechanism&&fs(c,n.mechanism);const h=o?o.getEventProcessors():[],d=p_().getScopeData();if(i){const m=i.getScopeData();tm(d,m)}if(f){const m=f.getScopeData();tm(d,m)}const p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),W_(c,d);const u=[...h,...d.eventProcessors];return hf(u,c,n).then(m=>(m&&e5(m),typeof a=="number"&&a>0?n5(m,a,s):m))}function J_(t,e){const{environment:n,release:r,dist:o,maxValueLength:i=250}=e;"environment"in t||(t.environment="environment"in e?n:Gg),t.release===void 0&&r!==void 0&&(t.release=r),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=$i(t.message,i));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=$i(a.value,i));const s=t.request;s&&s.url&&(s.url=$i(s.url,i))}const nm=new WeakMap;function Z_(t,e){const n=bt._sentryDebugIds;if(!n)return;let r;const o=nm.get(e);o?r=o:(r=new Map,nm.set(e,r));const i=Object.entries(n).reduce((a,[s,c])=>{let l;const f=r.get(s);f?l=f:(l=e(s),r.set(s,l));for(let h=l.length-1;h>=0;h--){const d=l[h];if(d.filename){a[d.filename]=c;break}}return a},{});try{t.exception.values.forEach(a=>{a.stacktrace.frames.forEach(s=>{s.filename&&(s.debug_id=i[s.filename])})})}catch{}}function e5(t){const e={};try{t.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function t5(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function n5(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>({...o,...o.data&&{data:Fo(o.data,e,n)}}))},...t.user&&{user:Fo(t.user,e,n)},...t.contexts&&{contexts:Fo(t.contexts,e,n)},...t.extra&&{extra:Fo(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Fo(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(o=>({...o,...o.data&&{data:Fo(o.data,e,n)}}))),r}function r5(t,e){if(!e)return t;const n=t?t.clone():new jo;return n.update(e),n}function SR(t){}function rm(t,e){return fn().captureException(t,void 0)}function om(t,e){return fn().captureEvent(t,e)}const o5="7";function i5(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function a5(t){return`${i5(t)}${t.projectId}/envelope/`}function s5(t,e){return pC({sentry_key:t.publicKey,sentry_version:o5,...e&&{sentry_client:`${e.name}/${e.version}`}})}function c5(t,e,n){return e||`${a5(t)}?${s5(t,n)}`}const im=[];function u5(t,e){const n={};return e.forEach(r=>{r&&sm(t,r,n)}),n}function am(t,e){for(const n of e)n&&n.afterAllSetup&&n.afterAllSetup(t)}function sm(t,e,n){if(n[e.name]){tt&&Te.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,im.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),im.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,i)=>r(o,i,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),o=Object.assign((i,a)=>r(i,a,t),{id:e.name});t.addEventProcessor(o)}tt&&Te.log(`Integration installed: ${e.name}`)}function IR(t){return t}const cm="Not capturing exception because it's already been captured.";class l5{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=hC(e.dsn):tt&&Te.warn("No DSN provided, client will not send events."),this._dsn){const n=c5(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){const o=zt();if(wg(e))return tt&&Te.log(cm),o;const i={event_id:o,...n};return this._process(this.eventFromException(e,i).then(a=>this._captureEvent(a,i,r))),i.event_id}captureMessage(e,n,r,o){const i={event_id:zt(),...r},a=jd(e)?e:String(e),s=Vd(e)?this.eventFromMessage(a,n,i):this.eventFromException(e,i);return this._process(s.then(c=>this._captureEvent(c,i,o))),i.event_id}captureEvent(e,n,r){const o=zt();if(n&&n.originalException&&wg(n.originalException))return tt&&Te.log(cm),o;const i={event_id:o,...n},s=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,s||r)),i.event_id}captureSession(e){typeof e.release!="string"?tt&&Te.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),nf(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(o=>r&&o))):di(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];sm(this,e,this._integrations),n||am(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=k_(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=KC(r,QC(i));const o=this.sendEnvelope(r);o&&o.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const n=P_(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(e,n,r){if(this._options.sendClientReports){const o=typeof r=="number"?r:1,i=`${e}:${n}`;tt&&Te.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const o=r.indexOf(n);o>-1&&r.splice(o,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(o=>o(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(tt&&Te.error("Error while sending event:",n),n)):(tt&&Te.error("Transport disabled"),di({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=u5(this,e),am(this,e)}_updateSessionFromEvent(e,n){let r=!1,o=!1;const i=n.exception&&n.exception.values;if(i){o=!0;for(const c of i){const l=c.mechanism;if(l&&l.handled===!1){r=!0;break}}}const a=e.status==="ok";(a&&e.errors===0||a&&r)&&(nf(e,{...r&&{status:"crashed"},errors:e.errors||Number(o||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Or(n=>{let r=0;const o=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=o,e&&r>=e&&(clearInterval(i),n(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,o=ta()){const i=this.getOptions(),a=Object.keys(this._integrations);return!n.integrations&&a.length>0&&(n.integrations=a),this.emit("preprocessEvent",e,n),e.type||o.setLastEventId(e.event_id||n.event_id),Q_(i,e,n,r,this,o).then(s=>{if(s===null)return s;const c={...o.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(s.contexts&&s.contexts.trace)&&c){const{traceId:f,spanId:h,parentSpanId:d,dsc:p}=c;s.contexts={trace:Mn({trace_id:f,span_id:h,parent_span_id:d}),...s.contexts};const u=p||du(f,this);s.sdkProcessingMetadata={dynamicSamplingContext:u,...s.sdkProcessingMetadata}}return s})}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(o=>o.event_id,o=>{if(tt){const i=o;i.logLevel==="log"?Te.log(i.message):Te.warn(i)}})}_processEvent(e,n,r){const o=this.getOptions(),{sampleRate:i}=o,a=lm(e),s=um(e),c=e.type||"error",l=`before send for type \`${c}\``,f=typeof i>"u"?void 0:Wg(i);if(s&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",e),ou(new Kr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const h=c==="replay_event"?"replay":c,p=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,n,r,p).then(u=>{if(u===null)throw this.recordDroppedEvent("event_processor",h,e),new Kr("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return u;const m=f5(this,o,u,n);return d5(m,l)}).then(u=>{if(u===null){if(this.recordDroppedEvent("before_send",h,e),a){const w=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",w)}throw new Kr(`${l} returned \`null\`, will not send event.`,"log")}const g=r&&r.getSession();if(!a&&g&&this._updateSessionFromEvent(g,u),a){const y=u.sdkProcessingMetadata&&u.sdkProcessingMetadata.spanCountBeforeProcessing||0,w=u.spans?u.spans.length:0,b=y-w;b>0&&this.recordDroppedEvent("before_send","span",b)}const m=u.transaction_info;if(a&&m&&u.transaction!==e.transaction){const y="custom";u.transaction_info={...m,source:y}}return this.sendEvent(u,n),u}).then(null,u=>{throw u instanceof Kr?u:(this.captureException(u,{data:{__sentry__:!0},originalException:u}),new Kr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
110
|
-
Reason: ${u}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){tt&&Te.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){tt&&Te.log("No outcomes to send");return}if(!this._dsn){tt&&Te.log("No dsn provided, will not send outcomes");return}tt&&Te.log("Sending outcomes:",e);const n=e_(e,this._options.tunnel&&ls(this._dsn));this.sendEnvelope(n)}}function d5(t,e){const n=`${e} must return \`null\` or a valid event.`;if(Qc(t))return t.then(r=>{if(!zi(r)&&r!==null)throw new Kr(n);return r},r=>{throw new Kr(`${e} rejected with ${r}`)});if(!zi(t)&&t!==null)throw new Kr(n);return t}function f5(t,e,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a}=e;if(um(n)&&o)return o(n,r);if(lm(n)){if(n.spans&&a){const s=[];for(const c of n.spans){const l=a(c);l?s.push(l):t.recordDroppedEvent("before_send","span")}n.spans=s}if(i){if(n.spans){const s=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:s}}return i(n,r)}}return n}function um(t){return t.type===void 0}function lm(t){return t.type==="transaction"}const h5=64;function p5(t,e,n=LC(t.bufferSize||h5)){let r={};const o=a=>n.drain(a);function i(a){const s=[];if(Sg(a,(h,d)=>{const p=Ig(d);if(o_(r,p)){const u=dm(h,d);t.recordDroppedEvent("ratelimit_backoff",p,u)}else s.push(h)}),s.length===0)return di({});const c=Ji(a[0],s),l=h=>{Sg(c,(d,p)=>{const u=dm(d,p);t.recordDroppedEvent(h,Ig(p),u)})},f=()=>e({body:zC(c)}).then(h=>(h.statusCode!==void 0&&(h.statusCode<200||h.statusCode>=300)&&tt&&Te.warn(`Sentry responded with status code ${h.statusCode} to sent event.`),r=i_(r,h),h),h=>{throw l("network_error"),h});return n.add(f).then(h=>h,h=>{if(h instanceof Kr)return tt&&Te.error("Skipped sending event because buffer is full."),l("queue_overflow"),di({});throw h})}return{send:i,flush:o}}function dm(t,e){if(!(e!=="event"&&e!=="transaction"))return Array.isArray(t)?t[1]:void 0}function g5(t,e,n=[e],r="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:ci})),version:ci}),t._metadata=o}const m5=100;function yi(t,e){const n=Bt(),r=ta();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=m5}=n.getOptions();if(i<=0)return;const s={timestamp:ds(),...t},c=o?qd(()=>o(s,e)):s;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,i))}let fm;const y5="FunctionToString",hm=new WeakMap,v5=()=>({name:y5,setupOnce(){fm=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Hd(this),n=hm.has(Bt())&&e!==void 0?e:this;return fm.apply(n,t)}}catch{}},setup(t){hm.set(t,!0)}}),w5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],b5="InboundFilters",E5=(t={})=>({name:b5,processEvent(e,n,r){const o=r.getOptions(),i=C5(t,o);return _5(e,i)?null:e}});function C5(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:w5],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function _5(t,e){return e.ignoreInternal&&O5(t)?(tt&&Te.warn(`Event dropped due to being internal Sentry Error.
|
|
111
|
-
Event: ${Lo(t)}`),!0):A5(t,e.ignoreErrors)?(tt&&Te.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
112
|
-
Event: ${Lo(t)}`),!0):k5(t)?(tt&&Te.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
113
|
-
Event: ${Lo(t)}`),!0):S5(t,e.ignoreTransactions)?(tt&&Te.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
114
|
-
Event: ${Lo(t)}`),!0):I5(t,e.denyUrls)?(tt&&Te.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
115
|
-
Event: ${Lo(t)}.
|
|
116
|
-
Url: ${hu(t)}`),!0):T5(t,e.allowUrls)?!1:(tt&&Te.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
117
|
-
Event: ${Lo(t)}.
|
|
118
|
-
Url: ${hu(t)}`),!0)}function A5(t,e){return t.type||!e||!e.length?!1:x5(t).some(n=>si(n,e))}function S5(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?si(n,e):!1}function I5(t,e){if(!e||!e.length)return!1;const n=hu(t);return n?si(n,e):!1}function T5(t,e){if(!e||!e.length)return!0;const n=hu(t);return n?si(n,e):!0}function x5(t){const e=[];t.message&&e.push(t.message);let n;try{n=t.exception.values[t.exception.values.length-1]}catch{}return n&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`)),e}function O5(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function P5(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function hu(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?P5(e):null}catch{return tt&&Te.error(`Cannot extract url for event ${Lo(t)}`),null}}function k5(t){return t.type||!t.exception||!t.exception.values||t.exception.values.length===0?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}const B5="Dedupe",N5=()=>{let t;return{name:B5,processEvent(e){if(e.type)return e;try{if(R5(e,t))return tt&&Te.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function R5(t,e){return e?!!(D5(t,e)||M5(t,e)):!1}function D5(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!gm(t,e)||!pm(t,e))}function M5(t,e){const n=mm(e),r=mm(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!gm(t,e)||!pm(t,e))}function pm(t,e){let n=lg(t),r=lg(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const i=r[o],a=n[o];if(i.filename!==a.filename||i.lineno!==a.lineno||i.colno!==a.colno||i.function!==a.function)return!1}return!0}function gm(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function mm(t){return t.exception&&t.exception.values&&t.exception.values[0]}function L5(t,e,n,r,o="auto.http.browser"){if(!t.fetchData)return;const i=fo()&&e(t.fetchData.url);if(t.endTimestamp&&i){const u=t.fetchData.__span;if(!u)return;const g=r[u];g&&(V5(g,t),delete r[u]);return}const a=fn(),s=Bt(),{method:c,url:l}=t.fetchData,f=j5(l),h=f?fi(f).host:void 0,d=!!qn(),p=i&&d?Uo({name:`${c} ${l}`,attributes:{url:l,type:"fetch","http.method":c,"http.url":f,"server.address":h,[hn]:o,[Vo]:"http.client"}}):new na;if(t.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(t.fetchData.url)&&s){const u=t.args[0];t.args[1]=t.args[1]||{};const g=t.args[1];g.headers=F5(u,s,a,g,fo()&&d?p:void 0)}return p}function F5(t,e,n,r,o){const i=ta(),{traceId:a,spanId:s,sampled:c,dsc:l}={...i.getPropagationContext(),...n.getPropagationContext()},f=o?Rg(o):Zd(a,s,c),h=_g(l||(o?mi(o):du(a,e))),d=r.headers||(typeof Request<"u"&&ao(t,Request)?t.headers:void 0);if(d)if(typeof Headers<"u"&&ao(d,Headers)){const p=new Headers(d);return p.append("sentry-trace",f),h&&p.append(Jd,h),p}else if(Array.isArray(d)){const p=[...d,["sentry-trace",f]];return h&&p.push([Jd,h]),p}else{const p="baggage"in d?d.baggage:void 0,u=[];return Array.isArray(p)?u.push(...p):p&&u.push(p),h&&u.push(h),{...d,"sentry-trace":f,baggage:u.length>0?u.join(","):void 0}}else return{"sentry-trace":f,baggage:h}}function j5(t){try{return new URL(t).href}catch{return}}function V5(t,e){if(e.response){kg(t,e.response.status);const n=e.response&&e.response.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:wn,message:"internal_error"});t.end()}const ct=bt;let pf=0;function ym(){return pf>0}function U5(){pf++,setTimeout(()=>{pf--})}function ra(t,e={},n){if(typeof t!="function")return t;try{const o=t.__sentry_wrapped__;if(o)return typeof o=="function"?o:t;if(Hd(t))return t}catch{return t}const r=function(){const o=Array.prototype.slice.call(arguments);try{const i=o.map(a=>ra(a,e));return t.apply(this,i)}catch(i){throw U5(),af(a=>{a.addEventProcessor(s=>(e.mechanism&&(Xd(s,void 0),fs(s,e.mechanism)),s.extra={...s.extra,arguments:o},s)),rm(i)}),i}};try{for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch{}rg(r,t),Tr(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}const ho=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function gf(t,e){const n=yf(t,e),r={type:Y5(e),value:K5(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function G5(t,e,n,r){const o=Bt(),i=o&&o.getOptions().normalizeDepth,a=J5(e),s={__serialized__:bg(e,i)};if(a)return{exception:{values:[gf(t,a)]},extra:s};const c={exception:{values:[{type:Xc(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:X5(e,{isUnhandledRejection:r})}]},extra:s};if(n){const l=yf(t,n);l.length&&(c.exception.values[0].stacktrace={frames:l})}return c}function mf(t,e){return{exception:{values:[gf(t,e)]}}}function yf(t,e){const n=e.stacktrace||e.stack||"",r=H5(e),o=W5(e);try{return t(n,r,o)}catch{}return[]}const q5=/Minified React error #\d+;/i;function H5(t){return t&&q5.test(t.message)?1:0}function W5(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function vm(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Y5(t){const e=t&&t.name;return!e&&vm(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function K5(t){const e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:vm(t)&&Array.isArray(t.message)&&t.message.length==2?t.message[1]:e:"No error message"}function z5(t,e,n,r){const o=n&&n.syntheticException||void 0,i=vf(t,e,o,r);return fs(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),di(i)}function $5(t,e,n="info",r,o){const i=r&&r.syntheticException||void 0,a=wf(t,e,i,o);return a.level=n,r&&r.event_id&&(a.event_id=r.event_id),di(a)}function vf(t,e,n,r,o){let i;if(z0(e)&&e.error)return mf(t,e.error);if($0(e)||X8(e)){const a=e;if("stack"in e)i=mf(t,e);else{const s=a.name||($0(a)?"DOMError":"DOMException"),c=a.message?`${s}: ${a.message}`:s;i=wf(t,c,n,r),Xd(i,c)}return"code"in a&&(i.tags={...i.tags,"DOMException.code":`${a.code}`}),i}return Fd(e)?mf(t,e):zi(e)||Xc(e)?(i=G5(t,e,n,o),fs(i,{synthetic:!0}),i):(i=wf(t,e,n,r),Xd(i,`${e}`),fs(i,{synthetic:!0}),i)}function wf(t,e,n,r){const o={};if(r&&n){const i=yf(t,n);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}if(jd(e)){const{__sentry_template_string__:i,__sentry_template_values__:a}=e;return o.logentry={message:i,params:a},o}return o.message=e,o}function X5(t,{isUnhandledRejection:e}){const n=gC(t),r=e?"promise rejection":"exception";return z0(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Xc(t)?`Event \`${Q5(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Q5(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function J5(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}function Z5(t,{metadata:e,tunnel:n,dsn:r}){const o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:ls(r)}},i=eA(t);return Ji(o,[i])}function eA(t){return[{type:"user_report"},t]}class tA extends l5{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},r=ct.SENTRY_SDK_SOURCE||PC();g5(n,"browser",["browser"],r),super(n),n.sendClientReports&&ct.document&&ct.document.addEventListener("visibilitychange",()=>{ct.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return z5(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return $5(this._options.stackParser,e,n,r,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled()){ho&&Te.warn("SDK not enabled, will not capture user feedback.");return}const n=Z5(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}}const gr=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nA=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",oa=(t,e,n,r)=>{let o,i;return a=>{e.value>=0&&(a||r)&&(i=e.value-(o||0),(i||o===void 0)&&(o=e.value,e.delta=i,e.rating=nA(e.value,n),t(e)))}},We=bt,rA=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ms=()=>We.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],ys=()=>{const t=ms();return t&&t.activationStart||0},ia=(t,e)=>{const n=ms();let r="navigate";return n&&(We.document&&We.document.prerendering||ys()>0?r="prerender":We.document&&We.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:rA(),navigationType:r}},vi=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{e(o.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},vs=t=>{const e=n=>{(n.type==="pagehide"||We.document&&We.document.visibilityState==="hidden")&&t(n)};We.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},bf=t=>{let e=!1;return n=>{e||(t(n),e=!0)}};let ws=-1;const oA=()=>{ws=We.document.visibilityState==="hidden"&&!We.document.prerendering?0:1/0},pu=t=>{We.document.visibilityState==="hidden"&&ws>-1&&(ws=t.type==="visibilitychange"?t.timeStamp:0,removeEventListener("visibilitychange",pu,!0),removeEventListener("prerenderingchange",pu,!0))},iA=()=>{addEventListener("visibilitychange",pu,!0),addEventListener("prerenderingchange",pu,!0)},gu=()=>(We.document&&ws<0&&(oA(),iA()),{get firstHiddenTime(){return ws}}),bs=t=>{We.document&&We.document.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},aA=[1800,3e3],sA=(t,e={})=>{bs(()=>{const n=gu(),r=ia("FCP");let o;const a=vi("paint",s=>{s.forEach(c=>{c.name==="first-contentful-paint"&&(a.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ys(),0),r.entries.push(c),o(!0)))})});a&&(o=oa(t,r,aA,e.reportAllChanges))})},cA=[.1,.25],uA=(t,e={})=>{sA(bf(()=>{const n=ia("CLS",0);let r,o=0,i=[];const a=c=>{c.forEach(l=>{if(!l.hadRecentInput){const f=i[0],h=i[i.length-1];o&&f&&h&&l.startTime-h.startTime<1e3&&l.startTime-f.startTime<5e3?(o+=l.value,i.push(l)):(o=l.value,i=[l])}}),o>n.value&&(n.value=o,n.entries=i,r())},s=vi("layout-shift",a);s&&(r=oa(t,n,cA,e.reportAllChanges),vs(()=>{a(s.takeRecords()),r(!0)}),setTimeout(r,0))}))},lA=[100,300],dA=(t,e={})=>{bs(()=>{const n=gu(),r=ia("FID");let o;const i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),o(!0))},a=c=>{c.forEach(i)},s=vi("first-input",a);o=oa(t,r,lA,e.reportAllChanges),s&&vs(bf(()=>{a(s.takeRecords()),s.disconnect()}))})};let wm=0,Ef=1/0,mu=0;const fA=t=>{t.forEach(e=>{e.interactionId&&(Ef=Math.min(Ef,e.interactionId),mu=Math.max(mu,e.interactionId),wm=mu?(mu-Ef)/7+1:0)})};let Cf;const hA=()=>Cf?wm:performance.interactionCount||0,pA=()=>{"interactionCount"in performance||Cf||(Cf=vi("event",fA,{type:"event",buffered:!0,durationThreshold:0}))},gA=[200,500],mA=0,bm=()=>hA()-mA,Em=10,po=[],_f={},Cm=t=>{const e=po[po.length-1],n=_f[t.interactionId];if(n||po.length<Em||e&&t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};_f[r.id]=r,po.push(r)}po.sort((r,o)=>o.latency-r.latency),po.splice(Em).forEach(r=>{delete _f[r.id]})}},yA=()=>{const t=Math.min(po.length-1,Math.floor(bm()/50));return po[t]},vA=(t,e={})=>{bs(()=>{pA();const n=ia("INP");let r;const o=a=>{a.forEach(c=>{c.interactionId&&Cm(c),c.entryType==="first-input"&&!po.some(f=>f.entries.some(h=>c.duration===h.duration&&c.startTime===h.startTime))&&Cm(c)});const s=yA();s&&s.latency!==n.value&&(n.value=s.latency,n.entries=s.entries,r())},i=vi("event",o,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:40});r=oa(t,n,gA,e.reportAllChanges),i&&("PerformanceEventTiming"in We&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),vs(()=>{o(i.takeRecords()),n.value<0&&bm()>0&&(n.value=0,n.entries=[]),r(!0)}))})},wA=[2500,4e3],_m={},bA=(t,e={})=>{bs(()=>{const n=gu(),r=ia("LCP");let o;const i=s=>{const c=s[s.length-1];c&&c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ys(),0),r.entries=[c],o())},a=vi("largest-contentful-paint",i);if(a){o=oa(t,r,wA,e.reportAllChanges);const s=bf(()=>{_m[r.id]||(i(a.takeRecords()),a.disconnect(),_m[r.id]=!0,o(!0))});["keydown","click"].forEach(c=>{We.document&&addEventListener(c,()=>setTimeout(s,0),!0)}),vs(s)}})},EA=[800,1800],Af=t=>{We.document&&We.document.prerendering?bs(()=>Af(t)):We.document&&We.document.readyState!=="complete"?addEventListener("load",()=>Af(t),!0):setTimeout(t,0)},CA=(t,e={})=>{const n=ia("TTFB"),r=oa(t,n,EA,e.reportAllChanges);Af(()=>{const o=ms();if(o){const i=o.responseStart;if(i<=0||i>performance.now())return;n.value=Math.max(i-ys(),0),n.entries=[o],r(!0)}})},Es={},yu={};let Am,Sm,Im,Tm,xm;function Om(t,e=!1){return _s("cls",t,TA,Am,e)}function _A(t,e=!1){return _s("lcp",t,OA,Im,e)}function AA(t){return _s("fid",t,xA,Sm)}function SA(t){return _s("ttfb",t,PA,Tm)}function IA(t){return _s("inp",t,kA,xm)}function Cs(t,e){return Pm(t,e),yu[t]||(BA(t),yu[t]=!0),km(t,e)}function aa(t,e){const n=Es[t];if(!(!n||!n.length))for(const r of n)try{r(e)}catch(o){gr&&Te.error(`Error while triggering instrumentation handler.
|
|
119
|
-
Type: ${t}
|
|
120
|
-
Name: ${so(r)}
|
|
121
|
-
Error:`,o)}}function TA(){return uA(t=>{aa("cls",{metric:t}),Am=t},{reportAllChanges:!0})}function xA(){return dA(t=>{aa("fid",{metric:t}),Sm=t})}function OA(){return bA(t=>{aa("lcp",{metric:t}),Im=t},{reportAllChanges:!0})}function PA(){return CA(t=>{aa("ttfb",{metric:t}),Tm=t})}function kA(){return vA(t=>{aa("inp",{metric:t}),xm=t})}function _s(t,e,n,r,o=!1){Pm(t,e);let i;return yu[t]||(i=n(),yu[t]=!0),r&&e({metric:r}),km(t,e,o?i:void 0)}function BA(t){const e={};t==="event"&&(e.durationThreshold=0),vi(t,n=>{aa(t,{entries:n})},e)}function Pm(t,e){Es[t]=Es[t]||[],Es[t].push(e)}function km(t,e,n){return()=>{n&&n();const r=Es[t];if(!r)return;const o=r.indexOf(e);o!==-1&&r.splice(o,1)}}function NA(t){return"duration"in t}function Sf(t){return typeof t=="number"&&isFinite(t)}function sa(t,e,n,{...r}){const o=Et(t).start_timestamp;return o&&o>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Qg(t,()=>{const i=Uo({startTime:e,...r});return i&&i.end(n),i})}function Bm(t){const e=Bt();if(!e)return;const{name:n,transaction:r,attributes:o,startTime:i}=t,{release:a,environment:s}=e.getOptions(),c=e.getIntegrationByName("Replay"),l=c&&c.getReplayId(),f=fn(),h=f.getUser(),d=h!==void 0?h.email||h.id||h.ip_address:void 0;let p;try{p=f.getScopeData().contexts.profile.profile_id}catch{}const u={release:a,environment:s,user:d||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":We.navigator&&We.navigator.userAgent,...o};return Uo({name:n,attributes:u,startTime:i,experimental:{standalone:!0}})}function If(){return We&&We.addEventListener&&We.performance}function Jt(t){return t/1e3}function RA(){let t=0,e,n;if(!MA())return;let r=!1;function o(){r||(r=!0,n&&DA(t,e,n),i())}const i=Om(({metric:a})=>{const s=a.entries[a.entries.length-1];s&&(t=a.value,e=s)},!0);vs(()=>{o()}),setTimeout(()=>{const a=Bt(),s=uo([a,"optionalAccess",h=>h.on,"call",h=>h("startNavigationSpan",()=>{o(),s&&s()})]),c=qn(),l=c&&Ln(c),f=l&&Et(l);f&&f.op==="pageload"&&(n=l.spanContext().spanId)},0)}function DA(t,e,n){gr&&Te.log(`Sending CLS span (${t})`);const r=Jt((er||0)+(uo([e,"optionalAccess",c=>c.startTime])||0)),o=fn().getScopeData().transactionName,i=e?ui(uo([e,"access",c=>c.sources,"access",c=>c[0],"optionalAccess",c=>c.node])):"Layout shift",a=Mn({[hn]:"auto.http.browser.cls",[Vo]:"ui.webvital.cls",[uf]:uo([e,"optionalAccess",c=>c.duration])||0,"sentry.pageload.span_id":n}),s=Bm({name:i,transaction:o,attributes:a,startTime:r});uo([s,"optionalAccess",c=>c.addEvent,"call",c=>c("cls",{[cu]:"",[uu]:t})]),uo([s,"optionalAccess",c=>c.end,"call",c=>c(r)])}function MA(){try{return uo([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch{return!1}}const LA=2147483647;let Nm=0,xn={},zr,As;function FA({recordClsStandaloneSpans:t}){const e=If();if(e&&er){e.mark&&We.performance.mark("sentry-tracing-init");const n=HA(),r=qA(),o=WA(),i=t?RA():GA();return()=>{n(),r(),o(),i&&i()}}return()=>{}}function jA(){Cs("longtask",({entries:t})=>{if(qn())for(const e of t){const n=Jt(er+e.startTime),r=Jt(e.duration),o=Uo({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[hn]:"auto.ui.browser.metrics"}});o&&o.end(n+r)}})}function VA(){new PerformanceObserver(e=>{if(qn())for(const n of e.getEntries()){if(!n.scripts[0])continue;const r=Jt(er+n.startTime),o=Jt(n.duration),i={[hn]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:f,sourceCharPosition:h}=a;i["browser.script.invoker"]=s,i["browser.script.invoker_type"]=c,l&&(i["code.filepath"]=l),f&&(i["code.function"]=f),h!==-1&&(i["browser.script.source_char_position"]=h);const d=Uo({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:i});d&&d.end(r+o)}}).observe({type:"long-animation-frame",buffered:!0})}function UA(){Cs("event",({entries:t})=>{if(qn()){for(const e of t)if(e.name==="click"){const n=Jt(er+e.startTime),r=Jt(e.duration),o={name:ui(e.target),op:`ui.interaction.${e.name}`,startTime:n,attributes:{[hn]:"auto.ui.browser.metrics"}},i=tg(e.target);i&&(o.attributes["ui.component_name"]=i);const a=Uo(o);a&&a.end(n+r)}}})}function GA(){return Om(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(gr&&Te.log(`[Measurements] Adding CLS ${t.value}`),xn.cls={value:t.value,unit:""},As=e)},!0)}function qA(){return _A(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(gr&&Te.log("[Measurements] Adding LCP"),xn.lcp={value:t.value,unit:"millisecond"},zr=e)},!0)}function HA(){return AA(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Jt(er),r=Jt(e.startTime);gr&&Te.log("[Measurements] Adding FID"),xn.fid={value:t.value,unit:"millisecond"},xn["mark.fid"]={value:n+r,unit:"second"}})}function WA(){return SA(({metric:t})=>{t.entries[t.entries.length-1]&&(gr&&Te.log("[Measurements] Adding TTFB"),xn.ttfb={value:t.value,unit:"millisecond"})})}function YA(t,e){const n=If();if(!n||!We.performance.getEntries||!er)return;gr&&Te.log("[Tracing] Adding & adjusting spans using Performance API");const r=Jt(er),o=n.getEntries(),{op:i,start_timestamp:a}=Et(t);if(o.slice(Nm).forEach(s=>{const c=Jt(s.startTime),l=Jt(Math.max(0,s.duration));if(!(i==="navigation"&&a&&r+c<a))switch(s.entryType){case"navigation":{zA(t,s,r);break}case"mark":case"paint":case"measure":{KA(t,s,c,l,r);const f=gu(),h=s.startTime<f.firstHiddenTime;s.name==="first-paint"&&h&&(gr&&Te.log("[Measurements] Adding FP"),xn.fp={value:s.startTime,unit:"millisecond"}),s.name==="first-contentful-paint"&&h&&(gr&&Te.log("[Measurements] Adding FCP"),xn.fcp={value:s.startTime,unit:"millisecond"});break}case"resource":{XA(t,s,s.name,c,l,r);break}}}),Nm=Math.max(o.length-1,0),QA(t),i==="pageload"){ZA(xn);const s=xn["mark.fid"];s&&xn.fid&&(sa(t,s.value,s.value+Jt(xn.fid.value),{name:"first input delay",op:"ui.action",attributes:{[hn]:"auto.ui.browser.metrics"}}),delete xn["mark.fid"]),(!("fcp"in xn)||!e.recordClsOnPageloadSpan)&&delete xn.cls,Object.entries(xn).forEach(([c,l])=>{N_(c,l.value,l.unit)}),t.setAttribute("performance.timeOrigin",r),t.setAttribute("performance.activationStart",ys()),JA(t)}zr=void 0,As=void 0,xn={}}function KA(t,e,n,r,o){const i=ms(),a=Jt(i?i.requestStart:0),s=o+Math.max(n,a),c=o+n,l=c+r,f={[hn]:"auto.resource.browser.metrics"};return s!==c&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=s),sa(t,s,l,{name:e.name,op:e.entryType,attributes:f}),s}function zA(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{vu(t,e,r,n)}),vu(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),vu(t,e,"fetch",n,"cache","domainLookupStart"),vu(t,e,"domainLookup",n,"DNS"),$A(t,e,n)}function vu(t,e,n,r,o,i){const a=i?e[i]:e[`${n}End`],s=e[`${n}Start`];!s||!a||sa(t,r+Jt(s),r+Jt(a),{op:`browser.${o||n}`,name:e.name,attributes:{[hn]:"auto.ui.browser.metrics"}})}function $A(t,e,n){const r=n+Jt(e.requestStart),o=n+Jt(e.responseEnd),i=n+Jt(e.responseStart);e.responseEnd&&(sa(t,r,o,{op:"browser.request",name:e.name,attributes:{[hn]:"auto.ui.browser.metrics"}}),sa(t,i,o,{op:"browser.response",name:e.name,attributes:{[hn]:"auto.ui.browser.metrics"}}))}function XA(t,e,n,r,o,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const a=fi(n),s={[hn]:"auto.resource.browser.metrics"};Tf(s,e,"transferSize","http.response_transfer_size"),Tf(s,e,"encodedBodySize","http.response_content_length"),Tf(s,e,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in e&&(s["resource.render_blocking_status"]=e.renderBlockingStatus),a.protocol&&(s["url.scheme"]=a.protocol.split(":").pop()),a.host&&(s["server.address"]=a.host),s["url.same_origin"]=n.includes(We.location.origin);const c=i+r,l=c+o;sa(t,c,l,{name:n.replace(We.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:s})}function QA(t){const e=We.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),Sf(n.rtt)&&(xn["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Sf(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),Sf(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function JA(t){zr&&(gr&&Te.log("[Measurements] Adding LCP Data"),zr.element&&t.setAttribute("lcp.element",ui(zr.element)),zr.id&&t.setAttribute("lcp.id",zr.id),zr.url&&t.setAttribute("lcp.url",zr.url.trim().slice(0,200)),t.setAttribute("lcp.size",zr.size)),As&&As.sources&&(gr&&Te.log("[Measurements] Adding CLS Data"),As.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,ui(e.node))))}function Tf(t,e,n,r){const o=e[n];o!=null&&o<LA&&(t[r]=o)}function ZA(t){const e=ms();if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(gr&&Te.log("[Measurements] Adding TTFB Request Time"),t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const eS=1e3;let Rm,xf,Of;function tS(t){const e="dom";Do(e,t),Mo(e,nS)}function nS(){if(!We.document)return;const t=xr.bind(null,"dom"),e=Dm(t,!0);We.document.addEventListener("click",e,!1),We.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const r=We[n]&&We[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(pr(r,"addEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},f=l[i]=l[i]||{refCount:0};if(!f.handler){const h=Dm(t);f.handler=h,o.call(this,i,h,s)}f.refCount++}catch{}return o.call(this,i,a,s)}}),pr(r,"removeEventListener",function(o){return function(i,a,s){if(i==="click"||i=="keypress")try{const c=this,l=c.__sentry_instrumentation_handlers__||{},f=l[i];f&&(f.refCount--,f.refCount<=0&&(o.call(this,i,f.handler,s),f.handler=void 0,delete l[i]),Object.keys(l).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,s)}}))})}function rS(t){if(t.type!==xf)return!1;try{if(!t.target||t.target._sentryId!==Of)return!1}catch{}return!0}function oS(t,e){return t!=="keypress"?!1:!e||!e.tagName?!0:!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)}function Dm(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=iS(n);if(oS(n.type,r))return;Tr(n,"_sentryCaptured",!0),r&&!r._sentryId&&Tr(r,"_sentryId",zt());const o=n.type==="keypress"?"input":n.type;rS(n)||(t({event:n,name:o,global:e}),xf=n.type,Of=r?r._sentryId:void 0),clearTimeout(Rm),Rm=We.setTimeout(()=>{Of=void 0,xf=void 0},eS)}}function iS(t){try{return t.target}catch{return null}}let wu;function Mm(t){const e="history";Do(e,t),Mo(e,aS)}function aS(){if(!a_())return;const t=We.onpopstate;We.onpopstate=function(...n){const r=We.location.href,o=wu;if(wu=r,xr("history",{from:o,to:r}),t)try{return t.apply(this,n)}catch{}};function e(n){return function(...r){const o=r.length>2?r[2]:void 0;if(o){const i=wu,a=String(o);wu=a,xr("history",{from:i,to:a})}return n.apply(this,r)}}pr(We.history,"pushState",e),pr(We.history,"replaceState",e)}const bu={};function sS(t){const e=bu[t];if(e)return e;let n=We[t];if(zd(n))return bu[t]=n.bind(We);const r=We.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const i=o.contentWindow;i&&i[t]&&(n=i[t]),r.head.removeChild(o)}catch(o){gr&&Te.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,o)}return n&&(bu[t]=n.bind(We))}function Lm(t){bu[t]=void 0}const ca="__sentry_xhr_v3__";function Fm(t){const e="xhr";Do(e,t),Mo(e,cS)}function cS(){if(!We.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const o=Zn()*1e3,i=io(r[0])?r[0].toUpperCase():void 0,a=uS(r[1]);if(!i||!a)return e.apply(n,r);n[ca]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=()=>{const c=n[ca];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const l={endTimestamp:Zn()*1e3,startTimestamp:o,xhr:n};xr("xhr",l)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,l,f){return s(),c.apply(l,f)}}):n.addEventListener("readystatechange",s),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,l,f){const[h,d]=f,p=l[ca];return p&&io(h)&&io(d)&&(p.request_headers[h.toLowerCase()]=d),c.apply(l,f)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const o=n[ca];if(!o)return e.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const i={startTimestamp:Zn()*1e3,xhr:n};return xr("xhr",i),e.apply(n,r)}})}function uS(t){if(io(t))return t;try{return t.toString()}catch{}}const Pf=[],Eu=new Map;function lS(){if(If()&&er){const e=dS();return()=>{e()}}return()=>{}}const jm={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function dS(){return IA(({metric:t})=>{if(t.value==null)return;const e=t.entries.find(u=>u.duration===t.value&&jm[u.name]);if(!e)return;const{interactionId:n}=e,r=jm[e.name],o=Jt(er+e.startTime),i=Jt(t.value),a=qn(),s=a?Ln(a):void 0,l=(n!=null?Eu.get(n):void 0)||s,f=l?Et(l).description:fn().getScopeData().transactionName,h=ui(e.target),d=Mn({[hn]:"auto.http.browser.inp",[Vo]:`ui.interaction.${r}`,[uf]:e.duration}),p=Bm({name:h,transaction:f,attributes:d,startTime:o});uo([p,"optionalAccess",u=>u.addEvent,"call",u=>u("inp",{[cu]:"millisecond",[uu]:t.value})]),uo([p,"optionalAccess",u=>u.end,"call",u=>u(o+i)])})}function fS(t){const e=({entries:n})=>{const r=qn(),o=r&&Ln(r);n.forEach(i=>{if(!NA(i)||!o)return;const a=i.interactionId;if(a!=null&&!Eu.has(a)){if(Pf.length>10){const s=Pf.shift();Eu.delete(s)}Pf.push(a),Eu.set(a,o)}})};Cs("event",e),Cs("first-input",e)}function hS(t,e=sS("fetch")){let n=0,r=0;function o(i){const a=i.body.length;n+=a,r++;const s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Lm("fetch"),ou("No fetch implementation available");try{return e(t.url,s).then(c=>(n-=a,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Lm("fetch"),n-=a,r--,ou(c)}}return p5(t,o)}const pS=30,gS=50;function kf(t,e,n,r){const o={filename:t,function:e==="<anonymous>"?li:e,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const mS=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,yS=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,vS=/\((\S*)(?::(\d+))(?::(\d+))\)/,wS=[pS,t=>{const e=mS.exec(t);if(e){const[,r,o,i]=e;return kf(r,li,+o,+i)}const n=yS.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const a=vS.exec(n[2]);a&&(n[2]=a[1],n[3]=a[2],n[4]=a[3])}const[o,i]=Vm(n[1]||li,n[2]);return kf(i,o,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],bS=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ES=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,CS=yC(...[wS,[gS,t=>{const e=bS.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=ES.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],o=e[1]||li;return[o,r]=Vm(o,r),kf(r,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]]),Vm=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:li,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Cu=1024,_S="Breadcrumbs",AS=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:_S,setup(n){e.console&&wC(TS(n)),e.dom&&tS(IS(n,e.dom)),e.xhr&&Fm(xS(n)),e.fetch&&hg(OS(n)),e.history&&Mm(PS(n)),e.sentry&&n.on("beforeSendEvent",SS(n))}}};function SS(t){return function(n){Bt()===t&&yi({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Lo(n)},{event:n})}}function IS(t,e){return function(r){if(Bt()!==t)return;let o,i,a=typeof e=="object"?e.serializeAttribute:void 0,s=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;s&&s>Cu&&(ho&&Te.warn(`\`dom.maxStringLength\` cannot exceed ${Cu}, but a value of ${s} was configured. Sentry will use ${Cu} instead.`),s=Cu),typeof a=="string"&&(a=[a]);try{const l=r.event,f=kS(l)?l.target:l;o=ui(f,{keyAttrs:a,maxStringLength:s}),i=tg(f)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),yi(c,{event:r.event,name:r.name,global:r.global})}}function TS(t){return function(n){if(Bt()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:jC(n.level),message:Q0(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Q0(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;yi(r,{input:n.args,level:n.level})}}function xS(t){return function(n){if(Bt()!==t)return;const{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[ca];if(!r||!o||!i)return;const{method:a,url:s,status_code:c,body:l}=i,f={method:a,url:s,status_code:c},h={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:o},d=eg(c);yi({category:"xhr",data:f,type:"http",level:d},h)}}function OS(t){return function(n){if(Bt()!==t)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,a={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o};yi({category:"fetch",data:i,level:"error",type:"http"},a)}else{const i=n.response,a={...n.fetchData,status_code:i&&i.status},s={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c=eg(a.status_code);yi({category:"fetch",data:a,type:"http",level:c},s)}}}function PS(t){return function(n){if(Bt()!==t)return;let r=n.from,o=n.to;const i=fi(ct.location.href);let a=r?fi(r):void 0;const s=fi(o);(!a||!a.path)&&(a=i),i.protocol===s.protocol&&i.host===s.host&&(o=s.relative),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),yi({category:"navigation",data:{from:r,to:o}})}}function kS(t){return!!t&&!!t.target}const BS=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],NS="BrowserApiErrors",RS=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:NS,setupOnce(){e.setTimeout&&pr(ct,"setTimeout",Um),e.setInterval&&pr(ct,"setInterval",Um),e.requestAnimationFrame&&pr(ct,"requestAnimationFrame",DS),e.XMLHttpRequest&&"XMLHttpRequest"in ct&&pr(XMLHttpRequest.prototype,"send",MS);const n=e.eventTarget;n&&(Array.isArray(n)?n:BS).forEach(LS)}}};function Um(t){return function(...e){const n=e[0];return e[0]=ra(n,{mechanism:{data:{function:so(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function DS(t){return function(e){return t.apply(this,[ra(e,{mechanism:{data:{function:"requestAnimationFrame",handler:so(t)},handled:!1,type:"instrument"}})])}}function MS(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&pr(n,o,function(i){const a={mechanism:{data:{function:o,handler:so(i)},handled:!1,type:"instrument"}},s=Hd(i);return s&&(a.mechanism.data.handler=so(s)),ra(i,a)})}),t.apply(this,e)}}function LS(t){const e=ct,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(pr(n,"addEventListener",function(r){return function(o,i,a){try{typeof i.handleEvent=="function"&&(i.handleEvent=ra(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:so(i),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[o,ra(i,{mechanism:{data:{function:"addEventListener",handler:so(i),target:t},handled:!1,type:"instrument"}}),a])}}),pr(n,"removeEventListener",function(r){return function(o,i,a){const s=i;try{const c=s&&s.__sentry_wrapped__;c&&r.call(this,o,c,a)}catch{}return r.call(this,o,s,a)}}))}const FS="GlobalHandlers",jS=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:FS,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(VS(n),Gm("onerror")),e.onunhandledrejection&&(US(n),Gm("onunhandledrejection"))}}};function VS(t){mg(e=>{const{stackParser:n,attachStacktrace:r}=qm();if(Bt()!==t||ym())return;const{msg:o,url:i,line:a,column:s,error:c}=e,l=HS(vf(n,c||o,void 0,r,!1),i,a,s);l.level="error",om(l,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function US(t){yg(e=>{const{stackParser:n,attachStacktrace:r}=qm();if(Bt()!==t||ym())return;const o=GS(e),i=Vd(o)?qS(o):vf(n,o,void 0,r,!0);i.level="error",om(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function GS(t){if(Vd(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function qS(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function HS(t,e,n,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},c=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,h=io(e)&&e.length>0?e:iC();return c.length===0&&c.push({colno:l,filename:h,function:li,in_app:!0,lineno:f}),t}function Gm(t){ho&&Te.log(`Global Handler attached: ${t}`)}function qm(){const t=Bt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const WS=()=>({name:"HttpContext",preprocessEvent(t){if(!ct.navigator&&!ct.location&&!ct.document)return;const e=t.request&&t.request.url||ct.location&&ct.location.href,{referrer:n}=ct.document||{},{userAgent:r}=ct.navigator||{},o={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:o};t.request=i}}),YS="cause",KS=5,zS="LinkedErrors",$S=(t={})=>{const e=t.limit||KS,n=t.key||YS;return{name:zS,preprocessEvent(r,o,i){const a=i.getOptions();tC(gf,a.stackParser,a.maxValueLength,n,e,r,o)}}};function XS(t){return[E5(),v5(),RS(),AS(),jS(),$S(),N5(),WS()]}const Hm=new WeakMap,Bf=new Map,Nf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function QS(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a}={traceFetch:Nf.traceFetch,traceXHR:Nf.traceXHR,...e},s=typeof o=="function"?o:f=>!0,c=f=>t7(f,a),l={};n&&(t.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(h=>{if(h.op==="http.client"){const d=Bf.get(h.span_id);d&&(h.timestamp=d/1e3,Bf.delete(h.span_id))}}),f)),AC(f=>{if(f.response){const h=Hm.get(f.response);h&&f.endTimestamp&&Bf.set(h,f.endTimestamp)}}),hg(f=>{const h=L5(f,s,c,l);if(f.response&&f.fetchData.__span&&Hm.set(f.response,f.fetchData.__span),h){const d=Ym(f.fetchData.url),p=d?fi(d).host:void 0;h.setAttributes({"http.url":d,"server.address":p})}i&&h&&Wm(h)})),r&&Fm(f=>{const h=n7(f,s,c,l);i&&h&&Wm(h)})}function JS(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Wm(t){const{url:e}=Et(t).data||{};if(!e||typeof e!="string")return;const n=Cs("resource",({entries:r})=>{r.forEach(o=>{JS(o)&&o.name.endsWith(e)&&(e7(o).forEach(a=>t.setAttribute(...a)),setTimeout(n))})})}function ZS(t){let e="unknown",n="unknown",r="";for(const o of t){if(o==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(o))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=o}return r===t&&(e=r),{name:e,version:n}}function $r(t=0){return((er||performance.timeOrigin)+t)/1e3}function e7(t){const{name:e,version:n}=ZS(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),er?[...r,["http.request.redirect_start",$r(t.redirectStart)],["http.request.fetch_start",$r(t.fetchStart)],["http.request.domain_lookup_start",$r(t.domainLookupStart)],["http.request.domain_lookup_end",$r(t.domainLookupEnd)],["http.request.connect_start",$r(t.connectStart)],["http.request.secure_connection_start",$r(t.secureConnectionStart)],["http.request.connection_end",$r(t.connectEnd)],["http.request.request_start",$r(t.requestStart)],["http.request.response_start",$r(t.responseStart)],["http.request.response_end",$r(t.responseEnd)]]:r}function t7(t,e){const n=ct.location&&ct.location.href;if(n){let r,o;try{r=new URL(t,n),o=new URL(n).origin}catch{return!1}const i=r.origin===o;return e?si(r.toString(),e)||i&&si(r.pathname,e):i}else{const r=!!t.match(/^\/(?!\/)/);return e?si(t,e):r}}function n7(t,e,n,r){const o=t.xhr,i=o&&o[ca];if(!o||o.__sentry_own_request__||!i)return;const a=fo()&&e(i.url);if(t.endTimestamp&&a){const d=o.__sentry_xhr_span_id__;if(!d)return;const p=r[d];p&&i.status_code!==void 0&&(kg(p,i.status_code),p.end(),delete r[d]);return}const s=Ym(i.url),c=s?fi(s).host:void 0,l=!!qn(),f=a&&l?Uo({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":s,url:i.url,"server.address":c,[hn]:"auto.http.browser",[Vo]:"http.client"}}):new na;o.__sentry_xhr_span_id__=f.spanContext().spanId,r[o.__sentry_xhr_span_id__]=f;const h=Bt();return o.setRequestHeader&&n(i.url)&&h&&r7(o,h,fo()&&l?f:void 0),f}function r7(t,e,n){const r=fn(),o=ta(),{traceId:i,spanId:a,sampled:s,dsc:c}={...o.getPropagationContext(),...r.getPropagationContext()},l=n&&fo()?Rg(n):Zd(i,a,s),f=_g(c||(n?mi(n):du(i,e)));o7(t,l,f)}function o7(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader(Jd,n)}catch{}}function Ym(t){try{return new URL(t,ct.location.origin).href}catch{return}}function i7(){ct&&ct.document?ct.document.addEventListener("visibilitychange",()=>{const t=qn();if(!t)return;const e=Ln(t);if(ct.document.hidden&&e){const n="cancelled",{op:r,status:o}=Et(e);ho&&Te.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||e.setStatus({code:wn,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):ho&&Te.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const a7="BrowserTracing",s7={...fu,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Nf},c7=(t={})=>{A_();const{enableInp:e,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:o,enableStandaloneClsSpans:i},beforeStartSpan:a,idleTimeout:s,finalTimeout:c,childSpanTimeout:l,markBackgroundSpan:f,traceFetch:h,traceXHR:d,shouldCreateSpanForRequest:p,enableHTTPTimings:u,instrumentPageLoad:g,instrumentNavigation:m}={...s7,...t},y=FA({recordClsStandaloneSpans:i||!1});e&&lS(),r&&bt.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?VA():n&&jA(),o&&UA();const w={name:void 0,source:void 0};function b(E,C){const S=C.op==="pageload",T=a?a(C):C,P=T.attributes||{};C.name!==T.name&&(P[lo]="custom",T.attributes=P),w.name=T.name,w.source=P[lo];const N=em(T,{idleTimeout:s,finalTimeout:c,childSpanTimeout:l,disableAutoFinish:S,beforeSpanEnd:U=>{y(),YA(U,{recordClsOnPageloadSpan:!i})}});function L(){["interactive","complete"].includes(ct.document.readyState)&&E.emit("idleSpanEnableAutoFinish",N)}return S&&ct.document&&(ct.document.addEventListener("readystatechange",()=>{L()}),L()),N}return{name:a7,afterAllSetup(E){let C,S=ct.location&&ct.location.href;E.on("startNavigationSpan",T=>{Bt()===E&&(C&&!Et(C).timestamp&&(ho&&Te.log(`[Tracing] Finishing current root span with op: ${Et(C).op}`),C.end()),C=b(E,{op:"navigation",...T}))}),E.on("startPageLoadSpan",(T,P={})=>{if(Bt()!==E)return;C&&!Et(C).timestamp&&(ho&&Te.log(`[Tracing] Finishing current root span with op: ${Et(C).op}`),C.end());const N=P.sentryTrace||zm("sentry-trace"),L=P.baggage||zm("baggage"),U=YC(N,L);fn().setPropagationContext(U),C=b(E,{op:"pageload",...T})}),E.on("spanEnd",T=>{const P=Et(T).op;if(T!==Ln(T)||P!=="navigation"&&P!=="pageload")return;const N=fn(),L=N.getPropagationContext();N.setPropagationContext({...L,sampled:L.sampled!==void 0?L.sampled:pi(T),dsc:L.dsc||mi(T)})}),ct.location&&(g&&Km(E,{name:ct.location.pathname,startTime:er?er/1e3:void 0,attributes:{[lo]:"url",[hn]:"auto.pageload.browser"}}),m&&Mm(({to:T,from:P})=>{if(P===void 0&&S&&S.indexOf(T)!==-1){S=void 0;return}P!==T&&(S=void 0,u7(E,{name:ct.location.pathname,attributes:{[lo]:"url",[hn]:"auto.navigation.browser"}}))})),f&&i7(),o&&l7(s,c,l,w),e&&fS(),QS(E,{traceFetch:h,traceXHR:d,tracePropagationTargets:E.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:p,enableHTTPTimings:u})}}};function Km(t,e,n){t.emit("startPageLoadSpan",e,n),fn().setTransactionName(e.name);const r=qn();return(r&&Et(r).op)==="pageload"?r:void 0}function u7(t,e){ta().setPropagationContext(iu()),fn().setPropagationContext(iu()),t.emit("startNavigationSpan",e),fn().setTransactionName(e.name);const n=qn();return(n&&Et(n).op)==="navigation"?n:void 0}function zm(t){const e=aC(`meta[name=${t}]`);return e?e.getAttribute("content"):void 0}function l7(t,e,n,r){let o;const i=()=>{const a="ui.action.click",s=qn(),c=s&&Ln(s);if(c){const l=Et(c).op;if(["navigation","pageload"].includes(l)){ho&&Te.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(cf,"interactionInterrupted"),o.end(),o=void 0),!r.name){ho&&Te.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=em({name:r.name,op:a,attributes:{[lo]:r.source||"url"}},{idleTimeout:t,finalTimeout:e,childSpanTimeout:n})};ct.document&&addEventListener("click",i,{once:!1,capture:!0})}var Rf={exports:{}},At={};/** @license React v16.13.1
|
|
122
|
-
* react-is.production.min.js
|
|
123
|
-
*
|
|
124
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the MIT license found in the
|
|
127
|
-
* LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/var $m;function d7(){if($m)return At;$m=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,u=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function b(C){if(typeof C=="object"&&C!==null){var S=C.$$typeof;switch(S){case e:switch(C=C.type,C){case c:case l:case r:case i:case o:case h:return C;default:switch(C=C&&C.$$typeof,C){case s:case f:case u:case p:case a:return C;default:return S}}case n:return S}}}function E(C){return b(C)===l}return At.AsyncMode=c,At.ConcurrentMode=l,At.ContextConsumer=s,At.ContextProvider=a,At.Element=e,At.ForwardRef=f,At.Fragment=r,At.Lazy=u,At.Memo=p,At.Portal=n,At.Profiler=i,At.StrictMode=o,At.Suspense=h,At.isAsyncMode=function(C){return E(C)||b(C)===c},At.isConcurrentMode=E,At.isContextConsumer=function(C){return b(C)===s},At.isContextProvider=function(C){return b(C)===a},At.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===e},At.isForwardRef=function(C){return b(C)===f},At.isFragment=function(C){return b(C)===r},At.isLazy=function(C){return b(C)===u},At.isMemo=function(C){return b(C)===p},At.isPortal=function(C){return b(C)===n},At.isProfiler=function(C){return b(C)===i},At.isStrictMode=function(C){return b(C)===o},At.isSuspense=function(C){return b(C)===h},At.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===l||C===i||C===o||C===h||C===d||typeof C=="object"&&C!==null&&(C.$$typeof===u||C.$$typeof===p||C.$$typeof===a||C.$$typeof===s||C.$$typeof===f||C.$$typeof===m||C.$$typeof===y||C.$$typeof===w||C.$$typeof===g)},At.typeOf=b,At}var St={};/** @license React v16.13.1
|
|
129
|
-
* react-is.development.js
|
|
130
|
-
*
|
|
131
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the MIT license found in the
|
|
134
|
-
* LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/var Xm;function f7(){return Xm||(Xm=1,process.env.NODE_ENV!=="production"&&function(){var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,u=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,y=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function b(B){return typeof B=="string"||typeof B=="function"||B===r||B===l||B===i||B===o||B===h||B===d||typeof B=="object"&&B!==null&&(B.$$typeof===u||B.$$typeof===p||B.$$typeof===a||B.$$typeof===s||B.$$typeof===f||B.$$typeof===m||B.$$typeof===y||B.$$typeof===w||B.$$typeof===g)}function E(B){if(typeof B=="object"&&B!==null){var X=B.$$typeof;switch(X){case e:var ee=B.type;switch(ee){case c:case l:case r:case i:case o:case h:return ee;default:var Z=ee&&ee.$$typeof;switch(Z){case s:case f:case u:case p:case a:return Z;default:return X}}case n:return X}}}var C=c,S=l,T=s,P=a,N=e,L=f,U=r,j=u,K=p,G=n,k=i,V=o,z=h,te=!1;function re(B){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ne(B)||E(B)===c}function ne(B){return E(B)===l}function se(B){return E(B)===s}function we(B){return E(B)===a}function le(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function Ce(B){return E(B)===f}function ye(B){return E(B)===r}function H(B){return E(B)===u}function W(B){return E(B)===p}function J(B){return E(B)===n}function I(B){return E(B)===i}function M(B){return E(B)===o}function F(B){return E(B)===h}St.AsyncMode=C,St.ConcurrentMode=S,St.ContextConsumer=T,St.ContextProvider=P,St.Element=N,St.ForwardRef=L,St.Fragment=U,St.Lazy=j,St.Memo=K,St.Portal=G,St.Profiler=k,St.StrictMode=V,St.Suspense=z,St.isAsyncMode=re,St.isConcurrentMode=ne,St.isContextConsumer=se,St.isContextProvider=we,St.isElement=le,St.isForwardRef=Ce,St.isFragment=ye,St.isLazy=H,St.isMemo=W,St.isPortal=J,St.isProfiler=I,St.isStrictMode=M,St.isSuspense=F,St.isValidElementType=b,St.typeOf=E}()),St}process.env.NODE_ENV==="production"?Rf.exports=d7():Rf.exports=f7();var h7=Rf.exports,Qm=h7,p7={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},g7={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Jm={};Jm[Qm.ForwardRef]=p7,Jm[Qm.Memo]=g7;const m7=new WeakSet;function y7(t){const e=c7({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:n,useLocation:r,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:a,stripBasename:s,instrumentPageLoad:c=!0,instrumentNavigation:l=!0}=t;return{...e,setup(){},afterAllSetup(f){e.afterAllSetup(f);const h=ct&&ct.location&&ct.location.pathname;c&&h&&Km(f,{name:h,attributes:{[lo]:"url",[Vo]:"pageload",[hn]:"auto.pageload.react.reactrouter_v6"}}),l&&m7.add(f)}}}function v7(){const{t}=Ve(),[e,n]=x.useState(!1);return v.jsx("div",{className:"default-bg-colors flex h-screen items-center justify-center",children:v.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-300 bg-white shadow-lg",children:[v.jsx("div",{className:"border-b border-gray-200 bg-gray-50 px-6 pb-3 pt-4 shadow",children:v.jsx("h2",{className:"text-3xl",children:"Oops!"})}),v.jsx("p",{className:"mt-4 px-6 text-gray-900",children:t("sorrySomethingWentWrong")}),v.jsx("div",{className:"mt-10 p-6",children:v.jsx(nt,{onClick:()=>{n(!0),window.location.replace("/")},pending:e,label:t("back")})})]})})}class w7 extends x.Component{constructor(e){super(e),this.state={hasError:!1,scope:void 0}}componentDidMount(){const e=XS().filter(o=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(o.name)),n=new tA({dsn:"https://5b16c396f6e8f6e4b0b87455bea7e96b@o80526.ingest.us.sentry.io/4507345428283392",transport:hS,stackParser:CS,integrations:[...e,y7({useEffect:x.useEffect,useLocation:Sn,useNavigationType:sE,createRoutesFromChildren:Cc,matchRoutes:l1})]}),r=new jo;r.setClient(n),n.init(),this.setState({...this.state,scope:r})}componentDidCatch(e,n){console.error("ErrorBoundary: ",e,n),this.state.scope.captureException(e),this.setState({...this.state,hasError:!0})}render(){return this.state.hasError?v.jsx(v7,{}):this.props.children}}function qe(){const t=x.useContext(Lh);if(!t)throw new Error("Only use 'usePortalSessionContext' within a PortalSessionProvider");return t}const b7={[rn.GENERIC]:Ge.GENERIC,[rn.PORTAL]:Ge.PORTAL,[rn.POINTS_TRANSACTION]:Ge.POINTS_TRANSACTION,[rn.PREPAID]:Ge.PREPAID,[rn.PAY_PREPAID]:Ge.PREPAID,[rn.TOP_UP_PREPAID]:Ge.PREPAID,[rn.VOUCHER]:Ge.VOUCHER,[rn.GIFTCARD]:Ge.GIFTCARD,[rn.REDEEM_GIFTCARD]:Ge.GIFTCARD,[rn.TOP_UP_GIFTCARD]:Ge.GIFTCARD};function E7(){const{portalSession:t}=qe();return v.jsx(Ar,{to:b7[t.type]})}function wi({onSubmit:t,children:e}){const n=r=>{r.preventDefault(),t&&t(r)};return v.jsx("form",{onSubmit:n,children:e})}const Zm=x.createContext({cameraService:1,cameraFacingMode:An.USER,primaryIdentificationMethod:Ni.IDENTIFIER});function qt(){const t=x.useContext(Zm);if(!t)throw new Error("Only use 'useConfigurationContext' within a ConfigurationContext Provider");return t}var Ne={},Df={exports:{}};(function(t,e){(function(n,r){var o="1.0.40",i="",a="?",s="function",c="undefined",l="object",f="string",h="major",d="model",p="name",u="type",g="vendor",m="version",y="architecture",w="console",b="mobile",E="tablet",C="smarttv",S="wearable",T="embedded",P=500,N="Amazon",L="Apple",U="ASUS",j="BlackBerry",K="Browser",G="Chrome",k="Edge",V="Firefox",z="Google",te="Huawei",re="LG",ne="Microsoft",se="Motorola",we="Opera",le="Samsung",Ce="Sharp",ye="Sony",H="Xiaomi",W="Zebra",J="Facebook",I="Chromium OS",M="Mac OS",F=" Browser",B=function(xe,De){var Pe={};for(var ot in xe)De[ot]&&De[ot].length%2===0?Pe[ot]=De[ot].concat(xe[ot]):Pe[ot]=xe[ot];return Pe},X=function(xe){for(var De={},Pe=0;Pe<xe.length;Pe++)De[xe[Pe].toUpperCase()]=xe[Pe];return De},ee=function(xe,De){return typeof xe===f?Z(De).indexOf(Z(xe))!==-1:!1},Z=function(xe){return xe.toLowerCase()},$=function(xe){return typeof xe===f?xe.replace(/[^\d\.]/g,i).split(".")[0]:r},pe=function(xe,De){if(typeof xe===f)return xe=xe.replace(/^\s\s*/,i),typeof De===c?xe:xe.substring(0,P)},be=function(xe,De){for(var Pe=0,ot,Ze,Ot,Le,_e,$t;Pe<De.length&&!_e;){var Ht=De[Pe],Cn=De[Pe+1];for(ot=Ze=0;ot<Ht.length&&!_e&&Ht[ot];)if(_e=Ht[ot++].exec(xe),_e)for(Ot=0;Ot<Cn.length;Ot++)$t=_e[++Ze],Le=Cn[Ot],typeof Le===l&&Le.length>0?Le.length===2?typeof Le[1]==s?this[Le[0]]=Le[1].call(this,$t):this[Le[0]]=Le[1]:Le.length===3?typeof Le[1]===s&&!(Le[1].exec&&Le[1].test)?this[Le[0]]=$t?Le[1].call(this,$t,Le[2]):r:this[Le[0]]=$t?$t.replace(Le[1],Le[2]):r:Le.length===4&&(this[Le[0]]=$t?Le[3].call(this,$t.replace(Le[1],Le[2])):r):this[Le]=$t||r;Pe+=2}},fe=function(xe,De){for(var Pe in De)if(typeof De[Pe]===l&&De[Pe].length>0){for(var ot=0;ot<De[Pe].length;ot++)if(ee(De[Pe][ot],xe))return Pe===a?r:Pe}else if(ee(De[Pe],xe))return Pe===a?r:Pe;return De.hasOwnProperty("*")?De["*"]:xe},he={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},ve={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ue={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,m],[/opios[\/ ]+([\w\.]+)/i],[m,[p,we+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[p,we+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[p,we]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[p,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[m,[p,"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)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,m],[/quark(?:pc)?\/([-\w\.]+)/i],[m,[p,"Quark"]],[/\bddg\/([\w\.]+)/i],[m,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[p,"UC"+K]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[p,"Smart Lenovo "+K]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+K],m],[/\bfocus\/([\w\.]+)/i],[m,[p,V+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[p,we+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[p,we+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[p,"MIUI"+F]],[/fxios\/([\w\.-]+)/i],[m,[p,V]],[/\bqihoobrowser\/?([\w\.]*)/i],[m,[p,"360"]],[/\b(qq)\/([\w\.]+)/i],[[p,/(.+)/,"$1Browser"],m],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1"+F],m],[/samsungbrowser\/([\w\.]+)/i],[m,[p,le+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[m,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[p,m],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[p],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[m,p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,J],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[p,G+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,G+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[p,"Android "+K]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[m,fe,he]],[/(webkit|khtml)\/([\w\.]+)/i],[p,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],m],[/(wolvic|librewolf)\/([\w\.]+)/i],[p,m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[p,V+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[p,[m,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[p,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[y,"amd64"]],[/(ia32(?=;))/i],[[y,Z]],[/((?:i[346]|x)86)[;\)]/i],[[y,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/windows (ce|mobile); ppc;/i],[[y,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[y,/ower/,i,Z]],[/(sun4\w)[;\)]/i],[[y,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[y,Z]]],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],[d,[g,le],[u,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[d,[g,le],[u,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[g,L],[u,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[g,L],[u,E]],[/(macintosh);/i],[d,[g,L]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[g,Ce],[u,b]],[/(?:honor)([-\w ]+)[;\)]/i],[d,[g,"Honor"],[u,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[g,te],[u,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[g,te],[u,b]],[/\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],[[d,/_/g," "],[g,H],[u,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[g,H],[u,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[g,"OPPO"],[u,b]],[/\b(opd2\d{3}a?) bui/i],[d,[g,"OPPO"],[u,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[g,"Vivo"],[u,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[g,"Realme"],[u,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[g,se],[u,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[g,se],[u,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[g,re],[u,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[g,re],[u,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[g,"Lenovo"],[u,E]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[g,"Nokia"],[u,b]],[/(pixel c)\b/i],[d,[g,z],[u,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[g,z],[u,b]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[g,ye],[u,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[g,ye],[u,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[g,"OnePlus"],[u,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[g,N],[u,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[g,N],[u,b]],[/(playbook);[-\w\),; ]+(rim)/i],[d,g,[u,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[g,j],[u,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[g,U],[u,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[g,U],[u,b]],[/(nexus 9)/i],[d,[g,"HTC"],[u,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[d,/_/g," "],[u,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[d,[g,"TCL"],[u,E]],[/(itel) ((\w+))/i],[[g,Z],d,[u,fe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[g,"Acer"],[u,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[g,"Meizu"],[u,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[g,"Ulefone"],[u,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[d,[g,"Energizer"],[u,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[d,[g,"Cat"],[u,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[d,[g,"Smartfren"],[u,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[d,[g,"Nothing"],[u,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,d,[u,b]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,d,[u,E]],[/(surface duo)/i],[d,[g,ne],[u,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[g,"Fairphone"],[u,b]],[/(u304aa)/i],[d,[g,"AT&T"],[u,b]],[/\bsie-(\w*)/i],[d,[g,"Siemens"],[u,b]],[/\b(rct\w+) b/i],[d,[g,"RCA"],[u,E]],[/\b(venue[\d ]{2,7}) b/i],[d,[g,"Dell"],[u,E]],[/\b(q(?:mv|ta)\w+) b/i],[d,[g,"Verizon"],[u,E]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[g,"Barnes & Noble"],[u,E]],[/\b(tm\d{3}\w+) b/i],[d,[g,"NuVision"],[u,E]],[/\b(k88) b/i],[d,[g,"ZTE"],[u,E]],[/\b(nx\d{3}j) b/i],[d,[g,"ZTE"],[u,b]],[/\b(gen\d{3}) b.+49h/i],[d,[g,"Swiss"],[u,b]],[/\b(zur\d{3}) b/i],[d,[g,"Swiss"],[u,E]],[/\b((zeki)?tb.*\b) b/i],[d,[g,"Zeki"],[u,E]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],d,[u,E]],[/\b(ns-?\w{0,9}) b/i],[d,[g,"Insignia"],[u,E]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[g,"NextBook"],[u,E]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],d,[u,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],d,[u,b]],[/\b(ph-1) /i],[d,[g,"Essential"],[u,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[g,"Envizen"],[u,E]],[/\b(trio[-\w\. ]+) b/i],[d,[g,"MachSpeed"],[u,E]],[/\btu_(1491) b/i],[d,[g,"Rotor"],[u,E]],[/(shield[\w ]+) b/i],[d,[g,"Nvidia"],[u,E]],[/(sprint) (\w+)/i],[g,d,[u,b]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[g,ne],[u,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[g,W],[u,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[g,W],[u,b]],[/smart-tv.+(samsung)/i],[g,[u,C]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[g,le],[u,C]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,re],[u,C]],[/(apple) ?tv/i],[g,[d,L+" TV"],[u,C]],[/crkey/i],[[d,G+"cast"],[g,z],[u,C]],[/droid.+aft(\w+)( bui|\))/i],[d,[g,N],[u,C]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[g,Ce],[u,C]],[/(bravia[\w ]+)( bui|\))/i],[d,[g,ye],[u,C]],[/(mitv-\w{5}) bui/i],[d,[g,H],[u,C]],[/Hbbtv.*(technisat) (.*);/i],[g,d,[u,C]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,pe],[d,pe],[u,C]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,C]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,d,[u,w]],[/droid.+; (shield) bui/i],[d,[g,"Nvidia"],[u,w]],[/(playstation [345portablevi]+)/i],[d,[g,ye],[u,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[g,ne],[u,w]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[d,[g,le],[u,S]],[/((pebble))app/i],[g,d,[u,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[g,L],[u,S]],[/droid.+; (glass) \d/i],[d,[g,z],[u,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[g,W],[u,S]],[/droid.+; (glass) \d/i],[d,[g,z],[u,S]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,d,[u,S]],[/; (quest( \d| pro)?)/i],[d,[g,J],[u,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[u,T]],[/(aeobc)\b/i],[d,[g,N],[u,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[u,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[u,E]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,b]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[p,k+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[p,m],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[p,"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],[p,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[m,fe,ve]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,fe,ve],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,M],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,m],[/\(bb(10);/i],[m,[p,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[p,V+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[p,G+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,I],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,m],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,m]]},Be=function(xe,De){if(typeof xe===l&&(De=xe,xe=r),!(this instanceof Be))return new Be(xe,De).getResult();var Pe=typeof n!==c&&n.navigator?n.navigator:r,ot=xe||(Pe&&Pe.userAgent?Pe.userAgent:i),Ze=Pe&&Pe.userAgentData?Pe.userAgentData:r,Ot=De?B(ue,De):ue,Le=Pe&&Pe.userAgent==ot;return this.getBrowser=function(){var _e={};return _e[p]=r,_e[m]=r,be.call(_e,ot,Ot.browser),_e[h]=$(_e[m]),Le&&Pe&&Pe.brave&&typeof Pe.brave.isBrave==s&&(_e[p]="Brave"),_e},this.getCPU=function(){var _e={};return _e[y]=r,be.call(_e,ot,Ot.cpu),_e},this.getDevice=function(){var _e={};return _e[g]=r,_e[d]=r,_e[u]=r,be.call(_e,ot,Ot.device),Le&&!_e[u]&&Ze&&Ze.mobile&&(_e[u]=b),Le&&_e[d]=="Macintosh"&&Pe&&typeof Pe.standalone!==c&&Pe.maxTouchPoints&&Pe.maxTouchPoints>2&&(_e[d]="iPad",_e[u]=E),_e},this.getEngine=function(){var _e={};return _e[p]=r,_e[m]=r,be.call(_e,ot,Ot.engine),_e},this.getOS=function(){var _e={};return _e[p]=r,_e[m]=r,be.call(_e,ot,Ot.os),Le&&!_e[p]&&Ze&&Ze.platform&&Ze.platform!="Unknown"&&(_e[p]=Ze.platform.replace(/chrome os/i,I).replace(/macos/i,M)),_e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return ot},this.setUA=function(_e){return ot=typeof _e===f&&_e.length>P?pe(_e,P):_e,this},this.setUA(ot),this};Be.VERSION=o,Be.BROWSER=X([p,m,h]),Be.CPU=X([y]),Be.DEVICE=X([d,g,u,w,b,C,E,S,T]),Be.ENGINE=Be.OS=X([p,m]),t.exports&&(e=t.exports=Be),e.UAParser=Be;var Re=typeof n!==c&&(n.jQuery||n.Zepto);if(Re&&!Re.ua){var at=new Be;Re.ua=at.getResult(),Re.ua.get=function(){return at.getUA()},Re.ua.set=function(xe){at.setUA(xe);var De=at.getResult();for(var Pe in De)Re.ua[Pe]=De[Pe]}}})(typeof window=="object"?window:Jo)})(Df,Df.exports);var C7=Df.exports;Object.defineProperty(Ne,"__esModule",{value:!0});function _7(t){return t&&typeof t=="object"&&"default"in t?t.default:t}var Fn=x,Rt=_7(Fn),e2=C7,Go=new e2,jn=Go.getBrowser(),A7=Go.getCPU(),mr=Go.getDevice(),Mf=Go.getEngine(),qo=Go.getOS(),Ss=Go.getUA(),t2=function(e){return Go.setUA(e)},Is=function(e){if(!e){console.error("No userAgent string was provided");return}var n=new e2(e);return{UA:n,browser:n.getBrowser(),cpu:n.getCPU(),device:n.getDevice(),engine:n.getEngine(),os:n.getOS(),ua:n.getUA(),setUserAgent:function(o){return n.setUA(o)}}},n2=Object.freeze({ClientUAInstance:Go,browser:jn,cpu:A7,device:mr,engine:Mf,os:qo,ua:Ss,setUa:t2,parseUserAgent:Is});function r2(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function S7(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?r2(Object(n),!0).forEach(function(r){O7(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r2(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ts(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ts=function(e){return typeof e}:Ts=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ts(t)}function I7(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T7(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function x7(t,e,n){return e&&T7(t.prototype,e),t}function O7(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Lf(){return Lf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lf.apply(this,arguments)}function P7(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&jf(t,e)}function Ff(t){return Ff=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ff(t)}function jf(t,e){return jf=Object.setPrototypeOf||function(r,o){return r.__proto__=o,r},jf(t,e)}function k7(t,e){if(t==null)return{};var n={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(n[o]=t[o]);return n}function Pr(t,e){if(t==null)return{};var n=k7(t,e),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function _u(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function B7(t,e){if(e&&(typeof e=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _u(t)}function N7(t,e){return R7(t)||D7(t,e)||M7(t,e)||L7()}function R7(t){if(Array.isArray(t))return t}function D7(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));o=!0);}catch(c){i=!0,s=c}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function M7(t,e){if(t){if(typeof t=="string")return o2(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o2(t,e)}}function o2(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function L7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
136
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vn={Mobile:"mobile",Tablet:"tablet",SmartTv:"smarttv",Console:"console",Wearable:"wearable",Embedded:"embedded",Browser:void 0},tr={Chrome:"Chrome",Firefox:"Firefox",Opera:"Opera",Yandex:"Yandex",Safari:"Safari",InternetExplorer:"Internet Explorer",Edge:"Edge",Chromium:"Chromium",Ie:"IE",MobileSafari:"Mobile Safari",EdgeChromium:"Edge Chromium",MIUI:"MIUI Browser",SamsungBrowser:"Samsung Browser"},ua={IOS:"iOS",Android:"Android",WindowsPhone:"Windows Phone",Windows:"Windows",MAC_OS:"Mac OS"},F7={isMobile:!1,isTablet:!1,isBrowser:!1,isSmartTV:!1,isConsole:!1,isWearable:!1},j7=function(e){switch(e){case Vn.Mobile:return{isMobile:!0};case Vn.Tablet:return{isTablet:!0};case Vn.SmartTv:return{isSmartTV:!0};case Vn.Console:return{isConsole:!0};case Vn.Wearable:return{isWearable:!0};case Vn.Browser:return{isBrowser:!0};case Vn.Embedded:return{isEmbedded:!0};default:return F7}},V7=function(e){return t2(e)},Ye=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"none";return e||n},Vf=function(){return typeof window<"u"&&(window.navigator||navigator)?window.navigator||navigator:!1},Uf=function(e){var n=Vf();return n&&n.platform&&(n.platform.indexOf(e)!==-1||n.platform==="MacIntel"&&n.maxTouchPoints>1&&!window.MSStream)},U7=function(e,n,r,o,i){return{isBrowser:e,browserMajorVersion:Ye(n.major),browserFullVersion:Ye(n.version),browserName:Ye(n.name),engineName:Ye(r.name),engineVersion:Ye(r.version),osName:Ye(o.name),osVersion:Ye(o.version),userAgent:Ye(i)}},i2=function(e,n,r,o){return S7({},e,{vendor:Ye(n.vendor),model:Ye(n.model),os:Ye(r.name),osVersion:Ye(r.version),ua:Ye(o)})},G7=function(e,n,r,o){return{isSmartTV:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(o)}},q7=function(e,n,r,o){return{isConsole:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(o)}},H7=function(e,n,r,o){return{isWearable:e,engineName:Ye(n.name),engineVersion:Ye(n.version),osName:Ye(r.name),osVersion:Ye(r.version),userAgent:Ye(o)}},W7=function(e,n,r,o,i){return{isEmbedded:e,vendor:Ye(n.vendor),model:Ye(n.model),engineName:Ye(r.name),engineVersion:Ye(r.version),osName:Ye(o.name),osVersion:Ye(o.version),userAgent:Ye(i)}};function Y7(t){var e=t?Is(t):n2,n=e.device,r=e.browser,o=e.engine,i=e.os,a=e.ua,s=j7(n.type),c=s.isBrowser,l=s.isMobile,f=s.isTablet,h=s.isSmartTV,d=s.isConsole,p=s.isWearable,u=s.isEmbedded;if(c)return U7(c,r,o,i,a);if(h)return G7(h,o,i,a);if(d)return q7(d,o,i,a);if(l||f)return i2(s,n,i,a);if(p)return H7(p,o,i,a);if(u)return W7(u,n,o,i,a)}var a2=function(e){var n=e.type;return n===Vn.Mobile},s2=function(e){var n=e.type;return n===Vn.Tablet},c2=function(e){var n=e.type;return n===Vn.Mobile||n===Vn.Tablet},u2=function(e){var n=e.type;return n===Vn.SmartTv},Au=function(e){var n=e.type;return n===Vn.Browser},l2=function(e){var n=e.type;return n===Vn.Wearable},d2=function(e){var n=e.type;return n===Vn.Console},f2=function(e){var n=e.type;return n===Vn.Embedded},h2=function(e){var n=e.vendor;return Ye(n)},p2=function(e){var n=e.model;return Ye(n)},g2=function(e){var n=e.type;return Ye(n,"browser")},m2=function(e){var n=e.name;return n===ua.Android},y2=function(e){var n=e.name;return n===ua.Windows},v2=function(e){var n=e.name;return n===ua.MAC_OS},w2=function(e){var n=e.name;return n===ua.WindowsPhone},b2=function(e){var n=e.name;return n===ua.IOS},E2=function(e){var n=e.version;return Ye(n)},C2=function(e){var n=e.name;return Ye(n)},_2=function(e){var n=e.name;return n===tr.Chrome},A2=function(e){var n=e.name;return n===tr.Firefox},S2=function(e){var n=e.name;return n===tr.Chromium},Su=function(e){var n=e.name;return n===tr.Edge},I2=function(e){var n=e.name;return n===tr.Yandex},T2=function(e){var n=e.name;return n===tr.Safari||n===tr.MobileSafari},x2=function(e){var n=e.name;return n===tr.MobileSafari},O2=function(e){var n=e.name;return n===tr.Opera},P2=function(e){var n=e.name;return n===tr.InternetExplorer||n===tr.Ie},k2=function(e){var n=e.name;return n===tr.MIUI},B2=function(e){var n=e.name;return n===tr.SamsungBrowser},N2=function(e){var n=e.version;return Ye(n)},R2=function(e){var n=e.major;return Ye(n)},D2=function(e){var n=e.name;return Ye(n)},M2=function(e){var n=e.name;return Ye(n)},L2=function(e){var n=e.version;return Ye(n)},F2=function(){var e=Vf(),n=e&&e.userAgent&&e.userAgent.toLowerCase();return typeof n=="string"?/electron/.test(n):!1},la=function(e){return typeof e=="string"&&e.indexOf("Edg/")!==-1},j2=function(){var e=Vf();return e&&(/iPad|iPhone|iPod/.test(e.platform)||e.platform==="MacIntel"&&e.maxTouchPoints>1)&&!window.MSStream},Xr=function(){return Uf("iPad")},V2=function(){return Uf("iPhone")},U2=function(){return Uf("iPod")},G2=function(e){return Ye(e)};function q2(t){var e=t||n2,n=e.device,r=e.browser,o=e.os,i=e.engine,a=e.ua;return{isSmartTV:u2(n),isConsole:d2(n),isWearable:l2(n),isEmbedded:f2(n),isMobileSafari:x2(r)||Xr(),isChromium:S2(r),isMobile:c2(n)||Xr(),isMobileOnly:a2(n),isTablet:s2(n)||Xr(),isBrowser:Au(n),isDesktop:Au(n),isAndroid:m2(o),isWinPhone:w2(o),isIOS:b2(o)||Xr(),isChrome:_2(r),isFirefox:A2(r),isSafari:T2(r),isOpera:O2(r),isIE:P2(r),osVersion:E2(o),osName:C2(o),fullBrowserVersion:N2(r),browserVersion:R2(r),browserName:D2(r),mobileVendor:h2(n),mobileModel:p2(n),engineName:M2(i),engineVersion:L2(i),getUA:G2(a),isEdge:Su(r)||la(a),isYandex:I2(r),deviceType:g2(n),isIOS13:j2(),isIPad13:Xr(),isIPhone13:V2(),isIPod13:U2(),isElectron:F2(),isEdgeChromium:la(a),isLegacyEdge:Su(r)&&!la(a),isWindows:y2(o),isMacOs:v2(o),isMIUI:k2(r),isSamsungBrowser:B2(r)}}var H2=u2(mr),W2=d2(mr),Y2=l2(mr),K7=f2(mr),z7=x2(jn)||Xr(),$7=S2(jn),Iu=c2(mr)||Xr(),K2=a2(mr),z2=s2(mr)||Xr(),$2=Au(mr),X7=Au(mr),X2=m2(qo),Q2=w2(qo),J2=b2(qo)||Xr(),Q7=_2(jn),J7=A2(jn),Z7=T2(jn),e9=O2(jn),Z2=P2(jn),t9=E2(qo),n9=C2(qo),r9=N2(jn),o9=R2(jn),i9=D2(jn),a9=h2(mr),s9=p2(mr),c9=M2(Mf),u9=L2(Mf),l9=G2(Ss),d9=Su(jn)||la(Ss),f9=I2(jn),h9=g2(mr),p9=j2(),g9=Xr(),m9=V2(),y9=U2(),v9=F2(),w9=la(Ss),b9=Su(jn)&&!la(Ss),E9=y2(qo),C9=v2(qo),_9=k2(jn),A9=B2(jn),S9=function(e){if(!e||typeof e!="string"){console.error("No valid user agent string was provided");return}var n=Is(e),r=n.device,o=n.browser,i=n.os,a=n.engine,s=n.ua;return q2({device:r,browser:o,os:i,engine:a,ua:s})},I9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return X2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},T9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return $2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},x9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return Z2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},O9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return J2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},P9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return Iu?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},k9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return z2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},B9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return Q2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},N9=function(e){var n=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var o=Pr(e,["renderWithFragment","children","viewClassName","style"]);return K2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},R9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return H2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},D9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return W2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},M9=function(e){var n=e.renderWithFragment,r=e.children,o=Pr(e,["renderWithFragment","children"]);return Y2?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",o,r):null},L9=function(e){var n=e.renderWithFragment,r=e.children;e.viewClassName,e.style;var o=e.condition,i=Pr(e,["renderWithFragment","children","viewClassName","style","condition"]);return o?n?Rt.createElement(Fn.Fragment,null,r):Rt.createElement("div",i,r):null};function F9(t){return function(e){P7(n,e);function n(r){var o;return I7(this,n),o=B7(this,Ff(n).call(this,r)),o.isEventListenerAdded=!1,o.handleOrientationChange=o.handleOrientationChange.bind(_u(o)),o.onOrientationChange=o.onOrientationChange.bind(_u(o)),o.onPageLoad=o.onPageLoad.bind(_u(o)),o.state={isLandscape:!1,isPortrait:!1},o}return x7(n,[{key:"handleOrientationChange",value:function(){this.isEventListenerAdded||(this.isEventListenerAdded=!0);var o=window.innerWidth>window.innerHeight?90:0;this.setState({isPortrait:o===0,isLandscape:o===90})}},{key:"onOrientationChange",value:function(){this.handleOrientationChange()}},{key:"onPageLoad",value:function(){this.handleOrientationChange()}},{key:"componentDidMount",value:function(){(typeof window>"u"?"undefined":Ts(window))!==void 0&&Iu&&(this.isEventListenerAdded?window.removeEventListener("load",this.onPageLoad,!1):(this.handleOrientationChange(),window.addEventListener("load",this.onPageLoad,!1)),window.addEventListener("resize",this.onOrientationChange,!1))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.onOrientationChange,!1)}},{key:"render",value:function(){return Rt.createElement(t,Lf({},this.props,{isLandscape:this.state.isLandscape,isPortrait:this.state.isPortrait}))}}]),n}(Rt.Component)}function j9(){var t=Fn.useState(function(){var i=window.innerWidth>window.innerHeight?90:0;return{isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"}}),e=N7(t,2),n=e[0],r=e[1],o=Fn.useCallback(function(){var i=window.innerWidth>window.innerHeight?90:0,a={isPortrait:i===0,isLandscape:i===90,orientation:i===0?"portrait":"landscape"};n.orientation!==a.orientation&&r(a)},[n.orientation]);return Fn.useEffect(function(){return(typeof window>"u"?"undefined":Ts(window))!==void 0&&Iu&&(o(),window.addEventListener("load",o,!1),window.addEventListener("resize",o,!1)),function(){window.removeEventListener("resize",o,!1),window.removeEventListener("load",o,!1)}},[o]),n}function ey(t){var e=t||window.navigator.userAgent;return Is(e)}function V9(t){var e=t||window.navigator.userAgent,n=ey(e),r=q2(n);return[r,n]}Ne.AndroidView=I9,Ne.BrowserTypes=tr,Ne.BrowserView=T9,Ne.ConsoleView=D9,Ne.CustomView=L9,Ne.IEView=x9,Ne.IOSView=O9,Ne.MobileOnlyView=N9,Ne.MobileView=P9,Ne.OsTypes=ua,Ne.SmartTVView=R9,Ne.TabletView=k9,Ne.WearableView=M9,Ne.WinPhoneView=B9,Ne.browserName=i9,Ne.browserVersion=o9,Ne.deviceDetect=Y7,Ne.deviceType=h9,Ne.engineName=c9,Ne.engineVersion=u9,Ne.fullBrowserVersion=r9,Ne.getSelectorsByUserAgent=S9,Ne.getUA=l9,Ne.isAndroid=X2,Ne.isBrowser=$2,Ne.isChrome=Q7,Ne.isChromium=$7,Ne.isConsole=W2,Ne.isDesktop=X7,Ne.isEdge=d9,Ne.isEdgeChromium=w9,Ne.isElectron=v9,Ne.isEmbedded=K7,Ne.isFirefox=J7,Ne.isIE=Z2,Ne.isIOS=J2,Ne.isIOS13=p9,Ne.isIPad13=g9,Ne.isIPhone13=m9,Ne.isIPod13=y9,Ne.isLegacyEdge=b9,Ne.isMIUI=_9,Ne.isMacOs=C9;var Gf=Ne.isMobile=Iu;Ne.isMobileOnly=K2,Ne.isMobileSafari=z7,Ne.isOpera=e9,Ne.isSafari=Z7,Ne.isSamsungBrowser=A9,Ne.isSmartTV=H2;var qf=Ne.isTablet=z2;Ne.isWearable=Y2,Ne.isWinPhone=Q2,Ne.isWindows=E9,Ne.isYandex=f9,Ne.mobileModel=s9,Ne.mobileVendor=a9,Ne.osName=n9,Ne.osVersion=t9,Ne.parseUserAgent=Is,Ne.setUserAgent=V7,Ne.useDeviceData=ey,Ne.useDeviceSelectors=V9,Ne.useMobileOrientation=j9,Ne.withOrientationChange=F9;var ty={},nr={};Object.defineProperty(nr,"__esModule",{value:!0}),nr.compactObject=iy,nr.deprecated=$9;var U9=nr.detectBrowser=X9;nr.disableLog=Y9,nr.disableWarnings=K9,nr.extractVersion=Tu,nr.filterStats=Q9,nr.log=z9,nr.walkStats=xu,nr.wrapPeerConnectionEvent=W9;function G9(t,e,n){return e=q9(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q9(t){var e=H9(t,"string");return Ho(e)=="symbol"?e:e+""}function H9(t,e){if(Ho(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ho(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ho(t){"@babel/helpers - typeof";return Ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ho(t)}var ny=!0,ry=!0;function Tu(t,e,n){var r=t.match(e);return r&&r.length>=n&&parseInt(r[n],10)}function W9(t,e,n){if(t.RTCPeerConnection){var r=t.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(a,s){if(a!==e)return o.apply(this,arguments);var c=function(f){var h=n(f);h&&(s.handleEvent?s.handleEvent(h):s(h))};return this._eventMap=this._eventMap||{},this._eventMap[e]||(this._eventMap[e]=new Map),this._eventMap[e].set(s,c),o.apply(this,[a,c])};var i=r.removeEventListener;r.removeEventListener=function(a,s){if(a!==e||!this._eventMap||!this._eventMap[e])return i.apply(this,arguments);if(!this._eventMap[e].has(s))return i.apply(this,arguments);var c=this._eventMap[e].get(s);return this._eventMap[e].delete(s),this._eventMap[e].size===0&&delete this._eventMap[e],Object.keys(this._eventMap).length===0&&delete this._eventMap,i.apply(this,[a,c])},Object.defineProperty(r,"on"+e,{get:function(){return this["_on"+e]},set:function(s){this["_on"+e]&&(this.removeEventListener(e,this["_on"+e]),delete this["_on"+e]),s&&this.addEventListener(e,this["_on"+e]=s)},enumerable:!0,configurable:!0})}}function Y9(t){return typeof t!="boolean"?new Error("Argument type: "+Ho(t)+". Please use a boolean."):(ny=t,t?"adapter.js logging disabled":"adapter.js logging enabled")}function K9(t){return typeof t!="boolean"?new Error("Argument type: "+Ho(t)+". Please use a boolean."):(ry=!t,"adapter.js deprecation warnings "+(t?"disabled":"enabled"))}function z9(){if((typeof window>"u"?"undefined":Ho(window))==="object"){if(ny)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function $9(t,e){ry&&console.warn(t+" is deprecated, please use "+e+" instead.")}function X9(t){var e={browser:null,version:null};if(typeof t>"u"||!t.navigator||!t.navigator.userAgent)return e.browser="Not a browser.",e;var n=t.navigator;if(n.userAgentData&&n.userAgentData.brands){var r=n.userAgentData.brands.find(function(o){return o.brand==="Chromium"});if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)e.browser="firefox",e.version=Tu(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||t.isSecureContext===!1&&t.webkitRTCPeerConnection)e.browser="chrome",e.version=Tu(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(t.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))e.browser="safari",e.version=Tu(n.userAgent,/AppleWebKit\/(\d+)\./,1),e.supportsUnifiedPlan=t.RTCRtpTransceiver&&"currentDirection"in t.RTCRtpTransceiver.prototype;else return e.browser="Not a supported browser.",e;return e}function oy(t){return Object.prototype.toString.call(t)==="[object Object]"}function iy(t){return oy(t)?Object.keys(t).reduce(function(e,n){var r=oy(t[n]),o=r?iy(t[n]):t[n],i=r&&!Object.keys(o).length;return o===void 0||i?e:Object.assign(e,G9({},n,o))},{}):t}function xu(t,e,n){!e||n.has(e.id)||(n.set(e.id,e),Object.keys(e).forEach(function(r){r.endsWith("Id")?xu(t,t.get(e[r]),n):r.endsWith("Ids")&&e[r].forEach(function(o){xu(t,t.get(o),n)})}))}function Q9(t,e,n){var r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(e===null)return o;var i=[];return t.forEach(function(a){a.type==="track"&&a.trackIdentifier===e.id&&i.push(a)}),i.forEach(function(a){t.forEach(function(s){s.type===r&&s.trackId===a.id&&xu(t,s,o)})}),o}Object.defineProperty(ty,"__esModule",{value:!0});var J9=ty.shimGetUserMedia=tI,Z9=eI(nr);function ay(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(ay=function(o){return o?n:e})(t)}function eI(t,e){if(t&&t.__esModule)return t;if(t===null||Wo(t)!="object"&&typeof t!="function")return{default:t};var n=ay(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&{}.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function Wo(t){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wo(t)}var sy=Z9.log;function tI(t,e){var n=t&&t.navigator;if(n.mediaDevices){var r=function(l){if(Wo(l)!=="object"||l.mandatory||l.optional)return l;var f={};return Object.keys(l).forEach(function(h){if(!(h==="require"||h==="advanced"||h==="mediaSource")){var d=Wo(l[h])==="object"?l[h]:{ideal:l[h]};d.exact!==void 0&&typeof d.exact=="number"&&(d.min=d.max=d.exact);var p=function(m,y){return m?m+y.charAt(0).toUpperCase()+y.slice(1):y==="deviceId"?"sourceId":y};if(d.ideal!==void 0){f.optional=f.optional||[];var u={};typeof d.ideal=="number"?(u[p("min",h)]=d.ideal,f.optional.push(u),u={},u[p("max",h)]=d.ideal,f.optional.push(u)):(u[p("",h)]=d.ideal,f.optional.push(u))}d.exact!==void 0&&typeof d.exact!="number"?(f.mandatory=f.mandatory||{},f.mandatory[p("",h)]=d.exact):["min","max"].forEach(function(g){d[g]!==void 0&&(f.mandatory=f.mandatory||{},f.mandatory[p(g,h)]=d[g])})}}),l.advanced&&(f.optional=(f.optional||[]).concat(l.advanced)),f},o=function(l,f){if(e.version>=61)return f(l);if(l=JSON.parse(JSON.stringify(l)),l&&Wo(l.audio)==="object"){var h=function(m,y,w){y in m&&!(w in m)&&(m[w]=m[y],delete m[y])};l=JSON.parse(JSON.stringify(l)),h(l.audio,"autoGainControl","googAutoGainControl"),h(l.audio,"noiseSuppression","googNoiseSuppression"),l.audio=r(l.audio)}if(l&&Wo(l.video)==="object"){var d=l.video.facingMode;d=d&&(Wo(d)==="object"?d:{ideal:d});var p=e.version<66;if(d&&(d.exact==="user"||d.exact==="environment"||d.ideal==="user"||d.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!p)){delete l.video.facingMode;var u;if(d.exact==="environment"||d.ideal==="environment"?u=["back","rear"]:(d.exact==="user"||d.ideal==="user")&&(u=["front"]),u)return n.mediaDevices.enumerateDevices().then(function(g){g=g.filter(function(y){return y.kind==="videoinput"});var m=g.find(function(y){return u.some(function(w){return y.label.toLowerCase().includes(w)})});return!m&&g.length&&u.includes("back")&&(m=g[g.length-1]),m&&(l.video.deviceId=d.exact?{exact:m.deviceId}:{ideal:m.deviceId}),l.video=r(l.video),sy("chrome: "+JSON.stringify(l)),f(l)})}l.video=r(l.video)}return sy("chrome: "+JSON.stringify(l)),f(l)},i=function(l){return e.version>=64?l:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[l.name]||l.name,message:l.message,constraint:l.constraint||l.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},a=function(l,f,h){o(l,function(d){n.webkitGetUserMedia(d,f,function(p){h&&h(i(p))})})};if(n.getUserMedia=a.bind(n),n.mediaDevices.getUserMedia){var s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(c){return o(c,function(l){return s(l).then(function(f){if(l.audio&&!f.getAudioTracks().length||l.video&&!f.getVideoTracks().length)throw f.getTracks().forEach(function(h){h.stop()}),new DOMException("","NotFoundError");return f},function(f){return Promise.reject(i(f))})})}}}}var cy={};Object.defineProperty(cy,"__esModule",{value:!0});var nI=cy.shimGetUserMedia=iI,rI=oI(nr);function uy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(uy=function(o){return o?n:e})(t)}function oI(t,e){if(t&&t.__esModule)return t;if(t===null||da(t)!="object"&&typeof t!="function")return{default:t};var n=uy(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&{}.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function da(t){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(t)}function iI(t,e){var n=t&&t.navigator,r=t&&t.MediaStreamTrack;if(n.getUserMedia=function(c,l,f){rI.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(c).then(l,f)},!(e.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var o=function(l,f,h){f in l&&!(h in l)&&(l[h]=l[f],delete l[f])},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(c){return da(c)==="object"&&da(c.audio)==="object"&&(c=JSON.parse(JSON.stringify(c)),o(c.audio,"autoGainControl","mozAutoGainControl"),o(c.audio,"noiseSuppression","mozNoiseSuppression")),i(c)},r&&r.prototype.getSettings){var a=r.prototype.getSettings;r.prototype.getSettings=function(){var c=a.apply(this,arguments);return o(c,"mozAutoGainControl","autoGainControl"),o(c,"mozNoiseSuppression","noiseSuppression"),c}}if(r&&r.prototype.applyConstraints){var s=r.prototype.applyConstraints;r.prototype.applyConstraints=function(c){return this.kind==="audio"&&da(c)==="object"&&(c=JSON.parse(JSON.stringify(c)),o(c,"autoGainControl","mozAutoGainControl"),o(c,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[c])}}}}var Qr={};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.shimAudioContext=gI,Qr.shimCallbacksAPI=lI,Qr.shimConstraints=fy,Qr.shimCreateOfferLegacy=pI;var aI=Qr.shimGetUserMedia=dI;Qr.shimLocalStreamsAPI=cI,Qr.shimRTCIceServerUrls=fI,Qr.shimRemoteStreamsAPI=uI,Qr.shimTrackEventTransceiver=hI;var ly=sI(nr);function dy(t){if(typeof WeakMap!="function")return null;var e=new WeakMap,n=new WeakMap;return(dy=function(o){return o?n:e})(t)}function sI(t,e){if(t&&t.__esModule)return t;if(t===null||Yo(t)!="object"&&typeof t!="function")return{default:t};var n=dy(e);if(n&&n.has(t))return n.get(t);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(i!=="default"&&{}.hasOwnProperty.call(t,i)){var a=o?Object.getOwnPropertyDescriptor(t,i):null;a&&(a.get||a.set)?Object.defineProperty(r,i,a):r[i]=t[i]}return r.default=t,n&&n.set(t,r),r}function Yo(t){"@babel/helpers - typeof";return Yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yo(t)}function cI(t){if(!(Yo(t)!=="object"||!t.RTCPeerConnection)){if("getLocalStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in t.RTCPeerConnection.prototype)){var e=t.RTCPeerConnection.prototype.addTrack;t.RTCPeerConnection.prototype.addStream=function(r){var o=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(function(i){return e.call(o,i,r)}),r.getVideoTracks().forEach(function(i){return e.call(o,i,r)})},t.RTCPeerConnection.prototype.addTrack=function(r){for(var o=this,i=arguments.length,a=new Array(i>1?i-1:0),s=1;s<i;s++)a[s-1]=arguments[s];return a&&a.forEach(function(c){o._localStreams?o._localStreams.includes(c)||o._localStreams.push(c):o._localStreams=[c]}),e.apply(this,arguments)}}"removeStream"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.removeStream=function(r){var o=this;this._localStreams||(this._localStreams=[]);var i=this._localStreams.indexOf(r);if(i!==-1){this._localStreams.splice(i,1);var a=r.getTracks();this.getSenders().forEach(function(s){a.includes(s.track)&&o.removeTrack(s)})}})}}function uI(t){if(!(Yo(t)!=="object"||!t.RTCPeerConnection)&&("getRemoteStreams"in t.RTCPeerConnection.prototype||(t.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in t.RTCPeerConnection.prototype))){Object.defineProperty(t.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(r){var o=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=function(i){i.streams.forEach(function(a){if(o._remoteStreams||(o._remoteStreams=[]),!o._remoteStreams.includes(a)){o._remoteStreams.push(a);var s=new Event("addstream");s.stream=a,o.dispatchEvent(s)}})})}});var e=t.RTCPeerConnection.prototype.setRemoteDescription;t.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(o){o.streams.forEach(function(i){if(r._remoteStreams||(r._remoteStreams=[]),!(r._remoteStreams.indexOf(i)>=0)){r._remoteStreams.push(i);var a=new Event("addstream");a.stream=i,r.dispatchEvent(a)}})}),e.apply(r,arguments)}}}function lI(t){if(!(Yo(t)!=="object"||!t.RTCPeerConnection)){var e=t.RTCPeerConnection.prototype,n=e.createOffer,r=e.createAnswer,o=e.setLocalDescription,i=e.setRemoteDescription,a=e.addIceCandidate;e.createOffer=function(l,f){var h=arguments.length>=2?arguments[2]:arguments[0],d=n.apply(this,[h]);return f?(d.then(l,f),Promise.resolve()):d},e.createAnswer=function(l,f){var h=arguments.length>=2?arguments[2]:arguments[0],d=r.apply(this,[h]);return f?(d.then(l,f),Promise.resolve()):d};var s=function(l,f,h){var d=o.apply(this,[l]);return h?(d.then(f,h),Promise.resolve()):d};e.setLocalDescription=s,s=function(l,f,h){var d=i.apply(this,[l]);return h?(d.then(f,h),Promise.resolve()):d},e.setRemoteDescription=s,s=function(l,f,h){var d=a.apply(this,[l]);return h?(d.then(f,h),Promise.resolve()):d},e.addIceCandidate=s}}function dI(t){var e=t&&t.navigator;if(e.mediaDevices&&e.mediaDevices.getUserMedia){var n=e.mediaDevices,r=n.getUserMedia.bind(n);e.mediaDevices.getUserMedia=function(o){return r(fy(o))}}!e.getUserMedia&&e.mediaDevices&&e.mediaDevices.getUserMedia&&(e.getUserMedia=(function(i,a,s){e.mediaDevices.getUserMedia(i).then(a,s)}).bind(e))}function fy(t){return t&&t.video!==void 0?Object.assign({},t,{video:ly.compactObject(t.video)}):t}function fI(t){if(t.RTCPeerConnection){var e=t.RTCPeerConnection;t.RTCPeerConnection=function(r,o){if(r&&r.iceServers){for(var i=[],a=0;a<r.iceServers.length;a++){var s=r.iceServers[a];s.urls===void 0&&s.url?(ly.deprecated("RTCIceServer.url","RTCIceServer.urls"),s=JSON.parse(JSON.stringify(s)),s.urls=s.url,delete s.url,i.push(s)):i.push(r.iceServers[a])}r.iceServers=i}return new e(r,o)},t.RTCPeerConnection.prototype=e.prototype,"generateCertificate"in e&&Object.defineProperty(t.RTCPeerConnection,"generateCertificate",{get:function(){return e.generateCertificate}})}}function hI(t){Yo(t)==="object"&&t.RTCTrackEvent&&"receiver"in t.RTCTrackEvent.prototype&&!("transceiver"in t.RTCTrackEvent.prototype)&&Object.defineProperty(t.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function pI(t){var e=t.RTCPeerConnection.prototype.createOffer;t.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var o=this.getTransceivers().find(function(a){return a.receiver.track.kind==="audio"});r.offerToReceiveAudio===!1&&o?o.direction==="sendrecv"?o.setDirection?o.setDirection("sendonly"):o.direction="sendonly":o.direction==="recvonly"&&(o.setDirection?o.setDirection("inactive"):o.direction="inactive"):r.offerToReceiveAudio===!0&&!o&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);var i=this.getTransceivers().find(function(a){return a.receiver.track.kind==="video"});r.offerToReceiveVideo===!1&&i?i.direction==="sendrecv"?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":i.direction==="recvonly"&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):r.offerToReceiveVideo===!0&&!i&&this.addTransceiver("video",{direction:"recvonly"})}return e.apply(this,arguments)}}function gI(t){Yo(t)!=="object"||t.AudioContext||(t.AudioContext=t.webkitAudioContext)}var hy=t=>{throw TypeError(t)},py=(t,e,n)=>e.has(t)||hy("Cannot "+n),mI=(t,e,n)=>(py(t,e,"read from private field"),n?n.call(t):e.get(t)),yI=(t,e,n)=>e.has(t)?hy("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),vI=(t,e,n,r)=>(py(t,e,"write to private field"),e.set(t,n),n);const gy=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataBarLimited","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function wI(t){return t.join("|")}function bI(t){const e=my(t);let n=0,r=gy.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),i=gy[o],a=my(i);if(a===e)return i;a<e?n=o+1:r=o-1}return"None"}function my(t){return t.toLowerCase().replace(/_-\[\]/g,"")}function EI(t,e){return t.Binarizer[e]}function CI(t,e){return t.CharacterSet[e]}const _I=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function AI(t){return _I[t.value]}function SI(t,e){return t.EanAddOnSymbol[e]}function II(t,e){return t.TextMode[e]}const fa={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function yy(t,e){return{...e,formats:wI(e.formats),binarizer:EI(t,e.binarizer),eanAddOnSymbol:SI(t,e.eanAddOnSymbol),textMode:II(t,e.textMode),characterSet:CI(t,e.characterSet)}}function vy(t){return{...t,format:bI(t.format),eccLevel:t.eccLevel,contentType:AI(t.contentType)}}const TI={locateFile:(t,e)=>{const n=t.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.3.4/dist/${n[1]}/${t}`:e+t}};let wy=new WeakMap;function Hf(t,e){var n;const r=wy.get(t);if(r!=null&&r.modulePromise&&e===void 0)return r.modulePromise;const o=(n=r==null?void 0:r.moduleOverrides)!=null?n:TI,i=t({...o});return wy.set(t,{moduleOverrides:o,modulePromise:i}),i}async function xI(t,e,n=fa){const r={...fa,...n},o=await Hf(t),{size:i}=e,a=new Uint8Array(await e.arrayBuffer()),s=o._malloc(i);o.HEAPU8.set(a,s);const c=o.readBarcodesFromImage(s,i,yy(o,r));o._free(s);const l=[];for(let f=0;f<c.size();++f)l.push(vy(c.get(f)));return l}async function OI(t,e,n=fa){const r={...fa,...n},o=await Hf(t),{data:i,width:a,height:s,data:{byteLength:c}}=e,l=o._malloc(c);o.HEAPU8.set(i,l);const f=o.readBarcodesFromPixmap(l,a,s,yy(o,r));o._free(l);const h=[];for(let d=0;d<f.size();++d)h.push(vy(f.get(d)));return h}({...fa,formats:[...fa.formats]});var Wf=(()=>{var t,e=typeof document<"u"&&((t=document.currentScript)==null?void 0:t.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(n={}){var r,o=n,i,a,s=new Promise((_,A)=>{i=_,a=A}),c=typeof window=="object",l=typeof Bun<"u",f=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var h=Object.assign({},o),d="./this.program",p="";function u(_){return o.locateFile?o.locateFile(_,p):p+_}var g,m;if(c||f||l){var y;f?p=self.location.href:typeof document<"u"&&((y=document.currentScript)===null||y===void 0?void 0:y.tagName.toUpperCase())==="SCRIPT"&&(p=document.currentScript.src),e&&(p=e),p.startsWith("blob:")?p="":p=p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1),f&&(m=_=>{var A=new XMLHttpRequest;return A.open("GET",_,!1),A.responseType="arraybuffer",A.send(null),new Uint8Array(A.response)}),g=_=>fetch(_,{credentials:"same-origin"}).then(A=>A.ok?A.arrayBuffer():Promise.reject(new Error(A.status+" : "+A.url)))}var w=o.print||console.log.bind(console),b=o.printErr||console.error.bind(console);Object.assign(o,h),h=null,o.arguments&&o.arguments,o.thisProgram&&(d=o.thisProgram);var E=o.wasmBinary,C,S=!1,T,P,N,L,U,j,K,G;function k(){var _=C.buffer;o.HEAP8=T=new Int8Array(_),o.HEAP16=N=new Int16Array(_),o.HEAPU8=P=new Uint8Array(_),o.HEAPU16=L=new Uint16Array(_),o.HEAP32=U=new Int32Array(_),o.HEAPU32=j=new Uint32Array(_),o.HEAPF32=K=new Float32Array(_),o.HEAPF64=G=new Float64Array(_)}var V=[],z=[],te=[];function re(){var _=o.preRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(we)),he(V)}function ne(){he(z)}function se(){var _=o.postRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(Ce)),he(te)}function we(_){V.unshift(_)}function le(_){z.unshift(_)}function Ce(_){te.unshift(_)}var ye=0,H=null;function W(_){var A;ye++,(A=o.monitorRunDependencies)===null||A===void 0||A.call(o,ye)}function J(_){var A;if(ye--,(A=o.monitorRunDependencies)===null||A===void 0||A.call(o,ye),ye==0&&H){var O=H;H=null,O()}}function I(_){var A;(A=o.onAbort)===null||A===void 0||A.call(o,_),_="Aborted("+_+")",b(_),S=!0,_+=". Build with -sASSERTIONS for more info.";var O=new WebAssembly.RuntimeError(_);throw a(O),O}var M="data:application/octet-stream;base64,",F=_=>_.startsWith(M);function B(){var _="zxing_reader.wasm";return F(_)?_:u(_)}var X;function ee(_){if(_==X&&E)return new Uint8Array(E);if(m)return m(_);throw"both async and sync fetching of the wasm failed"}function Z(_){return E?Promise.resolve().then(()=>ee(_)):g(_).then(A=>new Uint8Array(A),()=>ee(_))}function $(_,A,O){return Z(_).then(R=>WebAssembly.instantiate(R,A)).then(O,R=>{b(`failed to asynchronously prepare wasm: ${R}`),I(R)})}function pe(_,A,O,R){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!F(A)&&typeof fetch=="function"?fetch(A,{credentials:"same-origin"}).then(q=>{var Q=WebAssembly.instantiateStreaming(q,O);return Q.then(R,function(ae){return b(`wasm streaming compile failed: ${ae}`),b("falling back to ArrayBuffer instantiation"),$(A,O,R)})}):$(A,O,R)}function be(){return{a:ON}}function fe(){var _,A=be();function O(q,Q){return Kt=q.exports,C=Kt.za,k(),nw=Kt.Da,le(Kt.Aa),J(),Kt}W();function R(q){O(q.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(A,O)}catch(q){b(`Module.instantiateWasm callback failed with error: ${q}`),a(q)}return(_=X)!==null&&_!==void 0||(X=B()),pe(E,X,A,R).catch(a),{}}var he=_=>{_.forEach(A=>A(o))};o.noExitRuntime;var ve=_=>pw(_),ue=()=>gw(),Be=[],Re=0,at=_=>{var A=new Pe(_);return A.get_caught()||(A.set_caught(!0),Re--),A.set_rethrown(!1),Be.push(A),yw(_),fw(_)},xe=0,De=()=>{ut(0,0);var _=Be.pop();mw(_.excPtr),xe=0};class Pe{constructor(A){this.excPtr=A,this.ptr=A-24}set_type(A){j[this.ptr+4>>2]=A}get_type(){return j[this.ptr+4>>2]}set_destructor(A){j[this.ptr+8>>2]=A}get_destructor(){return j[this.ptr+8>>2]}set_caught(A){A=A?1:0,T[this.ptr+12]=A}get_caught(){return T[this.ptr+12]!=0}set_rethrown(A){A=A?1:0,T[this.ptr+13]=A}get_rethrown(){return T[this.ptr+13]!=0}init(A,O){this.set_adjusted_ptr(0),this.set_type(A),this.set_destructor(O)}set_adjusted_ptr(A){j[this.ptr+16>>2]=A}get_adjusted_ptr(){return j[this.ptr+16>>2]}}var ot=_=>{throw xe||(xe=_),xe},Ze=_=>hw(_),Ot=_=>{var A=xe;if(!A)return Ze(0),0;var O=new Pe(A);O.set_adjusted_ptr(A);var R=O.get_type();if(!R)return Ze(0),A;for(var q of _){if(q===0||q===R)break;var Q=O.ptr+16;if(vw(q,R,Q))return Ze(q),A}return Ze(R),A},Le=()=>Ot([]),_e=_=>Ot([_]),$t=(_,A)=>Ot([_,A]),Ht=()=>{var _=Be.pop();_||I("no exception to throw");var A=_.excPtr;throw _.get_rethrown()||(Be.push(_),_.set_rethrown(!0),_.set_caught(!1),Re++),xe=A,xe},Cn=(_,A,O)=>{var R=new Pe(_);throw R.init(A,O),xe=_,Re++,xe},Yn=()=>Re,Zr=()=>{I("")},Nn={},Kn=_=>{for(;_.length;){var A=_.pop(),O=_.pop();O(A)}};function yn(_){return this.fromWireType(j[_>>2])}var an={},sr={},eo={},He,$e=_=>{throw new He(_)},Xe=(_,A,O)=>{_.forEach(oe=>eo[oe]=A);function R(oe){var me=O(oe);me.length!==_.length&&$e("Mismatched type converter count");for(var Ae=0;Ae<_.length;++Ae)br(_[Ae],me[Ae])}var q=new Array(A.length),Q=[],ae=0;A.forEach((oe,me)=>{sr.hasOwnProperty(oe)?q[me]=sr[oe]:(Q.push(oe),an.hasOwnProperty(oe)||(an[oe]=[]),an[oe].push(()=>{q[me]=sr[oe],++ae,ae===Q.length&&R(q)}))}),Q.length===0&&R(q)},pt=_=>{var A=Nn[_];delete Nn[_];var O=A.rawConstructor,R=A.rawDestructor,q=A.fields,Q=q.map(ae=>ae.getterReturnType).concat(q.map(ae=>ae.setterArgumentType));Xe([_],Q,ae=>{var oe={};return q.forEach((me,Ae)=>{var Oe=me.fieldName,Fe=ae[Ae],lt=me.getter,_t=me.getterContext,Gt=ae[Ae+q.length],vn=me.setter,un=me.setterContext;oe[Oe]={read:ln=>Fe.fromWireType(lt(_t,ln)),write:(ln,Oi)=>{var zn=[];vn(un,ln,Gt.toWireType(zn,Oi)),Kn(zn)}}}),[{name:A.name,fromWireType:me=>{var Ae={};for(var Oe in oe)Ae[Oe]=oe[Oe].read(me);return R(me),Ae},toWireType:(me,Ae)=>{for(var Oe in oe)if(!(Oe in Ae))throw new TypeError(`Missing field: "${Oe}"`);var Fe=O();for(Oe in oe)oe[Oe].write(Fe,Ae[Oe]);return me!==null&&me.push(R,Fe),Fe},argPackAdvance:Br,readValueFromPointer:yn,destructorFunction:R}]})},Wt=(_,A,O,R,q)=>{},Ca=()=>{for(var _=new Array(256),A=0;A<256;++A)_[A]=String.fromCharCode(A);xi=_},xi,sn=_=>{for(var A="",O=_;P[O];)A+=xi[P[O++]];return A},yo,gt=_=>{throw new yo(_)};function Ch(_,A){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var R=A.name;if(_||gt(`type "${R}" must have a positive integer typeid pointer`),sr.hasOwnProperty(_)){if(O.ignoreDuplicateRegistrations)return;gt(`Cannot register type '${R}' twice`)}if(sr[_]=A,delete eo[_],an.hasOwnProperty(_)){var q=an[_];delete an[_],q.forEach(Q=>Q())}}function br(_,A){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ch(_,A,O)}var Br=8,Y=(_,A,O,R)=>{A=sn(A),br(_,{name:A,fromWireType:function(q){return!!q},toWireType:function(q,Q){return Q?O:R},argPackAdvance:Br,readValueFromPointer:function(q){return this.fromWireType(P[q])},destructorFunction:null})},Ee=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),ke=_=>{function A(O){return O.$$.ptrType.registeredClass.name}gt(A(_)+" instance already deleted")},je=!1,mt=_=>{},Pt=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},st=_=>{_.count.value-=1;var A=_.count.value===0;A&&Pt(_)},it=(_,A,O)=>{if(A===O)return _;if(O.baseClass===void 0)return null;var R=it(_,A,O.baseClass);return R===null?null:O.downcast(R)},_n={},Yt={},Xt=(_,A)=>{for(A===void 0&>("ptr should not be undefined");_.baseClass;)A=_.upcast(A),_=_.baseClass;return A},cr=(_,A)=>(A=Xt(_,A),Yt[A]),Vr=(_,A)=>{(!A.ptrType||!A.ptr)&&$e("makeClassHandle requires ptr and ptrType");var O=!!A.smartPtrType,R=!!A.smartPtr;return O!==R&&$e("Both smartPtrType and smartPtr must be specified"),A.count={value:1},cn(Object.create(_,{$$:{value:A,writable:!0}}))};function vo(_){var A=this.getPointee(_);if(!A)return this.destructor(_),null;var O=cr(this.registeredClass,A);if(O!==void 0){if(O.$$.count.value===0)return O.$$.ptr=A,O.$$.smartPtr=_,O.clone();var R=O.clone();return this.destructor(_),R}function q(){return this.isSmartPointer?Vr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:A,smartPtrType:this,smartPtr:_}):Vr(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var Q=this.registeredClass.getActualType(A),ae=_n[Q];if(!ae)return q.call(this);var oe;this.isConst?oe=ae.constPointerType:oe=ae.pointerType;var me=it(A,this.registeredClass,oe.registeredClass);return me===null?q.call(this):this.isSmartPointer?Vr(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:me,smartPtrType:this,smartPtr:_}):Vr(oe.registeredClass.instancePrototype,{ptrType:oe,ptr:me})}var cn=_=>typeof FinalizationRegistry>"u"?(cn=A=>A,_):(je=new FinalizationRegistry(A=>{st(A.$$)}),cn=A=>{var O=A.$$,R=!!O.smartPtr;if(R){var q={$$:O};je.register(A,q,A)}return A},mt=A=>je.unregister(A),cn(_)),Qo=[],_h=()=>{for(;Qo.length;){var _=Qo.pop();_.$$.deleteScheduled=!1,_.delete()}},tl,lB=()=>{Object.assign(nl.prototype,{isAliasOf(_){if(!(this instanceof nl)||!(_ instanceof nl))return!1;var A=this.$$.ptrType.registeredClass,O=this.$$.ptr;_.$$=_.$$;for(var R=_.$$.ptrType.registeredClass,q=_.$$.ptr;A.baseClass;)O=A.upcast(O),A=A.baseClass;for(;R.baseClass;)q=R.upcast(q),R=R.baseClass;return A===R&&O===q},clone(){if(this.$$.ptr||ke(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=cn(Object.create(Object.getPrototypeOf(this),{$$:{value:Ee(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),mt(this),st(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||ke(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),Qo.push(this),Qo.length===1&&tl&&tl(_h),this.$$.deleteScheduled=!0,this}})};function nl(){}var Gs=(_,A)=>Object.defineProperty(A,"name",{value:_}),ew=(_,A,O)=>{if(_[A].overloadTable===void 0){var R=_[A];_[A]=function(){for(var q=arguments.length,Q=new Array(q),ae=0;ae<q;ae++)Q[ae]=arguments[ae];return _[A].overloadTable.hasOwnProperty(Q.length)||gt(`Function '${O}' called with an invalid number of arguments (${Q.length}) - expects one of (${_[A].overloadTable})!`),_[A].overloadTable[Q.length].apply(this,Q)},_[A].overloadTable=[],_[A].overloadTable[R.argCount]=R}},Ah=(_,A,O)=>{o.hasOwnProperty(_)?((O===void 0||o[_].overloadTable!==void 0&&o[_].overloadTable[O]!==void 0)&>(`Cannot register public name '${_}' twice`),ew(o,_,_),o.hasOwnProperty(O)&>(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),o[_].overloadTable[O]=A):(o[_]=A,O!==void 0&&(o[_].numArguments=O))},dB=48,fB=57,hB=_=>{_=_.replace(/[^a-zA-Z0-9_]/g,"$");var A=_.charCodeAt(0);return A>=dB&&A<=fB?`_${_}`:_};function pB(_,A,O,R,q,Q,ae,oe){this.name=_,this.constructor=A,this.instancePrototype=O,this.rawDestructor=R,this.baseClass=q,this.getActualType=Q,this.upcast=ae,this.downcast=oe,this.pureVirtualFunctions=[]}var Sh=(_,A,O)=>{for(;A!==O;)A.upcast||gt(`Expected null or instance of ${O.name}, got an instance of ${A.name}`),_=A.upcast(_),A=A.baseClass;return _};function gB(_,A){if(A===null)return this.isReference&>(`null is not a valid ${this.name}`),0;A.$$||gt(`Cannot pass "${kh(A)}" as a ${this.name}`),A.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`);var O=A.$$.ptrType.registeredClass,R=Sh(A.$$.ptr,O,this.registeredClass);return R}function mB(_,A){var O;if(A===null)return this.isReference&>(`null is not a valid ${this.name}`),this.isSmartPointer?(O=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,O),O):0;(!A||!A.$$)&>(`Cannot pass "${kh(A)}" as a ${this.name}`),A.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&A.$$.ptrType.isConst&>(`Cannot convert argument of type ${A.$$.smartPtrType?A.$$.smartPtrType.name:A.$$.ptrType.name} to parameter type ${this.name}`);var R=A.$$.ptrType.registeredClass;if(O=Sh(A.$$.ptr,R,this.registeredClass),this.isSmartPointer)switch(A.$$.smartPtr===void 0&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:A.$$.smartPtrType===this?O=A.$$.smartPtr:gt(`Cannot convert argument of type ${A.$$.smartPtrType?A.$$.smartPtrType.name:A.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:O=A.$$.smartPtr;break;case 2:if(A.$$.smartPtrType===this)O=A.$$.smartPtr;else{var q=A.clone();O=this.rawShare(O,bo.toHandle(()=>q.delete())),_!==null&&_.push(this.rawDestructor,O)}break;default:gt("Unsupporting sharing policy")}return O}function yB(_,A){if(A===null)return this.isReference&>(`null is not a valid ${this.name}`),0;A.$$||gt(`Cannot pass "${kh(A)}" as a ${this.name}`),A.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),A.$$.ptrType.isConst&>(`Cannot convert argument of type ${A.$$.ptrType.name} to parameter type ${this.name}`);var O=A.$$.ptrType.registeredClass,R=Sh(A.$$.ptr,O,this.registeredClass);return R}var vB=()=>{Object.assign(rl.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var A;(A=this.rawDestructor)===null||A===void 0||A.call(this,_)},argPackAdvance:Br,readValueFromPointer:yn,fromWireType:vo})};function rl(_,A,O,R,q,Q,ae,oe,me,Ae,Oe){this.name=_,this.registeredClass=A,this.isReference=O,this.isConst=R,this.isSmartPointer=q,this.pointeeType=Q,this.sharingPolicy=ae,this.rawGetPointee=oe,this.rawConstructor=me,this.rawShare=Ae,this.rawDestructor=Oe,!q&&A.baseClass===void 0?R?(this.toWireType=gB,this.destructorFunction=null):(this.toWireType=yB,this.destructorFunction=null):this.toWireType=mB}var tw=(_,A,O)=>{o.hasOwnProperty(_)||$e("Replacing nonexistent public symbol"),o[_].overloadTable!==void 0&&O!==void 0?o[_].overloadTable[O]=A:(o[_]=A,o[_].argCount=O)},wB=(_,A,O)=>{_=_.replace(/p/g,"i");var R=o["dynCall_"+_];return R(A,...O)},ol=[],nw,ft=_=>{var A=ol[_];return A||(_>=ol.length&&(ol.length=_+1),ol[_]=A=nw.get(_)),A},bB=function(_,A){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return wB(_,A,O);var R=ft(A)(...O);return R},EB=(_,A)=>function(){for(var O=arguments.length,R=new Array(O),q=0;q<O;q++)R[q]=arguments[q];return bB(_,A,R)},Ur=(_,A)=>{_=sn(_);function O(){return _.includes("j")?EB(_,A):ft(A)}var R=O();return typeof R!="function"&>(`unknown function pointer with signature ${_}: ${A}`),R},CB=(_,A)=>{var O=Gs(A,function(R){this.name=A,this.message=R;var q=new Error(R).stack;q!==void 0&&(this.stack=this.toString()+`
|
|
137
|
-
`+q.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(_.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O},rw,ow=_=>{var A=dw(_),O=sn(A);return Eo(A),O},il=(_,A)=>{var O=[],R={};function q(Q){if(!R[Q]&&!sr[Q]){if(eo[Q]){eo[Q].forEach(q);return}O.push(Q),R[Q]=!0}}throw A.forEach(q),new rw(`${_}: `+O.map(ow).join([", "]))},_B=(_,A,O,R,q,Q,ae,oe,me,Ae,Oe,Fe,lt)=>{Oe=sn(Oe),Q=Ur(q,Q),oe&&(oe=Ur(ae,oe)),Ae&&(Ae=Ur(me,Ae)),lt=Ur(Fe,lt);var _t=hB(Oe);Ah(_t,function(){il(`Cannot construct ${Oe} due to unbound types`,[R])}),Xe([_,A,O],R?[R]:[],Gt=>{Gt=Gt[0];var vn,un;R?(vn=Gt.registeredClass,un=vn.instancePrototype):un=nl.prototype;var ln=Gs(Oe,function(){if(Object.getPrototypeOf(this)!==Oi)throw new yo("Use 'new' to construct "+Oe);if(zn.constructor_body===void 0)throw new yo(Oe+" has no accessible constructor");for(var Sw=arguments.length,cl=new Array(Sw),ul=0;ul<Sw;ul++)cl[ul]=arguments[ul];var Iw=zn.constructor_body[cl.length];if(Iw===void 0)throw new yo(`Tried to invoke ctor of ${Oe} with invalid number of parameters (${cl.length}) - expected (${Object.keys(zn.constructor_body).toString()}) parameters instead!`);return Iw.apply(this,cl)}),Oi=Object.create(un,{constructor:{value:ln}});ln.prototype=Oi;var zn=new pB(Oe,ln,Oi,lt,vn,Q,oe,Ae);if(zn.baseClass){var Co,sl;(sl=(Co=zn.baseClass).__derivedClasses)!==null&&sl!==void 0||(Co.__derivedClasses=[]),zn.baseClass.__derivedClasses.push(zn)}var lR=new rl(Oe,zn,!0,!1,!1),_w=new rl(Oe+"*",zn,!1,!1,!1),Aw=new rl(Oe+" const*",zn,!1,!0,!1);return _n[_]={pointerType:_w,constPointerType:Aw},tw(_t,ln),[lR,_w,Aw]})},Ih=(_,A)=>{for(var O=[],R=0;R<_;R++)O.push(j[A+R*4>>2]);return O};function AB(_){for(var A=1;A<_.length;++A)if(_[A]!==null&&_[A].destructorFunction===void 0)return!0;return!1}function Th(_,A,O,R,q,Q){var ae=A.length;ae<2&>("argTypes array size mismatch! Must at least get return value and 'this' types!");var oe=A[1]!==null&&O!==null,me=AB(A),Ae=A[0].name!=="void",Oe=ae-2,Fe=new Array(Oe),lt=[],_t=[],Gt=function(){_t.length=0;var vn;lt.length=oe?2:1,lt[0]=q,oe&&(vn=A[1].toWireType(_t,this),lt[1]=vn);for(var un=0;un<Oe;++un)Fe[un]=A[un+2].toWireType(_t,un<0||arguments.length<=un?void 0:arguments[un]),lt.push(Fe[un]);var ln=R(...lt);function Oi(zn){if(me)Kn(_t);else for(var Co=oe?1:2;Co<A.length;Co++){var sl=Co===1?vn:Fe[Co-2];A[Co].destructorFunction!==null&&A[Co].destructorFunction(sl)}if(Ae)return A[0].fromWireType(zn)}return Oi(ln)};return Gs(_,Gt)}var SB=(_,A,O,R,q,Q)=>{var ae=Ih(A,O);q=Ur(R,q),Xe([],[_],oe=>{oe=oe[0];var me=`constructor ${oe.name}`;if(oe.registeredClass.constructor_body===void 0&&(oe.registeredClass.constructor_body=[]),oe.registeredClass.constructor_body[A-1]!==void 0)throw new yo(`Cannot register multiple constructors with identical number of parameters (${A-1}) for class '${oe.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return oe.registeredClass.constructor_body[A-1]=()=>{il(`Cannot construct ${oe.name} due to unbound types`,ae)},Xe([],ae,Ae=>(Ae.splice(1,0,null),oe.registeredClass.constructor_body[A-1]=Th(me,Ae,null,q,Q),[])),[]})},iw=_=>{_=_.trim();const A=_.indexOf("(");return A!==-1?_.substr(0,A):_},IB=(_,A,O,R,q,Q,ae,oe,me,Ae)=>{var Oe=Ih(O,R);A=sn(A),A=iw(A),Q=Ur(q,Q),Xe([],[_],Fe=>{Fe=Fe[0];var lt=`${Fe.name}.${A}`;A.startsWith("@@")&&(A=Symbol[A.substring(2)]),oe&&Fe.registeredClass.pureVirtualFunctions.push(A);function _t(){il(`Cannot call ${lt} due to unbound types`,Oe)}var Gt=Fe.registeredClass.instancePrototype,vn=Gt[A];return vn===void 0||vn.overloadTable===void 0&&vn.className!==Fe.name&&vn.argCount===O-2?(_t.argCount=O-2,_t.className=Fe.name,Gt[A]=_t):(ew(Gt,A,lt),Gt[A].overloadTable[O-2]=_t),Xe([],Oe,un=>{var ln=Th(lt,un,Fe,Q,ae);return Gt[A].overloadTable===void 0?(ln.argCount=O-2,Gt[A]=ln):Gt[A].overloadTable[O-2]=ln,[]}),[]})},xh=[],wo=[],Oh=_=>{_>9&&--wo[_+1]===0&&(wo[_]=void 0,xh.push(_))},TB=()=>wo.length/2-5-xh.length,xB=()=>{wo.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=TB},bo={toValue:_=>(_||gt("Cannot use deleted val. handle = "+_),wo[_]),toHandle:_=>{switch(_){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const A=xh.pop()||wo.length;return wo[A]=_,wo[A+1]=1,A}}}},aw={name:"emscripten::val",fromWireType:_=>{var A=bo.toValue(_);return Oh(_),A},toWireType:(_,A)=>bo.toHandle(A),argPackAdvance:Br,readValueFromPointer:yn,destructorFunction:null},OB=_=>br(_,aw),PB=(_,A,O)=>{switch(A){case 1:return O?function(R){return this.fromWireType(T[R])}:function(R){return this.fromWireType(P[R])};case 2:return O?function(R){return this.fromWireType(N[R>>1])}:function(R){return this.fromWireType(L[R>>1])};case 4:return O?function(R){return this.fromWireType(U[R>>2])}:function(R){return this.fromWireType(j[R>>2])};default:throw new TypeError(`invalid integer width (${A}): ${_}`)}},kB=(_,A,O,R)=>{A=sn(A);function q(){}q.values={},br(_,{name:A,constructor:q,fromWireType:function(Q){return this.constructor.values[Q]},toWireType:(Q,ae)=>ae.value,argPackAdvance:Br,readValueFromPointer:PB(A,O,R),destructorFunction:null}),Ah(A,q)},Ph=(_,A)=>{var O=sr[_];return O===void 0&>(`${A} has unknown type ${ow(_)}`),O},BB=(_,A,O)=>{var R=Ph(_,"enum");A=sn(A);var q=R.constructor,Q=Object.create(R.constructor.prototype,{value:{value:O},constructor:{value:Gs(`${R.name}_${A}`,function(){})}});q.values[O]=Q,q[A]=Q},kh=_=>{if(_===null)return"null";var A=typeof _;return A==="object"||A==="array"||A==="function"?_.toString():""+_},NB=(_,A)=>{switch(A){case 4:return function(O){return this.fromWireType(K[O>>2])};case 8:return function(O){return this.fromWireType(G[O>>3])};default:throw new TypeError(`invalid float width (${A}): ${_}`)}},RB=(_,A,O)=>{A=sn(A),br(_,{name:A,fromWireType:R=>R,toWireType:(R,q)=>q,argPackAdvance:Br,readValueFromPointer:NB(A,O),destructorFunction:null})},DB=(_,A,O,R,q,Q,ae,oe)=>{var me=Ih(A,O);_=sn(_),_=iw(_),q=Ur(R,q),Ah(_,function(){il(`Cannot call ${_} due to unbound types`,me)},A-1),Xe([],me,Ae=>{var Oe=[Ae[0],null].concat(Ae.slice(1));return tw(_,Th(_,Oe,null,q,Q),A-1),[]})},MB=(_,A,O)=>{switch(A){case 1:return O?R=>T[R]:R=>P[R];case 2:return O?R=>N[R>>1]:R=>L[R>>1];case 4:return O?R=>U[R>>2]:R=>j[R>>2];default:throw new TypeError(`invalid integer width (${A}): ${_}`)}},LB=(_,A,O,R,q)=>{A=sn(A);var Q=Oe=>Oe;if(R===0){var ae=32-8*O;Q=Oe=>Oe<<ae>>>ae}var oe=A.includes("unsigned"),me=(Oe,Fe)=>{},Ae;oe?Ae=function(Oe,Fe){return me(Fe,this.name),Fe>>>0}:Ae=function(Oe,Fe){return me(Fe,this.name),Fe},br(_,{name:A,fromWireType:Q,toWireType:Ae,argPackAdvance:Br,readValueFromPointer:MB(A,O,R!==0),destructorFunction:null})},FB=(_,A,O)=>{var R=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],q=R[A];function Q(ae){var oe=j[ae>>2],me=j[ae+4>>2];return new q(T.buffer,me,oe)}O=sn(O),br(_,{name:O,fromWireType:Q,argPackAdvance:Br,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},jB=Object.assign({optional:!0},aw),VB=(_,A)=>{br(_,jB)},UB=(_,A,O,R)=>{if(!(R>0))return 0;for(var q=O,Q=O+R-1,ae=0;ae<_.length;++ae){var oe=_.charCodeAt(ae);if(oe>=55296&&oe<=57343){var me=_.charCodeAt(++ae);oe=65536+((oe&1023)<<10)|me&1023}if(oe<=127){if(O>=Q)break;A[O++]=oe}else if(oe<=2047){if(O+1>=Q)break;A[O++]=192|oe>>6,A[O++]=128|oe&63}else if(oe<=65535){if(O+2>=Q)break;A[O++]=224|oe>>12,A[O++]=128|oe>>6&63,A[O++]=128|oe&63}else{if(O+3>=Q)break;A[O++]=240|oe>>18,A[O++]=128|oe>>12&63,A[O++]=128|oe>>6&63,A[O++]=128|oe&63}}return A[O]=0,O-q},qs=(_,A,O)=>UB(_,P,A,O),GB=_=>{for(var A=0,O=0;O<_.length;++O){var R=_.charCodeAt(O);R<=127?A++:R<=2047?A+=2:R>=55296&&R<=57343?(A+=4,++O):A+=3}return A},sw=typeof TextDecoder<"u"?new TextDecoder:void 0,cw=function(_){let A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var R=A+O,q=A;_[q]&&!(q>=R);)++q;if(q-A>16&&_.buffer&&sw)return sw.decode(_.subarray(A,q));for(var Q="";A<q;){var ae=_[A++];if(!(ae&128)){Q+=String.fromCharCode(ae);continue}var oe=_[A++]&63;if((ae&224)==192){Q+=String.fromCharCode((ae&31)<<6|oe);continue}var me=_[A++]&63;if((ae&240)==224?ae=(ae&15)<<12|oe<<6|me:ae=(ae&7)<<18|oe<<12|me<<6|_[A++]&63,ae<65536)Q+=String.fromCharCode(ae);else{var Ae=ae-65536;Q+=String.fromCharCode(55296|Ae>>10,56320|Ae&1023)}}return Q},qB=(_,A)=>_?cw(P,_,A):"",HB=(_,A)=>{A=sn(A);var O=A==="std::string";br(_,{name:A,fromWireType(R){var q=j[R>>2],Q=R+4,ae;if(O)for(var oe=Q,me=0;me<=q;++me){var Ae=Q+me;if(me==q||P[Ae]==0){var Oe=Ae-oe,Fe=qB(oe,Oe);ae===void 0?ae=Fe:(ae+="\0",ae+=Fe),oe=Ae+1}}else{for(var lt=new Array(q),me=0;me<q;++me)lt[me]=String.fromCharCode(P[Q+me]);ae=lt.join("")}return Eo(R),ae},toWireType(R,q){q instanceof ArrayBuffer&&(q=new Uint8Array(q));var Q,ae=typeof q=="string";ae||q instanceof Uint8Array||q instanceof Uint8ClampedArray||q instanceof Int8Array||gt("Cannot pass non-string to std::string"),O&&ae?Q=GB(q):Q=q.length;var oe=Rh(4+Q+1),me=oe+4;if(j[oe>>2]=Q,O&&ae)qs(q,me,Q+1);else if(ae)for(var Ae=0;Ae<Q;++Ae){var Oe=q.charCodeAt(Ae);Oe>255&&(Eo(me),gt("String has UTF-16 code units that do not fit in 8 bits")),P[me+Ae]=Oe}else for(var Ae=0;Ae<Q;++Ae)P[me+Ae]=q[Ae];return R!==null&&R.push(Eo,oe),oe},argPackAdvance:Br,readValueFromPointer:yn,destructorFunction(R){Eo(R)}})},uw=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,WB=(_,A)=>{for(var O=_,R=O>>1,q=R+A/2;!(R>=q)&&L[R];)++R;if(O=R<<1,O-_>32&&uw)return uw.decode(P.subarray(_,O));for(var Q="",ae=0;!(ae>=A/2);++ae){var oe=N[_+ae*2>>1];if(oe==0)break;Q+=String.fromCharCode(oe)}return Q},YB=(_,A,O)=>{var R;if((R=O)!==null&&R!==void 0||(O=2147483647),O<2)return 0;O-=2;for(var q=A,Q=O<_.length*2?O/2:_.length,ae=0;ae<Q;++ae){var oe=_.charCodeAt(ae);N[A>>1]=oe,A+=2}return N[A>>1]=0,A-q},KB=_=>_.length*2,zB=(_,A)=>{for(var O=0,R="";!(O>=A/4);){var q=U[_+O*4>>2];if(q==0)break;if(++O,q>=65536){var Q=q-65536;R+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}else R+=String.fromCharCode(q)}return R},$B=(_,A,O)=>{var R;if((R=O)!==null&&R!==void 0||(O=2147483647),O<4)return 0;for(var q=A,Q=q+O-4,ae=0;ae<_.length;++ae){var oe=_.charCodeAt(ae);if(oe>=55296&&oe<=57343){var me=_.charCodeAt(++ae);oe=65536+((oe&1023)<<10)|me&1023}if(U[A>>2]=oe,A+=4,A+4>Q)break}return U[A>>2]=0,A-q},XB=_=>{for(var A=0,O=0;O<_.length;++O){var R=_.charCodeAt(O);R>=55296&&R<=57343&&++O,A+=4}return A},QB=(_,A,O)=>{O=sn(O);var R,q,Q,ae;A===2?(R=WB,q=YB,ae=KB,Q=oe=>L[oe>>1]):A===4&&(R=zB,q=$B,ae=XB,Q=oe=>j[oe>>2]),br(_,{name:O,fromWireType:oe=>{for(var me=j[oe>>2],Ae,Oe=oe+4,Fe=0;Fe<=me;++Fe){var lt=oe+4+Fe*A;if(Fe==me||Q(lt)==0){var _t=lt-Oe,Gt=R(Oe,_t);Ae===void 0?Ae=Gt:(Ae+="\0",Ae+=Gt),Oe=lt+A}}return Eo(oe),Ae},toWireType:(oe,me)=>{typeof me!="string"&>(`Cannot pass non-string to C++ string type ${O}`);var Ae=ae(me),Oe=Rh(4+Ae+A);return j[Oe>>2]=Ae/A,q(me,Oe+4,Ae+A),oe!==null&&oe.push(Eo,Oe),Oe},argPackAdvance:Br,readValueFromPointer:yn,destructorFunction(oe){Eo(oe)}})},JB=(_,A,O,R,q,Q)=>{Nn[_]={name:sn(A),rawConstructor:Ur(O,R),rawDestructor:Ur(q,Q),fields:[]}},ZB=(_,A,O,R,q,Q,ae,oe,me,Ae)=>{Nn[_].fields.push({fieldName:sn(A),getterReturnType:O,getter:Ur(R,q),getterContext:Q,setterArgumentType:ae,setter:Ur(oe,me),setterContext:Ae})},eN=(_,A)=>{A=sn(A),br(_,{isVoid:!0,name:A,argPackAdvance:0,fromWireType:()=>{},toWireType:(O,R)=>{}})},tN=(_,A,O)=>P.copyWithin(_,A,A+O),Bh=[],nN=(_,A,O,R)=>(_=Bh[_],A=bo.toValue(A),_(null,A,O,R)),rN={},oN=_=>{var A=rN[_];return A===void 0?sn(_):A},lw=()=>{if(typeof globalThis=="object")return globalThis;function _(A){A.$$$embind_global$$$=A;var O=typeof $$$embind_global$$$=="object"&&A.$$$embind_global$$$==A;return O||delete A.$$$embind_global$$$,O}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&_(global)?$$$embind_global$$$=global:typeof self=="object"&&_(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},iN=_=>_===0?bo.toHandle(lw()):(_=oN(_),bo.toHandle(lw()[_])),aN=_=>{var A=Bh.length;return Bh.push(_),A},sN=(_,A)=>{for(var O=new Array(_),R=0;R<_;++R)O[R]=Ph(j[A+R*4>>2],"parameter "+R);return O},cN=Reflect.construct,uN=(_,A,O)=>{var R=[],q=_.toWireType(R,O);return R.length&&(j[A>>2]=bo.toHandle(R)),q},lN=(_,A,O)=>{var R=sN(_,A),q=R.shift();_--;var Q=new Array(_),ae=(me,Ae,Oe,Fe)=>{for(var lt=0,_t=0;_t<_;++_t)Q[_t]=R[_t].readValueFromPointer(Fe+lt),lt+=R[_t].argPackAdvance;var Gt=O===1?cN(Ae,Q):Ae.apply(me,Q);return uN(q,Oe,Gt)},oe=`methodCaller<(${R.map(me=>me.name).join(", ")}) => ${q.name}>`;return aN(Gs(oe,ae))},dN=_=>{_>9&&(wo[_+1]+=1)},fN=_=>{var A=bo.toValue(_);Kn(A),Oh(_)},hN=(_,A)=>{_=Ph(_,"_emval_take_value");var O=_.readValueFromPointer(A);return bo.toHandle(O)},pN=(_,A,O,R)=>{var q=new Date().getFullYear(),Q=new Date(q,0,1),ae=new Date(q,6,1),oe=Q.getTimezoneOffset(),me=ae.getTimezoneOffset(),Ae=Math.max(oe,me);j[_>>2]=Ae*60,U[A>>2]=+(oe!=me);var Oe=_t=>{var Gt=_t>=0?"-":"+",vn=Math.abs(_t),un=String(Math.floor(vn/60)).padStart(2,"0"),ln=String(vn%60).padStart(2,"0");return`UTC${Gt}${un}${ln}`},Fe=Oe(oe),lt=Oe(me);me<oe?(qs(Fe,O,17),qs(lt,R,17)):(qs(Fe,R,17),qs(lt,O,17))},gN=()=>2147483648,mN=(_,A)=>Math.ceil(_/A)*A,yN=_=>{var A=C.buffer,O=(_-A.byteLength+65535)/65536|0;try{return C.grow(O),k(),1}catch{}},vN=_=>{var A=P.length;_>>>=0;var O=gN();if(_>O)return!1;for(var R=1;R<=4;R*=2){var q=A*(1+.2/R);q=Math.min(q,_+100663296);var Q=Math.min(O,mN(Math.max(_,q),65536)),ae=yN(Q);if(ae)return!0}return!1},Nh={},wN=()=>d||"./this.program",Hs=()=>{if(!Hs.strings){var _=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",A={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:_,_:wN()};for(var O in Nh)Nh[O]===void 0?delete A[O]:A[O]=Nh[O];var R=[];for(var O in A)R.push(`${O}=${A[O]}`);Hs.strings=R}return Hs.strings},bN=(_,A)=>{for(var O=0;O<_.length;++O)T[A++]=_.charCodeAt(O);T[A]=0},EN=(_,A)=>{var O=0;return Hs().forEach((R,q)=>{var Q=A+O;j[_+q*4>>2]=Q,bN(R,Q),O+=R.length+1}),0},CN=(_,A)=>{var O=Hs();j[_>>2]=O.length;var R=0;return O.forEach(q=>R+=q.length+1),j[A>>2]=R,0},_N=_=>52;function AN(_,A,O,R,q){return 70}var SN=[null,[],[]],IN=(_,A)=>{var O=SN[_];A===0||A===10?((_===1?w:b)(cw(O)),O.length=0):O.push(A)},TN=(_,A,O,R)=>{for(var q=0,Q=0;Q<O;Q++){var ae=j[A>>2],oe=j[A+4>>2];A+=8;for(var me=0;me<oe;me++)IN(_,P[ae+me]);q+=oe}return j[R>>2]=q,0},xN=_=>_;He=o.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},Ca(),yo=o.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},lB(),vB(),rw=o.UnboundTypeError=CB(Error,"UnboundTypeError"),xB();var ON={t:at,x:De,a:Le,j:_e,k:$t,O:Ht,q:Cn,ga:Yn,d:ot,ca:Zr,va:pt,ba:Wt,pa:Y,ta:_B,sa:SB,E:IB,oa:OB,F:kB,n:BB,W:RB,X:DB,y:LB,u:FB,ua:VB,V:HB,P:QB,L:JB,wa:ZB,qa:eN,ja:tN,T:nN,xa:Oh,ya:iN,U:lN,Y:dN,Z:fN,ra:hN,da:pN,ha:vN,ea:EN,fa:CN,ia:_N,$:AN,S:TN,J:XN,C:JN,Q:RN,R:iR,r:YN,b:PN,D:$N,la:eR,c:MN,ka:tR,h:NN,i:VN,s:UN,N:zN,w:qN,I:rR,K:KN,z:ZN,H:aR,aa:cR,_:uR,l:LN,f:DN,e:BN,g:kN,M:oR,m:jN,ma:QN,p:GN,v:HN,na:WN,B:nR,o:FN,G:sR,A:xN},Kt=fe(),dw=_=>(dw=Kt.Ba)(_),Eo=o._free=_=>(Eo=o._free=Kt.Ca)(_),Rh=o._malloc=_=>(Rh=o._malloc=Kt.Ea)(_),fw=_=>(fw=Kt.Fa)(_),ut=(_,A)=>(ut=Kt.Ga)(_,A),hw=_=>(hw=Kt.Ha)(_),pw=_=>(pw=Kt.Ia)(_),gw=()=>(gw=Kt.Ja)(),mw=_=>(mw=Kt.Ka)(_),yw=_=>(yw=Kt.La)(_),vw=(_,A,O)=>(vw=Kt.Ma)(_,A,O);o.dynCall_viijii=(_,A,O,R,q,Q,ae)=>(o.dynCall_viijii=Kt.Na)(_,A,O,R,q,Q,ae);var ww=o.dynCall_jiii=(_,A,O,R)=>(ww=o.dynCall_jiii=Kt.Oa)(_,A,O,R);o.dynCall_jiji=(_,A,O,R,q)=>(o.dynCall_jiji=Kt.Pa)(_,A,O,R,q);var bw=o.dynCall_jiiii=(_,A,O,R,q)=>(bw=o.dynCall_jiiii=Kt.Qa)(_,A,O,R,q);o.dynCall_iiiiij=(_,A,O,R,q,Q,ae)=>(o.dynCall_iiiiij=Kt.Ra)(_,A,O,R,q,Q,ae),o.dynCall_iiiiijj=(_,A,O,R,q,Q,ae,oe,me)=>(o.dynCall_iiiiijj=Kt.Sa)(_,A,O,R,q,Q,ae,oe,me),o.dynCall_iiiiiijj=(_,A,O,R,q,Q,ae,oe,me,Ae)=>(o.dynCall_iiiiiijj=Kt.Ta)(_,A,O,R,q,Q,ae,oe,me,Ae);function PN(_,A){var O=ue();try{return ft(_)(A)}catch(R){if(ve(O),R!==R+0)throw R;ut(1,0)}}function kN(_,A,O,R){var q=ue();try{ft(_)(A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function BN(_,A,O){var R=ue();try{ft(_)(A,O)}catch(q){if(ve(R),q!==q+0)throw q;ut(1,0)}}function NN(_,A,O,R){var q=ue();try{return ft(_)(A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function RN(_,A,O,R,q){var Q=ue();try{return ft(_)(A,O,R,q)}catch(ae){if(ve(Q),ae!==ae+0)throw ae;ut(1,0)}}function DN(_,A){var O=ue();try{ft(_)(A)}catch(R){if(ve(O),R!==R+0)throw R;ut(1,0)}}function MN(_,A,O){var R=ue();try{return ft(_)(A,O)}catch(q){if(ve(R),q!==q+0)throw q;ut(1,0)}}function LN(_){var A=ue();try{ft(_)()}catch(O){if(ve(A),O!==O+0)throw O;ut(1,0)}}function FN(_,A,O,R,q,Q,ae,oe,me,Ae,Oe){var Fe=ue();try{ft(_)(A,O,R,q,Q,ae,oe,me,Ae,Oe)}catch(lt){if(ve(Fe),lt!==lt+0)throw lt;ut(1,0)}}function jN(_,A,O,R,q){var Q=ue();try{ft(_)(A,O,R,q)}catch(ae){if(ve(Q),ae!==ae+0)throw ae;ut(1,0)}}function VN(_,A,O,R,q){var Q=ue();try{return ft(_)(A,O,R,q)}catch(ae){if(ve(Q),ae!==ae+0)throw ae;ut(1,0)}}function UN(_,A,O,R,q,Q){var ae=ue();try{return ft(_)(A,O,R,q,Q)}catch(oe){if(ve(ae),oe!==oe+0)throw oe;ut(1,0)}}function GN(_,A,O,R,q,Q){var ae=ue();try{ft(_)(A,O,R,q,Q)}catch(oe){if(ve(ae),oe!==oe+0)throw oe;ut(1,0)}}function qN(_,A,O,R,q,Q,ae){var oe=ue();try{return ft(_)(A,O,R,q,Q,ae)}catch(me){if(ve(oe),me!==me+0)throw me;ut(1,0)}}function HN(_,A,O,R,q,Q,ae,oe){var me=ue();try{ft(_)(A,O,R,q,Q,ae,oe)}catch(Ae){if(ve(me),Ae!==Ae+0)throw Ae;ut(1,0)}}function WN(_,A,O,R,q,Q,ae,oe,me){var Ae=ue();try{ft(_)(A,O,R,q,Q,ae,oe,me)}catch(Oe){if(ve(Ae),Oe!==Oe+0)throw Oe;ut(1,0)}}function YN(_){var A=ue();try{return ft(_)()}catch(O){if(ve(A),O!==O+0)throw O;ut(1,0)}}function KN(_,A,O,R,q,Q,ae,oe,me){var Ae=ue();try{return ft(_)(A,O,R,q,Q,ae,oe,me)}catch(Oe){if(ve(Ae),Oe!==Oe+0)throw Oe;ut(1,0)}}function zN(_,A,O,R,q,Q,ae){var oe=ue();try{return ft(_)(A,O,R,q,Q,ae)}catch(me){if(ve(oe),me!==me+0)throw me;ut(1,0)}}function $N(_,A,O,R){var q=ue();try{return ft(_)(A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function XN(_,A,O,R){var q=ue();try{return ft(_)(A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function QN(_,A,O,R,q,Q,ae,oe){var me=ue();try{ft(_)(A,O,R,q,Q,ae,oe)}catch(Ae){if(ve(me),Ae!==Ae+0)throw Ae;ut(1,0)}}function JN(_,A,O,R,q,Q){var ae=ue();try{return ft(_)(A,O,R,q,Q)}catch(oe){if(ve(ae),oe!==oe+0)throw oe;ut(1,0)}}function ZN(_,A,O,R,q,Q,ae,oe,me,Ae){var Oe=ue();try{return ft(_)(A,O,R,q,Q,ae,oe,me,Ae)}catch(Fe){if(ve(Oe),Fe!==Fe+0)throw Fe;ut(1,0)}}function eR(_,A,O){var R=ue();try{return ft(_)(A,O)}catch(q){if(ve(R),q!==q+0)throw q;ut(1,0)}}function tR(_,A,O,R,q){var Q=ue();try{return ft(_)(A,O,R,q)}catch(ae){if(ve(Q),ae!==ae+0)throw ae;ut(1,0)}}function nR(_,A,O,R,q,Q,ae,oe,me,Ae){var Oe=ue();try{ft(_)(A,O,R,q,Q,ae,oe,me,Ae)}catch(Fe){if(ve(Oe),Fe!==Fe+0)throw Fe;ut(1,0)}}function rR(_,A,O,R,q,Q,ae,oe){var me=ue();try{return ft(_)(A,O,R,q,Q,ae,oe)}catch(Ae){if(ve(me),Ae!==Ae+0)throw Ae;ut(1,0)}}function oR(_,A,O,R,q,Q,ae){var oe=ue();try{ft(_)(A,O,R,q,Q,ae)}catch(me){if(ve(oe),me!==me+0)throw me;ut(1,0)}}function iR(_,A,O,R){var q=ue();try{return ft(_)(A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function aR(_,A,O,R,q,Q,ae,oe,me,Ae,Oe,Fe){var lt=ue();try{return ft(_)(A,O,R,q,Q,ae,oe,me,Ae,Oe,Fe)}catch(_t){if(ve(lt),_t!==_t+0)throw _t;ut(1,0)}}function sR(_,A,O,R,q,Q,ae,oe,me,Ae,Oe,Fe,lt,_t,Gt,vn){var un=ue();try{ft(_)(A,O,R,q,Q,ae,oe,me,Ae,Oe,Fe,lt,_t,Gt,vn)}catch(ln){if(ve(un),ln!==ln+0)throw ln;ut(1,0)}}function cR(_,A,O,R){var q=ue();try{return ww(_,A,O,R)}catch(Q){if(ve(q),Q!==Q+0)throw Q;ut(1,0)}}function uR(_,A,O,R,q){var Q=ue();try{return bw(_,A,O,R,q)}catch(ae){if(ve(Q),ae!==ae+0)throw ae;ut(1,0)}}var al,Ew;H=function _(){al||Cw(),al||(H=_)};function Cw(){if(ye>0||!Ew&&(Ew=1,re(),ye>0))return;function _(){var A;al||(al=1,o.calledRun=1,!S&&(ne(),i(o),(A=o.onRuntimeInitialized)===null||A===void 0||A.call(o),se()))}o.setStatus?(o.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>o.setStatus(""),1),_()},1)):_()}if(o.preInit)for(typeof o.preInit=="function"&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Cw(),r=s,r}})();function PI(t){return Hf(Wf,t)}async function kI(t,e){return xI(Wf,t,e)}async function BI(t,e){return OI(Wf,t,e)}const by=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],NI=[...by,["unknown"]].map(t=>t[0]),Yf=new Map(by);function RI(t){for(const[e,n]of Yf)if(t===n)return e;return"unknown"}function DI(t){if(Ey(t))return{width:t.naturalWidth,height:t.naturalHeight};if(Cy(t))return{width:t.width.baseVal.value,height:t.height.baseVal.value};if(_y(t))return{width:t.videoWidth,height:t.videoHeight};if(Sy(t))return{width:t.width,height:t.height};if(Ty(t))return{width:t.displayWidth,height:t.displayHeight};if(Ay(t))return{width:t.width,height:t.height};if(Iy(t))return{width:t.width,height:t.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function Ey(t){var e,n;try{return t instanceof((n=(e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)==null?void 0:n.HTMLImageElement)}catch{return!1}}function Cy(t){var e,n;try{return t instanceof((n=(e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)==null?void 0:n.SVGImageElement)}catch{return!1}}function _y(t){var e,n;try{return t instanceof((n=(e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)==null?void 0:n.HTMLVideoElement)}catch{return!1}}function Ay(t){var e,n;try{return t instanceof((n=(e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)==null?void 0:n.HTMLCanvasElement)}catch{return!1}}function Sy(t){try{return t instanceof ImageBitmap||Object.prototype.toString.call(t)==="[object ImageBitmap]"}catch{return!1}}function Iy(t){try{return t instanceof OffscreenCanvas||Object.prototype.toString.call(t)==="[object OffscreenCanvas]"}catch{return!1}}function Ty(t){try{return t instanceof VideoFrame||Object.prototype.toString.call(t)==="[object VideoFrame]"}catch{return!1}}function xy(t){try{return t instanceof Blob||Object.prototype.toString.call(t)==="[object Blob]"}catch{return!1}}function MI(t){try{return t instanceof ImageData||Object.prototype.toString.call(t)==="[object ImageData]"}catch{return!1}}function LI(t,e){try{const n=new OffscreenCanvas(t,e);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=t,n.height=e,n}}async function Oy(t){if(Ey(t)&&!await UI(t))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Cy(t)&&!await GI(t))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Ty(t)&&qI(t))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(_y(t)&&(t.readyState===0||t.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Sy(t)&&WI(t))throw new DOMException("The image source is detached.","InvalidStateError");const{width:e,height:n}=DI(t);if(e===0||n===0)return null;const r=LI(e,n).getContext("2d");r.drawImage(t,0,0);try{return r.getImageData(0,0,e,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function FI(t){let e;try{if(globalThis.createImageBitmap)e=await createImageBitmap(t);else if(globalThis.Image){e=new Image;let n="";try{n=URL.createObjectURL(t),e.src=n,await e.decode()}finally{URL.revokeObjectURL(n)}}else return t}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Oy(e)}function jI(t){const{width:e,height:n}=t;if(e===0||n===0)return null;const r=t.getContext("2d");try{return r.getImageData(0,0,e,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function VI(t){if(xy(t))return await FI(t);if(MI(t)){if(HI(t))throw new DOMException("The image data has been detached.","InvalidStateError");return t}return Ay(t)||Iy(t)?jI(t):await Oy(t)}async function UI(t){try{return await t.decode(),!0}catch{return!1}}async function GI(t){var e;try{return await((e=t.decode)==null?void 0:e.call(t)),!0}catch{return!1}}function qI(t){return t.format===null}function HI(t){return t.data.buffer.byteLength===0}function WI(t){return t.width===0&&t.height===0}function Py(t,e){return YI(t)?new DOMException(`${e}: ${t.message}`,t.name):KI(t)?new t.constructor(`${e}: ${t.message}`):new Error(`${e}: ${t}`)}function YI(t){return t instanceof DOMException||Object.prototype.toString.call(t)==="[object DOMException]"}function KI(t){return t instanceof Error||Object.prototype.toString.call(t)==="[object Error]"}var Ou;let Kf=class extends EventTarget{constructor(e={}){var n;super(),yI(this,Ou);try{const r=(n=e==null?void 0:e.formats)==null?void 0:n.filter(o=>o!=="unknown");if((r==null?void 0:r.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const o of r??[])if(!Yf.has(o))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${o}' is not a valid enum value of type BarcodeFormat.`);vI(this,Ou,r??[]),PI().then(o=>{this.dispatchEvent(new CustomEvent("load",{detail:o}))}).catch(o=>{this.dispatchEvent(new CustomEvent("error",{detail:o}))})}catch(r){throw Py(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return NI.filter(e=>e!=="unknown")}async detect(e){try{const n=await VI(e);if(n===null)return[];let r;const o={tryHarder:!0,returnCodabarStartEnd:!0,formats:mI(this,Ou).map(i=>Yf.get(i))};try{xy(n)?r=await kI(n,o):r=await BI(n,o)}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:a,y:s},topRight:{x:c,y:l},bottomLeft:{x:f,y:h},bottomRight:{x:d,y:p}}=i.position,u=Math.min(a,c,f,d),g=Math.min(s,l,h,p),m=Math.max(a,c,f,d),y=Math.max(s,l,h,p);return{boundingBox:new DOMRectReadOnly(u,g,m-u,y-g),rawValue:i.text,format:RI(i.format),cornerPoints:[{x:a,y:s},{x:c,y:l},{x:d,y:p},{x:f,y:h}]}})}catch(n){throw Py(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}};Ou=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=Kf);function zI(t){const{onClick:e,disabled:n,className:r}=t,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...t.style};return x.createElement("svg",{onClick:n?void 0:e,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"}))}function $I(t){const{onClick:e,disabled:n,className:r}=t,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...t.style};return x.createElement("svg",{onClick:n?void 0:e,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),x.createElement("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"}))}function XI(t){const{scanning:e,startScanning:n,stopScanning:r}=t,[o,i]=x.useState(!1);function a(){i(!0),e?r():n(),setTimeout(()=>i(!1),1e3)}return x.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:o?"default":"pointer"}},e?x.createElement(zI,{disabled:o,onClick:a}):x.createElement($I,{disabled:o,onClick:a}))}function QI(t){const{onClick:e,className:n,style:r}=t;return x.createElement("svg",{onClick:e,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"}))}function JI(t){const{onClick:e,className:n,style:r}=t;return x.createElement("svg",{onClick:e,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"}))}function ZI(t){const{status:e,scanning:n,torchToggle:r}=t;function o(i){r(i)}return n&&r?x.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},e?x.createElement(JI,{onClick:()=>o(!1)}):x.createElement(QI,{onClick:()=>o(!0)})):null}function eT(t){const{onClick:e,className:n,disabled:r=!1}=t,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...t.style};return x.createElement("svg",{onClick:r?void 0:e,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"}))}function tT(t){const{onClick:e,className:n,disabled:r=!1}=t,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...t.style};return x.createElement("svg",{onClick:r?void 0:e,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg"},x.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"}))}function nT(t){const{scanning:e,capabilities:n,onZoom:r,value:o}=t;if(!e||!r)return null;const i=(n.max-n.min)/3;return x.createElement(x.Fragment,null,x.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},x.createElement(tT,{disabled:o<=n.min,onClick:function(){r(Math.max(o-i,n.min))}})),x.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},x.createElement(eT,{disabled:o>=n.max,onClick:function(){r(Math.min(o+i,n.max))}})))}function rT(t){const{scanning:e,loading:n,capabilities:r,border:o=35,onOff:i,torch:a,zoom:s,startScanning:c,stopScanning:l}=t,f="rgba(255, 0, 0, 0.5)";return x.createElement("div",{style:{position:"relative"}},x.createElement("svg",{viewBox:"0 0 100 100",style:{top:0,left:0,zIndex:1,boxSizing:"border-box",border:`${o>=35?o:35}px solid rgba(0, 0, 0, 0.2)`}},n&&x.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",x.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),x.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:f,strokeWidth:3}),x.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:f,strokeWidth:3}),x.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:f,strokeWidth:3}),x.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:f,strokeWidth:3})),i&&x.createElement(XI,{scanning:e,startScanning:c,stopScanning:l}),a&&r.torch&&x.createElement(ZI,{scanning:e,status:a.status,torchToggle:a.toggle}),s&&r.zoom&&x.createElement(nT,{scanning:e,capabilities:r.zoom,value:s.value,onZoom:s.onChange}))}const oT={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},iT={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},aT={width:"100%",height:"100%",position:"relative"},sT={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var cT=function(t){let e,n=!1;return(...r)=>(n||(e=t(r),n=!0),e)}(()=>{const t=U9(window);switch(t.browser){case"chrome":J9(window,t);break;case"firefox":nI(window,t);break;case"safari":aI(window,t);break;default:throw new Error("Unsupported browser")}});const uT="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/vmhU/8fAs0G8YGGwKST8Igj4GCATipksVzY8p//90FWJwh45AkX//4fCF9wMEgkL3uQc+gbGJ8t4MBAMBP/hEXf9FRuWBcAfIFjYzQdoLCBwh7IWVlxaX/w8oMCP/+EQT5poGB1Ir90DhiV6af/jFYBpT2BgoQyyt2M0ToBdEaZyzt8nTo3xdNDCTSd//o6F06CjooxRr4jVF/0bOKD6OMUNDRxiMUVFR0FFQPhGXRjDpr4MAEA4wIQUhYOIw//PkZE4nrg08sOx4ACQ0CopD2aAAlwTTBxQeMcwd8w8gZTAgABXwGABOkzpI0wAQAExnWfP4x8ZjKunWdZ1o1Qe6lFGKCNULORQCELAAPnRUf/GIx/0FHGfo3SdZ0qP2cukXKLlRtBKFgAQwCkwJgFRYBEEATmDsLSY2QiQYCEnEra+UZo6F1aKMRr6GhoaP/+j//ov+i+hjLqBgMkYoqChoo1GqCjoY06TpRqjjLOYzRRmMuizmgdKhdF8kjTAAAPMCwGswzglgwAJfzqxmioKH/////////////+ijLOAwFmN0f/////////Q///8ZjP/9DGYyFwIDBeB3MA4AlBWidKM5spykAUAQOCakK+udGqN8VDYjTRuN//0bVX//6Kio4xQFv//nf//kKOoAEIB6SY6hcxenp85///4/DEPf/84Xvl4vF4dwtxfEJgCYQHMSgKCROp4+fn////L4tQf0unz89OecLxeL0ul09y6enzp4dIhKAQFA5hKfLu1nU7/Wr71rRKJUBQSUVt////l08GUPVWgAAYAeNKsxbQNAAhQx3/oKGMM6dZ1Yy6sajMbfKio7lNcv0sScZ47lNcw32ekVFMP9fp/f+mklI6at6u/dBMQuW6y+C5BcgwAA//PkZEomGg1HYGe0riWsCqbEwiY0BJFJMxrCcxGgQ2VK8xxCF1wsABgQBBgQBAYAFCkYCgALkK4fJ00E5ctJN1Uxy5au3XoGcM4dSN0EYZwzhW0WCh1PZwzhnFFQxtnbO2d0Kt6CdXbruggkTEX5Rs4TEQUVsdVXaCcuWXIBQUGmwmgoAGcJiM4dSioHQdBnEY+hjcbov//jcb/43G43G/jCRibfxugdBnDqULO2duvQumztncbo4xGKKNxugooxGIxQULoOgFgUMTA/jbrxiMDmETL+eLhcPThzOeeOZfL5fIcBYuXD/OHv8t//LJFxjxQYHHKDGFkZMtlmKM0RgQfbVtxFIHbQBDRuzRguEI1c9XZ/rWmrZfVU3Oc/9utNNygRQkCoHlAYstNN6DJ1IINpoINppv+WG/+g2mmnUmmmpBAoJIJhnwB5xkymn606Df/t000xhU03UXC5Ol8uFyXy+Xy/l8v5w4cLk4XAvwAYUvl/QL5fTdlKZkEEEEGumaKaX00zIOemf6CH///ywI3LKpiQ2Ef4xYWMSDyI0XwzikpL0ajVHZ3j9DGIjeuXcNfjn96/S/TUz/X/vX////5K/r+v7Jn+LlAoGZOIQIwMKBQM/yppKYURmhGZkR2b//PkZE0mHg1HEG8wyiD7mlwAyDU8nJHi5htakZmZGNiRcpkJhBmUmZYQcM1VDEEBggNDV/ASEZRYKFZIhkXKLlKmk7IVTKmZNJ5KhiqVUqpX+k7+qlVKyV/ZIqZDFDWTJlFyi5TJpKhiXKBQyZzIS5JhBoayV/AQWVpGWkcYTV5O/rIVSv8/0nkr+v6/vyR/X9f1/ZN8kf5/n99/n+f5/lTKmf9/mRP8yFUqpWSv4yJUqpX9kj/MmZNJ5K/z/P9J5P/v6yFUz/CEoywgUMqZkz/FssECIsVq0aPRrRRatFFFykQZJ2Ukl///5KjmksOaA7ALROJLDnEsLbq3GTMVrwb/0dGzmM0DlfBlHQOmrdR0MYi92TX6b/cmDHLclyUVYO/4O8sFTKFTKFf8yhUyhUyhXzKlDKlCsr/+ZUoVlSsr/+ZQqZUoZUoceMfcoZUoZUoVlfOPGcmDHKcpynKg9yXJcr3JclyXJclyYO+DXJclyfgxFZVb3KcqD/g2MxzsY72L9LubPR0dCyf5K5NNd+Tv9GXRdV0XJclyfcl/n+k8kf6SX/iVynvXf///4Mg/1OkxguYzmM5jMcLHMxwwGhgNCwXMLAcwMXTLi1MD7w7tmTdBvMmE0xQFzCwHMDAd//PkZGMpigkmAGOUvCfTgcgAuC+ITswMFzC4oMLhYMByn0xvU+p9Tr0xUxf/0xv///1PBYDhgNTFTFTGTGTGTGTGTGTGTGC4GTFMDAcLAdMVMVMULAcMBpgYDhcDGFwsYXFBikLGFwMGA4MBxgcDKfTEMUoAx2BisD+mKp5Tv1OkxkxkxkxkxkxkxkxlO0xVPJi/6nv////U7CwHTFTFTGTGTGTGU+p71PpjJipihYDpipi/6n1Ov//C4GC4GTGTGTGTFU8WBSZdLhWB//yKlotyLZFiLf8tyyRUipFSKkVGRBZQMiWC3yx//wxUGKsSvDFQGHUAL3QMsHDFIYpCYy2Bmagy6BjLgy6Bh3od58DCLAizBgRb+EQiyEQiwGBFuDAi3/////20QqSBJf/qcumv/////wMZdGXAYMu1gYy6MuBEZdBgy4BjLgy6BjLgy6BjLgy6BjLQy6DBlz2cJDLgRGXAMZdGXAYMuhMZcCIy6sJGaoGMuppwNRl3WBjLgy63wiEWAwIt/+EQi0IhFsDCLAi0GBFkGBFgMJCqaqYAgAYIhBBvwf7kwcqRq7V3IctacvlN6NxqgooxRRuNRiijEZjMGRuMvz9FGozQ+1X2qe1T1S//+VhaWAtKwtML//PkZEIkbgcaAHc1xCJrjeAAtfuUAtLAWf///mWePH95ZFgsyssvM88+jzO6K+z7OM48sH+WDiweZx5YOK+zxWLGJWsa6xadAv02fTZLSpsFpvLSga0tMgWgUgWmwgUmyWl8tMgWWmLSoFJsoFlpSwsmyBg4HhEdgwHAYPBwGDgeBg8HwMHg4DB4PBgOAwcOwMHLwDn5lAwcDgiDgYDwMHA/4MB3//+EQeDAdwiDwYLPhEWQYLODBYERZBgt8Ii34GLBaB5pfAZ0FvEAQ/UfwxULlx+IXx+8f5CELH8fxKhAIDFoHBEDRc3////gwHgaRXgMHYMB2EU/gwZ/gYbw3gY3QbgYNgbgYiAbgwN3/+EQbBEG4MBuDAbAwG4RBtAwbg2////+B9B6F//////////hEdD//////////8DRahEQGCInMNg3LBElgNjDciCwG/lgNiwGxWG///mG4bf/+WA3Kw3KyIMNw2Kw3MNg3MNg3MNiIMiQ2OK0xMiA3KyJLAEZgRARmBEDEYFwBBgEgEeomowol5YAJKwCDAIAJ8sAE+gGBgCJYAQUZ/13LubMu5dyiYOAhKwEFGf9AOoz/g4CFAIol/lgAjysAgsAElYBP////lgJksBM//lgRUxF//PkZGApggsIAHt2wiNLoggAqCz8RFSwIqYioipkjEjHCCSN/+WJg5iYOYmPK5krmTmZk5mZ8sTJYmf8yJiNiIisi/ywRmRkZkZGZGRmRERkREZERGRERkREZERGxEf///hETIMEyBiZEyBiZEzwiJgDEwU4DV2gQGFOBgmP8GAiAwRAiBgIgYCIGAi/4MBHAwRgjAwRgjwMEQIgMcgY8DBGCMDBGCMDEyJn///+BiYQIBlObj4eYLIwsjAOBGFkYBoEQ84eULIw88LIA88PKHnw8sPKFkeHlANAiAaFUDAiMYPIHmDzBZBhZB///8GBOA1sH/Awni7AwnhPCITwYE/CKzBgt8Ig8GA4Ig6EQdww4Yb+F1sIgtwYCwGAsAwWAsBgLAYCwDBYCwDBaHUDF+VEDKgC2BgtBaDAWgYLQW////gYLAWQMFgLAMFoLcGAt////4RMABmBSj4NgwMOGHBsHhdcLrwbB4XXC6+F14YcLrww4Ng8MOGHBsHww4Ng8AUC4AoMQMC4fgw3wutV4QIsAgFYIBWCCVgHeVgHeWABCwAIVgH+YBwB5aRAstKgV6Ba1oMg9avtUVN/qdLWciD/cqD3Jg6DFPuTB/////lYAn//mC8C+YLwL5gvgvGC//PkZFEpLgMKYXt2xB5LogAArbdc+C8VgvlYL/mC8C+YLwL5YBfMNgNkwXixDWoHPMc4VUxVA2TBeDZPYXzXl815fK14sLxYXvK1//NeXzXl815fMtdDLSw3UsMtLCstMtLDLSwsFhWWlgt//8sFhW6f/////+WF7zXl8sL5ry+Vrxry+WF/wMLwX4MC+EQv/AwvBfAxsjYAyqpKA0lpLAwvBfBgXv///4RA2DANAYGgNgYGgNgYGwN+EQvf/BgXwYF//8DC+F4Dd6NgGBf4AgFwbB0MMF1wuuDYMBsGwusDYOBsHA2Dvg2DQuuDYOhdcMMF14YYDGYDEGwfhhgbB0MN///4RBaEQWgZByoYRWYMFvwiDsGwaF1gbB34GDwdC64XW/w1aKxDVgatir4YcLrQbBwNg7////////////+ESfgZPyff/////////4MFmBvvMAERZ8CC5adNj02E2S0qbCBSBZaYtN///oFlpU2QMXIFAYuQK9AtAo7IxLTpsIFJs/5aZRxQawaxGfIg9CsrI+PUqkWdOHp7ODsOl6cOHZ4dsulfLI9/8BAAgMBACsBLACVgBjoAWAE5OTM6WDAR0zodMdHCsJLASWAjzCQgsBJhASWAjysI8wkJMICU//PkZFkeqgcaYDd1th6DogAAqCuIxQwtDA5MdMULgyY6YqnXqdep5TpMdMVRNRL/UT9AN6jCiSjKAZRNRhAMomgFQDfCIJwYCQiCAiCMGAkGAgDBJUA3eVAMEgj////8SrDFIYqh5g8kPMHkDzB5OFkYeYPJ+HlDzB5+AYVQDibCyIPLLEZIsjIliWS0WywWyyWuWCyWJaLZbLJYDHgLAItFvy3///4eYPKBlQTh5QYEODBb//hhoNg7/C62DYPFUKwKsVgNWBq8VkVcVkVUVYrH//hGff/8Iz8GT7//////wiX4ML3gwvgwvf4ML3gZeqoHVGyBl4vgZfL2F1oNg4Lrg2DcLrg2DQw0Lrhh8Lr4YcMNBsGhdcGBcMOGGAFGAGMQsF1guuGG4XXV/4uQXOLmF1kL/8lCXkuSk4O8/FzHzuP0hIucf/CIFAMCgFPgYFAKAwCgGBQCgGHYO4GBVM4GgQI4RCMEQKQOtQjUI1CNcI14MqDKwDIAGQDzh5wsjDyw8uHmDzYeUPN+DEYRRhFEIowYgDQgIhWDApgwKAwKQYFAYFQMKkYDOxHAzsRgMKBUGBX/h5v+Hm4ecPNh5A8wBwjhZHhZAHlDzBZAFkAeQPKHnCyILIAsih5QsgDz//PkZLQgIgsMAFp1xCGLogAAA2rkB5w8oeYLIQ8kPMHkCyGHnAMKoGmAgFkUPMHmDYAtfHPHNkr/JYl8c8lCWHPHMkqSo5onMAkBDnfJX//8IgDBgBhEdAaxSQMHUGAEIgAV4risCcipBOMVRVBO////hEvAxsAwvf////8MPDDww4XWC64XXDDww4YcMPC6wYb/wYGgiGwMplMDYhTCIaCIaBga/////8GA+EQdgYPB4MB4GDwdhEH8Ig8Ig8GA6EQcEQf8DBxlBjoAweDuFwgCQXiL//iLiKCKCL4XCiKRFwEgoRT4iqpMQU1FMy4xMDCqqqqqqqr////xuDd8fv/DVwrArEIg6EQdhEHAYPBwMB+ERYBi0WAwWAZ0FoGLYOB+JfgZ0FoGdBaDBYbn+WHm9xW7/Nzzc83PLDzc8reWlA7S0oHamx//6BflpU2C0qbBaf/8yk/ysn+VkMhTKQrKVk8yE8rIVkKyYsAn/5WC+YICmCApWCGTkxtKMcVWlgFMEBTBAX////0C0C0C/////////LTFpvTZLTlpv/0Ci0xaYtOgWmymyWkAxcWmTZTYTY8tMmygUWmLTIFpsFpv9NnywLmLCx2RgWmQKTZ98UjnzZ1/++D4M6/////3//PkZOgjIg8IAFcbxCaTogAAoCuIzfJ8vfJ8Wcs5fBnD5//++L5f////////6nCKv//+o0o0FUYwqDNGCwgUMKC0VVGkVv//4Yf8LrxVCriqDVoasDVuKsNWw1bisBqwVkVkVX//gy/4YYMMGGhhgwwNg4LrhdcLrAYWGAA0zBsH4Ng3C6/////4MAoGBQIDAKBgUCAwCgYEAsDAoEAwKBAYBYMAoGBQIBgUCYGBQIBgUCwiBAYBYMAoRAgRAoGBBMBooCAYFAkIgTEUxFv/EWxFxFhFoi0LhQuFiLCL/EWqTEFNRTMuMTAwqqqq//////8TWJriV/hERAwRgYiEYGIhGBmIRgYiEYMEQMEcDMSiA1GYwMR+UDMTkA7KIgMRGIGGM0SIrRGjRlhEV4jxov8rR/5YRFhEdQSViCsR5iRJWIKxPlgQYgSViSsR5WJMQJLC78IiKERF4REeERGEREERHwMRGOBmIRhERhERAwRAYiEQGIhGBmIRAajkgG5TEEREDBHwYIwYI4REXCIV/4MCmDArgwKAYUO/gYVCkGBUGBTgYUCsGBUIhUDCoUCIVBgVBgVBgUhEKQMKhUDCoUBgVAwoFAYFcGBQDI6oA5+qQiFAMjBUGBXCyEPIFkOH//PkZPMj6gr6AFdVwifkBdwAoC2Ilh5/8PPh5Qsih5IeUA0TAZrE8PP////wMRiIIqID8piAxEIwMxCMDEQjCIj//BiIDRo8Iogii/4MKwYVhEoESkDEiIGJEgYlfBgmDBIMEAYgSBiBIREAwSERH/8I7wPfuCO4I7v/8GBvAw3Bv/////gwN34RBuBg2BuBg2BuBg2BuEQbhEG+EQbAwG4MBtwiDaDAbhEGwMBuDAbAwG4GDYG8DBsDcDBuNwDRWDcIg2AwbA34RBv///CINvCINgMRIN/////wiG4DDeG+TEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/zB4OLAP8rBxWDisHlYOKxb5WLTFgsMWiw18LDOnjPxZoxadDOgsLAtLAbKymVhsrDZWG/LAb8w2GywGysNlgNFgNGFwuBQuWnTZLToFFpisLJsFp0Cy0voFAQLFZkMCAQwIBCsC/5WBCwBCwBCwBCsCeVgUwIBCwBDEwEMCAQrAhgUClgCFgTlgCGJgJ5gQTGJwKWAKYFApgQTGBQL5kY0HMjQYnAhWJvKwIWAIVgQrApYAhWBPBgECIEBgE/8IgXhECQiBAMCkcDEwEwMCAQGAQIhoIhsGBsIhvgwN//PkZN4irgr2AAOVqiUThegAnCtMgwNwiG/8IhuDA1hENhENgYbKYHb2IBhoNhENAwN////8IhsDKZS////8IhuBhspgc0KQRDWEQ3///CNf4GAIMDAwgAwAAwhAwAwYAIgwiHBgAMAYGAAGHv///CIBqBqESDEIgRYGoGHBiDEIgGoGgMAYgxgwgxCIETwYFYMCoMCuDApBgU8DCoU//gY3G//wYFOBhUKBEKQYFfBgV8IhSEQoBkYK8IhT/wMKhXBgUCIU4RCoRCvgYVCsDCp3A1SqAYFAiFP////gY3G1TEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgwCAwCBEC///////8IgUIgWEQIBgUCAwTQMCAQDAoEhECAYFIwGaRMBotWAasdwH/KqBmhFgaKI4GRgKVpjCBTCBPMJHNMFMIFKwnlgJ5hUxhUwGWlpAMuMuWLTFpvQKQLQKLTIFJsoFIFFZb/8woQwoT///MIF8rC+WAphAphAppgpYClgsmwBC6bHoFFpUCi0wGXFguWCwFLgUsgX6BZaVNj0Ci03//+EQKEQKEQLCIFAxMBcDAgFAwIBQYBODAKBgUCAYEAuDAKBgUCAYFAgRAngwCgwCwiBIRAmE//PkZN4iogj2AFdVxiUrhewAhOkwQIBgQ0gbOI4GRhOBiYCgYEAv////CIFAyMBQYBf///CIF8IgUDAgFBgEAwIRwMCCcDEwFAwIBf///CIEQGMDGEXCKBpCIDCEQDCAsYInDFQMMAuYSoTQMVfBlf//+DKfBgAiGDAQMIMIgCIQYADAEGAgwP////8ItgNu2/8DAAAiABgHhECBgQGEQARA8GAeEQIMABECEQIMAwYBBgCDAARA4GAAgYACDAARAwiAgwDhED4RABEBCIGBgDoH2dgZwCBgAP//BhX/+DCiTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqF1ww////////hdeGGDDBhwjeF102E2fTYAowMLjE0zTDfyyMYjEDJTwMLSwFi0/gQLoFIFpsegWmyBQsWlQL9ApNgtIWn8tMgX6BaBX+WmQL9Nn02f9NktIgUgWmwWl9Avy06bCBSbJaUtImyWkQKLTIFgYWoFFpAKFwMLzZgwAwvLTIFlpU2fQLQK///4Yf4YaF1sLrg2DAuuDYNDDQw4NgwLrhh4XXC64Ng3C60MNwbB4XWC64YcMODYPCJYDlMQBlwRLg2DOF1v/////PkZM0eKgz0AE+UuCnLFfAAk3Fsg2DAYX/ww//4YaGGDDhdbDDACFwMuXA2DADlygusDYOBsGhhv//wNU/CKQusF1oXX+F1wuuGGC6wXWDDBdbC6wXXhHv//4AHIFgC0BZAA4Ba4FkADwFsC3AtQAOcC0BYAtgAcAA9+BYAsgW4FvgWOABwC1oq+it4RT0VVG0VFGkVywo1/RWU4U59TlFb1GvRX////QK9Nj/9AtNn02fTY9NhNlAr/QK//TYTZLSJsIFemx///oF/5aZNj02U2C0yBaBfoFAS6bKBfoFVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQiA8GAO/4RAf//////wYA4GAO+EQHAwB4GDoB4GA4HQRB0BhlDIBpEAcBgPDIBgPAeDAHIFAYuLTpspsJsFpi0haRApAtAstIYKClgF/ysF/ysE/ysF//LAJ6plTlYC1ZUypmqtWVK1VqyplSFgBaqqcwAAVIqcrEBAAKmMBERCQhwD5iICIQEyABMAABBVGXF4gIA4DLAAWAEQgLVSsBaq1ZUv+YKClgELAJ////5YBP//LAL5WC+Vgn+WAX/LT+gW//PkZMIhLgrsAFt1yiD7FiB6A9qwmwViybCbCbCBSBabCBSBabPpsegWmwWn9ApApApNgCGBmEwWlLSpsf////hEHgYOB3////4GDkiBxMHhEdgYOB4GDwcBg4HW23gooFYHd/+BnAz8O8Vv//FaBm4rBWh38es2zbAtD1m2PVBqBrBqBrAF7AF3/5el84MkuHTgyy+dL0dRnEajMIyOn8RsZ5HGG/kbIpHIkYUiD0y2WctlZaWSwrKx6FZbxnL54ul04eLhw9Ol84dl86cOHT3Ipb5Z8qKpVx6/j0EkLctVTEFNRTMuMTAwgWQLQAHgLf/////4Fn+EQESEcIgInCIRW9TkrCzH0YIjjWtI+YeCD0woLCBQwsKRWUaRVCBZFZRtRtFRTlTlThRtAr0C0C//02E2fTZQK/0Ck2f9TlFRTlTlFT/9TlFVFRFb/9ThThynIQbWkAREue5S11rKdlkDEVABh61ExYPU+tOD4MQgcn4iwigivxFRFoXDcRQLhoiwioXCeAkFBcNiL8RURQBIKEVEWiLBcKIqIpEXC4QReIoIpCIKAQMxFAFAsIuIr/4YYLr//ww4XWBgwC64XX/hhgw3hhwuv8MNhhguvhdcAUYgaYTAAoWDDg2DQbBg//PkZPYe6gzuADd1uDKsBhBAe89cYYdGjtDT2hDmlD2leaOv9oX0OX/0NNLplNf8ewakNWGrTfTRpphNJtfaeh7T1/tStdtTpqN532lpX/1/kmQ5eaf2hoaV9paGleJAvd0rer2pWu1ar2vk56vVrV5Hj1Nop+/lfv5Zpkem5kX/2vtata2rq783nbvtbW6VjW6a2rq13+rO6VysV58K7tbp0ru6Vrtqa1a67tr6sau1ulYrnfa2v927Vrt21NSuN5X927/D4diAQANh4gEIfxB+IQG/D/4gDw/iGIRD+HRATEFNRTMuMTAwqqqqqqqqqqqqqqqqqiIEK/ititFX///8VcVuK38VsVhXBOQTpq/qm8QCAcBmIxgdfFZCHECpxFBFAuFEUC4cLhsRTEVEUDVoDQD+KrFYirFX+KwKoVgVUVUVeKwGrhWRWBViqFYDV4rMViKyGroauBg/A0YThVgNAEVQqw1fisis4quKxxWYrAatxWIqoqg1dFYxVxWIrAavAaAArIrAqoqhWYrIqvxWMVYrARCADhcKoVYavDVgqhV4qorIrHFWKuKxFViscVUVYasAaAfFY/4YcMNhdfwuuGGC64YfDDA2DwusANygbBwAxhAECwNg8MOF1hD4//PkZOkc4g7yBjd1sDNkDhgqYwtcYoUyiQ0NCkxQ0NCQkSIbGKIyRGEo5mUaNEhGKEHMmaGhI0UokORvMmZmZSZSiMZQkRnKKZkzRoSNCQpQ0NEZoaNFJkhh3KOUJEhIcoSJCQkIzlDlEjMDMyMpQ0JCQzNCRGaNCRISEZoZihoaIwlEHKNGiMzFEjRmSIwlHMyZmcyiGyMxRyhIkIxRSZokSEYGBkiRojAPESNGjQxvKHMmMoSKTJCQkIwlFKLDYWGhoZhYWAAUGBsAwsMDYUAcK4XDPhQVwwLAH/DfgHC6TEFNRaqqBgjwYI//wYI/8GCL///+DBFhERgwRcIiPAzGYgMRKIDcskBgjAxEIwYI4GiRwNEjhFH4MRwYjA0aOEUf8Io/BiLgxGEUYRRQij/BiKDEYMR+DBGBiMRQiIgYIwiIwYIgiIgMRGIDUSjhEReEREBiIRAwR/wYI/8IiP4MEcGCIIiOERH8GCIIiMIiIIiODBHBgjBgjwiIoREcIiOEREDBFCKiAxHJcIiMGCMGCLwYI8IiPhERgwRAwRAYjEUIiIGCP/AxGIgiIsGCL//4REYMEXhERBERhExhExAzyAZiEWDBGERGeKsVsVRVFcVwTnFcVxVgnYqipFUV//PkZPkcfgzeAFaVxDgUBgAgatvIYrgnYqgnQJyK4riqK4rwTsVor4rQAjABAgnQritFSKoqQTsE5C1haxfF7F4XQtULSFqC1i4LwWkXIWkXRdF+LwqAnME4iqCdwToVuK+HAERWAkAlgJB0OB3Doc8OYc8VCsVgIB3DuHAERUAkAkHMOBwOAIisO4dwEAEAEg6AkAl4CeHA4AkKhXioBIOiv8OB3F+LgWkXxeF8XouxcF0XBeF8XBdF8XhdAdouC8AEsXYWsXOKsVBU/FaKmK/FTxXFbFUVPiv/8VfxXitVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAXX/8MN/wwwYf//DDBh4Yf/+DYODDfCIFAwKBQiaANFgUDAgFAwIBcADwFuBY/At8C1wLfgAdAtwLGBawLcC3AsgWeBYwLX4XW8LrBhgiFgMlhYLrhh4XWhdb8MOGGhdcMP4YaF1gw8LrwuvhhoYYLrYXWDDBdcGwfC60MN/ww8GwZ4XXC64GZQsF1wbBnDD4XXg2DcLrBdaDYPhhgusF1uGGC64YfhhoNg0LrQwwYcMNC62F1/g2DYXW4XXC6+GH8DTIW4YeB/wR/wjwR+DP/y06bJaRAtAtAtAs//PkZNwY2grqBFW1xDhTRegABLBstL6BRaVAstN5aYtN/psIFf5aQtIgWgUWk8tImyWkQL9Avy0qbKbKbJaf02f/0CkCy05adAsC3K7+mx5aVAv0C/TZ8tOmymwB2pspsFpPLSlpy0qbCBSBXlpk2E2E2C0paUtP6Bfpslp0CkCy0ibJaZAosWQLLTJsemwgUmz6BZaYtOgUWmLTpsJsoFJslpPLT+mwmz//6Bfpsf6BSBSbCBXoFeWk9NhNhAr0Cy0/+WnTZ8tJ/oFf6bP+myWn//8tMmz/lpf//////8sPTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBgJwiCYMBP//gwE//////wiCAMEgkIggIqIDKpUCIIgwE8IzA4j+EYhGAZMIyDJA5gGRhGcIyDIhEQiIGAgwIRDwiAGAAwYMHBghGAZMGRCMhGYRgGRA5gIyDIwZPBk/wZIRmEY/gyOBxIMgIzCMgcTgwRBgjwYJBgngwTwYJhEQBiBGERMIrwOouAxAgGCQYIhERhEQDBGDBAREgwTCIgGCQYJgwSDBHwiI4MEAwSBiRHCIkGCYGJEQiI/Bgn4REYREeBiBIH6XhERhETwogoy04mpZibFmJuWYmx8n//PkZN4ZrgrkAFZUyDcjofgAA9qc0HafZ8HwNrjaG3xtjaDtJwTo+D55Ow7fxNRNSyLPlqJsAr/lmA/FmWYm5acTQVgTkVQTnBOQTgVxVBOBVFWK4J3FUE7gBABOwToVQTsVhUFcVRXBOhUBORWiuKkVYrCqK+KoqgnQrAnEV+K8E7FQE5xWBOQToVQTsVRW8V4qRUFYVgTsVhXioKgrCqKwqAnYqCtBOhUioK+CcisK8VRUFSKnirFQVBVFcE6FcVoJwKoqCrFXFUE7gnAqiuCcQTsE7xU8VP8VYrgnYrCuTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn3/l/J/8vHL5f/BhwCETgGpIDOATgEIOFoDcHzgEIDgC+pG7eve1S/6tat7rXupDXSStWoIpGS4TSMQNIySMwpIyAaRkkZ8GJGdBtbwYkZ63tCKRkoIpGWDEjLCKRmEkjOvsEUjJOsIpGa6bOrgxIzsEkjIGJGYUkZVKCKRmqoDkgEjMJJGSYMSMAikZJ3qhp0dq9ru3X1I36FujPbXuxwKbr//waABfg0AC6DUDUDXBqBoAmQawJiGrhqDUGoN//PkZL8USgKcAAblrroTgfQAbhtQAag1QawaYNIAuQa12Lv9si7F2NnXa2Vsi7i/DZl2tlL9l+vL8tlUTUTUTUYQDIBlGUAyifqJKJqJ+p5Mf/U7TETEU7CxkxVO1PKdqeU8u4vq2ddnrsbM2Zs/tl9s67V2NlbIu5sgaA1Q14ExAmAaA0BrDVDXhpgTPDQGuBMA0gTKGgCYgTHDQGrDUGgNcNQaw1hoAmcNIaRIAtALVEgC1gteI8FpBaBIAtcRwkAWgFpBaILVBaIkAWgRwjhIiPEeDXwa/4NUGr+DRwaKBgX/8IhP//wiF8GBMGBP/wYEhEKEQmEQuDAoGFTAwLgwLhG/4MvCM8GSDJCNwZQOXg2DwbB8MPDDhhuGGBsHhh8Lrf4MCQYFCIUGJgiE8GBQMIFhELDDhdaGHhdYGwaGGDDhhuDYMBsHg2D8MMGHBsH8GwYDYMhEKEQgMCeDAsIhAiFBgQIhAYFhEKDAkGBMIhYGEC4GFCBELgYUKDAuEQsGBQMKEwiEBgUGBcIhQYFwYFAwgWDAoRC8GBAYE4RCgwKEQvhEJgYUIBhQkIhAiECIUGBIMC4RCgwJCIUGBAiFgaYLwiEA5cGXCNhGBGwZAw4Ng0MPBkqNqcoqorlh//PkZP8cygrkAFI0wjo7lfAAjhq4SnPor//psoFemygWmwWm/0C0Ci05adApNn/TZQLU5RU9FRFVFdTn1OFG1Gywv/UbUa9Ff0VoFgCwBbAtQLUCzAtgAchHAN8ImAbgBvwDd4RwjQDeAN8I0ImEQEQAbwRgiQjBHhHAN0A3vgG6Ab/CIhEgG5AN6EQESAbmEYI4RABvYRoRABuYRgDehEQiAiIRABvcA3QiQDfwjwDfCICPCJCJCJ4RwiYRwjBEwDehEYRgDfCNCOEQEQEcI+BagAd4FrAscCxAswLfwLAFgC1wLNVMQU1FMy4xMDBVVVVVVVVVBlBkwO3wZAZMIz//////+DJwO0IwI0DsA7cGUI34Rn4RgMuEZgywZQjAZP/hGAcmDKEYDIB28GQGQGXhGgcgRoMgRoHYBywZAZYMmBygyQYFCIUDChQYE4MCgaYJ/gwKEQsGBAiEBgXAwgQLrhdcGwcGHBsGA2Dgw4YYGwZC6/hdYMMF14YcLrYYcMPDDhdYGweF1oYb4MCwYEwYEgwJBgTCIQGBIRC/BgQDCBcIhAMKFhEKDAsGBQYFAwgTgwKDAoMCQiEgwIBhAnCIUGBQiFwiEBicIhAiFhEIgIoBooGieDPA+4GeDPCP//PkZOobXgrkAEY0jjazieQgBKKIBGgyBGhGhGgyAdoMmEaDIB2gyhGwZYMsI0GSDIEaDKB2QOWEaDKB2hGgygcoHYBygdkDtgygcngyAyhG4MgMgRgRmDJCNBkA7QjAZIRoRoMuByhGgyAyAyhGwZYHKByAcgMgRoHIEbCNCNA7fCNA7AZAO0GSEYEaDLA7cDthGgyAyAyQjAOwGUIyDKEYEaEYEYEaEbA5AZQZAZAZIMgRkGXBlBkCMgyAyQZYMngcmEb8GUGQIyDIBywZAZOEZhGBGwO2EbwjcI3hGYMqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqquDqz8GMDQIvBj///+DGDEGAMAifBj8IuEThFCIEQGPCLwiQYBFCKESDCETBhhGAZGEZ4MjgcSEY4GoRQigxCIEQGPCKBiBrgxwiBEwMIRAY4MQNMIkImDEGIRYMIRYRAYhFBjwYwNQYgwBgBh4GAMQiwYgxA0gahFBgBjgYBFhFhFCKEWBgEWEUGEIgMQYQMYRAMQigxhFBh4GkIgRIRYRAY4RIMQYgYhFA18IoMQYQihFhEgwhFCIDEGIRQieBiEUIoRQYhEwYDAFwGrBog0waAaQawacGsGiDQp9MZMVT3piJjJjK//PkZOYZBgjoaUJQ0DprofQgbhq0dep71PqeU69TpMdMVT6n1OlPKdJjpiKdFZkxlPKdJiJj+mKp/0xFPBoAmYaw0BpwJhDSBMQ1BqAmIEzDSGgNXDRDRhp+GsNMNAEyAmYagJkBMA1BpDXAmECZhoDXhqAmYawJjgTICZBrDSGsNAExDVDQGqGgNHDWBMIaQ0BrAmcCYgTHAmIEzDWGgNYaOBMw0BqDSBMYaA04aA1hqwJhw0ATKGqBM8NYEz4aQJkGoNMNIag1+GsCY+BMQJlDVw0cCYfDXw1ho4aQ0gTCTEFNRTMuMTAwqqoD37wjuhHf/////hGf////hHf/gycEZwRn4MnYMncIzsGTwOdOA507A507hGeEZ8GTuDJ4Rn4HPn4Mn4RnhGcDJwM3YM3gzdBm6DNwR3QjvA927Bm//Bm7Bm/Bm8GbgZvBm4GboR3gzeEd+DN8GbvBm6EZ+Bzp4Mn4HOnBGfA588IzsDnTgZPCM8Iz+EZ/CM4DnTgOdPBk8Iz4RJwGTidBi7AycTgiT4RJ8GE6ESdhEngZPJwGTieDCcESfwYToMJ3AycTwiTsDJ5OhEnwibwYb+ETdwibwibvCJuwYb/4RN/Btf/jYGyNv8bHLUtSzE0/LQBW//PkZPQcHgjQAFKVrjfDmgAge1eMLITcshNy1LX8si0LUTQtCyLQTUteWQmvLItSz4mgmnTJops0umEymDSPsnR9HwfB8k7Pvn0fAvwtcLXF/F+L4vQtQWuFoC0BaReF7AeBfwtcXBdF4XheFwXAtAui9C1haRdi6LwvirgnUE6FcVBVisKgrCvioK+KoqiqAhh3AQFXhwVYrFYCWHMOioVAI4dFWHPDgCAdDgdDmHcBIBEO+HRWAiKsBMO4dFQCAdATw6HBWHBWAgHBUHMOf/gICsOCoV4qw7+KxWHA6KhVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVC11Fz1+NP+/Xkqpr9OfuhQ6lZNWf+XsZc/si+KNoOj/Ntai9j7IISgZAklTqQhjToNTeQoreRdaSDODWvYAVFaWWkQmVuZPP8bRUzq896vc+XS6mm5gnnW7JLnV4z9N5XnW4k86x+uyHyxnWkmdborzraff2SvOtvljOtjd/5XRW8MivOsry/K3gUzrFPS1eFTOttTsul1+lLGdbV3c53h51mdbK7xPOr1SpnWlM63kedZnV4XPK86onnW7myrnWTmRTOqascoabXd/L+yuzS95dv1efjhl92ntYyTuIb6wuWRZFmWRa//PkZOcb/gqMACDf1LTLofggA9qc/gKRZiblqWYm3E24moSQnR9BJj6JwfBaFqWZZFoWvLUshNPxNuWn6bTZHgozRTSaNAY5oGjFQVgTkE6FUVorioK8VBXBO8VRUioAhxVioK4qAnIrYrCqKsVRVBORXBORVFcVcVwTgVBUBORUisK4rCoKwrxXFYE4FYVATjFcVhX4rcVBVFQV4rxVFSKwqCpFcV+K8VhXFYV4qivFUE4FaCdivBORUBOfBOgToE6FUVYqisKgqCtxWFbFQVxXisKgqRU4qioKuKwqCvxVBkH/4Mgf4Rg4RgfgxZBizhFYEVuDFvhFbBi3CKyEVsGLf/4MgAxaDFoGsWYMWgaxYBrFngxaDFnCKwIrAYswNas+DFgRWYGtWYMWBFZgxbgaxbgxZCKwGLIRWgxZCK2EVmDFmDFgMW4GtW8IrAYtBi3Bi0GLAYsCK0IrQit4MWeEVgRW+DFsI9cDW9AYtgxZhFaBrVgMWgxaDFvCKwIrIGtWhFaBrFuEVvBi3hFZA1i0IrYMWYMWAxaEVkGLAisCKzBizCK0DWrIRg+EYIRgQjABkHwODABkDhGDwODBgyAEYIRoRvww4YcKILYKILfhRg5htjY4OQbQ2hNAH8su//PkZP8cRgjWAFAUYjwDofQAi9pcJry1E1LUsuWvE2E0LQTcB+E2LMTctQFEEcWnFYVwTkAI4rRWFYE6BOhWwToBBAQgnIrisETANwIiAb/COEQEbgG+EcA38A3wjhGCMEeEaEeKoJwK4J2KoARBVBOIJ1FWKoJ0CcCuCdRWFcV4rioK4rAnYJ2K0V8VYr8E4xWFUVBVFQE6FXBORWFSKorxVFcVwToE5wTvBOoqwToVIJziuKwJxAQgnUVBUgnAqQCaCdxWirFaKwrRWFcE7FfFeK4rgnIrAnYrCoKoqgnAqCrip4qgnCr/////8Iu8BjvP4Ry5/8Izggc4Zw4RnD/hGcP8GThBk4eDJwgycIMnDwjOD4MnBA3eu9hF3kGO8gx3vBjvAN3jvMGO8CLvAY72DHeAbvXe+DHehF3kGO8gbvHeBF3oG713gG713vgx3oMd5BjvAi7wGO9A3eu8BjvMDd470Iu9wN3jvQY7wGO9wN3jvIRd4Bu9d6Bu9d6DHeAbvHewi7yEXecGO9BjvQN3rvIG7zykGO9A3eO9CLvYMd6EXegx3gG7x3kDd470Dd472DHewY7yDHeAKomwmhZFkAof8tCy4m5aCbcTUswFYsy0/LQTX9NBqBgJgYaY//PkZPcaTdCuAFgWlkI0DfQAe9r8Jxz6CShr8++JsArgjxNBNC0LQsyyLMsgRxallyyLIsi0LUTUtS0AVwFPia8si0LMTXiacsxNizLMTYTcsi1LMsy0E2LUsuJqJvxNyy/E1LMteWgm4mpZlkJuWRZFmWnLQTfgncVATkVcVQTsVIqQToVxWFeK4rwTmATCsCcAnQJyKoriqKwrxWiqKoqwToVRWBORWBOBVFSKgq4qAnAqAnArRVgnIJ3FYVQAgCriqK4qYqivBOsVoJwKgJ3FYVBWFfBOIqCoCcivipxUFSCd4qRV4rCvFaCc/BOhW8VxWFUVhX4r1eX/+DHgaYMOEX/CJgwwYQY8GODH/wYf4RAiQiAxCKBj4GAMYRQiwYcGEGMIoMfhECIBgEXAwCJhEA1BjhF+BhCIDEGARYGoRAYgxCLwYeESEUGMDEIoGAMAiAwBiBrCJ8GMGGEWEUGIRYMAYAxCKBiBgBqDDA1wiBEBiDAIsGIMANANMIoMAYhEBh4GMGMGARfAxBj8GAMANYRAYBFAwCIBhgYhEwNQMYGIRAMAiwNYRQi4RQYwYgahEBiBqBgESEUIqa6Z6bTBpGkmUwmkwaZpJlNCkifmkaaaBymgm0wmRPxSDTTa//PkZOYYTgboZUAQIkCEFgAAe898YTZpJtMJhNilphNdMJhMGgmemDSNJNmkaX6aNJN9MJhMc0E2mzSNJMpg0umU2mDS5oJlNJtNJnpg0DSTBoml0wmzTE8TRpGgm00mkzzRNNMJg0jQTSb/NFNdNGl02KTzRTfTPTSbTKZNLphNJpNmgmUymkwaaaTKZ/TSYTBoJr/ifptMpr9MJlNptMpg0kymumEwmf+mEwmOmkymTT5ppv80eaHTCYTHTSaNBNJtN80/0yaBoJo0k2aPTPNA0OaSaTJoplMJv9MgBAB4MBUGwbwVwUBkFAYDAU4NBoMBqhAELk//h/y1/vz6/6zMnEglwqnIsVSHBzAMMIqXiLgxS8ucoLCKl7VwipeupwYpeAxS8Z22hSl4U+qE1L2goKUva1GUJqXqwkpeAxS81IQpS8smBqXql6E1LyEVLxdEJqXoSUvAmpeJhFS8rpH3CKl6EVLxPWFKXgDUvVL1LCal4kuDFL2EVLxFlPClLyEVL2FKXhdwYpeswGpeqXkGKXqLAxS8wYpeqWk8KUvATUvQYpehJS9Bil6yoUpegipeZT2x1vN5NR2X3KrRuXjFmaS0AUCyE1BHflmWZacTYsvy05ZgAIs+WQCqJoWZ//PkZOwZ+gaYBgbm6EQMAfQAe9r8ZCbiaFkWv5ZibialoArlryyDtCSnyfR8hrE7PpNmiaIxDTGKafTJalqJoJoWQm4mnLUtSzE1LUsxNyy4mpZlqJpy14mgD8WpagKvLIEcJuWnLItBNhNhNxNgH8tSyLMTflmA/iaCaFqJqWf4mxZFmCdCvFWKwqivgnQJzFfwToAIwqgnOKgqCoK4J2KwqisKwJwKwqCqKgJwK4rYqirgnIJ2K8VhVwTmKorYrioK4JwKwrRWFQE5FUE6BOwTgV4qYqiuCdAnYqAnMVBVFUVATkVBVirioKoqCviuK8VwTjxWFfivFUVxXBOcVuKvFaKoqiuCdeEW3Bjb/gxvhFvCLYGN8GNwi3CLf8DbtuEW//CM7+DG+EW+DG8DbNgi3CLfA2zYItwY3gbZuDG8GT/Bk+DJ+DJ/hGdCM+EZwMnQZP8GT8GToRngc6dBk4IzwZOBk8GTvhGdBk+DG8Dbt8DbtgY2CLbBjYGNwi2A2zYDbN4RbhFtA2zcDbNwNu3CLaEW4RbeEW2DG8DbNwY3BjYDbNgY3A2zYItwi3CLbgbdvA27YGN/CLaDG4RbgxsDG4Rb8ItsI7oR3cGb00m0wmTT6aTZoJgUpMc0kwaa//PkZNcYqeLUAAAUHjw8DgQAe88cYTXTXNBpXiQdfLVpLJoaCSJs0TQNAbRpJpDWleaGlDmlfQ9fQ7tBZoa0IeOw3Ccq44TcHgrufDVzQNA0Om0wmDTNE0EymkymumU2mU0aSY6ZE8NFMmiaaYNDptMGn+aJpdNptNps0OmU0J50wNtMGmmEz/zQTJpppNplMJlM9M8FAYCoKAAApgqDIMACwAQbBsAMGQAQaCkGg0GgyCkGeCgNABwAAUgrwA+CoAQNAeHCAOAeAyIQHBwgDg4QYDAGgMEEOEAeA0Q4DxAHh0PEMGYMBsFQYDPgoDMGQV4NBqryAZfhGfwjMDl4Rv/wjcGT/4R/CPBH//hH4H3gzv4M7A+/gzoR4GdBnAf+DPBnwj4M7BnwivA1QIpCKcIpgaqDFgaqBogMWBqgGqgxQinA0XBi8IqEUCKBFcD7/CPwj0I+DPA/8GfBnQZ8I+EeCPwZ4R6EfhGcI0GSDIDJCNCMBkgdsIwGQDkBk4HIEZgy4RoHZwZQjcDtCMgcoRgRoRgHKDJBl4RgHIDKDIEYEaEZgyYMoRsIwGQGQIwGUGUI3A5AZMI2EaDLBlwjQZQjAjAZQoqIqqN+pypx/qNIqoqqNKNKcqchwGrCAPqN//PkZOsaCgjiBUZRnkhEBfAgw9tw+iu1RUqp2qNUNalOVG1GkV/U58sLU48sLLCiwFU4hAYA+qQQgasVhVIYQNWKwmAKpvasNoHIDm4OQHIDlGwNgbH4D+JuWQm4mhZFoJsWgm4I4TcbA2xtA5ODnGyNoHJ+NgHKDl/LMBXLUtS04mvLQteAqCaCbFoWQmha8bQ2Acg2ht8bI2RsjaGyNrjYGwNvjbByja/GxFYE4ipBOIrwTiK4J2KuK8BAK4rAnAJwKkE4FYE7FUVgEIqgIRVBO4qRXFQVBVBOMVwCcE5itBOoqAnQqCpBOIrxVBOoJ0KwJxgnQrCuKsVBXioCcCqCdAnYJyKsVYqipBOgjwiAj/8InhH4RMIkIioAC4RiJCMRP////CNk//Blkv4M6F8I9C/8GWT/8I2SwjZOEbJQZZIGWShGyYMsnwj0P///CPQ/hGyQRsn8I2SCNkgOyVkoMsnhGyQMslCNkoMsl4MsnhGyXCNk4MsmEbJ/wZZP8I2SA7JWTgyyQMiKDIieEYiAcRIihGIkIxFwZEUIxEA4iREgcRYihGIoHESIkDiJEUIxFwjEQIxEwZEWDIihGIoRiKEYiHcYJRIr9kzDmO5cIaApXE/NA0TTTKZGym/0//PkZMQWjdCsAwAWCsQ8Cfwoe89cyaXTKZACgKxsmybQFQCyPQPUbRtA9x6QAoegHKmRtClpk0RSkwaCYE/GyaaZ6ZFJTaaTCbTabTBomgmk2mxS0x0waSaTI2gcgOcT0T5MiedM9M9NCfCeGgNhMJlNJoT1MdNJhMjaNPptNGkmhtpnmgmv+KQmRSE0aaY6ZTKZTRoJg0U0aBopg0emU1/xPzTTaa5o80DRTZoJs0TRNEUhMikJs0P0x0wmkwmUymkwaKb5pppNJg0OaInhpGgmeaSbTBp9N/ptNJo0DTNAbOCkGAwGABgA4NgwAAAMAPBgAQKAyDAZgoCkFINAABWAEDAUBTAABgMBTgqACDcGAAQYDAUqLUlVt///+Bj4MIRcGH/hE//hEwY/wi8GPBj8GH8IgRcIv4RYMQi+DAIsIsIn8GHCLCJCJ/BhBgBpgwwifhFhEhF/gwCIDAGIMIMAMQYBFhFBgDH4GAMQiQNAYAwwYBECIAMIAMAAiHBgAMIAiAIg4MABgABhADAhEAGAARCBhCEQhEIMABh6EQAwIMABgCEQwMAQYD4MDCIcGACIQiHwYGDAhEOEQ4MAENB8hJD7PsnXJ0fZ98+D6LItQR3PgnZHmgPYYRopk0xj//PkZMkU/gLsKkITrkL0CfzIetvgJtNdNGkmkwCPLITf8s+WpaFmApAjgFUsyz49jSTCaGMmkyaRZlkJsWpaiagKBZlmWomh8c+CdcnROj4Pk+Akh9E6DsJ0fJ8c+OTs+idk4J2Tg+j7Pr8nB9nwfAa59k7598+D74Sk+eEkFQdDmKsOhwBEVYCeAiAmAiHcBEV4CYCIWmCHF6FqC0haRcF4XYvxfF2LwvC+FqC0xcC0C/FwLSFoF0XBfi7C0xei8LwvcLQLoWoXheC0BaIWoXBdiNiMY6cZ8RkZxnjqOojAz4zx0HUdBGozjoMw6iMjpxdi+L4uC5F/xd/haIui/bZ/+DGBp4RYMQYgw8Ivgw/CJ4RfBh/hECKBgEUGODH8InhFwY4GoMcIgRIMcInCIBrBhCIESESBp+DEGARfhEA1gxBjBj4RAYQYgxgYwiYRcIgMAiAwBjCJgYAawYYRQMQMAYhFgagYhEA0AxA1A1CJBhBgEXwMQNAihFhFAxwYAwgaYMPCJA1hEBiBrwYQiwYwiBFwYhFgxgawihFCLA0gYAwCKESBoBpCJ4MIRcGOEVB9ALR8BJj7/PonB9HyEoJwfZ9E4Dt5OeTnlqJtxNAH7nwfHPonJ8E759E6PoJI//PkZOAWKgjoZUAQYka0Ffgge9VcfZOCdE7J0To+Cc8JWTo+D7J0EqPoO0+T5PsJSfJ9n0TkJUfJOeTknPPo+z6J2Ts+ycE759/k7Pg+z5J2TonBOeTkJUTg+T5DtJ0Tvk5Pjk5DXPg+idH2HYfR9E6PgnR9k5JyfZ9cnR9cNYJSfROidE6Ps+Cdn0fB8E6DtPs+CdHwfH5OAlR8nyfB98+SdE4J0ff5OidH2TknfPkJMfYSg+Cd8+D6PsnP/JwTk++fYSQO0+D5J0fZ8HwTjn2AWDgdAL8ApALQCkO8GACwMgyAVBiAVhzwY4BeDIMgFMOh0ArDgc4BeAV4cgFsOhz/wP225HGw7wCsO4M8AqHP/+DEGQ7/8OgzgFoM4Bf4MhwO4BT4cDmHcGfDnw78GcVhUFTFXFeKoqYJ3isKuKkVgTsVoqCsKwrCoKsVQTqKorYWoXhfxeF/xdi58XOL4WmLnFYVQToE4FXiuK0VwTnFQVRVFcVhU4JzFfDgdhzBnDuHfALgyDAMQZBgGQCgBUAoDAMh3BkAsDMGcGAYgxBn+HAC0ArwCwMAS5adAry0yBSBfoFBVaKqKwVUVrRXUa9FUOEqVUjV3ySPLkvkzlNlNn02E2S06pvVKWACECpW//PkZN8VDgj+zymq5krb1ewAxJvkqe1XysDVFSqlVIo2o0ispyFVoqKNIrKcqNKcKcFhSjaKiKyKhYWiv6nCnCKijajSnPorKNKcKcqcIrqNoqKNqcKNoqKNKNqNKcIqKN//orf6BSbKbKBSBXlp0CvQKTYTZ/0C/LTxFxFoigioigCLC4cRYRWItEXC4cRcI0IoFwwXCiKwjQXC8LhRFcRcRQRSFwoikRcLhxFRFguHiKRF8E7FYVhVBOgCYVRUACKKgqgE0E6ACJFYVoJ0CcgnQrAnMVwTgE6ioKoRwDdhHhG4RARgDcCMEaEYIiAbwRIRuESEcIwRwiYRwjQjBEgWoFuBa4FngWkIQQigwhEwigx/CL/4RfCKEQGP/wYiEUwYHwYGDAwYAGA4RCEQBEGB0rCNcGU4RrBlcIsGGDCESBiEWDCBhCIEWBiDAGHCKEUGEGEGMIgMAiwigxCIDADQGIRfCIEQDXgYYRfBgBoESEXwY/CJCKEQIsGIRODEGIRQYgw8IgRYMMGAGGDEDGDAIoMcDQIkGMGGBrgwCKDAIsIkDUDWDGDDA1hE4RQMQYgwBhhFBhBh4MAMYRMIoRAiAxBjhF4mhZFpxNBNy0LQTUTXhKglR9FqWpaAP5Zi//PkZNYXkgTkGEJwlkXcDfQAe9r8bCa/k5JwTriacsizBHE6CSH1w7efHLPgjuJqWnLITYTX8tRNAH/ialqJuJuWZaFkCO4m5aE7J2TonB8E559nyEnJyfB8FmJrxNxNhNS1E3LT8sxNC0E0LTlqJuWQm3E15ZiaFqWRZiaCagP5aCblkKoqCsCdioKoqwToE6FcVwAhRWBOIrCpFbgnEVRVFUVIJ2K4rAnIqioKgrcV4riuK0E4FcVQTsVxUBOoJ3FUE7itFYE7FYVRXFUVwTkVoqAnYJxBO4rReF4XYWsLWLoui4LwuC9AdsLQL0LQA9C8Lgvi6LguBahfFwXAtIvQQ4vCqKwrxX/8E5xXit4JwKzBnwj+DF+F1guvBiQYkDRIR8I/gz8Gd4R/wYsGLBi8I8DPBneDPBnwZ/8I8DP8I8B/0Gd+DPA+8I/+Ef+DOgzvwj4R/hHoM+Ee4M4D74M+Ef/A/7gfcDPBn4R7BnfCPgz4M7Bngf8DPwjwR6B/3CPwj0Gfgz+EfBnhH8GfwioRQGIBqgRUDVAYoGiBFcIoBqoMWEUA1UDRYRUIqEUA1WBooGiAaqBogRUGJwigM8I/gz+DOCPwj/Bnwj3BnBHgZ4M4I+DOhHhNCz5aiaCb//PkZM0YugrgAAASBEUEBfQAe9rclmWompZ8shNyzLMsy1LMBUAfhNxNicBJCcE5J0JpyyLMTcBVLXloCO5aCagKACiAqflqWYmvE3E3BHlmArFnxNRNC1LUBS5aFoWhZFmWR8k5CTnxz4PonZ8E5Pg+j4LUshNQH4TYtSzLMshNBNhNSyAViyE0FQE4FYVoJ0CcRUgnYqisKoJxFWAhiuKgrCtFUE7FQE5iqKgqRVFWKorwTsVxVFYE7FTFTBOxVgnAqRXBOPisK4BOK0VoriuK0E5BOxUivFcE5FYE5FQVBXFQE6FQVBVFYVxWioCcCoLovi4LoWiL0LSL+LouBaIvBahdi6LoWgEMFoC1hacXxdC14uipiqKn8VPFbiqKsVb//Bm/+EXgx4RdhFb///hE1/8GLP//CKwIrQjoGa/wPewZqEdYM1wZqDNAetgzWEd8GagzYM2DN4M1wjoI7Bm+DNhHcD3rA9awZuEdwZvCOwjsGaA964M1A978I7hHQR0DNge98I6hHYR1wZrBmwPWgPWwZsI7wjqB63COvgzQR3BmwZsGaget8D3rCOgZoGa4R1gzYM0EdwZsI6CO+DN4R1wZsD3oGaBmwjqEdAzXCO/4R0DNAzYR0WgI8TQT//PkZL4XFgTcAE6Tekf8EfQAe9t8YTXiagKwCsJuWXLMTUtC1LMTT8TYTUJP+fAdomomoD8JuWoCgWoI7iaFkJqJqfZ8hrk4CSE5Pk+Cdk5PgnBOT7JwTg+uWZaiaCbcsgFAsy0LPlmJsWYmom5ZFmWpaibiaAjy15ZFkWQm5Zll+JsJqJvy1E0CThJz65OQlJ8H2TknZOT759k6J3z4PgTQTcsy0LITflmWfLUsiyLITYTcTT8syzLQsi0LMEcWZa8tSyE1LTibibFqWYI/8shNCyE1LQsy1LUTUBTLLloWXLUsiyLUtBN+JqJvy1E05Z8TcsxNeWn/LTnxydHwfZ9n1ydk4PsnHJyfR9E4JwTgnB8k4588nB9cnR8c+D7PjxV4q4r8VsVgTgE4/itFShX/xV4rirxVFWKoq4qfxX8E6xVxUBOYrCtwTvwTj/xV8E5/irBOsVuKwqRXFTFQVorCrFf/xWioKwrCtioCcxUFUVAToE4FUVxWFQVhUBO4rgnUVIJyKkVgToE4ipFUVoq4qisKsE64qCoCdxUFUVxXFUE78VxWFQV4qiuKgqiuK4CCK2KoqirBOATsE4FWK4qxVFUVhVFYE4gnIriuCcQTiK4rCoCdCtirBORUiqK2//PkZLAWsgzuADQNNkZj/fjIe9r8K/FXFUVwSE5aiaAKgmhaFpxNQkp8n3z5PsJOGsffLQsyyE1LItS1E1Af+CPLMTUTfibFmJoWQmxanzydHwTsnASknBaCalqWom5ZcsxNyc8nASsnHDt59BrhJgkpOicBKg7D7JyfZ8E5Pk+Cd8EeWXE0LQsiyLQtSyLIsi0LUTYsy0E3LITQshNiyLUsiy4I78shNy0LMVcE6ipgnArRVgncE4wTsVIrCqCcCtBOYrwTgE7iuKwqCoKwrcE7BOQTqKgqiqFpBEC1gPYD3F0X4WoLTF0Xxei6FqC0BaAtQWgXxdwtWFqC0haBW/FQVRUBOBUFcE6ioCcAnEVRX4rYrxWFUVBViuLsXgtAuC6FoBDBaYvi7F8XxexdF8XhcFyI//gx//CJBhgxhEwY/+EXwYgx8ImDH8GPhE8GPhEwigwhFwNQNQNfhE+DGDAGHCIBrhEhEBh4RQMAY/gYBFBhhEAxCIDCEUDEDHBiEUIoRQY+DCBp4McGEIgGgMcGIGMGIGIGgRQYgxCKBiBjBgDGESDADWBgEUDEIuDADWBpBiEUDEDDgYgwBgDEDQDUGIGgRAYQYAxCKBhCKEThEBgBiEUGIRQMQiQiwNAY//PkZKwWNgjoZUAQREakFfQAe9t8YMfwi4GBaFoJsWpaFlyyBHctCzE25ZiaFoAocsy1E24Sk+idk6LMTYTYTQsyyLUtCyLQTUswFYJMGuTg+CdHwErPotAFAsuJtxNCz4m4mvBHiafloWZZ8YppBqzTNI0jTNBMpg0jTTZZFqWfE3Af/xNf+WomhZ8suWZZCb8tC1LQtS14m/LQtBNhNOfR8hKCc8nHJ2EqCUE5CSHxydk6Pg+D7Ps+Sdk6LUTQTcTcTctSz4mwmha8TXlmJvyy5ZiaFl+WpZFoWZa8TQshNCz4mhalmJsWfLQsuWRactBNRNC1E1LLlly0E2PgJWfR8h2H2fJOSdnx+fXPs+T5PgNbnzz6Po+T7JwTk+z4PonROglJ84qCvxXxUirFX4q4qeCd1f8InCI/4R/CP//4RMI/CMEYI4RAR8I8IjCJ4REI/gG8ESEfCOERCP4R/+EaERCPCNCNCI4BvQjYRMHINobIOfjZBzDZG3xtja42gcw2PwcvG2Nng5+NgbY2wcn42htDYGwNrjYGwNsbX42vxscbI2gc3Bzg5Qcg2uNvjaGwNgbI2+Dl4OUbI2Qc42RsjbBy//g5eAboR4RwjQDeCP+EcI8IwBuwjwjBEBEA//PkZKoZMgrqADXt9EV8FfQAe9scG+EThEBGCMESESEbhEQjwjwjwjBHCIwiQDcCNCI/hHE0/LQBSLITf/lqWoSvk7LT8BWLMtRNAk58E7Po+CyLQTcsyyLUsi0Afi1LUTUTUtBNS05aFkWpZHzwkoSgnB9HwfQSsTYsizLQtRNRNgFf/8NcJWEmAWCdn0To+T4CUHyGtxNiyLT/lmJqJqJqWgmpZFqJsWgmwmwmwmv5ZiaibiactBNv/yyLTiaFkWZagKgCmJqWQmgmom3E0LTibAKfE0LLiuKgrYqipBO4JzFUE5BORXBOhVioKwqRWBOYJyKkE6BOIrYqCqCcxVxVFUV8E4FSCdcVgAgCuKkLTBDC6CHi+LwuRfha4uC+FpF8XQtAWgB2wtAWoXBchaBfwtQWnFSCdxVxXFUVhUFYV4rgnOK3wTiKir//1eDCsf//7/+wOYd///ei/f6lmiqGXpyOlCSRm+yP3UtDhFIzqBhwCFHAGFHABYGcAnAAMOAAYcAAw4BYKOAIROANgicAQYcABE4AAzgE4B+1wmcAwYcAK+sDOADgFLCJwAlWBnABwABnABwDWraETgEDOADgDBiRkgoJpGaP+64RSMoRSMGBiRkkwMSMlq7AxIy4//PkZJUYEgieBFw3fkL8FgAied8AROAAicA8DOATgAGHAAROAFwM4BOAGBhwADDgAGHANQUcAgicAYROAfgw4AIkbPNNNpo0TSNBNJgUs0l7lomEwmRSOaRp80zQFK4nvTInnTEGgwGwAwYmOmkyaInppJpMJg0k1+KUaaaTCb42U0mBsGiaSaNNNpo0OaKZNE0jTTSY5oGmaZpJrphM9MGkmDQTCZBzpg0OKR+mBtdMJobfTSbTfG2KSaBpGgaZomiaBomn02mOmkwmjSNPpjmmaKZNA0zSNFNCeClJkT40DTTCY5oJk0kyaJpdMppMdMdN80TR6ZTXTfNJNmimumem+aKZTKaTaaTRops0kwaZppk0+aSa6ZTKYTfTfTPTHTKa5omgmEyaJo9NmkaRp/pnmmaf6aNNMplMplMdMpv8TxMJlNplNJn9MdM1OM6hWa/EjiRiRiO/xIcSP+GgCZQ1+GvDRDV//4aP///4I8EwTwTBLwS/4AHgnBHBHgiwR4JgAgS4IwAYPA8ADg+AAAAFwfB4L4WADC2AGAGFwsFwuD2FgAcAPC+F/B8L4X/B7B4L4WwuD+AGDwXACAAC2D2AEFgfCwAAAAXB8LhcLeDwXCwPYPA+ACACD+AH4XwA//PkZJMVIgb2ejVLxkBMEgTIe898vwv4X/ACB/C4WwtgBg/gA4PA9gBeFhLRTXTRomkmP0yJ6J+mPy0NA0OvibNDQmfzTNNMjaFKNATxMiemiaRoGkmE2mkwmTRTHNBMGiaCZTSZTZomh0PaV9fX2hoX14kzSmOaCY5pJr80U0aPTfNFMps0jSNJMmiaSaTKb6aTKYNLphMpg0eaJoGkJ8aBoppMppMJg00xzTTabNFNJpNJpNpnpg0DT6bTRoppoJMWrSh/690NQ5paV5D2le/LND2hoQxDF/rzR1/r/aWhfaWleQxfXmheaevNDS0tLQ0ryGoch/X15D+vLy+0oc0ry/19DUOXuvIc0oav9oXkNX1/r3X18QCGHQGQHB8PiAPAaHgPDsBgcH+Hqv//+DJ0GNuEW4MbQY2wZO4Rn///4R34R3Qjv//8Gbv//8GbgZuwZvCO4GbsD37+Ed3A586DJ4Rn8DnToRn8GTsGT8GToRn4HOngyf4HOnBGeDJ0IzgjOCM8DnTwjOgydwOdP4RnYMncDbtwY2A27cItgNs3CLeDGwMbwY3CLaEWwRbQi3A27eDG0GN4G2bBFvA2zcItgY3A27YGN4G2bAxtA58/gc6eDJwHOnAyfCM7A588//PkZLMYngTSAFAUhEYcDfggw9V8DnzwOdOBk8IzuEZ4MnAyfgychsy7F3oE13Nl9sy7myrsL6qqOU5anCqkHqNDI3KVUTEU8GNU7U6gxyHKchyVV/Xa2Zspfds3rubK2VsjZmztk9djZi/TZV2NnXYu0vsm0yaBoDZNEbA2k0aKZNjmwbH/Nvm2bRtGyBVArD1G0bQPUevg9h6/+PRzZNkCrzZNgesegesermyPQPXzbHpNvm0PQPUPSbJs82TaHqAtj082h6DaNn8eo2DbHrHpNjj1m1zYHqNo2jYNnmwbPNgek2ja5sj0D1m0bJs80xtJlMdMCeps0U0meaaa6b5p/mmmU3zRTfNFN/pgHPzQNPmkaaaTXTKbTRoJk0zS6b/NBNdNJlNGj02aH6Z4IgAEEYJ4I+CMEQJcEUEXBOpHDX/w1Q0Q1Q1cNWGvw0Q0/hp/AmIaA0cCYhow0w1/w0hoDRhpw1w1BrgTLDXw1BrhrDQGgNQEzAmOGuGiGgNfgTHDQGoCZw1w0BrDWBMIEzDVDTDUGgNfAFwGjBrg1A1YNcGsAXAaQaABcBqg1g1QagaINYaoEyw1Bow1YaA1hoDSBMw1gTICYQJkGrDQGoNGGmGsNcNQawJkGuBM4aIa//PkZKAYngTsATQNQkKMFgDifh7AYagJkGsCZ+GkNWGiGsNAaYaOGgCYgTENQaw0Yaw1Q1Q0/hqw1BkAfmkaCb6ZTCY6bNBNLwmqGA5fzSTCb/lgwXOmMmMmTQ5pmkmUwmkymfzRTaZFJ6aNM002NrppMpg0kwKQmE2m0yKUaKaE95o9MJj9N9NJk0UymOaSaE/TabNNNmmmk2mU2aHTKZTCaNDjaTJoGimkyNvpk0TRTHTf6bTRopg001+mU0aXNBMjYNA0k2mjR5pfps0U100mUz0ym02mDRTHTaaTRpplMc0kz0ySA000mDSTKbNI002mzQTHTaYTf//NA0zQTBodNJk0UyKSaaZNJMprmkaP5oGmKUmEymUyaCbTHNBMJlN80DRNBMmkm/00mUwaZpprplNpvmiaJo80+aSa//TaY/6ZaH//wY4ReEX4RIMfwiAxBh/BhCJ/+ESDDwYcIn+EQIoMAiQYAw8IsGIGGETBj4MP4MQiAxhEAwAxAxBjBiEUIgMIMcDCDAGIMcGMDEGGBgEUDTwNfAx4MAiwiQYgwBgEUIgMIRAiQYhFwYAwBhA1CKDEIoGoGgMQi4MeDADGEQIkIgGMDCDAIoMAiQiAYwYYMQNQigwCJBiDEGAR//PkZJwV+gzoZUAQRkZsCfQAe9tcQYgx8GEGIMQiwMAY4MANAMcIoMSyE1E1/LMTUtCz5OD5PkJJz5Pk+uA/FqWRaib8TUTUTQtC05alqWYm4momgI8TYsxNCzE3LUtQFEsgFM+z6J0fB8nz+TsNcnB9BK+Tk+g7CdhJT6LTiaFqWYI7lqWoCvy05ZlnxNy0/LUshNBNvwR4moCj+Wv5ZlkJqWpalkCOE1E1LQsiyLITUBULLlqWZZlmJsWhZcsi1/4CiWpalkJqJuWvLXlkJsJpyy4mwm5ZlmJuWXLUTQteWgmgmwCsJoWfE3LMsiyLP8TTlkJuAolqJryzE1LTibCbloJuWhZFoWYmxZ8TcXIvxeC0i+FrF0B2i4L8LSL4uBaIDyCHF8XRfF6FqgiwtIuYWoXIrYqAncVvxVip8VIqCvUxPqtFbFf/4q/8V/8V/iririr8VATjxXipxWgnYq+KwqfFTFQVoq+KsVBW8VhUisKuK0VRXivFYE4FTBOhVFcVRV4riuCdCuCdCtwTiCcCqCcgnYqxWFcVIJwKsVxWisK8VxVgnArYqRWFeK0V4qgnQrgnYrfBOoqAnAq4J0CciqKviuK3BOoJyKsE4FUVoqisK2KwrAnArgBAFSK4//PkZJ0VagjyJgGtbkOkFfwAbh4AqRViuK4J0KgrCrFUVxVjOEeDQgjlcT4T40xtjaNI0uaI2QciGNJIl4kJZtCGIaSckIm6GL3TQ2zRTY2UwmjSNE0fxS02aY2BsJs0/+mzSE8TQpHTKZTaaG0aQpApZp/mmm+aHTfTCZGwNgUk0E0aRp/ilJlNJgT5MmkJ9zQNA0TQTH6ZG2mk0mk0mk3zQTKY/G3zQTHTabTBpGgmU0aKaTJpJpNJtMphNjYTfNE0emkymE2mEyaCbNBNfmkaJpdNJnpg0k0mDTTCbTaZTBp80k2aCbTfNE00yaCb6bTZoplMmmaKZTKaTJpmiaHTXNJNdMDbTab6Y6Z6ZNNMJhMJhN9NJrmim02m0ymU300aPTSa6Y//5pJpNdN/9NppxWxU4Jx/xWxU/xU4qcV/ipiuKwqxWFbioK/8VIqivFTwTkVgTkVor4JxFXxX8VcVxUFQE4FaCcwTvBOIqwToVuKwqCtFUVYqxXxWFeK0E7FQVYrwTnwTsV4rCqCcfFaCcRVFQE5gnAr4JyK4r4Jz4J0Koqip4rCvisKoJ3xWBOME7iuKgriuKgrAnAqgnArxXiqCcgnYJzFQVQTmAEIVYrwToAIYrwTiKkVQTkE5//PkZK4XGgzsADQNAkIcCfwAe898FXFTFYVxXxUFQVkzzS5oilg5TTTY2kyaJpJtNGgJ8aKaTQ2k2aCaNI0eaSYNJM/tKHEiQxfJG09MmgaSYTRppg0TRNNMJlMptMCfppNprmiaA2jQNLmmaRppk0jRFLNP9NJhMGmaQpZpJhNCkGkmE0J+mxSk0m0x02mjRTKbTCZ42EwaQpJpptNprmgaRpmim00J4mzSNM0kymkyKWmE0muaKYGwNjmgafTPNE0U0mUwJ7+mem01+J8mhSk2mjRTSb6aTCbNBM9MpjpjppMpk0E2mE2mE2mjSTfTaZ6YNFMcT1MpnprptNmim0wmE100aSaTRo9MGjzTTHTaaTfTSaNLpoFMAAFYNBQGwAvwAYM4NgqqkjaAN3d3d3etERNK5CZ/3Ctf8AaiAc/u7vaIn/+8XPv//+GDKv8W1/+AC8K4Yw+94xe940jgceOBwOcRaxGwH4EuNIjBfxazB8HhkwVjIAII/vDkjG/wAcJPeF5e98hNgSYLWMFvhZ73pX06aoehpmh01hMJtM9K3TKY9E10x+memvlIpZM9MUTCbShbUrtM+n5ophNZuXK+0wmemumMCemkmvc0Uwm/lJJlLe5oJZI0SyW6R0mE//PkZLcXlgrzECFvrEmMEfgAfh7k2aORpbTYUo9SBNsekGYNVKgqg6hrUXK4Q42DOwPWbILEzBSumEgkWJPU8S72G5wUuGDwguEKa1Q0UykS3Bn7FJNgg5qoEgpsGabBtGabZt7NrKCNgLYes1idmabBtm2bZsBRm0PQbF9mwPSPUBbMwzB6QojYM42ePTzbMwzR6TaNs1eBVNv81yDUJ2QYhJtD0m0PVe+x6T2M8HsbFwsh6B6D7HpugT2uZhO6HqZhmE7ISZhhkFNcghtmybBnnsD1Ho49ZtG2bZs5PVBc2EEepCaEHNjj1EJHq5smabZtmwbNEEPR+bJse9z2PY2T1SN0rdNJq6yXI06COvNJj9MGmkkGmUj7pI0TToNGlEsNEnCW10ymi5FtNFKpvps0kz0uW3aaTF00mTSzdNJu0KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var xs=t=>t instanceof Date,ky=t=>t==null;const By=t=>typeof t=="object";var Ny=t=>!ky(t)&&!Array.isArray(t)&&By(t)&&!xs(t),Ry=t=>ky(t)||!By(t);function Dy(t,e){if(Ry(t)||Ry(e))return t===e;if(xs(t)&&xs(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const o of n){const i=t[o];if(!r.includes(o))return!1;if(o!=="ref"){const a=e[o];if(xs(i)&&xs(a)||Ny(i)&&Ny(a)||Array.isArray(i)&&Array.isArray(a)?!Dy(i,a):i!==a)return!1}}return!0}function Pu(t){if(t===null)throw new Error("Canvas should always be defined when component is mounted.");const e=t.getContext("2d");if(e===null)throw new Error("Canvas 2D context should be non-null");e.clearRect(0,0,t.width,t.height)}function lT(t){var e;const{onScan:n,constraints:r,formats:o=["qr_code"],paused:i=!1,components:a,children:s,styles:c,classNames:l,allowMultiple:f,scanDelay:h,onError:d}=t,p=x.useRef(null),u=x.useRef(null),g=x.useRef(null),m=x.useMemo(()=>({...oT,...r}),[r]),y=x.useMemo(()=>({...iT,...a}),[a]),[w,b]=x.useState(!1),[E,C]=x.useState(!0),[S,T]=x.useState(m),P=function(){const G=x.useRef(Promise.resolve({type:"stop",data:{}})),k=x.useRef(null),V=x.useRef(null),[z,te]=x.useState({}),[re,ne]=x.useState({}),se=x.useCallback(async(H,W)=>{var J,I,M;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((J=navigator==null?void 0:navigator.mediaDevices)===null||J===void 0?void 0:J.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");cT();const F=await navigator.mediaDevices.getUserMedia({audio:!1,video:W});H.srcObject!==void 0?H.srcObject=F:H.mozSrcObject!==void 0?H.mozSrcObject=F:window.URL.createObjectURL?H.src=window.URL.createObjectURL(F):window.webkitURL?H.src=window.webkitURL.createObjectURL(F):H.src=F.id,await Promise.race([H.play(),new Promise(X=>setTimeout(X,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(X=>setTimeout(X,500));const[B]=F.getVideoTracks();return ne(B.getSettings()),te((M=(I=B==null?void 0:B.getCapabilities)===null||I===void 0?void 0:I.call(B))!==null&&M!==void 0?M:{}),k.current=F,V.current=B,{type:"start",data:{videoEl:H,stream:F,constraints:W}}},[]),we=x.useCallback(async(H,W)=>{H.src="",H.srcObject=null,H.load();for(const J of W.getTracks())W.removeTrack(J),J.stop();return k.current=null,V.current=null,ne({}),{type:"stop",data:{}}},[]),le=x.useCallback(async(H,{constraints:W,restart:J=!1})=>{if(G.current=G.current.then(I=>{if(I.type==="start"){const{data:{videoEl:M,stream:F,constraints:B}}=I;return J||H!==M||W!==B?we(M,F).then(()=>se(H,W)):I}return se(H,W)}),(await G.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[se,we]),Ce=x.useCallback(async()=>{if(G.current=G.current.then(H=>{if(H.type==="stop")return H;const{data:{videoEl:W,stream:J}}=H;return we(W,J)}),(await G.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[we]),ye=x.useCallback(async H=>{const W=V.current;if(!W)throw new Error("No active video track found.");{H.advanced&&H.advanced[0].zoom&&W.getCapabilities().torch&&await W.applyConstraints({advanced:[{torch:!1}]}),await W.applyConstraints(H);const J=W.getCapabilities(),I=W.getSettings();te(J),ne(I)}},[]);return x.useEffect(()=>()=>{(async()=>await Ce())()},[Ce]),{capabilities:z,settings:re,startCamera:le,stopCamera:Ce,updateConstraints:ye}}(),{startScanning:N,stopScanning:L}=function(G){const{videoElementRef:k,onScan:V,onFound:z,retryDelay:te=100,scanDelay:re=0,formats:ne=[],audio:se=!0,allowMultiple:we=!1}=G,le=x.useRef(new Kf({formats:ne})),Ce=x.useRef(null),ye=x.useRef(null);x.useEffect(()=>{le.current=new Kf({formats:ne})},[ne]),x.useEffect(()=>{typeof window<"u"&&se&&(Ce.current=new Audio(uT))},[se]);const H=x.useCallback(W=>async J=>{if(k.current!==null&&k.current.readyState>1){const{lastScan:I,contentBefore:M,lastScanHadContent:F}=W;if(J-I<te)ye.current=window.requestAnimationFrame(H(W));else{const B=await le.current.detect(k.current),X=B.some(pe=>!M.includes(pe.rawValue)),ee=B.length>0;let Z=W.lastOnScan;(X||we&&ee&&J-Z>=re)&&(se&&Ce.current&&Ce.current.paused&&Ce.current.play().catch(pe=>console.error("Error playing the sound",pe)),Z=J,V(B)),ee&&z(B),!ee&&F&&z(B);const $={lastScan:J,lastOnScan:Z,lastScanHadContent:ee,contentBefore:X?B.map(pe=>pe.rawValue):M};ye.current=window.requestAnimationFrame(H($))}}},[k.current,V,z,te]);return{startScanning:x.useCallback(()=>{const W=performance.now(),J={lastScan:W,lastOnScan:W,contentBefore:[],lastScanHadContent:!1};ye.current=window.requestAnimationFrame(H(J))},[H]),stopScanning:x.useCallback(()=>{ye.current!==null&&(window.cancelAnimationFrame(ye.current),ye.current=null)},[])}}({videoElementRef:p,onScan:n,onFound:G=>function(k,V,z,te){const re=z;if(re==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const ne=V;if(ne==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(k.length===0||te===void 0)Pu(re);else{const se=ne.offsetWidth,we=ne.offsetHeight,le=ne.videoWidth,Ce=ne.videoHeight,ye=Math.max(se/le,we/Ce),H=le*ye,W=Ce*ye,J=H/le,I=W/Ce,M=(se-H)/2,F=(we-W)/2,B=({x:$,y:pe})=>({x:Math.floor($*J),y:Math.floor(pe*I)}),X=({x:$,y:pe})=>({x:Math.floor($+M),y:Math.floor(pe+F)}),ee=k.map($=>{const{boundingBox:pe,cornerPoints:be}=$,{x:fe,y:he}=X(B({x:pe.x,y:pe.y})),{x:ve,y:ue}=B({x:pe.width,y:pe.height});return{...$,cornerPoints:be.map(Be=>X(B(Be))),boundingBox:DOMRectReadOnly.fromRect({x:fe,y:he,width:ve,height:ue})}});re.width=ne.offsetWidth,re.height=ne.offsetHeight;const Z=re.getContext("2d");if(Z===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");te(ee,Z)}}(G,p.current,g.current,y.tracker),formats:o,audio:y.audio,allowMultiple:f,retryDelay:y.tracker===void 0?500:10,scanDelay:h});x.useEffect(()=>(b(!0),()=>{b(!1)}),[]),x.useEffect(()=>{w&&(L(),N())},[a==null?void 0:a.tracker]),x.useEffect(()=>{if(!Dy(m,S)){const G=m;r!=null&&r.deviceId&&delete G.facingMode,T(G)}},[r]);const U=x.useMemo(()=>({constraints:S,shouldStream:w&&!i}),[S,w,i]),j=async()=>{const G=p.current;if(G==null)throw new Error("Video should be defined when component is mounted.");const k=u.current;if(k==null)throw new Error("Canvas should be defined when component is mounted.");const V=k.getContext("2d");if(V==null)throw new Error("Canvas should be defined when component is mounted.");if(U.shouldStream){await P.stopCamera(),C(!1);try{await P.startCamera(G,U),G?C(!0):await P.stopCamera()}catch(z){d==null||d(z),console.error("error",z)}}else k.width=G.videoWidth,k.height=G.videoHeight,V.drawImage(G,0,0,G.videoWidth,G.videoHeight),await P.stopCamera(),C(!1)};x.useEffect(()=>{(async()=>await j())()},[U]);const K=x.useMemo(()=>U.shouldStream&&E,[U.shouldStream,E]);return x.useEffect(()=>{if(K){if(u.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Pu(u.current),g.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Pu(g.current),p.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");N()}},[K]),x.createElement("div",{style:{...aT,...c==null?void 0:c.container},className:l==null?void 0:l.container},x.createElement("video",{ref:p,style:{...sT,...c==null?void 0:c.video,visibility:i?"hidden":"visible"},className:l==null?void 0:l.video,autoPlay:!0,muted:!0,playsInline:!0}),x.createElement("canvas",{ref:u,style:{display:i?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),x.createElement("canvas",{ref:g,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),x.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},y.finder&&x.createElement(rT,{scanning:E,capabilities:P.capabilities,loading:!1,onOff:y.onOff,zoom:y.zoom&&P.settings.zoom?{value:P.settings.zoom,onChange:async G=>{const k={...S,advanced:[{zoom:G}]};await P.updateConstraints(k)}}:void 0,torch:y.torch?{status:(e=P.settings.torch)!==null&&e!==void 0&&e,toggle:async G=>{const k={...S,advanced:[{torch:G}]};await P.updateConstraints(k)}}:void 0,startScanning:async()=>await j(),stopScanning:async()=>{await P.stopCamera(),Pu(g.current),C(!1)},border:c==null?void 0:c.finderBorder}),s))}const ku="data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e";function My({onScan:t}){const{t:e}=Ve(),{cameraFacingMode:n}=qt(),[r,o]=x.useState(n??An.USER),[i,a]=x.useState(!(Gf&&!qf));return i?v.jsxs("div",{className:"relative w-full",children:[v.jsx("div",{className:"scale-x-[-1]",children:v.jsx(lT,{components:{finder:!1,audio:!1},onScan:s=>t(s[0].rawValue),constraints:{facingMode:r},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"},onError:s=>{console.log(s),rm(s)}})}),v.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>r===An.USER?o(An.ENVIRONMENT):o(An.USER),children:v.jsx("img",{src:ku,alt:"camera-switch"})})]}):v.jsx("div",{className:"flex max-h-[calc(100vh-381px)] min-h-[267px] items-center justify-center",children:v.jsx(nt,{label:e("enableCamera"),disabled:i,onClick:()=>a(!0)})})}var Bu,zf,dT=(Bu=function(t,e){return Bu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)r.hasOwnProperty(o)&&(n[o]=r[o])},Bu(t,e)},function(t,e){function n(){this.constructor=t}Bu(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}),fT=function(t){function e(n){var r,o,i,a=this.constructor,s=t.call(this,n)||this;return Object.defineProperty(s,"name",{value:a.name,enumerable:!1,configurable:!0}),r=s,o=a.prototype,(i=Object.setPrototypeOf)?i(r,o):r.__proto__=o,function(c,l){l===void 0&&(l=c.constructor);var f=Error.captureStackTrace;f&&f(c,l)}(s),s}return dT(e,t),e}(Error),hT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rr=function(t){function e(n){n===void 0&&(n=void 0);var r=t.call(this,n)||this;return r.message=n,r}return hT(e,t),e.prototype.getKind=function(){return this.constructor.kind},e.kind="Exception",e}(fT),pT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zt=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return pT(e,t),e.kind="ArgumentException",e}(rr),gT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ke=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return gT(e,t),e.kind="IllegalArgumentException",e}(rr),Ly=function(){function t(e){if(this.binarizer=e,e===null)throw new Ke("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,n){return this.binarizer.getBlackRow(e,n)},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,n,r,o){var i=this.binarizer.getLuminanceSource().crop(e,n,r,o);return new t(this.binarizer.createBinarizer(i))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},t}(),mT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pn=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return mT(e,t),e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e}(rr),yT=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}(),Ut=function(){function t(){}return t.arraycopy=function(e,n,r,o,i){for(;i--;)r[o++]=e[n++]},t.currentTimeMillis=function(){return Date.now()},t}(),vT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$f=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return vT(e,t),e.kind="IndexOutOfBoundsException",e}(rr),wT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fy=function(t){function e(n,r){n===void 0&&(n=void 0),r===void 0&&(r=void 0);var o=t.call(this,r)||this;return o.index=n,o.message=r,o}return wT(e,t),e.kind="ArrayIndexOutOfBoundsException",e}($f),bT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yr=function(){function t(){}return t.fill=function(e,n){for(var r=0,o=e.length;r<o;r++)e[r]=n},t.fillWithin=function(e,n,r,o){t.rangeCheck(e.length,n,r);for(var i=n;i<r;i++)e[i]=o},t.rangeCheck=function(e,n,r){if(n>r)throw new Ke("fromIndex("+n+") > toIndex("+r+")");if(n<0)throw new Fy(n);if(r>e)throw new Fy(r)},t.asList=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e},t.create=function(e,n,r){return Array.from({length:e}).map(function(o){return Array.from({length:n}).fill(r)})},t.createInt32Array=function(e,n,r){return Array.from({length:e}).map(function(o){return Int32Array.from({length:n}).fill(r)})},t.equals=function(e,n){if(!e||!n||!e.length||!n.length||e.length!==n.length)return!1;for(var r=0,o=e.length;r<o;r++)if(e[r]!==n[r])return!1;return!0},t.hashCode=function(e){var n,r;if(e===null)return 0;var o=1;try{for(var i=bT(e),a=i.next();!a.done;a=i.next())o=31*o+a.value}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o},t.fillUint8Array=function(e,n){for(var r=0;r!==e.length;r++)e[r]=n},t.copyOf=function(e,n){return e.slice(0,n)},t.copyOfUint8Array=function(e,n){if(e.length<=n){var r=new Uint8Array(n);return r.set(e),r}return e.slice(0,n)},t.copyOfRange=function(e,n,r){var o=r-n,i=new Int32Array(o);return Ut.arraycopy(e,n,i,0,o),i},t.binarySearch=function(e,n,r){r===void 0&&(r=t.numberComparator);for(var o=0,i=e.length-1;o<=i;){var a=i+o>>1,s=r(n,e[a]);if(s>0)o=a+1;else{if(!(s<0))return a;i=a-1}}return-o-1},t.numberComparator=function(e,n){return e-n},t}(),On=function(){function t(){}return t.numberOfTrailingZeros=function(e){var n;if(e===0)return 32;var r=31;return(n=e<<16)!==0&&(r-=16,e=n),(n=e<<8)!==0&&(r-=8,e=n),(n=e<<4)!==0&&(r-=4,e=n),(n=e<<2)!==0&&(r-=2,e=n),r-(e<<1>>>31)},t.numberOfLeadingZeros=function(e){if(e===0)return 32;var n=1;return!(e>>>16)&&(n+=16,e<<=16),!(e>>>24)&&(n+=8,e<<=8),!(e>>>28)&&(n+=4,e<<=4),!(e>>>30)&&(n+=2,e<<=2),n-=e>>>31},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=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135,e+=e>>>8,63&(e+=e>>>16)},t.truncDivision=function(e,n){return Math.trunc(e/n)},t.parseInt=function(e,n){return n===void 0&&(n=void 0),parseInt(e,n)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Jr=function(){function t(e,n){e===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,this.bits=n??t.makeArray(e))}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>32*this.bits.length){var n=t.makeArray(e);Ut.arraycopy(this.bits,0,n,0,this.bits.length),this.bits=n}},t.prototype.get=function(e){return(this.bits[Math.floor(e/32)]&1<<(31&e))!=0},t.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(31&e)},t.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(31&e)},t.prototype.getNextSet=function(e){var n=this.size;if(e>=n)return n;var r=this.bits,o=Math.floor(e/32),i=r[o];i&=~((1<<(31&e))-1);for(var a=r.length;i===0;){if(++o===a)return n;i=r[o]}var s=32*o+On.numberOfTrailingZeros(i);return s>n?n:s},t.prototype.getNextUnset=function(e){var n=this.size;if(e>=n)return n;var r=this.bits,o=Math.floor(e/32),i=~r[o];i&=~((1<<(31&e))-1);for(var a=r.length;i===0;){if(++o===a)return n;i=~r[o]}var s=32*o+On.numberOfTrailingZeros(i);return s>n?n:s},t.prototype.setBulk=function(e,n){this.bits[Math.floor(e/32)]=n},t.prototype.setRange=function(e,n){if(n<e||e<0||n>this.size)throw new Ke;if(n!==e){n--;for(var r=Math.floor(e/32),o=Math.floor(n/32),i=this.bits,a=r;a<=o;a++){var s=(2<<(a<o?31:31&n))-(1<<(a>r?0:31&e));i[a]|=s}}},t.prototype.clear=function(){for(var e=this.bits.length,n=this.bits,r=0;r<e;r++)n[r]=0},t.prototype.isRange=function(e,n,r){if(n<e||e<0||n>this.size)throw new Ke;if(n===e)return!0;n--;for(var o=Math.floor(e/32),i=Math.floor(n/32),a=this.bits,s=o;s<=i;s++){var c=(2<<(s<i?31:31&n))-(1<<(s>o?0:31&e))&4294967295;if((a[s]&c)!==(r?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<<(31&this.size)),this.size++},t.prototype.appendBits=function(e,n){if(n<0||n>32)throw new Ke("Num bits must be between 0 and 32");this.ensureCapacity(this.size+n);for(var r=n;r>0;r--)this.appendBit((e>>r-1&1)==1)},t.prototype.appendBitArray=function(e){var n=e.size;this.ensureCapacity(this.size+n);for(var r=0;r<n;r++)this.appendBit(e.get(r))},t.prototype.xor=function(e){if(this.size!==e.size)throw new Ke("Sizes don't match");for(var n=this.bits,r=0,o=n.length;r<o;r++)n[r]^=e.bits[r]},t.prototype.toBytes=function(e,n,r,o){for(var i=0;i<o;i++){for(var a=0,s=0;s<8;s++)this.get(e)&&(a|=1<<7-s),e++;n[r+i]=a}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),n=Math.floor((this.size-1)/32),r=n+1,o=this.bits,i=0;i<r;i++){var a=o[i];a=(a=(a=(a=(a=a>>1&1431655765|(1431655765&a)<<1)>>2&858993459|(858993459&a)<<2)>>4&252645135|(252645135&a)<<4)>>8&16711935|(16711935&a)<<8)>>16&65535|(65535&a)<<16,e[n-i]=a}if(this.size!==32*r){var s=32*r-this.size,c=e[0]>>>s;for(i=1;i<r;i++){var l=e[i];c|=l<<32-s,e[i-1]=c,c=l>>>s}e[r-1]=c}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 n=e;return this.size===n.size&&yr.equals(this.bits,n.bits)},t.prototype.hashCode=function(){return 31*this.size+yr.hashCode(this.bits)},t.prototype.toString=function(){for(var e="",n=0,r=this.size;n<r;n++)!(7&n)&&(e+=" "),e+=this.get(n)?"X":".";return e},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t}();(function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.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"})(zf||(zf={}));var xt,Ft=zf,ET=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return ET(e,t),e.getFormatInstance=function(){return new e},e.kind="FormatException",e}(rr),CT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"})(xt||(xt={}));var Xf,or=function(){function t(e,n,r){for(var o,i,a=[],s=3;s<arguments.length;s++)a[s-3]=arguments[s];this.valueIdentifier=e,this.name=r,this.values=typeof n=="number"?Int32Array.from([n]):n,this.otherEncodingNames=a,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(r,this);for(var c=this.values,l=0,f=c.length;l!==f;l++){var h=c[l];t.VALUES_TO_ECI.set(h,this)}try{for(var d=CT(a),p=d.next();!p.done;p=d.next()){var u=p.value;t.NAME_TO_ECI.set(u,this)}}catch(g){o={error:g}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new Ie("incorect value");var n=t.VALUES_TO_ECI.get(e);if(n===void 0)throw new Ie("incorect value");return n},t.getCharacterSetECIByName=function(e){var n=t.NAME_TO_ECI.get(e);if(n===void 0)throw new Ie("incorect value");return n},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.getName()===n.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(xt.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(xt.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(xt.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(xt.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(xt.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(xt.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(xt.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(xt.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(xt.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(xt.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(xt.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(xt.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(xt.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(xt.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(xt.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(xt.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(xt.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(xt.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(xt.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(xt.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(xt.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(xt.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(xt.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(xt.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(xt.Big5,28,"Big5"),t.GB18030=new t(xt.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(xt.EUC_KR,30,"EUC_KR","EUC-KR"),t}(),_T=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Nu=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return _T(e,t),e.kind="UnsupportedOperationException",e}(rr),bi=function(){function t(){}return t.decode=function(e,n){var r=this.encodingName(n);return this.customDecoder?this.customDecoder(e,r):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(r)?this.decodeFallback(e,r):new TextDecoder(r).decode(e)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&e==="ISO-8859-1"},t.encode=function(e,n){var r=this.encodingName(n);return this.customEncoder?this.customEncoder(e,r):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 or?e:or.getCharacterSetECIByName(e)},t.decodeFallback=function(e,n){var r=this.encodingCharacterSet(n);if(t.isDecodeFallbackSupported(r)){for(var o="",i=0,a=e.length;i<a;i++){var s=e[i].toString(16);s.length<2&&(s="0"+s),o+="%"+s}return decodeURIComponent(o)}if(r.equals(or.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Nu("Encoding "+this.encodingName(n)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(or.UTF8)||e.equals(or.ISO8859_1)||e.equals(or.ASCII)},t.encodeFallback=function(e){for(var n=btoa(unescape(encodeURIComponent(e))).split(""),r=[],o=0;o<n.length;o++)r.push(n[o].charCodeAt(0));return new Uint8Array(r)},t}(),bn=function(){function t(){}return t.castAsNonUtf8Char=function(e,n){n===void 0&&(n=null);var r=n?n.getName():this.ISO88591;return bi.decode(new Uint8Array([e]),r)},t.guessEncoding=function(e,n){if(n!=null&&n.get(Ft.CHARACTER_SET)!==void 0)return n.get(Ft.CHARACTER_SET).toString();for(var r=e.length,o=!0,i=!0,a=!0,s=0,c=0,l=0,f=0,h=0,d=0,p=0,u=0,g=0,m=0,y=0,w=e.length>3&&e[0]===239&&e[1]===187&&e[2]===191,b=0;b<r&&(o||i||a);b++){var E=255&e[b];a&&(s>0?128&E?s--:a=!1:128&E&&(64&E?(s++,32&E?(s++,16&E?(s++,8&E?a=!1:f++):l++):c++):a=!1)),o&&(E>127&&E<160?o=!1:E>159&&(E<192||E===215||E===247)&&y++),i&&(h>0?E<64||E===127||E>252?i=!1:h--:E===128||E===160||E>239?i=!1:E>160&&E<224?(d++,u=0,++p>g&&(g=p)):E>127?(h++,p=0,++u>m&&(m=u)):(p=0,u=0))}return a&&s>0&&(a=!1),i&&h>0&&(i=!1),a&&(w||c+l+f>0)?t.UTF8:i&&(t.ASSUME_SHIFT_JIS||g>=3||m>=3)?t.SHIFT_JIS:o&&i?g===2&&d===2||10*y>=r?t.SHIFT_JIS:t.ISO88591:o?t.ISO88591:i?t.SHIFT_JIS:a?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=-1;function i(s,c,l,f,h,d){if(s==="%%")return"%";if(n[++o]!==void 0){s=f?parseInt(f.substr(1)):void 0;var p,u=h?parseInt(h.substr(1)):void 0;switch(d){case"s":p=n[o];break;case"c":p=n[o][0];break;case"f":p=parseFloat(n[o]).toFixed(s);break;case"p":p=parseFloat(n[o]).toPrecision(s);break;case"e":p=parseFloat(n[o]).toExponential(s);break;case"x":p=parseInt(n[o]).toString(u||16);break;case"d":p=parseFloat(parseInt(n[o],u||10).toPrecision(s)).toFixed(0)}p=typeof p=="object"?JSON.stringify(p):(+p).toString(u);for(var g=parseInt(l),m=l&&l[0]+""=="0"?"0":" ";p.length<g;)p=c!==void 0?p+m:m+p;return p}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,i)},t.getBytes=function(e,n){return bi.encode(e,n)},t.getCharCode=function(e,n){return n===void 0&&(n=0),e.charCodeAt(n)},t.getCharAt=function(e){return String.fromCharCode(e)},t.SHIFT_JIS=or.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=or.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=or.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t}(),Nt=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+=bn.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},t.prototype.appendChars=function(e,n,r){for(var o=n;n<n+r;o++)this.append(e[o]);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,n){this.value=this.value.substr(0,e)+n+this.value.substr(e+1)},t.prototype.substring=function(e,n){return this.value.substring(e,n)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(e,n){this.value=this.value.substr(0,e)+n+this.value.substr(e+n.length)},t}(),go=function(){function t(e,n,r,o){if(this.width=e,this.height=n,this.rowSize=r,this.bits=o,n==null&&(n=e),this.height=n,e<1||n<1)throw new Ke("Both dimensions must be greater than 0");r==null&&(r=Math.floor((e+31)/32)),this.rowSize=r,o==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var n=e.length,r=e[0].length,o=new t(r,n),i=0;i<n;i++)for(var a=e[i],s=0;s<r;s++)a[s]&&o.set(s,i);return o},t.parseFromString=function(e,n,r){if(e===null)throw new Ke("stringRepresentation cannot be null");for(var o=new Array(e.length),i=0,a=0,s=-1,c=0,l=0;l<e.length;)if(e.charAt(l)===`
|
|
138
|
-
`||e.charAt(l)==="\r"){if(i>a){if(s===-1)s=i-a;else if(i-a!==s)throw new Ke("row lengths do not match");a=i,c++}l++}else if(e.substring(l,l+n.length)===n)l+=n.length,o[i]=!0,i++;else{if(e.substring(l,l+r.length)!==r)throw new Ke("illegal character encountered: "+e.substring(l));l+=r.length,o[i]=!1,i++}if(i>a){if(s===-1)s=i-a;else if(i-a!==s)throw new Ke("row lengths do not match");c++}for(var f=new t(s,c),h=0;h<i;h++)o[h]&&f.set(Math.floor(h%s),Math.floor(h/s));return f},t.prototype.get=function(e,n){var r=n*this.rowSize+Math.floor(e/32);return(this.bits[r]>>>(31&e)&1)!=0},t.prototype.set=function(e,n){var r=n*this.rowSize+Math.floor(e/32);this.bits[r]|=1<<(31&e)&4294967295},t.prototype.unset=function(e,n){var r=n*this.rowSize+Math.floor(e/32);this.bits[r]&=~(1<<(31&e)&4294967295)},t.prototype.flip=function(e,n){var r=n*this.rowSize+Math.floor(e/32);this.bits[r]^=1<<(31&e)&4294967295},t.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new Ke("input matrix dimensions do not match");for(var n=new Jr(Math.floor(this.width/32)+1),r=this.rowSize,o=this.bits,i=0,a=this.height;i<a;i++)for(var s=i*r,c=e.getRow(i,n).getBitArray(),l=0;l<r;l++)o[s+l]^=c[l]},t.prototype.clear=function(){for(var e=this.bits,n=e.length,r=0;r<n;r++)e[r]=0},t.prototype.setRegion=function(e,n,r,o){if(n<0||e<0)throw new Ke("Left and top must be nonnegative");if(o<1||r<1)throw new Ke("Height and width must be at least 1");var i=e+r,a=n+o;if(a>this.height||i>this.width)throw new Ke("The region must fit inside the matrix");for(var s=this.rowSize,c=this.bits,l=n;l<a;l++)for(var f=l*s,h=e;h<i;h++)c[f+Math.floor(h/32)]|=1<<(31&h)&4294967295},t.prototype.getRow=function(e,n){n==null||n.getSize()<this.width?n=new Jr(this.width):n.clear();for(var r=this.rowSize,o=this.bits,i=e*r,a=0;a<r;a++)n.setBulk(32*a,o[i+a]);return n},t.prototype.setRow=function(e,n){Ut.arraycopy(n.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var e=this.getWidth(),n=this.getHeight(),r=new Jr(e),o=new Jr(e),i=0,a=Math.floor((n+1)/2);i<a;i++)r=this.getRow(i,r),o=this.getRow(n-1-i,o),r.reverse(),o.reverse(),this.setRow(i,o),this.setRow(n-1-i,r)},t.prototype.getEnclosingRectangle=function(){for(var e=this.width,n=this.height,r=this.rowSize,o=this.bits,i=e,a=n,s=-1,c=-1,l=0;l<n;l++)for(var f=0;f<r;f++){var h=o[l*r+f];if(h!==0){if(l<a&&(a=l),l>c&&(c=l),32*f<i){for(var d=0;!(h<<31-d&4294967295);)d++;32*f+d<i&&(i=32*f+d)}if(32*f+31>s){for(d=31;!(h>>>d);)d--;32*f+d>s&&(s=32*f+d)}}}return s<i||c<a?null:Int32Array.from([i,a,s-i+1,c-a+1])},t.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,n=this.bits,r=0;r<n.length&&n[r]===0;)r++;if(r===n.length)return null;for(var o=r/e,i=r%e*32,a=n[r],s=0;!(a<<31-s&4294967295);)s++;return i+=s,Int32Array.from([i,o])},t.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,n=this.bits,r=n.length-1;r>=0&&n[r]===0;)r--;if(r<0)return null;for(var o=Math.floor(r/e),i=32*Math.floor(r%e),a=n[r],s=31;!(a>>>s);)s--;return i+=s,Int32Array.from([i,o])},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 n=e;return this.width===n.width&&this.height===n.height&&this.rowSize===n.rowSize&&yr.equals(this.bits,n.bits)},t.prototype.hashCode=function(){var e=this.width;return e=31*(e=31*(e=31*(e=31*e+this.width)+this.height)+this.rowSize)+yr.hashCode(this.bits)},t.prototype.toString=function(e,n,r){return e===void 0&&(e="X "),n===void 0&&(n=" "),r===void 0&&(r=`
|
|
139
|
-
`),this.buildToString(e,n,r)},t.prototype.buildToString=function(e,n,r){for(var o=new Nt,i=0,a=this.height;i<a;i++){for(var s=0,c=this.width;s<c;s++)o.append(this.get(s,i)?e:n);o.append(r)}return o.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t}(),AT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return AT(e,t),e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e}(rr),ST=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),IT=function(t){function e(n){var r=t.call(this,n)||this;return r.luminances=e.EMPTY,r.buckets=new Int32Array(e.LUMINANCE_BUCKETS),r}return ST(e,t),e.prototype.getBlackRow=function(n,r){var o=this.getLuminanceSource(),i=o.getWidth();r==null||r.getSize()<i?r=new Jr(i):r.clear(),this.initArrays(i);for(var a=o.getRow(n,this.luminances),s=this.buckets,c=0;c<i;c++)s[(255&a[c])>>e.LUMINANCE_SHIFT]++;var l=e.estimateBlackPoint(s);if(i<3)for(c=0;c<i;c++)(255&a[c])<l&&r.set(c);else{var f=255&a[0],h=255&a[1];for(c=1;c<i-1;c++){var d=255&a[c+1];(4*h-f-d)/2<l&&r.set(c),f=h,h=d}}return r},e.prototype.getBlackMatrix=function(){var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight(),i=new go(r,o);this.initArrays(r);for(var a=this.buckets,s=1;s<5;s++)for(var c=Math.floor(o*s/5),l=n.getRow(c,this.luminances),f=Math.floor(4*r/5),h=Math.floor(r/5);h<f;h++)a[(255&l[h])>>e.LUMINANCE_SHIFT]++;var d=e.estimateBlackPoint(a),p=n.getMatrix();for(s=0;s<o;s++){var u=s*r;for(h=0;h<r;h++)(255&p[u+h])<d&&i.set(h,s)}return i},e.prototype.createBinarizer=function(n){return new e(n)},e.prototype.initArrays=function(n){this.luminances.length<n&&(this.luminances=new Uint8ClampedArray(n));for(var r=this.buckets,o=0;o<e.LUMINANCE_BUCKETS;o++)r[o]=0},e.estimateBlackPoint=function(n){for(var r=n.length,o=0,i=0,a=0,s=0;s<r;s++)n[s]>a&&(i=s,a=n[s]),n[s]>o&&(o=n[s]);var c=0,l=0;for(s=0;s<r;s++){var f=s-i;(u=n[s]*f*f)>l&&(c=s,l=u)}if(i>c){var h=i;i=c,c=h}if(c-i<=r/16)throw new ge;var d=c-1,p=-1;for(s=c-1;s>i;s--){var u,g=s-i;(u=g*g*(c-s)*(o-n[s]))>p&&(d=s,p=u)}return d<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e}(yT),TT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jy=function(t){function e(n){var r=t.call(this,n)||this;return r.matrix=null,r}return TT(e,t),e.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight();if(r>=e.MINIMUM_DIMENSION&&o>=e.MINIMUM_DIMENSION){var i=n.getMatrix(),a=r>>e.BLOCK_SIZE_POWER;r&e.BLOCK_SIZE_MASK&&a++;var s=o>>e.BLOCK_SIZE_POWER;o&e.BLOCK_SIZE_MASK&&s++;var c=e.calculateBlackPoints(i,a,s,r,o),l=new go(r,o);e.calculateThresholdForBlock(i,a,s,r,o,c,l),this.matrix=l}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(n){return new e(n)},e.calculateThresholdForBlock=function(n,r,o,i,a,s,c){for(var l=a-e.BLOCK_SIZE,f=i-e.BLOCK_SIZE,h=0;h<o;h++){var d=h<<e.BLOCK_SIZE_POWER;d>l&&(d=l);for(var p=e.cap(h,2,o-3),u=0;u<r;u++){var g=u<<e.BLOCK_SIZE_POWER;g>f&&(g=f);for(var m=e.cap(u,2,r-3),y=0,w=-2;w<=2;w++){var b=s[p+w];y+=b[m-2]+b[m-1]+b[m]+b[m+1]+b[m+2]}var E=y/25;e.thresholdBlock(n,g,d,E,i,c)}}},e.cap=function(n,r,o){return n<r?r:n>o?o:n},e.thresholdBlock=function(n,r,o,i,a,s){for(var c=0,l=o*a+r;c<e.BLOCK_SIZE;c++,l+=a)for(var f=0;f<e.BLOCK_SIZE;f++)(255&n[l+f])<=i&&s.set(r+f,o+c)},e.calculateBlackPoints=function(n,r,o,i,a){for(var s=a-e.BLOCK_SIZE,c=i-e.BLOCK_SIZE,l=new Array(o),f=0;f<o;f++){l[f]=new Int32Array(r);var h=f<<e.BLOCK_SIZE_POWER;h>s&&(h=s);for(var d=0;d<r;d++){var p=d<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var u=0,g=255,m=0,y=0,w=h*i+p;y<e.BLOCK_SIZE;y++,w+=i){for(var b=0;b<e.BLOCK_SIZE;b++){var E=255&n[w+b];u+=E,E<g&&(g=E),E>m&&(m=E)}if(m-g>e.MIN_DYNAMIC_RANGE)for(y++,w+=i;y<e.BLOCK_SIZE;y++,w+=i)for(b=0;b<e.BLOCK_SIZE;b++)u+=255&n[w+b]}var C=u>>2*e.BLOCK_SIZE_POWER;if(m-g<=e.MIN_DYNAMIC_RANGE&&(C=g/2,f>0&&d>0)){var S=(l[f-1][d]+2*l[f][d-1]+l[f-1][d-1])/4;g<S&&(C=S)}l[f][d]=C}}return l},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=5*e.BLOCK_SIZE,e.MIN_DYNAMIC_RANGE=24,e}(IT),Os=function(){function t(e,n){this.width=e,this.height=n}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,n,r,o){throw new Nu("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Nu("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Nu("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),n=new Nt,r=0;r<this.height;r++){for(var o=this.getRow(r,e),i=0;i<this.width;i++){var a=255&o[i],s=void 0;s=a<64?"#":a<128?"+":a<192?".":" ",n.append(s)}n.append(`
|
|
140
|
-
`)}return n.toString()},t}(),xT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ru=function(t){function e(n){var r=t.call(this,n.getWidth(),n.getHeight())||this;return r.delegate=n,r}return xT(e,t),e.prototype.getRow=function(n,r){for(var o=this.delegate.getRow(n,r),i=this.getWidth(),a=0;a<i;a++)o[a]=255-(255&o[a]);return o},e.prototype.getMatrix=function(){for(var n=this.delegate.getMatrix(),r=this.getWidth()*this.getHeight(),o=new Uint8ClampedArray(r),i=0;i<r;i++)o[i]=255-(255&n[i]);return o},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(n,r,o,i){return new e(this.delegate.crop(n,r,o,i))},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}(Os),OT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),PT=function(t){function e(n){var r=t.call(this,n.width,n.height)||this;return r.canvas=n,r.tempCanvasElement=null,r.buffer=e.makeBufferFromCanvasImageData(n),r}return OT(e,t),e.makeBufferFromCanvasImageData=function(n){var r=n.getContext("2d").getImageData(0,0,n.width,n.height);return e.toGrayscaleBuffer(r.data,n.width,n.height)},e.toGrayscaleBuffer=function(n,r,o){for(var i=new Uint8ClampedArray(r*o),a=0,s=0,c=n.length;a<c;a+=4,s++){var l=void 0;n[a+3]===0?l=255:l=306*n[a]+601*n[a+1]+117*n[a+2]+512>>10,i[s]=l}return i},e.prototype.getRow=function(n,r){if(n<0||n>=this.getHeight())throw new Ke("Requested row is outside the image: "+n);var o=this.getWidth(),i=n*o;return r===null?r=this.buffer.slice(i,i+o):(r.length<o&&(r=new Uint8ClampedArray(o)),r.set(this.buffer.slice(i,i+o))),r},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(n,r,o,i){return t.prototype.crop.call(this,n,r,o,i),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 n=this.canvas.ownerDocument.createElement("canvas");n.width=this.canvas.width,n.height=this.canvas.height,this.tempCanvasElement=n}return this.tempCanvasElement},e.prototype.rotate=function(n){var r=this.getTempCanvasElement(),o=r.getContext("2d"),i=n*e.DEGREE_TO_RADIANS,a=this.canvas.width,s=this.canvas.height,c=Math.ceil(Math.abs(Math.cos(i))*a+Math.abs(Math.sin(i))*s),l=Math.ceil(Math.abs(Math.sin(i))*a+Math.abs(Math.cos(i))*s);return r.width=c,r.height=l,o.translate(c/2,l/2),o.rotate(i),o.drawImage(this.canvas,a/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.prototype.invert=function(){return new Ru(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e}(Os),kT=function(){function t(e,n,r){this.deviceId=e,this.label=n,this.kind="videoinput",this.groupId=r||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t}(),Hn=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(l){try{c(r.next(l))}catch(f){i(f)}}function s(l){try{c(r.throw(l))}catch(f){i(f)}}function c(l){var f;l.done?o(l.value):(f=l.value,f instanceof n?f:new n(function(h){h(f)})).then(a,s)}c((r=r.apply(t,[])).next())})},Wn=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(f){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&f[0]?r.return:f[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,f[1])).done)return o;switch(r=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return a.label++,{value:f[1],done:!1};case 5:a.label++,r=f[1],f=[0];continue;case 7:f=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!((o=o.length>0&&o[o.length-1])||f[0]!==6&&f[0]!==2)){a=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){a.label=f[1];break}if(f[0]===6&&a.label<o[1]){a.label=o[1],o=f;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(f);break}o[2]&&a.ops.pop(),a.trys.pop();continue}f=e.call(t,a)}catch(h){f=[6,h],r=0}finally{n=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([c,l])}}},BT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ha=function(){function t(e,n,r){n===void 0&&(n=500),this.reader=e,this.timeBetweenScansMillis=n,this._hints=r,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 Hn(this,void 0,void 0,function(){var e,n,r,o,i,a,s,c,l,f,h,d;return Wn(this,function(p){switch(p.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=p.sent(),n=[];try{for(r=BT(e),o=r.next();!o.done;o=r.next())i=o.value,(a=i.kind==="video"?"videoinput":i.kind)==="videoinput"&&(s=i.deviceId||i.id,c=i.label||"Video device "+(n.length+1),l=i.groupId,f={deviceId:s,label:c,kind:a,groupId:l},n.push(f))}catch(u){h={error:u}}finally{try{o&&!o.done&&(d=r.return)&&d.call(r)}finally{if(h)throw h.error}}return[2,n]}})})},t.prototype.getVideoInputDevices=function(){return Hn(this,void 0,void 0,function(){return Wn(this,function(e){switch(e.label){case 0:return[4,this.listVideoInputDevices()];case 1:return[2,e.sent().map(function(n){return new kT(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return Hn(this,void 0,void 0,function(){var n;return Wn(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return(n=r.sent())?[2,n.find(function(o){return o.deviceId===e})]:[2,null]}})})},t.prototype.decodeFromInputVideoDevice=function(e,n){return Hn(this,void 0,void 0,function(){return Wn(this,function(r){switch(r.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,n)];case 1:return[2,r.sent()]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,n){return Hn(this,void 0,void 0,function(){var r;return Wn(this,function(o){switch(o.label){case 0:return this.reset(),r={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeOnceFromConstraints=function(e,n){return Hn(this,void 0,void 0,function(){var r;return Wn(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=o.sent(),[4,this.decodeOnceFromStream(r,n)];case 2:return[2,o.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,n){return Hn(this,void 0,void 0,function(){var r;return Wn(this,function(o){switch(o.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,n)];case 1:return r=o.sent(),[4,this.decodeOnce(r)];case 2:return[2,o.sent()]}})})},t.prototype.decodeFromInputVideoDeviceContinuously=function(e,n,r){return Hn(this,void 0,void 0,function(){return Wn(this,function(o){switch(o.label){case 0:return[4,this.decodeFromVideoDevice(e,n,r)];case 1:return[2,o.sent()]}})})},t.prototype.decodeFromVideoDevice=function(e,n,r){return Hn(this,void 0,void 0,function(){var o;return Wn(this,function(i){switch(i.label){case 0:return o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,n,r)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromConstraints=function(e,n,r){return Hn(this,void 0,void 0,function(){var o;return Wn(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return o=i.sent(),[4,this.decodeFromStream(o,n,r)];case 2:return[2,i.sent()]}})})},t.prototype.decodeFromStream=function(e,n,r){return Hn(this,void 0,void 0,function(){var o;return Wn(this,function(i){switch(i.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,n)];case 1:return o=i.sent(),[4,this.decodeContinuously(o,r)];case 2:return[2,i.sent()]}})})},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(e,n){return Hn(this,void 0,void 0,function(){var r;return Wn(this,function(o){switch(o.label){case 0:return r=this.prepareVideoElement(n),this.addVideoSource(r,e),this.videoElement=r,this.stream=e,[4,this.playVideoOnLoadAsync(r)];case 1:return o.sent(),[2,r]}})})},t.prototype.playVideoOnLoadAsync=function(e){var n=this;return new Promise(function(r,o){return n.playVideoOnLoad(e,function(){return r()})})},t.prototype.playVideoOnLoad=function(e,n){var r=this;this.videoEndedListener=function(){return r.stopStreams()},this.videoCanPlayListener=function(){return r.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",n),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 Hn(this,void 0,void 0,function(){return Wn(this,function(n){switch(n.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.play()];case 2:return n.sent(),[3,4];case 3:return n.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},t.prototype.getMediaElement=function(e,n){var r=document.getElementById(e);if(!r)throw new Zt("element with id '"+e+"' not found");if(r.nodeName.toLowerCase()!==n.toLowerCase())throw new Zt("element with id '"+e+"' must be an "+n+" element");return r},t.prototype.decodeFromImage=function(e,n){if(!e&&!n)throw new Zt("either imageElement with a src set or an url must be provided");return n&&!e?this.decodeFromImageUrl(n):this.decodeFromImageElement(e)},t.prototype.decodeFromVideo=function(e,n){if(!e&&!n)throw new Zt("Either an element with a src set or an URL must be provided");return n&&!e?this.decodeFromVideoUrl(n):this.decodeFromVideoElement(e)},t.prototype.decodeFromVideoContinuously=function(e,n,r){if(e===void 0&&n===void 0)throw new Zt("Either an element with a src set or an URL must be provided");return n&&!e?this.decodeFromVideoUrlContinuously(n,r):this.decodeFromVideoElementContinuously(e,r)},t.prototype.decodeFromImageElement=function(e){if(!e)throw new Zt("An image element must be provided.");this.reset();var n=this.prepareImageElement(e);return this.imageElement=n,this.isImageLoaded(n)?this.decodeOnce(n,!1,!0):this._decodeOnLoadImage(n)},t.prototype.decodeFromVideoElement=function(e){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(n)},t.prototype.decodeFromVideoElementContinuously=function(e,n){var r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(r,n)},t.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new Zt("A video element must be provided.");this.reset();var n=this.prepareVideoElement(e);return this.videoElement=n,n},t.prototype.decodeFromImageUrl=function(e){if(!e)throw new Zt("An URL must be provided.");this.reset();var n=this.prepareImageElement();this.imageElement=n;var r=this._decodeOnLoadImage(n);return n.src=e,r},t.prototype.decodeFromVideoUrl=function(e){if(!e)throw new Zt("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),r=this.decodeFromVideoElement(n);return n.src=e,r},t.prototype.decodeFromVideoUrlContinuously=function(e,n){if(!e)throw new Zt("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),o=this.decodeFromVideoElementContinuously(r,n);return r.src=e,o},t.prototype._decodeOnLoadImage=function(e){var n=this;return new Promise(function(r,o){n.imageLoadedListener=function(){return n.decodeOnce(e,!1,!0).then(r,o)},e.addEventListener("load",n.imageLoadedListener)})},t.prototype._decodeOnLoadVideo=function(e){return Hn(this,void 0,void 0,function(){return Wn(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),[4,this.decodeOnce(e)];case 2:return[2,n.sent()]}})})},t.prototype._decodeOnLoadVideoContinuously=function(e,n){return Hn(this,void 0,void 0,function(){return Wn(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return r.sent(),this.decodeContinuously(e,n),[2]}})})},t.prototype.isImageLoaded=function(e){return!!e.complete&&e.naturalWidth!==0},t.prototype.prepareImageElement=function(e){var n;return e===void 0&&((n=document.createElement("img")).width=200,n.height=200),typeof e=="string"&&(n=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(n=e),n},t.prototype.prepareVideoElement=function(e){var n;return e||typeof document>"u"||((n=document.createElement("video")).width=200,n.height=200),typeof e=="string"&&(n=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(n=e),n.setAttribute("autoplay","true"),n.setAttribute("muted","true"),n.setAttribute("playsinline","true"),n},t.prototype.decodeOnce=function(e,n,r){var o=this;n===void 0&&(n=!0),r===void 0&&(r=!0),this._stopAsyncDecode=!1;var i=function(a,s){if(o._stopAsyncDecode)return s(new ge("Video stream has ended before any code could be detected.")),void(o._stopAsyncDecode=void 0);try{a(o.decode(e))}catch(c){if(n&&c instanceof ge||(c instanceof pn||c instanceof Ie)&&r)return setTimeout(i,o._timeBetweenDecodingAttempts,a,s);s(c)}};return new Promise(function(a,s){return i(a,s)})},t.prototype.decodeContinuously=function(e,n){var r=this;this._stopContinuousDecode=!1;var o=function(){if(r._stopContinuousDecode)r._stopContinuousDecode=void 0;else try{var i=r.decode(e);n(i,null),setTimeout(o,r.timeBetweenScansMillis)}catch(a){n(null,a),(a instanceof pn||a instanceof Ie||a instanceof ge)&&setTimeout(o,r._timeBetweenDecodingAttempts)}};o()},t.prototype.decode=function(e){var n=this.createBinaryBitmap(e);return this.decodeBitmap(n)},t.prototype.createBinaryBitmap=function(e){var n=this.getCaptureCanvasContext(e);this.drawImageOnCanvas(n,e);var r=this.getCaptureCanvas(e),o=new PT(r),i=new jy(o);return new Ly(i)},t.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var n=this.getCaptureCanvas(e).getContext("2d");this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var n=this.createCaptureCanvas(e);this.captureCanvas=n}return this.captureCanvas},t.prototype.drawImageOnCanvas=function(e,n){e.drawImage(n,0,0)},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 n,r,o=document.createElement("canvas");return e!==void 0&&(e instanceof HTMLVideoElement?(n=e.videoWidth,r=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,r=e.naturalHeight||e.height)),o.style.width=n+"px",o.style.height=r+"px",o.width=n,o.height=r,o},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&&(this.videoEndedListener!==void 0&&this.videoElement.removeEventListener("ended",this.videoEndedListener),this.videoPlayingEventListener!==void 0&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),this.videoCanPlayListener!==void 0&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},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,n){try{e.srcObject=n}catch{e.src=URL.createObjectURL(n)}},t.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},t}(),ir=function(){function t(e,n,r,o,i,a){r===void 0&&(r=n==null?0:8*n.length),a===void 0&&(a=Ut.currentTimeMillis()),this.text=e,this.rawBytes=n,this.numBits=r,this.resultPoints=o,this.format=i,this.timestamp=a,this.text=e,this.rawBytes=n,this.numBits=r??(n==null?0:8*n.length),this.resultPoints=o,this.format=i,this.resultMetadata=null,this.timestamp=a??Ut.currentTimeMillis()}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,n){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(e,n)},t.prototype.putAllMetadata=function(e){e!==null&&(this.resultMetadata===null?this.resultMetadata=e:this.resultMetadata=new Map(e))},t.prototype.addResultPoints=function(e){var n=this.resultPoints;if(n===null)this.resultPoints=e;else if(e!==null&&e.length>0){var r=new Array(n.length+e.length);Ut.arraycopy(n,0,r,0,n.length),Ut.arraycopy(e,0,r,n.length,e.length),this.resultPoints=r}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t}();(function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(Xf||(Xf={}));var Qf,Ue=Xf;(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"})(Qf||(Qf={}));var Pn,kn=Qf,Du=function(){function t(e,n,r,o,i,a){i===void 0&&(i=-1),a===void 0&&(a=-1),this.rawBytes=e,this.text=n,this.byteSegments=r,this.ecLevel=o,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=a,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}(),Ps=function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new Ke;return this.logTable[e]},t.addOrSubtract=function(e,n){return e^n},t}(),ks=function(){function t(e,n){if(n.length===0)throw new Ke;this.field=e;var r=n.length;if(r>1&&n[0]===0){for(var o=1;o<r&&n[o]===0;)o++;o===r?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(r-o),Ut.arraycopy(n,o,this.coefficients,0,this.coefficients.length))}else this.coefficients=n}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 n,r=this.coefficients;if(e===1){n=0;for(var o=0,i=r.length;o!==i;o++){var a=r[o];n=Ps.addOrSubtract(n,a)}return n}n=r[0];var s=r.length,c=this.field;for(o=1;o<s;o++)n=Ps.addOrSubtract(c.multiply(e,n),r[o]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new Ke("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var n=this.coefficients,r=e.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;Ut.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=Ps.addOrSubtract(n[s-a],r[s]);return new t(this.field,i)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new Ke("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var n=this.coefficients,r=n.length,o=e.coefficients,i=o.length,a=new Int32Array(r+i-1),s=this.field,c=0;c<r;c++)for(var l=n[c],f=0;f<i;f++)a[c+f]=Ps.addOrSubtract(a[c+f],s.multiply(l,o[f]));return new t(s,a)},t.prototype.multiplyScalar=function(e){if(e===0)return this.field.getZero();if(e===1)return this;for(var n=this.coefficients.length,r=this.field,o=new Int32Array(n),i=this.coefficients,a=0;a<n;a++)o[a]=r.multiply(i[a],e);return new t(r,o)},t.prototype.multiplyByMonomial=function(e,n){if(e<0)throw new Ke;if(n===0)return this.field.getZero();for(var r=this.coefficients,o=r.length,i=new Int32Array(o+e),a=this.field,s=0;s<o;s++)i[s]=a.multiply(r[s],n);return new t(a,i)},t.prototype.divide=function(e){if(!this.field.equals(e.field))throw new Ke("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new Ke("Divide by 0");for(var n=this.field,r=n.getZero(),o=this,i=e.getCoefficient(e.getDegree()),a=n.inverse(i);o.getDegree()>=e.getDegree()&&!o.isZero();){var s=o.getDegree()-e.getDegree(),c=n.multiply(o.getCoefficient(o.getDegree()),a),l=e.multiplyByMonomial(s,c),f=n.buildMonomial(s,c);r=r.addOrSubtract(f),o=o.addOrSubtract(l)}return[r,o]},t.prototype.toString=function(){for(var e="",n=this.getDegree();n>=0;n--){var r=this.getCoefficient(n);if(r!==0){if(r<0?(e+=" - ",r=-r):e.length>0&&(e+=" + "),n===0||r!==1){var o=this.field.log(r);o===0?e+="1":o===1?e+="a":(e+="a^",e+=o)}n!==0&&(n===1?e+="x":(e+="x^",e+=n))}}return e},t}(),NT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vy=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return NT(e,t),e.kind="ArithmeticException",e}(rr),RT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ko=function(t){function e(n,r,o){var i=t.call(this)||this;i.primitive=n,i.size=r,i.generatorBase=o;for(var a=new Int32Array(r),s=1,c=0;c<r;c++)a[c]=s,(s*=2)>=r&&(s^=n,s&=r-1);i.expTable=a;var l=new Int32Array(r);for(c=0;c<r-1;c++)l[a[c]]=c;return i.logTable=l,i.zero=new ks(i,Int32Array.from([0])),i.one=new ks(i,Int32Array.from([1])),i}return RT(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(n,r){if(n<0)throw new Ke;if(r===0)return this.zero;var o=new Int32Array(n+1);return o[0]=r,new ks(this,o)},e.prototype.inverse=function(n){if(n===0)throw new Vy;return this.expTable[this.size-this.logTable[n]-1]},e.prototype.multiply=function(n,r){return n===0||r===0?0:this.expTable[(this.logTable[n]+this.logTable[r])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+On.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(n){return n===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}(Ps),DT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mu=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return DT(e,t),e.kind="ReedSolomonException",e}(rr),MT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bs=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return MT(e,t),e.kind="IllegalStateException",e}(rr),Lu=function(){function t(e){this.field=e}return t.prototype.decode=function(e,n){for(var r=this.field,o=new ks(r,e),i=new Int32Array(n),a=!0,s=0;s<n;s++){var c=o.evaluateAt(r.exp(s+r.getGeneratorBase()));i[i.length-1-s]=c,c!==0&&(a=!1)}if(!a){var l=new ks(r,i),f=this.runEuclideanAlgorithm(r.buildMonomial(n,1),l,n),h=f[0],d=f[1],p=this.findErrorLocations(h),u=this.findErrorMagnitudes(d,p);for(s=0;s<p.length;s++){var g=e.length-1-r.log(p[s]);if(g<0)throw new Mu("Bad error location");e[g]=Ko.addOrSubtract(e[g],u[s])}}},t.prototype.runEuclideanAlgorithm=function(e,n,r){if(e.getDegree()<n.getDegree()){var o=e;e=n,n=o}for(var i=this.field,a=e,s=n,c=i.getZero(),l=i.getOne();s.getDegree()>=(r/2|0);){var f=a,h=c;if(c=l,(a=s).isZero())throw new Mu("r_{i-1} was zero");s=f;for(var d=i.getZero(),p=a.getCoefficient(a.getDegree()),u=i.inverse(p);s.getDegree()>=a.getDegree()&&!s.isZero();){var g=s.getDegree()-a.getDegree(),m=i.multiply(s.getCoefficient(s.getDegree()),u);d=d.addOrSubtract(i.buildMonomial(g,m)),s=s.addOrSubtract(a.multiplyByMonomial(g,m))}if(l=d.multiply(c).addOrSubtract(h),s.getDegree()>=a.getDegree())throw new Bs("Division algorithm failed to reduce polynomial?")}var y=l.getCoefficient(0);if(y===0)throw new Mu("sigmaTilde(0) was zero");var w=i.inverse(y);return[l.multiplyScalar(w),s.multiplyScalar(w)]},t.prototype.findErrorLocations=function(e){var n=e.getDegree();if(n===1)return Int32Array.from([e.getCoefficient(1)]);for(var r=new Int32Array(n),o=0,i=this.field,a=1;a<i.getSize()&&o<n;a++)e.evaluateAt(a)===0&&(r[o]=i.inverse(a),o++);if(o!==n)throw new Mu("Error locator degree does not match number of roots");return r},t.prototype.findErrorMagnitudes=function(e,n){for(var r=n.length,o=new Int32Array(r),i=this.field,a=0;a<r;a++){for(var s=i.inverse(n[a]),c=1,l=0;l<r;l++)if(a!==l){var f=i.multiply(n[l],s),h=1&f?-2&f:1|f;c=i.multiply(c,h)}o[a]=i.multiply(e.evaluateAt(s),i.inverse(c)),i.getGeneratorBase()!==0&&(o[a]=i.multiply(o[a],s))}return o},t}();(function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"})(Pn||(Pn={}));var Uy=function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var n=e.getBits(),r=this.extractBits(n),o=this.correctBits(r),i=t.convertBoolArrayToByteArray(o),a=t.getEncodedData(o),s=new Du(i,a,null,null);return s.setNumBits(o.length),s},t.highLevelDecode=function(e){return this.getEncodedData(e)},t.getEncodedData=function(e){for(var n=e.length,r=Pn.UPPER,o=Pn.UPPER,i="",a=0;a<n;)if(o===Pn.BINARY){if(n-a<5)break;var s=t.readCode(e,a,5);if(a+=5,s===0){if(n-a<11)break;s=t.readCode(e,a,11)+31,a+=11}for(var c=0;c<s;c++){if(n-a<8){a=n;break}var l=t.readCode(e,a,8);i+=bn.castAsNonUtf8Char(l),a+=8}o=r}else{var f=o===Pn.DIGIT?4:5;if(n-a<f)break;l=t.readCode(e,a,f),a+=f;var h=t.getCharacter(o,l);h.startsWith("CTRL_")?(r=o,o=t.getTable(h.charAt(5)),h.charAt(6)==="L"&&(r=o)):(i+=h,o=r)}return i},t.getTable=function(e){switch(e){case"L":return Pn.LOWER;case"P":return Pn.PUNCT;case"M":return Pn.MIXED;case"D":return Pn.DIGIT;case"B":return Pn.BINARY;default:return Pn.UPPER}},t.getCharacter=function(e,n){switch(e){case Pn.UPPER:return t.UPPER_TABLE[n];case Pn.LOWER:return t.LOWER_TABLE[n];case Pn.MIXED:return t.MIXED_TABLE[n];case Pn.PUNCT:return t.PUNCT_TABLE[n];case Pn.DIGIT:return t.DIGIT_TABLE[n];default:throw new Bs("Bad table")}},t.prototype.correctBits=function(e){var n,r;this.ddata.getNbLayers()<=2?(r=6,n=Ko.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(r=8,n=Ko.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(r=10,n=Ko.AZTEC_DATA_10):(r=12,n=Ko.AZTEC_DATA_12);var o=this.ddata.getNbDatablocks(),i=e.length/r;if(i<o)throw new Ie;for(var a=e.length%r,s=new Int32Array(i),c=0;c<i;c++,a+=r)s[c]=t.readCode(e,a,r);try{new Lu(n).decode(s,i-o)}catch(g){throw new Ie(g)}var l=(1<<r)-1,f=0;for(c=0;c<o;c++){if((p=s[c])===0||p===l)throw new Ie;p!==1&&p!==l-1||f++}var h=new Array(o*r-f),d=0;for(c=0;c<o;c++){var p;if((p=s[c])===1||p===l-1)h.fill(p>1,d,d+r-1),d+=r-1;else for(var u=r-1;u>=0;--u)h[d++]=(p&1<<u)!=0}return h},t.prototype.extractBits=function(e){var n=this.ddata.isCompact(),r=this.ddata.getNbLayers(),o=(n?11:14)+4*r,i=new Int32Array(o),a=new Array(this.totalBitsInLayer(r,n));if(n)for(var s=0;s<i.length;s++)i[s]=s;else{var c=o+1+2*On.truncDivision(On.truncDivision(o,2)-1,15),l=o/2,f=On.truncDivision(c,2);for(s=0;s<l;s++){var h=s+On.truncDivision(s,15);i[l-s-1]=f-h-1,i[l+s]=f+h+1}}s=0;for(var d=0;s<r;s++){for(var p=4*(r-s)+(n?9:12),u=2*s,g=o-1-u,m=0;m<p;m++)for(var y=2*m,w=0;w<2;w++)a[d+y+w]=e.get(i[u+w],i[u+m]),a[d+2*p+y+w]=e.get(i[u+m],i[g-w]),a[d+4*p+y+w]=e.get(i[g-w],i[g-m]),a[d+6*p+y+w]=e.get(i[g-m],i[u+w]);d+=8*p}return a},t.readCode=function(e,n,r){for(var o=0,i=n;i<n+r;i++)o<<=1,e[i]&&(o|=1);return o},t.readByte=function(e,n){var r=e.length-n;return r>=8?t.readCode(e,n,8):t.readCode(e,n,r)<<8-r},t.convertBoolArrayToByteArray=function(e){for(var n=new Uint8Array((e.length+7)/8),r=0;r<n.length;r++)n[r]=t.readByte(e,8*r);return n},t.prototype.totalBitsInLayer=function(e,n){return((n?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"," ",`
|
|
141
|
-
`,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r",`\r
|
|
142
|
-
`,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t}(),wt=function(){function t(){}return t.round=function(e){return e===NaN?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,n,r,o){var i=e-r,a=n-o;return Math.sqrt(i*i+a*a)},t.sum=function(e){for(var n=0,r=0,o=e.length;r!==o;r++)n+=e[r];return n},t}(),Jf=function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t}(),Me=function(){function t(e,n){this.x=e,this.y=n}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 n=e;return this.x===n.x&&this.y===n.y}return!1},t.prototype.hashCode=function(){return 31*Jf.floatToIntBits(this.x)+Jf.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(e){var n,r,o,i=this.distance(e[0],e[1]),a=this.distance(e[1],e[2]),s=this.distance(e[0],e[2]);if(a>=i&&a>=s?(r=e[0],n=e[1],o=e[2]):s>=a&&s>=i?(r=e[1],n=e[0],o=e[2]):(r=e[2],n=e[0],o=e[1]),this.crossProductZ(n,r,o)<0){var c=n;n=o,o=c}e[0]=n,e[1]=r,e[2]=o},t.distance=function(e,n){return wt.distance(e.x,e.y,n.x,n.y)},t.crossProductZ=function(e,n,r){var o=n.x,i=n.y;return(r.x-o)*(e.y-i)-(r.y-i)*(e.x-o)},t}(),Zf=function(){function t(e,n){this.bits=e,this.points=n}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),LT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),FT=function(t){function e(n,r,o,i,a){var s=t.call(this,n,r)||this;return s.compact=o,s.nbDatablocks=i,s.nbLayers=a,s}return LT(e,t),e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e}(Zf),eh=function(){function t(e,n,r,o){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),n==null&&(n=t.INIT_SIZE),r==null&&(r=e.getWidth()/2|0),o==null&&(o=e.getHeight()/2|0);var i=n/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=o-i,this.downInit=o+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new ge}return t.prototype.detect=function(){for(var e=this.leftInit,n=this.rightInit,r=this.upInit,o=this.downInit,i=!1,a=!0,s=!1,c=!1,l=!1,f=!1,h=!1,d=this.width,p=this.height;a;){a=!1;for(var u=!0;(u||!c)&&n<d;)(u=this.containsBlackPoint(r,o,n,!1))?(n++,a=!0,c=!0):c||n++;if(n>=d){i=!0;break}for(var g=!0;(g||!l)&&o<p;)(g=this.containsBlackPoint(e,n,o,!0))?(o++,a=!0,l=!0):l||o++;if(o>=p){i=!0;break}for(var m=!0;(m||!f)&&e>=0;)(m=this.containsBlackPoint(r,o,e,!1))?(e--,a=!0,f=!0):f||e--;if(e<0){i=!0;break}for(var y=!0;(y||!h)&&r>=0;)(y=this.containsBlackPoint(e,n,r,!0))?(r--,a=!0,h=!0):h||r--;if(r<0){i=!0;break}a&&(s=!0)}if(!i&&s){for(var w=n-e,b=null,E=1;b===null&&E<w;E++)b=this.getBlackPointOnSegment(e,o-E,e+E,o);if(b==null)throw new ge;var C=null;for(E=1;C===null&&E<w;E++)C=this.getBlackPointOnSegment(e,r+E,e+E,r);if(C==null)throw new ge;var S=null;for(E=1;S===null&&E<w;E++)S=this.getBlackPointOnSegment(n,r+E,n-E,r);if(S==null)throw new ge;var T=null;for(E=1;T===null&&E<w;E++)T=this.getBlackPointOnSegment(n,o-E,n-E,o);if(T==null)throw new ge;return this.centerEdges(T,b,S,C)}throw new ge},t.prototype.getBlackPointOnSegment=function(e,n,r,o){for(var i=wt.round(wt.distance(e,n,r,o)),a=(r-e)/i,s=(o-n)/i,c=this.image,l=0;l<i;l++){var f=wt.round(e+l*a),h=wt.round(n+l*s);if(c.get(f,h))return new Me(f,h)}return null},t.prototype.centerEdges=function(e,n,r,o){var i=e.getX(),a=e.getY(),s=n.getX(),c=n.getY(),l=r.getX(),f=r.getY(),h=o.getX(),d=o.getY(),p=t.CORR;return i<this.width/2?[new Me(h-p,d+p),new Me(s+p,c+p),new Me(l-p,f-p),new Me(i+p,a-p)]:[new Me(h+p,d+p),new Me(s+p,c-p),new Me(l-p,f+p),new Me(i-p,a-p)]},t.prototype.containsBlackPoint=function(e,n,r,o){var i=this.image;if(o){for(var a=e;a<=n;a++)if(i.get(a,r))return!0}else for(var s=e;s<=n;s++)if(i.get(r,s))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t}(),Gy=function(){function t(){}return t.checkAndNudgePoints=function(e,n){for(var r=e.getWidth(),o=e.getHeight(),i=!0,a=0;a<n.length&&i;a+=2){var s=Math.floor(n[a]),c=Math.floor(n[a+1]);if(s<-1||s>r||c<-1||c>o)throw new ge;i=!1,s===-1?(n[a]=0,i=!0):s===r&&(n[a]=r-1,i=!0),c===-1?(n[a+1]=0,i=!0):c===o&&(n[a+1]=o-1,i=!0)}for(i=!0,a=n.length-2;a>=0&&i;a-=2){if(s=Math.floor(n[a]),c=Math.floor(n[a+1]),s<-1||s>r||c<-1||c>o)throw new ge;i=!1,s===-1?(n[a]=0,i=!0):s===r&&(n[a]=r-1,i=!0),c===-1?(n[a+1]=0,i=!0):c===o&&(n[a+1]=o-1,i=!0)}},t}(),qy=function(){function t(e,n,r,o,i,a,s,c,l){this.a11=e,this.a21=n,this.a31=r,this.a12=o,this.a22=i,this.a32=a,this.a13=s,this.a23=c,this.a33=l}return t.quadrilateralToQuadrilateral=function(e,n,r,o,i,a,s,c,l,f,h,d,p,u,g,m){var y=t.quadrilateralToSquare(e,n,r,o,i,a,s,c);return t.squareToQuadrilateral(l,f,h,d,p,u,g,m).times(y)},t.prototype.transformPoints=function(e){for(var n=e.length,r=this.a11,o=this.a12,i=this.a13,a=this.a21,s=this.a22,c=this.a23,l=this.a31,f=this.a32,h=this.a33,d=0;d<n;d+=2){var p=e[d],u=e[d+1],g=i*p+c*u+h;e[d]=(r*p+a*u+l)/g,e[d+1]=(o*p+s*u+f)/g}},t.prototype.transformPointsWithValues=function(e,n){for(var r=this.a11,o=this.a12,i=this.a13,a=this.a21,s=this.a22,c=this.a23,l=this.a31,f=this.a32,h=this.a33,d=e.length,p=0;p<d;p++){var u=e[p],g=n[p],m=i*u+c*g+h;e[p]=(r*u+a*g+l)/m,n[p]=(o*u+s*g+f)/m}},t.squareToQuadrilateral=function(e,n,r,o,i,a,s,c){var l=e-r+i-s,f=n-o+a-c;if(l===0&&f===0)return new t(r-e,i-r,e,o-n,a-o,n,0,0,1);var h=r-i,d=s-i,p=o-a,u=c-a,g=h*u-d*p,m=(l*u-d*f)/g,y=(h*f-l*p)/g;return new t(r-e+m*r,s-e+y*s,e,o-n+m*o,c-n+y*c,n,m,y,1)},t.quadrilateralToSquare=function(e,n,r,o,i,a,s,c){return t.squareToQuadrilateral(e,n,r,o,i,a,s,c).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}(),jT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),VT=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return jT(e,t),e.prototype.sampleGrid=function(n,r,o,i,a,s,c,l,f,h,d,p,u,g,m,y,w,b,E){var C=qy.quadrilateralToQuadrilateral(i,a,s,c,l,f,h,d,p,u,g,m,y,w,b,E);return this.sampleGridWithTransform(n,r,o,C)},e.prototype.sampleGridWithTransform=function(n,r,o,i){if(r<=0||o<=0)throw new ge;for(var a=new go(r,o),s=new Float32Array(2*r),c=0;c<o;c++){for(var l=s.length,f=c+.5,h=0;h<l;h+=2)s[h]=h/2+.5,s[h+1]=f;i.transformPoints(s),Gy.checkAndNudgePoints(n,s);try{for(h=0;h<l;h+=2)n.get(Math.floor(s[h]),Math.floor(s[h+1]))&&a.set(h/2,c)}catch{throw new ge}}return a},e}(Gy),th=function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new VT,t}(),ar=function(){function t(e,n){this.x=e,this.y=n}return t.prototype.toResultPoint=function(){return new Me(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t}(),UT=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 n=this.getMatrixCenter(),r=this.getBullsEyeCorners(n);if(e){var o=r[0];r[0]=r[2],r[2]=o}this.extractParameters(r);var i=this.sampleGrid(this.image,r[this.shift%4],r[(this.shift+1)%4],r[(this.shift+2)%4],r[(this.shift+3)%4]),a=this.getMatrixCornerPoints(r);return new FT(i,a,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 ge;var n=2*this.nbCenterLayers,r=new Int32Array([this.sampleLine(e[0],e[1],n),this.sampleLine(e[1],e[2],n),this.sampleLine(e[2],e[3],n),this.sampleLine(e[3],e[0],n)]);this.shift=this.getRotation(r,n);for(var o=0,i=0;i<4;i++){var a=r[(this.shift+i)%4];this.compact?(o<<=7,o+=a>>1&127):(o<<=10,o+=(a>>2&992)+(a>>1&31))}var s=this.getCorrectedParameterData(o,this.compact);this.compact?(this.nbLayers=1+(s>>6),this.nbDataBlocks=1+(63&s)):(this.nbLayers=1+(s>>11),this.nbDataBlocks=1+(2047&s))},t.prototype.getRotation=function(e,n){var r=0;e.forEach(function(i,a,s){r=(r<<3)+((i>>n-2<<1)+(1&i))}),r=((1&r)<<11)+(r>>1);for(var o=0;o<4;o++)if(On.bitCount(r^this.EXPECTED_CORNER_BITS[o])<=2)return o;throw new ge},t.prototype.getCorrectedParameterData=function(e,n){var r,o;n?(r=7,o=2):(r=10,o=4);for(var i=r-o,a=new Int32Array(r),s=r-1;s>=0;--s)a[s]=15&e,e>>=4;try{new Lu(Ko.AZTEC_PARAM).decode(a,i)}catch{throw new ge}var c=0;for(s=0;s<o;s++)c=(c<<4)+a[s];return c},t.prototype.getBullsEyeCorners=function(e){var n=e,r=e,o=e,i=e,a=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(n,a,1,-1),c=this.getFirstDifferent(r,a,1,1),l=this.getFirstDifferent(o,a,-1,1),f=this.getFirstDifferent(i,a,-1,-1);if(this.nbCenterLayers>2){var h=this.distancePoint(f,s)*this.nbCenterLayers/(this.distancePoint(i,n)*(this.nbCenterLayers+2));if(h<.75||h>1.25||!this.isWhiteOrBlackRectangle(s,c,l,f))break}n=s,r=c,o=l,i=f,a=!a}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new ge;this.compact=this.nbCenterLayers===5;var d=new Me(n.getX()+.5,n.getY()-.5),p=new Me(r.getX()+.5,r.getY()+.5),u=new Me(o.getX()-.5,o.getY()+.5),g=new Me(i.getX()-.5,i.getY()-.5);return this.expandSquare([d,p,u,g],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var e,n,r,o;try{e=(l=new eh(this.image).detect())[0],n=l[1],r=l[2],o=l[3]}catch{var i=this.image.getWidth()/2,a=this.image.getHeight()/2;e=this.getFirstDifferent(new ar(i+7,a-7),!1,1,-1).toResultPoint(),n=this.getFirstDifferent(new ar(i+7,a+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ar(i-7,a+7),!1,-1,1).toResultPoint(),o=this.getFirstDifferent(new ar(i-7,a-7),!1,-1,-1).toResultPoint()}var s=wt.round((e.getX()+o.getX()+n.getX()+r.getX())/4),c=wt.round((e.getY()+o.getY()+n.getY()+r.getY())/4);try{var l;e=(l=new eh(this.image,15,s,c).detect())[0],n=l[1],r=l[2],o=l[3]}catch{e=this.getFirstDifferent(new ar(s+7,c-7),!1,1,-1).toResultPoint(),n=this.getFirstDifferent(new ar(s+7,c+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new ar(s-7,c+7),!1,-1,1).toResultPoint(),o=this.getFirstDifferent(new ar(s-7,c-7),!1,-1,-1).toResultPoint()}return s=wt.round((e.getX()+o.getX()+n.getX()+r.getX())/4),c=wt.round((e.getY()+o.getY()+n.getY()+r.getY())/4),new ar(s,c)},t.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(e,n,r,o,i){var a=th.getInstance(),s=this.getDimension(),c=s/2-this.nbCenterLayers,l=s/2+this.nbCenterLayers;return a.sampleGrid(e,s,s,c,c,l,c,l,l,c,l,n.getX(),n.getY(),r.getX(),r.getY(),o.getX(),o.getY(),i.getX(),i.getY())},t.prototype.sampleLine=function(e,n,r){for(var o=0,i=this.distanceResultPoint(e,n),a=i/r,s=e.getX(),c=e.getY(),l=a*(n.getX()-e.getX())/i,f=a*(n.getY()-e.getY())/i,h=0;h<r;h++)this.image.get(wt.round(s+h*l),wt.round(c+h*f))&&(o|=1<<r-h-1);return o},t.prototype.isWhiteOrBlackRectangle=function(e,n,r,o){e=new ar(e.getX()-3,e.getY()+3),n=new ar(n.getX()-3,n.getY()-3),r=new ar(r.getX()+3,r.getY()-3),o=new ar(o.getX()+3,o.getY()+3);var i=this.getColor(o,e);if(i===0)return!1;var a=this.getColor(e,n);return a===i&&(a=this.getColor(n,r))===i&&(a=this.getColor(r,o))===i},t.prototype.getColor=function(e,n){for(var r=this.distancePoint(e,n),o=(n.getX()-e.getX())/r,i=(n.getY()-e.getY())/r,a=0,s=e.getX(),c=e.getY(),l=this.image.get(e.getX(),e.getY()),f=Math.ceil(r),h=0;h<f;h++)s+=o,c+=i,this.image.get(wt.round(s),wt.round(c))!==l&&a++;var d=a/r;return d>.1&&d<.9?0:d<=.1===l?1:-1},t.prototype.getFirstDifferent=function(e,n,r,o){for(var i=e.getX()+r,a=e.getY()+o;this.isValid(i,a)&&this.image.get(i,a)===n;)i+=r,a+=o;for(i-=r,a-=o;this.isValid(i,a)&&this.image.get(i,a)===n;)i+=r;for(i-=r;this.isValid(i,a)&&this.image.get(i,a)===n;)a+=o;return new ar(i,a-=o)},t.prototype.expandSquare=function(e,n,r){var o=r/(2*n),i=e[0].getX()-e[2].getX(),a=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,c=(e[0].getY()+e[2].getY())/2,l=new Me(s+o*i,c+o*a),f=new Me(s-o*i,c-o*a);return i=e[1].getX()-e[3].getX(),a=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,c=(e[1].getY()+e[3].getY())/2,[l,new Me(s+o*i,c+o*a),f,new Me(s-o*i,c-o*a)]},t.prototype.isValid=function(e,n){return e>=0&&e<this.image.getWidth()&&n>0&&n<this.image.getHeight()},t.prototype.isValidPoint=function(e){var n=wt.round(e.getX()),r=wt.round(e.getY());return this.isValid(n,r)},t.prototype.distancePoint=function(e,n){return wt.distance(e.getX(),e.getY(),n.getX(),n.getY())},t.prototype.distanceResultPoint=function(e,n){return wt.distance(e.getX(),e.getY(),n.getX(),n.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(On.truncDivision(this.nbLayers-4,8)+1)+15},t}(),Fu=function(){function t(){}return t.prototype.decode=function(e,n){n===void 0&&(n=null);var r=null,o=new UT(e.getBlackMatrix()),i=null,a=null;try{i=(s=o.detectMirror(!1)).getPoints(),this.reportFoundResultPoints(n,i),a=new Uy().decode(s)}catch(h){r=h}if(a==null)try{var s;i=(s=o.detectMirror(!0)).getPoints(),this.reportFoundResultPoints(n,i),a=new Uy().decode(s)}catch(h){throw r??h}var c=new ir(a.getText(),a.getRawBytes(),a.getNumBits(),i,Ue.AZTEC,Ut.currentTimeMillis()),l=a.getByteSegments();l!=null&&c.putMetadata(kn.BYTE_SEGMENTS,l);var f=a.getECLevel();return f!=null&&c.putMetadata(kn.ERROR_CORRECTION_LEVEL,f),c},t.prototype.reportFoundResultPoints=function(e,n){if(e!=null){var r=e.get(Ft.NEED_RESULT_POINT_CALLBACK);r!=null&&n.forEach(function(o,i,a){r.foundPossibleResultPoint(o)})}},t.prototype.reset=function(){},t}(),GT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n){return n===void 0&&(n=500),t.call(this,new Fu,n)||this}GT(e,t)})(ha);var Bn=function(){function t(){}return t.prototype.decode=function(e,n){try{return this.doDecode(e,n)}catch{if(n&&n.get(Ft.TRY_HARDER)===!0&&e.isRotateSupported()){var r=e.rotateCounterClockwise(),o=this.doDecode(r,n),i=o.getResultMetadata(),a=270;i!==null&&i.get(kn.ORIENTATION)===!0&&(a+=i.get(kn.ORIENTATION)%360),o.putMetadata(kn.ORIENTATION,a);var s=o.getResultPoints();if(s!==null)for(var c=r.getHeight(),l=0;l<s.length;l++)s[l]=new Me(c-s[l].getY()-1,s[l].getX());return o}throw new ge}},t.prototype.reset=function(){},t.prototype.doDecode=function(e,n){var r,o=e.getWidth(),i=e.getHeight(),a=new Jr(o),s=n&&n.get(Ft.TRY_HARDER)===!0,c=Math.max(1,i>>(s?8:5));r=s?i:15;for(var l=Math.trunc(i/2),f=0;f<r;f++){var h=Math.trunc((f+1)/2),d=l+c*(1&f?-h:h);if(d<0||d>=i)break;try{a=e.getBlackRow(d,a)}catch{continue}for(var p=function(y){if(y===1&&(a.reverse(),n&&n.get(Ft.NEED_RESULT_POINT_CALLBACK)===!0)){var w=new Map;n.forEach(function(C,S){return w.set(S,C)}),w.delete(Ft.NEED_RESULT_POINT_CALLBACK),n=w}try{var b=u.decodeRow(d,a,n);if(y===1){b.putMetadata(kn.ORIENTATION,180);var E=b.getResultPoints();E!==null&&(E[0]=new Me(o-E[0].getX()-1,E[0].getY()),E[1]=new Me(o-E[1].getX()-1,E[1].getY()))}return{value:b}}catch{}},u=this,g=0;g<2;g++){var m=p(g);if(typeof m=="object")return m.value}}throw new ge},t.recordPattern=function(e,n,r){for(var o=r.length,i=0;i<o;i++)r[i]=0;var a=e.getSize();if(n>=a)throw new ge;for(var s=!e.get(n),c=0,l=n;l<a;){if(e.get(l)!==s)r[c]++;else{if(++c===o)break;r[c]=1,s=!s}l++}if(c!==o&&(c!==o-1||l!==a))throw new ge},t.recordPatternInReverse=function(e,n,r){for(var o=r.length,i=e.get(n);n>0&&o>=0;)e.get(--n)!==i&&(o--,i=!i);if(o>=0)throw new ge;t.recordPattern(e,n+1,r)},t.patternMatchVariance=function(e,n,r){for(var o=e.length,i=0,a=0,s=0;s<o;s++)i+=e[s],a+=n[s];if(i<a)return Number.POSITIVE_INFINITY;var c=i/a;r*=c;for(var l=0,f=0;f<o;f++){var h=e[f],d=n[f]*c,p=h>d?h-d:d-h;if(p>r)return Number.POSITIVE_INFINITY;l+=p}return l/i},t}(),qT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hy=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return qT(e,t),e.findStartPattern=function(n){for(var r=n.getSize(),o=n.getNextSet(0),i=0,a=Int32Array.from([0,0,0,0,0,0]),s=o,c=!1,l=o;l<r;l++)if(n.get(l)!==c)a[i]++;else{if(i===5){for(var f=e.MAX_AVG_VARIANCE,h=-1,d=e.CODE_START_A;d<=e.CODE_START_C;d++){var p=Bn.patternMatchVariance(a,e.CODE_PATTERNS[d],e.MAX_INDIVIDUAL_VARIANCE);p<f&&(f=p,h=d)}if(h>=0&&n.isRange(Math.max(0,s-(l-s)/2),s,!1))return Int32Array.from([s,l,h]);s+=a[0]+a[1],(a=a.slice(2,a.length-1))[i-1]=0,a[i]=0,i--}else i++;a[i]=1,c=!c}throw new ge},e.decodeCode=function(n,r,o){Bn.recordPattern(n,o,r);for(var i=e.MAX_AVG_VARIANCE,a=-1,s=0;s<e.CODE_PATTERNS.length;s++){var c=e.CODE_PATTERNS[s],l=this.patternMatchVariance(r,c,e.MAX_INDIVIDUAL_VARIANCE);l<i&&(i=l,a=s)}if(a>=0)return a;throw new ge},e.prototype.decodeRow=function(n,r,o){var i,a=o&&o.get(Ft.ASSUME_GS1)===!0,s=e.findStartPattern(r),c=s[2],l=0,f=new Uint8Array(20);switch(f[l++]=c,c){case e.CODE_START_A:i=e.CODE_CODE_A;break;case e.CODE_START_B:i=e.CODE_CODE_B;break;case e.CODE_START_C:i=e.CODE_CODE_C;break;default:throw new Ie}for(var h=!1,d=!1,p="",u=s[0],g=s[1],m=Int32Array.from([0,0,0,0,0,0]),y=0,w=0,b=c,E=0,C=!0,S=!1,T=!1;!h;){var P=d;switch(d=!1,y=w,w=e.decodeCode(r,m,g),f[l++]=w,w!==e.CODE_STOP&&(C=!0),w!==e.CODE_STOP&&(b+=++E*w),u=g,g+=m.reduce(function(z,te){return z+te},0),w){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new Ie}switch(i){case e.CODE_CODE_A:if(w<64)p+=T===S?String.fromCharCode(32+w):String.fromCharCode(32+w+128),T=!1;else if(w<96)p+=T===S?String.fromCharCode(w-64):String.fromCharCode(w+64),T=!1;else switch(w!==e.CODE_STOP&&(C=!1),w){case e.CODE_FNC_1:a&&(p.length===0?p+="]C1":p+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!S&&T?(S=!0,T=!1):S&&T?(S=!1,T=!1):T=!0;break;case e.CODE_SHIFT:d=!0,i=e.CODE_CODE_B;break;case e.CODE_CODE_B:i=e.CODE_CODE_B;break;case e.CODE_CODE_C:i=e.CODE_CODE_C;break;case e.CODE_STOP:h=!0}break;case e.CODE_CODE_B:if(w<96)p+=T===S?String.fromCharCode(32+w):String.fromCharCode(32+w+128),T=!1;else switch(w!==e.CODE_STOP&&(C=!1),w){case e.CODE_FNC_1:a&&(p.length===0?p+="]C1":p+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!S&&T?(S=!0,T=!1):S&&T?(S=!1,T=!1):T=!0;break;case e.CODE_SHIFT:d=!0,i=e.CODE_CODE_A;break;case e.CODE_CODE_A:i=e.CODE_CODE_A;break;case e.CODE_CODE_C:i=e.CODE_CODE_C;break;case e.CODE_STOP:h=!0}break;case e.CODE_CODE_C:if(w<100)w<10&&(p+="0"),p+=w;else switch(w!==e.CODE_STOP&&(C=!1),w){case e.CODE_FNC_1:a&&(p.length===0?p+="]C1":p+="");break;case e.CODE_CODE_A:i=e.CODE_CODE_A;break;case e.CODE_CODE_B:i=e.CODE_CODE_B;break;case e.CODE_STOP:h=!0}}P&&(i=i===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var N=g-u;if(g=r.getNextUnset(g),!r.isRange(g,Math.min(r.getSize(),g+(g-u)/2),!1))throw new ge;if((b-=E*y)%103!==y)throw new pn;var L=p.length;if(L===0)throw new ge;L>0&&C&&(p=i===e.CODE_CODE_C?p.substring(0,L-2):p.substring(0,L-1));for(var U=(s[1]+s[0])/2,j=u+N/2,K=f.length,G=new Uint8Array(K),k=0;k<K;k++)G[k]=f[k];var V=[new Me(U,n),new Me(j,n)];return new ir(p,G,0,V,Ue.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}(Bn),HT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nh=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wy=function(t){function e(n,r){n===void 0&&(n=!1),r===void 0&&(r=!1);var o=t.call(this)||this;return o.usingCheckDigit=n,o.extendedMode=r,o.decodeRowResult="",o.counters=new Int32Array(9),o}return HT(e,t),e.prototype.decodeRow=function(n,r,o){var i,a,s,c,l=this.counters;l.fill(0),this.decodeRowResult="";var f,h,d=e.findAsteriskPattern(r,l),p=r.getNextSet(d[1]),u=r.getSize();do{e.recordPattern(r,p,l);var g=e.toNarrowWidePattern(l);if(g<0)throw new ge;f=e.patternToChar(g),this.decodeRowResult+=f,h=p;try{for(var m=(i=void 0,nh(l)),y=m.next();!y.done;y=m.next())p+=y.value}catch(U){i={error:U}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}p=r.getNextSet(p)}while(f!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var w,b=0;try{for(var E=nh(l),C=E.next();!C.done;C=E.next())b+=C.value}catch(U){s={error:U}}finally{try{C&&!C.done&&(c=E.return)&&c.call(E)}finally{if(s)throw s.error}}if(p!==u&&2*(p-h-b)<b)throw new ge;if(this.usingCheckDigit){for(var S=this.decodeRowResult.length-1,T=0,P=0;P<S;P++)T+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(P));if(this.decodeRowResult.charAt(S)!==e.ALPHABET_STRING.charAt(T%43))throw new pn;this.decodeRowResult=this.decodeRowResult.substring(0,S)}if(this.decodeRowResult.length===0)throw new ge;w=this.extendedMode?e.decodeExtended(this.decodeRowResult):this.decodeRowResult;var N=(d[1]+d[0])/2,L=h+b/2;return new ir(w,null,0,[new Me(N,n),new Me(L,n)],Ue.CODE_39,new Date().getTime())},e.findAsteriskPattern=function(n,r){for(var o=n.getSize(),i=n.getNextSet(0),a=0,s=i,c=!1,l=r.length,f=i;f<o;f++)if(n.get(f)!==c)r[a]++;else{if(a===l-1){if(this.toNarrowWidePattern(r)===e.ASTERISK_ENCODING&&n.isRange(Math.max(0,s-Math.floor((f-s)/2)),s,!1))return[s,f];s+=r[0]+r[1],r.copyWithin(0,2,2+a-1),r[a-1]=0,r[a]=0,a--}else a++;r[a]=1,c=!c}throw new ge},e.toNarrowWidePattern=function(n){var r,o,i,a=n.length,s=0;do{var c=2147483647;try{for(var l=(r=void 0,nh(n)),f=l.next();!f.done;f=l.next())(u=f.value)<c&&u>s&&(c=u)}catch(g){r={error:g}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}s=c,i=0;for(var h=0,d=0,p=0;p<a;p++)(u=n[p])>s&&(d|=1<<a-1-p,i++,h+=u);if(i===3){for(p=0;p<a&&i>0;p++){var u;if((u=n[p])>s&&(i--,2*u>=h))return-1}return d}}while(i>3);return-1},e.patternToChar=function(n){for(var r=0;r<e.CHARACTER_ENCODINGS.length;r++)if(e.CHARACTER_ENCODINGS[r]===n)return e.ALPHABET_STRING.charAt(r);if(n===e.ASTERISK_ENCODING)return"*";throw new ge},e.decodeExtended=function(n){for(var r=n.length,o="",i=0;i<r;i++){var a=n.charAt(i);if(a==="+"||a==="$"||a==="%"||a==="/"){var s=n.charAt(i+1),c="\0";switch(a){case"+":if(!(s>="A"&&s<="Z"))throw new Ie;c=String.fromCharCode(s.charCodeAt(0)+32);break;case"$":if(!(s>="A"&&s<="Z"))throw new Ie;c=String.fromCharCode(s.charCodeAt(0)-64);break;case"%":if(s>="A"&&s<="E")c=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")c=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")c=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")c="\0";else if(s==="V")c="@";else if(s==="W")c="`";else{if(s!=="X"&&s!=="Y"&&s!=="Z")throw new Ie;c=""}break;case"/":if(s>="A"&&s<="O")c=String.fromCharCode(s.charCodeAt(0)-32);else{if(s!=="Z")throw new Ie;c=":"}}o+=c,i++}else o+=a}return o},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}(Bn),WT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),YT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yy=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.narrowLineWidth=-1,n}return WT(e,t),e.prototype.decodeRow=function(n,r,o){var i,a,s=this.decodeStart(r),c=this.decodeEnd(r),l=new Nt;e.decodeMiddle(r,s[1],c[0],l);var f=l.toString(),h=null;o!=null&&(h=o.get(Ft.ALLOWED_LENGTHS)),h==null&&(h=e.DEFAULT_ALLOWED_LENGTHS);var d=f.length,p=!1,u=0;try{for(var g=YT(h),m=g.next();!m.done;m=g.next()){var y=m.value;if(d===y){p=!0;break}y>u&&(u=y)}}catch(b){i={error:b}}finally{try{m&&!m.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}if(!p&&d>u&&(p=!0),!p)throw new Ie;var w=[new Me(s[1],n),new Me(c[0],n)];return new ir(f,null,0,w,Ue.ITF,new Date().getTime())},e.decodeMiddle=function(n,r,o,i){var a=new Int32Array(10),s=new Int32Array(5),c=new Int32Array(5);for(a.fill(0),s.fill(0),c.fill(0);r<o;){Bn.recordPattern(n,r,a);for(var l=0;l<5;l++){var f=2*l;s[l]=a[f],c[l]=a[f+1]}var h=e.decodeDigit(s);i.append(h.toString()),h=this.decodeDigit(c),i.append(h.toString()),a.forEach(function(d){r+=d})}},e.prototype.decodeStart=function(n){var r=e.skipWhiteSpace(n),o=e.findGuardPattern(n,r,e.START_PATTERN);return this.narrowLineWidth=(o[1]-o[0])/4,this.validateQuietZone(n,o[0]),o},e.prototype.validateQuietZone=function(n,r){var o=10*this.narrowLineWidth;o=o<r?o:r;for(var i=r-1;o>0&&i>=0&&!n.get(i);i--)o--;if(o!==0)throw new ge},e.skipWhiteSpace=function(n){var r=n.getSize(),o=n.getNextSet(0);if(o===r)throw new ge;return o},e.prototype.decodeEnd=function(n){n.reverse();try{var r=e.skipWhiteSpace(n),o=void 0;try{o=e.findGuardPattern(n,r,e.END_PATTERN_REVERSED[0])}catch(a){a instanceof ge&&(o=e.findGuardPattern(n,r,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(n,o[0]);var i=o[0];return o[0]=n.getSize()-o[1],o[1]=n.getSize()-i,o}finally{n.reverse()}},e.findGuardPattern=function(n,r,o){var i=o.length,a=new Int32Array(i),s=n.getSize(),c=!1,l=0,f=r;a.fill(0);for(var h=r;h<s;h++)if(n.get(h)!==c)a[l]++;else{if(l===i-1){if(Bn.patternMatchVariance(a,o,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[f,h];f+=a[0]+a[1],Ut.arraycopy(a,2,a,0,l-1),a[l-1]=0,a[l]=0,l--}else l++;a[l]=1,c=!c}throw new ge},e.decodeDigit=function(n){for(var r=e.MAX_AVG_VARIANCE,o=-1,i=e.PATTERNS.length,a=0;a<i;a++){var s=e.PATTERNS[a],c=Bn.patternMatchVariance(n,s,e.MAX_INDIVIDUAL_VARIANCE);c<r?(r=c,o=a):c===r&&(o=-1)}if(o>=0)return o%10;throw new ge},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}(Bn),KT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pa=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.decodeRowStringBuffer="",n}return KT(e,t),e.findStartGuardPattern=function(n){for(var r,o=!1,i=0,a=Int32Array.from([0,0,0]);!o;){a=Int32Array.from([0,0,0]);var s=(r=e.findGuardPattern(n,i,!1,this.START_END_PATTERN,a))[0],c=s-((i=r[1])-s);c>=0&&(o=n.isRange(c,s,!1))}return r},e.checkChecksum=function(n){return e.checkStandardUPCEANChecksum(n)},e.checkStandardUPCEANChecksum=function(n){var r=n.length;if(r===0)return!1;var o=parseInt(n.charAt(r-1),10);return e.getStandardUPCEANChecksum(n.substring(0,r-1))===o},e.getStandardUPCEANChecksum=function(n){for(var r=n.length,o=0,i=r-1;i>=0;i-=2){if((a=n.charAt(i).charCodeAt(0)-48)<0||a>9)throw new Ie;o+=a}for(o*=3,i=r-2;i>=0;i-=2){var a;if((a=n.charAt(i).charCodeAt(0)-48)<0||a>9)throw new Ie;o+=a}return(1e3-o)%10},e.decodeEnd=function(n,r){return e.findGuardPattern(n,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(n,r,o,i){return this.findGuardPattern(n,r,o,i,new Int32Array(i.length))},e.findGuardPattern=function(n,r,o,i,a){for(var s=n.getSize(),c=0,l=r=o?n.getNextUnset(r):n.getNextSet(r),f=i.length,h=o,d=r;d<s;d++)if(n.get(d)!==h)a[c]++;else{if(c===f-1){if(Bn.patternMatchVariance(a,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([l,d]);l+=a[0]+a[1];for(var p=a.slice(2,a.length-1),u=0;u<c-1;u++)a[u]=p[u];a[c-1]=0,a[c]=0,c--}else c++;a[c]=1,h=!h}throw new ge},e.decodeDigit=function(n,r,o,i){this.recordPattern(n,o,r);for(var a=this.MAX_AVG_VARIANCE,s=-1,c=i.length,l=0;l<c;l++){var f=i[l],h=Bn.patternMatchVariance(r,f,e.MAX_INDIVIDUAL_VARIANCE);h<a&&(a=h,s=l)}if(s>=0)return s;throw new ge},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}(Bn),zT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$T=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,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=t.parseExtensionString(a),c=[new Me((r[0]+r[1])/2,e),new Me(i,e)],l=new ir(a,null,0,c,Ue.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&l.putAllMetadata(s),l},t.prototype.decodeMiddle=function(e,n,r){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=n[1],l=0,f=0;f<5&&c<s;f++){var h=pa.decodeDigit(e,a,c,pa.L_AND_G_PATTERNS);r+=String.fromCharCode(48+h%10);try{for(var d=(o=void 0,zT(a)),p=d.next();!p.done;p=d.next())c+=p.value}catch(g){o={error:g}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}h>=10&&(l|=1<<4-f),f!==4&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(r.length!==5)throw new ge;var u=this.determineCheckDigit(l);if(t.extensionChecksum(r.toString())!==u)throw new ge;return c},t.extensionChecksum=function(e){for(var n=e.length,r=0,o=n-2;o>=0;o-=2)r+=e.charAt(o).charCodeAt(0)-48;for(r*=3,o=n-1;o>=0;o-=2)r+=e.charAt(o).charCodeAt(0)-48;return(r*=3)%10},t.prototype.determineCheckDigit=function(e){for(var n=0;n<10;n++)if(e===this.CHECK_DIGIT_ENCODINGS[n])return n;throw new ge},t.parseExtensionString=function(e){if(e.length!==5)return null;var n=t.parseExtension5String(e);return n==null?null:new Map([[kn.SUGGESTED_PRICE,n]])},t.parseExtension5String=function(e){var n;switch(e.charAt(0)){case"0":n="£";break;case"5":n="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}n="";break;default:n=""}var r=parseInt(e.substring(1)),o=r%100;return n+(r/100).toString()+"."+(o<10?"0"+o:o.toString())},t}(),XT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},QT=function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,n,r){var o=this.decodeRowStringBuffer,i=this.decodeMiddle(n,r,o),a=o.toString(),s=t.parseExtensionString(a),c=[new Me((r[0]+r[1])/2,e),new Me(i,e)],l=new ir(a,null,0,c,Ue.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&l.putAllMetadata(s),l},t.prototype.decodeMiddle=function(e,n,r){var o,i,a=this.decodeMiddleCounters;a[0]=0,a[1]=0,a[2]=0,a[3]=0;for(var s=e.getSize(),c=n[1],l=0,f=0;f<2&&c<s;f++){var h=pa.decodeDigit(e,a,c,pa.L_AND_G_PATTERNS);r+=String.fromCharCode(48+h%10);try{for(var d=(o=void 0,XT(a)),p=d.next();!p.done;p=d.next())c+=p.value}catch(u){o={error:u}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}h>=10&&(l|=1<<1-f),f!==1&&(c=e.getNextSet(c),c=e.getNextUnset(c))}if(r.length!==2)throw new ge;if(parseInt(r.toString())%4!==l)throw new ge;return c},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[kn.ISSUE_NUMBER,parseInt(e)]])},t}(),JT=function(){function t(){}return t.decodeRow=function(e,n,r){var o=pa.findGuardPattern(n,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return new $T().decodeRow(e,n,o)}catch{return new QT().decodeRow(e,n,o)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t}(),ZT=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(t){function e(){var n=t.call(this)||this;n.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var r=10;r<20;r++){for(var o=e.L_PATTERNS[r-10],i=new Int32Array(o.length),a=0;a<o.length;a++)i[a]=o[o.length-a-1];e.L_AND_G_PATTERNS[r]=i}return n}return ZT(e,t),e.prototype.decodeRow=function(n,r,o){var i=e.findStartGuardPattern(r),a=o==null?null:o.get(Ft.NEED_RESULT_POINT_CALLBACK);if(a!=null){var s=new Me((i[0]+i[1])/2,n);a.foundPossibleResultPoint(s)}var c=this.decodeMiddle(r,i,this.decodeRowStringBuffer),l=c.rowOffset,f=c.resultString;if(a!=null){var h=new Me(l,n);a.foundPossibleResultPoint(h)}var d=e.decodeEnd(r,l);if(a!=null){var p=new Me((d[0]+d[1])/2,n);a.foundPossibleResultPoint(p)}var u=d[1],g=u+(u-d[0]);if(g>=r.getSize()||!r.isRange(u,g,!1))throw new ge;var m=f.toString();if(m.length<8)throw new Ie;if(!e.checkChecksum(m))throw new pn;var y=(i[1]+i[0])/2,w=(d[1]+d[0])/2,b=this.getBarcodeFormat(),E=[new Me(y,n),new Me(w,n)],C=new ir(m,null,0,E,b,new Date().getTime()),S=0;try{var T=JT.decodeRow(n,r,d[1]);C.putMetadata(kn.UPC_EAN_EXTENSION,T.getText()),C.putAllMetadata(T.getResultMetadata()),C.addResultPoints(T.getResultPoints()),S=T.getText().length}catch{}var P=o==null?null:o.get(Ft.ALLOWED_EAN_EXTENSIONS);if(P!=null){var N=!1;for(var L in P)if(S.toString()===L){N=!0;break}if(!N)throw new ge}return b===Ue.EAN_13||Ue.UPC_A,C},e.checkChecksum=function(n){return e.checkStandardUPCEANChecksum(n)},e.checkStandardUPCEANChecksum=function(n){var r=n.length;if(r===0)return!1;var o=parseInt(n.charAt(r-1),10);return e.getStandardUPCEANChecksum(n.substring(0,r-1))===o},e.getStandardUPCEANChecksum=function(n){for(var r=n.length,o=0,i=r-1;i>=0;i-=2){if((a=n.charAt(i).charCodeAt(0)-48)<0||a>9)throw new Ie;o+=a}for(o*=3,i=r-2;i>=0;i-=2){var a;if((a=n.charAt(i).charCodeAt(0)-48)<0||a>9)throw new Ie;o+=a}return(1e3-o)%10},e.decodeEnd=function(n,r){return e.findGuardPattern(n,r,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e}(pa),ex=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ky=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rh=function(t){function e(){var n=t.call(this)||this;return n.decodeMiddleCounters=Int32Array.from([0,0,0,0]),n}return ex(e,t),e.prototype.decodeMiddle=function(n,r,o){var i,a,s,c,l=this.decodeMiddleCounters;l[0]=0,l[1]=0,l[2]=0,l[3]=0;for(var f=n.getSize(),h=r[1],d=0,p=0;p<6&&h<f;p++){var u=gn.decodeDigit(n,l,h,gn.L_AND_G_PATTERNS);o+=String.fromCharCode(48+u%10);try{for(var g=(i=void 0,Ky(l)),m=g.next();!m.done;m=g.next())h+=m.value}catch(b){i={error:b}}finally{try{m&&!m.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}u>=10&&(d|=1<<5-p)}for(o=e.determineFirstDigit(o,d),h=gn.findGuardPattern(n,h,!0,gn.MIDDLE_PATTERN,new Int32Array(gn.MIDDLE_PATTERN.length).fill(0))[1],p=0;p<6&&h<f;p++){u=gn.decodeDigit(n,l,h,gn.L_PATTERNS),o+=String.fromCharCode(48+u);try{for(var y=(s=void 0,Ky(l)),w=y.next();!w.done;w=y.next())h+=w.value}catch(b){s={error:b}}finally{try{w&&!w.done&&(c=y.return)&&c.call(y)}finally{if(s)throw s.error}}}return{rowOffset:h,resultString:o}},e.prototype.getBarcodeFormat=function(){return Ue.EAN_13},e.determineFirstDigit=function(n,r){for(var o=0;o<10;o++)if(r===this.FIRST_DIGIT_ENCODINGS[o])return n=String.fromCharCode(48+o)+n;throw new ge},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e}(gn),tx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zy=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$y=function(t){function e(){var n=t.call(this)||this;return n.decodeMiddleCounters=Int32Array.from([0,0,0,0]),n}return tx(e,t),e.prototype.decodeMiddle=function(n,r,o){var i,a,s,c,l=this.decodeMiddleCounters;l[0]=0,l[1]=0,l[2]=0,l[3]=0;for(var f=n.getSize(),h=r[1],d=0;d<4&&h<f;d++){var p=gn.decodeDigit(n,l,h,gn.L_PATTERNS);o+=String.fromCharCode(48+p);try{for(var u=(i=void 0,zy(l)),g=u.next();!g.done;g=u.next())h+=g.value}catch(w){i={error:w}}finally{try{g&&!g.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}}for(h=gn.findGuardPattern(n,h,!0,gn.MIDDLE_PATTERN,new Int32Array(gn.MIDDLE_PATTERN.length).fill(0))[1],d=0;d<4&&h<f;d++){p=gn.decodeDigit(n,l,h,gn.L_PATTERNS),o+=String.fromCharCode(48+p);try{for(var m=(s=void 0,zy(l)),y=m.next();!y.done;y=m.next())h+=y.value}catch(w){s={error:w}}finally{try{y&&!y.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}}return{rowOffset:h,resultString:o}},e.prototype.getBarcodeFormat=function(){return Ue.EAN_8},e}(gn),nx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),rx=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.ean13Reader=new rh,n}return nx(e,t),e.prototype.getBarcodeFormat=function(){return Ue.UPC_A},e.prototype.decode=function(n,r){return this.maybeReturnResult(this.ean13Reader.decode(n))},e.prototype.decodeRow=function(n,r,o){return this.maybeReturnResult(this.ean13Reader.decodeRow(n,r,o))},e.prototype.decodeMiddle=function(n,r,o){return this.ean13Reader.decodeMiddle(n,r,o)},e.prototype.maybeReturnResult=function(n){var r=n.getText();if(r.charAt(0)==="0"){var o=new ir(r.substring(1),null,null,n.getResultPoints(),Ue.UPC_A);return n.getResultMetadata()!=null&&o.putAllMetadata(n.getResultMetadata()),o}throw new ge},e.prototype.reset=function(){this.ean13Reader.reset()},e}(gn),ox=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ix=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xy=function(t){function e(){var n=t.call(this)||this;return n.decodeMiddleCounters=new Int32Array(4),n}return ox(e,t),e.prototype.decodeMiddle=function(n,r,o){var i,a,s=this.decodeMiddleCounters.map(function(g){return g});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var c=n.getSize(),l=r[1],f=0,h=0;h<6&&l<c;h++){var d=e.decodeDigit(n,s,l,e.L_AND_G_PATTERNS);o+=String.fromCharCode(48+d%10);try{for(var p=(i=void 0,ix(s)),u=p.next();!u.done;u=p.next())l+=u.value}catch(g){i={error:g}}finally{try{u&&!u.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}d>=10&&(f|=1<<5-h)}return e.determineNumSysAndCheckDigit(new Nt(o),f),l},e.prototype.decodeEnd=function(n,r){return e.findGuardPatternWithoutCounters(n,r,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(n){return gn.checkChecksum(e.convertUPCEtoUPCA(n))},e.determineNumSysAndCheckDigit=function(n,r){for(var o=0;o<=1;o++)for(var i=0;i<10;i++)if(r===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[o][i])return n.insert(0,"0"+o),void n.append("0"+i);throw ge.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return Ue.UPC_E},e.convertUPCEtoUPCA=function(n){var r=n.slice(1,7).split("").map(function(a){return a.charCodeAt(0)}),o=new Nt;o.append(n.charAt(0));var i=r[5];switch(i){case 0:case 1:case 2:o.appendChars(r,0,2),o.append(i),o.append("0000"),o.appendChars(r,2,3);break;case 3:o.appendChars(r,0,3),o.append("00000"),o.appendChars(r,3,2);break;case 4:o.appendChars(r,0,4),o.append("00000"),o.append(r[4]);break;default:o.appendChars(r,0,5),o.append("0000"),o.append(i)}return n.length>=8&&o.append(n.charAt(7)),o.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}(gn),ax=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qy=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oh=function(t){function e(n){var r=t.call(this)||this,o=n==null?null:n.get(Ft.POSSIBLE_FORMATS),i=[];return o!=null&&(o.indexOf(Ue.EAN_13)>-1?i.push(new rh):o.indexOf(Ue.UPC_A)>-1&&i.push(new rx),o.indexOf(Ue.EAN_8)>-1&&i.push(new $y),o.indexOf(Ue.UPC_E)>-1&&i.push(new Xy)),i.length===0&&(i.push(new rh),i.push(new $y),i.push(new Xy)),r.readers=i,r}return ax(e,t),e.prototype.decodeRow=function(n,r,o){var i,a;try{for(var s=Qy(this.readers),c=s.next();!c.done;c=s.next()){var l=c.value;try{var f=l.decodeRow(n,r,o),h=f.getBarcodeFormat()===Ue.EAN_13&&f.getText().charAt(0)==="0",d=o==null?null:o.get(Ft.POSSIBLE_FORMATS),p=d==null||d.includes(Ue.UPC_A);if(h&&p){var u=f.getRawBytes(),g=new ir(f.getText().substring(1),u,u.length,f.getResultPoints(),Ue.UPC_A);return g.putAllMetadata(f.getResultMetadata()),g}return f}catch{}}}catch(m){i={error:m}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}throw new ge},e.prototype.reset=function(){var n,r;try{for(var o=Qy(this.readers),i=o.next();!i.done;i=o.next())i.value.reset()}catch(a){n={error:a}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e}(Bn),sx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ei=function(t){function e(){var n=t.call(this)||this;return n.decodeFinderCounters=new Int32Array(4),n.dataCharacterCounters=new Int32Array(8),n.oddRoundingErrors=new Array(4),n.evenRoundingErrors=new Array(4),n.oddCounts=new Array(n.dataCharacterCounters.length/2),n.evenCounts=new Array(n.dataCharacterCounters.length/2),n}return sx(e,t),e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(n,r){for(var o=0;o<r.length;o++)if(Bn.patternMatchVariance(n,r[o],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return o;throw new ge},e.count=function(n){return wt.sum(new Int32Array(n))},e.increment=function(n,r){for(var o=0,i=r[0],a=1;a<n.length;a++)r[a]>i&&(i=r[a],o=a);n[o]++},e.decrement=function(n,r){for(var o=0,i=r[0],a=1;a<n.length;a++)r[a]<i&&(i=r[a],o=a);n[o]--},e.isFinderPattern=function(n){var r,o,i=n[0]+n[1],a=i/(i+n[2]+n[3]);if(a>=e.MIN_FINDER_PATTERN_RATIO&&a<=e.MAX_FINDER_PATTERN_RATIO){var s=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;try{for(var l=cx(n),f=l.next();!f.done;f=l.next()){var h=f.value;h>c&&(c=h),h<s&&(s=h)}}catch(d){r={error:d}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return c<10*s}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}(Bn),ju=function(){function t(e,n){this.value=e,this.checksumPortion=n}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 n=e;return this.value===n.value&&this.checksumPortion===n.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t}(),Jy=function(){function t(e,n,r,o,i){this.value=e,this.startEnd=n,this.value=e,this.startEnd=n,this.resultPoints=new Array,this.resultPoints.push(new Me(r,i)),this.resultPoints.push(new Me(o,i))}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 n=e;return this.value===n.value},t.prototype.hashCode=function(){return this.value},t}(),ux=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ga=function(){function t(){}return t.getRSSvalue=function(e,n,r){var o,i,a=0;try{for(var s=ux(e),c=s.next();!c.done;c=s.next())a+=c.value}catch(y){o={error:y}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}for(var l=0,f=0,h=e.length,d=0;d<h-1;d++){var p=void 0;for(p=1,f|=1<<d;p<e[d];p++,f&=~(1<<d)){var u=t.combins(a-p-1,h-d-2);if(r&&f===0&&a-p-(h-d-1)>=h-d-1&&(u-=t.combins(a-p-(h-d),h-d-2)),h-d-1>1){for(var g=0,m=a-p-(h-d-2);m>n;m--)g+=t.combins(a-p-m-1,h-d-3);u-=g*(h-1-d)}else a-p>n&&u--;l+=u}a-=p}return l},t.combins=function(e,n){var r,o;e-n>n?(o=n,r=e-n):(o=e-n,r=n);for(var i=1,a=1,s=e;s>r;s--)i*=s,a<=o&&(i/=a,a++);for(;a<=o;)i/=a,a++;return i},t}(),lx=function(){function t(){}return t.buildBitArray=function(e){var n=2*e.length-1;e[e.length-1].getRightChar()==null&&(n-=1);for(var r=new Jr(12*n),o=0,i=e[0].getRightChar().getValue(),a=11;a>=0;--a)i&1<<a&&r.set(o),o++;for(a=1;a<e.length;++a){for(var s=e[a],c=s.getLeftChar().getValue(),l=11;l>=0;--l)c&1<<l&&r.set(o),o++;if(s.getRightChar()!=null){var f=s.getRightChar().getValue();for(l=11;l>=0;--l)f&1<<l&&r.set(o),o++}}return r},t}(),Ci=function(){function t(e,n){n?this.decodedInformation=null:(this.finished=e,this.decodedInformation=n)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t}(),ih=function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},t}(),dx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fr=function(t){function e(n,r){var o=t.call(this,n)||this;return o.value=r,o}return dx(e,t),e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e}(ih),fx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_i=function(t){function e(n,r,o){var i=t.call(this,n)||this;return o?(i.remaining=!0,i.remainingValue=i.remainingValue):(i.remaining=!1,i.remainingValue=0),i.newString=r,i}return fx(e,t),e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e}(ih),hx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vu=function(t){function e(n,r,o){var i=t.call(this,n)||this;if(r<0||r>10||o<0||o>10)throw new Ie;return i.firstDigit=r,i.secondDigit=o,i}return hx(e,t),e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return 10*this.firstDigit+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e}(ih),Uu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},px=function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var n,r,o,i,a,s,c,l;if(!e)return null;if(e.length<2)throw new ge;var f=e.substring(0,2);try{for(var h=Uu(t.TWO_DIGIT_DATA_LENGTH),d=h.next();!d.done;d=h.next())if((C=d.value)[0]===f)return C[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,C[2],e):t.processFixedAI(2,C[1],e)}catch(S){n={error:S}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}if(e.length<3)throw new ge;var p=e.substring(0,3);try{for(var u=Uu(t.THREE_DIGIT_DATA_LENGTH),g=u.next();!g.done;g=u.next())if((C=g.value)[0]===p)return C[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,C[2],e):t.processFixedAI(3,C[1],e)}catch(S){o={error:S}}finally{try{g&&!g.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}try{for(var m=Uu(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),y=m.next();!y.done;y=m.next())if((C=y.value)[0]===p)return C[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,C[2],e):t.processFixedAI(4,C[1],e)}catch(S){a={error:S}}finally{try{y&&!y.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}if(e.length<4)throw new ge;var w=e.substring(0,4);try{for(var b=Uu(t.FOUR_DIGIT_DATA_LENGTH),E=b.next();!E.done;E=b.next()){var C;if((C=E.value)[0]===w)return C[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,C[2],e):t.processFixedAI(4,C[1],e)}}catch(S){c={error:S}}finally{try{E&&!E.done&&(l=b.return)&&l.call(b)}finally{if(c)throw c.error}}throw new ge},t.processFixedAI=function(e,n,r){if(r.length<e)throw new ge;var o=r.substring(0,e);if(r.length<e+n)throw new ge;var i=r.substring(e,e+n),a=r.substring(e+n),s="("+o+")"+i,c=t.parseFieldsInGeneralPurpose(a);return c==null?s:s+c},t.processVariableAI=function(e,n,r){var o,i=r.substring(0,e);o=r.length<e+n?r.length:e+n;var a=r.substring(e,o),s=r.substring(o),c="("+i+")"+a,l=t.parseFieldsInGeneralPurpose(s);return l==null?c:c+l},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}(),Gu=function(){function t(e){this.buffer=new Nt,this.information=e}return t.prototype.decodeAllCodes=function(e,n){for(var r=n,o=null;;){var i=this.decodeGeneralPurposeField(r,o),a=px.parseFieldsInGeneralPurpose(i.getNewString());if(a!=null&&e.append(a),o=i.isRemaining()?""+i.getRemainingValue():null,r===i.getNewPosition())break;r=i.getNewPosition()}return e.toString()},t.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var n=e;n<e+3;++n)if(this.information.get(n))return!0;return this.information.get(e+3)},t.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var n=this.extractNumericValueFromBitArray(e,4);return new Vu(this.information.getSize(),n===0?Vu.FNC1:n-1,Vu.FNC1)}var r=this.extractNumericValueFromBitArray(e,7);return new Vu(e+7,(r-8)/11,(r-8)%11)},t.prototype.extractNumericValueFromBitArray=function(e,n){return t.extractNumericValueFromBitArray(this.information,e,n)},t.extractNumericValueFromBitArray=function(e,n,r){for(var o=0,i=0;i<r;++i)e.get(n+i)&&(o|=1<<r-i-1);return o},t.prototype.decodeGeneralPurposeField=function(e,n){this.buffer.setLengthToZero(),n!=null&&this.buffer.append(n),this.current.setPosition(e);var r=this.parseBlocks();return r!=null&&r.isRemaining()?new _i(this.current.getPosition(),this.buffer.toString(),r.getRemainingValue()):new _i(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var e,n;do{var r=this.current.getPosition();if(e=this.current.isAlpha()?(n=this.parseAlphaBlock()).isFinished():this.current.isIsoIec646()?(n=this.parseIsoIec646Block()).isFinished():(n=this.parseNumericBlock()).isFinished(),r===this.current.getPosition()&&!e)break}while(!e);return n.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 n=void 0;return n=e.isSecondDigitFNC1()?new _i(this.current.getPosition(),this.buffer.toString()):new _i(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new Ci(!0,n)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1())return n=new _i(this.current.getPosition(),this.buffer.toString()),new Ci(!0,n);this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new Ci(!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 n=new _i(this.current.getPosition(),this.buffer.toString());return new Ci(!0,n)}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 Ci(!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 n=new _i(this.current.getPosition(),this.buffer.toString());return new Ci(!0,n)}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 Ci(!1)},t.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,5);if(n>=5&&n<16)return!0;if(e+7>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,7);if(r>=64&&r<116)return!0;if(e+8>this.information.getSize())return!1;var o=this.extractNumericValueFromBitArray(e,8);return o>=232&&o<253},t.prototype.decodeIsoIec646=function(e){var n=this.extractNumericValueFromBitArray(e,5);if(n===15)return new Fr(e+5,Fr.FNC1);if(n>=5&&n<15)return new Fr(e+5,"0"+(n-5));var r,o=this.extractNumericValueFromBitArray(e,7);if(o>=64&&o<90)return new Fr(e+7,""+(o+1));if(o>=90&&o<116)return new Fr(e+7,""+(o+7));switch(this.extractNumericValueFromBitArray(e,8)){case 232:r="!";break;case 233:r='"';break;case 234:r="%";break;case 235:r="&";break;case 236:r="'";break;case 237:r="(";break;case 238:r=")";break;case 239:r="*";break;case 240:r="+";break;case 241:r=",";break;case 242:r="-";break;case 243:r=".";break;case 244:r="/";break;case 245:r=":";break;case 246:r=";";break;case 247:r="<";break;case 248:r="=";break;case 249:r=">";break;case 250:r="?";break;case 251:r="_";break;case 252:r=" ";break;default:throw new Ie}return new Fr(e+8,r)},t.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,5);if(n>=5&&n<16)return!0;if(e+6>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,6);return r>=16&&r<63},t.prototype.decodeAlphanumeric=function(e){var n=this.extractNumericValueFromBitArray(e,5);if(n===15)return new Fr(e+5,Fr.FNC1);if(n>=5&&n<15)return new Fr(e+5,"0"+(n-5));var r,o=this.extractNumericValueFromBitArray(e,6);if(o>=32&&o<58)return new Fr(e+6,""+(o+33));switch(o){case 58:r="*";break;case 59:r=",";break;case 60:r="-";break;case 61:r=".";break;case 62:r="/";break;default:throw new Bs("Decoding invalid alphanumeric value: "+o)}return new Fr(e+6,r)},t.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var n=0;n<5&&n+e<this.information.getSize();++n)if(n===2){if(!this.information.get(e+2))return!1}else if(this.information.get(e+n))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var n=e;n<e+3;++n)if(this.information.get(n))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var n=0;n<4&&n+e<this.information.getSize();++n)if(this.information.get(e+n))return!1;return!0},t}(),Zy=function(){function t(e){this.information=e,this.generalDecoder=new Gu(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t}(),gx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jr=function(t){function e(n){return t.call(this,n)||this}return gx(e,t),e.prototype.encodeCompressedGtin=function(n,r){n.append("(01)");var o=n.length();n.append("9"),this.encodeCompressedGtinWithoutAI(n,r,o)},e.prototype.encodeCompressedGtinWithoutAI=function(n,r,o){for(var i=0;i<4;++i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(r+10*i,10);a/100==0&&n.append("0"),a/10==0&&n.append("0"),n.append(a)}e.appendCheckDigit(n,o)},e.appendCheckDigit=function(n,r){for(var o=0,i=0;i<13;i++){var a=n.charAt(i+r).charCodeAt(0)-48;o+=1&i?a:3*a}(o=10-o%10)===10&&(o=0),n.append(o)},e.GTIN_SIZE=40,e}(Zy),mx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yx=function(t){function e(n){return t.call(this,n)||this}return mx(e,t),e.prototype.parseInformation=function(){var n=new Nt;n.append("(01)");var r=n.length(),o=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return n.append(o),this.encodeCompressedGtinWithoutAI(n,e.HEADER_SIZE+4,r),this.getGeneralDecoder().decodeAllCodes(n,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e}(jr),vx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wx=function(t){function e(n){return t.call(this,n)||this}return vx(e,t),e.prototype.parseInformation=function(){var n=new Nt;return this.getGeneralDecoder().decodeAllCodes(n,e.HEADER_SIZE)},e.HEADER_SIZE=5,e}(Zy),bx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qu=function(t){function e(n){return t.call(this,n)||this}return bx(e,t),e.prototype.encodeCompressedWeight=function(n,r,o){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(r,o);this.addWeightCode(n,i);for(var a=this.checkWeight(i),s=1e5,c=0;c<5;++c)a/s==0&&n.append("0"),s/=10;n.append(a)},e}(jr),Ex=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ev=function(t){function e(n){return t.call(this,n)||this}return Ex(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+qu.GTIN_SIZE+e.WEIGHT_SIZE)throw new ge;var n=new Nt;return this.encodeCompressedGtin(n,e.HEADER_SIZE),this.encodeCompressedWeight(n,e.HEADER_SIZE+qu.GTIN_SIZE,e.WEIGHT_SIZE),n.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e}(qu),Cx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_x=function(t){function e(n){return t.call(this,n)||this}return Cx(e,t),e.prototype.addWeightCode=function(n,r){n.append("(3103)")},e.prototype.checkWeight=function(n){return n},e}(ev),Ax=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sx=function(t){function e(n){return t.call(this,n)||this}return Ax(e,t),e.prototype.addWeightCode=function(n,r){r<1e4?n.append("(3202)"):n.append("(3203)")},e.prototype.checkWeight=function(n){return n<1e4?n:n-1e4},e}(ev),Ix=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tx=function(t){function e(n){return t.call(this,n)||this}return Ix(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+jr.GTIN_SIZE)throw new ge;var n=new Nt;this.encodeCompressedGtin(n,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+jr.GTIN_SIZE,e.LAST_DIGIT_SIZE);n.append("(392"),n.append(r),n.append(")");var o=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+jr.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return n.append(o.getNewString()),n.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e}(jr),xx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ox=function(t){function e(n){return t.call(this,n)||this}return xx(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+jr.GTIN_SIZE)throw new ge;var n=new Nt;this.encodeCompressedGtin(n,e.HEADER_SIZE);var r=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+jr.GTIN_SIZE,e.LAST_DIGIT_SIZE);n.append("(393"),n.append(r),n.append(")");var o=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+jr.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);o/100==0&&n.append("0"),o/10==0&&n.append("0"),n.append(o);var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+jr.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return n.append(i.getNewString()),n.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e}(jr),Px=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zo=function(t){function e(n,r,o){var i=t.call(this,n)||this;return i.dateCode=o,i.firstAIdigits=r,i}return Px(e,t),e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new ge;var n=new Nt;return this.encodeCompressedGtin(n,e.HEADER_SIZE),this.encodeCompressedWeight(n,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(n,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),n.toString()},e.prototype.encodeCompressedDate=function(n,r){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(r,e.DATE_SIZE);if(o!=38400){n.append("("),n.append(this.dateCode),n.append(")");var i=o%32,a=(o/=32)%12+1,s=o/=12;s/10==0&&n.append("0"),n.append(s),a/10==0&&n.append("0"),n.append(a),i/10==0&&n.append("0"),n.append(i)}},e.prototype.addWeightCode=function(n,r){n.append("("),n.append(this.firstAIdigits),n.append(r/1e5),n.append(")")},e.prototype.checkWeight=function(n){return n%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e}(qu),tv=function(){function t(e,n,r,o){this.leftchar=e,this.rightchar=n,this.finderpattern=r,this.maybeLast=o}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,n){return e instanceof t&&t.equalsOrNull(e.leftchar,n.leftchar)&&t.equalsOrNull(e.rightchar,n.rightchar)&&t.equalsOrNull(e.finderpattern,n.finderpattern)},t.equalsOrNull=function(e,n){return e===null?n===null:t.equals(e,n)},t.prototype.hashCode=function(){return this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue()},t}(),kx=function(){function t(e,n,r){this.pairs=e,this.rowNumber=n,this.wasReversed=r}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,n){return e instanceof t&&this.checkEqualitity(e,n)&&e.wasReversed===n.wasReversed},t.prototype.checkEqualitity=function(e,n){var r;if(e&&n)return e.forEach(function(o,i){n.forEach(function(a){o.getLeftChar().getValue()===a.getLeftChar().getValue()&&o.getRightChar().getValue()===a.getRightChar().getValue()&&o.getFinderPatter().getValue()===a.getFinderPatter().getValue()&&(r=!0)})}),r},t}(),Bx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$o=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nx=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.pairs=new Array(e.MAX_PAIRS),n.rows=new Array,n.startEnd=[2],n}return Bx(e,t),e.prototype.decodeRow=function(n,r,o){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(n,r))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(n,r))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(n,r){for(var o,i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(r,this.pairs,n))}catch(s){if(s instanceof ge){if(!this.pairs.length)throw new ge;i=!0}}if(this.checkChecksum())return this.pairs;if(o=!!this.rows.length,this.storeRow(n,!1),o){var a=this.checkRowsBoolean(!1);if(a!=null||(a=this.checkRowsBoolean(!0))!=null)return a}throw new ge},e.prototype.checkRowsBoolean=function(n){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,n&&(this.rows=this.rows.reverse());var r=null;try{r=this.checkRows(new Array,0)}catch(o){console.log(o)}return n&&(this.rows=this.rows.reverse()),r},e.prototype.checkRows=function(n,r){for(var o,i,a=r;a<this.rows.length;a++){var s=this.rows[a];this.pairs.length=0;try{for(var c=(o=void 0,$o(n)),l=c.next();!l.done;l=c.next()){var f=l.value;this.pairs.push(f.getPairs())}}catch(d){o={error:d}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}if(this.pairs.push(s.getPairs()),e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var h=new Array(n);h.push(s);try{return this.checkRows(h,a+1)}catch(d){console.log(d)}}}throw new ge},e.isValidSequence=function(n){var r,o;try{for(var i=$o(e.FINDER_PATTERN_SEQUENCES),a=i.next();!a.done;a=i.next()){var s=a.value;if(!(n.length>s.length)){for(var c=!0,l=0;l<n.length;l++)if(n[l].getFinderPattern().getValue()!=s[l]){c=!1;break}if(c)return!0}}}catch(f){r={error:f}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return!1},e.prototype.storeRow=function(n,r){for(var o=0,i=!1,a=!1;o<this.rows.length;){var s=this.rows[o];if(s.getRowNumber()>n){a=s.isEquivalent(this.pairs);break}i=s.isEquivalent(this.pairs),o++}a||i||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(o,new kx(this.pairs,n,r)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(n,r){var o,i,a,s,c,l;try{for(var f=$o(r),h=f.next();!h.done;h=f.next()){var d=h.value;if(d.getPairs().length!==n.length)try{for(var p=(a=void 0,$o(d.getPairs())),u=p.next();!u.done;u=p.next()){var g=u.value,m=!1;try{for(var y=(c=void 0,$o(n)),w=y.next();!w.done;w=y.next()){var b=w.value;if(tv.equals(g,b)){m=!0;break}}}catch(E){c={error:E}}finally{try{w&&!w.done&&(l=y.return)&&l.call(y)}finally{if(c)throw c.error}}}}catch(E){a={error:E}}finally{try{u&&!u.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(E){o={error:E}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}},e.isPartialRow=function(n,r){var o,i,a,s,c,l;try{for(var f=$o(r),h=f.next();!h.done;h=f.next()){var d=h.value,p=!0;try{for(var u=(a=void 0,$o(n)),g=u.next();!g.done;g=u.next()){var m=g.value,y=!1;try{for(var w=(c=void 0,$o(d.getPairs())),b=w.next();!b.done;b=w.next()){var E=b.value;if(m.equals(E)){y=!0;break}}}catch(C){c={error:C}}finally{try{b&&!b.done&&(l=w.return)&&l.call(w)}finally{if(c)throw c.error}}if(!y){p=!1;break}}}catch(C){a={error:C}}finally{try{g&&!g.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}if(p)return!0}}catch(C){o={error:C}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(n){var r=function(s){try{if(s.get(1))return new yx(s);if(!s.get(2))return new wx(s);switch(Gu.extractNumericValueFromBitArray(s,1,4)){case 4:return new _x(s);case 5:return new Sx(s)}switch(Gu.extractNumericValueFromBitArray(s,1,5)){case 12:return new Tx(s);case 13:return new Ox(s)}switch(Gu.extractNumericValueFromBitArray(s,1,7)){case 56:return new zo(s,"310","11");case 57:return new zo(s,"320","11");case 58:return new zo(s,"310","13");case 59:return new zo(s,"320","13");case 60:return new zo(s,"310","15");case 61:return new zo(s,"320","15");case 62:return new zo(s,"310","17");case 63:return new zo(s,"320","17")}}catch(c){throw console.log(c),new Bs("unknown decoder: "+s)}}(lx.buildBitArray(n)).parseInformation(),o=n[0].getFinderPattern().getResultPoints(),i=n[n.length-1].getFinderPattern().getResultPoints(),a=[o[0],o[1],i[0],i[1]];return new ir(r,null,null,a,Ue.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var n=this.pairs.get(0),r=n.getLeftChar(),o=n.getRightChar();if(o==null)return!1;for(var i=o.getChecksumPortion(),a=2,s=1;s<this.pairs.size();++s){var c=this.pairs.get(s);i+=c.getLeftChar().getChecksumPortion(),a++;var l=c.getRightChar();l!=null&&(i+=l.getChecksumPortion(),a++)}return 211*(a-4)+(i%=211)==r.getValue()},e.getNextSecondBar=function(n,r){var o;return n.get(r)?(o=n.getNextUnset(r),o=n.getNextSet(o)):(o=n.getNextSet(r),o=n.getNextUnset(o)),o},e.prototype.retrieveNextPair=function(n,r,o){var i,a=r.length%2==0;this.startFromEven&&(a=!a);var s=!0,c=-1;do this.findNextPair(n,r,c),(i=this.parseFoundFinderPattern(n,o,a))==null?c=e.getNextSecondBar(n,this.startEnd[0]):s=!1;while(s);var l,f=this.decodeDataCharacter(n,i,a,!0);if(!this.isEmptyPair(r)&&r[r.length-1].mustBeLast())throw new ge;try{l=this.decodeDataCharacter(n,i,a,!1)}catch(h){l=null,console.log(h)}return new tv(f,l,i,!0)},e.prototype.isEmptyPair=function(n){return n.length===0},e.prototype.findNextPair=function(n,r,o){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;var a,s=n.getSize();o>=0?a=o:this.isEmptyPair(r)?a=0:a=r[r.length-1].getFinderPattern().getStartEnd()[1];var c=r.length%2!=0;this.startFromEven&&(c=!c);for(var l=!1;a<s&&(l=!n.get(a));)a++;for(var f=0,h=a,d=a;d<s;d++)if(n.get(d)!=l)i[f]++;else{if(f==3){if(c&&e.reverseCounters(i),e.isFinderPattern(i))return this.startEnd[0]=h,void(this.startEnd[1]=d);c&&e.reverseCounters(i),h+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,f--}else f++;i[f]=1,l=!l}throw new ge},e.reverseCounters=function(n){for(var r=n.length,o=0;o<r/2;++o){var i=n[o];n[o]=n[r-o-1],n[r-o-1]=i}},e.prototype.parseFoundFinderPattern=function(n,r,o){var i,a,s;if(o){for(var c=this.startEnd[0]-1;c>=0&&!n.get(c);)c--;c++,i=this.startEnd[0]-c,a=c,s=this.startEnd[1]}else a=this.startEnd[0],i=(s=n.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];var l,f=this.getDecodeFinderCounters();Ut.arraycopy(f,0,f,1,f.length-1),f[0]=i;try{l=this.parseFinderValue(f,e.FINDER_PATTERNS)}catch{return null}return new Jy(l,[a,s],a,s,r)},e.prototype.decodeDataCharacter=function(n,r,o,i){for(var a=this.getDataCharacterCounters(),s=0;s<a.length;s++)a[s]=0;if(i)e.recordPatternInReverse(n,r.getStartEnd()[0],a);else{e.recordPattern(n,r.getStartEnd()[1],a);for(var c=0,l=a.length-1;c<l;c++,l--){var f=a[c];a[c]=a[l],a[l]=f}}var h=wt.sum(new Int32Array(a))/17,d=(r.getStartEnd()[1]-r.getStartEnd()[0])/15;if(Math.abs(h-d)/d>.3)throw new ge;var p=this.getOddCounts(),u=this.getEvenCounts(),g=this.getOddRoundingErrors(),m=this.getEvenRoundingErrors();for(c=0;c<a.length;c++){var y=1*a[c]/h,w=y+.5;if(w<1){if(y<.3)throw new ge;w=1}else if(w>8){if(y>8.7)throw new ge;w=8}var b=c/2;1&c?(u[b]=w,m[b]=y-w):(p[b]=w,g[b]=y-w)}this.adjustOddEvenCounts(17);var E=4*r.getValue()+(o?0:2)+(i?0:1)-1,C=0,S=0;for(c=p.length-1;c>=0;c--){if(e.isNotA1left(r,o,i)){var T=e.WEIGHTS[E][2*c];S+=p[c]*T}C+=p[c]}var P=0;for(c=u.length-1;c>=0;c--)e.isNotA1left(r,o,i)&&(T=e.WEIGHTS[E][2*c+1],P+=u[c]*T);var N=S+P;if(1&C||C>13||C<4)throw new ge;var L=(13-C)/2,U=e.SYMBOL_WIDEST[L],j=9-U,K=ga.getRSSvalue(p,U,!0),G=ga.getRSSvalue(u,j,!1),k=e.EVEN_TOTAL_SUBSET[L],V=e.GSUM[L];return new ju(K*k+G+V,N)},e.isNotA1left=function(n,r,o){return!(n.getValue()==0&&r&&o)},e.prototype.adjustOddEvenCounts=function(n){var r=wt.sum(new Int32Array(this.getOddCounts())),o=wt.sum(new Int32Array(this.getEvenCounts())),i=!1,a=!1;r>13?a=!0:r<4&&(i=!0);var s=!1,c=!1;o>13?c=!0:o<4&&(s=!0);var l=r+o-n,f=(1&r)==1,h=(1&o)==0;if(l==1)if(f){if(h)throw new ge;a=!0}else{if(!h)throw new ge;c=!0}else if(l==-1)if(f){if(h)throw new ge;i=!0}else{if(!h)throw new ge;s=!0}else{if(l!=0)throw new ge;if(f){if(!h)throw new ge;r<o?(i=!0,c=!0):(a=!0,s=!0)}else if(h)throw new ge}if(i){if(a)throw new ge;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(a&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(c)throw new ge;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&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}(Ei),Rx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dx=function(t){function e(n,r,o){var i=t.call(this,n,r)||this;return i.count=0,i.finderPattern=o,i}return Rx(e,t),e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e}(ju),Mx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ah=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nv=function(t){function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.possibleLeftPairs=[],n.possibleRightPairs=[],n}return Mx(e,t),e.prototype.decodeRow=function(n,r,o){var i,a,s,c,l=this.decodePair(r,!1,n,o);e.addOrTally(this.possibleLeftPairs,l),r.reverse();var f=this.decodePair(r,!0,n,o);e.addOrTally(this.possibleRightPairs,f),r.reverse();try{for(var h=ah(this.possibleLeftPairs),d=h.next();!d.done;d=h.next()){var p=d.value;if(p.getCount()>1)try{for(var u=(s=void 0,ah(this.possibleRightPairs)),g=u.next();!g.done;g=u.next()){var m=g.value;if(m.getCount()>1&&e.checkChecksum(p,m))return e.constructResult(p,m)}}catch(y){s={error:y}}finally{try{g&&!g.done&&(c=u.return)&&c.call(u)}finally{if(s)throw s.error}}}}catch(y){i={error:y}}finally{try{d&&!d.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}throw new ge},e.addOrTally=function(n,r){var o,i;if(r!=null){var a=!1;try{for(var s=ah(n),c=s.next();!c.done;c=s.next()){var l=c.value;if(l.getValue()===r.getValue()){l.incrementCount(),a=!0;break}}}catch(f){o={error:f}}finally{try{c&&!c.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}a||n.push(r)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(n,r){for(var o=4537077*n.getValue()+r.getValue(),i=new String(o).toString(),a=new Nt,s=13-i.length;s>0;s--)a.append("0");a.append(i);var c=0;for(s=0;s<13;s++){var l=a.charAt(s).charCodeAt(0)-48;c+=1&s?l:3*l}(c=10-c%10)===10&&(c=0),a.append(c.toString());var f=n.getFinderPattern().getResultPoints(),h=r.getFinderPattern().getResultPoints();return new ir(a.toString(),null,0,[f[0],f[1],h[0],h[1]],Ue.RSS_14,new Date().getTime())},e.checkChecksum=function(n,r){var o=(n.getChecksumPortion()+16*r.getChecksumPortion())%79,i=9*n.getFinderPattern().getValue()+r.getFinderPattern().getValue();return i>72&&i--,i>8&&i--,o===i},e.prototype.decodePair=function(n,r,o,i){try{var a=this.findFinderPattern(n,r),s=this.parseFoundFinderPattern(n,o,r,a),c=i==null?null:i.get(Ft.NEED_RESULT_POINT_CALLBACK);if(c!=null){var l=(a[0]+a[1])/2;r&&(l=n.getSize()-1-l),c.foundPossibleResultPoint(new Me(l,o))}var f=this.decodeDataCharacter(n,s,!0),h=this.decodeDataCharacter(n,s,!1);return new Dx(1597*f.getValue()+h.getValue(),f.getChecksumPortion()+4*h.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(n,r,o){for(var i=this.getDataCharacterCounters(),a=0;a<i.length;a++)i[a]=0;if(o)Bn.recordPatternInReverse(n,r.getStartEnd()[0],i);else{Bn.recordPattern(n,r.getStartEnd()[1]+1,i);for(var s=0,c=i.length-1;s<c;s++,c--){var l=i[s];i[s]=i[c],i[c]=l}}var f=o?16:15,h=wt.sum(new Int32Array(i))/f,d=this.getOddCounts(),p=this.getEvenCounts(),u=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors();for(s=0;s<i.length;s++){var m=i[s]/h,y=Math.floor(m+.5);y<1?y=1:y>8&&(y=8);var w=Math.floor(s/2);1&s?(p[w]=y,g[w]=m-y):(d[w]=y,u[w]=m-y)}this.adjustOddEvenCounts(o,f);var b=0,E=0;for(s=d.length-1;s>=0;s--)E*=9,E+=d[s],b+=d[s];var C=0,S=0;for(s=p.length-1;s>=0;s--)C*=9,C+=p[s],S+=p[s];var T=E+3*C;if(o){if(1&b||b>12||b<4)throw new ge;var P=(12-b)/2,N=9-(G=e.OUTSIDE_ODD_WIDEST[P]),L=ga.getRSSvalue(d,G,!1),U=ga.getRSSvalue(p,N,!0),j=e.OUTSIDE_EVEN_TOTAL_SUBSET[P],K=e.OUTSIDE_GSUM[P];return new ju(L*j+U+K,T)}if(1&S||S>10||S<4)throw new ge;P=(10-S)/2,N=9-(G=e.INSIDE_ODD_WIDEST[P]),L=ga.getRSSvalue(d,G,!0),U=ga.getRSSvalue(p,N,!1);var G,k=e.INSIDE_ODD_TOTAL_SUBSET[P];return K=e.INSIDE_GSUM[P],new ju(U*k+L+K,T)},e.prototype.findFinderPattern=function(n,r){var o=this.getDecodeFinderCounters();o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var i=n.getSize(),a=!1,s=0;s<i&&r!==(a=!n.get(s));)s++;for(var c=0,l=s,f=s;f<i;f++)if(n.get(f)!==a)o[c]++;else{if(c===3){if(Ei.isFinderPattern(o))return[l,f];l+=o[0]+o[1],o[0]=o[2],o[1]=o[3],o[2]=0,o[3]=0,c--}else c++;o[c]=1,a=!a}throw new ge},e.prototype.parseFoundFinderPattern=function(n,r,o,i){for(var a=n.get(i[0]),s=i[0]-1;s>=0&&a!==n.get(s);)s--;s++;var c=i[0]-s,l=this.getDecodeFinderCounters(),f=new Int32Array(l.length);Ut.arraycopy(l,0,f,1,l.length-1),f[0]=c;var h=this.parseFinderValue(f,e.FINDER_PATTERNS),d=s,p=i[1];return o&&(d=n.getSize()-1-d,p=n.getSize()-1-p),new Jy(h,[s,i[1]],d,p,r)},e.prototype.adjustOddEvenCounts=function(n,r){var o=wt.sum(new Int32Array(this.getOddCounts())),i=wt.sum(new Int32Array(this.getEvenCounts())),a=!1,s=!1,c=!1,l=!1;n?(o>12?s=!0:o<4&&(a=!0),i>12?l=!0:i<4&&(c=!0)):(o>11?s=!0:o<5&&(a=!0),i>10?l=!0:i<4&&(c=!0));var f=o+i-r,h=(1&o)==(n?1:0),d=(1&i)==1;if(f===1)if(h){if(d)throw new ge;s=!0}else{if(!d)throw new ge;l=!0}else if(f===-1)if(h){if(d)throw new ge;a=!0}else{if(!d)throw new ge;c=!0}else{if(f!==0)throw new ge;if(h){if(!d)throw new ge;o<i?(a=!0,l=!0):(s=!0,c=!0)}else if(d)throw new ge}if(a){if(s)throw new ge;Ei.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&Ei.decrement(this.getOddCounts(),this.getOddRoundingErrors()),c){if(l)throw new ge;Ei.increment(this.getEvenCounts(),this.getOddRoundingErrors())}l&&Ei.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}(Ei),Lx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ma=function(t){function e(n){var r=t.call(this)||this;r.readers=[];var o=n?n.get(Ft.POSSIBLE_FORMATS):null,i=n&&n.get(Ft.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return o&&((o.includes(Ue.EAN_13)||o.includes(Ue.UPC_A)||o.includes(Ue.EAN_8)||o.includes(Ue.UPC_E))&&r.readers.push(new oh(n)),o.includes(Ue.CODE_39)&&r.readers.push(new Wy(i)),o.includes(Ue.CODE_128)&&r.readers.push(new Hy),o.includes(Ue.ITF)&&r.readers.push(new Yy),o.includes(Ue.RSS_14)&&r.readers.push(new nv),o.includes(Ue.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),r.readers.push(new Nx))),r.readers.length===0&&(r.readers.push(new oh(n)),r.readers.push(new Wy),r.readers.push(new oh(n)),r.readers.push(new Hy),r.readers.push(new Yy),r.readers.push(new nv)),r}return Lx(e,t),e.prototype.decodeRow=function(n,r,o){for(var i=0;i<this.readers.length;i++)try{return this.readers[i].decodeRow(n,r,o)}catch{}throw new ge},e.prototype.reset=function(){this.readers.forEach(function(n){return n.reset()})},e}(Bn),Fx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){return n===void 0&&(n=500),t.call(this,new ma(r),n,r)||this}Fx(e,t)})(ha);var mn,rv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},It=function(){function t(e,n,r){this.ecCodewords=e,this.ecBlocks=[n],r&&this.ecBlocks.push(r)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),Ct=function(){function t(e,n){this.count=e,this.dataCodewords=n}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),jx=function(){function t(e,n,r,o,i,a){var s,c;this.versionNumber=e,this.symbolSizeRows=n,this.symbolSizeColumns=r,this.dataRegionSizeRows=o,this.dataRegionSizeColumns=i,this.ecBlocks=a;var l=0,f=a.getECCodewords(),h=a.getECBlocks();try{for(var d=rv(h),p=d.next();!p.done;p=d.next()){var u=p.value;l+=u.getCount()*(u.getDataCodewords()+f)}}catch(g){s={error:g}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(s)throw s.error}}this.totalCodewords=l}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,n){var r,o;if(1&e||1&n)throw new Ie;try{for(var i=rv(t.VERSIONS),a=i.next();!a.done;a=i.next()){var s=a.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===n)return s}}catch(c){r={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}throw new Ie},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new It(5,new Ct(1,3))),new t(2,12,12,10,10,new It(7,new Ct(1,5))),new t(3,14,14,12,12,new It(10,new Ct(1,8))),new t(4,16,16,14,14,new It(12,new Ct(1,12))),new t(5,18,18,16,16,new It(14,new Ct(1,18))),new t(6,20,20,18,18,new It(18,new Ct(1,22))),new t(7,22,22,20,20,new It(20,new Ct(1,30))),new t(8,24,24,22,22,new It(24,new Ct(1,36))),new t(9,26,26,24,24,new It(28,new Ct(1,44))),new t(10,32,32,14,14,new It(36,new Ct(1,62))),new t(11,36,36,16,16,new It(42,new Ct(1,86))),new t(12,40,40,18,18,new It(48,new Ct(1,114))),new t(13,44,44,20,20,new It(56,new Ct(1,144))),new t(14,48,48,22,22,new It(68,new Ct(1,174))),new t(15,52,52,24,24,new It(42,new Ct(2,102))),new t(16,64,64,14,14,new It(56,new Ct(2,140))),new t(17,72,72,16,16,new It(36,new Ct(4,92))),new t(18,80,80,18,18,new It(48,new Ct(4,114))),new t(19,88,88,20,20,new It(56,new Ct(4,144))),new t(20,96,96,22,22,new It(68,new Ct(4,174))),new t(21,104,104,24,24,new It(56,new Ct(6,136))),new t(22,120,120,18,18,new It(68,new Ct(6,175))),new t(23,132,132,20,20,new It(62,new Ct(8,163))),new t(24,144,144,22,22,new It(62,new Ct(8,156),new Ct(2,155))),new t(25,8,18,6,16,new It(7,new Ct(1,5))),new t(26,8,32,6,14,new It(11,new Ct(1,10))),new t(27,12,26,10,24,new It(14,new Ct(1,16))),new t(28,12,36,10,16,new It(18,new Ct(1,22))),new t(29,16,36,14,16,new It(24,new Ct(1,32))),new t(30,16,48,14,22,new It(28,new Ct(1,49)))]},t.VERSIONS=t.buildVersions(),t}(),Vx=function(){function t(e){var n=e.getHeight();if(n<8||n>144||1&n)throw new Ie;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new go(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(e){var n=e.getHeight(),r=e.getWidth();return jx.getVersionForDimensions(n,r)},t.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),n=0,r=4,o=0,i=this.mappingBitMatrix.getHeight(),a=this.mappingBitMatrix.getWidth(),s=!1,c=!1,l=!1,f=!1;do if(r!==i||o!==0||s)if(r!==i-2||o!==0||!(3&a)||c)if(r!==i+4||o!==2||7&a||l)if(r!==i-2||o!==0||(7&a)!=4||f){do r<i&&o>=0&&!this.readMappingMatrix.get(o,r)&&(e[n++]=255&this.readUtah(r,o,i,a)),r-=2,o+=2;while(r>=0&&o<a);r+=1,o+=3;do r>=0&&o<a&&!this.readMappingMatrix.get(o,r)&&(e[n++]=255&this.readUtah(r,o,i,a)),r+=2,o-=2;while(r<i&&o>=0);r+=3,o+=1}else e[n++]=255&this.readCorner4(i,a),r-=2,o+=2,f=!0;else e[n++]=255&this.readCorner3(i,a),r-=2,o+=2,l=!0;else e[n++]=255&this.readCorner2(i,a),r-=2,o+=2,c=!0;else e[n++]=255&this.readCorner1(i,a),r-=2,o+=2,s=!0;while(r<i||o<a);if(n!==this.version.getTotalCodewords())throw new Ie;return e},t.prototype.readModule=function(e,n,r,o){return e<0&&(e+=r,n+=4-(r+4&7)),n<0&&(n+=o,e+=4-(o+4&7)),this.readMappingMatrix.set(n,e),this.mappingBitMatrix.get(n,e)},t.prototype.readUtah=function(e,n,r,o){var i=0;return this.readModule(e-2,n-2,r,o)&&(i|=1),i<<=1,this.readModule(e-2,n-1,r,o)&&(i|=1),i<<=1,this.readModule(e-1,n-2,r,o)&&(i|=1),i<<=1,this.readModule(e-1,n-1,r,o)&&(i|=1),i<<=1,this.readModule(e-1,n,r,o)&&(i|=1),i<<=1,this.readModule(e,n-2,r,o)&&(i|=1),i<<=1,this.readModule(e,n-1,r,o)&&(i|=1),i<<=1,this.readModule(e,n,r,o)&&(i|=1),i},t.prototype.readCorner1=function(e,n){var r=0;return this.readModule(e-1,0,e,n)&&(r|=1),r<<=1,this.readModule(e-1,1,e,n)&&(r|=1),r<<=1,this.readModule(e-1,2,e,n)&&(r|=1),r<<=1,this.readModule(0,n-2,e,n)&&(r|=1),r<<=1,this.readModule(0,n-1,e,n)&&(r|=1),r<<=1,this.readModule(1,n-1,e,n)&&(r|=1),r<<=1,this.readModule(2,n-1,e,n)&&(r|=1),r<<=1,this.readModule(3,n-1,e,n)&&(r|=1),r},t.prototype.readCorner2=function(e,n){var r=0;return this.readModule(e-3,0,e,n)&&(r|=1),r<<=1,this.readModule(e-2,0,e,n)&&(r|=1),r<<=1,this.readModule(e-1,0,e,n)&&(r|=1),r<<=1,this.readModule(0,n-4,e,n)&&(r|=1),r<<=1,this.readModule(0,n-3,e,n)&&(r|=1),r<<=1,this.readModule(0,n-2,e,n)&&(r|=1),r<<=1,this.readModule(0,n-1,e,n)&&(r|=1),r<<=1,this.readModule(1,n-1,e,n)&&(r|=1),r},t.prototype.readCorner3=function(e,n){var r=0;return this.readModule(e-1,0,e,n)&&(r|=1),r<<=1,this.readModule(e-1,n-1,e,n)&&(r|=1),r<<=1,this.readModule(0,n-3,e,n)&&(r|=1),r<<=1,this.readModule(0,n-2,e,n)&&(r|=1),r<<=1,this.readModule(0,n-1,e,n)&&(r|=1),r<<=1,this.readModule(1,n-3,e,n)&&(r|=1),r<<=1,this.readModule(1,n-2,e,n)&&(r|=1),r<<=1,this.readModule(1,n-1,e,n)&&(r|=1),r},t.prototype.readCorner4=function(e,n){var r=0;return this.readModule(e-3,0,e,n)&&(r|=1),r<<=1,this.readModule(e-2,0,e,n)&&(r|=1),r<<=1,this.readModule(e-1,0,e,n)&&(r|=1),r<<=1,this.readModule(0,n-2,e,n)&&(r|=1),r<<=1,this.readModule(0,n-1,e,n)&&(r|=1),r<<=1,this.readModule(1,n-1,e,n)&&(r|=1),r<<=1,this.readModule(2,n-1,e,n)&&(r|=1),r<<=1,this.readModule(3,n-1,e,n)&&(r|=1),r},t.prototype.extractDataRegion=function(e){var n=this.version.getSymbolSizeRows(),r=this.version.getSymbolSizeColumns();if(e.getHeight()!==n)throw new Ke("Dimension of bitMatrix must match the version size");for(var o=this.version.getDataRegionSizeRows(),i=this.version.getDataRegionSizeColumns(),a=n/o|0,s=r/i|0,c=new go(s*i,a*o),l=0;l<a;++l)for(var f=l*o,h=0;h<s;++h)for(var d=h*i,p=0;p<o;++p)for(var u=l*(o+2)+1+p,g=f+p,m=0;m<i;++m){var y=h*(i+2)+1+m;if(e.get(y,u)){var w=d+m;c.set(w,g)}}return c},t}(),ov=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ux=function(){function t(e,n){this.numDataCodewords=e,this.codewords=n}return t.getDataBlocks=function(e,n){var r,o,i,a,s=n.getECBlocks(),c=0,l=s.getECBlocks();try{for(var f=ov(l),h=f.next();!h.done;h=f.next())c+=(m=h.value).getCount()}catch(K){r={error:K}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}var d=new Array(c),p=0;try{for(var u=ov(l),g=u.next();!g.done;g=u.next())for(var m=g.value,y=0;y<m.getCount();y++){var w=m.getDataCodewords(),b=s.getECCodewords()+w;d[p++]=new t(w,new Uint8Array(b))}}catch(K){i={error:K}}finally{try{g&&!g.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}var E=d[0].codewords.length-s.getECCodewords(),C=E-1,S=0;for(y=0;y<C;y++)for(var T=0;T<p;T++)d[T].codewords[y]=e[S++];var P=n.getVersionNumber()===24,N=P?8:p;for(T=0;T<N;T++)d[T].codewords[E-1]=e[S++];var L=d[0].codewords.length;for(y=E;y<L;y++)for(T=0;T<p;T++){var U=P?(T+8)%p:T,j=P&&U>7?y-1:y;d[U].codewords[j]=e[S++]}if(S!==e.length)throw new Ke;return d},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}(),iv=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 Ke(""+e);var n=0,r=this.bitOffset,o=this.byteOffset,i=this.bytes;if(r>0){var a=8-r,s=e<a?e:a,c=255>>8-s<<(l=a-s);n=(i[o]&c)>>l,e-=s,(r+=s)===8&&(r=0,o++)}if(e>0){for(;e>=8;)n=n<<8|255&i[o],o++,e-=8;if(e>0){var l;c=255>>(l=8-e)<<l,n=n<<e|(i[o]&c)>>l,r+=e}}return this.bitOffset=r,this.byteOffset=o,n},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();(function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"})(mn||(mn={}));var ya,Gx=function(){function t(){}return t.decode=function(e){var n=new iv(e),r=new Nt,o=new Nt,i=new Array,a=mn.ASCII_ENCODE;do if(a===mn.ASCII_ENCODE)a=this.decodeAsciiSegment(n,r,o);else{switch(a){case mn.C40_ENCODE:this.decodeC40Segment(n,r);break;case mn.TEXT_ENCODE:this.decodeTextSegment(n,r);break;case mn.ANSIX12_ENCODE:this.decodeAnsiX12Segment(n,r);break;case mn.EDIFACT_ENCODE:this.decodeEdifactSegment(n,r);break;case mn.BASE256_ENCODE:this.decodeBase256Segment(n,r,i);break;default:throw new Ie}a=mn.ASCII_ENCODE}while(a!==mn.PAD_ENCODE&&n.available()>0);return o.length()>0&&r.append(o.toString()),new Du(e,r.toString(),i.length===0?null:i,null)},t.decodeAsciiSegment=function(e,n,r){var o=!1;do{var i=e.readBits(8);if(i===0)throw new Ie;if(i<=128)return o&&(i+=128),n.append(String.fromCharCode(i-1)),mn.ASCII_ENCODE;if(i===129)return mn.PAD_ENCODE;if(i<=229){var a=i-130;a<10&&n.append("0"),n.append(""+a)}else switch(i){case 230:return mn.C40_ENCODE;case 231:return mn.BASE256_ENCODE;case 232:n.append("");break;case 233:case 234:case 241:break;case 235:o=!0;break;case 236:n.append("[)>05"),r.insert(0,"");break;case 237:n.append("[)>06"),r.insert(0,"");break;case 238:return mn.ANSIX12_ENCODE;case 239:return mn.TEXT_ENCODE;case 240:return mn.EDIFACT_ENCODE;default:if(i!==254||e.available()!==0)throw new Ie}}while(e.available()>0);return mn.ASCII_ENCODE},t.decodeC40Segment=function(e,n){var r=!1,o=[],i=0;do{if(e.available()===8)return;var a=e.readBits(8);if(a===254)return;this.parseTwoBytes(a,e.readBits(8),o);for(var s=0;s<3;s++){var c=o[s];switch(i){case 0:if(c<3)i=c+1;else{if(!(c<this.C40_BASIC_SET_CHARS.length))throw new Ie;var l=this.C40_BASIC_SET_CHARS[c];r?(n.append(String.fromCharCode(l.charCodeAt(0)+128)),r=!1):n.append(l)}break;case 1:r?(n.append(String.fromCharCode(c+128)),r=!1):n.append(String.fromCharCode(c)),i=0;break;case 2:if(c<this.C40_SHIFT2_SET_CHARS.length)l=this.C40_SHIFT2_SET_CHARS[c],r?(n.append(String.fromCharCode(l.charCodeAt(0)+128)),r=!1):n.append(l);else switch(c){case 27:n.append("");break;case 30:r=!0;break;default:throw new Ie}i=0;break;case 3:r?(n.append(String.fromCharCode(c+224)),r=!1):n.append(String.fromCharCode(c+96)),i=0;break;default:throw new Ie}}}while(e.available()>0)},t.decodeTextSegment=function(e,n){var r=!1,o=[],i=0;do{if(e.available()===8)return;var a=e.readBits(8);if(a===254)return;this.parseTwoBytes(a,e.readBits(8),o);for(var s=0;s<3;s++){var c=o[s];switch(i){case 0:if(c<3)i=c+1;else{if(!(c<this.TEXT_BASIC_SET_CHARS.length))throw new Ie;var l=this.TEXT_BASIC_SET_CHARS[c];r?(n.append(String.fromCharCode(l.charCodeAt(0)+128)),r=!1):n.append(l)}break;case 1:r?(n.append(String.fromCharCode(c+128)),r=!1):n.append(String.fromCharCode(c)),i=0;break;case 2:if(c<this.TEXT_SHIFT2_SET_CHARS.length)l=this.TEXT_SHIFT2_SET_CHARS[c],r?(n.append(String.fromCharCode(l.charCodeAt(0)+128)),r=!1):n.append(l);else switch(c){case 27:n.append("");break;case 30:r=!0;break;default:throw new Ie}i=0;break;case 3:if(!(c<this.TEXT_SHIFT3_SET_CHARS.length))throw new Ie;l=this.TEXT_SHIFT3_SET_CHARS[c],r?(n.append(String.fromCharCode(l.charCodeAt(0)+128)),r=!1):n.append(l),i=0;break;default:throw new Ie}}}while(e.available()>0)},t.decodeAnsiX12Segment=function(e,n){var r=[];do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),r);for(var i=0;i<3;i++){var a=r[i];switch(a){case 0:n.append("\r");break;case 1:n.append("*");break;case 2:n.append(">");break;case 3:n.append(" ");break;default:if(a<14)n.append(String.fromCharCode(a+44));else{if(!(a<40))throw new Ie;n.append(String.fromCharCode(a+51))}}}}while(e.available()>0)},t.parseTwoBytes=function(e,n,r){var o=(e<<8)+n-1,i=Math.floor(o/1600);r[0]=i,o-=1600*i,i=Math.floor(o/40),r[1]=i,r[2]=o-40*i},t.decodeEdifactSegment=function(e,n){do{if(e.available()<=16)return;for(var r=0;r<4;r++){var o=e.readBits(6);if(o===31){var i=8-e.getBitOffset();return void(i!==8&&e.readBits(i))}!(32&o)&&(o|=64),n.append(String.fromCharCode(o))}}while(e.available()>0)},t.decodeBase256Segment=function(e,n,r){var o,i=1+e.getByteOffset(),a=this.unrandomize255State(e.readBits(8),i++);if((o=a===0?e.available()/8|0:a<250?a:250*(a-249)+this.unrandomize255State(e.readBits(8),i++))<0)throw new Ie;for(var s=new Uint8Array(o),c=0;c<o;c++){if(e.available()<8)throw new Ie;s[c]=this.unrandomize255State(e.readBits(8),i++)}r.push(s);try{n.append(bi.decode(s,bn.ISO88591))}catch(l){throw new Bs("Platform does not support required encoding: "+l.message)}},t.unrandomize255State=function(e,n){var r=e-(149*n%255+1);return r>=0?r:r+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],t.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],t.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~",""],t}(),qx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hx=function(){function t(){this.rsDecoder=new Lu(Ko.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var n,r,o=new Vx(e),i=o.getVersion(),a=o.readCodewords(),s=Ux.getDataBlocks(a,i),c=0;try{for(var l=qx(s),f=l.next();!f.done;f=l.next())c+=f.value.getNumDataCodewords()}catch(w){n={error:w}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}for(var h=new Uint8Array(c),d=s.length,p=0;p<d;p++){var u=s[p],g=u.getCodewords(),m=u.getNumDataCodewords();this.correctErrors(g,m);for(var y=0;y<m;y++)h[y*d+p]=g[y]}return Gx.decode(h)},t.prototype.correctErrors=function(e,n){var r=new Int32Array(e);try{this.rsDecoder.decode(r,e.length-n)}catch{throw new pn}for(var o=0;o<n;o++)e[o]=r[o]},t}(),Wx=function(){function t(e){this.image=e,this.rectangleDetector=new eh(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),n=this.detectSolid1(e);if((n=this.detectSolid2(n))[3]=this.correctTopRight(n),!n[3])throw new ge;var r=(n=this.shiftToModuleCenter(n))[0],o=n[1],i=n[2],a=n[3],s=this.transitionsBetween(r,a)+1,c=this.transitionsBetween(i,a)+1;(1&s)==1&&(s+=1),(1&c)==1&&(c+=1),4*s<7*c&&4*c<7*s&&(s=c=Math.max(s,c));var l=t.sampleGrid(this.image,r,o,i,a,s,c);return new Zf(l,[r,o,i,a])},t.shiftPoint=function(e,n,r){var o=(n.getX()-e.getX())/(r+1),i=(n.getY()-e.getY())/(r+1);return new Me(e.getX()+o,e.getY()+i)},t.moveAway=function(e,n,r){var o=e.getX(),i=e.getY();return o<n?o-=1:o+=1,i<r?i-=1:i+=1,new Me(o,i)},t.prototype.detectSolid1=function(e){var n=e[0],r=e[1],o=e[3],i=e[2],a=this.transitionsBetween(n,r),s=this.transitionsBetween(r,o),c=this.transitionsBetween(o,i),l=this.transitionsBetween(i,n),f=a,h=[i,n,r,o];return f>s&&(f=s,h[0]=n,h[1]=r,h[2]=o,h[3]=i),f>c&&(f=c,h[0]=r,h[1]=o,h[2]=i,h[3]=n),f>l&&(h[0]=o,h[1]=i,h[2]=n,h[3]=r),h},t.prototype.detectSolid2=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i),s=t.shiftPoint(r,o,4*(a+1)),c=t.shiftPoint(o,r,4*(a+1));return this.transitionsBetween(s,n)<this.transitionsBetween(c,i)?(e[0]=n,e[1]=r,e[2]=o,e[3]=i):(e[0]=r,e[1]=o,e[2]=i,e[3]=n),e},t.prototype.correctTopRight=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i),s=this.transitionsBetween(r,i),c=t.shiftPoint(n,r,4*(s+1)),l=t.shiftPoint(o,r,4*(a+1));a=this.transitionsBetween(c,i),s=this.transitionsBetween(l,i);var f=new Me(i.getX()+(o.getX()-r.getX())/(a+1),i.getY()+(o.getY()-r.getY())/(a+1)),h=new Me(i.getX()+(n.getX()-r.getX())/(s+1),i.getY()+(n.getY()-r.getY())/(s+1));return this.isValid(f)?this.isValid(h)?this.transitionsBetween(c,f)+this.transitionsBetween(l,f)>this.transitionsBetween(c,h)+this.transitionsBetween(l,h)?f:h:f:this.isValid(h)?h:null},t.prototype.shiftToModuleCenter=function(e){var n=e[0],r=e[1],o=e[2],i=e[3],a=this.transitionsBetween(n,i)+1,s=this.transitionsBetween(o,i)+1,c=t.shiftPoint(n,r,4*s),l=t.shiftPoint(o,r,4*a);(1&(a=this.transitionsBetween(c,i)+1))==1&&(a+=1),(1&(s=this.transitionsBetween(l,i)+1))==1&&(s+=1);var f,h,d=(n.getX()+r.getX()+o.getX()+i.getX())/4,p=(n.getY()+r.getY()+o.getY()+i.getY())/4;return n=t.moveAway(n,d,p),r=t.moveAway(r,d,p),o=t.moveAway(o,d,p),i=t.moveAway(i,d,p),c=t.shiftPoint(n,r,4*s),c=t.shiftPoint(c,i,4*a),f=t.shiftPoint(r,n,4*s),f=t.shiftPoint(f,o,4*a),l=t.shiftPoint(o,i,4*s),l=t.shiftPoint(l,r,4*a),h=t.shiftPoint(i,o,4*s),[c,f,l,h=t.shiftPoint(h,n,4*a)]},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,n,r,o,i,a,s){return th.getInstance().sampleGrid(e,a,s,.5,.5,a-.5,.5,a-.5,s-.5,.5,s-.5,n.getX(),n.getY(),i.getX(),i.getY(),o.getX(),o.getY(),r.getX(),r.getY())},t.prototype.transitionsBetween=function(e,n){var r=Math.trunc(e.getX()),o=Math.trunc(e.getY()),i=Math.trunc(n.getX()),a=Math.trunc(n.getY()),s=Math.abs(a-o)>Math.abs(i-r);if(s){var c=r;r=o,o=c,c=i,i=a,a=c}for(var l=Math.abs(i-r),f=Math.abs(a-o),h=-l/2,d=o<a?1:-1,p=r<i?1:-1,u=0,g=this.image.get(s?o:r,s?r:o),m=r,y=o;m!==i;m+=p){var w=this.image.get(s?y:m,s?m:y);if(w!==g&&(u++,g=w),(h+=f)>0){if(y===a)break;y+=d,h-=l}}return u},t}(),Hu=function(){function t(){this.decoder=new Hx}return t.prototype.decode=function(e,n){var r,o;if(n===void 0&&(n=null),n!=null&&n.has(Ft.PURE_BARCODE)){var i=t.extractPureBits(e.getBlackMatrix());r=this.decoder.decode(i),o=t.NO_POINTS}else{var a=new Wx(e.getBlackMatrix()).detect();r=this.decoder.decode(a.getBits()),o=a.getPoints()}var s=r.getRawBytes(),c=new ir(r.getText(),s,8*s.length,o,Ue.DATA_MATRIX,Ut.currentTimeMillis()),l=r.getByteSegments();l!=null&&c.putMetadata(kn.BYTE_SEGMENTS,l);var f=r.getECLevel();return f!=null&&c.putMetadata(kn.ERROR_CORRECTION_LEVEL,f),c},t.prototype.reset=function(){},t.extractPureBits=function(e){var n=e.getTopLeftOnBit(),r=e.getBottomRightOnBit();if(n==null||r==null)throw new ge;var o=this.moduleSize(n,e),i=n[1],a=r[1],s=n[0],c=(r[0]-s+1)/o,l=(a-i+1)/o;if(c<=0||l<=0)throw new ge;var f=o/2;i+=f,s+=f;for(var h=new go(c,l),d=0;d<l;d++)for(var p=i+d*o,u=0;u<c;u++)e.get(s+u*o,p)&&h.set(u,d);return h},t.moduleSize=function(e,n){for(var r=n.getWidth(),o=e[0],i=e[1];o<r&&n.get(o,i);)o++;if(o===r)throw new ge;var a=o-e[0];if(a===0)throw new ge;return a},t.NO_POINTS=[],t}(),Yx=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n){return n===void 0&&(n=500),t.call(this,new Hu,n)||this}Yx(e,t)})(ha),function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"}(ya||(ya={}));var En,Kx=function(){function t(e,n,r){this.value=e,this.stringValue=n,this.bits=r,t.FOR_BITS.set(r,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 Zt(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.value===n.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new Ke;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(ya.L,"L",1),t.M=new t(ya.M,"M",0),t.Q=new t(ya.Q,"Q",3),t.H=new t(ya.H,"H",2),t}(),zx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},av=function(){function t(e){this.errorCorrectionLevel=Kx.forBits(e>>3&3),this.dataMask=7&e}return t.numBitsDiffering=function(e,n){return On.bitCount(e^n)},t.decodeFormatInformation=function(e,n){var r=t.doDecodeFormatInformation(e,n);return r!==null?r:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,n^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,n){var r,o,i=Number.MAX_SAFE_INTEGER,a=0;try{for(var s=zx(t.FORMAT_INFO_DECODE_LOOKUP),c=s.next();!c.done;c=s.next()){var l=c.value,f=l[0];if(f===e||f===n)return new t(l[1]);var h=t.numBitsDiffering(e,f);h<i&&(a=l[1],i=h),e!==n&&(h=t.numBitsDiffering(n,f))<i&&(a=l[1],i=h)}}catch(d){r={error:d}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i<=3?new t(a):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var n=e;return this.errorCorrectionLevel===n.errorCorrectionLevel&&this.dataMask===n.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}(),$x=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ie=function(){function t(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.ecCodewordsPerBlock=e,this.ecBlocks=n}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var e,n,r=0,o=this.ecBlocks;try{for(var i=$x(o),a=i.next();!a.done;a=i.next())r+=a.value.getCount()}catch(s){e={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t}(),D=function(){function t(e,n){this.count=e,this.dataCodewords=n}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t}(),Xx=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wu=function(){function t(e,n){for(var r,o,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];this.versionNumber=e,this.alignmentPatternCenters=n,this.ecBlocks=i;var s=0,c=i[0].getECCodewordsPerBlock(),l=i[0].getECBlocks();try{for(var f=Xx(l),h=f.next();!h.done;h=f.next()){var d=h.value;s+=d.getCount()*(d.getDataCodewords()+c)}}catch(p){r={error:p}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.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 Ie;try{return this.getVersionForNumber((e-17)/4)}catch{throw new Ie}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new Ke;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var n=Number.MAX_SAFE_INTEGER,r=0,o=0;o<t.VERSION_DECODE_INFO.length;o++){var i=t.VERSION_DECODE_INFO[o];if(i===e)return t.getVersionForNumber(o+7);var a=av.numBitsDiffering(e,i);a<n&&(r=o+7,n=a)}return n<=3?t.getVersionForNumber(r):null},t.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),n=new go(e);n.setRegion(0,0,9,9),n.setRegion(e-8,0,8,9),n.setRegion(0,e-8,9,8);for(var r=this.alignmentPatternCenters.length,o=0;o<r;o++)for(var i=this.alignmentPatternCenters[o]-2,a=0;a<r;a++)o===0&&(a===0||a===r-1)||o===r-1&&a===0||n.setRegion(this.alignmentPatternCenters[a]-2,i,5,5);return n.setRegion(6,9,1,e-17),n.setRegion(9,6,e-17,1),this.versionNumber>6&&(n.setRegion(e-11,0,3,6),n.setRegion(0,e-11,6,3)),n},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 ie(7,new D(1,19)),new ie(10,new D(1,16)),new ie(13,new D(1,13)),new ie(17,new D(1,9))),new t(2,Int32Array.from([6,18]),new ie(10,new D(1,34)),new ie(16,new D(1,28)),new ie(22,new D(1,22)),new ie(28,new D(1,16))),new t(3,Int32Array.from([6,22]),new ie(15,new D(1,55)),new ie(26,new D(1,44)),new ie(18,new D(2,17)),new ie(22,new D(2,13))),new t(4,Int32Array.from([6,26]),new ie(20,new D(1,80)),new ie(18,new D(2,32)),new ie(26,new D(2,24)),new ie(16,new D(4,9))),new t(5,Int32Array.from([6,30]),new ie(26,new D(1,108)),new ie(24,new D(2,43)),new ie(18,new D(2,15),new D(2,16)),new ie(22,new D(2,11),new D(2,12))),new t(6,Int32Array.from([6,34]),new ie(18,new D(2,68)),new ie(16,new D(4,27)),new ie(24,new D(4,19)),new ie(28,new D(4,15))),new t(7,Int32Array.from([6,22,38]),new ie(20,new D(2,78)),new ie(18,new D(4,31)),new ie(18,new D(2,14),new D(4,15)),new ie(26,new D(4,13),new D(1,14))),new t(8,Int32Array.from([6,24,42]),new ie(24,new D(2,97)),new ie(22,new D(2,38),new D(2,39)),new ie(22,new D(4,18),new D(2,19)),new ie(26,new D(4,14),new D(2,15))),new t(9,Int32Array.from([6,26,46]),new ie(30,new D(2,116)),new ie(22,new D(3,36),new D(2,37)),new ie(20,new D(4,16),new D(4,17)),new ie(24,new D(4,12),new D(4,13))),new t(10,Int32Array.from([6,28,50]),new ie(18,new D(2,68),new D(2,69)),new ie(26,new D(4,43),new D(1,44)),new ie(24,new D(6,19),new D(2,20)),new ie(28,new D(6,15),new D(2,16))),new t(11,Int32Array.from([6,30,54]),new ie(20,new D(4,81)),new ie(30,new D(1,50),new D(4,51)),new ie(28,new D(4,22),new D(4,23)),new ie(24,new D(3,12),new D(8,13))),new t(12,Int32Array.from([6,32,58]),new ie(24,new D(2,92),new D(2,93)),new ie(22,new D(6,36),new D(2,37)),new ie(26,new D(4,20),new D(6,21)),new ie(28,new D(7,14),new D(4,15))),new t(13,Int32Array.from([6,34,62]),new ie(26,new D(4,107)),new ie(22,new D(8,37),new D(1,38)),new ie(24,new D(8,20),new D(4,21)),new ie(22,new D(12,11),new D(4,12))),new t(14,Int32Array.from([6,26,46,66]),new ie(30,new D(3,115),new D(1,116)),new ie(24,new D(4,40),new D(5,41)),new ie(20,new D(11,16),new D(5,17)),new ie(24,new D(11,12),new D(5,13))),new t(15,Int32Array.from([6,26,48,70]),new ie(22,new D(5,87),new D(1,88)),new ie(24,new D(5,41),new D(5,42)),new ie(30,new D(5,24),new D(7,25)),new ie(24,new D(11,12),new D(7,13))),new t(16,Int32Array.from([6,26,50,74]),new ie(24,new D(5,98),new D(1,99)),new ie(28,new D(7,45),new D(3,46)),new ie(24,new D(15,19),new D(2,20)),new ie(30,new D(3,15),new D(13,16))),new t(17,Int32Array.from([6,30,54,78]),new ie(28,new D(1,107),new D(5,108)),new ie(28,new D(10,46),new D(1,47)),new ie(28,new D(1,22),new D(15,23)),new ie(28,new D(2,14),new D(17,15))),new t(18,Int32Array.from([6,30,56,82]),new ie(30,new D(5,120),new D(1,121)),new ie(26,new D(9,43),new D(4,44)),new ie(28,new D(17,22),new D(1,23)),new ie(28,new D(2,14),new D(19,15))),new t(19,Int32Array.from([6,30,58,86]),new ie(28,new D(3,113),new D(4,114)),new ie(26,new D(3,44),new D(11,45)),new ie(26,new D(17,21),new D(4,22)),new ie(26,new D(9,13),new D(16,14))),new t(20,Int32Array.from([6,34,62,90]),new ie(28,new D(3,107),new D(5,108)),new ie(26,new D(3,41),new D(13,42)),new ie(30,new D(15,24),new D(5,25)),new ie(28,new D(15,15),new D(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new ie(28,new D(4,116),new D(4,117)),new ie(26,new D(17,42)),new ie(28,new D(17,22),new D(6,23)),new ie(30,new D(19,16),new D(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new ie(28,new D(2,111),new D(7,112)),new ie(28,new D(17,46)),new ie(30,new D(7,24),new D(16,25)),new ie(24,new D(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new ie(30,new D(4,121),new D(5,122)),new ie(28,new D(4,47),new D(14,48)),new ie(30,new D(11,24),new D(14,25)),new ie(30,new D(16,15),new D(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new ie(30,new D(6,117),new D(4,118)),new ie(28,new D(6,45),new D(14,46)),new ie(30,new D(11,24),new D(16,25)),new ie(30,new D(30,16),new D(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new ie(26,new D(8,106),new D(4,107)),new ie(28,new D(8,47),new D(13,48)),new ie(30,new D(7,24),new D(22,25)),new ie(30,new D(22,15),new D(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new ie(28,new D(10,114),new D(2,115)),new ie(28,new D(19,46),new D(4,47)),new ie(28,new D(28,22),new D(6,23)),new ie(30,new D(33,16),new D(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new ie(30,new D(8,122),new D(4,123)),new ie(28,new D(22,45),new D(3,46)),new ie(30,new D(8,23),new D(26,24)),new ie(30,new D(12,15),new D(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new ie(30,new D(3,117),new D(10,118)),new ie(28,new D(3,45),new D(23,46)),new ie(30,new D(4,24),new D(31,25)),new ie(30,new D(11,15),new D(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new ie(30,new D(7,116),new D(7,117)),new ie(28,new D(21,45),new D(7,46)),new ie(30,new D(1,23),new D(37,24)),new ie(30,new D(19,15),new D(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new ie(30,new D(5,115),new D(10,116)),new ie(28,new D(19,47),new D(10,48)),new ie(30,new D(15,24),new D(25,25)),new ie(30,new D(23,15),new D(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new ie(30,new D(13,115),new D(3,116)),new ie(28,new D(2,46),new D(29,47)),new ie(30,new D(42,24),new D(1,25)),new ie(30,new D(23,15),new D(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new ie(30,new D(17,115)),new ie(28,new D(10,46),new D(23,47)),new ie(30,new D(10,24),new D(35,25)),new ie(30,new D(19,15),new D(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new ie(30,new D(17,115),new D(1,116)),new ie(28,new D(14,46),new D(21,47)),new ie(30,new D(29,24),new D(19,25)),new ie(30,new D(11,15),new D(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new ie(30,new D(13,115),new D(6,116)),new ie(28,new D(14,46),new D(23,47)),new ie(30,new D(44,24),new D(7,25)),new ie(30,new D(59,16),new D(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new ie(30,new D(12,121),new D(7,122)),new ie(28,new D(12,47),new D(26,48)),new ie(30,new D(39,24),new D(14,25)),new ie(30,new D(22,15),new D(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new ie(30,new D(6,121),new D(14,122)),new ie(28,new D(6,47),new D(34,48)),new ie(30,new D(46,24),new D(10,25)),new ie(30,new D(2,15),new D(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new ie(30,new D(17,122),new D(4,123)),new ie(28,new D(29,46),new D(14,47)),new ie(30,new D(49,24),new D(10,25)),new ie(30,new D(24,15),new D(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new ie(30,new D(4,122),new D(18,123)),new ie(28,new D(13,46),new D(32,47)),new ie(30,new D(48,24),new D(14,25)),new ie(30,new D(42,15),new D(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new ie(30,new D(20,117),new D(4,118)),new ie(28,new D(40,47),new D(7,48)),new ie(30,new D(43,24),new D(22,25)),new ie(30,new D(10,15),new D(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new ie(30,new D(19,118),new D(6,119)),new ie(28,new D(18,47),new D(31,48)),new ie(30,new D(34,24),new D(34,25)),new ie(30,new D(20,15),new D(61,16)))],t}();(function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"})(En||(En={}));var kr,sv=function(){function t(e,n){this.value=e,this.isMasked=n}return t.prototype.unmaskBitMatrix=function(e,n){for(var r=0;r<n;r++)for(var o=0;o<n;o++)this.isMasked(r,o)&&e.flip(o,r)},t.values=new Map([[En.DATA_MASK_000,new t(En.DATA_MASK_000,function(e,n){return(e+n&1)==0})],[En.DATA_MASK_001,new t(En.DATA_MASK_001,function(e,n){return(1&e)==0})],[En.DATA_MASK_010,new t(En.DATA_MASK_010,function(e,n){return n%3==0})],[En.DATA_MASK_011,new t(En.DATA_MASK_011,function(e,n){return(e+n)%3==0})],[En.DATA_MASK_100,new t(En.DATA_MASK_100,function(e,n){return(Math.floor(e/2)+Math.floor(n/3)&1)==0})],[En.DATA_MASK_101,new t(En.DATA_MASK_101,function(e,n){return e*n%6==0})],[En.DATA_MASK_110,new t(En.DATA_MASK_110,function(e,n){return e*n%6<3})],[En.DATA_MASK_111,new t(En.DATA_MASK_111,function(e,n){return(e+n+e*n%3&1)==0})]]),t}(),Qx=function(){function t(e){var n=e.getHeight();if(n<21||(3&n)!=1)throw new Ie;this.bitMatrix=e}return t.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;for(var e=0,n=0;n<6;n++)e=this.copyBit(n,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var r=5;r>=0;r--)e=this.copyBit(8,r,e);var o=this.bitMatrix.getHeight(),i=0,a=o-7;for(r=o-1;r>=a;r--)i=this.copyBit(8,r,i);for(n=o-8;n<o;n++)i=this.copyBit(n,8,i);if(this.parsedFormatInfo=av.decodeFormatInformation(e,i),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new Ie},t.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var e=this.bitMatrix.getHeight(),n=Math.floor((e-17)/4);if(n<=6)return Wu.getVersionForNumber(n);for(var r=0,o=e-11,i=5;i>=0;i--)for(var a=e-9;a>=o;a--)r=this.copyBit(a,i,r);var s=Wu.decodeVersionInformation(r);if(s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;for(r=0,a=5;a>=0;a--)for(i=e-9;i>=o;i--)r=this.copyBit(a,i,r);if((s=Wu.decodeVersionInformation(r))!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new Ie},t.prototype.copyBit=function(e,n,r){return(this.isMirror?this.bitMatrix.get(n,e):this.bitMatrix.get(e,n))?r<<1|1:r<<1},t.prototype.readCodewords=function(){var e=this.readFormatInformation(),n=this.readVersion(),r=sv.values.get(e.getDataMask()),o=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,o);for(var i=n.buildFunctionPattern(),a=!0,s=new Uint8Array(n.getTotalCodewords()),c=0,l=0,f=0,h=o-1;h>0;h-=2){h===6&&h--;for(var d=0;d<o;d++)for(var p=a?o-1-d:d,u=0;u<2;u++)i.get(h-u,p)||(f++,l<<=1,this.bitMatrix.get(h-u,p)&&(l|=1),f===8&&(s[c++]=l,f=0,l=0));a=!a}if(c!==n.getTotalCodewords())throw new Ie;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=sv.values[this.parsedFormatInfo.getDataMask()],n=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,n)}},t.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},t.prototype.mirror=function(){for(var e=this.bitMatrix,n=0,r=e.getWidth();n<r;n++)for(var o=n+1,i=e.getHeight();o<i;o++)e.get(n,o)!==e.get(o,n)&&(e.flip(o,n),e.flip(n,o))},t}(),cv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jx=function(){function t(e,n){this.numDataCodewords=e,this.codewords=n}return t.getDataBlocks=function(e,n,r){var o,i,a,s;if(e.length!==n.getTotalCodewords())throw new Ke;var c=n.getECBlocksForLevel(r),l=0,f=c.getECBlocks();try{for(var h=cv(f),d=h.next();!d.done;d=h.next())l+=(y=d.value).getCount()}catch(j){o={error:j}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(o)throw o.error}}var p=new Array(l),u=0;try{for(var g=cv(f),m=g.next();!m.done;m=g.next())for(var y=m.value,w=0;w<y.getCount();w++){var b=y.getDataCodewords(),E=c.getECCodewordsPerBlock()+b;p[u++]=new t(b,new Uint8Array(E))}}catch(j){a={error:j}}finally{try{m&&!m.done&&(s=g.return)&&s.call(g)}finally{if(a)throw a.error}}for(var C=p[0].codewords.length,S=p.length-1;S>=0&&p[S].codewords.length!==C;)S--;S++;var T=C-c.getECCodewordsPerBlock(),P=0;for(w=0;w<T;w++)for(var N=0;N<u;N++)p[N].codewords[w]=e[P++];for(N=S;N<u;N++)p[N].codewords[T]=e[P++];var L=p[0].codewords.length;for(w=T;w<L;w++)for(N=0;N<u;N++){var U=N<S?w:w+1;p[N].codewords[U]=e[P++]}return p},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t}();(function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"})(kr||(kr={}));var kt,Yu,vr=function(){function t(e,n,r,o){this.value=e,this.stringValue=n,this.characterCountBitsForVersions=r,this.bits=o,t.FOR_BITS.set(o,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var n=t.FOR_BITS.get(e);if(n===void 0)throw new Ke;return n},t.prototype.getCharacterCountBits=function(e){var n,r=e.getVersionNumber();return n=r<=9?0:r<=26?1: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 n=e;return this.value===n.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(kr.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(kr.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(kr.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(kr.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(kr.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(kr.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(kr.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(kr.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(kr.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(kr.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t}(),Zx=function(){function t(){}return t.decode=function(e,n,r,o){var i=new iv(e),a=new Nt,s=new Array,c=-1,l=-1;try{var f=null,h=!1,d=void 0;do{if(i.available()<4)d=vr.TERMINATOR;else{var p=i.readBits(4);d=vr.forBits(p)}switch(d){case vr.TERMINATOR:break;case vr.FNC1_FIRST_POSITION:case vr.FNC1_SECOND_POSITION:h=!0;break;case vr.STRUCTURED_APPEND:if(i.available()<16)throw new Ie;c=i.readBits(8),l=i.readBits(8);break;case vr.ECI:var u=t.parseECIValue(i);if((f=or.getCharacterSetECIByValue(u))===null)throw new Ie;break;case vr.HANZI:var g=i.readBits(4),m=i.readBits(d.getCharacterCountBits(n));g===t.GB2312_SUBSET&&t.decodeHanziSegment(i,a,m);break;default:var y=i.readBits(d.getCharacterCountBits(n));switch(d){case vr.NUMERIC:t.decodeNumericSegment(i,a,y);break;case vr.ALPHANUMERIC:t.decodeAlphanumericSegment(i,a,y,h);break;case vr.BYTE:t.decodeByteSegment(i,a,y,f,s,o);break;case vr.KANJI:t.decodeKanjiSegment(i,a,y);break;default:throw new Ie}}}while(d!==vr.TERMINATOR)}catch{throw new Ie}return new Du(e,a.toString(),s.length===0?null:s,r===null?null:r.toString(),c,l)},t.decodeHanziSegment=function(e,n,r){if(13*r>e.available())throw new Ie;for(var o=new Uint8Array(2*r),i=0;r>0;){var a=e.readBits(13),s=a/96<<8&4294967295|a%96;s+=s<959?41377:42657,o[i]=s>>8&255,o[i+1]=255&s,i+=2,r--}try{n.append(bi.decode(o,bn.GB2312))}catch(c){throw new Ie(c)}},t.decodeKanjiSegment=function(e,n,r){if(13*r>e.available())throw new Ie;for(var o=new Uint8Array(2*r),i=0;r>0;){var a=e.readBits(13),s=a/192<<8&4294967295|a%192;s+=s<7936?33088:49472,o[i]=s>>8,o[i+1]=s,i+=2,r--}try{n.append(bi.decode(o,bn.SHIFT_JIS))}catch(c){throw new Ie(c)}},t.decodeByteSegment=function(e,n,r,o,i,a){if(8*r>e.available())throw new Ie;for(var s,c=new Uint8Array(r),l=0;l<r;l++)c[l]=e.readBits(8);s=o===null?bn.guessEncoding(c,a):o.getName();try{n.append(bi.decode(c,s))}catch(f){throw new Ie(f)}i.push(c)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new Ie;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,n,r,o){for(var i=n.length();r>1;){if(e.available()<11)throw new Ie;var a=e.readBits(11);n.append(t.toAlphaNumericChar(Math.floor(a/45))),n.append(t.toAlphaNumericChar(a%45)),r-=2}if(r===1){if(e.available()<6)throw new Ie;n.append(t.toAlphaNumericChar(e.readBits(6)))}if(o)for(var s=i;s<n.length();s++)n.charAt(s)==="%"&&(s<n.length()-1&&n.charAt(s+1)==="%"?n.deleteCharAt(s+1):n.setCharAt(s,""))},t.decodeNumericSegment=function(e,n,r){for(;r>=3;){if(e.available()<10)throw new Ie;var o=e.readBits(10);if(o>=1e3)throw new Ie;n.append(t.toAlphaNumericChar(Math.floor(o/100))),n.append(t.toAlphaNumericChar(Math.floor(o/10)%10)),n.append(t.toAlphaNumericChar(o%10)),r-=3}if(r===2){if(e.available()<7)throw new Ie;var i=e.readBits(7);if(i>=100)throw new Ie;n.append(t.toAlphaNumericChar(Math.floor(i/10))),n.append(t.toAlphaNumericChar(i%10))}else if(r===1){if(e.available()<4)throw new Ie;var a=e.readBits(4);if(a>=10)throw new Ie;n.append(t.toAlphaNumericChar(a))}},t.parseECIValue=function(e){var n=e.readBits(8);if(!(128&n))return 127&n;if((192&n)==128)return(63&n)<<8&4294967295|e.readBits(8);if((224&n)==192)return(31&n)<<16&4294967295|e.readBits(16);throw new Ie},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t}(),uv=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 n=e[0];e[0]=e[2],e[2]=n}},t}(),lv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},eO=function(){function t(){this.rsDecoder=new Lu(Ko.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(e,n){return this.decodeBitMatrix(go.parseFromBooleanArray(e),n)},t.prototype.decodeBitMatrix=function(e,n){var r=new Qx(e),o=null;try{return this.decodeBitMatrixParser(r,n)}catch(a){o=a}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();var i=this.decodeBitMatrixParser(r,n);return i.setOther(new uv(!0)),i}catch(a){throw o!==null?o:a}},t.prototype.decodeBitMatrixParser=function(e,n){var r,o,i,a,s=e.readVersion(),c=e.readFormatInformation().getErrorCorrectionLevel(),l=e.readCodewords(),f=Jx.getDataBlocks(l,s,c),h=0;try{for(var d=lv(f),p=d.next();!p.done;p=d.next())h+=(w=p.value).getNumDataCodewords()}catch(S){r={error:S}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}var u=new Uint8Array(h),g=0;try{for(var m=lv(f),y=m.next();!y.done;y=m.next()){var w,b=(w=y.value).getCodewords(),E=w.getNumDataCodewords();this.correctErrors(b,E);for(var C=0;C<E;C++)u[g++]=b[C]}}catch(S){i={error:S}}finally{try{y&&!y.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}return Zx.decode(u,s,c,n)},t.prototype.correctErrors=function(e,n){var r=new Int32Array(e);try{this.rsDecoder.decode(r,e.length-n)}catch{throw new pn}for(var o=0;o<n;o++)e[o]=r[o]},t}(),tO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nO=function(t){function e(n,r,o){var i=t.call(this,n,r)||this;return i.estimatedModuleSize=o,i}return tO(e,t),e.prototype.aboutEquals=function(n,r,o){if(Math.abs(r-this.getY())<=n&&Math.abs(o-this.getX())<=n){var i=Math.abs(n-this.estimatedModuleSize);return i<=1||i<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(n,r,o){return new e((this.getX()+r)/2,(this.getY()+n)/2,(this.estimatedModuleSize+o)/2)},e}(Me),rO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},oO=function(){function t(e,n,r,o,i,a,s){this.image=e,this.startX=n,this.startY=r,this.width=o,this.height=i,this.moduleSize=a,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var e=this.startX,n=this.height,r=e+this.width,o=this.startY+n/2,i=new Int32Array(3),a=this.image,s=0;s<n;s++){var c=o+(1&s?-Math.floor((s+1)/2):Math.floor((s+1)/2));i[0]=0,i[1]=0,i[2]=0;for(var l=e;l<r&&!a.get(l,c);)l++;for(var f=0;l<r;){if(a.get(l,c))if(f===1)i[1]++;else if(f===2){var h;if(this.foundPatternCross(i)&&(h=this.handlePossibleCenter(i,c,l))!==null)return h;i[0]=i[2],i[1]=1,i[2]=0,f=1}else i[++f]++;else f===1&&f++,i[f]++;l++}if(this.foundPatternCross(i)&&(h=this.handlePossibleCenter(i,c,r))!==null)return h}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new ge},t.centerFromEnd=function(e,n){return n-e[2]-e[1]/2},t.prototype.foundPatternCross=function(e){for(var n=this.moduleSize,r=n/2,o=0;o<3;o++)if(Math.abs(n-e[o])>=r)return!1;return!0},t.prototype.crossCheckVertical=function(e,n,r,o){var i=this.image,a=i.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var c=e;c>=0&&i.get(n,c)&&s[1]<=r;)s[1]++,c--;if(c<0||s[1]>r)return NaN;for(;c>=0&&!i.get(n,c)&&s[0]<=r;)s[0]++,c--;if(s[0]>r)return NaN;for(c=e+1;c<a&&i.get(n,c)&&s[1]<=r;)s[1]++,c++;if(c===a||s[1]>r)return NaN;for(;c<a&&!i.get(n,c)&&s[2]<=r;)s[2]++,c++;if(s[2]>r)return NaN;var l=s[0]+s[1]+s[2];return 5*Math.abs(l-o)>=2*o?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,n,r){var o,i,a=e[0]+e[1]+e[2],s=t.centerFromEnd(e,r),c=this.crossCheckVertical(n,s,2*e[1],a);if(!isNaN(c)){var l=(e[0]+e[1]+e[2])/3;try{for(var f=rO(this.possibleCenters),h=f.next();!h.done;h=f.next()){var d=h.value;if(d.aboutEquals(l,c,s))return d.combineEstimate(c,s,l)}}catch(u){o={error:u}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}var p=new nO(s,c,l);this.possibleCenters.push(p),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(p)}return null},t}(),iO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aO=function(t){function e(n,r,o,i){var a=t.call(this,n,r)||this;return a.estimatedModuleSize=o,a.count=i,i===void 0&&(a.count=1),a}return iO(e,t),e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(n,r,o){if(Math.abs(r-this.getY())<=n&&Math.abs(o-this.getX())<=n){var i=Math.abs(n-this.estimatedModuleSize);return i<=1||i<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(n,r,o){var i=this.count+1;return new e((this.count*this.getX()+r)/i,(this.count*this.getY()+n)/i,(this.count*this.estimatedModuleSize+o)/i,i)},e}(Me),sO=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}(),Ns=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cO=function(){function t(e,n){this.image=e,this.resultPointCallback=n,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=n}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var n=e!=null&&e.get(Ft.TRY_HARDER)!==void 0,r=e!=null&&e.get(Ft.PURE_BARCODE)!==void 0,o=this.image,i=o.getHeight(),a=o.getWidth(),s=Math.floor(3*i/(4*t.MAX_MODULES));(s<t.MIN_SKIP||n)&&(s=t.MIN_SKIP);for(var c=!1,l=new Int32Array(5),f=s-1;f<i&&!c;f+=s){l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0;for(var h=0,d=0;d<a;d++)if(o.get(d,f))(1&h)==1&&h++,l[h]++;else if(1&h)l[h]++;else if(h===4)if(t.foundPatternCross(l)){if(this.handlePossibleCenter(l,f,d,r)!==!0){l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,h=3;continue}if(s=2,this.hasSkipped===!0)c=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>l[2]&&(f+=p-l[2]-s,d=a-1)}h=0,l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0}else l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,h=3;else l[++h]++;t.foundPatternCross(l)&&this.handlePossibleCenter(l,f,a,r)===!0&&(s=l[0],this.hasSkipped&&(c=this.haveMultiplyConfirmedCenters()))}var u=this.selectBestPatterns();return Me.orderBestPatterns(u),new sO(u)},t.centerFromEnd=function(e,n){return n-e[4]-e[3]-e[2]/2},t.foundPatternCross=function(e){for(var n=0,r=0;r<5;r++){var o=e[r];if(o===0)return!1;n+=o}if(n<7)return!1;var i=n/7,a=i/2;return Math.abs(i-e[0])<a&&Math.abs(i-e[1])<a&&Math.abs(3*i-e[2])<3*a&&Math.abs(i-e[3])<a&&Math.abs(i-e[4])<a},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,n,r,o){for(var i=this.getCrossCheckStateCount(),a=0,s=this.image;e>=a&&n>=a&&s.get(n-a,e-a);)i[2]++,a++;if(e<a||n<a)return!1;for(;e>=a&&n>=a&&!s.get(n-a,e-a)&&i[1]<=r;)i[1]++,a++;if(e<a||n<a||i[1]>r)return!1;for(;e>=a&&n>=a&&s.get(n-a,e-a)&&i[0]<=r;)i[0]++,a++;if(i[0]>r)return!1;var c=s.getHeight(),l=s.getWidth();for(a=1;e+a<c&&n+a<l&&s.get(n+a,e+a);)i[2]++,a++;if(e+a>=c||n+a>=l)return!1;for(;e+a<c&&n+a<l&&!s.get(n+a,e+a)&&i[3]<r;)i[3]++,a++;if(e+a>=c||n+a>=l||i[3]>=r)return!1;for(;e+a<c&&n+a<l&&s.get(n+a,e+a)&&i[4]<r;)i[4]++,a++;if(i[4]>=r)return!1;var f=i[0]+i[1]+i[2]+i[3]+i[4];return Math.abs(f-o)<2*o&&t.foundPatternCross(i)},t.prototype.crossCheckVertical=function(e,n,r,o){for(var i=this.image,a=i.getHeight(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(n,c);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(n,c)&&s[1]<=r;)s[1]++,c--;if(c<0||s[1]>r)return NaN;for(;c>=0&&i.get(n,c)&&s[0]<=r;)s[0]++,c--;if(s[0]>r)return NaN;for(c=e+1;c<a&&i.get(n,c);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(n,c)&&s[3]<r;)s[3]++,c++;if(c===a||s[3]>=r)return NaN;for(;c<a&&i.get(n,c)&&s[4]<r;)s[4]++,c++;if(s[4]>=r)return NaN;var l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-o)>=2*o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.crossCheckHorizontal=function(e,n,r,o){for(var i=this.image,a=i.getWidth(),s=this.getCrossCheckStateCount(),c=e;c>=0&&i.get(c,n);)s[2]++,c--;if(c<0)return NaN;for(;c>=0&&!i.get(c,n)&&s[1]<=r;)s[1]++,c--;if(c<0||s[1]>r)return NaN;for(;c>=0&&i.get(c,n)&&s[0]<=r;)s[0]++,c--;if(s[0]>r)return NaN;for(c=e+1;c<a&&i.get(c,n);)s[2]++,c++;if(c===a)return NaN;for(;c<a&&!i.get(c,n)&&s[3]<r;)s[3]++,c++;if(c===a||s[3]>=r)return NaN;for(;c<a&&i.get(c,n)&&s[4]<r;)s[4]++,c++;if(s[4]>=r)return NaN;var l=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(l-o)>=o?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,c):NaN},t.prototype.handlePossibleCenter=function(e,n,r,o){var i=e[0]+e[1]+e[2]+e[3]+e[4],a=t.centerFromEnd(e,r),s=this.crossCheckVertical(n,Math.floor(a),e[2],i);if(!isNaN(s)&&(a=this.crossCheckHorizontal(Math.floor(a),Math.floor(s),e[2],i),!isNaN(a)&&(!o||this.crossCheckDiagonal(Math.floor(s),Math.floor(a),e[2],i)))){for(var c=i/7,l=!1,f=this.possibleCenters,h=0,d=f.length;h<d;h++){var p=f[h];if(p.aboutEquals(c,s,a)){f[h]=p.combineEstimate(s,a,c),l=!0;break}}if(!l){var u=new aO(a,s,c);f.push(u),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(u)}return!0}return!1},t.prototype.findRowSkip=function(){var e,n;if(this.possibleCenters.length<=1)return 0;var r=null;try{for(var o=Ns(this.possibleCenters),i=o.next();!i.done;i=o.next()){var a=i.value;if(a.getCount()>=t.CENTER_QUORUM){if(r!=null)return this.hasSkipped=!0,Math.floor((Math.abs(r.getX()-a.getX())-Math.abs(r.getY()-a.getY()))/2);r=a}}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,n,r,o,i=0,a=0,s=this.possibleCenters.length;try{for(var c=Ns(this.possibleCenters),l=c.next();!l.done;l=c.next())(u=l.value).getCount()>=t.CENTER_QUORUM&&(i++,a+=u.getEstimatedModuleSize())}catch(g){e={error:g}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(e)throw e.error}}if(i<3)return!1;var f=a/s,h=0;try{for(var d=Ns(this.possibleCenters),p=d.next();!p.done;p=d.next()){var u=p.value;h+=Math.abs(u.getEstimatedModuleSize()-f)}}catch(g){r={error:g}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return h<=.05*a},t.prototype.selectBestPatterns=function(){var e,n,r,o,i=this.possibleCenters.length;if(i<3)throw new ge;var a,s=this.possibleCenters;if(i>3){var c=0,l=0;try{for(var f=Ns(this.possibleCenters),h=f.next();!h.done;h=f.next()){var d=h.value.getEstimatedModuleSize();c+=d,l+=d*d}}catch(b){e={error:b}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}a=c/i;var p=Math.sqrt(l/i-a*a);s.sort(function(b,E){var C=Math.abs(E.getEstimatedModuleSize()-a),S=Math.abs(b.getEstimatedModuleSize()-a);return C<S?-1:C>S?1:0});for(var u=Math.max(.2*a,p),g=0;g<s.length&&s.length>3;g++){var m=s[g];Math.abs(m.getEstimatedModuleSize()-a)>u&&(s.splice(g,1),g--)}}if(s.length>3){c=0;try{for(var y=Ns(s),w=y.next();!w.done;w=y.next())c+=w.value.getEstimatedModuleSize()}catch(b){r={error:b}}finally{try{w&&!w.done&&(o=y.return)&&o.call(y)}finally{if(r)throw r.error}}a=c/s.length,s.sort(function(b,E){if(E.getCount()===b.getCount()){var C=Math.abs(E.getEstimatedModuleSize()-a),S=Math.abs(b.getEstimatedModuleSize()-a);return C<S?1:C>S?-1:0}return E.getCount()-b.getCount()}),s.splice(3)}return[s[0],s[1],s[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t}(),uO=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(Ft.NEED_RESULT_POINT_CALLBACK);var n=new cO(this.image,this.resultPointCallback).find(e);return this.processFinderPatternInfo(n)},t.prototype.processFinderPatternInfo=function(e){var n=e.getTopLeft(),r=e.getTopRight(),o=e.getBottomLeft(),i=this.calculateModuleSize(n,r,o);if(i<1)throw new ge("No pattern found in proccess finder.");var a=t.computeDimension(n,r,o,i),s=Wu.getProvisionalVersionForDimension(a),c=s.getDimensionForVersion()-7,l=null;if(s.getAlignmentPatternCenters().length>0)for(var f=r.getX()-n.getX()+o.getX(),h=r.getY()-n.getY()+o.getY(),d=1-3/c,p=Math.floor(n.getX()+d*(f-n.getX())),u=Math.floor(n.getY()+d*(h-n.getY())),g=4;g<=16;g<<=1)try{l=this.findAlignmentInRegion(i,p,u,g);break}catch(w){if(!(w instanceof ge))throw w}var m=t.createTransform(n,r,o,l,a),y=t.sampleGrid(this.image,m,a);return new Zf(y,l===null?[o,n,r]:[o,n,r,l])},t.createTransform=function(e,n,r,o,i){var a,s,c,l,f=i-3.5;return o!==null?(a=o.getX(),s=o.getY(),l=c=f-3):(a=n.getX()-e.getX()+r.getX(),s=n.getY()-e.getY()+r.getY(),c=f,l=f),qy.quadrilateralToQuadrilateral(3.5,3.5,f,3.5,c,l,3.5,f,e.getX(),e.getY(),n.getX(),n.getY(),a,s,r.getX(),r.getY())},t.sampleGrid=function(e,n,r){return th.getInstance().sampleGridWithTransform(e,r,r,n)},t.computeDimension=function(e,n,r,o){var i=wt.round(Me.distance(e,n)/o),a=wt.round(Me.distance(e,r)/o),s=Math.floor((i+a)/2)+7;switch(3&s){case 0:s++;break;case 2:s--;break;case 3:throw new ge("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(e,n,r){return(this.calculateModuleSizeOneWay(e,n)+this.calculateModuleSizeOneWay(e,r))/2},t.prototype.calculateModuleSizeOneWay=function(e,n){var r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(n.getX()),Math.floor(n.getY())),o=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(n.getX()),Math.floor(n.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(r)?o/7:isNaN(o)?r/7:(r+o)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,n,r,o){var i=this.sizeOfBlackWhiteBlackRun(e,n,r,o),a=1,s=e-(r-e);s<0?(a=e/(e-s),s=0):s>=this.image.getWidth()&&(a=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var c=Math.floor(n-(o-n)*a);return a=1,c<0?(a=n/(n-c),c=0):c>=this.image.getHeight()&&(a=(this.image.getHeight()-1-n)/(c-n),c=this.image.getHeight()-1),s=Math.floor(e+(s-e)*a),(i+=this.sizeOfBlackWhiteBlackRun(e,n,s,c))-1},t.prototype.sizeOfBlackWhiteBlackRun=function(e,n,r,o){var i=Math.abs(o-n)>Math.abs(r-e);if(i){var a=e;e=n,n=a,a=r,r=o,o=a}for(var s=Math.abs(r-e),c=Math.abs(o-n),l=-s/2,f=e<r?1:-1,h=n<o?1:-1,d=0,p=r+f,u=e,g=n;u!==p;u+=f){var m=i?g:u,y=i?u:g;if(d===1===this.image.get(m,y)){if(d===2)return wt.distance(u,g,e,n);d++}if((l+=c)>0){if(g===o)break;g+=h,l-=s}}return d===2?wt.distance(r+f,o,e,n):NaN},t.prototype.findAlignmentInRegion=function(e,n,r,o){var i=Math.floor(o*e),a=Math.max(0,n-i),s=Math.min(this.image.getWidth()-1,n+i);if(s-a<3*e)throw new ge("Alignment top exceeds estimated module size.");var c=Math.max(0,r-i),l=Math.min(this.image.getHeight()-1,r+i);if(l-c<3*e)throw new ge("Alignment bottom exceeds estimated module size.");return new oO(this.image,a,c,s-a,l-c,e,this.resultPointCallback).find()},t}(),Ku=function(){function t(){this.decoder=new eO}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,n){var r,o;if(n!=null&&n.get(Ft.PURE_BARCODE)!==void 0){var i=t.extractPureBits(e.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,n),o=t.NO_POINTS}else{var a=new uO(e.getBlackMatrix()).detect(n);r=this.decoder.decodeBitMatrix(a.getBits(),n),o=a.getPoints()}r.getOther()instanceof uv&&r.getOther().applyMirroredCorrection(o);var s=new ir(r.getText(),r.getRawBytes(),void 0,o,Ue.QR_CODE,void 0),c=r.getByteSegments();c!==null&&s.putMetadata(kn.BYTE_SEGMENTS,c);var l=r.getECLevel();return l!==null&&s.putMetadata(kn.ERROR_CORRECTION_LEVEL,l),r.hasStructuredAppend()&&(s.putMetadata(kn.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),s.putMetadata(kn.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(e){var n=e.getTopLeftOnBit(),r=e.getBottomRightOnBit();if(n===null||r===null)throw new ge;var o=this.moduleSize(n,e),i=n[1],a=r[1],s=n[0],c=r[0];if(s>=c||i>=a)throw new ge;if(a-i!=c-s&&(c=s+(a-i))>=e.getWidth())throw new ge;var l=Math.round((c-s+1)/o),f=Math.round((a-i+1)/o);if(l<=0||f<=0)throw new ge;if(f!==l)throw new ge;var h=Math.floor(o/2);i+=h;var d=(s+=h)+Math.floor((l-1)*o)-c;if(d>0){if(d>h)throw new ge;s-=d}var p=i+Math.floor((f-1)*o)-a;if(p>0){if(p>h)throw new ge;i-=p}for(var u=new go(l,f),g=0;g<f;g++)for(var m=i+Math.floor(g*o),y=0;y<l;y++)e.get(s+Math.floor(y*o),m)&&u.set(y,g);return u},t.moduleSize=function(e,n){for(var r=n.getHeight(),o=n.getWidth(),i=e[0],a=e[1],s=!0,c=0;i<o&&a<r;){if(s!==n.get(i,a)){if(++c==5)break;s=!s}i++,a++}if(i===o||a===r)throw new ge;return(i-e[0])/7},t.NO_POINTS=new Array,t}(),lO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ht=function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(e){return wt.sum(e)},t.toIntArray=function(e){var n,r;if(e==null||!e.length)return t.EMPTY_INT_ARRAY;var o=new Int32Array(e.length),i=0;try{for(var a=lO(e),s=a.next();!s.done;s=a.next()){var c=s.value;o[i++]=c}}catch(l){n={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},t.getCodeword=function(e){var n=yr.binarySearch(t.SYMBOL_TABLE,262143&e);return n<0?-1:(t.CODEWORD_TABLE[n]-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}(),dO=function(){function t(e,n){this.bits=e,this.points=n}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t}(),fO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},hO=function(){function t(){}return t.detectMultiple=function(e,n,r){var o=e.getBlackMatrix(),i=t.detect(r,o);return i.length||((o=o.clone()).rotate180(),i=t.detect(r,o)),new dO(o,i)},t.detect=function(e,n){for(var r,o,i=new Array,a=0,s=0,c=!1;a<n.getHeight();){var l=t.findVertices(n,a,s);if(l[0]!=null||l[3]!=null){if(c=!0,i.push(l),!e)break;l[2]!=null?(s=Math.trunc(l[2].getX()),a=Math.trunc(l[2].getY())):(s=Math.trunc(l[4].getX()),a=Math.trunc(l[4].getY()))}else{if(!c)break;c=!1,s=0;try{for(var f=(r=void 0,fO(i)),h=f.next();!h.done;h=f.next()){var d=h.value;d[1]!=null&&(a=Math.trunc(Math.max(a,d[1].getY()))),d[3]!=null&&(a=Math.max(a,Math.trunc(d[3].getY())))}}catch(p){r={error:p}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}a+=t.ROW_STEP}}return i},t.findVertices=function(e,n,r){var o=e.getHeight(),i=e.getWidth(),a=new Array(8);return t.copyToResult(a,t.findRowsWithPattern(e,o,i,n,r,t.START_PATTERN),t.INDEXES_START_PATTERN),a[4]!=null&&(r=Math.trunc(a[4].getX()),n=Math.trunc(a[4].getY())),t.copyToResult(a,t.findRowsWithPattern(e,o,i,n,r,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),a},t.copyToResult=function(e,n,r){for(var o=0;o<r.length;o++)e[r[o]]=n[o]},t.findRowsWithPattern=function(e,n,r,o,i,a){for(var s=new Array(4),c=!1,l=new Int32Array(a.length);o<n;o+=t.ROW_STEP)if((p=t.findGuardPattern(e,i,o,r,!1,a,l))!=null){for(;o>0;){if((d=t.findGuardPattern(e,i,--o,r,!1,a,l))==null){o++;break}p=d}s[0]=new Me(p[0],o),s[1]=new Me(p[1],o),c=!0;break}var f=o+1;if(c){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);f<n;f++){var p;if((p=t.findGuardPattern(e,d[0],f,r,!1,a,l))!=null&&Math.abs(d[0]-p[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-p[1])<t.MAX_PATTERN_DRIFT)d=p,h=0;else{if(h>t.SKIPPED_ROW_COUNT_MAX)break;h++}}f-=h+1,s[2]=new Me(d[0],f),s[3]=new Me(d[1],f)}return f-o<t.BARCODE_MIN_HEIGHT&&yr.fill(s,null),s},t.findGuardPattern=function(e,n,r,o,i,a,s){yr.fillWithin(s,0,s.length,0);for(var c=n,l=0;e.get(c,r)&&c>0&&l++<t.MAX_PIXEL_DRIFT;)c--;for(var f=c,h=0,d=a.length,p=i;f<o;f++)if(e.get(f,r)!==p)s[h]++;else{if(h===d-1){if(t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([c,f]);c+=s[0]+s[1],Ut.arraycopy(s,2,s,0,h-1),s[h-1]=0,s[h]=0,h--}else h++;s[h]=1,p=!p}return h===d-1&&t.patternMatchVariance(s,a,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([c,f-1]):null},t.patternMatchVariance=function(e,n,r){for(var o=e.length,i=0,a=0,s=0;s<o;s++)i+=e[s],a+=n[s];if(i<a)return 1/0;var c=i/a;r*=c;for(var l=0,f=0;f<o;f++){var h=e[f],d=n[f]*c,p=h>d?h-d:d-h;if(p>r)return 1/0;l+=p}return l/i},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}(),pO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ai=function(){function t(e,n){if(n.length===0)throw new Ke;this.field=e;var r=n.length;if(r>1&&n[0]===0){for(var o=1;o<r&&n[o]===0;)o++;o===r?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(r-o),Ut.arraycopy(n,o,this.coefficients,0,this.coefficients.length))}else this.coefficients=n}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 n,r;if(e===0)return this.getCoefficient(0);if(e===1){var o=0;try{for(var i=pO(this.coefficients),a=i.next();!a.done;a=i.next()){var s=a.value;o=this.field.add(o,s)}}catch(h){n={error:h}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}for(var c=this.coefficients[0],l=this.coefficients.length,f=1;f<l;f++)c=this.field.add(this.field.multiply(e,c),this.coefficients[f]);return c},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new Ke("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var n=this.coefficients,r=e.coefficients;if(n.length>r.length){var o=n;n=r,r=o}var i=new Int32Array(r.length),a=r.length-n.length;Ut.arraycopy(r,0,i,0,a);for(var s=a;s<r.length;s++)i[s]=this.field.add(n[s-a],r[s]);return new t(this.field,i)},t.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new Ke("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 Ke("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var n=this.coefficients,r=n.length,o=e.coefficients,i=o.length,a=new Int32Array(r+i-1),s=0;s<r;s++)for(var c=n[s],l=0;l<i;l++)a[s+l]=this.field.add(a[s+l],this.field.multiply(c,o[l]));return new t(this.field,a)},t.prototype.negative=function(){for(var e=this.coefficients.length,n=new Int32Array(e),r=0;r<e;r++)n[r]=this.field.subtract(0,this.coefficients[r]);return new t(this.field,n)},t.prototype.multiplyScalar=function(e){if(e===0)return new t(this.field,new Int32Array([0]));if(e===1)return this;for(var n=this.coefficients.length,r=new Int32Array(n),o=0;o<n;o++)r[o]=this.field.multiply(this.coefficients[o],e);return new t(this.field,r)},t.prototype.multiplyByMonomial=function(e,n){if(e<0)throw new Ke;if(n===0)return new t(this.field,new Int32Array([0]));for(var r=this.coefficients.length,o=new Int32Array(r+e),i=0;i<r;i++)o[i]=this.field.multiply(this.coefficients[i],n);return new t(this.field,o)},t.prototype.toString=function(){for(var e=new Nt,n=this.getDegree();n>=0;n--){var r=this.getCoefficient(n);r!==0&&(r<0?(e.append(" - "),r=-r):e.length()>0&&e.append(" + "),n!==0&&r===1||e.append(r),n!==0&&(n===1?e.append("x"):(e.append("x^"),e.append(n))))}return e.toString()},t}(),gO=function(){function t(){}return t.prototype.add=function(e,n){return(e+n)%this.modulus},t.prototype.subtract=function(e,n){return(this.modulus+e-n)%this.modulus},t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new Ke;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new Vy;return this.expTable[this.modulus-this.logTable[e]-1]},t.prototype.multiply=function(e,n){return e===0||n===0?0:this.expTable[(this.logTable[e]+this.logTable[n])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(e){return e===this},t}(),mO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yO=function(t){function e(n,r){var o=t.call(this)||this;o.modulus=n,o.expTable=new Int32Array(n),o.logTable=new Int32Array(n);for(var i=1,a=0;a<n;a++)o.expTable[a]=i,i=i*r%n;for(a=0;a<n-1;a++)o.logTable[o.expTable[a]]=a;return o.zero=new Ai(o,new Int32Array([0])),o.one=new Ai(o,new Int32Array([1])),o}return mO(e,t),e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(n,r){if(n<0)throw new Ke;if(r===0)return this.zero;var o=new Int32Array(n+1);return o[0]=r,new Ai(this,o)},e.PDF417_GF=new e(ht.NUMBER_OF_CODEWORDS,3),e}(gO),vO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wO=function(){function t(){this.field=yO.PDF417_GF}return t.prototype.decode=function(e,n,r){for(var o,i,a=new Ai(this.field,e),s=new Int32Array(n),c=!1,l=n;l>0;l--){var f=a.evaluateAt(this.field.exp(l));s[n-l]=f,f!==0&&(c=!0)}if(!c)return 0;var h=this.field.getOne();if(r!=null)try{for(var d=vO(r),p=d.next();!p.done;p=d.next()){var u=p.value,g=this.field.exp(e.length-1-u),m=new Ai(this.field,new Int32Array([this.field.subtract(0,g),1]));h=h.multiply(m)}}catch(P){o={error:P}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}var y=new Ai(this.field,s),w=this.runEuclideanAlgorithm(this.field.buildMonomial(n,1),y,n),b=w[0],E=w[1],C=this.findErrorLocations(b),S=this.findErrorMagnitudes(E,b,C);for(l=0;l<C.length;l++){var T=e.length-1-this.field.log(C[l]);if(T<0)throw pn.getChecksumInstance();e[T]=this.field.subtract(e[T],S[l])}return C.length},t.prototype.runEuclideanAlgorithm=function(e,n,r){if(e.getDegree()<n.getDegree()){var o=e;e=n,n=o}for(var i=e,a=n,s=this.field.getZero(),c=this.field.getOne();a.getDegree()>=Math.round(r/2);){var l=i,f=s;if(s=c,(i=a).isZero())throw pn.getChecksumInstance();a=l;for(var h=this.field.getZero(),d=i.getCoefficient(i.getDegree()),p=this.field.inverse(d);a.getDegree()>=i.getDegree()&&!a.isZero();){var u=a.getDegree()-i.getDegree(),g=this.field.multiply(a.getCoefficient(a.getDegree()),p);h=h.add(this.field.buildMonomial(u,g)),a=a.subtract(i.multiplyByMonomial(u,g))}c=h.multiply(s).subtract(f).negative()}var m=c.getCoefficient(0);if(m===0)throw pn.getChecksumInstance();var y=this.field.inverse(m);return[c.multiply(y),a.multiply(y)]},t.prototype.findErrorLocations=function(e){for(var n=e.getDegree(),r=new Int32Array(n),o=0,i=1;i<this.field.getSize()&&o<n;i++)e.evaluateAt(i)===0&&(r[o]=this.field.inverse(i),o++);if(o!==n)throw pn.getChecksumInstance();return r},t.prototype.findErrorMagnitudes=function(e,n,r){for(var o=n.getDegree(),i=new Int32Array(o),a=1;a<=o;a++)i[o-a]=this.field.multiply(a,n.getCoefficient(a));var s=new Ai(this.field,i),c=r.length,l=new Int32Array(c);for(a=0;a<c;a++){var f=this.field.inverse(r[a]),h=this.field.subtract(0,e.evaluateAt(f)),d=this.field.inverse(s.evaluateAt(f));l[a]=this.field.multiply(h,d)}return l},t}(),sh=function(){function t(e,n,r,o,i){e instanceof t?this.constructor_2(e):this.constructor_1(e,n,r,o,i)}return t.prototype.constructor_1=function(e,n,r,o,i){var a=n==null||r==null,s=o==null||i==null;if(a&&s)throw new ge;a?(n=new Me(0,o.getY()),r=new Me(0,i.getY())):s&&(o=new Me(e.getWidth()-1,n.getY()),i=new Me(e.getWidth()-1,r.getY())),this.image=e,this.topLeft=n,this.bottomLeft=r,this.topRight=o,this.bottomRight=i,this.minX=Math.trunc(Math.min(n.getX(),r.getX())),this.maxX=Math.trunc(Math.max(o.getX(),i.getX())),this.minY=Math.trunc(Math.min(n.getY(),o.getY())),this.maxY=Math.trunc(Math.max(r.getY(),i.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,n){return e==null?n:n==null?e:new t(e.image,e.topLeft,e.bottomLeft,n.topRight,n.bottomRight)},t.prototype.addMissingRows=function(e,n,r){var o=this.topLeft,i=this.bottomLeft,a=this.topRight,s=this.bottomRight;if(e>0){var c=r?this.topLeft:this.topRight,l=Math.trunc(c.getY()-e);l<0&&(l=0);var f=new Me(c.getX(),l);r?o=f:a=f}if(n>0){var h=r?this.bottomLeft:this.bottomRight,d=Math.trunc(h.getY()+n);d>=this.image.getHeight()&&(d=this.image.getHeight()-1);var p=new Me(h.getX(),d);r?i=p:s=p}return new t(this.image,o,i,a,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t}(),bO=function(){function t(e,n,r,o){this.columnCount=e,this.errorCorrectionLevel=o,this.rowCountUpperPart=n,this.rowCountLowerPart=r,this.rowCount=n+r}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t}(),ch=function(){function t(){this.buffer=""}return t.form=function(e,n){var r=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function(o,i,a,s,c,l){if(o==="%%")return"%";if(n[++r]!==void 0){o=s?parseInt(s.substr(1)):void 0;var f,h=c?parseInt(c.substr(1)):void 0;switch(l){case"s":f=n[r];break;case"c":f=n[r][0];break;case"f":f=parseFloat(n[r]).toFixed(o);break;case"p":f=parseFloat(n[r]).toPrecision(o);break;case"e":f=parseFloat(n[r]).toExponential(o);break;case"x":f=parseInt(n[r]).toString(h||16);break;case"d":f=parseFloat(parseInt(n[r],h||10).toPrecision(o)).toFixed(0)}f=typeof f=="object"?JSON.stringify(f):(+f).toString(h);for(var d=parseInt(a),p=a&&a[0]+""=="0"?"0":" ";f.length<d;)f=i!==void 0?f+p:p+f;return f}})},t.prototype.format=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.buffer+=t.form(e,n)},t.prototype.toString=function(){return this.buffer},t}(),EO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dv=function(){function t(e){this.boundingBox=new sh(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var n=this.getCodeword(e);if(n!=null)return n;for(var r=1;r<t.MAX_NEARBY_DISTANCE;r++){var o=this.imageRowToCodewordIndex(e)-r;if(o>=0&&(n=this.codewords[o])!=null||(o=this.imageRowToCodewordIndex(e)+r)<this.codewords.length&&(n=this.codewords[o])!=null)return n}return null},t.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},t.prototype.setCodeword=function(e,n){this.codewords[this.imageRowToCodewordIndex(e)]=n},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,n,r=new ch,o=0;try{for(var i=EO(this.codewords),a=i.next();!a.done;a=i.next()){var s=a.value;s!=null?r.format("%3d: %3d|%3d%n",o++,s.getRowNumber(),s.getValue()):r.format("%3d: | %n",o++)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.toString()},t.MAX_NEARBY_DISTANCE=5,t}(),CO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_O=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Rs=function(){function t(){this.values=new Map}return t.prototype.setValue=function(e){e=Math.trunc(e);var n=this.values.get(e);n==null&&(n=0),n++,this.values.set(e,n)},t.prototype.getValue=function(){var e,n,r=-1,o=new Array,i=function(l,f){var h=function(){return l},d=function(){return f};d()>r?(r=d(),(o=[]).push(h())):d()===r&&o.push(h())};try{for(var a=CO(this.values.entries()),s=a.next();!s.done;s=a.next()){var c=_O(s.value,2);i(c[0],c[1])}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return ht.toIntArray(o)},t.prototype.getConfidence=function(e){return this.values.get(e)},t}(),AO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),uh=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fv=function(t){function e(n,r){var o=t.call(this,n)||this;return o._isLeft=r,o}return AO(e,t),e.prototype.setRowNumbers=function(){var n,r;try{for(var o=uh(this.getCodewords()),i=o.next();!i.done;i=o.next()){var a=i.value;a!=null&&a.setRowNumberAsRowIndicatorColumn()}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(n){var r=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(r,n);for(var o=this.getBoundingBox(),i=this._isLeft?o.getTopLeft():o.getTopRight(),a=this._isLeft?o.getBottomLeft():o.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),c=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=-1,f=1,h=0,d=s;d<c;d++)if(r[d]!=null){var p=r[d],u=p.getRowNumber()-l;if(u===0)h++;else if(u===1)f=Math.max(f,h),h=1,l=p.getRowNumber();else if(u<0||p.getRowNumber()>=n.getRowCount()||u>d)r[d]=null;else{for(var g=void 0,m=(g=f>2?(f-2)*u:u)>=d,y=1;y<=g&&!m;y++)m=r[d-y]!=null;m?r[d]=null:(l=p.getRowNumber(),h=1)}}},e.prototype.getRowHeights=function(){var n,r,o=this.getBarcodeMetadata();if(o==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(o);var i=new Int32Array(o.getRowCount());try{for(var a=uh(this.getCodewords()),s=a.next();!s.done;s=a.next()){var c=s.value;if(c!=null){var l=c.getRowNumber();if(l>=i.length)continue;i[l]++}}}catch(f){n={error:f}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(n){for(var r=this.getBoundingBox(),o=this._isLeft?r.getTopLeft():r.getTopRight(),i=this._isLeft?r.getBottomLeft():r.getBottomRight(),a=this.imageRowToCodewordIndex(Math.trunc(o.getY())),s=this.imageRowToCodewordIndex(Math.trunc(i.getY())),c=this.getCodewords(),l=-1,f=a;f<s;f++)if(c[f]!=null){var h=c[f];h.setRowNumberAsRowIndicatorColumn();var d=h.getRowNumber()-l;d===0||(d===1?l=h.getRowNumber():h.getRowNumber()>=n.getRowCount()?c[f]=null:l=h.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var n,r,o=this.getCodewords(),i=new Rs,a=new Rs,s=new Rs,c=new Rs;try{for(var l=uh(o),f=l.next();!f.done;f=l.next()){var h=f.value;if(h!=null){h.setRowNumberAsRowIndicatorColumn();var d=h.getValue()%30,p=h.getRowNumber();switch(this._isLeft||(p+=2),p%3){case 0:a.setValue(3*d+1);break;case 1:c.setValue(d/3),s.setValue(d%3);break;case 2:i.setValue(d+1)}}}}catch(g){n={error:g}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(i.getValue().length===0||a.getValue().length===0||s.getValue().length===0||c.getValue().length===0||i.getValue()[0]<1||a.getValue()[0]+s.getValue()[0]<ht.MIN_ROWS_IN_BARCODE||a.getValue()[0]+s.getValue()[0]>ht.MAX_ROWS_IN_BARCODE)return null;var u=new bO(i.getValue()[0],a.getValue()[0],s.getValue()[0],c.getValue()[0]);return this.removeIncorrectCodewords(o,u),u},e.prototype.removeIncorrectCodewords=function(n,r){for(var o=0;o<n.length;o++){var i=n[o];if(n[o]!=null){var a=i.getValue()%30,s=i.getRowNumber();if(s>r.getRowCount())n[o]=null;else switch(this._isLeft||(s+=2),s%3){case 0:3*a+1!==r.getRowCountUpperPart()&&(n[o]=null);break;case 1:Math.trunc(a/3)===r.getErrorCorrectionLevel()&&a%3===r.getRowCountLowerPart()||(n[o]=null);break;case 2:a+1!==r.getColumnCount()&&(n[o]=null)}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
|
|
143
|
-
`+t.prototype.toString.call(this)},e}(dv),SO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},IO=function(){function t(e,n){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=n,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,n=ht.MAX_CODEWORDS_IN_BARCODE;do e=n,n=this.adjustRowNumbersAndGetCount();while(n>0&&n<e);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(e){e!=null&&e.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(e===0)return 0;for(var n=1;n<this.barcodeColumnCount+1;n++)for(var r=this.detectionResultColumns[n].getCodewords(),o=0;o<r.length;o++)r[o]!=null&&(r[o].hasValidRowNumber()||this.adjustRowNumbers(n,o,r));return e},t.prototype.adjustRowNumbersByRow=function(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(this.detectionResultColumns[0]!=null&&this.detectionResultColumns[this.barcodeColumnCount+1]!=null){for(var e=this.detectionResultColumns[0].getCodewords(),n=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<e.length;r++)if(e[r]!=null&&n[r]!=null&&e[r].getRowNumber()===n[r].getRowNumber())for(var o=1;o<=this.barcodeColumnCount;o++){var i=this.detectionResultColumns[o].getCodewords()[r];i!=null&&(i.setRowNumber(e[r].getRowNumber()),i.hasValidRowNumber()||(this.detectionResultColumns[o].getCodewords()[r]=null))}}},t.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var e=0,n=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),r=0;r<n.length;r++)if(n[r]!=null)for(var o=n[r].getRowNumber(),i=0,a=this.barcodeColumnCount+1;a>0&&i<this.ADJUST_ROW_NUMBER_SKIP;a--){var s=this.detectionResultColumns[a].getCodewords()[r];s!=null&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var e=0,n=this.detectionResultColumns[0].getCodewords(),r=0;r<n.length;r++)if(n[r]!=null)for(var o=n[r].getRowNumber(),i=0,a=1;a<this.barcodeColumnCount+1&&i<this.ADJUST_ROW_NUMBER_SKIP;a++){var s=this.detectionResultColumns[a].getCodewords()[r];s!=null&&(i=t.adjustRowNumberIfValid(o,i,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(e,n,r){return r==null||r.hasValidRowNumber()||(r.isValidRowNumber(e)?(r.setRowNumber(e),n=0):++n),n},t.prototype.adjustRowNumbers=function(e,n,r){var o,i,a=r[n],s=this.detectionResultColumns[e-1].getCodewords(),c=s;this.detectionResultColumns[e+1]!=null&&(c=this.detectionResultColumns[e+1].getCodewords());var l=new Array(14);l[2]=s[n],l[3]=c[n],n>0&&(l[0]=r[n-1],l[4]=s[n-1],l[5]=c[n-1]),n>1&&(l[8]=r[n-2],l[10]=s[n-2],l[11]=c[n-2]),n<r.length-1&&(l[1]=r[n+1],l[6]=s[n+1],l[7]=c[n+1]),n<r.length-2&&(l[9]=r[n+2],l[12]=s[n+2],l[13]=c[n+2]);try{for(var f=SO(l),h=f.next();!h.done;h=f.next()){var d=h.value;if(t.adjustRowNumber(a,d))return}}catch(p){o={error:p}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}},t.adjustRowNumber=function(e,n){return n!=null&&!(!n.hasValidRowNumber()||n.getBucket()!==e.getBucket())&&(e.setRowNumber(n.getRowNumber()),!0)},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(e){this.boundingBox=e},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(e,n){this.detectionResultColumns[e]=n},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 n=new ch,r=0;r<e.getCodewords().length;r++){n.format("CW %3d:",r);for(var o=0;o<this.barcodeColumnCount+2;o++)if(this.detectionResultColumns[o]!=null){var i=this.detectionResultColumns[o].getCodewords()[r];i!=null?n.format(" %3d|%3d",i.getRowNumber(),i.getValue()):n.format(" | ")}else n.format(" | ");n.format("%n")}return n.toString()},t}(),TO=function(){function t(e,n,r,o){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(n),this.bucket=Math.trunc(r),this.value=Math.trunc(o)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(3*Math.trunc(this.value/30)+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(e){this.rowNumber=e},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t}(),xO=function(){function t(){}return t.initialize=function(){for(var e=0;e<ht.SYMBOL_TABLE.length;e++)for(var n=ht.SYMBOL_TABLE[e],r=1&n,o=0;o<ht.BARS_IN_MODULE;o++){for(var i=0;(1&n)===r;)i+=1,n>>=1;r=1&n,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(ht.BARS_IN_MODULE)),t.RATIOS_TABLE[e][ht.BARS_IN_MODULE-o-1]=Math.fround(i/ht.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var n=t.getDecodedCodewordValue(t.sampleBitCounts(e));return n!==-1?n:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(e){for(var n=wt.sum(e),r=new Int32Array(ht.BARS_IN_MODULE),o=0,i=0,a=0;a<ht.MODULES_IN_CODEWORD;a++){var s=n/(2*ht.MODULES_IN_CODEWORD)+a*n/ht.MODULES_IN_CODEWORD;i+e[o]<=s&&(i+=e[o],o++),r[o]++}return r},t.getDecodedCodewordValue=function(e){var n=t.getBitValue(e);return ht.getCodeword(n)===-1?-1:n},t.getBitValue=function(e){for(var n=0,r=0;r<e.length;r++)for(var o=0;o<e[r];o++)n=n<<1|(r%2==0?1:0);return Math.trunc(n)},t.getClosestDecodedValue=function(e){var n=wt.sum(e),r=new Array(ht.BARS_IN_MODULE);if(n>1)for(var o=0;o<r.length;o++)r[o]=Math.fround(e[o]/n);var i=Jf.MAX_VALUE,a=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var c=0,l=t.RATIOS_TABLE[s],f=0;f<ht.BARS_IN_MODULE;f++){var h=Math.fround(l[f]-r[f]);if((c+=Math.fround(h*h))>=i)break}c<i&&(i=c,a=ht.SYMBOL_TABLE[s])}return a},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(ht.SYMBOL_TABLE.length).map(function(e){return new Array(ht.BARS_IN_MODULE)}),t}(),OO=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}(),hv=function(){function t(){}return t.parseLong=function(e,n){return n===void 0&&(n=void 0),parseInt(e,n)},t}(),PO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kO=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return PO(e,t),e.kind="NullPointerException",e}(rr),BO=function(){function t(){}return t.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},t.prototype.writeBytesOffset=function(e,n,r){if(e==null)throw new kO;if(n<0||n>e.length||r<0||n+r>e.length||n+r<0)throw new $f;if(r!==0)for(var o=0;o<r;o++)this.write(e[n+o])},t.prototype.flush=function(){},t.prototype.close=function(){},t}(),NO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),RO=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return NO(e,t),e}(rr),DO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),MO=function(t){function e(n){n===void 0&&(n=32);var r=t.call(this)||this;if(r.count=0,n<0)throw new Ke("Negative initial size: "+n);return r.buf=new Uint8Array(n),r}return DO(e,t),e.prototype.ensureCapacity=function(n){n-this.buf.length>0&&this.grow(n)},e.prototype.grow=function(n){var r=this.buf.length<<1;if(r-n<0&&(r=n),r<0){if(n<0)throw new RO;r=On.MAX_VALUE}this.buf=yr.copyOfUint8Array(this.buf,r)},e.prototype.write=function(n){this.ensureCapacity(this.count+1),this.buf[this.count]=n,this.count+=1},e.prototype.writeBytesOffset=function(n,r,o){if(r<0||r>n.length||o<0||r+o-n.length>0)throw new $f;this.ensureCapacity(this.count+o),Ut.arraycopy(n,r,this.buf,this.count,o),this.count+=o},e.prototype.writeTo=function(n){n.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return yr.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(n){return n?typeof n=="string"?this.toString_string(n):this.toString_number(n):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(n){return new String(this.buf).toString()},e.prototype.toString_number=function(n){return new String(this.buf).toString()},e.prototype.close=function(){},e}(BO);function pv(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}function Xo(t){if(Yu===void 0&&(Yu=pv()),Yu===null)throw new Error("BigInt is not supported!");return Yu(t)}(function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(kt||(kt={}));var LO=function(){function t(){}return t.decode=function(e,n){var r=new Nt(""),o=or.ISO8859_1;r.enableDecoding(o);for(var i=1,a=e[i++],s=new OO;i<e[0];){switch(a){case t.TEXT_COMPACTION_MODE_LATCH:i=t.textCompaction(e,i,r);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:i=t.byteCompaction(a,e,o,i,r);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:r.append(e[i++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:i=t.numericCompaction(e,i,r);break;case t.ECI_CHARSET:or.getCharacterSetECIByValue(e[i++]);break;case t.ECI_GENERAL_PURPOSE:i+=2;break;case t.ECI_USER_DEFINED:i++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:i=t.decodeMacroBlock(e,i,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new Ie;default:i--,i=t.textCompaction(e,i,r)}if(!(i<e.length))throw Ie.getFormatInstance();a=e[i++]}if(r.length()===0)throw Ie.getFormatInstance();var c=new Du(null,r.toString(),null,n);return c.setOther(s),c},t.decodeMacroBlock=function(e,n,r){if(n+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw Ie.getFormatInstance();for(var o=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),i=0;i<t.NUMBER_OF_SEQUENCE_CODEWORDS;i++,n++)o[i]=e[n];r.setSegmentIndex(On.parseInt(t.decodeBase900toBase10(o,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var a=new Nt;n=t.textCompaction(e,n,a),r.setFileId(a.toString());var s=-1;for(e[n]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=n+1);n<e[0];)switch(e[n]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(e[++n]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var c=new Nt;n=t.textCompaction(e,n+1,c),r.setFileName(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var l=new Nt;n=t.textCompaction(e,n+1,l),r.setSender(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new Nt;n=t.textCompaction(e,n+1,f),r.setAddressee(f.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var h=new Nt;n=t.numericCompaction(e,n+1,h),r.setSegmentCount(On.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var d=new Nt;n=t.numericCompaction(e,n+1,d),r.setTimestamp(hv.parseLong(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var p=new Nt;n=t.numericCompaction(e,n+1,p),r.setChecksum(On.parseInt(p.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var u=new Nt;n=t.numericCompaction(e,n+1,u),r.setFileSize(hv.parseLong(u.toString()));break;default:throw Ie.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:n++,r.setLastSegment(!0);break;default:throw Ie.getFormatInstance()}if(s!==-1){var g=n-s;r.isLastSegment()&&g--,r.setOptionalData(yr.copyOfRange(e,s,s+g))}return n},t.textCompaction=function(e,n,r){for(var o=new Int32Array(2*(e[0]-n)),i=new Int32Array(2*(e[0]-n)),a=0,s=!1;n<e[0]&&!s;){var c=e[n++];if(c<t.TEXT_COMPACTION_MODE_LATCH)o[a]=c/30,o[a+1]=c%30,a+=2;else switch(c){case t.TEXT_COMPACTION_MODE_LATCH:o[a++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:n--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o[a]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,c=e[n++],i[a]=c,a++}}return t.decodeTextCompaction(o,i,a,r),n},t.decodeTextCompaction=function(e,n,r,o){for(var i=kt.ALPHA,a=kt.ALPHA,s=0;s<r;){var c=e[s],l="";switch(i){case kt.ALPHA:if(c<26)l=String.fromCharCode(65+c);else switch(c){case 26:l=" ";break;case t.LL:i=kt.LOWER;break;case t.ML:i=kt.MIXED;break;case t.PS:a=i,i=kt.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}break;case kt.LOWER:if(c<26)l=String.fromCharCode(97+c);else switch(c){case 26:l=" ";break;case t.AS:a=i,i=kt.ALPHA_SHIFT;break;case t.ML:i=kt.MIXED;break;case t.PS:a=i,i=kt.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}break;case kt.MIXED:if(c<t.PL)l=t.MIXED_CHARS[c];else switch(c){case t.PL:i=kt.PUNCT;break;case 26:l=" ";break;case t.LL:i=kt.LOWER;break;case t.AL:i=kt.ALPHA;break;case t.PS:a=i,i=kt.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}break;case kt.PUNCT:if(c<t.PAL)l=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=kt.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}break;case kt.ALPHA_SHIFT:if(i=a,c<26)l=String.fromCharCode(65+c);else switch(c){case 26:l=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}break;case kt.PUNCT_SHIFT:if(i=a,c<t.PAL)l=t.PUNCT_CHARS[c];else switch(c){case t.PAL:i=kt.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:o.append(n[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:i=kt.ALPHA}}l!==""&&o.append(l),s++}},t.byteCompaction=function(e,n,r,o,i){var a=new MO,s=0,c=0,l=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),h=n[o++];o<n[0]&&!l;)switch(f[s++]=h,c=900*c+h,h=n[o++]){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,l=!0;break;default:if(s%5==0&&s>0){for(var d=0;d<6;++d)a.write(Number(Xo(c)>>Xo(8*(5-d))));c=0,s=0}}o===n[0]&&h<t.TEXT_COMPACTION_MODE_LATCH&&(f[s++]=h);for(var p=0;p<s;p++)a.write(f[p]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;o<n[0]&&!l;){var u=n[o++];if(u<t.TEXT_COMPACTION_MODE_LATCH)s++,c=900*c+u;else switch(u){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:o--,l=!0}if(s%5==0&&s>0){for(d=0;d<6;++d)a.write(Number(Xo(c)>>Xo(8*(5-d))));c=0,s=0}}}return i.append(bi.decode(a.toByteArray(),r)),o},t.numericCompaction=function(e,n,r){for(var o=0,i=!1,a=new Int32Array(t.MAX_NUMERIC_CODEWORDS);n<e[0]&&!i;){var s=e[n++];if(n===e[0]&&(i=!0),s<t.TEXT_COMPACTION_MODE_LATCH)a[o]=s,o++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:n--,i=!0}(o%t.MAX_NUMERIC_CODEWORDS==0||s===t.NUMERIC_COMPACTION_MODE_LATCH||i)&&o>0&&(r.append(t.decodeBase900toBase10(a,o)),o=0)}return n},t.decodeBase900toBase10=function(e,n){for(var r=Xo(0),o=0;o<n;o++)r+=t.EXP900[n-o-1]*Xo(e[o]);var i=r.toString();if(i.charAt(0)!=="1")throw new Ie;return i.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
|
|
144
|
-
-.$/"|*()?{}'`,t.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t.EXP900=pv()?function(){var e=[];e[0]=Xo(1);var n=Xo(900);e[1]=n;for(var r=2;r<16;r++)e[r]=e[r-1]*n;return e}():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t}(),Ds=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},FO=function(){function t(){}return t.decode=function(e,n,r,o,i,a,s){for(var c,l=new sh(e,n,r,o,i),f=null,h=null,d=!0;;d=!1){if(n!=null&&(f=t.getRowIndicatorColumn(e,l,n,!0,a,s)),o!=null&&(h=t.getRowIndicatorColumn(e,l,o,!1,a,s)),(c=t.merge(f,h))==null)throw ge.getNotFoundInstance();var p=c.getBoundingBox();if(!d||p==null||!(p.getMinY()<l.getMinY()||p.getMaxY()>l.getMaxY()))break;l=p}c.setBoundingBox(l);var u=c.getBarcodeColumnCount()+1;c.setDetectionResultColumn(0,f),c.setDetectionResultColumn(u,h);for(var g=f!=null,m=1;m<=u;m++){var y=g?m:u-m;if(c.getDetectionResultColumn(y)===void 0){var w=void 0;w=y===0||y===u?new fv(l,y===0):new dv(l),c.setDetectionResultColumn(y,w);for(var b=-1,E=b,C=l.getMinY();C<=l.getMaxY();C++){if((b=t.getStartColumn(c,y,C,g))<0||b>l.getMaxX()){if(E===-1)continue;b=E}var S=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,b,C,a,s);S!=null&&(w.setCodeword(C,S),E=b,a=Math.min(a,S.getWidth()),s=Math.max(s,S.getWidth()))}}}return t.createDecoderResult(c)},t.merge=function(e,n){if(e==null&&n==null)return null;var r=t.getBarcodeMetadata(e,n);if(r==null)return null;var o=sh.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(n));return new IO(r,o)},t.adjustBoundingBox=function(e){var n,r;if(e==null)return null;var o=e.getRowHeights();if(o==null)return null;var i=t.getMax(o),a=0;try{for(var s=Ds(o),c=s.next();!c.done;c=s.next()){var l=c.value;if(a+=i-l,l>0)break}}catch(p){n={error:p}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}for(var f=e.getCodewords(),h=0;a>0&&f[h]==null;h++)a--;var d=0;for(h=o.length-1;h>=0&&(d+=i-o[h],!(o[h]>0));h--);for(h=f.length-1;d>0&&f[h]==null;h--)d--;return e.getBoundingBox().addMissingRows(a,d,e.isLeft())},t.getMax=function(e){var n,r,o=-1;try{for(var i=Ds(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=Math.max(o,s)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o},t.getBarcodeMetadata=function(e,n){var r,o;return e==null||(r=e.getBarcodeMetadata())==null?n==null?null:n.getBarcodeMetadata():n==null||(o=n.getBarcodeMetadata())==null?r:r.getColumnCount()!==o.getColumnCount()&&r.getErrorCorrectionLevel()!==o.getErrorCorrectionLevel()&&r.getRowCount()!==o.getRowCount()?null:r},t.getRowIndicatorColumn=function(e,n,r,o,i,a){for(var s=new fv(n,o),c=0;c<2;c++)for(var l=c===0?1:-1,f=Math.trunc(Math.trunc(r.getX())),h=Math.trunc(Math.trunc(r.getY()));h<=n.getMaxY()&&h>=n.getMinY();h+=l){var d=t.detectCodeword(e,0,e.getWidth(),o,f,h,i,a);d!=null&&(s.setCodeword(h,d),f=o?d.getStartX():d.getEndX())}return s},t.adjustCodewordCount=function(e,n){var r=n[0][1],o=r.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(o.length===0){if(i<1||i>ht.MAX_CODEWORDS_IN_BARCODE)throw ge.getNotFoundInstance();r.setValue(i)}else o[0]!==i&&r.setValue(i)},t.createDecoderResult=function(e){var n=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,n);for(var r=new Array,o=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],a=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var c=0;c<e.getBarcodeColumnCount();c++){var l=n[s][c+1].getValue(),f=s*e.getBarcodeColumnCount()+c;l.length===0?r.push(f):l.length===1?o[f]=l[0]:(a.push(f),i.push(l))}for(var h=new Array(i.length),d=0;d<h.length;d++)h[d]=i[d];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),o,ht.toIntArray(r),ht.toIntArray(a),h)},t.createDecoderResultFromAmbiguousValues=function(e,n,r,o,i){for(var a=new Int32Array(o.length),s=100;s-- >0;){for(var c=0;c<a.length;c++)n[o[c]]=i[c][a[c]];try{return t.decodeCodewords(n,e,r)}catch(l){if(!(l instanceof pn))throw l}if(a.length===0)throw pn.getChecksumInstance();for(c=0;c<a.length;c++){if(a[c]<i[c].length-1){a[c]++;break}if(a[c]=0,c===a.length-1)throw pn.getChecksumInstance()}}throw pn.getChecksumInstance()},t.createBarcodeMatrix=function(e){for(var n,r,o,i,a=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<a.length;s++)for(var c=0;c<a[s].length;c++)a[s][c]=new Rs;var l=0;try{for(var f=Ds(e.getDetectionResultColumns()),h=f.next();!h.done;h=f.next()){var d=h.value;if(d!=null)try{for(var p=(o=void 0,Ds(d.getCodewords())),u=p.next();!u.done;u=p.next()){var g=u.value;if(g!=null){var m=g.getRowNumber();if(m>=0){if(m>=a.length)continue;a[m][l].setValue(g.getValue())}}}}catch(y){o={error:y}}finally{try{u&&!u.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}l++}}catch(y){n={error:y}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return a},t.isValidBarcodeColumn=function(e,n){return n>=0&&n<=e.getBarcodeColumnCount()+1},t.getStartColumn=function(e,n,r,o){var i,a,s=o?1:-1,c=null;if(t.isValidBarcodeColumn(e,n-s)&&(c=e.getDetectionResultColumn(n-s).getCodeword(r)),c!=null)return o?c.getEndX():c.getStartX();if((c=e.getDetectionResultColumn(n).getCodewordNearby(r))!=null)return o?c.getStartX():c.getEndX();if(t.isValidBarcodeColumn(e,n-s)&&(c=e.getDetectionResultColumn(n-s).getCodewordNearby(r)),c!=null)return o?c.getEndX():c.getStartX();for(var l=0;t.isValidBarcodeColumn(e,n-s);){n-=s;try{for(var f=(i=void 0,Ds(e.getDetectionResultColumn(n).getCodewords())),h=f.next();!h.done;h=f.next()){var d=h.value;if(d!=null)return(o?d.getEndX():d.getStartX())+s*l*(d.getEndX()-d.getStartX())}}catch(p){i={error:p}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}l++}return o?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,n,r,o,i,a,s,c){i=t.adjustCodewordStartColumn(e,n,r,o,i,a);var l,f=t.getModuleBitCount(e,n,r,o,i,a);if(f==null)return null;var h=wt.sum(f);if(o)l=i+h;else{for(var d=0;d<f.length/2;d++){var p=f[d];f[d]=f[f.length-1-d],f[f.length-1-d]=p}i=(l=i)-h}if(!t.checkCodewordSkew(h,s,c))return null;var u=xO.getDecodedValue(f),g=ht.getCodeword(u);return g===-1?null:new TO(i,l,t.getCodewordBucketNumber(u),g)},t.getModuleBitCount=function(e,n,r,o,i,a){for(var s=i,c=new Int32Array(8),l=0,f=o?1:-1,h=o;(o?s<r:s>=n)&&l<c.length;)e.get(s,a)===h?(c[l]++,s+=f):(l++,h=!h);return l===c.length||s===(o?r:n)&&l===c.length-1?c:null},t.getNumberOfECCodeWords=function(e){return 2<<e},t.adjustCodewordStartColumn=function(e,n,r,o,i,a){for(var s=i,c=o?-1:1,l=0;l<2;l++){for(;(o?s>=n:s<r)&&o===e.get(s,a);){if(Math.abs(i-s)>t.CODEWORD_SKEW_SIZE)return i;s+=c}c=-c,o=!o}return s},t.checkCodewordSkew=function(e,n,r){return n-t.CODEWORD_SKEW_SIZE<=e&&e<=r+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,n,r){if(e.length===0)throw Ie.getFormatInstance();var o=1<<n+1,i=t.correctErrors(e,r,o);t.verifyCodewordCount(e,o);var a=LO.decode(e,""+n);return a.setErrorsCorrected(i),a.setErasures(r.length),a},t.correctErrors=function(e,n,r){if(n!=null&&n.length>r/2+t.MAX_ERRORS||r<0||r>t.MAX_EC_CODEWORDS)throw pn.getChecksumInstance();return t.errorCorrection.decode(e,r,n)},t.verifyCodewordCount=function(e,n){if(e.length<4)throw Ie.getFormatInstance();var r=e[0];if(r>e.length)throw Ie.getFormatInstance();if(r===0){if(!(n<e.length))throw Ie.getFormatInstance();e[0]=e.length-n}},t.getBitCountForCodeword=function(e){for(var n=new Int32Array(8),r=0,o=n.length-1;!((1&e)!==r&&(r=1&e,--o<0));)n[o]++,e>>=1;return n},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 n=new ch,r=0;r<e.length;r++){n.format("Row %2d: ",r);for(var o=0;o<e[r].length;o++){var i=e[r][o];i.getValue().length===0?n.format(" ",null):n.format("%4d(%2d)",i.getValue()[0],i.getConfidence(i.getValue()[0]))}n.format("%n")}return n.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new wO,t}(),jO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zu=function(){function t(){}return t.prototype.decode=function(e,n){n===void 0&&(n=null);var r=t.decode(e,n,!1);if(r==null||r.length===0||r[0]==null)throw ge.getNotFoundInstance();return r[0]},t.prototype.decodeMultiple=function(e,n){n===void 0&&(n=null);try{return t.decode(e,n,!0)}catch(r){throw r instanceof Ie||r instanceof pn?ge.getNotFoundInstance():r}},t.decode=function(e,n,r){var o,i,a=new Array,s=hO.detectMultiple(e,n,r);try{for(var c=jO(s.getPoints()),l=c.next();!l.done;l=c.next()){var f=l.value,h=FO.decode(s.getBits(),f[4],f[5],f[6],f[7],t.getMinCodewordWidth(f),t.getMaxCodewordWidth(f)),d=new ir(h.getText(),h.getRawBytes(),void 0,f,Ue.PDF_417);d.putMetadata(kn.ERROR_CORRECTION_LEVEL,h.getECLevel());var p=h.getOther();p!=null&&d.putMetadata(kn.PDF417_EXTRA_METADATA,p),a.push(d)}}catch(u){o={error:u}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}return a.map(function(u){return u})},t.getMaxWidth=function(e,n){return e==null||n==null?0:Math.trunc(Math.abs(e.getX()-n.getX()))},t.getMinWidth=function(e,n){return e==null||n==null?On.MAX_VALUE:Math.trunc(Math.abs(e.getX()-n.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*ht.MODULES_IN_CODEWORD/ht.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*ht.MODULES_IN_CODEWORD/ht.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])*ht.MODULES_IN_CODEWORD/ht.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*ht.MODULES_IN_CODEWORD/ht.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t}(),VO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gv=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return VO(e,t),e.kind="ReaderException",e}(rr),mv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yv=function(){function t(){}return t.prototype.decode=function(e,n){return this.setHints(n),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 n=e!=null&&e.get(Ft.TRY_HARDER)!==void 0,r=e==null?null:e.get(Ft.POSSIBLE_FORMATS),o=new Array;if(r!=null){var i=r.some(function(a){return a===Ue.UPC_A||a===Ue.UPC_E||a===Ue.EAN_13||a===Ue.EAN_8||a===Ue.CODABAR||a===Ue.CODE_39||a===Ue.CODE_93||a===Ue.CODE_128||a===Ue.ITF||a===Ue.RSS_14||a===Ue.RSS_EXPANDED});i&&!n&&o.push(new ma(e)),r.includes(Ue.QR_CODE)&&o.push(new Ku),r.includes(Ue.DATA_MATRIX)&&o.push(new Hu),r.includes(Ue.AZTEC)&&o.push(new Fu),r.includes(Ue.PDF_417)&&o.push(new zu),i&&n&&o.push(new ma(e))}o.length===0&&(n||o.push(new ma(e)),o.push(new Ku),o.push(new Hu),o.push(new Fu),o.push(new zu),n&&o.push(new ma(e))),this.readers=o},t.prototype.reset=function(){var e,n;if(this.readers!==null)try{for(var r=mv(this.readers),o=r.next();!o.done;o=r.next())o.value.reset()}catch(i){e={error:i}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.decodeInternal=function(e){var n,r;if(this.readers===null)throw new gv("No readers where selected, nothing can be read.");try{for(var o=mv(this.readers),i=o.next();!i.done;i=o.next()){var a=i.value;try{return a.decode(e,this.hints)}catch(s){if(s instanceof gv)continue}}}catch(s){n={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}throw new ge("No MultiFormat Readers were able to detect the code.")},t}(),UO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){n===void 0&&(n=null),r===void 0&&(r=500);var o=new yv;return o.setHints(n),t.call(this,o,r)||this}UO(e,t),e.prototype.decodeBitmap=function(n){return this.reader.decodeWithState(n)}})(ha);var GO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n){return n===void 0&&(n=500),t.call(this,new zu,n)||this}GO(e,t)})(ha);var vv,qO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n){return n===void 0&&(n=500),t.call(this,new Ku,n)||this}qO(e,t)})(ha),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"}(vv||(vv={}));var HO=function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i-1;a++)for(var s=r[a],c=0;c<o-1;c++){var l=s[c];l===s[c+1]&&l===r[a+1][c]&&l===r[a+1][c+1]&&n++}return t.N2*n},t.applyMaskPenaltyRule3=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=0;s<o;s++){var c=r[a];s+6<o&&c[s]===1&&c[s+1]===0&&c[s+2]===1&&c[s+3]===1&&c[s+4]===1&&c[s+5]===0&&c[s+6]===1&&(t.isWhiteHorizontal(c,s-4,s)||t.isWhiteHorizontal(c,s+7,s+11))&&n++,a+6<i&&r[a][s]===1&&r[a+1][s]===0&&r[a+2][s]===1&&r[a+3][s]===1&&r[a+4][s]===1&&r[a+5][s]===0&&r[a+6][s]===1&&(t.isWhiteVertical(r,s,a-4,a)||t.isWhiteVertical(r,s,a+7,a+11))&&n++}return n*t.N3},t.isWhiteHorizontal=function(e,n,r){n=Math.max(n,0),r=Math.min(r,e.length);for(var o=n;o<r;o++)if(e[o]===1)return!1;return!0},t.isWhiteVertical=function(e,n,r,o){r=Math.max(r,0),o=Math.min(o,e.length);for(var i=r;i<o;i++)if(e[i][n]===1)return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var n=0,r=e.getArray(),o=e.getWidth(),i=e.getHeight(),a=0;a<i;a++)for(var s=r[a],c=0;c<o;c++)s[c]===1&&n++;var l=e.getHeight()*e.getWidth();return Math.floor(10*Math.abs(2*n-l)/l)*t.N4},t.getDataMaskBit=function(e,n,r){var o,i;switch(e){case 0:o=r+n&1;break;case 1:o=1&r;break;case 2:o=n%3;break;case 3:o=(r+n)%3;break;case 4:o=Math.floor(r/2)+Math.floor(n/3)&1;break;case 5:o=(1&(i=r*n))+i%3;break;case 6:o=(1&(i=r*n))+i%3&1;break;case 7:o=(i=r*n)%3+(r+n&1)&1;break;default:throw new Ke("Invalid mask pattern: "+e)}return o===0},t.applyMaskPenaltyRule1Internal=function(e,n){for(var r=0,o=n?e.getHeight():e.getWidth(),i=n?e.getWidth():e.getHeight(),a=e.getArray(),s=0;s<o;s++){for(var c=0,l=-1,f=0;f<i;f++){var h=n?a[s][f]:a[f][s];h===l?c++:(c>=5&&(r+=t.N1+(c-5)),c=1,l=h)}c>=5&&(r+=t.N1+(c-5))}return r},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t}(),WO=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 Nt;return e.append(`<<
|
|
145
|
-
`),e.append(" mode: "),e.append(this.mode?this.mode.toString():"null"),e.append(`
|
|
146
|
-
ecLevel: `),e.append(this.ecLevel?this.ecLevel.toString():"null"),e.append(`
|
|
147
|
-
version: `),e.append(this.version?this.version.toString():"null"),e.append(`
|
|
148
|
-
maskPattern: `),e.append(this.maskPattern.toString()),this.matrix?(e.append(`
|
|
149
|
-
matrix:
|
|
150
|
-
`),e.append(this.matrix.toString())):e.append(`
|
|
151
|
-
matrix: null
|
|
152
|
-
`),e.append(`>>
|
|
153
|
-
`),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}(),YO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Si=function(t){function e(){return t!==null&&t.apply(this,arguments)||this}return YO(e,t),e.kind="WriterException",e}(rr);(function(){function t(){}return t.clearMatrix=function(e){e.clear(255)},t.buildMatrix=function(e,n,r,o,i){t.clearMatrix(i),t.embedBasicPatterns(r,i),t.embedTypeInfo(n,o,i),t.maybeEmbedVersionInfo(r,i),t.embedDataBits(e,o,i)},t.embedBasicPatterns=function(e,n){t.embedPositionDetectionPatternsAndSeparators(n),t.embedDarkDotAtLeftBottomCorner(n),t.maybeEmbedPositionAdjustmentPatterns(e,n),t.embedTimingPatterns(n)},t.embedTypeInfo=function(e,n,r){var o=new Jr;t.makeTypeInfoBits(e,n,o);for(var i=0,a=o.getSize();i<a;++i){var s=o.get(o.getSize()-1-i),c=t.TYPE_INFO_COORDINATES[i],l=c[0],f=c[1];if(r.setBoolean(l,f,s),i<8){var h=r.getWidth()-i-1,d=8;r.setBoolean(h,d,s)}else h=8,d=r.getHeight()-7+(i-8),r.setBoolean(h,d,s)}},t.maybeEmbedVersionInfo=function(e,n){if(!(e.getVersionNumber()<7)){var r=new Jr;t.makeVersionInfoBits(e,r);for(var o=17,i=0;i<6;++i)for(var a=0;a<3;++a){var s=r.get(o);o--,n.setBoolean(i,n.getHeight()-11+a,s),n.setBoolean(n.getHeight()-11+a,i,s)}}},t.embedDataBits=function(e,n,r){for(var o=0,i=-1,a=r.getWidth()-1,s=r.getHeight()-1;a>0;){for(a===6&&(a-=1);s>=0&&s<r.getHeight();){for(var c=0;c<2;++c){var l=a-c;if(t.isEmpty(r.get(l,s))){var f=void 0;o<e.getSize()?(f=e.get(o),++o):f=!1,n!==255&&HO.getDataMaskBit(n,l,s)&&(f=!f),r.setBoolean(l,s,f)}}s+=i}s+=i=-i,a-=2}if(o!==e.getSize())throw new Si("Not all bits consumed: "+o+"/"+e.getSize())},t.findMSBSet=function(e){return 32-On.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,n){if(n===0)throw new Ke("0 polynomial");var r=t.findMSBSet(n);for(e<<=r-1;t.findMSBSet(e)>=r;)e^=n<<t.findMSBSet(e)-r;return e},t.makeTypeInfoBits=function(e,n,r){if(!WO.isValidMaskPattern(n))throw new Si("Invalid mask pattern");var o=e.getBits()<<3|n;r.appendBits(o,5);var i=t.calculateBCHCode(o,t.TYPE_INFO_POLY);r.appendBits(i,10);var a=new Jr;if(a.appendBits(t.TYPE_INFO_MASK_PATTERN,15),r.xor(a),r.getSize()!==15)throw new Si("should not happen but we got: "+r.getSize())},t.makeVersionInfoBits=function(e,n){n.appendBits(e.getVersionNumber(),6);var r=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(n.appendBits(r,12),n.getSize()!==18)throw new Si("should not happen but we got: "+n.getSize())},t.isEmpty=function(e){return e===255},t.embedTimingPatterns=function(e){for(var n=8;n<e.getWidth()-8;++n){var r=(n+1)%2;t.isEmpty(e.get(n,6))&&e.setNumber(n,6,r),t.isEmpty(e.get(6,n))&&e.setNumber(6,n,r)}},t.embedDarkDotAtLeftBottomCorner=function(e){if(e.get(8,e.getHeight()-8)===0)throw new Si;e.setNumber(8,e.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,n,r){for(var o=0;o<8;++o){if(!t.isEmpty(r.get(e+o,n)))throw new Si;r.setNumber(e+o,n,0)}},t.embedVerticalSeparationPattern=function(e,n,r){for(var o=0;o<7;++o){if(!t.isEmpty(r.get(e,n+o)))throw new Si;r.setNumber(e,n+o,0)}},t.embedPositionAdjustmentPattern=function(e,n,r){for(var o=0;o<5;++o)for(var i=t.POSITION_ADJUSTMENT_PATTERN[o],a=0;a<5;++a)r.setNumber(e+a,n+o,i[a])},t.embedPositionDetectionPattern=function(e,n,r){for(var o=0;o<7;++o)for(var i=t.POSITION_DETECTION_PATTERN[o],a=0;a<7;++a)r.setNumber(e+a,n+o,i[a])},t.embedPositionDetectionPatternsAndSeparators=function(e){var n=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-n,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-n,e),t.embedHorizontalSeparationPattern(0,7,e),t.embedHorizontalSeparationPattern(e.getWidth()-8,7,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-8,e),t.embedVerticalSeparationPattern(7,0,e),t.embedVerticalSeparationPattern(e.getHeight()-7-1,0,e),t.embedVerticalSeparationPattern(7,e.getHeight()-7,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,n){if(!(e.getVersionNumber()<2))for(var r=e.getVersionNumber()-1,o=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r],i=0,a=o.length;i!==a;i++){var s=o[i];if(s>=0)for(var c=0;c!==a;c++){var l=o[c];l>=0&&t.isEmpty(n.get(l,s))&&t.embedPositionAdjustmentPattern(l-2,s-2,n)}}},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})(),function(){Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),or.UTF8.getName()}();var KO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r,o,i,a,s,c,l){var f=t.call(this,s,c)||this;if(f.yuvData=n,f.dataWidth=r,f.dataHeight=o,f.left=i,f.top=a,i+s>r||a+c>o)throw new Ke("Crop rectangle does not fit within image data.");return l&&f.reverseHorizontal(s,c),f}KO(e,t),e.prototype.getRow=function(n,r){if(n<0||n>=this.getHeight())throw new Ke("Requested row is outside the image: "+n);var o=this.getWidth();(r==null||r.length<o)&&(r=new Uint8ClampedArray(o));var i=(n+this.top)*this.dataWidth+this.left;return Ut.arraycopy(this.yuvData,i,r,0,o),r},e.prototype.getMatrix=function(){var n=this.getWidth(),r=this.getHeight();if(n===this.dataWidth&&r===this.dataHeight)return this.yuvData;var o=n*r,i=new Uint8ClampedArray(o),a=this.top*this.dataWidth+this.left;if(n===this.dataWidth)return Ut.arraycopy(this.yuvData,a,i,0,o),i;for(var s=0;s<r;s++){var c=s*n;Ut.arraycopy(this.yuvData,a,i,c,n),a+=this.dataWidth}return i},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(n,r,o,i){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+n,this.top+r,o,i,!1)},e.prototype.renderThumbnail=function(){for(var n=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,r=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,o=new Int32Array(n*r),i=this.yuvData,a=this.top*this.dataWidth+this.left,s=0;s<r;s++){for(var c=s*n,l=0;l<n;l++){var f=255&i[a+l*e.THUMBNAIL_SCALE_FACTOR];o[c+l]=4278190080|65793*f}a+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return o},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(n,r){for(var o=this.yuvData,i=0,a=this.top*this.dataWidth+this.left;i<r;i++,a+=this.dataWidth)for(var s=a+n/2,c=a,l=a+n-1;c<s;c++,l--){var f=o[c];o[c]=o[l],o[l]=f}},e.prototype.invert=function(){return new Ru(this)},e.THUMBNAIL_SCALE_FACTOR=2})(Os);var zO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r,o,i,a,s,c){var l=t.call(this,r,o)||this;if(l.dataWidth=i,l.dataHeight=a,l.left=s,l.top=c,n.BYTES_PER_ELEMENT===4){for(var f=r*o,h=new Uint8ClampedArray(f),d=0;d<f;d++){var p=n[d],u=p>>16&255,g=p>>7&510,m=255&p;h[d]=(u+g+m)/4&255}l.luminances=h}else l.luminances=n;if(i===void 0&&(l.dataWidth=r),a===void 0&&(l.dataHeight=o),s===void 0&&(l.left=0),c===void 0&&(l.top=0),l.left+r>l.dataWidth||l.top+o>l.dataHeight)throw new Ke("Crop rectangle does not fit within image data.");return l}zO(e,t),e.prototype.getRow=function(n,r){if(n<0||n>=this.getHeight())throw new Ke("Requested row is outside the image: "+n);var o=this.getWidth();(r==null||r.length<o)&&(r=new Uint8ClampedArray(o));var i=(n+this.top)*this.dataWidth+this.left;return Ut.arraycopy(this.luminances,i,r,0,o),r},e.prototype.getMatrix=function(){var n=this.getWidth(),r=this.getHeight();if(n===this.dataWidth&&r===this.dataHeight)return this.luminances;var o=n*r,i=new Uint8ClampedArray(o),a=this.top*this.dataWidth+this.left;if(n===this.dataWidth)return Ut.arraycopy(this.luminances,a,i,0,o),i;for(var s=0;s<r;s++){var c=s*n;Ut.arraycopy(this.luminances,a,i,c,n),a+=this.dataWidth}return i},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(n,r,o,i){return new e(this.luminances,o,i,this.dataWidth,this.dataHeight,this.left+n,this.top+r)},e.prototype.invert=function(){return new Ru(this)}})(Os);var $O=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(){return t!==null&&t.apply(this,arguments)||this}$O(e,t),e.forName=function(n){return this.getCharacterSetECIByName(n)}})(or);var XO=function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t}(),QO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wv=function(t){function e(n,r,o){var i=t.call(this,n)||this;return i.value=r,i.bitCount=o,i}return QO(e,t),e.prototype.appendTo=function(n,r){n.appendBits(this.value,this.bitCount)},e.prototype.add=function(n,r){return new e(this,n,r)},e.prototype.addBinaryShift=function(n,r){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,n,r)},e.prototype.toString=function(){var n=this.value&(1<<this.bitCount)-1;return n|=1<<this.bitCount,"<"+On.toBinaryString(n|1<<this.bitCount).substring(1)+">"},e}(XO),JO=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r,o){var i=t.call(this,n,0,0)||this;return i.binaryShiftStart=r,i.binaryShiftByteCount=o,i}JO(e,t),e.prototype.appendTo=function(n,r){for(var o=0;o<this.binaryShiftByteCount;o++)(o===0||o===31&&this.binaryShiftByteCount<=62)&&(n.appendBits(31,5),this.binaryShiftByteCount>62?n.appendBits(this.binaryShiftByteCount-31,16):o===0?n.appendBits(Math.min(this.binaryShiftByteCount,31),5):n.appendBits(this.binaryShiftByteCount-31,5)),n.appendBits(r[this.binaryShiftStart+o],8)},e.prototype.addBinaryShift=function(n,r){return new e(this,n,r)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}})(wv),new wv(null,0,0);var ZO=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(t){var e,n;try{for(var r=ZO(t),o=r.next();!o.done;o=r.next()){var i=o.value;yr.fill(i,-1)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}t[0][4]=0,t[1][4]=0,t[1][0]=28,t[3][4]=0,t[2][4]=0,t[2][0]=15})(yr.createInt32Array(6,6)),function(t){var e=bn.getCharCode(" "),n=bn.getCharCode("."),r=bn.getCharCode(",");t[0][e]=1;for(var o=bn.getCharCode("Z"),i=bn.getCharCode("A"),a=i;a<=o;a++)t[0][a]=a-i+2;t[1][e]=1;var s=bn.getCharCode("z"),c=bn.getCharCode("a");for(a=c;a<=s;a++)t[1][a]=a-c+2;t[2][e]=1;var l=bn.getCharCode("9"),f=bn.getCharCode("0");for(a=f;a<=l;a++)t[2][a]=a-f+2;t[2][r]=12,t[2][n]=13;for(var h=["\0"," ","","","","","","","\x07","\b"," ",`
|
|
154
|
-
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],d=0;d<h.length;d++)t[3][bn.getCharCode(h[d])]=d;var p=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(d=0;d<p.length;d++)bn.getCharCode(p[d])>0&&(t[4][bn.getCharCode(p[d])]=d)}(yr.createInt32Array(5,256));var eP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),tP=function(t){function e(n){var r=t.call(this,n.width,n.height)||this;return r.canvas=n,r.buffer=e.makeBufferFromCanvasImageData(n),r}return eP(e,t),e.makeBufferFromCanvasImageData=function(n){var r=n.getContext("2d");if(!r)throw new Error("Couldn't get canvas context.");var o=r.getImageData(0,0,n.width,n.height);return e.toGrayscaleBuffer(o.data,n.width,n.height)},e.toGrayscaleBuffer=function(n,r,o){for(var i=new Uint8ClampedArray(r*o),a=0,s=0,c=n.length;a<c;a+=4,s++){var l=void 0;n[a+3]===0?l=255:l=306*n[a]+601*n[a+1]+117*n[a+2]+512>>10,i[s]=l}return i},e.prototype.getRow=function(n,r){if(n<0||n>=this.getHeight())throw new Ke("Requested row is outside the image: "+n);var o=this.getWidth(),i=n*o;return r===null?r=this.buffer.slice(i,i+o):(r.length<o&&(r=new Uint8ClampedArray(o)),r.set(this.buffer.slice(i,i+o))),r},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(n,r,o,i){return t.prototype.crop.call(this,n,r,o,i),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.invert=function(){return new Ru(this)},e.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var n=this.canvas.ownerDocument.createElement("canvas");n.width=this.canvas.width,n.height=this.canvas.height,this.tempCanvasElement=n}return this.tempCanvasElement},e.prototype.rotate=function(n){var r=this.getTempCanvasElement();if(!r)throw new Error("Could not create a Canvas element.");var o=n*e.DEGREE_TO_RADIANS,i=this.canvas.width,a=this.canvas.height,s=Math.ceil(Math.abs(Math.cos(o))*i+Math.abs(Math.sin(o))*a),c=Math.ceil(Math.abs(Math.sin(o))*i+Math.abs(Math.cos(o))*a);r.width=s,r.height=c;var l=r.getContext("2d");if(!l)throw new Error("Could not create a Convas Context element.");return l.translate(s/2,c/2),l.rotate(o),l.drawImage(this.canvas,i/-2,a/-2),this.buffer=e.makeBufferFromCanvasImageData(r),this},e.DEGREE_TO_RADIANS=Math.PI/180,e}(Os);function bv(){return typeof navigator<"u"}function nP(){return!!(bv()&&navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices)}var va=function(){return va=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},va.apply(this,arguments)},en=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(l){try{c(r.next(l))}catch(f){i(f)}}function s(l){try{c(r.throw(l))}catch(f){i(f)}}function c(l){var f;l.done?o(l.value):(f=l.value,f instanceof n?f:new n(function(h){h(f)})).then(a,s)}c((r=r.apply(t,[])).next())})},tn=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return function(f){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&f[0]?r.return:f[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,f[1])).done)return o;switch(r=0,o&&(f=[2&f[0],o.value]),f[0]){case 0:case 1:o=f;break;case 4:return a.label++,{value:f[1],done:!1};case 5:a.label++,r=f[1],f=[0];continue;case 7:f=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!((o=o.length>0&&o[o.length-1])||f[0]!==6&&f[0]!==2)){a=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){a.label=f[1];break}if(f[0]===6&&a.label<o[1]){a.label=o[1],o=f;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(f);break}o[2]&&a.ops.pop(),a.trys.pop();continue}f=e.call(t,a)}catch(h){f=[6,h],r=0}finally{n=o=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([c,l])}}},$u=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rP={delayBetweenScanAttempts:500,delayBetweenScanSuccess:500,tryPlayVideoTimeout:5e3},wa=function(){function t(e,n,r){n===void 0&&(n=new Map),r===void 0&&(r={}),this.reader=e,this.hints=n,this.options=va(va({},rP),r)}return Object.defineProperty(t.prototype,"possibleFormats",{set:function(e){this.hints.set(Ft.POSSIBLE_FORMATS,e)},enumerable:!1,configurable:!0}),t.addVideoSource=function(e,n){try{e.srcObject=n}catch{e.src=URL.createObjectURL(n)}},t.mediaStreamSetTorch=function(e,n){return en(this,void 0,void 0,function(){return tn(this,function(r){switch(r.label){case 0:return[4,e.applyConstraints({advanced:[{fillLightMode:n?"flash":"off",torch:!!n}]})];case 1:return r.sent(),[2]}})})},t.mediaStreamIsTorchCompatible=function(e){var n,r,o=e.getVideoTracks();try{for(var i=$u(o),a=i.next();!a.done;a=i.next()){var s=a.value;if(t.mediaStreamIsTorchCompatibleTrack(s))return!0}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},t.mediaStreamIsTorchCompatibleTrack=function(e){try{return"torch"in e.getCapabilities()}catch(n){return console.error(n),console.warn("Your browser may be not fully compatible with WebRTC and/or ImageCapture specs. Torch will not be available."),!1}},t.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&e.readyState>2},t.getMediaElement=function(e,n){var r=document.getElementById(e);if(!r)throw new Zt("element with id '"+e+"' not found");if(r.nodeName.toLowerCase()!==n.toLowerCase())throw new Zt("element with id '"+e+"' must be an "+n+" element");return r},t.createVideoElement=function(e){if(e instanceof HTMLVideoElement)return e;if(typeof e=="string")return t.getMediaElement(e,"video");if(!e&&typeof document<"u"){var n=document.createElement("video");return n.width=200,n.height=200,n}throw new Error("Couldn't get videoElement from videoSource!")},t.prepareImageElement=function(e){if(e instanceof HTMLImageElement)return e;if(typeof e=="string")return t.getMediaElement(e,"img");if(e===void 0){var n=document.createElement("img");return n.width=200,n.height=200,n}throw new Error("Couldn't get imageElement from imageSource!")},t.prepareVideoElement=function(e){var n=t.createVideoElement(e);return n.setAttribute("autoplay","true"),n.setAttribute("muted","true"),n.setAttribute("playsinline","true"),n},t.isImageLoaded=function(e){return!!e.complete&&e.naturalWidth!==0},t.createBinaryBitmapFromCanvas=function(e){var n=new tP(e),r=new jy(n);return new Ly(r)},t.drawImageOnCanvas=function(e,n){e.drawImage(n,0,0)},t.getMediaElementDimensions=function(e){if(e instanceof HTMLVideoElement)return{height:e.videoHeight,width:e.videoWidth};if(e instanceof HTMLImageElement)return{height:e.naturalHeight||e.height,width:e.naturalWidth||e.width};throw new Error("Couldn't find the Source's dimentions!")},t.createCaptureCanvas=function(e){if(!e)throw new Zt("Cannot create a capture canvas without a media element.");if(typeof document>"u")throw new Error(`The page "Document" is undefined, make sure you're running in a browser.`);var n=document.createElement("canvas"),r=t.getMediaElementDimensions(e),o=r.width,i=r.height;return n.style.width=o+"px",n.style.height=i+"px",n.width=o,n.height=i,n},t.tryPlayVideo=function(e){return en(this,void 0,void 0,function(){var n;return tn(this,function(r){switch(r.label){case 0:if(e!=null&&e.ended)return console.error("Trying to play video that has ended."),[2,!1];if(t.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2,!0];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[2,!0];case 3:return n=r.sent(),console.warn("It was not possible to play the video.",n),[2,!1];case 4:return[2]}})})},t.createCanvasFromMediaElement=function(e){var n=t.createCaptureCanvas(e),r=n.getContext("2d");if(!r)throw new Error("Couldn't find Canvas 2D Context.");return t.drawImageOnCanvas(r,e),n},t.createBinaryBitmapFromMediaElem=function(e){var n=t.createCanvasFromMediaElement(e);return t.createBinaryBitmapFromCanvas(n)},t.destroyImageElement=function(e){e.src="",e.removeAttribute("src"),e=void 0},t.listVideoInputDevices=function(){return en(this,void 0,void 0,function(){var e,n,r,o,i,a,s,c,l,f,h,d;return tn(this,function(p){switch(p.label){case 0:if(!bv())throw new Error("Can't enumerate devices, navigator is not present.");if(!nP())throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=p.sent(),n=[];try{for(r=$u(e),o=r.next();!o.done;o=r.next())i=o.value,(a=i.kind==="video"?"videoinput":i.kind)==="videoinput"&&(s=i.deviceId||i.id,c=i.label||"Video device "+(n.length+1),l=i.groupId,f={deviceId:s,label:c,kind:a,groupId:l},n.push(f))}catch(u){h={error:u}}finally{try{o&&!o.done&&(d=r.return)&&d.call(r)}finally{if(h)throw h.error}}return[2,n]}})})},t.findDeviceById=function(e){return en(this,void 0,void 0,function(){var n;return tn(this,function(r){switch(r.label){case 0:return[4,t.listVideoInputDevices()];case 1:return(n=r.sent())?[2,n.find(function(o){return o.deviceId===e})]:[2]}})})},t.cleanVideoSource=function(e){if(e){try{e.srcObject=null}catch{e.src=""}e&&e.removeAttribute("src")}},t.playVideoOnLoadAsync=function(e,n){return en(this,void 0,void 0,function(){return tn(this,function(r){switch(r.label){case 0:return[4,t.tryPlayVideo(e)];case 1:return r.sent()?[2,!0]:[2,new Promise(function(o,i){var a=setTimeout(function(){t.isVideoPlaying(e)||(i(!1),e.removeEventListener("canplay",s))},n),s=function(){t.tryPlayVideo(e).then(function(c){clearTimeout(a),e.removeEventListener("canplay",s),o(c)})};e.addEventListener("canplay",s)})]}})})},t.attachStreamToVideo=function(e,n,r){return r===void 0&&(r=5e3),en(this,void 0,void 0,function(){var o;return tn(this,function(i){switch(i.label){case 0:return o=t.prepareVideoElement(n),t.addVideoSource(o,e),[4,t.playVideoOnLoadAsync(o,r)];case 1:return i.sent(),[2,o]}})})},t._waitImageLoad=function(e){return new Promise(function(n,r){var o=setTimeout(function(){t.isImageLoaded(e)||(e.removeEventListener("load",i),r())},1e4),i=function(){clearTimeout(o),e.removeEventListener("load",i),n()};e.addEventListener("load",i)})},t.checkCallbackFnOrThrow=function(e){if(!e)throw new Zt("`callbackFn` is a required parameter, you cannot capture results without it.")},t.disposeMediaStream=function(e){e.getVideoTracks().forEach(function(n){return n.stop()}),e=void 0},t.prototype.decode=function(e){var n=t.createCanvasFromMediaElement(e);return this.decodeFromCanvas(n)},t.prototype.decodeBitmap=function(e){return this.reader.decode(e,this.hints)},t.prototype.decodeFromCanvas=function(e){var n=t.createBinaryBitmapFromCanvas(e);return this.decodeBitmap(n)},t.prototype.decodeFromImageElement=function(e){return en(this,void 0,void 0,function(){var n;return tn(this,function(r){switch(r.label){case 0:if(!e)throw new Zt("An image element must be provided.");return n=t.prepareImageElement(e),[4,this._decodeOnLoadImage(n)];case 1:return[2,r.sent()]}})})},t.prototype.decodeFromImageUrl=function(e){return en(this,void 0,void 0,function(){var n;return tn(this,function(r){switch(r.label){case 0:if(!e)throw new Zt("An URL must be provided.");(n=t.prepareImageElement()).src=e,r.label=1;case 1:return r.trys.push([1,,3,4]),[4,this.decodeFromImageElement(n)];case 2:return[2,r.sent()];case 3:return t.destroyImageElement(n),[7];case 4:return[2]}})})},t.prototype.decodeFromConstraints=function(e,n,r){return en(this,void 0,void 0,function(){var o,i;return tn(this,function(a){switch(a.label){case 0:return t.checkCallbackFnOrThrow(r),[4,navigator.mediaDevices.getUserMedia(e)];case 1:o=a.sent(),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.decodeFromStream(o,n,r)];case 3:return[2,a.sent()];case 4:throw i=a.sent(),t.disposeMediaStream(o),i;case 5:return[2]}})})},t.prototype.decodeFromStream=function(e,n,r){return en(this,void 0,void 0,function(){var o,i,a,s,c,l,f,h,d,p,u=this;return tn(this,function(g){switch(g.label){case 0:return t.checkCallbackFnOrThrow(r),o=this.options.tryPlayVideoTimeout,[4,t.attachStreamToVideo(e,n,o)];case 1:return i=g.sent(),a=function(){var m,y;try{for(var w=$u(e.getVideoTracks()),b=w.next();!b.done;b=w.next())b.value.stop()}catch(E){m={error:E}}finally{try{b&&!b.done&&(y=w.return)&&y.call(w)}finally{if(m)throw m.error}}e=void 0},s=function(){a(),t.cleanVideoSource(i)},c=this.scan(i,r,s),l=e.getVideoTracks(),f=va(va({},c),{stop:function(){c.stop()},streamVideoConstraintsApply:function(m,y){return en(this,void 0,void 0,function(){var w,b,E,C,S,T;return tn(this,function(P){switch(P.label){case 0:w=y?l.filter(y):l,P.label=1;case 1:P.trys.push([1,6,7,8]),b=$u(w),E=b.next(),P.label=2;case 2:return E.done?[3,5]:[4,E.value.applyConstraints(m)];case 3:P.sent(),P.label=4;case 4:return E=b.next(),[3,2];case 5:return[3,8];case 6:return C=P.sent(),S={error:C},[3,8];case 7:try{E&&!E.done&&(T=b.return)&&T.call(b)}finally{if(S)throw S.error}return[7];case 8:return[2]}})})},streamVideoConstraintsGet:function(m){return l.find(m).getConstraints()},streamVideoSettingsGet:function(m){return l.find(m).getSettings()},streamVideoCapabilitiesGet:function(m){return l.find(m).getCapabilities()}}),t.mediaStreamIsTorchCompatible(e)&&(h=l==null?void 0:l.find(function(m){return t.mediaStreamIsTorchCompatibleTrack(m)}),d=function(m){return en(u,void 0,void 0,function(){return tn(this,function(y){switch(y.label){case 0:return[4,t.mediaStreamSetTorch(h,m)];case 1:return y.sent(),[2]}})})},f.switchTorch=d,p=function(){c.stop(),d(!1)},f.stop=p),[2,f]}})})},t.prototype.decodeFromVideoDevice=function(e,n,r){return en(this,void 0,void 0,function(){var o;return tn(this,function(i){switch(i.label){case 0:return t.checkCallbackFnOrThrow(r),o={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeFromConstraints(o,n,r)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromVideoElement=function(e,n){return en(this,void 0,void 0,function(){var r,o;return tn(this,function(i){switch(i.label){case 0:if(t.checkCallbackFnOrThrow(n),!e)throw new Zt("A video element must be provided.");return r=t.prepareVideoElement(e),o=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,o)];case 1:return i.sent(),[2,this.scan(r,n)]}})})},t.prototype.decodeFromVideoUrl=function(e,n){return en(this,void 0,void 0,function(){var r,o,i;return tn(this,function(a){switch(a.label){case 0:if(t.checkCallbackFnOrThrow(n),!e)throw new Zt("An URL must be provided.");return(r=t.prepareVideoElement()).src=e,o=function(){t.cleanVideoSource(r)},i=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(r,i)];case 1:return a.sent(),[2,this.scan(r,n,o)]}})})},t.prototype.decodeOnceFromConstraints=function(e,n){return en(this,void 0,void 0,function(){var r;return tn(this,function(o){switch(o.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return r=o.sent(),[4,this.decodeOnceFromStream(r,n)];case 2:return[2,o.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,n){return en(this,void 0,void 0,function(){var r,o;return tn(this,function(i){switch(i.label){case 0:return r=!!n,[4,t.attachStreamToVideo(e,n)];case 1:o=i.sent(),i.label=2;case 2:return i.trys.push([2,,4,5]),[4,this.scanOneResult(o)];case 3:return[2,i.sent()];case 4:return r||t.cleanVideoSource(o),[7];case 5:return[2]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,n){return en(this,void 0,void 0,function(){var r;return tn(this,function(o){switch(o.label){case 0:return r={video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},[4,this.decodeOnceFromConstraints(r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeOnceFromVideoElement=function(e){return en(this,void 0,void 0,function(){var n,r;return tn(this,function(o){switch(o.label){case 0:if(!e)throw new Zt("A video element must be provided.");return n=t.prepareVideoElement(e),r=this.options.tryPlayVideoTimeout,[4,t.playVideoOnLoadAsync(n,r)];case 1:return o.sent(),[4,this.scanOneResult(n)];case 2:return[2,o.sent()]}})})},t.prototype.decodeOnceFromVideoUrl=function(e){return en(this,void 0,void 0,function(){var n,r;return tn(this,function(o){switch(o.label){case 0:if(!e)throw new Zt("An URL must be provided.");(n=t.prepareVideoElement()).src=e,r=this.decodeOnceFromVideoElement(n),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,r];case 2:return[2,o.sent()];case 3:return t.cleanVideoSource(n),[7];case 4:return[2]}})})},t.prototype.scanOneResult=function(e,n,r,o){var i=this;return n===void 0&&(n=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),new Promise(function(a,s){i.scan(e,function(c,l,f){if(c)return a(c),void f.stop();if(l){if(l instanceof ge&&n||l instanceof pn&&r||l instanceof Ie&&o)return;f.stop(),s(l)}})})},t.prototype.scan=function(e,n,r){var o=this;t.checkCallbackFnOrThrow(n);var i=t.createCaptureCanvas(e),a=i.getContext("2d");if(!a)throw new Error("Couldn't create canvas for visual element scan.");var s,c=function(){a=void 0,i=void 0},l=!1,f={stop:function(){l=!0,clearTimeout(s),c(),r&&r()}},h=function(){if(!l)try{t.drawImageOnCanvas(a,e);var d=o.decodeFromCanvas(i);n(d,void 0,f),s=setTimeout(h,o.options.delayBetweenScanSuccess)}catch(p){if(n(void 0,p,f),p instanceof pn||p instanceof Ie||p instanceof ge)return void(s=setTimeout(h,o.options.delayBetweenScanAttempts));c(),r&&r(p)}};return h(),f},t.prototype._decodeOnLoadImage=function(e){return en(this,void 0,void 0,function(){return tn(this,function(n){switch(n.label){case 0:return t.isImageLoaded(e)?[3,2]:[4,t._waitImageLoad(e)];case 1:n.sent(),n.label=2;case 2:return[2,this.decode(e)]}})})},t}(),oP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){return t.call(this,new Fu,n,r)||this}oP(e,t)})(wa);var iP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){return t.call(this,new ma(n),n,r)||this}iP(e,t)})(wa);var aP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){return t.call(this,new Hu,n,r)||this}aP(e,t)})(wa);var sP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){var o=this,i=new yv;return i.setHints(n),(o=t.call(this,i,n,r)||this).reader=i,o}sP(e,t),Object.defineProperty(e.prototype,"possibleFormats",{set:function(n){this.hints.set(Ft.POSSIBLE_FORMATS,n),this.reader.setHints(this.hints)},enumerable:!1,configurable:!0}),e.prototype.decodeBitmap=function(n){return this.reader.decodeWithState(n)},e.prototype.setHints=function(n){this.hints=n,this.reader.setHints(this.hints)}})(wa);var cP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(n,r){return t.call(this,new zu,n,r)||this}cP(e,t)})(wa);var uP=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])},t(e,n)};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lP=function(t){function e(n,r){return t.call(this,new Ku,n,r)||this}return uP(e,t),e}(wa),Xu=function(t,e,n){var r=typeof t===n;return r||console.warn('[ReactQrReader]: Expected "'.concat(e,'" to be a of type "').concat(n,'".')),r},dP=function(t){var e=t.scanDelay,n=t.constraints,r=t.onResult,o=t.videoId,i=x.useRef(null);x.useEffect(function(){var a=new lP(null,{delayBetweenScanAttempts:e});return!function(){var s=typeof navigator<"u"&&!!navigator.mediaDevices;return s||console.warn('[ReactQrReader]: MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),s}()&&Xu(r,"onResult","function")&&r(null,new Error('MediaDevices API has no support for your browser. You can fix this by running "npm i webrtc-adapter"'),a),Xu(n,"constraints","object")&&a.decodeFromConstraints({video:n},o,function(s,c){Xu(r,"onResult","function")&&r(s,c,a)}).then(function(s){return i.current=s}).catch(function(s){Xu(r,"onResult","function")&&r(null,s,a)}),function(){var s;(s=i.current)===null||s===void 0||s.stop()}},[])},Ii=function(){return Ii=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ii.apply(this,arguments)},Ev={container:{width:"100%",paddingTop:"100%",overflow:"hidden",position:"relative"},video:{top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden",position:"absolute",transform:void 0}},lh=function(t){var e=t.videoContainerStyle,n=t.containerStyle,r=t.videoStyle,o=t.constraints,i=t.ViewFinder,a=t.scanDelay,s=t.className,c=t.onResult,l=t.videoId;return dP({constraints:o,scanDelay:a,onResult:c,videoId:l}),ce.createElement("section",{className:s,style:n},ce.createElement("div",{style:Ii(Ii({},Ev.container),e)},!!i&&ce.createElement(i,null),ce.createElement("video",{muted:!0,id:l,style:Ii(Ii(Ii({},Ev.video),r),{transform:(o==null?void 0:o.facingMode)==="user"&&"scaleX(-1)"})})))};lh.displayName="QrReader",lh.defaultProps={constraints:{facingMode:"user"},videoId:"video",scanDelay:500};function fP({onScan:t}){const{t:e}=Ve(),{cameraFacingMode:n}=qt(),[r,o]=x.useState(n??An.USER),[i,a]=x.useState(!(Gf&&!qf));return i?v.jsxs("div",{className:"relative w-full",children:[v.jsx(lh,{onResult:s=>{s&&t(s.getText())},constraints:{facingMode:r},videoStyle:{maxHeight:"calc(100vh-381px)",minHeight:267,borderRadius:"0.25rem",objectFit:"cover"},videoContainerStyle:{maxHeight:"calc(100vh-381px)",minHeight:267,borderRadius:"0.25rem"}}),v.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>r===An.USER?o(An.ENVIRONMENT):o(An.USER),children:v.jsx("img",{src:ku,alt:"camera-switch"})})]}):v.jsx("div",{className:"flex max-h-[calc(100vh-381px)] min-h-[267px] items-center justify-center",children:v.jsx(nt,{label:e("enableCamera"),disabled:i,onClick:()=>a(!0)})})}class rt{constructor(e,n,r,o,i){this._legacyCanvasSize=rt.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=e,this.$canvas=document.createElement("canvas"),r&&typeof r=="object"?this._onDecode=n:(console.warn(r||o||i?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=n),n=typeof r=="object"?r:{},this._onDecodeError=n.onDecodeError||(typeof r=="function"?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof o=="function"?o:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||i||this._preferredCamera,this._legacyCanvasSize=typeof r=="number"?r:typeof o=="number"?o:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),e.disablePictureInPicture=!0,e.playsInline=!0,e.muted=!0;let a=!1;if(e.hidden&&(e.hidden=!1,a=!0),document.body.contains(e)||(document.body.appendChild(e),a=!0),r=e.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(o=!!n.overlay,this.$overlay=n.overlay||document.createElement("div"),i=this.$overlay.style,i.position="absolute",i.display="none",i.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!o&&n.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(e),requestAnimationFrame(()=>{let s=window.getComputedStyle(e);s.display==="none"&&(e.style.setProperty("display","block","important"),a=!0),s.visibility!=="visible"&&(e.style.setProperty("visibility","visible","important"),a=!0),a&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),e.style.opacity="0",e.style.width="0",e.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),e.addEventListener("play",this._onPlay),e.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=rt.createQrEngine()}static set WORKER_PATH(e){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await rt.listCameras(!1)).length}catch{return!1}}static async listCameras(e=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(o=>o.kind==="videoinput"),r;try{e&&(await n()).every(o=>!o.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((o,i)=>({id:o.deviceId,label:o.label||(i===0?"Default Camera":`Camera ${i+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),rt._stopVideoStream(r))}}async hasFlash(){let e;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;e=this.$video.srcObject}else e=(await this._getCameraStream()).stream;return"torch"in e.getVideoTracks()[0].getSettings()}catch{return!1}finally{e&&e!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),rt._stopVideoStream(e))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(e){throw this._flashOn=!1,e}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),rt._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:e,facingMode:n}=await this._getCameraStream();!this._active||this._paused?rt._stopVideoStream(e):(this._setVideoMirror(n),this.$video.srcObject=e,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(e){if(!this._paused)throw this._active=!1,e}}stop(){this.pause(),this._active=!1}async pause(e=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let n=()=>{this.$video.srcObject instanceof MediaStream&&(rt._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return e?(n(),!0):(await new Promise(r=>setTimeout(r,300)),this._paused?(n(),!0):!1)}async setCamera(e){e!==this._preferredCamera&&(this._preferredCamera=e,await this._restartVideoStream())}static async scanImage(e,n,r,o,i=!1,a=!1){let s,c=!1;n&&("scanRegion"in n||"qrEngine"in n||"canvas"in n||"disallowCanvasResizing"in n||"alsoTryWithoutScanRegion"in n||"returnDetailedScanResult"in n)?(s=n.scanRegion,r=n.qrEngine,o=n.canvas,i=n.disallowCanvasResizing||!1,a=n.alsoTryWithoutScanRegion||!1,c=!0):console.warn(n||r||o||i||a?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),n=!!r;try{let l,f;[r,l]=await Promise.all([r||rt.createQrEngine(),rt._loadImage(e)]),[o,f]=rt._drawToCanvas(l,s,o,i);let h;if(r instanceof Worker){let d=r;n||rt._postWorkerMessageSync(d,"inversionMode","both"),h=await new Promise((p,u)=>{let g,m,y,w=-1;m=E=>{E.data.id===w&&(d.removeEventListener("message",m),d.removeEventListener("error",y),clearTimeout(g),E.data.data!==null?p({data:E.data.data,cornerPoints:rt._convertPoints(E.data.cornerPoints,s)}):u(rt.NO_QR_CODE_FOUND))},y=E=>{d.removeEventListener("message",m),d.removeEventListener("error",y),clearTimeout(g),u("Scanner error: "+(E?E.message||E:"Unknown Error"))},d.addEventListener("message",m),d.addEventListener("error",y),g=setTimeout(()=>y("timeout"),1e4);let b=f.getImageData(0,0,o.width,o.height);w=rt._postWorkerMessageSync(d,"decode",b,[b.data.buffer])})}else h=await Promise.race([new Promise((d,p)=>window.setTimeout(()=>p("Scanner error: timeout"),1e4)),(async()=>{try{var[d]=await r.detect(o);if(!d)throw rt.NO_QR_CODE_FOUND;return{data:d.rawValue,cornerPoints:rt._convertPoints(d.cornerPoints,s)}}catch(p){if(d=p.message||p,/not implemented|service unavailable/.test(d))return rt._disableBarcodeDetector=!0,rt.scanImage(e,{scanRegion:s,canvas:o,disallowCanvasResizing:i,alsoTryWithoutScanRegion:a});throw`Scanner error: ${d}`}})()]);return c?h:h.data}catch(l){if(!s||!a)throw l;let f=await rt.scanImage(e,{qrEngine:r,canvas:o,disallowCanvasResizing:i});return c?f:f.data}finally{n||rt._postWorkerMessage(r,"close")}}setGrayscaleWeights(e,n,r,o=!0){rt._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:e,green:n,blue:r,useIntegerApproximation:o})}setInversionMode(e){rt._postWorkerMessage(this._qrEnginePromise,"inversionMode",e)}static async createQrEngine(e){if(e&&console.warn("Specifying a worker path is not required and not supported anymore."),e=()=>Promise.resolve().then(()=>uB).then(r=>r.createWorker()),!(!rt._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return e();let n=navigator.userAgentData;return n&&n.brands.some(({brand:r})=>/Chromium/i.test(r))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:r,platformVersion:o})=>/arm/i.test(r||"arm")&&13<=parseInt(o||"13")).catch(()=>!0)?e():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(e){let n=Math.round(.6666666666666666*Math.min(e.videoWidth,e.videoHeight));return{x:Math.round((e.videoWidth-n)/2),y:Math.round((e.videoHeight-n)/2),width:n,height:n,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var e=this.$video,n=e.videoWidth,r=e.videoHeight,o=e.offsetWidth,i=e.offsetHeight,a=e.offsetLeft,s=e.offsetTop,c=window.getComputedStyle(e),l=c.objectFit,f=n/r,h=o/i;switch(l){case"none":var d=n,p=r;break;case"fill":d=o,p=i;break;default:(l==="cover"?f>h:f<h)?(p=i,d=p*f):(d=o,p=d/f),l==="scale-down"&&(d=Math.min(d,n),p=Math.min(p,r))}var[u,g]=c.objectPosition.split(" ").map((y,w)=>{const b=parseFloat(y);return y.endsWith("%")?(w?i-p:o-d)*b/100:b});c=this._scanRegion.width||n,h=this._scanRegion.height||r,l=this._scanRegion.x||0;var m=this._scanRegion.y||0;f=this.$overlay.style,f.width=`${c/n*d}px`,f.height=`${h/r*p}px`,f.top=`${s+g+m/r*p}px`,r=/scaleX\(-1\)/.test(e.style.transform),f.left=`${a+(r?o-u-d:u)+(r?n-l-c:l)/n*d}px`,f.transform=e.style.transform}})}static _convertPoints(e,n){if(!n)return e;let r=n.x||0,o=n.y||0,i=n.width&&n.downScaledWidth?n.width/n.downScaledWidth:1;n=n.height&&n.downScaledHeight?n.height/n.downScaledHeight:1;for(let a of e)a.x=a.x*i+r,a.y=a.y*n+o;return e}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var e=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;e<n&&await new Promise(o=>setTimeout(o,n-e)),this._lastScanTimestamp=Date.now();try{var r=await rt.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(o){if(!this._active)return;this._onDecodeError(o)}!rt._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=rt.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:o,y:i})=>`${o},${i}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(e){e!==rt.NO_QR_CODE_FOUND&&console.log(e)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let e=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],r=n.map(o=>Object.assign({},o,{[e]:{exact:this._preferredCamera}}));for(let o of[...r,...n])try{let i=await navigator.mediaDevices.getUserMedia({video:o,audio:!1}),a=this._getFacingMode(i)||(o.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:i,facingMode:a}}catch{}throw"Camera not found."}async _restartVideoStream(){let e=this._paused;await this.pause(!0)&&!e&&this._active&&await this.start()}static _stopVideoStream(e){for(let n of e.getTracks())n.stop(),e.removeTrack(n)}_setVideoMirror(e){this.$video.style.transform="scaleX("+(e==="user"?-1:1)+")"}_getFacingMode(e){return(e=e.getVideoTracks()[0])?/rear|back|environment/i.test(e.label)?"environment":/front|user|face/i.test(e.label)?"user":null:null}static _drawToCanvas(e,n,r,o=!1){r=r||document.createElement("canvas");let i=n&&n.x?n.x:0,a=n&&n.y?n.y:0,s=n&&n.width?n.width:e.videoWidth||e.width,c=n&&n.height?n.height:e.videoHeight||e.height;return o||(o=n&&n.downScaledWidth?n.downScaledWidth:s,n=n&&n.downScaledHeight?n.downScaledHeight:c,r.width!==o&&(r.width=o),r.height!==n&&(r.height=n)),n=r.getContext("2d",{alpha:!1}),n.imageSmoothingEnabled=!1,n.drawImage(e,i,a,s,c,0,0,r.width,r.height),[r,n]}static async _loadImage(e){if(e instanceof Image)return await rt._awaitImageLoad(e),e;if(e instanceof HTMLVideoElement||e instanceof HTMLCanvasElement||e instanceof SVGImageElement||"OffscreenCanvas"in window&&e instanceof OffscreenCanvas||"ImageBitmap"in window&&e instanceof ImageBitmap)return e;if(e instanceof File||e instanceof Blob||e instanceof URL||typeof e=="string"){let n=new Image;n.src=e instanceof File||e instanceof Blob?URL.createObjectURL(e):e.toString();try{return await rt._awaitImageLoad(n),n}finally{(e instanceof File||e instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(e){e.complete&&e.naturalWidth!==0||await new Promise((n,r)=>{let o=i=>{e.removeEventListener("load",o),e.removeEventListener("error",o),i instanceof ErrorEvent?r("Image load error"):n()};e.addEventListener("load",o),e.addEventListener("error",o)})}static async _postWorkerMessage(e,n,r,o){return rt._postWorkerMessageSync(await e,n,r,o)}static _postWorkerMessageSync(e,n,r,o){if(!(e instanceof Worker))return-1;let i=rt._workerMessageId++;return e.postMessage({id:i,type:n,data:r},o),i}}rt.DEFAULT_CANVAS_SIZE=400,rt.NO_QR_CODE_FOUND="No QR code found",rt._disableBarcodeDetector=!1,rt._workerMessageId=0;function hP({onScan:t}){const{t:e}=Ve(),{cameraFacingMode:n}=qt(),[r,o]=x.useState(n),i=x.useRef(),a=x.useRef(null),[s,c]=x.useState(!1),[l,f]=x.useState(!(Gf&&!qf)),h=u=>{t(u==null?void 0:u.data)},d=u=>{};x.useEffect(()=>(l&&p(),()=>{var u;a!=null&&a.current||(u=i==null?void 0:i.current)==null||u.stop()}),[l]);const p=()=>{var u;a!=null&&a.current&&!i.current&&(i.current=new rt(a==null?void 0:a.current,h,{onDecodeError:d,preferredCamera:r}),(u=i==null?void 0:i.current)==null||u.start().then(()=>c(!0)).catch(g=>{g&&c(!1)}))};return v.jsxs("div",{className:"relative",children:[v.jsx("video",{className:"max-h-[calc(100vh-381px)] min-h-[370px] rounded object-cover",ref:a,autoPlay:!0,playsInline:!0}),l?v.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>{var g;const u=r===An.USER?An.ENVIRONMENT:An.USER;o(u),(g=i==null?void 0:i.current)==null||g.setCamera(u)},children:v.jsx("img",{src:ku,alt:"camera-switch"})}):v.jsx("div",{className:"absolute left-1/2 right-1/2 top-1/2 flex items-center justify-center",children:v.jsx(nt,{label:e("enableCamera"),disabled:l,onClick:()=>f(!0)})})]})}function pP({onScan:t}){const{t:e}=Ve(),{cameraFacingMode:n}=qt(),[r,o]=x.useState(n),i=x.useRef(),a=x.useRef(null),[s,c]=x.useState(!1),l=d=>{t(d==null?void 0:d.data)},f=d=>{};x.useEffect(()=>()=>{var d;a!=null&&a.current||(d=i==null?void 0:i.current)==null||d.stop()});const h=()=>{var d;a!=null&&a.current&&!i.current&&(i.current=new rt(a==null?void 0:a.current,l,{onDecodeError:f,preferredCamera:r}),(d=i==null?void 0:i.current)==null||d.start().then(()=>c(!0)).catch(p=>{p&&c(!1)}))};return v.jsxs("div",{className:"relative",children:[v.jsx("video",{className:"max-h-[calc(100vh-381px)] min-h-[370px] rounded object-cover",ref:a,autoPlay:!0,playsInline:!0}),s?v.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-overlay",onClick:()=>{var p;const d=r===An.USER?An.ENVIRONMENT:An.USER;o(d),(p=i==null?void 0:i.current)==null||p.setCamera(d)},children:v.jsx("img",{src:ku,alt:"camera-switch"})}):v.jsx("div",{className:"absolute left-1/2 right-1/2 top-1/2 flex items-center justify-center",children:v.jsx(nt,{label:e("enableCamera"),disabled:s,onClick:h})})]})}function ba({data:t,dataSetter:e,setDefer:n,label:r=""}){const o=x.useRef(null),[i,a]=l6()??[0,0],{subscribe:s,unsubscribe:c}=qa(),{cameraService:l}=qt(),f=d=>{e(d)};x.useEffect(()=>{a&&a<=332&&o.current&&o.current.scrollIntoView({behavior:"smooth",block:"end"});const d=p=>{e(p.detail.code)};return s("onCodeScan",d),()=>{c("onCodeScan",d)}},[a]);const h=()=>{switch(+l){case 1:return v.jsx(My,{onScan:f});case 2:return v.jsx(hP,{onScan:f});case 3:return v.jsx(fP,{onScan:f});case 4:return v.jsx(pP,{onScan:f});default:return v.jsx(My,{onScan:f})}};return v.jsxs("div",{ref:o,children:[v.jsxs("div",{className:"mb-4 flex flex-col gap-4",children:[h(),v.jsx("hr",{})]}),v.jsx(oi,{label:r,value:t,autoFocus:!0,placeholder:"CDE2341S",onChange:d=>{n&&n(!0),e(d.target.value)}})]})}function gP(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n,portalSession:r}=qe(),[o,i]=x.useState(""),[a,s]=x.useState(!1),[c,l]=x.useState(!1),f=Qt(),h=Dt(),d=()=>{l(!0),h.get(`${n}/check-code`,{code:o}).then(p=>{if(p.data.identifier)return f("identifier",{state:{contactIdentifier:p.data.identifier.value}});if(p.data.voucher)return f("voucher",{state:{code:p.data.voucher.code}});if(p.data.giftcard)return f("giftcard",{state:{hash:p.data.giftcard.hash}});e(t("unknownCode",{code:o}))}).catch(e).finally(()=>l(!1))};return x.useEffect(()=>{o&&!a&&d()},[o]),v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("scanOrEnterX",{x:"code"})})})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:d,children:v.jsx(ba,{data:o,dataSetter:i,setDefer:s,label:t("contactIdentifier")})})}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(nt,{label:t("continue"),onClick:d,pending:c}),r.inputData.enable_email_identification&&v.jsx(nt,{label:t("useEmail"),variant:"secondary",onClick:()=>f("email")})]})})]})})}function mP(){const{state:t}=Sn();return v.jsx(Ar,{to:`${Ge.GIFTCARD}/select/${t.hash}`})}function yP(){const{state:t}=Sn(),{errorToast:e}=jt(),{uuid:n,mutate:r}=qe(),{onContactLink:o}=qt(),[i,a]=x.useState(!1),s=Dt(),c=f=>s.get(`${n}/contacts`,{contact_uuid:f}),l=()=>{s.put(n,{contact_identifier_value:t.contactIdentifier}).then(f=>{o&&c(f.data.data.contact.uuid).then(h=>{o==null||o(h.data.data)}),r().then(()=>a(!0))}).catch(e)};return x.useEffect(()=>{l()},[]),i?v.jsx(Ar,{to:`${Ge.PORTAL}/overview`}):v.jsx(Er,{})}function Cv(t){const{portalSession:e}=qe(),[n,r]=x.useState(),{isLoading:o,pending:i,mutate:a}=dr({url:`${e.uuid}/vouchers/${t}`,onData:r});return{voucher:n,isLoading:o,pending:i,mutate:a}}function vP(){const{t}=Ve(),{state:e}=Sn(),{errorToast:n}=jt(),{voucher:r}=Cv(e.code),{portalSession:o,uuid:i}=qe(),{onContactLink:a}=qt(),[s,c]=x.useState(!1),[l,f]=x.useState(!1),h=Qt(),d=Dt(),p=g=>d.get(`${i}/contacts`,{contact_uuid:g}),u=()=>{o.contact?p(o.contact.uuid).then(g=>{a==null||a(g.data.data)}).catch(n).finally(()=>c(!0)):r!=null&&r.contact?d.put(o.uuid,{email:r==null?void 0:r.contact.email}).then(g=>{a&&p(g.data.data.contact.uuid).then(m=>{a==null||a(m.data.data)})}).catch(n).finally(()=>c(!0)):f(!0)};return x.useEffect(()=>{r&&u()},[r]),r?v.jsxs(v.Fragment,{children:[s?v.jsx(Ar,{to:`${Ge.VOUCHER}/${r.code}/redeem`}):v.jsx(Er,{}),v.jsx(Po,{title:t("noContactLinkedToVoucherTitle"),isOpen:l,onClose:()=>f(!1),primaryAction:{label:t("linkToContact"),action:()=>h(`${Ge.VOUCHER}/${r.code}/identifier`)},secondaryAction:{label:t("cancel"),action:()=>f(!1)},children:v.jsx("p",{children:t("linkVoucherWithCodeToContact",{code:r.code})})})]}):v.jsx(Er,{})}function Qu({redirectRoute:t}){const{state:e}=Sn(),{t:n}=Ve(),{errorToast:r}=jt(),{onContactLink:o}=qt(),{portalSession:i,mutate:a}=qe(),{publish:s}=qa(),[c,l]=x.useState(""),[f,h]=x.useState(!1),[d,p]=x.useState(!1),u=Qt(),g=Dt(),m=b=>g.get(`${i.uuid}/contacts`,{contact_uuid:b}),y=()=>{h(!0),g.put(i.uuid,{email:c}).then(b=>{o&&m(b.data.data.contact.uuid).then(E=>{o==null||o(E.data.data)}),a().then(()=>u(t))}).catch(b=>{b.response.data.code===hc.CONTACT_NOT_FOUND&&p(!0)}).finally(()=>h(!1))},w=()=>{h(!0),g.post(`${i.uuid}/contacts`,{email:c}).then(y).catch(r).finally(()=>h(!1))};return x.useEffect(()=>{s("openKeyboard",{inputId:"via-email-address-input",inputValue:""})},[]),v.jsxs(v.Fragment,{children:[v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:n("fillInXBelow",{x:n("emailAddress").toLowerCase()})})})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:()=>c&&!f&&y(),children:v.jsx(oi,{id:"via-email-address-input",label:n("emailAddress"),autoFocus:!0,onChange:b=>l(b.target.value),beforeIcon:"mail"})})}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(nt,{label:n("continue"),className:"w-full",onClick:y,disabled:!c,pending:f}),v.jsx(nt,{label:n("useIdentifier"),variant:"secondary",onClick:()=>u("../identifier",{state:e})})]})})]})}),v.jsx(Po,{title:`${n("new")} ${n("emailAddress").toLowerCase()}`,isOpen:d,onClose:()=>p(!1),primaryAction:{label:n("confirm"),action:w,disabled:f},secondaryAction:{label:n("cancel"),action:()=>p(!1)},children:v.jsx("p",{children:n("continueWithEmail",{email:c})})})]})}function wP(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/*",element:v.jsx(gP,{})}),v.jsx(ze,{path:"/giftcard",element:v.jsx(mP,{})}),v.jsx(ze,{path:"/identifier",element:v.jsx(yP,{})}),v.jsx(ze,{path:"/voucher",element:v.jsx(vP,{})}),v.jsx(ze,{path:"/email",element:v.jsx(Qu,{redirectRoute:Ge.PORTAL})})]})}const bP={[rn.GIFTCARD]:`${Ge.GIFTCARD}/select`,[rn.REDEEM_GIFTCARD]:`${Ge.GIFTCARD}/redeem`,[rn.TOP_UP_GIFTCARD]:`${Ge.GIFTCARD}/top-up`};function EP(){const{t}=Ve(),{portalSession:e}=qe(),{errorToast:n}=jt(),[r,o]=x.useState(""),[i,a]=x.useState(!1),[s,c]=x.useState(!1),l=Dt(),f=Qt(),h=()=>{a(!0),l.get(`${e.uuid}/giftcards/${r}`).then(d=>{const p=e.type;f(`${bP[p]}/${d.data.data.hash}`)}).catch(d=>{n(d),o("")}).finally(()=>a(!1))};return x.useEffect(()=>{!s&&r&&h()},[r]),v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("scanGiftcard")})})}),v.jsx(Mt,{children:v.jsx(ba,{data:r,dataSetter:o,setDefer:c,label:t("hash")})}),v.jsx(on,{children:v.jsx(nt,{label:t("submit"),className:"w-full",onClick:h,disabled:!r,pending:i})})]})})}function CP(){const{t}=Ve(),{hash:e}=ji(),n=Qt();return v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("chooseType")})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex gap-2",children:[v.jsx(nt,{className:"grow",label:t("redeem"),onClick:()=>n(`${Ge.GIFTCARD}/redeem/${e}`)}),v.jsx(nt,{className:"grow",label:t("topUp"),onClick:()=>n(`${Ge.GIFTCARD}/top-up/${e}`)})]})})]})})}function _v(t){const{portalSession:e}=qe(),[n,r]=x.useState(),{isLoading:o,pending:i,mutate:a}=dr({url:`${e.uuid}/giftcards/${t}`,onData:r});return{giftcard:n,isLoading:o,pending:i,mutate:a}}function Ms(){const{mutate:t}=qe();return{get:()=>t().then(r=>r.data.data.events),post:()=>{t().then(r=>{N3(r.data.data.events)})}}}function _P(){const{t}=Ve(),{errorToast:e}=jt(),{hash:n}=ji(),{giftcard:r,mutate:o}=_v(n),{portalSession:i,mutate:a}=qe(),{onUseGiftcard:s}=qt(),{post:c}=Ms(),[l]=x.useState(i.results.remaining_amount?+i.results.remaining_amount:+i.inputData.amount_in_cents),[f,h]=x.useState(!1),d=i.inputData.allow_multiple_giftcards??!0,p=Qt(),u=Dt(),g=()=>{h(!0),u.post(`${i.uuid}/giftcards/transaction`,{uuid:r.uuid,amount_in_cents:-m()}).then(E=>{o(),a(),c(),s==null||s(E.data.data)}).catch(e).finally(()=>h(!1))},m=()=>Math.min(y(),r.amount_in_cents),y=()=>i.results.remaining_amount??i.inputData.amount_in_cents,w=()=>{let E=0;return i.events.filter(S=>S.type===Io.GIFTCARD_TRANSACTION).forEach(S=>{S.data.giftcard.uuid===r.uuid&&(E+=S.data.amount_in_cents)}),E},b=()=>{if(m())return{label:t("confirmAndPay",{amount:Mi(m(),i.currency)}),onClick:g};if(d&&y())return{label:t("useAnotherGiftcard"),onClick:()=>p(Ge.GIFTCARD),variant:"secondary"}};return r?v.jsx(Tn,{children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:`${t("giftcard")} ${r.hash}`})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex h-full flex-col gap-4",children:[v.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:v.jsxs("div",{className:"flex justify-between",children:[v.jsx("p",{className:"font-light text-gray-500",children:t("balance")}),v.jsx(Oo,{value:r.amount_in_cents,start:r.amount_in_cents-w(),currency:i.currency,asCurrency:!0})]})}),v.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:v.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[v.jsx("p",{className:"font-light text-gray-500",children:t("amountToPay")}),v.jsx("div",{className:"text-5xl font-bold",children:v.jsx(Oo,{value:l+w(),start:l,currency:i.currency,asCurrency:!0})})]})})]})}),b()&&v.jsx(on,{children:v.jsx(nt,{label:"",className:"w-full",...b(),pending:f})})]})}):v.jsx(Er,{})}function AP({value:t,valueSetter:e,enabled:n}){const[r,o]=x.useState(!1),i=x.useRef(null),a=x.useRef(null);x.useEffect(()=>{l(t?t.toString():"")},[]);const s=f=>{e(f?parseInt(f):0),l(f)},c=f=>{const{key:h}=f;if(t===0&&!/^[1-9]$/.test(h)||t!==0&&!/^[0-9]$/.test(h)&&h!=="Backspace")return;let d;if(h!=="Backspace")d=parseInt(t===0?h:`${t}${h}`);else{const p=t.toString().slice(0,-1);d=p.length?parseInt(p,10):0}e(d),l(d?d.toString():"")},l=f=>{a&&a.current&&(f?a.current.style.width=`${Math.max(f.length,3)*3}rem`:a.current.style.width="calc(3rem + 14px)")};return v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:a,className:"h-full w-[65px] rounded border-gray-200 border-transparent text-5xl [appearance:textfield] focus:border-transparent focus:ring-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",type:"number",pattern:"[0-9]*",inputMode:"numeric",placeholder:"0",autoFocus:!0,value:t?(t/100).toFixed(2):"",onKeyDown:c,onChange:()=>{},onFocus:()=>o(!0),onBlur:()=>o(!1)}),n&&v.jsx("div",{className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!r&&"hidden"} absolute`,children:v.jsx(j1,{keyboardRef:i,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:s})})]})}function Av({title:t,balance:e,balanceName:n,transaction:r,pending:o}){const{t:i}=Ve(),[a,s]=x.useState(0),{portalSession:c}=qe(),l=()=>{let f=0;return c.events.filter(d=>Object.values(Io).includes(d.type)).forEach(d=>{f+=d.data.amount_in_cents}),f};return v.jsxs(Vt,{children:[t&&v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex h-full flex-col gap-4",children:[v.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:v.jsxs("div",{className:"flex justify-between",children:[v.jsx("p",{className:"font-light text-gray-500",children:n??i("balance")}),v.jsx(Oo,{value:e??0,start:e??0,currency:c.currency,asCurrency:!0})]})}),v.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:v.jsx("div",{className:"flex items-center justify-center gap-1 p-4 text-5xl font-bold",children:l()?v.jsx(Oo,{value:0,start:a,currency:c.currency,asCurrency:!0}):v.jsxs("div",{className:"flex items-center justify-center gap-1 ",children:[v.jsx("p",{children:B3(c.currency)}),v.jsx(AP,{value:a,valueSetter:s,enabled:c.inputData.enable_on_screen_keyboard})]})})})]})}),v.jsx(on,{children:v.jsx(nt,{label:i("confirmAndPay",{amount:Mi(a,c.currency)}),className:"w-full",onClick:r&&(()=>r(a)),disabled:!a||!!l(),pending:o})})]})}function SP(){const{t}=Ve(),{errorToast:e}=jt(),{hash:n}=ji(),{giftcard:r,mutate:o}=_v(n),{portalSession:i,mutate:a}=qe(),{post:s}=Ms(),{onUseGiftcard:c}=qt(),[l,f]=x.useState(!1),h=Dt(),d=p=>{f(!0),h.post(`${i.uuid}/giftcards/transaction`,{uuid:r.uuid,amount_in_cents:p}).then(u=>{o(),a(),s(),c==null||c(u.data.data),Tt.success(`${t("transactionSuccessful")}! ${t("totalUpgradedAmount")}: ${Mi(u.data.data.amount_in_cents,i.currency)}`)}).catch(e).finally(()=>f(!1))};return r?v.jsx(Tn,{children:v.jsx(Av,{title:`${t("giftcard")} ${r.hash}`,balance:r.amount_in_cents,transaction:d,pending:l})}):v.jsx(Er,{})}function IP(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(EP,{})}),v.jsx(ze,{path:"/select/:hash",element:v.jsx(CP,{})}),v.jsx(ze,{path:"/redeem/:hash",element:v.jsx(_P,{})}),v.jsx(ze,{path:"/top-up/:hash",element:v.jsx(SP,{})})]})}class dh{constructor(){$n(this,"uuid");$n(this,"email");$n(this,"credit_balance");$n(this,"prepaid_balance");$n(this,"current_display_values");$n(this,"created_at")}getDisplayName(){return this.current_display_values.firstname||this.current_display_values.lastname?`${this.current_display_values.firstname} ${this.current_display_values.lastname}`:this.email}}const Sv=x.createContext({contact:new dh,mutate:async()=>{}});function fh({children:t}){const{uuid:e}=qe(),[n,r]=x.useState(new dh),{mutate:o}=dr({url:`${e}/contacts`,onData:a=>{const s=new dh;s.uuid=a.uuid,s.email=a.email,s.credit_balance=a.credit_balance,s.prepaid_balance=a.prepaid_balance,s.current_display_values=a.current_display_values,s.created_at=a.created_at,r(s)}}),i=x.useMemo(()=>({contact:n,mutate:o}),[n,o]);return n.uuid?v.jsx(Sv.Provider,{value:i,children:t}):v.jsx(Er,{})}function wr(){const t=x.useContext(Sv);if(!t)throw new Error("Only use 'useContactContext' within a ContactProvider");return t}function Ju({message:t=""}){return v.jsxs("div",{className:"flex items-center justify-center gap-4 text-core-primary-500",children:[v.jsx(zl,{className:"h-[32px] w-[32px]"}),t&&v.jsx("p",{className:"text-sm",children:t})]})}function TP(){const{t}=Ve(),{errorToast:e}=jt(),{contact:n,mutate:r}=wr(),{uuid:o,portalSession:i,mutate:a}=qe(),s=Dt(),c=()=>{s.post(`${o}/credit-receptions/create`,{unit_value:i.inputData.amount_in_cents/100}).then(()=>{r(),a()}).catch(e)},l=()=>{const f=i.events.filter(h=>h.type===Io.CREDIT_RECEPTION);return f.length?f[0]:null};return x.useEffect(()=>{l()||c()},[]),v.jsx(Tn,{children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:n.getDisplayName()})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[v.jsx("div",{className:"flex h-full flex-col items-center gap-2 p-6",children:i.inputData.amount_in_cents?v.jsx("div",{className:"flex h-full items-center justify-center gap-1 text-4xl font-bold",children:l()?v.jsxs(v.Fragment,{children:["+",v.jsx(Oo,{value:l().data.credits,start:0})]}):v.jsx(Ju,{})}):v.jsx("p",{className:"text-core-red-500",children:t("xIsRequired",{x:"Amount in cents"})+"."})}),v.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:v.jsxs("div",{className:"flex justify-between",children:[v.jsx("p",{className:"font-light text-gray-500",children:`${t("new")} ${t("balance").toLowerCase()}`}),v.jsx(Oo,{value:n.credit_balance.balance??0,start:n.credit_balance.balance-(l()?l().data.credits:0)})]})})]})})]})})}function xP(){const{portalSession:t}=qe();return t.contact?v.jsx(fh,{children:v.jsx(TP,{})}):t.inputData.primary_identification_method&&t.inputData.primary_identification_method===Ni.EMAIL?v.jsx(Ar,{to:`${Ge.POINTS_TRANSACTION}/email`}):v.jsx(Ar,{to:`${Ge.POINTS_TRANSACTION}/identifier`})}function hh({redirectRoute:t}){const{t:e}=Ve(),{state:n}=Sn(),{portalSession:r,mutate:o}=qe(),{onContactLink:i}=qt(),[a,s]=x.useState(""),[c,l]=x.useState(!1),[f,h]=x.useState(!1),d=Qt(),p=Dt();x.useEffect(()=>{!f&&a&&u()},[a]);const u=()=>{l(!0),p.put(r.uuid,{contact_identifier_value:a}).then(m=>{i&&g(m.data.data.contact.uuid).then(y=>{i==null||i(y.data.data)}),o().then(()=>d(t,{state:{contactIdentifier:a}}))}).catch(()=>d("link",{state:{contactIdentifier:a}})).finally(()=>l(!1))},g=m=>p.get(`${r.uuid}/contacts`,{contact_uuid:m});return v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:e("scanOrEnterX",{x:"identifier"})})})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:()=>a&&u(),children:v.jsx(ba,{data:a,dataSetter:s,setDefer:h,label:e("contactIdentifier")})})}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(nt,{label:e("continue"),onClick:u,disabled:!a,pending:c}),r.inputData.enable_email_identification&&v.jsx(nt,{label:e("useEmail"),variant:"secondary",onClick:()=>d("../email",{state:n})})]})})]})})}function ph({redirectRoute:t}){const{t:e}=Ve(),{errorToast:n}=jt(),{uuid:r,portalSession:o,mutate:i}=qe(),{onContactLink:a}=qt(),{state:s}=Sn(),{publish:c}=qa(),[l,f]=x.useState(""),[h,d]=x.useState(!1),[p,u]=x.useState(!1),g=Qt(),m=Dt();if(!s||!s.contactIdentifier)return v.jsx(Ar,{to:"../"});const y=()=>{d(!0),m.post(`${r}/contacts`,{email:l}).then(w).catch(n).finally(()=>d(!1))},w=()=>{d(!0),m.post(`${r}/contacts/link-identifier`,{contact_identifier_value:s.contactIdentifier,email:l}).then(b).catch(C=>{C.response.data.code===hc.CONTACT_NOT_FOUND?u(!0):n(C)}).finally(()=>d(!1))},b=()=>{m.put(r,{email:l}).then(C=>{a&&E(C.data.data.contact.uuid).then(S=>{a==null||a(S.data.data)}),i().then(()=>g(t))}).catch(n).finally(()=>d(!1))},E=C=>m.get(`${r}/contacts`,{contact_uuid:C});return x.useEffect(()=>{c("openKeyboard",{inputId:"new-contact-identifier-input",inputValue:""})},[]),v.jsxs(Tn,{children:[v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:e("linkContact")})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx(i6,{body:e("noEmailAddressLinkedToIdentifier")}),v.jsx(wi,{onSubmit:w,children:v.jsx(oi,{id:"new-contact-identifier-input",label:e("emailAddress"),autoFocus:!0,onChange:C=>f(C.target.value),beforeIcon:"mail"})})]})}),v.jsx(on,{children:v.jsx(nt,{label:e("continue"),className:"w-full",onClick:w,disabled:!l||h})})]}),v.jsx(Po,{title:`${e("new")} ${e("emailAddress").toLowerCase()}`,isOpen:p,onClose:()=>u(!1),primaryAction:{label:o.inputData.enable_marketing_preferences?e("continue"):e("confirm"),action:o.inputData.enable_marketing_preferences?()=>g("terms",{state:{...s,email:l}}):y,loading:h},secondaryAction:{label:e("cancel"),action:()=>u(!1)},children:v.jsx("p",{children:e("continueWithEmail",{email:l})})})]})}function OP(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(xP,{})}),v.jsx(ze,{path:"/email",element:v.jsx(Qu,{redirectRoute:Ge.POINTS_TRANSACTION})}),v.jsx(ze,{path:"/identifier",element:v.jsx(hh,{redirectRoute:Ge.POINTS_TRANSACTION})}),v.jsx(ze,{path:"/identifier/link",element:v.jsx(ph,{redirectRoute:Ge.POINTS_TRANSACTION})})]})}function PP(){const{portalSession:t}=qe(),{primaryIdentificationMethod:e}=qt();return t.contact?v.jsx(Ar,{to:`${Ge.PORTAL}/overview`}):e&&e===Ni.EMAIL?v.jsx(Ar,{to:`${Ge.PORTAL}/email`}):v.jsx(Ar,{to:`${Ge.PORTAL}/identifier`})}function kP({children:t}){return v.jsx("div",{className:"h-screen w-screen pb-[70px] md:px-4 md:pb-[86px] md:pt-4 lg:pb-4 lg:pt-[66px]",children:v.jsx("div",{className:"h-full max-h-full",children:t})})}function BP({contact:t}){const{t:e}=Ve(),n=Qt();return v.jsxs("div",{className:"inline-grid w-full items-center gap-4 py-4 lg:grid-cols-2",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(id,{src:t.current_display_values.avatar,size:"2xl"}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"flex gap-2",children:[v.jsx("p",{className:"text-lg",children:t.getDisplayName()}),t.current_display_values.tier&&v.jsx(ad,{label:t.current_display_values.tier,size:"sm",stroke:!0})]}),v.jsx("p",{className:"text-sm text-core-gray-500 ",children:e("joinedAtDate",{date:new Date(t.created_at).toLocaleDateString(dn.language,{month:"long",year:"numeric"})})})]})]}),v.jsxs("div",{className:"inline-grid gap-2 lg:grid-cols-2",children:[v.jsx(nt,{label:e("goToX",{x:"identifiers"}),variant:"secondary",size:"md",onClick:()=>n("contact-identifiers")}),v.jsx(nt,{before:v.jsx(In,{icon:"edit"}),label:e("editProfile"),variant:"secondary",size:"md",onClick:()=>n("contact-attributes")})]})]})}function Ls({children:t}){return v.jsx("div",{className:"flex-grow rounded-lg border p-4",children:t})}function NP(){const{t}=Ve(),{contact:e}=wr(),{portalSession:n}=qe();return v.jsxs("div",{className:"flex gap-2 lg:flex-col",children:[v.jsx(Ls,{children:v.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[v.jsx("p",{className:"text-2xl leading-8",children:e.credit_balance.balance}),v.jsx("p",{className:"text-sm text-core-gray-500",children:n.loyaltyProgram.custom_credit_name})]})}),v.jsx(Ls,{children:v.jsxs("div",{className:"flex h-full flex-col items-center justify-center",children:[v.jsx("p",{className:"text-2xl leading-8",children:Mi(e.prepaid_balance.balance_in_cents,n.currency)}),v.jsx("p",{className:"text-sm text-core-gray-500",children:t("prepaidCredit")})]})})]})}function RP(){const{t}=Ve(),{contact:e}=wr(),{portalSession:n}=qe(),r=(i,a)=>s1(i,a)?`${s1(i,a)} ${t("yearsAgo")}`:a1(i,a)?`${a1(i,a)} ${t("weeksAgo")}`:i1(i,a)?`${i1(i,a)} ${t("daysAgo")}`:t("today"),o=()=>{var i;return(i=e.current_display_values)!=null&&i.loyalty_last_transaction_date?r(new Date,new Date(e.current_display_values.loyalty_last_transaction_date)):""};return v.jsx(Ls,{children:v.jsxs("div",{className:"h-full justify-between",children:[v.jsx("p",{className:"mb-4 text-lg font-semibold leading-7",children:t("stats")}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(In,{icon:"calendar"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-xs font-semibold",children:o()}),v.jsx("p",{className:"text-xs text-core-gray-500",children:t("lastVisit")})]})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(In,{icon:"shopping-bag"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_number_of_transactions} ${t("visits")}`}),v.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalVisits")})]})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(In,{icon:"dollar"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-xs font-semibold",children:`${e.current_display_values.loyalty_total_credits_received} ${n.loyaltyProgram.custom_credit_name}`}),v.jsx("p",{className:"text-xs text-core-gray-500",children:t("totalCredits")})]})]})]})]})})}function Iv(){const{uuid:t}=qe(),[e,n]=x.useState([]),{data:r,isLoading:o,pending:i,mutate:a}=dr({url:`${t}/loyalty-transactions`});return x.useEffect(()=>{r&&n(r.data)},[r]),{loyaltyTransactions:e,isLoading:o,pending:i,mutate:a}}function Tv({loyaltyTransaction:t}){const{t:e}=Ve();return v.jsxs("div",{className:"mb-2 flex justify-between",children:[v.jsx("p",{className:"text-xs text-core-gray-500",children:t.type===Yp.CREDIT_RECEPTION?e("transaction"):`${e("isRedeemed")} '${t.loyalty_transaction_data.title}'`}),v.jsx("p",{className:"text-xs font-semibold",children:t.credits>0?"+"+t.credits:t.credits})]})}function DP(){const{t}=Ve(),e=Qt(),{loyaltyTransactions:n}=Iv();return n?v.jsx(Ls,{children:v.jsxs("div",{className:"flex h-full flex-col justify-between gap-4",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-semibold leading-7",children:t("activities")}),n&&n.length?v.jsx("div",{children:n.slice(0,5).map(r=>v.jsx(Tv,{loyaltyTransaction:r},r.uuid))}):v.jsx("p",{className:"text-sm text-core-gray-500",children:t("noActivity")})]}),v.jsx(nt,{label:`${t("all")} ${t("activities").toLowerCase()}`,variant:"secondary",onClick:()=>e("activity")})]})}):v.jsx(Ju,{})}function xv(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/subscriptions/contact`,onData:n});return{subscriptions:e,isLoading:r,pending:o,mutate:i}}function Ov({subscription:t,onChange:e,editable:n=!1}){const{t:r}=Ve();return v.jsxs("div",{className:"mb-2 flex justify-between",children:[v.jsx("p",{className:"text-xs font-semibold",children:t.subscription_type.name}),n?v.jsx($c,{defaultChecked:t.is_subscribed,disabled:t.subscription_type.strategy===fc.FUNCTIONAL,onChange:e&&(()=>e(t.subscription_type.name))}):v.jsx(ad,{label:r(t.status.toLowerCase()),size:"sm",color:t.is_subscribed?"primary":"gray"})]})}function MP(){const{t}=Ve(),{subscriptions:e}=xv(),n=Qt();return e?v.jsx(Ls,{children:v.jsxs("div",{className:"flex h-full flex-col justify-between",children:[v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{className:"text-lg font-semibold leading-7",children:t("subscriptions")}),v.jsx("div",{children:e.map(r=>v.jsx(Ov,{subscription:r},r.subscription_type.uuid))})]}),v.jsx(nt,{label:t("change"),before:v.jsx(In,{icon:"edit"}),variant:"secondary",onClick:()=>n("subscriptions")})]})}):v.jsx(Ju,{})}function LP(){const{contact:t}=wr();return v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(BP,{contact:t})}),v.jsx(Mt,{children:v.jsxs("div",{className:"grid grid-cols-1 gap-x-2 gap-y-2 lg:grid-cols-4",children:[v.jsx(NP,{}),v.jsx(RP,{}),v.jsx(DP,{}),v.jsx(MP,{})]})})]})}function Fs({label:t,path:e}){const n=Qt();return v.jsx("div",{className:"flex h-16 items-center text-base text-core-gray-900",children:v.jsx(nt,{label:t,variant:"link-gray",before:v.jsx(In,{icon:"caret-left",size:"md"}),onClick:()=>n(e)})})}function FP(){const{t}=Ve(),{loyaltyTransactions:e}=Iv(),{contact:n}=wr();return v.jsx("div",{className:"h-full md:container",children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(Fs,{label:t("back"),path:"../profile"})}),v.jsx(Mt,{children:v.jsxs("div",{className:"md:max-h-[528px]",children:[v.jsx("p",{className:"text-sm font-medium",children:t("allActivities")}),v.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:t("checkOutAllActivitiesOfName",{name:n.getDisplayName()})}),v.jsx("div",{className:"overflow-auto",children:e==null?void 0:e.map(r=>v.jsx(Tv,{loyaltyTransaction:r},r.uuid))})]})})]})})}function jP(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n}=qe(),{subscriptions:r,mutate:o}=xv(),[i,a]=x.useState({}),[s,c]=x.useState(!1),l=Dt();x.useEffect(()=>{if(r&&!Object.keys(i).length){const p=r.reduce((u,g)=>({...u,[g.subscription_type.name]:g.is_subscribed}),{});a(p)}},[r]);const f=p=>{Object.hasOwn(i,p)?a({...i,[p]:!i[p]}):a({...i,[p]:!0})},h=()=>{c(!0),l.put(`${n}/subscriptions`,{values:i}).then(()=>o()).catch(e).finally(()=>c(!1))},d=()=>r&&r.some(p=>i[p.subscription_type.name]!==p.is_subscribed);return r?v.jsx("div",{className:"h-full md:container",children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(Fs,{label:t("back"),path:"../profile"})}),v.jsx(Mt,{children:v.jsx("div",{className:"md:max-h-[528px]",children:v.jsxs("div",{children:[v.jsx("p",{className:"text-sm font-medium",children:t("subscriptions")}),v.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:t("manageEmailPreferences")}),r.map(p=>v.jsx(Ov,{subscription:p,onChange:f,editable:!0},p.subscription_type.uuid))]})})}),v.jsx(on,{children:v.jsx(nt,{label:t("saveChanges"),className:"w-full",onClick:h,pending:s,disabled:!d()||s})})]})}):v.jsx(Ju,{})}function VP(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n}=qe(),{contact:r,mutate:o}=wr(),[i,a]=x.useState(),[s,c]=x.useState(!1),[l,f]=x.useState(),h=Dt();dr({url:`${n}/contact-attributes`,onData:g=>a(g.elements)});const d=g=>{f({...l,[g.target.name]:g.target.value})},p=(g,m)=>{f({...l,[g]:m})},u=async()=>{c(!0),h.put(`${n}/contact-attributes`,l).then(()=>{o(),f(void 0)}).catch(e).finally(()=>c(!1))};return v.jsx("div",{className:"h-full md:container",children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(Fs,{label:t("back"),path:"../profile"})}),v.jsx(Mt,{children:v.jsxs("div",{className:"md:max-h-[528px]",children:[v.jsxs("div",{className:"mb-4 flex flex-row items-center gap-4 border-b border-b-core-gray-200 px-1 pb-4",children:[v.jsx(id,{src:r.current_display_values.avatar,size:"2xl"}),v.jsxs("div",{children:[v.jsx("div",{className:"flex flex-row items-center gap-2 ",children:v.jsxs("h1",{className:"text-lg text-core-gray-900",children:[r.current_display_values.firstname," ",r.current_display_values.lastname]})}),v.jsx("p",{className:"text-sm text-core-gray-500",children:r.email})]})]}),i?i.map(g=>{if(!(g.type==="media_upload"||g.type==="email"))return g.type==="select"?v.jsx(w6,{name:g.name,label:g.label,value:l&&l[g.name]?l[g.name]:r.current_display_values[g.name],onChange:m=>p(g.name,m),disabled:g.disabled,children:g.options.map(m=>v.jsx(sd,{label:m.label,value:m.value},m.value))},g.id):g.type==="multi_select"?v.jsx(g6,{name:g.name,value:l&&l[g.name]?l[g.name]:g.defaultValue,label:g.label,onChange:p,disabled:g.disabled,options:g.options},g.id):g.type==="birth_date"||g.type==="date_time"?v.jsx(U1,{id:g.id,name:g.name,label:g.label,type:g.type==="date_time"?"date_time":"date",value:l&&l[g.name]?l[g.name]:r.current_display_values[g.name],disabled:g.disabled,onChange:d},g.id):v.jsx(oi,{disabled:g.disabled,label:g.label,name:g.name,value:l&&l[g.name]!=="undefined"?l[g.name]:r.current_display_values[g.name],onChange:d},g.id)}):v.jsx(zc,{rows:10})]})}),v.jsx(on,{children:v.jsx(nt,{label:t("saveChanges"),className:"w-full",onClick:u,disabled:!l,pending:s})})]})})}function Pv(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/contact-identifiers`,onData:n});return{contactIdentifiers:e,isLoading:r,pending:o,mutate:i}}function UP({identifier:t,onClear:e}){const{t:n}=Ve();return v.jsxs("div",{className:"flex items-center justify-between rounded-lg border text-xs",children:[v.jsxs("div",{className:"flex-col pl-4",children:[v.jsx("p",{className:"font-semibold",children:t.value}),v.jsx("p",{className:"text-core-gray-500",children:n("contactIdentifier")})]}),v.jsx("div",{className:"h-full border-l p-4 hover:cursor-pointer hover:bg-core-gray-50",onClick:()=>e&&e(t.value),children:v.jsx(In,{className:"h-full",icon:"close"})})]})}function GP(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n}=qe(),{contactIdentifiers:r,isLoading:o,mutate:i}=Pv(),[a,s]=x.useState(""),[c,l]=x.useState(!1),f=Qt(),h=Dt(),d=u=>{s(u),l(!0)},p=async()=>{h.destroy(`${n}/contact-identifiers`,{value:a}).then(()=>i()).catch(e).finally(()=>l(!1))};return v.jsxs("div",{className:"h-full md:container",children:[v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(Fs,{label:t("back"),path:"../profile"})}),v.jsx(Mt,{children:v.jsx("div",{className:"md:max-h-[528px]",children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsxs("div",{children:[v.jsx("p",{className:"text-sm font-medium",children:t("contactIdentifiers")}),v.jsx("p",{className:"mb-4 text-sm text-core-gray-500",children:t("contactIdentifierDescription")})]}),o?v.jsx(zc,{rows:10}):r==null?void 0:r.map(u=>v.jsx(UP,{identifier:u,onClear:d},u.value))]})})}),v.jsx(on,{children:v.jsx(nt,{label:t("addIdentifier"),className:"w-full",variant:"secondary",onClick:()=>f("create")})})]}),v.jsx(Po,{title:t("confirmClearContactIdentifier"),isOpen:c,primaryAction:{label:t("confirm"),action:p},secondaryAction:{label:t("cancel"),action:()=>l(!1)},onClose:()=>l(!1),children:v.jsx("p",{children:t("clearContactIdentifier",{value:a})})})]})}function qP(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n}=qe(),{contact:r}=wr(),{mutate:o}=Pv(),[i,a]=x.useState(""),[s,c]=x.useState(!1),[l,f]=x.useState(!1),h=Qt(),d=Dt(),p=()=>{c(!0),d.post(`${n}/contacts/link-identifier`,{contact_identifier_value:i,email:r.email}).then(()=>{o(),h("../profile/contact-identifiers")}).catch(e).finally(()=>{a(""),c(!1)})};return x.useEffect(()=>{!l&&i&&p()},[i]),v.jsx("div",{className:"h-full md:container",children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx(Fs,{label:t("back"),path:"../profile/contact-identifiers"})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:()=>i&&p(),children:v.jsx(ba,{data:i,dataSetter:a,setDefer:f,label:t("contactIdentifier")})})}),v.jsx(on,{children:v.jsx(nt,{label:t("addIdentifier"),className:"w-full",onClick:p,pending:s,disabled:!i})})]})})}function HP(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/profile",element:v.jsx(LP,{})}),v.jsx(ze,{path:"/profile/activity",element:v.jsx(FP,{})}),v.jsx(ze,{path:"/profile/subscriptions",element:v.jsx(jP,{})}),v.jsx(ze,{path:"/profile/contact-identifiers",element:v.jsx(GP,{})}),v.jsx(ze,{path:"/profile/contact-identifiers/create",element:v.jsx(qP,{})}),v.jsx(ze,{path:"/profile/contact-attributes",element:v.jsx(VP,{})})]})}function WP(){const{t}=Ve(),{contact:e}=wr(),{portalSession:n}=qe();return v.jsxs("div",{className:"flex h-16 items-center justify-between",children:[v.jsx("h1",{children:t("rewards")}),v.jsxs("div",{className:"flex flex-col items-center",children:[v.jsx("p",{children:e.credit_balance.balance}),v.jsx("p",{className:"text-sm text-core-gray-500",children:n.loyaltyProgram.custom_credit_name})]})]})}function kv(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/rewards`,onData:n});return{rewards:e,isLoading:r,pending:o,mutate:i}}function gh({reward:t,selected:e,setSelected:n,disabled:r,readOnly:o}){const{portalSession:i}=qe(),{contact:a}=wr();return v.jsxs("div",{className:`max-h-[48px] rounded-lg border ${r?"pointer-events-none opacity-40":!o&&"cursor-pointer"}`,children:[v.jsxs("div",{className:`flex items-center justify-between rounded-lg text-xs ${r?"px-2 pt-2":"p-2"}`,onClick:o?void 0:()=>(e==null?void 0:e.uuid)===t.uuid?n(void 0):n(t),children:[v.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[v.jsx("img",{src:t.media&&t.media.value?t.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),v.jsx("p",{className:"truncate",children:t.title??t.description})]}),v.jsxs("p",{className:"whitespace-nowrap text-core-primary-500",children:[t.required_credits," ",i.loyaltyProgram.custom_credit_name]})]}),t.required_credits-a.credit_balance.balance>0&&v.jsx(m6,{value:a.credit_balance.balance,max:t.required_credits})]})}function YP({selected:t,setSelected:e}){const{t:n}=Ve(),{contact:r}=wr(),{rewards:o,isLoading:i}=kv(),a=o==null?void 0:o.filter(c=>c.required_credits<=r.credit_balance.balance),s=o==null?void 0:o.filter(c=>c.required_credits>r.credit_balance.balance);return v.jsx(v.Fragment,{children:i?v.jsx(zc,{rows:1}):v.jsxs("div",{className:"flex flex-col gap-3 md:max-h-[528px]",children:[v.jsx("div",{className:"flex flex-col gap-1",children:(a==null?void 0:a.length)>0&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"text-sm font-light text-core-gray-500",children:n("redeemableRewards")}),a.map(c=>v.jsx(gh,{reward:c,selected:t,setSelected:e},c.uuid))]})}),v.jsx("div",{className:"flex flex-col gap-1",children:(s==null?void 0:s.length)>0&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"text-sm font-light text-core-gray-500",children:n("saveABitMore")}),s.map(c=>v.jsx(gh,{reward:c,selected:t,setSelected:e,disabled:!0},c.uuid))]})})]})})}function KP(){const{portalSession:t}=qe(),{rewards:e}=kv(),n=()=>t.events.filter(r=>r.type===Io.REWARD_RECEPTION).map(r=>e.find(o=>o.uuid===r.data.reward.uuid)).filter(r=>r);return e?v.jsx("div",{children:v.jsx(H0,{children:n().map((r,o)=>v.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-core-primary-100 bg-core-primary-50 p-2 text-xs",children:[v.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[v.jsx("img",{src:r.media&&r.media.value?r.media.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-8 w-8 rounded object-cover object-center"}),v.jsx("p",{className:"truncate",children:r.title??r.description})]}),v.jsxs("p",{className:"text-core-primary-500",children:[r.required_credits," ",t.loyaltyProgram.custom_credit_name]})]},`${o}-${r.uuid}`))},n().length)}):v.jsx(v.Fragment,{})}function zP(){const{t}=Ve(),{errorToast:e,successToast:n}=jt(),{portalSession:r,mutate:o}=qe(),{mutate:i}=wr(),{onClaimReward:a}=qt(),[s,c]=x.useState(),[l,f]=x.useState(!1),[h,d]=x.useState(!1),{post:p}=Ms(),u=Dt();x.useEffect(()=>{s&&d(!0)},[s]);const g=y=>{o().then(w=>{const E=w.data.data.events.filter(C=>C.type===Io.REWARD_RECEPTION&&C.data.reward.uuid===s.uuid).reduce((C,S)=>new Date(C.created_at)>new Date(S.created_at)?C:S);a==null||a(y,E.data.uuid)})},m=()=>{f(!0),u.post(`${r.uuid}/rewards/claim`,{uuid:s.uuid}).then(y=>{p(),i(),g(y.data.data),n(t("rewardClaimed",{name:y.data.data.title}))}).catch(e).finally(()=>{d(!1),c(void 0),f(!1)})};return v.jsxs("div",{className:"h-full md:container",children:[v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx(WP,{})}),v.jsx(Mt,{children:v.jsx(YP,{selected:s,setSelected:c})}),v.jsx(on,{children:v.jsx(KP,{})})]}),v.jsx(Po,{title:t("confirmRewardRedemption"),isOpen:h,primaryAction:{label:t("confirm"),action:m,loading:l},secondaryAction:{label:t("cancel"),action:()=>d(!1)},onClose:()=>d(!1),children:v.jsx("div",{className:"flex flex-col gap-4",children:s&&v.jsx(gh,{reward:s,selected:s,setSelected:c,readOnly:!0})})})]})}function mh(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/vouchers`,onData:n});return{vouchers:e,isLoading:r,pending:o,mutate:i}}function $P(){const{t}=Ve();return v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("vouchers")})})}function yh({voucher:t,selected:e,setSelected:n}){const{t:r}=Ve();return v.jsxs("div",{className:`flex cursor-pointer items-center justify-between gap-4 rounded-lg ${t.status===Da.REDEEMED?"border border-core-primary-100 bg-core-primary-50":"border bg-white"} p-2 text-xs`,onClick:()=>(e==null?void 0:e.code)===t.code?n(void 0):n(t),children:[v.jsxs("div",{className:"mr-4 flex items-center gap-4 overflow-hidden",children:[v.jsx("img",{src:t.promotion.image?t.promotion.image.value:"https://static.piggy.nl/images/fallback_image.png",alt:"voucher_image",className:"h-[32px] w-[32px] rounded object-cover object-center"}),v.jsxs("div",{className:"overflow-hidden overflow-ellipsis ",children:[v.jsx("p",{className:"font-semibold",children:t.name}),t.status===Da.REDEEMED?v.jsx("p",{className:"text-core-gray-500",children:r("redeemed")}):v.jsx("p",{className:"text-core-primary-500",children:t.expiration_date?`Valid until ${new Date(t.expiration_date).toLocaleDateString()}`:r("nonExpiring")})]})]}),v.jsx("p",{className:`text-core-${t.status===Da.REDEEMED?"gray":"primary"}-500`,children:t.code})]})}function XP({selected:t,setSelected:e}){const{t:n}=Ve(),{vouchers:r,isLoading:o}=mh();return v.jsx(v.Fragment,{children:o?v.jsx(zc,{rows:1}):v.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:v.jsx("div",{className:"flex flex-col gap-1 md:max-h-[528px]",children:r&&r.length?r.map(i=>v.jsx(yh,{voucher:i,selected:t,setSelected:e},i.code)):v.jsx("p",{className:"text-center text-sm text-core-gray-500",children:n("vouchersEmptyState")})})})})}function QP(){const{t}=Ve(),{portalSession:e}=qe(),{vouchers:n}=mh(),r=()=>e.events.filter(o=>o.type===Io.VOUCHER_REDEEMED);return n?v.jsx("div",{children:v.jsx(H0,{children:r().map((o,i)=>v.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-core-primary-100 bg-core-primary-50 p-2",children:v.jsx("div",{className:"flex h-full flex-col justify-between text-xs",children:v.jsxs("div",{className:"overflow-hidden",children:[v.jsx("p",{className:"font-semibold",children:o.data.name}),v.jsxs("p",{className:"overflow-ellipsis text-core-gray-500",children:[o.data.code," - ",t("applied")]})]})})},`${i}-${o.data.uuid}`))},r().length)}):v.jsx(v.Fragment,{})}function JP(){const{t}=Ve(),{errorToast:e,successToast:n}=jt(),{uuid:r}=qe(),{onRedeemVoucher:o}=qt(),{post:i}=Ms(),{mutate:a}=mh(),[s,c]=x.useState(),[l,f]=x.useState(!1),[h,d]=x.useState(!1),p=Dt();x.useEffect(()=>{s&&d(!0)},[s]);const u=()=>{f(!0),p.post(`${r}/vouchers/redeem`,{code:s.code}).then(m=>{i(),o&&o(m.data.data),n(t("voucherSuccessfullyRedeemed")),a()}).catch(e).finally(()=>{g(),f(!1)})},g=()=>{d(!1),c(void 0)};return v.jsxs("div",{className:"h-full md:container",children:[v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx($P,{})}),v.jsx(Mt,{children:v.jsx(XP,{selected:s,setSelected:c})}),v.jsx(on,{children:v.jsx(QP,{})})]}),v.jsx(Po,{title:t("confirmVoucherRedemption"),isOpen:h,primaryAction:{label:t("confirm"),action:u,loading:l},secondaryAction:{label:t("cancel"),action:g},onClose:g,children:v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsx("p",{children:t("redeemTitle",{title:s==null?void 0:s.name})}),s&&v.jsx(yh,{voucher:s,setSelected:c})]})})]})}function ZP(){const{t}=Ve(),[e,n]=x.useState(1),r=Qt(),o=[{id:0,label:t("profile"),icon:"user",pathname:"profile"},{id:1,label:t("rewards"),icon:"edit",pathname:"rewards"},{id:2,label:t("vouchers"),icon:"mail",pathname:"vouchers"}];return x.useEffect(()=>{r(o[e].pathname)},[]),v.jsx(fh,{children:v.jsxs("div",{className:"relative h-full w-full select-none overflow-auto",children:[v.jsx(z8,{children:o.map(i=>v.jsx($8,{id:i.id,label:i.label,icon:i.icon,activeTab:e,setActiveTab:n,pathname:i.pathname},i.id))}),v.jsxs(kP,{children:[v.jsx(HP,{}),v.jsxs(ro,{children:[v.jsx(ze,{path:"/rewards",element:v.jsx(zP,{})}),v.jsx(ze,{path:"/vouchers",element:v.jsx(JP,{})})]})]})]})})}function ek(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/subscriptions`,onData:n});return{subscriptions:e,isLoading:r,pending:o,mutate:i}}function Bv({redirectRoute:t}){const{t:e}=Ve(),{errorToast:n}=jt(),{subscriptions:r}=ek(),{uuid:o,mutate:i}=qe(),{onContactLink:a}=qt(),{state:s}=Sn(),[c,l]=x.useState(!1),[f,h]=x.useState(),[d,p]=x.useState(!1),u=Qt(),g=Dt();x.useEffect(()=>{if(r&&!f){const S=r.reduce((T,P)=>({...T,[P.name]:P.strategy===fc.OPT_OUT}),{});h(S)}},[r]);const m=S=>{Object.hasOwn(f,S)?h({...f,[S]:!f[S]}):h({...f,[S]:!0})},y=()=>{l(!0),g.post(`${o}/contacts`,{email:s.email}).then(w).catch(n).finally(()=>l(!1))},w=()=>{l(!0),g.put(`${o}/subscriptions`,{values:f}).then(b).catch(n).finally(()=>l(!1))},b=()=>{l(!0),g.post(`${o}/contacts/link-identifier`,{contact_identifier_value:s.contactIdentifier,email:s.email}).then(E).catch(n).finally(()=>l(!1))},E=()=>{l(!0),g.put(o,{email:s.email}).then(S=>{a&&C(S.data.data.contact.uuid).then(T=>{a==null||a(T.data.data)}),i().then(()=>u(t))}).catch(n).finally(()=>l(!1))},C=S=>g.get(`${o}/contacts`,{contact_uuid:S});return r?v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:e("termsAndConditions")})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex flex-col gap-4 text-sm",children:[v.jsxs("div",{children:[v.jsx("p",{children:e("marketingSubscriptions")}),v.jsx("p",{className:"text-core-gray-500",children:e("chooseCommunicationPreferences")})]}),r.map(S=>v.jsxs("div",{className:"flex gap-2",children:[v.jsx($c,{defaultChecked:S.strategy===fc.OPT_OUT,onChange:()=>m(S.name)}),v.jsx("p",{children:S.name})]},S.id)),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Oc,{required:!0,onChange:S=>p(S)}),v.jsx("div",{className:"[&_a]:text-core-primary-500",dangerouslySetInnerHTML:{__html:e("iAgreeWithTheTerms",{terms:"https://www.piggy.nl/algemene-voorwaarden",privacy:"https://www.piggy.nl/privacy-policy"})}})]})]})}),v.jsx(on,{children:v.jsx(nt,{label:e("create"),className:"w-full",onClick:y,pending:c,disabled:!d||c})})]})}):v.jsx(Er,{})}function tk(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(PP,{})}),v.jsx(ze,{path:"/overview/*",element:v.jsx(ZP,{})}),v.jsx(ze,{path:"/email",element:v.jsx(Qu,{redirectRoute:Ge.PORTAL})}),v.jsx(ze,{path:"/identifier",element:v.jsx(hh,{redirectRoute:Ge.PORTAL})}),v.jsx(ze,{path:"/identifier/link",element:v.jsx(ph,{redirectRoute:Ge.PORTAL})}),v.jsx(ze,{path:"/identifier/link/terms",element:v.jsx(Bv,{redirectRoute:Ge.PORTAL})})]})}function Nv(){const{uuid:t}=qe(),[e,n]=x.useState(),{isLoading:r,pending:o,mutate:i}=dr({url:`${t}/prepaid`,onData:n});return{prepaidBalance:e,isLoading:r,pending:o,mutate:i}}function nk(){const{t}=Ve(),{state:e}=Sn(),{errorToast:n,successToast:r}=jt(),{uuid:o,mutate:i}=qe(),{contact:a}=wr(),{onCreatePrepaidTransaction:s}=qt(),{prepaidBalance:c,mutate:l}=Nv(),[f,h]=x.useState(!1),d=Dt(),p=u=>{h(!0),d.post(`${o}/prepaid/transaction`,{amount_in_cents:u,contact_identifier_value:(e==null?void 0:e.contactIdentifier)??void 0}).then(g=>{l(),i(),s==null||s(g.data.data),r(t("prepaidTransactionCreated"))}).catch(n).finally(()=>h(!1))};return c?v.jsx(Tn,{children:v.jsx(Av,{title:a.getDisplayName(),balance:(c==null?void 0:c.balance_in_cents)??0,balanceName:t("prepaidBalance"),transaction:p,pending:f})}):v.jsx(Er,{})}function rk({title:t,balance:e,balanceName:n,transaction:r,pending:o}){const{t:i}=Ve(),{portalSession:a}=qe(),s=a.inputData.amount_in_cents??0,c=()=>{let f=0;return a.events.filter(d=>Object.values(Io).includes(d.type)).forEach(d=>{f+=d.data.amount_in_cents}),f},l=()=>Math.min(s+c(),e);return v.jsxs(Vt,{children:[t&&v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex h-full flex-col gap-4",children:[v.jsx("div",{className:"rounded-lg bg-core-primary-50 p-4",children:v.jsxs("div",{className:"flex justify-between",children:[v.jsx("p",{className:"font-light text-gray-500",children:n??i("balance")}),v.jsx(Oo,{value:e,start:e+c(),currency:a.currency,asCurrency:!0})]})}),v.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6",children:v.jsxs("div",{className:"flex flex-col items-center gap-2 p-4",children:[v.jsx("p",{className:"text-sm font-light text-gray-500",children:i("amountToPay")}),v.jsx("div",{className:"text-5xl font-bold",children:v.jsx(Oo,{value:l(),start:s,currency:a.currency,asCurrency:!0})})]})})]})}),v.jsx(on,{children:v.jsx(nt,{label:i("confirmAndPay",{amount:Mi(l(),a.currency)}),className:"w-full",onClick:()=>r==null?void 0:r(-l()),disabled:!s||!!c(),pending:o})})]})}function ok(){const{t}=Ve(),{state:e}=Sn(),{errorToast:n,successToast:r}=jt(),{uuid:o,mutate:i}=qe(),{contact:a}=wr(),{onCreatePrepaidTransaction:s}=qt(),{prepaidBalance:c,mutate:l}=Nv(),[f,h]=x.useState(!1),d=Dt(),p=u=>{h(!0),d.post(`${o}/prepaid/transaction`,{amount_in_cents:u,contact_identifier_value:(e==null?void 0:e.contactIdentifier)??void 0}).then(g=>{l(),i(),s==null||s(g.data.data),r(t("prepaidTransactionCreated"))}).catch(n).finally(()=>h(!1))};return c?v.jsx(Tn,{children:v.jsx(rk,{title:a.getDisplayName(),balance:c.balance_in_cents,balanceName:t("prepaidBalance"),transaction:p,pending:f})}):v.jsx(Er,{})}function ik({setType:t}){const{t:e}=Ve();return v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:e("Choose type")})})}),v.jsx(Mt,{children:v.jsxs("div",{className:"flex gap-2",children:[v.jsx(nt,{className:"grow",label:e("pay"),onClick:()=>t(rn.PAY_PREPAID)}),v.jsx(nt,{className:"grow",label:e("topUp"),onClick:()=>t(rn.TOP_UP_PREPAID)})]})})]})})}function ak(){const{portalSession:t}=qe(),{primaryIdentificationMethod:e}=qt(),[n,r]=x.useState(t.type);if(!t.contact)return e&&e===Ni.EMAIL?v.jsx(Ar,{to:`${Ge.PREPAID}/email`}):v.jsx(Ar,{to:`${Ge.PREPAID}/identifier`});const o=()=>n===rn.TOP_UP_PREPAID?v.jsx(nk,{}):n===rn.PAY_PREPAID?v.jsx(ok,{}):v.jsx(ik,{setType:r});return v.jsx(fh,{children:o()})}function sk(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(ak,{})}),v.jsx(ze,{path:"/email",element:v.jsx(Qu,{redirectRoute:Ge.PREPAID})}),v.jsx(ze,{path:"/identifier",element:v.jsx(hh,{redirectRoute:Ge.PREPAID})}),v.jsx(ze,{path:"/identifier/link",element:v.jsx(ph,{redirectRoute:Ge.PREPAID})}),v.jsx(ze,{path:"/identifier/link/terms",element:v.jsx(Bv,{redirectRoute:Ge.PREPAID})})]})}function ck(){const{t}=Ve(),{errorToast:e}=jt(),{uuid:n,portalSession:r}=qe(),{onContactLink:o}=qt(),[i,a]=x.useState(""),[s,c]=x.useState(!1),[l,f]=x.useState(!1),[h,d]=x.useState(!1),p=Qt(),u=Dt(),g=y=>u.get(`${n}/contacts`,{contact_uuid:y}),m=()=>{c(!0),u.get(`${n}/vouchers/check/${i}`).then(y=>{r.contact?g(r.contact.uuid).then(w=>{o==null||o(w.data.data)}).catch(e).finally(()=>p(`${i}/redeem`)):y.data.data.contact?u.put(r.uuid,{email:y.data.data.contact.email}).then(w=>{o&&g(w.data.data.contact.uuid).then(b=>{o==null||o(b.data.data)})}).catch(e).finally(()=>p(`${i}/redeem`)):d(!0)}).catch(e).finally(()=>c(!1))};return x.useEffect(()=>{!l&&i&&m()},[i]),v.jsxs(v.Fragment,{children:[v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("scanOrEnterX",{x:t("voucherCode").toLowerCase()})})})}),v.jsx(Mt,{children:v.jsx(ba,{data:i,dataSetter:a,setDefer:f,label:t("code")})}),v.jsx(on,{children:v.jsx(nt,{label:t("submit"),className:"w-full",onClick:m,pending:s})})]})}),v.jsx(Po,{title:t("noContactLinkedToVoucherTitle"),isOpen:h,onClose:()=>d(!1),primaryAction:{label:t("linkToContact"),action:()=>p(`${i}/identifier`)},secondaryAction:{label:t("cancel"),action:()=>d(!1)},children:v.jsx("p",{children:t("linkVoucherWithCodeToContact",{code:i})})})]})}function uk(){const{t}=Ve(),{errorToast:e}=jt(),{code:n}=ji(),{uuid:r}=qe(),{onRedeemVoucher:o}=qt(),{post:i}=Ms(),{voucher:a,mutate:s}=Cv(n),[c,l]=x.useState(!1),f=Dt(),h=()=>{l(!0),f.post(`${r}/vouchers/redeem`,{code:n}).then(d=>{o==null||o(d.data.data),i(),s()}).catch(e).finally(()=>l(!1))};return a?v.jsx(Tn,{children:v.jsxs(Vt,{children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:"Voucher"})})}),v.jsx(Mt,{children:v.jsx("div",{children:v.jsx(yh,{voucher:a,setSelected:()=>{}})})}),v.jsx(on,{children:v.jsx(nt,{label:t("redeemVoucher"),className:"w-full",onClick:h,disabled:a.status!==Da.ACTIVE||c,pending:c})})]})}):v.jsx(Er,{})}function lk(){const{t}=Ve(),{errorToast:e}=jt(),{code:n}=ji(),{portalSession:r,mutate:o}=qe(),{onContactLink:i}=qt(),[a,s]=x.useState(""),[c,l]=x.useState(!1),[f,h]=x.useState(!1),d=Qt(),p=Dt(),u=m=>p.get(`${r.uuid}/contacts`,{contact_uuid:m}),g=()=>{l(!0),p.put(r.uuid,{contact_identifier_value:a}).then(m=>{i&&u(m.data.data.contact.uuid).then(y=>{i==null||i(y.data.data)}),o().then(()=>d(`${Ge.VOUCHER}/${n}/redeem`))}).catch(e).finally(()=>l(!1))};return x.useEffect(()=>{!f&&a&&g()},[a]),v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("scanOrEnterX",{x:"identifier"})})})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:g,children:v.jsx(ba,{data:a,dataSetter:s,setDefer:h,label:t("contactIdentifier")})})}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(nt,{label:t("continue"),onClick:g,pending:c}),r.inputData.enable_email_identification&&v.jsx(nt,{label:t("useEmail"),variant:"secondary",onClick:()=>d(`../${n}/email`)})]})})]})})}function dk(){const{t}=Ve(),{errorToast:e}=jt(),{code:n}=ji(),{onContactLink:r}=qt(),{portalSession:o,mutate:i}=qe(),{publish:a}=qa(),[s,c]=x.useState(""),[l,f]=x.useState(!1),[h,d]=x.useState(!1),p=Qt(),u=Dt(),g=w=>u.get(`${o.uuid}/contacts`,{contact_uuid:w}),m=()=>{f(!0),u.put(o.uuid,{email:s}).then(w=>{r&&g(w.data.data.contact.uuid).then(b=>{r==null||r(b.data.data)}),i().then(()=>p(`${Ge.VOUCHER}/${n}/redeem`))}).catch(w=>{w.response.data.code===hc.CONTACT_NOT_FOUND&&d(!0)}).finally(()=>f(!1))},y=()=>{f(!0),u.post(`${o.uuid}/contacts`,{email:s}).then(m).catch(e).finally(()=>f(!1))};return x.useEffect(()=>{a("openKeyboard",{inputId:"via-email-address-input",inputValue:""})},[]),v.jsxs(v.Fragment,{children:[v.jsx(Tn,{children:v.jsxs(Vt,{id:fr,children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t("fillInXBelow",{x:t("emailAddress").toLowerCase()})})})}),v.jsx(Mt,{children:v.jsx(wi,{onSubmit:()=>s&&!l&&m(),children:v.jsx(oi,{id:"via-email-address-input",label:t("emailAddress"),autoFocus:!0,onChange:w=>c(w.target.value),beforeIcon:"mail"})})}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(nt,{label:t("continue"),className:"w-full",onClick:m,pending:l,disabled:!s||l}),v.jsx(nt,{label:t("useIdentifier"),variant:"secondary",onClick:()=>p(`../${n}/identifier`)})]})})]})}),v.jsx(Po,{title:`${t("new")} ${t("emailAddress").toLowerCase()}`,isOpen:h,onClose:()=>d(!1),primaryAction:{label:t("confirm"),action:y,disabled:l},secondaryAction:{label:t("cancel"),action:()=>d(!1)},children:v.jsx("p",{children:t("continueWithEmail",{email:s})})})]})}function fk(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(ck,{})}),v.jsx(ze,{path:":code/redeem",element:v.jsx(uk,{})}),v.jsx(ze,{path:":code/email",element:v.jsx(dk,{})}),v.jsx(ze,{path:":code/identifier",element:v.jsx(lk,{})})]})}function hk(){return v.jsxs(ro,{children:[v.jsx(ze,{path:"/",element:v.jsx(E7,{})}),v.jsx(ze,{path:`${Ge.GENERIC}/*`,element:v.jsx(wP,{})}),v.jsx(ze,{path:`${Ge.GIFTCARD}/*`,element:v.jsx(IP,{})}),v.jsx(ze,{path:`${Ge.POINTS_TRANSACTION}/*`,element:v.jsx(OP,{})}),v.jsx(ze,{path:`${Ge.PORTAL}/*`,element:v.jsx(tk,{})}),v.jsx(ze,{path:`${Ge.PREPAID}/*`,element:v.jsx(sk,{})}),v.jsx(ze,{path:`${Ge.VOUCHER}/*`,element:v.jsx(fk,{})})]})}function vh(t){"@babel/helpers - typeof";return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vh(t)}function Rv(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":vh(XMLHttpRequest))==="object"}function pk(t){return!!t&&typeof t.then=="function"}function gk(t){return pk(t)?t:Promise.resolve(t)}function mk(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wh={exports:{}},Zu={exports:{}},Dv;function yk(){return Dv||(Dv=1,function(t,e){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Jo<"u"&&Jo,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,c={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function l(k){return k&&DataView.prototype.isPrototypeOf(k)}if(c.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(k){return k&&f.indexOf(Object.prototype.toString.call(k))>-1};function d(k){if(typeof k!="string"&&(k=String(k)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(k)||k==="")throw new TypeError('Invalid character in header field name: "'+k+'"');return k.toLowerCase()}function p(k){return typeof k!="string"&&(k=String(k)),k}function u(k){var V={next:function(){var z=k.shift();return{done:z===void 0,value:z}}};return c.iterable&&(V[Symbol.iterator]=function(){return V}),V}function g(k){this.map={},k instanceof g?k.forEach(function(V,z){this.append(z,V)},this):Array.isArray(k)?k.forEach(function(V){this.append(V[0],V[1])},this):k&&Object.getOwnPropertyNames(k).forEach(function(V){this.append(V,k[V])},this)}g.prototype.append=function(k,V){k=d(k),V=p(V);var z=this.map[k];this.map[k]=z?z+", "+V:V},g.prototype.delete=function(k){delete this.map[d(k)]},g.prototype.get=function(k){return k=d(k),this.has(k)?this.map[k]:null},g.prototype.has=function(k){return this.map.hasOwnProperty(d(k))},g.prototype.set=function(k,V){this.map[d(k)]=p(V)},g.prototype.forEach=function(k,V){for(var z in this.map)this.map.hasOwnProperty(z)&&k.call(V,this.map[z],z,this)},g.prototype.keys=function(){var k=[];return this.forEach(function(V,z){k.push(z)}),u(k)},g.prototype.values=function(){var k=[];return this.forEach(function(V){k.push(V)}),u(k)},g.prototype.entries=function(){var k=[];return this.forEach(function(V,z){k.push([z,V])}),u(k)},c.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function m(k){if(k.bodyUsed)return Promise.reject(new TypeError("Already read"));k.bodyUsed=!0}function y(k){return new Promise(function(V,z){k.onload=function(){V(k.result)},k.onerror=function(){z(k.error)}})}function w(k){var V=new FileReader,z=y(V);return V.readAsArrayBuffer(k),z}function b(k){var V=new FileReader,z=y(V);return V.readAsText(k),z}function E(k){for(var V=new Uint8Array(k),z=new Array(V.length),te=0;te<V.length;te++)z[te]=String.fromCharCode(V[te]);return z.join("")}function C(k){if(k.slice)return k.slice(0);var V=new Uint8Array(k.byteLength);return V.set(new Uint8Array(k)),V.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(k){this.bodyUsed=this.bodyUsed,this._bodyInit=k,k?typeof k=="string"?this._bodyText=k:c.blob&&Blob.prototype.isPrototypeOf(k)?this._bodyBlob=k:c.formData&&FormData.prototype.isPrototypeOf(k)?this._bodyFormData=k:c.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)?this._bodyText=k.toString():c.arrayBuffer&&c.blob&&l(k)?(this._bodyArrayBuffer=C(k.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(k)||h(k))?this._bodyArrayBuffer=C(k):this._bodyText=k=Object.prototype.toString.call(k):this._bodyText="",this.headers.get("content-type")||(typeof k=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(k)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var k=m(this);return k||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(w)}),this.text=function(){var k=m(this);if(k)return k;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(E(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(L)}),this.json=function(){return this.text().then(JSON.parse)},this}var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(k){var V=k.toUpperCase();return T.indexOf(V)>-1?V:k}function N(k,V){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');V=V||{};var z=V.body;if(k instanceof N){if(k.bodyUsed)throw new TypeError("Already read");this.url=k.url,this.credentials=k.credentials,V.headers||(this.headers=new g(k.headers)),this.method=k.method,this.mode=k.mode,this.signal=k.signal,!z&&k._bodyInit!=null&&(z=k._bodyInit,k.bodyUsed=!0)}else this.url=String(k);if(this.credentials=V.credentials||this.credentials||"same-origin",(V.headers||!this.headers)&&(this.headers=new g(V.headers)),this.method=P(V.method||this.method||"GET"),this.mode=V.mode||this.mode||null,this.signal=V.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(z),(this.method==="GET"||this.method==="HEAD")&&(V.cache==="no-store"||V.cache==="no-cache")){var te=/([?&])_=[^&]*/;if(te.test(this.url))this.url=this.url.replace(te,"$1_="+new Date().getTime());else{var re=/\?/;this.url+=(re.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function L(k){var V=new FormData;return k.trim().split("&").forEach(function(z){if(z){var te=z.split("="),re=te.shift().replace(/\+/g," "),ne=te.join("=").replace(/\+/g," ");V.append(decodeURIComponent(re),decodeURIComponent(ne))}}),V}function U(k){var V=new g,z=k.replace(/\r?\n[\t ]+/g," ");return z.split("\r").map(function(te){return te.indexOf(`
|
|
155
|
-
`)===0?te.substr(1,te.length):te}).forEach(function(te){var re=te.split(":"),ne=re.shift().trim();if(ne){var se=re.join(":").trim();V.append(ne,se)}}),V}S.call(N.prototype);function j(k,V){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');V||(V={}),this.type="default",this.status=V.status===void 0?200:V.status,this.ok=this.status>=200&&this.status<300,this.statusText=V.statusText===void 0?"":""+V.statusText,this.headers=new g(V.headers),this.url=V.url||"",this._initBody(k)}S.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},j.error=function(){var k=new j(null,{status:0,statusText:""});return k.type="error",k};var K=[301,302,303,307,308];j.redirect=function(k,V){if(K.indexOf(V)===-1)throw new RangeError("Invalid status code");return new j(null,{status:V,headers:{location:k}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(V,z){this.message=V,this.name=z;var te=Error(V);this.stack=te.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function G(k,V){return new Promise(function(z,te){var re=new N(k,V);if(re.signal&&re.signal.aborted)return te(new a.DOMException("Aborted","AbortError"));var ne=new XMLHttpRequest;function se(){ne.abort()}ne.onload=function(){var le={status:ne.status,statusText:ne.statusText,headers:U(ne.getAllResponseHeaders()||"")};le.url="responseURL"in ne?ne.responseURL:le.headers.get("X-Request-URL");var Ce="response"in ne?ne.response:ne.responseText;setTimeout(function(){z(new j(Ce,le))},0)},ne.onerror=function(){setTimeout(function(){te(new TypeError("Network request failed"))},0)},ne.ontimeout=function(){setTimeout(function(){te(new TypeError("Network request failed"))},0)},ne.onabort=function(){setTimeout(function(){te(new a.DOMException("Aborted","AbortError"))},0)};function we(le){try{return le===""&&s.location.href?s.location.href:le}catch{return le}}ne.open(re.method,we(re.url),!0),re.credentials==="include"?ne.withCredentials=!0:re.credentials==="omit"&&(ne.withCredentials=!1),"responseType"in ne&&(c.blob?ne.responseType="blob":c.arrayBuffer&&re.headers.get("Content-Type")&&re.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(ne.responseType="arraybuffer")),V&&typeof V.headers=="object"&&!(V.headers instanceof g)?Object.getOwnPropertyNames(V.headers).forEach(function(le){ne.setRequestHeader(le,p(V.headers[le]))}):re.headers.forEach(function(le,Ce){ne.setRequestHeader(Ce,le)}),re.signal&&(re.signal.addEventListener("abort",se),ne.onreadystatechange=function(){ne.readyState===4&&re.signal.removeEventListener("abort",se)}),ne.send(typeof re._bodyInit>"u"?null:re._bodyInit)})}return G.polyfill=!0,s.fetch||(s.fetch=G,s.Headers=g,s.Request=N,s.Response=j),a.Headers=g,a.Request=N,a.Response=j,a.fetch=G,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;e=o.fetch,e.default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}(Zu,Zu.exports)),Zu.exports}(function(t,e){var n;if(typeof fetch=="function"&&(typeof Jo<"u"&&Jo.fetch?n=Jo.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof mk<"u"&&typeof window>"u"){var r=n||yk();r.default&&(r=r.default),e.default=r,t.exports=e.default}})(wh,wh.exports);var Mv=wh.exports;const Lv=ll(Mv),Fv=xw({__proto__:null,default:Lv},[Mv]);function jv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Vv(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jv(Object(n),!0).forEach(function(r){vk(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function vk(t,e,n){return e=wk(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wk(t){var e=bk(t,"string");return Ti(e)=="symbol"?e:e+""}function bk(t,e){if(Ti(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ti(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ti(t){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(t)}var mo;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?mo=global.fetch:typeof window<"u"&&window.fetch?mo=window.fetch:mo=fetch);var js;Rv()&&(typeof global<"u"&&global.XMLHttpRequest?js=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(js=window.XMLHttpRequest));var el;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?el=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(el=window.ActiveXObject)),!mo&&Fv&&!js&&!el&&(mo=Lv||Fv),typeof mo!="function"&&(mo=void 0);var bh=function(e,n){if(n&&Ti(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},Uv=function(e,n,r,o){var i=function(c){if(!c.ok)return r(c.statusText||"Error",{status:c.status});c.text().then(function(l){r(null,{status:c.status,data:l})}).catch(r)};if(o){var a=o(e,n);if(a instanceof Promise){a.then(i).catch(r);return}}typeof fetch=="function"?fetch(e,n).then(i).catch(r):mo(e,n).then(i).catch(r)},Gv=!1,Ek=function(e,n,r,o){e.queryStringParams&&(n=bh(n,e.queryStringParams));var i=Vv({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,s=Vv({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:i},Gv?{}:a),c=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{Uv(n,s,o,c)}catch(l){if(!a||Object.keys(a).length===0||!l.message||l.message.indexOf("not implemented")<0)return o(l);try{Object.keys(a).forEach(function(f){delete s[f]}),Uv(n,s,o,c),Gv=!0}catch(f){o(f)}}},Ck=function(e,n,r,o){r&&Ti(r)==="object"&&(r=bh("",r).slice(1)),e.queryStringParams&&(n=bh(n,e.queryStringParams));try{var i;js?i=new js:i=new el("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(c){console&&console.log(c)}},_k=function(e,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},mo&&n.indexOf("file:")!==0)return Ek(e,n,r,o);if(Rv()||typeof ActiveXObject=="function")return Ck(e,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function Ea(t){"@babel/helpers - typeof";return Ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ea(t)}function qv(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Eh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qv(Object(n),!0).forEach(function(r){Hv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ak(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sk(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Wv(r.key),r)}}function Ik(t,e,n){return e&&Sk(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Hv(t,e,n){return e=Wv(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wv(t){var e=Tk(t,"string");return Ea(e)=="symbol"?e:e+""}function Tk(t,e){if(Ea(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Ea(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var xk=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,o){return Hv({},r,o||"")},parseLoadPayload:function(n,r){},request:_k,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Yv=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Ak(this,t),this.services=e,this.options=n,this.allOptions=r,this.type="backend",this.init(e,n,r)}return Ik(t,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Eh(Eh(Eh({},xk()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Ea(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,c=this.options.loadPath;typeof this.options.loadPath=="function"&&(c=this.options.loadPath(n,o)),c=gk(c),c.then(function(l){if(!l)return a(null,{});var f=s.services.interpolator.interpolate(l,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(f,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,c=typeof i=="string"?[i]:i,l=this.options.parseLoadPayload(s,c);this.options.request(this.options,n,l,function(f,h){if(h&&(h.status>=500&&h.status<600||!h.status))return r("failed loading "+n+"; status code: "+h.status,!0);if(h&&h.status>=400&&h.status<500)return r("failed loading "+n+"; status code: "+h.status,!1);if(!h&&f&&f.message&&f.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+f.message,!0);if(f)return r(f,!1);var d,p;try{typeof h.data=="string"?d=a.options.parse(h.data,o,i):d=h.data}catch{p="failed parsing "+n+" to json"}if(p)return r(p,!1);r(null,d)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var c=this.options.parsePayload(r,o,i),l=0,f=[],h=[];n.forEach(function(d){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(d,r));var u=s.services.interpolator.interpolate(p,{lng:d,ns:r});s.options.request(s.options,u,c,function(g,m){l+=1,f.push(g),h.push(m),l===n.length&&typeof a=="function"&&a(f,h)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var c=[],l=function(h){var d=i.toResolveHierarchy(h);d.forEach(function(p){c.indexOf(p)<0&&c.push(p)})};l(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(f){return l(f)}),c.forEach(function(f){n.allOptions.ns.forEach(function(h){o.read(f,h,"read",null,null,function(d,p){d&&a.warn("loading namespace ".concat(h," for language ").concat(f," failed"),d),!d&&p&&a.log("loaded namespace ".concat(h," for language ").concat(f),p),o.loaded("".concat(f,"|").concat(h),d,p)})})})}}}])}();Yv.type="backend";const{slice:Ok,forEach:Pk}=[];function kk(t){return Pk.call(Ok.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const Kv=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Bk=(t,e,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(e);let i=`${t}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!Kv.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!Kv.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},zv={create(t,e,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=Bk(t,encodeURIComponent(e),o)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(e)===0)return o.substring(e.length,o.length)}return null},remove(t){this.create(t,"",-1)}};var Nk={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return zv.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:i}=e;n&&typeof document<"u"&&zv.create(n,t,r,o,i)}},Rk={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s<a.length;s++){const c=a[s].indexOf("=");c>0&&a[s].substring(0,c)===e&&(n=a[s].substring(c+1))}}return n}};let Vs=null;const $v=()=>{if(Vs!==null)return Vs;try{Vs=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Vs=!1}return Vs};var Dk={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&$v())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&$v()&&window.localStorage.setItem(n,t)}};let Us=null;const Xv=()=>{if(Us!==null)return Us;try{Us=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Us=!1}return Us};var Mk={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Xv())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&Xv()&&window.sessionStorage.setItem(n,t)}},Lk={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i<n.length;i++)e.push(n[i]);r&&e.push(r),o&&e.push(o)}return e.length>0?e:void 0}},Fk={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},jk={name:"path",lookup(t){var o;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof e=="number"?e:0])==null?void 0:o.replace("/",""):void 0}},Vk={name:"subdomain",lookup(t){var o,i;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function Uk(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class Qv{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=kk(n,this.options||{},Uk()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Nk),this.addDetector(Rk),this.addDetector(Dk),this.addDetector(Mk),this.addDetector(Lk),this.addDetector(Fk),this.addDetector(jk),this.addDetector(Vk)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}Qv.type="languageDetector",dn.use(Yv).use(Qv).use(o3).init({fallbackLng:"en",lng:navigator.language&&navigator.language.substring(0,2),interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function Jv(){const{uuid:t,portalSession:e}=qe(),[n,r]=x.useState();return dr({url:`${t}/brand-kit`,onData:r}),x.useEffect(()=>{n&&$E(n)},[n]),v.jsx(x.StrictMode,{children:v.jsxs(w7,{children:[v.jsx(CE,{children:v.jsx(hk,{})}),v.jsx(h6,{enabled:e.inputData.enable_on_screen_keyboard}),v.jsx(H4,{className:"lg:top-14"})]},t)})}function Zv(t){const{uuid:e,portalSession:n,error:r}=qe();return n.uuid?v.jsx(Zm.Provider,{value:{...t,cameraService:n.inputData.camera_service,cameraFacingMode:n.inputData.facing_mode,primaryIdentificationMethod:n.inputData.primary_identification_method},children:t.children}):v.jsx(Er,{message:r&&`No portal session found with uuid: ${e}.`})}function Gk(t){const{portalSession:e}=R3(t);return e?v.jsx(fl.Provider,{value:{apiKey:t.apiKey,host:t.host},children:v.jsx(Kp,{uuid:e.uuid,children:v.jsx(Zv,{...t,children:v.jsx(Jv,{})})})}):v.jsx(Er,{})}const qk="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function Hk({message:t}){return v.jsxs("div",{className:"flex h-screen flex-col justify-center gap-12 text-center",children:[v.jsxs("div",{className:"flex items-center justify-center gap-3",children:[v.jsx("img",{alt:"logo",src:qk,className:"z-10 h-16 w-16 hover:animate-spin"}),v.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",v.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),v.jsx("p",{className:"text-core-red-500",children:t})]})}function Wk({uuid:t,host:e}){return t?v.jsx(fl.Provider,{value:{host:e},children:v.jsx(Kp,{uuid:t,children:v.jsx(Zv,{children:v.jsx(Jv,{})})})}):v.jsx(Hk,{message:"No uuid provided."})}const Yk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},ce.createElement("path",{d:"M8 4.75V8.25M16 4.75V8.25M7.75 10.75H16.25M6.75 19.25H17.25C18.3546 19.25 19.25 18.3546 19.25 17.25V8.75C19.25 7.64543 18.3546 6.75 17.25 6.75H6.75C5.64543 6.75 4.75 7.64543 4.75 8.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Kk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{height:24,viewBox:"0 0 24 24",width:24,xmlns:"http://www.w3.org/2000/svg",...t},ce.createElement("path",{d:"m21.25 7.5c.3796958 0 .693491.28215388.7431534.64822944l.0068466.10177056v8.5c0 1.7330315-1.3564548 3.1492459-3.0655761 3.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555 0-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932 1.06066018 0 .26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734 0 1.6711923-.7071103 1.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815 2 2c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554 0 .03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2 2c-.2928932.29289321-.767767.29289321-1.0606602 0-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734 0-1.67119234.70711027-1.7441988 1.60647279l-.0058012.14352721v8.5c0 .4142136-.33578644.75-.75.75-.37969577 0-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146 1.35645477-3.14924593 3.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117 5.85294824c2.209139 0 4 1.790861 4 4s-1.790861 4-4 4-4-1.790861-4-4 1.790861-4 4-4zm0 1.5c-1.3807119 0-2.5 1.1192881-2.5 2.5s1.1192881 2.5 2.5 2.5 2.5-1.1192881 2.5-2.5-1.1192881-2.5-2.5-2.5z",fill:"#212121"}))},Symbol.toStringTag,{value:"Module"})),zk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},ce.createElement("path",{d:"M13.25 8.75L9.75 12L13.25 15.25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),$k=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},ce.createElement("path",{d:"M17.25 6.75L6.75 17.25M6.75 6.75L17.25 17.25",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Xk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ce.createElement("path",{d:"M4.7002 4.70016L11.2999 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M11.2998 4.70016L4.70014 11.2998",stroke:"#000",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Qk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...t},ce.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M14.25 8.75H11.375C10.4775 8.75 9.75 9.47754 9.75 10.375V10.375C9.75 11.2725 10.4775 12 11.375 12H12.625C13.5225 12 14.25 12.7275 14.25 13.625V13.625C14.25 14.5225 13.5225 15.25 12.625 15.25H9.75"}),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 7.75V8.25"}),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 15.75V16.25"}))},Symbol.toStringTag,{value:"Module"})),Jk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},ce.createElement("path",{d:"M19.25 19.25H13.75M9 18.25L4.75 19.25L5.75 15L15.0429 5.70711C15.4334 5.31658 16.0666 5.31658 16.4571 5.70711L18.2929 7.54289C18.6834 7.93342 18.6834 8.56658 18.2929 8.95711L9 18.25Z",strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),Zk=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},ce.createElement("path",{d:"M6.75024 19.2502H17.2502C18.3548 19.2502 19.2502 18.3548 19.2502 17.2502V9.75025L12.0002 4.75024L4.75024 9.75025V17.2502C4.75024 18.3548 5.64568 19.2502 6.75024 19.2502Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M9.74963 15.7493C9.74963 14.6447 10.6451 13.7493 11.7496 13.7493H12.2496C13.3542 13.7493 14.2496 14.6447 14.2496 15.7493V19.2493H9.74963V15.7493Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),eB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 13V15"}),ce.createElement("circle",{cx:12,cy:9,r:.5}),ce.createElement("circle",{cx:12,cy:12,r:7.25,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}))},Symbol.toStringTag,{value:"Module"})),tB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",...t},ce.createElement("path",{d:"M5.5 6.5L12 12.25L18.5 6.5M6.75 18.25H17.25C18.3546 18.25 19.25 17.3546 19.25 16.25V7.75C19.25 6.64543 18.3546 5.75 17.25 5.75H6.75C5.64543 5.75 4.75 6.64543 4.75 7.75V16.25C4.75 17.3546 5.64543 18.25 6.75 18.25Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),nB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ce.createElement("g",{clipPath:"url(#clip0_17_95)"},ce.createElement("rect",{width:32,height:32,rx:4,fill:"#FEF3F2"}),ce.createElement("path",{d:"M12.0003 12L20.0003 20M12.0003 20L20.0003 12",stroke:"#E02731",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ce.createElement("defs",null,ce.createElement("clipPath",{id:"clip0_17_95"},ce.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),rB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ce.createElement("g",{clipPath:"url(#clip0_15_20)"},ce.createElement("rect",{width:32,height:32,rx:4,fill:"#E7FBF4"}),ce.createElement("path",{d:"M10.6668 17.3333L14.6668 20L21.3335 12",stroke:"#039855",strokeWidth:1.6875,strokeLinecap:"round",strokeLinejoin:"round"})),ce.createElement("defs",null,ce.createElement("clipPath",{id:"clip0_15_20"},ce.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0V0C24.8366 0 32 7.16344 32 16V16C32 24.8366 24.8366 32 16 32V32C7.16344 32 0 24.8366 0 16V16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),oB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ce.createElement("g",{clipPath:"url(#clip0_17_99)"},ce.createElement("rect",{width:32,height:32,rx:4,fill:"#FFFAEB"}),ce.createElement("path",{d:"M16.0002 17.3333V13.3333M16.0002 20V20.0067M23.0353 19.3333L17.942 10.456C17.0833 8.95867 14.9167 8.95867 14.058 10.456L8.96533 19.3333C8.11266 20.8187 9.18933 22.6667 10.9073 22.6667H21.0933C22.8107 22.6667 23.8873 20.8187 23.0353 19.3333Z",stroke:"#CFAA25",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),ce.createElement("defs",null,ce.createElement("clipPath",{id:"clip0_17_99"},ce.createElement("path",{d:"M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z",fill:"white"}))))},Symbol.toStringTag,{value:"Module"})),iB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...t},ce.createElement("path",{d:"M13.1191 5.61336C13.0508 5.11856 12.6279 4.75 12.1285 4.75H11.8715C11.3721 4.75 10.9492 5.11856 10.8809 5.61336L10.7938 6.24511C10.7382 6.64815 10.4403 6.96897 10.0622 7.11922C10.006 7.14156 9.95021 7.16484 9.89497 7.18905C9.52217 7.3524 9.08438 7.3384 8.75876 7.09419L8.45119 6.86351C8.05307 6.56492 7.49597 6.60451 7.14408 6.9564L6.95641 7.14408C6.60452 7.49597 6.56492 8.05306 6.86351 8.45118L7.09419 8.75876C7.33841 9.08437 7.3524 9.52216 7.18905 9.89497C7.16484 9.95021 7.14156 10.006 7.11922 10.0622C6.96897 10.4403 6.64815 10.7382 6.24511 10.7938L5.61336 10.8809C5.11856 10.9492 4.75 11.372 4.75 11.8715V12.1285C4.75 12.6279 5.11856 13.0508 5.61336 13.1191L6.24511 13.2062C6.64815 13.2618 6.96897 13.5597 7.11922 13.9378C7.14156 13.994 7.16484 14.0498 7.18905 14.105C7.3524 14.4778 7.3384 14.9156 7.09419 15.2412L6.86351 15.5488C6.56492 15.9469 6.60451 16.504 6.9564 16.8559L7.14408 17.0436C7.49597 17.3955 8.05306 17.4351 8.45118 17.1365L8.75876 16.9058C9.08437 16.6616 9.52216 16.6476 9.89496 16.811C9.95021 16.8352 10.006 16.8584 10.0622 16.8808C10.4403 17.031 10.7382 17.3519 10.7938 17.7549L10.8809 18.3866C10.9492 18.8814 11.3721 19.25 11.8715 19.25H12.1285C12.6279 19.25 13.0508 18.8814 13.1191 18.3866L13.2062 17.7549C13.2618 17.3519 13.5597 17.031 13.9378 16.8808C13.994 16.8584 14.0498 16.8352 14.105 16.8109C14.4778 16.6476 14.9156 16.6616 15.2412 16.9058L15.5488 17.1365C15.9469 17.4351 16.504 17.3955 16.8559 17.0436L17.0436 16.8559C17.3955 16.504 17.4351 15.9469 17.1365 15.5488L16.9058 15.2412C16.6616 14.9156 16.6476 14.4778 16.811 14.105C16.8352 14.0498 16.8584 13.994 16.8808 13.9378C17.031 13.5597 17.3519 13.2618 17.7549 13.2062L18.3866 13.1191C18.8814 13.0508 19.25 12.6279 19.25 12.1285V11.8715C19.25 11.3721 18.8814 10.9492 18.3866 10.8809L17.7549 10.7938C17.3519 10.7382 17.031 10.4403 16.8808 10.0622C16.8584 10.006 16.8352 9.95021 16.8109 9.89496C16.6476 9.52216 16.6616 9.08437 16.9058 8.75875L17.1365 8.4512C17.4351 8.05308 17.3955 7.49599 17.0436 7.1441L16.8559 6.95642C16.504 6.60453 15.9469 6.56494 15.5488 6.86353L15.2412 7.09419C14.9156 7.33841 14.4778 7.3524 14.105 7.18905C14.0498 7.16484 13.994 7.14156 13.9378 7.11922C13.5597 6.96897 13.2618 6.64815 13.2062 6.24511L13.1191 5.61336Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),ce.createElement("path",{d:"M13.25 12C13.25 12.6904 12.6904 13.25 12 13.25C11.3096 13.25 10.75 12.6904 10.75 12C10.75 11.3096 11.3096 10.75 12 10.75C12.6904 10.75 13.25 11.3096 13.25 12Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))},Symbol.toStringTag,{value:"Module"})),aB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...t},ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75H5.75V16.75L4.75 19.25H19.25L18.25 16.75V7.75Z"}),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M18.25 7.75L16.25 4.75H7.75L5.75 7.75"}),ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9.75 10.75V11.75C9.75 12.9926 10.7574 14 12 14V14C13.2426 14 14.25 12.9926 14.25 11.75V10.75"}))},Symbol.toStringTag,{value:"Module"})),sB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{width:24,height:24,fill:"none",viewBox:"0 0 24 24",...t},ce.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 4.75L13.75 10.25H19.25L14.75 13.75L16.25 19.25L12 15.75L7.75 19.25L9.25 13.75L4.75 10.25H10.25L12 4.75Z"}))},Symbol.toStringTag,{value:"Module"})),cB=Object.freeze(Object.defineProperty({__proto__:null,default:t=>ce.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",...t},ce.createElement("path",{d:"M15.25 8C15.25 9.79493 13.7949 11.25 12 11.25C10.205 11.25 8.74997 9.79493 8.74997 8C8.74997 6.20507 10.205 4.75 12 4.75C13.7949 4.75 15.25 6.20507 15.25 8Z"}),ce.createElement("path",{d:"M6.84748 19.25H17.1525C18.2944 19.25 19.174 18.2681 18.6407 17.2584C17.8563 15.7731 16.068 14 12 14C7.93198 14 6.14364 15.7731 5.35921 17.2584C4.82594 18.2681 5.70556 19.25 6.84748 19.25Z"}))},Symbol.toStringTag,{value:"Module"})),uB=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
|
|
156
|
-
class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
|
|
157
|
-
class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
|
|
158
|
-
this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
|
|
159
|
-
function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
|
|
160
|
-
function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
|
|
161
|
-
e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
|
|
162
|
-
d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
|
|
163
|
-
else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
|
|
164
|
-
class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
|
|
165
|
-
if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
|
|
166
|
-
a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
|
|
167
|
-
a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
|
|
168
|
-
class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
|
|
169
|
-
a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
|
|
170
|
-
function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
|
|
171
|
-
if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
|
|
172
|
-
function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
|
|
173
|
-
f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
|
|
174
|
-
let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
|
|
175
|
-
dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
|
|
176
|
-
ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
|
|
177
|
-
{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
|
|
178
|
-
34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
|
|
179
|
-
ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
|
|
180
|
-
{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
|
|
181
|
-
{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
|
|
182
|
-
dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
|
|
183
|
-
dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
|
|
184
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
|
|
185
|
-
{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
|
|
186
|
-
{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
|
|
187
|
-
ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
|
|
188
|
-
74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
|
|
189
|
-
versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
|
|
190
|
-
dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
|
|
191
|
-
dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
|
|
192
|
-
{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
|
|
193
|
-
{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
|
|
194
|
-
{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
|
|
195
|
-
{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
|
|
196
|
-
{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
|
|
197
|
-
ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
|
|
198
|
-
dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
|
|
199
|
-
dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
200
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
|
|
201
|
-
{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
|
|
202
|
-
ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
|
|
203
|
-
26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
|
|
204
|
-
{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
|
|
205
|
-
{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
|
|
206
|
-
dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
|
|
207
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
|
|
208
|
-
dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
|
|
209
|
-
{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
|
|
210
|
-
dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
|
|
211
|
-
{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
|
|
212
|
-
dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
|
|
213
|
-
errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
|
|
214
|
-
versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
|
|
215
|
-
{numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
|
|
216
|
-
let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
|
|
217
|
-
dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
|
|
218
|
-
formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
|
|
219
|
-
dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
|
|
220
|
-
2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
|
|
221
|
-
function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
|
|
222
|
-
k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
|
|
223
|
-
function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
|
|
224
|
-
function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
|
|
225
|
-
function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
|
|
226
|
-
return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
|
|
227
|
-
function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
|
|
228
|
-
function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
|
|
229
|
-
function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
|
|
230
|
-
c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
|
|
231
|
-
function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
|
|
232
|
-
function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
|
|
233
|
-
function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
|
|
234
|
-
[];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
|
|
235
|
-
function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
|
|
236
|
-
Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
|
|
237
|
-
function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
|
|
238
|
-
y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
|
|
239
|
-
k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
|
|
240
|
-
1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
|
|
241
|
-
l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
|
|
242
|
-
function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
|
|
243
|
-
c&&b.length?b[0]:m,dimension:f}}
|
|
244
|
-
function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
|
|
245
|
-
e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
|
|
246
|
-
function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
|
|
247
|
-
g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
|
|
248
|
-
u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
|
|
249
|
-
y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
|
|
250
|
-
self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
|
|
251
|
-
break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
|
|
252
|
-
`]),{type:"application/javascript"}))},Symbol.toStringTag,{value:"Module"}));yt.FacingMode=An,yt.PortalSession=Gk,yt.PortalType=rn,yt.PrimaryIdentificationMethod=Ni,yt.UuidSession=Wk,Object.defineProperty(yt,Symbol.toStringTag,{value:"Module"})});
|
|
253
|
-
//# sourceMappingURL=portal-sessions.umd.js.map
|