@leatcom/portal-sessions 0.0.85 → 0.0.86
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.
|
@@ -21595,7 +21595,7 @@ function sN({ enabled: e }) {
|
|
|
21595
21595
|
b.push(_), b.sort((x, N) => x.bottom > N.bottom ? -1 : 1);
|
|
21596
21596
|
let A = 0;
|
|
21597
21597
|
return b.every((x) => {
|
|
21598
|
-
if (E.top < x.bottom)
|
|
21598
|
+
if (E && E.top < x.bottom)
|
|
21599
21599
|
return A = x.bottom - E.top + 8, !1;
|
|
21600
21600
|
}), A;
|
|
21601
21601
|
};
|
|
@@ -136,7 +136,7 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
136
136
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p($,W){if($){if(typeof $=="string")return l($,W);var Z=Object.prototype.toString.call($).slice(8,-1);return Z==="Object"&&$.constructor&&(Z=$.constructor.name),Z==="Map"||Z==="Set"?Array.from($):Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)?l($,W):void 0}}function l($,W){(W==null||W>$.length)&&(W=$.length);for(var Z=0,I=new Array(W);Z<W;Z++)I[Z]=$[Z];return I}function m($){return m=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},m($)}function g($,W){for(var Z=0;Z<W.length;Z++){var I=W[Z];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty($,v(I.key),I)}}function y($,W,Z){return(W=v(W))in $?Object.defineProperty($,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):$[W]=Z,$}function v($){var W=function(Z,I){if(m(Z)!="object"||!Z)return Z;var L=Z[Symbol.toPrimitive];if(L!==void 0){var U=L.call(Z,I||"default");if(m(U)!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(Z)}($,"string");return m(W)=="symbol"?W:W+""}d.r(h),d.d(h,{SimpleKeyboard:function(){return Ee},default:function(){return ve}}),d(5276),d(8598),d(4782),d(4554),d(2010),d(7427),d(6099),d(7495),d(8781),d(5440),d(744),d(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($){if("Element"in $){var W="classList",Z="prototype",I=$.Element[Z],L=Object,U=String[Z].trim||function(){return this.replace(/^\s+|\s+$/g,"")},N=Array[Z].indexOf||function(he){for(var le=0,pe=this.length;le<pe;le++)if(le in this&&this[le]===he)return le;return-1},ee=function(he,le){this.name=he,this.code=DOMException[he],this.message=le},J=function(he,le){if(le==="")throw new ee("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(le))throw new ee("INVALID_CHARACTER_ERR","The token must not contain space characters.");return N.call(he,le)},te=function(he){for(var le=U.call(he.getAttribute("class")||""),pe=le?le.split(/\s+/):[],ne=0,Te=pe.length;ne<Te;ne++)this.push(pe[ne]);this._updateClassName=function(){he.setAttribute("class",this.toString())}},K=te[Z]=[],me=function(){return new te(this)};if(ee[Z]=Error[Z],K.item=function(he){return this[he]||null},K.contains=function(he){return~J(this,he+"")},K.add=function(){var he,le=arguments,pe=0,ne=le.length,Te=!1;do~J(this,he=le[pe]+"")||(this.push(he),Te=!0);while(++pe<ne);Te&&this._updateClassName()},K.remove=function(){var he,le,pe=arguments,ne=0,Te=pe.length,Ie=!1;do for(le=J(this,he=pe[ne]+"");~le;)this.splice(le,1),Ie=!0,le=J(this,he);while(++ne<Te);Ie&&this._updateClassName()},K.toggle=function(he,le){var pe=this.contains(he),ne=pe?le!==!0&&"remove":le!==!1&&"add";return ne&&this[ne](he),le===!0||le===!1?le:!pe},K.replace=function(he,le){var pe=J(he+"");~pe&&(this.splice(pe,1,le),this._updateClassName())},K.toString=function(){return this.join(" ")},L.defineProperty){var be={get:me,enumerable:!0,configurable:!0};try{L.defineProperty(I,W,be)}catch(he){he.number!==void 0&&he.number!==-2146823252||(be.enumerable=!1,L.defineProperty(I,W,be))}}else L[Z].__defineGetter__&&I.__defineGetter__(W,me)}}(self),function(){var $=document.createElement("_");if($.classList.add("c1","c2"),!$.classList.contains("c2")){var W=function(I){var L=DOMTokenList.prototype[I];DOMTokenList.prototype[I]=function(U){var N,ee=arguments.length;for(N=0;N<ee;N++)U=arguments[N],L.call(this,U)}};W("add"),W("remove")}if($.classList.toggle("c3",!1),$.classList.contains("c3")){var Z=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(I,L){return 1 in arguments&&!this.contains(I)==!L?L:Z.call(this,I)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(I,L){var U=this.toString().split(" "),N=U.indexOf(I+"");~N&&(U=U.slice(N),this.remove.apply(this,U),this.add(L),this.add.apply(this,U.slice(1)))}),$=null}()),d(2675),d(9463),d(2259),d(5700),d(8706),d(2008),d(3418),d(4423),d(3792),d(2062),d(6910),d(739),d(9572),d(2892),d(9085),d(3851),d(1278),d(9432),d(4864),d(1699),d(7764),d(8344),d(3500),d(2953),d(2712),d(2637),d(1480),d(1761);var b=function(){return $=function I(L){var U=L.getOptions,N=L.getCaretPosition,ee=L.getCaretPositionEnd,J=L.dispatch;(function(te,K){if(!(te instanceof K))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(te){return te&&!(te[0]==="{"&&te[te.length-1]==="}")}),this.getOptions=U,this.getCaretPosition=N,this.getCaretPositionEnd=ee,this.dispatch=J,I.bindMethods(I,this)},W=[{key:"getButtonType",value:function(I){return I.includes("{")&&I.includes("}")&&I!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(I){var L=this.getButtonType(I),U=I.replace("{","").replace("}",""),N="";return L!=="standardBtn"&&(N=" hg-button-".concat(U)),"hg-".concat(L).concat(N)}},{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,L){return(L=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),L):L||this.getDefaultDiplay())[I]||I}},{key:"getUpdatedInput",value:function(I,L,U){var N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:U,ee=arguments.length>4&&arguments[4]!==void 0&&arguments[4],J=this.getOptions(),te=[U,N,ee],K=L;return(I==="{bksp}"||I==="{backspace}")&&K.length>0?K=this.removeAt.apply(this,[K].concat(te)):(I==="{delete}"||I==="{forwarddelete}")&&K.length>0?K=this.removeForwardsAt.apply(this,[K].concat(te)):I==="{space}"?K=this.addStringAt.apply(this,[K," "].concat(te)):I!=="{tab}"||typeof J.tabCharOnTab=="boolean"&&J.tabCharOnTab===!1?I!=="{enter}"&&I!=="{numpadenter}"||!J.newLineOnEnter?I.includes("numpad")&&Number.isInteger(Number(I[I.length-2]))?K=this.addStringAt.apply(this,[K,I[I.length-2]].concat(te)):I==="{numpaddivide}"?K=this.addStringAt.apply(this,[K,"/"].concat(te)):I==="{numpadmultiply}"?K=this.addStringAt.apply(this,[K,"*"].concat(te)):I==="{numpadsubtract}"?K=this.addStringAt.apply(this,[K,"-"].concat(te)):I==="{numpadadd}"?K=this.addStringAt.apply(this,[K,"+"].concat(te)):I==="{numpaddecimal}"?K=this.addStringAt.apply(this,[K,"."].concat(te)):I==="{"||I==="}"?K=this.addStringAt.apply(this,[K,I].concat(te)):I.includes("{")||I.includes("}")||(K=this.addStringAt.apply(this,[K,I].concat(te))):K=this.addStringAt.apply(this,[K,`
|
|
137
137
|
`].concat(te)):K=this.addStringAt.apply(this,[K," "].concat(te)),J.debug&&console.log("Input will be: "+K),K}},{key:"updateCaretPos",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],U=this.updateCaretPosAction(I,L);this.dispatch(function(N){N.setCaretPosition(U)})}},{key:"updateCaretPosAction",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0&&arguments[1],U=this.getOptions(),N=this.getCaretPosition();return N!=null&&(L?N>0&&(N-=I):N+=I),U.debug&&console.log("Caret at:",N),N}},{key:"addStringAt",value:function(I,L){var U,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,ee=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I.length,J=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return N||N===0?(U=[I.slice(0,N),L,I.slice(ee)].join(""),this.isMaxLengthReached()||J&&this.updateCaretPos(L.length)):U=I+L,U}},{key:"removeAt",value:function(I){var L,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(U===0&&N===0)return I;if(U===N){var J=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;U&&U>=0?I.substring(U-2,U).match(J)?(L=I.substr(0,U-2)+I.substr(U),ee&&this.updateCaretPos(2,!0)):(L=I.substr(0,U-1)+I.substr(U),ee&&this.updateCaretPos(1,!0)):I.slice(-2).match(J)?(L=I.slice(0,-2),ee&&this.updateCaretPos(2,!0)):(L=I.slice(0,-1),ee&&this.updateCaretPos(1,!0))}else L=I.slice(0,U)+I.slice(N),ee&&this.dispatch(function(te){te.setCaretPosition(U)});return L}},{key:"removeForwardsAt",value:function(I){var L,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,ee=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return I!=null&&I.length&&U!==null?(U===N?L=I.substring(U,U+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?I.substr(0,U)+I.substr(U+2):I.substr(0,U)+I.substr(U+1):(L=I.slice(0,U)+I.slice(N),ee&&this.dispatch(function(J){J.setCaretPosition(U)})),L):I}},{key:"handleMaxLength",value:function(I,L){var U=this.getOptions(),N=U.maxLength,ee=I[U.inputName||"default"],J=L.length-1>=N;if(L.length<=ee.length)return!1;if(Number.isInteger(N))return U.debug&&console.log("maxLength (num) reached:",J),J?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(m(N)==="object"){var te=L.length-1>=N[U.inputName||"default"];return U.debug&&console.log("maxLength (obj) reached:",te),te?(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(L,U){return U.length?L+U[0].toUpperCase()+U.slice(1):L}):""}},{key:"chunkArray",value:function(I,L){return f(Array(Math.ceil(I.length/L))).map(function(U,N){return I.slice(L*N,L+L*N)})}},{key:"escapeRegex",value:function(I){return I.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(I,L){var U=I,N=L.indexOf("");return N<I&&N!=-1&&U--,L.indexOf("")<I&&N!=-1&&U--,U<0?0:U}}],Z=[{key:"bindMethods",value:function(I,L){var U,N=function(J,te){var K=typeof Symbol<"u"&&J[Symbol.iterator]||J["@@iterator"];if(!K){if(Array.isArray(J)||(K=p(J))||te){K&&(J=K);var me=0,be=function(){};return{s:be,n:function(){return me>=J.length?{done:!0}:{done:!1,value:J[me++]}},e:function(ne){throw ne},f:be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
138
138
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var he,le=!0,pe=!1;return{s:function(){K=K.call(J)},n:function(){var ne=K.next();return le=ne.done,ne},e:function(ne){pe=!0,he=ne},f:function(){try{le||K.return==null||K.return()}finally{if(pe)throw he}}}}(Object.getOwnPropertyNames(I.prototype));try{for(N.s();!(U=N.n()).done;){var ee=U.value;ee==="constructor"||ee==="bindMethods"||(L[ee]=L[ee].bind(L))}}catch(J){N.e(J)}finally{N.f()}}}],W&&g($.prototype,W),Z&&g($,Z),Object.defineProperty($,"prototype",{writable:!1}),$;var $,W,Z}();y(b,"noop",function(){});var E=b;function C($){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($)}function A($,W){for(var Z=0;Z<W.length;Z++){var I=W[Z];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty($,x(I.key),I)}}function T($,W,Z){return(W=x(W))in $?Object.defineProperty($,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):$[W]=Z,$}function x($){var W=function(Z,I){if(C(Z)!="object"||!Z)return Z;var L=Z[Symbol.toPrimitive];if(L!==void 0){var U=L.call(Z,I);if(C(U)!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}($,"string");return C(W)=="symbol"?W:W+""}var R=function(){return $=function I(L){var U=this,N=L.dispatch,ee=L.getOptions;(function(J,te){if(!(J instanceof te))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(J){return J.altKey||J.ctrlKey||J.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(J.code||J.key||U.keyCodeToKey(J==null?void 0:J.keyCode))}),this.dispatch=N,this.getOptions=ee,E.bindMethods(I,this)},(W=[{key:"handleHighlightKeyDown",value:function(I){var L=this.getOptions();L.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var U=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(N){var ee,J,te=N.getButtonElement(U),K=N.getButtonElement("{".concat(U,"}"));if(te)ee=te,J=U;else{if(!K)return;ee=K,J="{".concat(U,"}")}var me,be,he,le,pe=function(Te){Te.style.background=L.physicalKeyboardHighlightBgColor||"#dadce4",Te.style.color=L.physicalKeyboardHighlightTextColor||"black"};if(ee)if(Array.isArray(ee)){if(ee.forEach(function(Te){return pe(Te)}),L.physicalKeyboardHighlightPress)if(L.physicalKeyboardHighlightPressUsePointerEvents)(me=ee[0])===null||me===void 0||(be=me.onpointerdown)===null||be===void 0||be.call(me,I);else if(L.physicalKeyboardHighlightPressUseClick){var ne;(ne=ee[0])===null||ne===void 0||ne.click()}else N.handleButtonClicked(J,I)}else pe(ee),L.physicalKeyboardHighlightPress&&(L.physicalKeyboardHighlightPressUsePointerEvents?(he=ee)===null||he===void 0||(le=he.onpointerdown)===null||le===void 0||le.call(he,I):L.physicalKeyboardHighlightPressUseClick?ee.click():N.handleButtonClicked(J,I))})}},{key:"handleHighlightKeyUp",value:function(I){var L=this.getOptions();L.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var U=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(N){var ee,J,te,K=N.getButtonElement(U)||N.getButtonElement("{".concat(U,"}")),me=function(be){be.removeAttribute&&be.removeAttribute("style")};K&&(Array.isArray(K)?(K.forEach(function(be){return me(be)}),L.physicalKeyboardHighlightPressUsePointerEvents&&((ee=K[0])===null||ee===void 0||(J=ee.onpointerup)===null||J===void 0||J.call(ee,I))):(me(K),L.physicalKeyboardHighlightPressUsePointerEvents&&(K==null||(te=K.onpointerup)===null||te===void 0||te.call(K,I))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(I){var L,U="",N=I.code||I.key||this.keyCodeToKey(I==null?void 0:I.keyCode);return(U=N!=null&&N.includes("Numpad")||N!=null&&N.includes("Shift")||N!=null&&N.includes("Space")||N!=null&&N.includes("Backspace")||N!=null&&N.includes("Control")||N!=null&&N.includes("Alt")||N!=null&&N.includes("Meta")?I.code||"":I.key||this.keyCodeToKey(I==null?void 0:I.keyCode)||"").length>1?(L=U)===null||L===void 0?void 0:L.toLowerCase():U}},{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]||""}}])&&A($.prototype,W),Z&&A($,Z),Object.defineProperty($,"prototype",{writable:!1}),$;var $,W,Z}();function B($){return B=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},B($)}function F($,W){for(var Z=0;Z<W.length;Z++){var I=W[Z];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty($,G(I.key),I)}}function j($,W,Z){return(W=G(W))in $?Object.defineProperty($,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):$[W]=Z,$}function G($){var W=function(Z,I){if(B(Z)!="object"||!Z)return Z;var L=Z[Symbol.toPrimitive];if(L!==void 0){var U=L.call(Z,I);if(B(U)!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}($,"string");return B(W)=="symbol"?W:W+""}var H=function(){return $=function I(L){var U=L.utilities,N=L.options;(function(ee,J){if(!(ee instanceof J))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=U,this.options=N,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 L=this,U=I.candidateValue,N=I.targetElement,ee=I.onSelect;if(U&&U.length){var J=this.utilities.chunkArray(U.split(" "),this.pageSize);this.renderPage({candidateListPages:J,targetElement:N,pageIndex:this.pageIndex,nbPages:J.length,onItemSelected:function(te,K){ee(te,K),L.destroy()}})}}},{key:"renderPage",value:function(I){var L,U=this,N=I.candidateListPages,ee=I.targetElement,J=I.pageIndex,te=I.nbPages,K=I.onItemSelected;(L=this.candidateBoxElement)===null||L===void 0||L.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var me=document.createElement("ul");me.className="hg-candidate-box-list",N[J].forEach(function(Ie){var et,Ke=document.createElement("li"),Pt=function(){var bt=new(U.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(bt,"target",{value:Ke}),bt};Ke.className="hg-candidate-box-list-item",Ke.innerHTML=((et=U.options.display)===null||et===void 0?void 0:et[Ie])||Ie,U.options.useTouchEvents?Ke.ontouchstart=function(bt){return K(Ie,bt||Pt())}:Ke.onclick=function(){var bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Pt();return K(Ie,bt)},me.appendChild(Ke)});var be=J>0,he=document.createElement("div");he.classList.add("hg-candidate-box-prev"),be&&he.classList.add("hg-candidate-box-btn-active");var le=function(){be&&U.renderPage({candidateListPages:N,targetElement:ee,pageIndex:J-1,nbPages:te,onItemSelected:K})};this.options.useTouchEvents?he.ontouchstart=le:he.onclick=le,this.candidateBoxElement.appendChild(he),this.candidateBoxElement.appendChild(me);var pe=J<te-1,ne=document.createElement("div");ne.classList.add("hg-candidate-box-next"),pe&&ne.classList.add("hg-candidate-box-btn-active");var Te=function(){pe&&U.renderPage({candidateListPages:N,targetElement:ee,pageIndex:J+1,nbPages:te,onItemSelected:K})};this.options.useTouchEvents?ne.ontouchstart=Te:ne.onclick=Te,this.candidateBoxElement.appendChild(ne),ee.prepend(this.candidateBoxElement)}}],W&&F($.prototype,W),Z&&F($,Z),Object.defineProperty($,"prototype",{writable:!1}),$;var $,W,Z}(),P=H;function V($){return function(W){if(Array.isArray(W))return z(W)}($)||function(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}($)||function(W,Z){if(W){if(typeof W=="string")return z(W,Z);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,Z):void 0}}($)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
139
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z($,W){(W==null||W>$.length)&&(W=$.length);for(var Z=0,I=new Array(W);Z<W;Z++)I[Z]=$[Z];return I}function X($){return X=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},X($)}function re($,W){var Z=Object.keys($);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols($);W&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor($,L).enumerable})),Z.push.apply(Z,I)}return Z}function oe($,W){for(var Z=0;Z<W.length;Z++){var I=W[Z];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty($,we(I.key),I)}}function ce($,W,Z){return(W=we(W))in $?Object.defineProperty($,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):$[W]=Z,$}function we($){var W=function(Z,I){if(X(Z)!="object"||!Z)return Z;var L=Z[Symbol.toPrimitive];if(L!==void 0){var U=L.call(Z,I);if(X(U)!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}($,"string");return X(W)=="symbol"?W:W+""}var de=function(){return $=function I(L,U){var N=this;if(function(le,pe){if(!(le instanceof pe))throw new TypeError("Cannot call a class as a function")}(this,I),ce(this,"input",void 0),ce(this,"options",void 0),ce(this,"utilities",void 0),ce(this,"caretPosition",void 0),ce(this,"caretPositionEnd",void 0),ce(this,"keyboardDOM",void 0),ce(this,"keyboardPluginClasses",void 0),ce(this,"keyboardDOMClass",void 0),ce(this,"buttonElements",void 0),ce(this,"currentInstanceName",void 0),ce(this,"allKeyboardInstances",void 0),ce(this,"keyboardInstanceNames",void 0),ce(this,"isFirstKeyboardInstance",void 0),ce(this,"physicalKeyboard",void 0),ce(this,"modules",void 0),ce(this,"activeButtonClass",void 0),ce(this,"holdInteractionTimeout",void 0),ce(this,"holdTimeout",void 0),ce(this,"isMouseHold",void 0),ce(this,"initialized",void 0),ce(this,"candidateBox",void 0),ce(this,"keyboardRowsDOM",void 0),ce(this,"defaultName","default"),ce(this,"activeInputElement",null),ce(this,"handleParams",function(le,pe){var ne,Te,Ie;if(typeof le=="string")ne=le.split(".").join(""),Te=document.querySelector(".".concat(ne)),Ie=pe;else if(le instanceof HTMLDivElement){if(!le.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ne=le.className.split(" ")[0],Te=le,Ie=pe}else ne="simple-keyboard",Te=document.querySelector(".".concat(ne)),Ie=le;return{keyboardDOMClass:ne,keyboardDOM:Te,options:Ie}}),ce(this,"getOptions",function(){return N.options}),ce(this,"getCaretPosition",function(){return N.caretPosition}),ce(this,"getCaretPositionEnd",function(){return N.caretPositionEnd}),ce(this,"registerModule",function(le,pe){N.modules[le]||(N.modules[le]={}),pe(N.modules[le])}),ce(this,"getKeyboardClassString",function(){for(var le=arguments.length,pe=new Array(le),ne=0;ne<le;ne++)pe[ne]=arguments[ne];return[N.keyboardDOMClass].concat(pe).filter(function(Te){return!!Te}).join(" ")}),typeof window<"u"){var ee=this.handleParams(L,U),J=ee.keyboardDOMClass,te=ee.keyboardDOM,K=ee.options,me=K===void 0?{}:K;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=te,this.options=function(le){for(var pe=1;pe<arguments.length;pe++){var ne=arguments[pe]!=null?arguments[pe]:{};pe%2?re(Object(ne),!0).forEach(function(Te){ce(le,Te,ne[Te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(ne)):re(Object(ne)).forEach(function(Te){Object.defineProperty(le,Te,Object.getOwnPropertyDescriptor(ne,Te))})}return le}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},me),this.keyboardPluginClasses="",E.bindMethods(I,this);var be=this.options.inputName,he=be===void 0?this.defaultName:be;if(this.input={},this.input[he]="",this.keyboardDOMClass=J,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 R({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(J,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},W=[{key:"setCaretPosition",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I;this.caretPosition=I,this.caretPositionEnd=L}},{key:"getInputCandidates",value:function(I){var L=this,U=this.options,N=U.layoutCandidates,ee=U.layoutCandidatesCaseSensitiveMatch;if(!N||X(N)!=="object")return{};var J=Object.keys(N).filter(function(me){var be=I.substring(0,L.getCaretPositionEnd()||0)||I,he=new RegExp("".concat(L.utilities.escapeRegex(me),"$"),ee?"g":"gi");return!!V(be.matchAll(he)).length});if(J.length>1){var te=J.sort(function(me,be){return be.length-me.length})[0];return{candidateKey:te,candidateValue:N[te]}}if(J.length){var K=J[0];return{candidateKey:K,candidateValue:N[K]}}return{}}},{key:"showCandidatesBox",value:function(I,L,U){var N=this;this.candidateBox&&this.candidateBox.show({candidateValue:L,targetElement:U,onSelect:function(ee,J){var te=N.options,K=te.layoutCandidatesCaseSensitiveMatch,me=te.disableCandidateNormalization,be=te.enableLayoutCandidatesKeyPress,he=ee;me||(he=ee.normalize("NFD")),typeof N.options.beforeInputUpdate=="function"&&N.options.beforeInputUpdate(N);var le=N.getInput(N.options.inputName,!0),pe=N.getCaretPositionEnd()||0,ne=le.substring(0,pe||0)||le,Te=new RegExp("".concat(N.utilities.escapeRegex(I),"$"),K?"g":"gi"),Ie=ne.replace(Te,he),et=le.replace(ne,Ie),Ke=Ie.length-ne.length,Pt=(pe||le.length)+Ke;Pt<0&&(Pt=0),N.setInput(et,N.options.inputName,!0),N.setCaretPosition(Pt),be&&typeof N.options.onKeyPress=="function"&&N.options.onKeyPress(ee,J),typeof N.options.onChange=="function"&&N.options.onChange(N.getInput(N.options.inputName,!0),J),typeof N.options.onChangeAll=="function"&&N.options.onChangeAll(N.getAllInputs(),J)}})}},{key:"handleButtonClicked",value:function(I,L){var U=this.options,N=U.inputName,ee=N===void 0?this.defaultName:N,J=U.debug;if(I!=="{//}"){this.input[ee]||(this.input[ee]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var te=this.utilities.getUpdatedInput(I,this.input[ee],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(I)&&this.activeInputElement&&this.input[ee]&&this.input[ee]===te&&this.caretPosition===0&&this.caretPositionEnd===te.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(I,L);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(I,L),this.input[ee]!==te&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(te))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,te))return;var K=this.utilities.getUpdatedInput(I,this.input[ee],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(K,this.options.inputName,!0),J&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),L==null?void 0:L.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),L),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),L),L!=null&&L.target&&this.options.enableLayoutCandidates){var me,be=this.getInputCandidates(te),he=be.candidateKey,le=be.candidateValue;he&&le?this.showCandidatesBox(he,le,this.keyboardDOM):(me=this.candidateBox)===null||me===void 0||me.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)),J&&console.log("Key pressed:",I)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(I){this.options.syncInstanceInputs?this.dispatch(function(L){L.isMouseHold=I}):this.isMouseHold=I}},{key:"handleButtonMouseDown",value:function(I,L){var U=this;L&&(this.options.preventMouseDownDefault&&L.preventDefault(),this.options.stopMouseDownPropagation&&L.stopPropagation(),L.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(){(U.getMouseHold()&&(!I.includes("{")&&!I.includes("}")||I==="{delete}"||I==="{backspace}"||I==="{bksp}"||I==="{space}"||I==="{tab}")||I==="{arrowright}"||I==="{arrowleft}"||I==="{arrowup}"||I==="{arrowdown}")&&(U.options.debug&&console.log("Button held:",I),U.handleButtonHold(I)),clearTimeout(U.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(I,L){var U=this;L&&(this.options.preventMouseUpDefault&&L.preventDefault&&L.preventDefault(),this.options.stopMouseUpPropagation&&L.stopPropagation&&L.stopPropagation(),!(L.target===this.keyboardDOM||L.target&&this.keyboardDOM.contains(L.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(L.target===this.candidateBox.candidateBoxElement||L.target&&this.candidateBox.candidateBoxElement.contains(L.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(N){N.classList.remove(U.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),I&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(I,L)}},{key:"handleKeyboardContainerMouseDown",value:function(I){this.options.preventMouseDownDefault&&I.preventDefault()}},{key:"handleButtonHold",value:function(I){var L=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){L.getMouseHold()?(L.handleButtonClicked(I),L.handleButtonHold(I)):clearTimeout(L.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var I=this;this.dispatch(function(L){L.replaceInput(I.input),L.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,L=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!L&&this.syncInstanceInputs(),this.options.rtl?""+this.input[I].replace("","").replace("","")+"":this.input[I]}},{key:"getAllInputs",value:function(){var I=this,L={};return Object.keys(this.input).forEach(function(U){L[U]=I.getInput(U,!0)}),L}},{key:"setInput",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,U=arguments.length>2?arguments[2]:void 0;this.input[L]=I,!U&&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]:{},L=this.changedOptions(I);this.options=Object.assign(this.options,I),L.length&&(this.options.debug&&console.log("changedOptions",L),this.onSetOptions(L),this.render())}},{key:"changedOptions",value:function(I){var L=this;return Object.keys(I).filter(function(U){return JSON.stringify(I[U])!==JSON.stringify(L.options[U])})}},{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 P({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(L){I(window.SimpleKeyboardInstances[L],L)})}},{key:"addButtonTheme",value:function(I,L){var U=this;L&&I&&(I.split(" ").forEach(function(N){L.split(" ").forEach(function(ee){U.options.buttonTheme||(U.options.buttonTheme=[]);var J=!1;U.options.buttonTheme.map(function(te){if(te!=null&&te.class.split(" ").includes(ee)){J=!0;var K=te.buttons.split(" ");K.includes(N)||(J=!0,K.push(N),te.buttons=K.join(" "))}return te}),J||U.options.buttonTheme.push({class:ee,buttons:I})})}),this.render())}},{key:"removeButtonTheme",value:function(I,L){var U=this;if(!I&&!L)return this.options.buttonTheme=[],void this.render();I&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(I.split(" ").forEach(function(N){var ee;(ee=U.options)===null||ee===void 0||(ee=ee.buttonTheme)===null||ee===void 0||ee.map(function(J,te){if(J&&L&&L.includes(J.class)||!L){var K,me,be=(K=J)===null||K===void 0?void 0:K.buttons.split(" ").filter(function(he){return he!==N});J&&be!=null&&be.length?J.buttons=be.join(" "):((me=U.options.buttonTheme)===null||me===void 0||me.splice(te,1),J=null)}return J})}),this.render())}},{key:"getButtonElement",value:function(I){var L,U=this.buttonElements[I];return U&&(L=U.length>1?U:U[0]),L}},{key:"inputPatternIsValid",value:function(I){var L,U=this.options.inputPattern;if((L=U instanceof RegExp?U:U[this.options.inputName||this.defaultName])&&I){var N=L.test(I);return this.options.debug&&console.log('inputPattern ("'.concat(L,'"): ').concat(N?"passed":"did not pass!")),N}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,L=I!==void 0&&I;document.addEventListener("keyup",this.handleKeyUp,L),document.addEventListener("keydown",this.handleKeyDown,L),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 L,U=this;I.target.tagName&&(L=I.target.tagName.toLowerCase()),this.dispatch(function(N){var ee=I.target===N.keyboardDOM||I.target&&N.keyboardDOM.contains(I.target);if(U.options.syncInstanceInputs&&Array.isArray(I.path)&&(ee=I.path.some(function(K){var me;return K==null||(me=K.hasAttribute)===null||me===void 0?void 0:me.call(K,"data-skInstance")})),(L==="textarea"||L==="input"&&["text","search","url","tel","password"].includes(I.target.type))&&!N.options.disableCaretPositioning){var J=I.target.selectionStart,te=I.target.selectionEnd;N.options.rtl&&(J=N.utilities.getRtlOffset(J,N.getInput()),te=N.utilities.getRtlOffset(te,N.getInput())),N.setCaretPosition(J,te),U.activeInputElement=I.target,N.options.debug&&console.log("Caret at: ",N.getCaretPosition(),N.getCaretPositionEnd(),I&&I.target.tagName.toLowerCase(),"(".concat(N.keyboardDOMClass,")"),I==null?void 0:I.type)}else!N.options.disableCaretPositioning&&ee||(I==null?void 0:I.type)==="selectionchange"||(N.setCaretPosition(null),U.activeInputElement=null,N.options.debug&&console.log('Caret position reset due to "'.concat(I==null?void 0:I.type,'" event'),I))})}},{key:"recurseButtons",value:function(I){var L=this;I&&Object.keys(this.buttonElements).forEach(function(U){return L.buttonElements[U].forEach(I)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var I=this.options.physicalKeyboardHighlightPreventDefault,L=I!==void 0&&I;document.removeEventListener("keyup",this.handleKeyUp,L),document.removeEventListener("keydown",this.handleKeyDown,L),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(U){U&&(U.onpointerdown=null,U.onpointerup=null,U.onpointercancel=null,U.ontouchstart=null,U.ontouchend=null,U.ontouchcancel=null,U.onclick=null,U.onmousedown=null,U.onmouseup=null,U.remove(),U=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 L=this.options.buttonTheme,U=[];return Array.isArray(L)&&L.forEach(function(N){if(N&&N.class&&typeof N.class=="string"&&N.buttons&&typeof N.buttons=="string"){var ee=N.class.split(" ");N.buttons.split(" ").includes(I)&&(U=[].concat(V(U),V(ee)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',N)}),U}},{key:"setDOMButtonAttributes",value:function(I,L){var U=this.options.buttonAttributes;Array.isArray(U)&&U.forEach(function(N){N.attribute&&typeof N.attribute=="string"&&N.value&&typeof N.value=="string"&&N.buttons&&typeof N.buttons=="string"?N.buttons.split(" ").includes(I)&&L(N.attribute,N.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',N)})}},{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(L){var U=new L(I);U.init&&U.init(I)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(I,L){return!!this.modules[I]&&this.modules[I][L]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(I,L,U,N){var ee=this,J=Array.from(I.children),te=0;return J.length&&U.forEach(function(K,me){var be=N[me];if(!(be&&be>K))return!1;var he=K-te,le=be-te,pe=document.createElement("div");pe.className+="hg-button-container";var ne="".concat(ee.options.layoutName,"-r").concat(L,"c").concat(me);pe.setAttribute("data-skUID",ne);var Te=J.splice(he,le-he+1);te=le-he,Te.forEach(function(Ie){return pe.appendChild(Ie)}),J.splice(he,0,pe),I.innerHTML="",J.forEach(function(Ie){return I.appendChild(Ie)}),ee.options.debug&&console.log("rowDOMContainer",Te,he,le,te+1)}),I}},{key:"render",value:function(){var I=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var L="hg-layout-".concat(this.options.layoutName),U=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}"]},N=this.options.useTouchEvents||!1,ee=N?"hg-touch-events":"",J=this.options.useMouseEvents||!1,te=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,L,this.keyboardPluginClasses,ee),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",U[this.options.layoutName||this.defaultName].forEach(function(K,me){var be=K.split(" ");I.options.excludeFromLayout&&I.options.excludeFromLayout[I.options.layoutName||I.defaultName]&&(be=be.filter(function(ne){return I.options.excludeFromLayout&&!I.options.excludeFromLayout[I.options.layoutName||I.defaultName].includes(ne)}));var he=document.createElement("div");he.className+="hg-row";var le=[],pe=[];be.forEach(function(ne,Te){var Ie,et=!te&&typeof ne=="string"&&ne.length>1&&ne.indexOf("[")===0,Ke=!te&&typeof ne=="string"&&ne.length>1&&ne.indexOf("]")===ne.length-1;et&&(le.push(Te),ne=ne.replace(/\[/g,"")),Ke&&(pe.push(Te),ne=ne.replace(/\]/g,""));var Pt=I.utilities.getButtonClass(ne),bt=I.utilities.getButtonDisplayName(ne,I.options.display,I.options.mergeDisplay),Br=I.options.useButtonTag?"button":"div",Et=document.createElement(Br);Et.className+="hg-button ".concat(Pt),(Ie=Et.classList).add.apply(Ie,V(I.getButtonThemeClasses(ne))),I.setDOMButtonAttributes(ne,function(De,Yr){Et.setAttribute(De,Yr)}),I.activeButtonClass="hg-activeButton",!I.utilities.pointerEventsSupported()||N||J?N?(Et.ontouchstart=function(De){I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.ontouchend=function(De){I.handleButtonMouseUp(ne,De)},Et.ontouchcancel=function(De){I.handleButtonMouseUp(ne,De)}):(Et.onclick=function(De){I.setMouseHold(!1),typeof I.options.onKeyReleased!="function"&&I.handleButtonClicked(ne,De)},Et.onmousedown=function(De){typeof I.options.onKeyReleased!="function"||I.isMouseHold||I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.onmouseup=function(De){I.handleButtonMouseUp(ne,De)}):(Et.onpointerdown=function(De){I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.onpointerup=function(De){I.handleButtonMouseUp(ne,De)},Et.onpointercancel=function(De){I.handleButtonMouseUp(ne,De)}),Et.setAttribute("data-skBtn",ne);var In="".concat(I.options.layoutName,"-r").concat(me,"b").concat(Te);Et.setAttribute("data-skBtnUID",In);var Dt=document.createElement("span");Dt.innerHTML=bt,Et.appendChild(Dt),I.buttonElements[ne]||(I.buttonElements[ne]=[]),I.buttonElements[ne].push(Et),he.appendChild(Et)}),he=I.parseRowDOMContainers(he,me,le,pe),I.keyboardRowsDOM.appendChild(he)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||N||J?N?(document.ontouchend=function(K){return I.handleButtonMouseUp(void 0,K)},document.ontouchcancel=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.ontouchstart=function(K){return I.handleKeyboardContainerMouseDown(K)}):N||(document.onmouseup=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.onmousedown=function(K){return I.handleKeyboardContainerMouseDown(K)}):(document.onpointerup=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.onpointerdown=function(K){return I.handleKeyboardContainerMouseDown(K)}),this.onInit())}}],W&&oe($.prototype,W),Z&&oe($,Z),Object.defineProperty($,"prototype",{writable:!1}),$;var $,W,Z}(),Ee=de,ve=de}(),h}()},442:function(a){a.exports=n}},o={};function i(a){var c=o[a];if(c!==void 0)return c.exports;var u=o[a]={exports:{}};return r[a].call(u.exports,u,u.exports,i),u.exports}i.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(c,{a:c}),c},i.d=function(a,c){for(var u in c)i.o(c,u)&&!i.o(a,u)&&Object.defineProperty(a,u,{enumerable:!0,get:c[u]})},i.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{KeyboardReact:function(){return m},default:function(){return g}}),i(981);var a=i(442),c=i(548),u=i.n(c);function d(y){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},d(y)}function h(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);v&&(E=E.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),b.push.apply(b,E)}return b}function f(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%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,v,b){var E;return E=function(C,A){if(d(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var x=T.call(C,A||"default");if(d(x)!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(C)}(v,"string"),(v=d(E)=="symbol"?E:E+"")in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var l=function(y){return f(f({},y),{},{keyboardRef:null})},m=function(y){var v=y.baseClass||"react-simple-keyboard",b=a.useRef(null),E=a.useRef(null),C=a.useRef(null),A=a.useRef(y);return a.useEffect(function(){return function(){C.current&&C.current.destroy(),b.current=!1}},[]),a.useEffect(function(){var T=function(j){return f(f({},j),{},{theme:"simple-keyboard ".concat(j.theme||"hg-theme-default")})}(y);if(!b.current){b.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var x=E.current,R=".".concat(v);C.current=new(u())(x||R,T),T.keyboardRef&&T.keyboardRef(C.current)}var B=function(j,G){var H=l(G),P=l(j);return Object.keys(H).filter(function(V){return H[V]!==P[V]})}(A.current,T);if(B.length){var F=C.current;A.current=T,F==null||F.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",B)}},[b,v,A,y]),a.createElement("div",{className:v,ref:E})},g=m}(),s}()})})(Uy);var yx=Uy.exports;const vx=td(yx);function Hy({onChange:e,keyboardRef:t,layout:n,theme:r}){const[o,i]=k.useState("default"),s=a=>{(a==="{shift}"||a==="{lock}")&&i(o==="default"?"shift":"default")};return w.jsx(vx,{keyboardRef:a=>t.current=a,layoutName:o,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Gy(){const{subscribe:e,unsubscribe:t,publish:n}=Da();return{initialize:(a,c)=>{e("openKeyboard",a),e("closeKeyboard",c)},terminate:(a,c)=>{t("openKeyboard",a),t("closeKeyboard",c)},open:a=>{n("openKeyboard",{inputId:a.target.id,inputValue:a.target.value})},close:()=>{n("closeKeyboard")}}}const Or="keyboard-custom-overlap-id";function wx({enabled:e}){const[t,n]=k.useState(!1),r=k.useRef(null),o=k.useRef(null),i=k.useRef(null),[s,a]=k.useState(),[c,u]=k.useState(0),{initialize:d,terminate:h}=Gy(),f=v=>{var b,E;o.current=document.getElementById(v.detail.inputId),(b=r.current)==null||b.setInput(v.detail.inputValue),(E=o.current)==null||E.addEventListener("input",C=>{var T;const A=C.target;(T=r.current)==null||T.setInput(A==null?void 0:A.value)}),u(y()),n(!0)},p=()=>{u(0),n(!1)};k.useEffect(()=>(d(f,p),()=>{h(f,p)}),[t]);const l=v=>{var b,E;if(o&&o.current){m(o.current,v);const C=(b=r.current)==null?void 0:b.getCaretPosition();C&&((E=o.current)==null||E.setSelectionRange(C,C))}},m=(v,b)=>{var A;const E=(A=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:A.set;E==null||E.call(v,b);const C=new Event("input",{bubbles:!0});v.dispatchEvent(C)},g=()=>{var v;if(!s){const b=(v=i.current)==null?void 0:v.getBoundingClientRect();return b&&b.x&&!s&&a(b),b}return s},y=()=>{var T;const v=document.querySelectorAll("#"+Or),b=g(),E=[...v].map(x=>x.getBoundingClientRect()),C=(T=o.current)==null?void 0:T.getBoundingClientRect();E.push(C),E.sort((x,R)=>x.bottom>R.bottom?-1:1);let A=0;return E.every(x=>{if(b.top<x.bottom)return A=x.bottom-b.top+8,!1}),A};return e?w.jsx("div",{className:"relative",style:{height:c},children:w.jsx("div",{ref:i,className:`mobile:hidden absolute bottom-0 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!t&&s&&"hidden"} ${!t&&!s&&"pointer-events-none opacity-0"}`,children:w.jsx(Hy,{keyboardRef:r,onChange:l})})}):w.jsx(w.Fragment,{})}const Oi=({id:e,name:t,label:n,description:r,required:o,type:i="text",value:s,placeholder:a,disabled:c,error:u=!1,helperText:d="",onChange:h,beforeIcon:f,afterIcon:p,autoFocus:l,onFocus:m,onBlur:g})=>{const[y,v]=k.useState(d),b=k.useRef(null),[E,C]=k.useState(!1),{open:A,close:T}=Gy();k.useEffect(()=>()=>{T()},[]);const x=()=>{b.current&&v(b.current.validationMessage),C(!1),T(),g==null||g()},R=async G=>{C(!0),(async()=>A(G))().then(()=>{var P;return(P=b.current)==null?void 0:P.scrollIntoView({behavior:"smooth",block:"center"})}),m==null||m()},B=G=>{h==null||h(G)},F=k.useId(),j=e??F;return w.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:r,disabled:c,htmlFor:j,required:o,children:n}),w.jsx("div",{className:Ln("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&&!u&&"border-core-primary-500 ring-1 ring-core-primary-500",u&&"border-core-red-500",u&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:w.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[f&&w.jsx(Pn,{icon:f}),w.jsx("input",{type:i,id:j,name:t,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:s,onChange:B,onBlur:x,ref:b,placeholder:a,onFocus:R,disabled:c,autoFocus:l}),p&&w.jsx(Pn,{icon:p})]})}),w.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${d||y?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:w.jsx("div",{className:"overflow-hidden",children:w.jsx(qn.Helper,{error:u,helperText:d||y})})})]})};Oi.displayName="Input";const qy=({id:e,name:t,label:n,required:r,description:o,placeholder:i,value:s,disabled:a,error:c=!1,helperText:u,onChange:d,type:h="date"})=>{const[f,p]=k.useState(!1),l=k.useId(),m=e??l;return w.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:o,disabled:a,htmlFor:m,required:r,children:n}),w.jsx("div",{className:Ln("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 ",a?"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 ",f&&!c&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",c&&"border-core-red-500",c&&f&&"border-core-red-500 ring-1 ring-core-red-500"),children:w.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[w.jsx("input",{type:h,id:m,name:t,value:s,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:d,onFocus:()=>p(!0),onBlur:()=>p(!1),disabled:a}),w.jsx(Pn,{icon:"calendar"})]})}),w.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${u?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:w.jsx("div",{className:"overflow-hidden",children:w.jsx(qn.Helper,{error:c,helperText:u})})})]})};qy.displayName="Input";function Fn({children:e}){return w.jsx("div",{className:"h-screen w-screen md:p-6",children:w.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function ni({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:o,children:i}){const[s,a]=k.useState(t),c=k.useRef(null);k.useEffect(()=>{a(t)},[t]),k.useEffect(()=>{const h=c.current;h&&(s?h.show():h.close())},[s]);const u=()=>{n&&n(),a(!1)},d=h=>{h.key==="Escape"&&u()};return w.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${s?"flex":"hidden"}`,children:w.jsx("dialog",{ref:c,onKeyDown:d,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:w.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[w.jsx(Vt,{children:w.jsx("div",{className:"flex h-16 items-center",children:w.jsx("p",{children:e})})}),w.jsx(jt,{children:i}),w.jsx(pn,{children:w.jsxs("div",{className:"flex flex-col gap-2",children:[r&&w.jsx(dt,{label:r.label??"",onClick:r.action,disabled:r.disabled,pending:r.loading}),o&&w.jsx(dt,{label:o.label??"",onClick:o.action,disabled:o.disabled,pending:o.loading,variant:"secondary"})]})})]})})})}function bx({option:{label:e},checked:t,onChange:n}){return w.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[w.jsx(Ih,{defaultChecked:t,onChange:n}),w.jsx("p",{children:e})]})}function Ex(e){const{t}=$e(),n=k.useRef(null),[r,o]=k.useState(!1);Vy(n,o);const[i,s]=k.useState(""),[a,c]=k.useState(e.value.split(";")),{name:u,onChange:d}=e,h=(f,p)=>{let l=[];f?l=[...a,p]:l=a.filter(m=>m!==p),c(l),d&&d(u??"",l.join(";"))};return w.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),w.jsxs("div",{className:"relative",children:[w.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${e.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:()=>!e.disabled&&o(!r),children:[w.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:a.map(f=>{var l;const p=(l=e.options.find(m=>m.value===f))==null?void 0:l.label;return w.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[w.jsx("p",{className:"truncate",children:p}),w.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,f),children:w.jsx(Pn,{icon:"close"})})]},f)})}),w.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),w.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:[e.options.length>6&&w.jsx("div",{className:"px-4",children:w.jsx(Oi,{placeholder:`${t("search")}...`,onChange:f=>s(f.target.value)})}),e.options.map(f=>{if(!(i&&!f.label.toLowerCase().includes(i.toLowerCase())))return w.jsx(bx,{option:f,checked:a.includes(f.value),onChange:p=>h(p,f.value)},`${f.value}_${a.includes(f.value)?"checked":"unchecked"}`)})]})]})]})}function Cx({value:e,max:t,label:n}){return w.jsxs("div",{children:[w.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),w.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:w.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function _x({value:e,placeholder:t,open:n,setOpen:r,disabled:o}){return w.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:[w.jsx("span",{className:`text-sm ${o?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),w.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function Sx({label:e,children:t}){return w.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[w.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function Th(e){return w.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function Ax(e){const t=k.useRef(null),[n,r]=k.useState(!1),[o,i]=k.useState(e.value??"");Vy(t,r);const s=(c,u)=>{i(c),r(!1),e.onChange&&e.onChange(u)},a=k.Children.map(e.children,c=>{if(k.isValidElement(c)){if(c.type===Th)return w.jsx("div",{onClick:()=>s(c.props.label,c.props.value),children:c});if(c.type===Sx){const u=k.Children.map(c.props.children,d=>{if(k.isValidElement(d)&&d.type===Th)return w.jsx("div",{onClick:()=>s(d.props.label,d.props.value),children:d})});return k.cloneElement(c,{},...u)}}});return w.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),w.jsx("div",{children:w.jsxs("div",{className:"relative",children:[w.jsx(_x,{value:o,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&w.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:a})]})}),w.jsx(qn.Helper,{helperText:e.helperText})]})}var Ix=Object.defineProperty,Tx=(e,t)=>{for(var n in t)Ix(e,n,{get:t[n],enumerable:!0})},Hr={};Tx(Hr,{assign:()=>Ox,colors:()=>ii,createStringInterpolator:()=>Dh,skipAnimation:()=>Qy,to:()=>Xy,willAdvance:()=>Lh});var xh=Fa(),ze=e=>La(e,xh),kh=Fa();ze.write=e=>La(e,kh);var el=Fa();ze.onStart=e=>La(e,el);var Oh=Fa();ze.onFrame=e=>La(e,Oh);var Ph=Fa();ze.onFinish=e=>La(e,Ph);var ks=[];ze.setTimeout=(e,t)=>{const n=ze.now()+t,r=()=>{const i=ks.findIndex(s=>s.cancel==r);~i&&ks.splice(i,1),oi-=~i?1:0},o={time:n,handler:e,cancel:r};return ks.splice($y(n),0,o),oi+=1,Wy(),o};var $y=e=>~(~ks.findIndex(t=>t.time>e)||~ks.length);ze.cancel=e=>{el.delete(e),Oh.delete(e),Ph.delete(e),xh.delete(e),kh.delete(e)},ze.sync=e=>{Nh=!0,ze.batchedUpdates(e),Nh=!1},ze.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,ze.onStart(n)}return r.handler=e,r.cancel=()=>{el.delete(n),t=null},r};var Rh=typeof window<"u"?window.requestAnimationFrame:()=>{};ze.use=e=>Rh=e,ze.now=typeof performance<"u"?()=>performance.now():Date.now,ze.batchedUpdates=e=>e(),ze.catch=console.error,ze.frameLoop="always",ze.advance=()=>{ze.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zy()};var ri=-1,oi=0,Nh=!1;function La(e,t){Nh?(t.delete(e),e(0)):(t.add(e),Wy())}function Wy(){ri<0&&(ri=0,ze.frameLoop!=="demand"&&Rh(Yy))}function xx(){ri=-1}function Yy(){~ri&&(Rh(Yy),ze.batchedUpdates(zy))}function zy(){const e=ri;ri=ze.now();const t=$y(ri);if(t&&(Ky(ks.splice(0,t),n=>n.handler()),oi-=t),!oi){xx();return}el.flush(),xh.flush(e?Math.min(64,ri-e):16.667),Oh.flush(),kh.flush(),Ph.flush()}function Fa(){let e=new Set,t=e;return{add(n){oi+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return oi-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,oi-=t.size,Ky(t,r=>r(n)&&e.add(r)),oi+=e.size,t=e)}}}function Ky(e,t){e.forEach(n=>{try{t(n)}catch(r){ze.catch(r)}})}function Bh(){}var kx=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Ao(e,t){if(Ae.arr(e)){if(!Ae.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ut=(e,t)=>e.forEach(t);function oo(e,t,n){if(Ae.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var vr=e=>Ae.und(e)?[]:Ae.arr(e)?e:[e];function ja(e,t){if(e.size){const n=Array.from(e);e.clear(),ut(n,t)}}var Va=(e,...t)=>ja(e,n=>n(...t)),Mh=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Dh,Xy,ii=null,Qy=!1,Lh=Bh,Ox=e=>{e.to&&(Xy=e.to),e.now&&(ze.now=e.now),e.colors!==void 0&&(ii=e.colors),e.skipAnimation!=null&&(Qy=e.skipAnimation),e.createStringInterpolator&&(Dh=e.createStringInterpolator),e.requestAnimationFrame&&ze.use(e.requestAnimationFrame),e.batchedUpdates&&(ze.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Lh=e.willAdvance),e.frameLoop&&(ze.frameLoop=e.frameLoop)},Ua=new Set,Pr=[],Fh=[],tl=0,nl={get idle(){return!Ua.size&&!Pr.length},start(e){tl>e.priority?(Ua.add(e),ze.onStart(Px)):(Jy(e),ze(jh))},advance:jh,sort(e){if(tl)ze.onFrame(()=>nl.sort(e));else{const t=Pr.indexOf(e);~t&&(Pr.splice(t,1),Zy(e))}},clear(){Pr=[],Ua.clear()}};function Px(){Ua.forEach(Jy),Ua.clear(),ze(jh)}function Jy(e){Pr.includes(e)||Zy(e)}function Zy(e){Pr.splice(Rx(Pr,t=>t.priority>e.priority),0,e)}function jh(e){const t=Fh;for(let n=0;n<Pr.length;n++){const r=Pr[n];tl=r.priority,r.idle||(Lh(r),r.advance(e),r.idle||t.push(r))}return tl=0,Fh=Pr,Fh.length=0,Pr=t,Pr.length>0}function Rx(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Nx=(e,t,n)=>Math.min(Math.max(n,e),t),Bx={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},Gr="[-+]?\\d*\\.?\\d+",rl=Gr+"%";function ol(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Mx=new RegExp("rgb"+ol(Gr,Gr,Gr)),Dx=new RegExp("rgba"+ol(Gr,Gr,Gr,Gr)),Lx=new RegExp("hsl"+ol(Gr,rl,rl)),Fx=new RegExp("hsla"+ol(Gr,rl,rl,Gr)),jx=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Vx=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ux=/^#([0-9a-fA-F]{6})$/,Hx=/^#([0-9a-fA-F]{8})$/;function Gx(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ux.exec(e))?parseInt(t[1]+"ff",16)>>>0:ii&&ii[e]!==void 0?ii[e]:(t=Mx.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|255)>>>0:(t=Dx.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|nv(t[4]))>>>0:(t=jx.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Hx.exec(e))?parseInt(t[1],16)>>>0:(t=Vx.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Lx.exec(e))?(ev(tv(t[1]),il(t[2]),il(t[3]))|255)>>>0:(t=Fx.exec(e))?(ev(tv(t[1]),il(t[2]),il(t[3]))|nv(t[4]))>>>0:null}function Vh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ev(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Vh(o,r,e+1/3),s=Vh(o,r,e),a=Vh(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Os(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function tv(e){return(parseFloat(e)%360+360)%360/360}function nv(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function il(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function rv(e){let t=Gx(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var Ha=(e,t,n)=>{if(Ae.fun(e))return e;if(Ae.arr(e))return Ha({range:e,output:t,extrapolate:n});if(Ae.str(e.output[0]))return Dh(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=$x(u,i);return qx(u,i[d],i[d+1],o[d],o[d+1],c,s,a,r.map)}};function qx(e,t,n,r,o,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(a==="identity")return u;a==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function $x(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Wx=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return Nx(0,1,o/e)},sl=1.70158,al=sl*1.525,ov=sl+1,iv=2*Math.PI/3,sv=2*Math.PI/4.5,cl=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Yx={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ov*e*e*e-sl*e*e,easeOutBack:e=>1+ov*Math.pow(e-1,3)+sl*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((al+1)*2*e-al)/2:(Math.pow(2*e-2,2)*((al+1)*(e*2-2)+al)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*iv),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*iv)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*sv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*sv)/2+1,easeInBounce:e=>1-cl(1-e),easeOutBounce:cl,easeInOutBounce:e=>e<.5?(1-cl(1-2*e))/2:(1+cl(2*e-1))/2,steps:Wx},Ga=Symbol.for("FluidValue.get"),Ps=Symbol.for("FluidValue.observers"),Rr=e=>!!(e&&e[Ga]),nr=e=>e&&e[Ga]?e[Ga]():e,av=e=>e[Ps]||null;function zx(e,t){e.eventObserved?e.eventObserved(t):e(t)}function qa(e,t){const n=e[Ps];n&&n.forEach(r=>{zx(r,t)})}var cv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Kx(this,e)}},Kx=(e,t)=>uv(e,Ga,t);function Rs(e,t){if(e[Ga]){let n=e[Ps];n||uv(e,Ps,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function $a(e,t){const n=e[Ps];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ps]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var uv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ul=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Xx=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,lv=new RegExp(`(${ul.source})(%|[a-z]+)`,"i"),Qx=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ll=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,dv=e=>{const[t,n]=Jx(e);if(!t||Mh())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&ll.test(n))return dv(n);if(n)return n}return e},Jx=e=>{const t=ll.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Uh,Zx=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,fv=e=>{Uh||(Uh=ii?new RegExp(`(${Object.keys(ii).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>nr(i).replace(ll,dv).replace(Xx,rv).replace(Uh,rv)),n=t.map(i=>i.match(ul).map(Number)),o=n[0].map((i,s)=>n.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>Ha({...e,output:i}));return i=>{var c;const s=!lv.test(t[0])&&((c=t.find(u=>lv.test(u)))==null?void 0:c.replace(ul,""));let a=0;return t[0].replace(ul,()=>`${o[a++](i)}${s||""}`).replace(Qx,Zx)}},Hh="react-spring: ",hv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Hh}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ek=hv(console.warn);function tk(){ek(`${Hh}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var nk=hv(console.warn);function rk(){nk(`${Hh}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 dl(e){return Ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!Mh()&&ll.test(e)||e in(ii||{}))}var Gh=Mh()?k.useEffect:k.useLayoutEffect,ok=()=>{const e=k.useRef(!1);return Gh(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function pv(){const e=k.useState()[1],t=ok();return()=>{t.current&&e(Math.random())}}function ik(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&sk(t,i.inputs)||(i={inputs:t,result:e()}):i=n,k.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function sk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var mv=e=>k.useEffect(e,ak),ak=[];function gv(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var Wa=Symbol.for("Animated:node"),ck=e=>!!e&&e[Wa]===e,io=e=>e&&e[Wa],qh=(e,t)=>kx(e,Wa,t),fl=e=>e&&e[Wa]&&e[Wa].getPayload(),yv=class{constructor(){qh(this,this)}getPayload(){return this.payload||[]}},Ya=class extends yv{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ae.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ya(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ae.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},za=class extends Ya{constructor(e){super(0),this._string=null,this._toString=Ha({output:[e,e]})}static create(e){return new za(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ae.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ha({output:[this.getValue(),e]})),this._value=0,super.reset()}},hl={dependencies:null},pl=class extends yv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return oo(this.source,(n,r)=>{ck(n)?t[r]=n.getValue(e):Rr(n)?t[r]=nr(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ut(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return oo(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){hl.dependencies&&Rr(e)&&hl.dependencies.add(e);const t=fl(e);t&&ut(t,n=>this.add(n))}},vv=class extends pl{constructor(e){super(e)}static create(e){return new vv(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(uk)),!0)}};function uk(e){return(dl(e)?za:Ya).create(e)}function $h(e){const t=io(e);return t?t.constructor:Ae.arr(e)?vv:dl(e)?za:Ya}var wv=(e,t)=>{const n=!Ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,o)=>{const i=k.useRef(null),s=n&&k.useCallback(l=>{i.current=fk(o,l)},[o]),[a,c]=dk(r,t),u=pv(),d=()=>{const l=i.current;if(n&&!l)return;(l?t.applyAnimatedValues(l,a.getValue(!0)):!1)===!1&&u()},h=new lk(d,c),f=k.useRef();Gh(()=>(f.current=h,ut(c,l=>Rs(l,h)),()=>{f.current&&(ut(f.current.deps,l=>$a(l,f.current)),ze.cancel(f.current.update))})),k.useEffect(d,[]),mv(()=>()=>{const l=f.current;ut(l.deps,m=>$a(m,l))});const p=t.getComponentProps(a.getValue());return ue.createElement(e,{...p,ref:s})})},lk=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&ze.write(this.update)}};function dk(e,t){const n=new Set;return hl.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new pl(e),hl.dependencies=null,[e,n]}function fk(e,t){return e&&(Ae.fun(e)?e(t):e.current=t),t}var bv=Symbol.for("AnimatedComponent"),hk=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new pl(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=s=>{const a=Ev(s)||"Anonymous";return Ae.str(s)?s=i[s]||(i[s]=wv(s,o)):s=s[bv]||(s[bv]=wv(s,o)),s.displayName=`Animated(${a})`,s};return oo(e,(s,a)=>{Ae.arr(e)&&(a=Ev(s)),i[a]=i(s)}),{animated:i}},Ev=e=>Ae.str(e)?e:e&&Ae.str(e.displayName)?e.displayName:Ae.fun(e)&&e.name||null;function Pi(e,...t){return Ae.fun(e)?e(...t):e}var Ka=(e,t)=>e===!0||!!(t&&e&&(Ae.fun(e)?e(t):vr(e).includes(t))),Cv=(e,t)=>Ae.obj(e)?t&&e[t]:e,_v=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,pk=e=>e,Wh=(e,t=pk)=>{let n=mk;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);Ae.und(i)||(r[o]=i)}return r},mk=["config","onProps","onStart","onChange","onPause","onResume","onRest"],gk={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 yk(e){const t={};let n=0;if(oo(e,(r,o)=>{gk[o]||(t[o]=r,n++)}),n)return t}function Sv(e){const t=yk(e);if(t){const n={to:t};return oo(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Xa(e){return e=nr(e),Ae.arr(e)?e.map(Xa):dl(e)?Hr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function vk(e){for(const t in e)return!0;return!1}function Yh(e){return Ae.fun(e)||Ae.arr(e)&&Ae.obj(e[0])}function wk(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function bk(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Ek={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}},zh={...Ek.default,mass:1,damping:1,easing:Yx.linear,clamp:!1},Ck=class{constructor(){this.velocity=0,Object.assign(this,zh)}};function _k(e,t,n){n&&(n={...n},Av(n,t),t={...n,...t}),Av(e,t),Object.assign(e,t);for(const s in zh)e[s]==null&&(e[s]=zh[s]);let{frequency:r,damping:o}=e;const{mass:i}=e;return Ae.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function Av(e,t){if(!Ae.und(t.decay))e.duration=void 0;else{const n=!Ae.und(t.tension)||!Ae.und(t.friction);(n||!Ae.und(t.frequency)||!Ae.und(t.damping)||!Ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Iv=[],Sk=class{constructor(){this.changed=!1,this.values=Iv,this.toValues=null,this.fromValues=Iv,this.config=new Ck,this.immediate=!1}};function Tv(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((s,a)=>{let c,u,d=Ka(n.cancel??(r==null?void 0:r.cancel),t);if(d)p();else{Ae.und(n.pause)||(o.paused=Ka(n.pause,t));let l=r==null?void 0:r.pause;l!==!0&&(l=o.paused||Ka(l,t)),c=Pi(n.delay||0,t),l?(o.resumeQueue.add(f),i.pause()):(i.resume(),f())}function h(){o.resumeQueue.add(f),o.timeouts.delete(u),u.cancel(),c=u.time-ze.now()}function f(){c>0&&!Hr.skipAnimation?(o.delayed=!0,u=ze.setTimeout(p,c),o.pauseQueue.add(h),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},s)}catch(l){a(l)}}})}var Kh=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ns(e.get()):t.every(n=>n.noop)?xv(e.get()):qr(e.get(),t.every(n=>n.finished)),xv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),qr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ns=e=>({value:e,cancelled:!0,finished:!1});function kv(e,t,n,r){const{callId:o,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=n;return!i&&e===a&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=Wh(t,(g,y)=>y==="onRest"?void 0:g);let d,h;const f=new Promise((g,y)=>(d=g,h=y)),p=g=>{const y=o<=(n.cancelId||0)&&Ns(r)||o!==n.asyncId&&qr(r,!1);if(y)throw g.result=y,h(g),g},l=(g,y)=>{const v=new Ov,b=new Pv;return(async()=>{if(Hr.skipAnimation)throw Qa(n),b.result=qr(r,!1),h(b),b;p(v);const E=Ae.obj(g)?{...g}:{...y,to:g};E.parentId=o,oo(u,(A,T)=>{Ae.und(E[T])&&(E[T]=A)});const C=await r.start(E);return p(v),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),C})()};let m;if(Hr.skipAnimation)return Qa(n),qr(r,!1);try{let g;Ae.arr(e)?g=(async y=>{for(const v of y)await l(v)})(e):g=Promise.resolve(e(l,r.stop.bind(r))),await Promise.all([g.then(d),f]),m=qr(r.get(),!0,!1)}catch(g){if(g instanceof Ov)m=g.result;else if(g instanceof Pv)m=g.result;else throw g}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?c:void 0)}return Ae.fun(s)&&ze.batchedUpdates(()=>{s(m,r,r.item)}),m})()}function Qa(e,t){ja(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ov=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.")}},Pv=class extends Error{constructor(){super("SkipAnimationSignal")}},Xh=e=>e instanceof Qh,Ak=1,Qh=class extends cv{constructor(){super(...arguments),this.id=Ak++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=io(this);return e&&e.getValue()}to(...e){return Hr.to(this,e)}interpolate(...e){return tk(),Hr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){qa(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||nl.sort(this),qa(this,{type:"priority",parent:this,priority:e})}},Ri=Symbol.for("SpringPhase"),Rv=1,Jh=2,Zh=4,ep=e=>(e[Ri]&Rv)>0,si=e=>(e[Ri]&Jh)>0,Ja=e=>(e[Ri]&Zh)>0,Nv=(e,t)=>t?e[Ri]|=Jh|Rv:e[Ri]&=~Jh,Bv=(e,t)=>t?e[Ri]|=Zh:e[Ri]&=~Zh,Ik=class extends Qh{constructor(e,t){if(super(),this.animation=new Sk,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,!Ae.und(e)||!Ae.und(t)){const n=Ae.obj(e)?{...e}:{...t,from:e};Ae.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(si(this)||this._state.asyncTo)||Ja(this)}get goal(){return nr(this.animation.to)}get velocity(){const e=io(this);return e instanceof Ya?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ep(this)}get isAnimating(){return si(this)}get isPaused(){return Ja(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,s=fl(r.to);!s&&Rr(r.to)&&(o=vr(nr(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const h=u.constructor==za?1:s?s[d].lastPosition:o[d];let f=r.immediate,p=h;if(!f){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let l=u.elapsedTime+=e;const m=r.fromValues[d],g=u.v0!=null?u.v0:u.v0=Ae.arr(i.velocity)?i.velocity[d]:i.velocity;let y;const v=i.precision||(m==h?.005:Math.min(1,Math.abs(h-m)*.001));if(Ae.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,E=Math.exp(-(1-b)*l);p=m+g/(1-b)*(1-E),f=Math.abs(u.lastPosition-p)<=v,y=g*E}else{y=u.lastVelocity==null?g:u.lastVelocity;const b=i.restVelocity||v/10,E=i.clamp?0:i.bounce,C=!Ae.und(E),A=m==h?u.v0>0:m<h;let T,x=!1;const R=1,B=Math.ceil(e/R);for(let F=0;F<B&&(T=Math.abs(y)>b,!(!T&&(f=Math.abs(h-p)<=v,f)));++F){C&&(x=p==h||p>h==A,x&&(y=-y*E,p=h));const j=-i.tension*1e-6*(p-h),G=-i.friction*.001*y,H=(j+G)/i.mass;y=y+H*R,p=p+y*R}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,l=u.elapsedTime+=e)),b=(i.progress||0)+l/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),p=m+i.easing(b)*(h-m),y=(p-u.lastPosition)/e,f=b==1}u.lastVelocity=y,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),f=!0)}s&&!s[d].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const a=io(this),c=a.getValue();if(t){const u=nr(r.to);(c!==u||n)&&!i.decay?(a.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return ze.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(si(this)){const{to:e,config:t}=this.animation;ze.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Ae.und(e)?(n=this.queue||[],this.queue=[]):n=[Ae.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Kh(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Qa(this._state,e&&this._lastCallId),ze.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Ae.obj(n)?n[t]:n,(n==null||Yh(n))&&(n=void 0),r=Ae.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ep(this)||(e.reverse&&([n,r]=[r,n]),r=nr(r),Ae.und(r)?io(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Wh(e,(s,a)=>/^on/.test(a)?Cv(s,n):s)),Lv(this,e,"onProps"),tc(this,"onProps",e,this);const o=this._prepareNode(e);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 Tv(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ja(this)||(Bv(this,!0),Va(i.pauseQueue),tc(this,"onPause",qr(this,Za(this,this.animation.to)),this))},resume:()=>{Ja(this)&&(Bv(this,!1),si(this)&&this._resume(),Va(i.resumeQueue),tc(this,"onResume",qr(this,Za(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const a=Mv(e);if(a)return this._update(a,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ns(this));const r=!Ae.und(e.to),o=!Ae.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ns(this));const{key:i,defaultProps:s,animation:a}=this,{to:c,from:u}=a;let{to:d=c,from:h=u}=e;o&&!r&&(!t.default||Ae.und(d))&&(d=h),t.reverse&&([d,h]=[h,d]);const f=!Ao(h,u);f&&(a.from=h),h=nr(h);const p=!Ao(d,c);p&&this._focus(d);const l=Yh(t.to),{config:m}=a,{decay:g,velocity:y}=m;(r||o)&&(m.velocity=0),t.config&&!l&&_k(m,Pi(t.config,i),t.config!==s.config?Pi(s.config,i):void 0);let v=io(this);if(!v||Ae.und(d))return n(qr(this,!0));const b=Ae.und(t.reset)?o&&!t.default:!Ae.und(h)&&Ka(t.reset,i),E=b?h:this.get(),C=Xa(d),A=Ae.num(C)||Ae.arr(C)||dl(C),T=!l&&(!A||Ka(s.immediate||t.immediate,i));if(p){const F=$h(d);if(F!==v.constructor)if(T)v=this._set(C);else throw Error(`Cannot animate between ${v.constructor.name} and ${F.name}, as the "to" prop suggests`)}const x=v.constructor;let R=Rr(d),B=!1;if(!R){const F=b||!ep(this)&&f;(p||F)&&(B=Ao(Xa(E),C),R=!B),(!Ao(a.immediate,T)&&!T||!Ao(m.decay,g)||!Ao(m.velocity,y))&&(R=!0)}if(B&&si(this)&&(a.changed&&!b?R=!0:R||this._stop(c)),!l&&((R||Rr(c))&&(a.values=v.getPayload(),a.toValues=Rr(d)?null:x==za?[1]:vr(C)),a.immediate!=T&&(a.immediate=T,!T&&!b&&this._set(c)),R)){const{onRest:F}=a;ut(xk,G=>Lv(this,t,G));const j=qr(this,Za(this,c));Va(this._pendingCalls,j),this._pendingCalls.add(n),a.changed&&ze.batchedUpdates(()=>{var G;a.changed=!b,F==null||F(j,this),b?Pi(s.onRest,j):(G=a.onStart)==null||G.call(a,j,this)})}b&&this._set(E),l?n(kv(t.to,t,this._state,this)):R?this._start():si(this)&&!p?this._pendingCalls.add(n):n(xv(E))}_focus(e){const t=this.animation;e!==t.to&&(av(this)&&this._detach(),t.to=e,av(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Rr(t)&&(Rs(t,this),Xh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Rr(e)&&$a(e,this)}_set(e,t=!0){const n=nr(e);if(!Ae.und(n)){const r=io(this);if(!r||!Ao(n,r.getValue())){const o=$h(n);!r||r.constructor!=o?qh(this,o.create(n)):r.setValue(n),r&&ze.batchedUpdates(()=>{this._onChange(n,t)})}}return io(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,tc(this,"onStart",qr(this,Za(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Pi(this.animation.onChange,e,this)),Pi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;io(this).reset(nr(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),si(this)||(Nv(this,!0),Ja(this)||this._resume())}_resume(){Hr.skipAnimation?this.finish():nl.start(this)}_stop(e,t){if(si(this)){Nv(this,!1);const n=this.animation;ut(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),qa(this,{type:"idle",parent:this});const r=t?Ns(this.get()):qr(this.get(),Za(this,e??n.to));Va(this._pendingCalls,r),n.changed&&(n.changed=!1,tc(this,"onRest",r,this))}}};function Za(e,t){const n=Xa(t),r=Xa(e.get());return Ao(r,n)}function Mv(e,t=e.loop,n=e.to){const r=Pi(t);if(r){const o=r!==!0&&Sv(r),i=(o||e).reverse,s=!o||o.reset;return ec({...e,loop:t,default:!1,pause:void 0,to:!i||Yh(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function ec(e){const{to:t,from:n}=e=Sv(e),r=new Set;return Ae.obj(t)&&Dv(t,r),Ae.obj(n)&&Dv(n,r),e.keys=r.size?Array.from(r):null,e}function Tk(e){const t=ec(e);return Ae.und(t.default)&&(t.default=Wh(t)),t}function Dv(e,t){oo(e,(n,r)=>n!=null&&t.add(r))}var xk=["onStart","onRest","onChange","onPause","onResume"];function Lv(e,t,n){e.animation[n]=t[n]!==_v(t,n)?Cv(t[n],e.key):void 0}function tc(e,t,...n){var r,o,i,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(i=e.defaultProps)[t])==null||s.call(i,...n)}var kk=["onStart","onChange","onRest"],Ok=1,Pk=class{constructor(e,t){this.id=Ok++,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),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];Ae.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ec(e)),this}start(e){let{queue:t}=this;return e?t=vr(e).map(ec):this.queue=[],this._flush?this._flush(this,t):(Gv(this,t),tp(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ut(vr(t),r=>n[r].stop(!!e))}else Qa(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(Ae.und(e))this.start({pause:!0});else{const t=this.springs;ut(vr(e),n=>t[n].pause())}return this}resume(e){if(Ae.und(e))this.start({pause:!1});else{const t=this.springs;ut(vr(e),n=>t[n].resume())}return this}each(e){oo(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,ja(e,([a,c])=>{c.value=this.get(),a(c,this,this._item)}));const i=!r&&this._started,s=o||i&&n.size?this.get():null;o&&t.size&&ja(t,([a,c])=>{c.value=s,a(c,this,this._item)}),i&&(this._started=!1,ja(n,([a,c])=>{c.value=s,a(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;ze.onFrame(this._onFrame)}};function tp(e,t){return Promise.all(t.map(n=>Fv(e,n))).then(n=>Kh(e,n))}async function Fv(e,t,n){const{keys:r,to:o,from:i,loop:s,onRest:a,onResolve:c}=t,u=Ae.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=Ae.arr(o)||Ae.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ut(kk,m=>{const g=t[m];if(Ae.fun(g)){const y=e._events[m];t[m]=({finished:v,cancelled:b})=>{const E=y.get(g);E?(v||(E.finished=!1),b&&(E.cancelled=!0)):y.set(g,{value:null,finished:v||!1,cancelled:b||!1})},u&&(u[m]=t[m])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,Va(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),p=t.cancel===!0||_v(t,"cancel")===!0;(d||p&&h.asyncId)&&f.push(Tv(++e._lastAsyncId,{props:t,state:h,actions:{pause:Bh,resume:Bh,start(m,g){p?(Qa(h,e._lastAsyncId),g(Ns(e))):(m.onRest=a,g(kv(d,m,h,e)))}}})),h.paused&&await new Promise(m=>{h.resumeQueue.add(m)});const l=Kh(e,await Promise.all(f));if(s&&l.finished&&!(n&&l.noop)){const m=Mv(t,s,o);if(m)return Gv(e,[m]),Fv(e,m,!0)}return c&&ze.batchedUpdates(()=>c(l,e,e.item)),l}function jv(e,t){const n={...e.springs};return t&&ut(vr(t),r=>{Ae.und(r.keys)&&(r=ec(r)),Ae.obj(r.to)||(r={...r,to:void 0}),Hv(n,r,o=>Uv(o))}),Vv(e,n),n}function Vv(e,t){oo(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Rs(n,e))})}function Uv(e,t){const n=new Ik;return n.key=e,t&&Rs(n,t),n}function Hv(e,t,n){t.keys&&ut(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Gv(e,t){ut(t,n=>{Hv(e.springs,n,r=>Uv(r,e))})}var ml=({children:e,...t})=>{const n=k.useContext(gl),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=ik(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=gl;return ue.createElement(i,{value:t},e)},gl=Rk(ml,{});ml.Provider=gl.Provider,ml.Consumer=gl.Consumer;function Rk(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Nk=()=>{const e=[],t=function(r){rk();const o=[];return ut(e,(i,s)=>{if(Ae.und(r))o.push(i.start());else{const a=n(r,i,s);a&&o.push(i.start(a))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return ut(e,r=>r.pause(...arguments)),this},t.resume=function(){return ut(e,r=>r.resume(...arguments)),this},t.set=function(r){ut(e,(o,i)=>{const s=Ae.fun(r)?r(i,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return ut(e,(i,s)=>{if(Ae.und(r))o.push(i.start());else{const a=this._getProps(r,i,s);a&&o.push(i.start(a))}}),o},t.stop=function(){return ut(e,r=>r.stop(...arguments)),this},t.update=function(r){return ut(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return Ae.fun(r)?r(i,o):r};return t._getProps=n,t};function Bk(e,t,n){const r=Ae.fun(t)&&t;r&&!n&&(n=[]);const o=k.useMemo(()=>r||arguments.length==3?Nk():void 0,[]),i=k.useRef(0),s=pv(),a=k.useMemo(()=>({ctrls:[],queue:[],flush(y,v){const b=jv(y,v);return i.current>0&&!a.queue.length&&!Object.keys(b).some(C=>!y.springs[C])?tp(y,v):new Promise(C=>{Vv(y,b),a.queue.push(()=>{C(tp(y,v))}),s()})}}),[]),c=k.useRef([...a.ctrls]),u=[],d=gv(e)||0;k.useMemo(()=>{ut(c.current.slice(e,d),y=>{wk(y,o),y.stop(!0)}),c.current.length=e,h(d,e)},[e]),k.useMemo(()=>{h(0,Math.min(d,e))},n);function h(y,v){for(let b=y;b<v;b++){const E=c.current[b]||(c.current[b]=new Pk(null,a.flush)),C=r?r(b,E):t[b];C&&(u[b]=Tk(C))}}const f=c.current.map((y,v)=>jv(y,u[v])),p=k.useContext(ml),l=gv(p),m=p!==l&&vk(p);Gh(()=>{i.current++,a.ctrls=c.current;const{queue:y}=a;y.length&&(a.queue=[],ut(y,v=>v())),ut(c.current,(v,b)=>{o==null||o.add(v),m&&v.start({default:p});const E=u[b];E&&(bk(v,E.ref),v.ref?v.queue.push(E):v.start(E))})}),mv(()=>()=>{ut(a.ctrls,y=>y.stop(!0))});const g=f.map(y=>({...y}));return o?[g,o]:g}function Mk(e,t){const n=Ae.fun(e),[[r],o]=Bk(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,o]:r}var Dk=class extends Qh{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ha(...t);const n=this._get(),r=$h(n);qh(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Ao(t,n)||(io(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&qv(this._active)&&np(this)}_get(){const e=Ae.arr(this.source)?this.source.map(nr):vr(nr(this.source));return this.calc(...e)}_start(){this.idle&&!qv(this._active)&&(this.idle=!1,ut(fl(this),e=>{e.done=!1}),Hr.skipAnimation?(ze.batchedUpdates(()=>this.advance()),np(this)):nl.start(this))}_attach(){let e=1;ut(vr(this.source),t=>{Rr(t)&&Rs(t,this),Xh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ut(vr(this.source),e=>{Rr(e)&&$a(e,this)}),this._active.clear(),np(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=vr(this.source).reduce((t,n)=>Math.max(t,(Xh(n)?n.priority:0)+1),0))}};function Lk(e){return e.idle!==!1}function qv(e){return!e.size||Array.from(e).every(Lk)}function np(e){e.idle||(e.idle=!0,ut(fl(e),t=>{t.done=!0}),qa(e,{type:"idle",parent:e}))}Hr.assign({createStringInterpolator:fv,to:(e,t)=>new Dk(e,t)});var $v=/^--/;function Fk(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!$v.test(e)&&!(nc.hasOwnProperty(e)&&nc[e])?t+"px":(""+t).trim()}var Wv={};function jk(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:s,viewBox:a,...c}=t,u=Object.values(c),d=Object.keys(c).map(h=>n||e.hasAttribute(h)?h:Wv[h]||(Wv[h]=h.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));o!==void 0&&(e.textContent=o);for(const h in r)if(r.hasOwnProperty(h)){const f=Fk(h,r[h]);$v.test(h)?e.style.setProperty(h,f):e.style[h]=f}d.forEach((h,f)=>{e.setAttribute(h,u[f])}),i!==void 0&&(e.scrollTop=i),s!==void 0&&(e.scrollLeft=s),a!==void 0&&e.setAttribute("viewBox",a)}var nc={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},Vk=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Uk=["Webkit","Ms","Moz","O"];nc=Object.keys(nc).reduce((e,t)=>(Uk.forEach(n=>e[Vk(n,t)]=e[t]),e),nc);var Hk=/^(matrix|translate|scale|rotate|skew)/,Gk=/^(translate)/,qk=/^(rotate|skew)/,rp=(e,t)=>Ae.num(e)&&e!==0?e+t:e,yl=(e,t)=>Ae.arr(e)?e.every(n=>yl(n,t)):Ae.num(e)?e===t:parseFloat(e)===t,$k=class extends pl{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(s=>[`translate3d(${s.map(a=>rp(a,"px")).join(",")})`,yl(s,0)])),oo(r,(s,a)=>{if(a==="transform")o.push([s||""]),i.push(c=>[c,c===""]);else if(Hk.test(a)){if(delete r[a],Ae.und(s))return;const c=Gk.test(a)?"px":qk.test(a)?"deg":"";o.push(vr(s)),i.push(a==="rotate3d"?([u,d,h,f])=>[`rotate3d(${u},${d},${h},${rp(f,c)})`,yl(f,0)]:u=>[`${a}(${u.map(d=>rp(d,c)).join(",")})`,yl(u,a.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new Wk(o,i)),super(r)}},Wk=class extends cv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ut(this.inputs,(n,r)=>{const o=nr(n[0]),[i,s]=this.transforms[r](Ae.arr(o)?o:n.map(nr));e+=" "+i,t=t&&s}),t?"none":e}observerAdded(e){e==1&&ut(this.inputs,t=>ut(t,n=>Rr(n)&&Rs(n,this)))}observerRemoved(e){e==0&&ut(this.inputs,t=>ut(t,n=>Rr(n)&&$a(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),qa(this,e)}},Yk=["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"];Hr.assign({batchedUpdates:qi.unstable_batchedUpdates,createStringInterpolator:fv,colors:Bx});var zk=hk(Yk,{applyAnimatedValues:jk,createAnimatedStyle:e=>new $k(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Kk=zk.animated;function vl(e){const{rows:t}=e,n=Mk({from:{opacity:0},to:{opacity:1}});return w.jsxs(Kk.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,o)=>w.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),w.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Yv({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const o=k.useRef(null),[i,s]=k.useState(0),[a,c]=k.useState(r),u=a&&k.Children.count(e)>n?n:k.Children.count(e);k.useEffect(()=>{o.current&&(i?a?o.current.style.marginBottom=`-${i-(i/u+(u-1)*(t??i/u/7.5))}px`:o.current.style.marginBottom="unset":s(o.current.offsetHeight))},[a,i]);const d=f=>(100-(u-1-f))/100,h=f=>f*(i/u-(t??i/u/7.5));return w.jsx("div",{ref:o,className:"hover:cursor-pointer",onClick:()=>u>1&&c(!a),children:k.Children.map(k.Children.toArray(e).slice(-1*u),(f,p)=>w.jsx("div",{className:`${!a&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:a&&u>1?`scaleX(${d(p)}) translateY(-${h(p)}px)`:void 0},children:f}))})}const Xk=xs("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),Qk=xs("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),Jk=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:o="md"})=>{const i=t,[s,a]=k.useState(r),[c,u]=k.useState(!1),d=()=>{i||(a(!s),n&&n())},h=()=>{t||u(!0)},f=()=>{u(!1)},p=Ln("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":s&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!s&&!t,"bg-core-gray-100":t},Qk({size:o})),l=o==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return w.jsxs("div",{className:`inline-flex items-center py-1 ${i?"pointer-events-none":"cursor-pointer "}`,onClick:d,onFocus:h,children:[w.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:s,disabled:i,onBlur:f,onChange:d,onFocus:h}),w.jsx("div",{className:p,children:w.jsx("div",{className:Ln(Xk({size:o}),`${s?l:""} ${i?"shadow-none":"shadow-xs"}`)})})]})},op=({id:e,children:t,size:n="md",description:r,toggleLeft:o=!0,disabled:i,helperText:s,defaultChecked:a=!1,label:c,required:u=!1,tooltip:d,onChange:h})=>{const f=k.useId(),p=e??f;return w.jsxs("div",{className:`flex ${o?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[w.jsx(Jk,{disabled:i,defaultChecked:a,id:p,size:n,onChange:h}),t||(c||r||d||s)&&w.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[w.jsx(qn,{className:Ln("font-normal"),description:r,required:u,tooltip:d,htmlFor:p,disabled:i,children:c}),w.jsx(qn.Helper,{disabled:i,helperText:s})]})]})};op.displayName="Switch";const zv=k.createContext(null);function Zk(e=!1){const t=k.useContext(zv);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const Kv=k.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:o,helperText:i,id:s,label:a,required:c,tooltip:u},d)=>{const h=k.useId(),f=s??h,p=a??r??u??i?w.jsxs("div",{className:"inline-flex flex-col",children:[w.jsx(qn,{className:"cursor-default",description:r,required:c,tooltip:u,htmlFor:f,disabled:o,children:a}),w.jsx(qn.Helper,{disabled:o,helperText:i})]}):null;return w.jsx(zv.Provider,{value:{disabled:o,toggleLeft:e,size:t},children:w.jsxs("div",{ref:d,"aria-describedby":i?`${f}__describer`:void 0,"aria-labelledby":a?`${f}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[a??i??r??u?w.jsx("div",{className:"flex flex-col",children:p}):null,n?w.jsx("div",{className:Ln("flex flex-col gap-2"),children:n}):null]})})});Kv.displayName="SwitchGroup",Object.assign(Kv,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=Zk(),{disabled:o,size:i,toggleLeft:s}=r??{};return w.jsx(op,{toggleLeft:s,disabled:e??o,label:t,defaultChecked:n,size:i})}});const eO=({children:e})=>w.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:e}),tO=({id:e,label:t,icon:n,pathname:r,activeTab:o,setActiveTab:i})=>w.jsx(Iy,{className:"flex flex-grow items-center",to:r??"",children:w.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===e?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>i(e),children:[w.jsx(Pn,{icon:n,className:"mr-2",variant:o===e?"discovery":"secondary"}),t]})});function Ni({onSubmit:e,children:t}){const n=r=>{r.preventDefault(),e&&e(r)};return w.jsx("form",{onSubmit:n,children:t})}var Xv={},rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.compactObject=ew,rr.deprecated=lO;var nO=rr.detectBrowser=dO;rr.disableLog=aO,rr.disableWarnings=cO,rr.extractVersion=wl,rr.filterStats=fO,rr.log=uO,rr.walkStats=bl,rr.wrapPeerConnectionEvent=sO;function rO(e,t,n){return t=oO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oO(e){var t=iO(e,"string");return ai(t)=="symbol"?t:t+""}function iO(e,t){if(ai(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ai(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}var Qv=!0,Jv=!0;function wl(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function sO(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(s,a){if(s!==t)return o.apply(this,arguments);var c=function(d){var h=n(d);h&&(a.handleEvent?a.handleEvent(h):a(h))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(a,c),o.apply(this,[s,c])};var i=r.removeEventListener;r.removeEventListener=function(s,a){if(s!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(a))return i.apply(this,arguments);var c=this._eventMap[t].get(a);return this._eventMap[t].delete(a),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,i.apply(this,[s,c])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(a){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),a&&this.addEventListener(t,this["_on"+t]=a)},enumerable:!0,configurable:!0})}}function aO(e){return typeof e!="boolean"?new Error("Argument type: "+ai(e)+". Please use a boolean."):(Qv=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function cO(e){return typeof e!="boolean"?new Error("Argument type: "+ai(e)+". Please use a boolean."):(Jv=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function uO(){if((typeof window>"u"?"undefined":ai(window))==="object"){if(Qv)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function lO(e,t){Jv&&console.warn(e+" is deprecated, please use "+t+" instead.")}function dO(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.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)t.browser="firefox",t.version=wl(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=wl(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=wl(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function ew(e){return Zv(e)?Object.keys(e).reduce(function(t,n){var r=Zv(e[n]),o=r?ew(e[n]):e[n],i=r&&!Object.keys(o).length;return o===void 0||i?t:Object.assign(t,rO({},n,o))},{}):e}function bl(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?bl(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(o){bl(e,e.get(o),n)})}))}function fO(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(t===null)return o;var i=[];return e.forEach(function(s){s.type==="track"&&s.trackIdentifier===t.id&&i.push(s)}),i.forEach(function(s){e.forEach(function(a){a.type===r&&a.trackId===s.id&&bl(e,a,o)})}),o}Object.defineProperty(Xv,"__esModule",{value:!0});var hO=Xv.shimGetUserMedia=gO,pO=mO(rr);function tw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(tw=function(o){return o?n:t})(e)}function mO(e,t){if(e&&e.__esModule)return e;if(e===null||ci(e)!="object"&&typeof e!="function")return{default:e};var n=tw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}var nw=pO.log;function gO(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(u){if(ci(u)!=="object"||u.mandatory||u.optional)return u;var d={};return Object.keys(u).forEach(function(h){if(!(h==="require"||h==="advanced"||h==="mediaSource")){var f=ci(u[h])==="object"?u[h]:{ideal:u[h]};f.exact!==void 0&&typeof f.exact=="number"&&(f.min=f.max=f.exact);var p=function(g,y){return g?g+y.charAt(0).toUpperCase()+y.slice(1):y==="deviceId"?"sourceId":y};if(f.ideal!==void 0){d.optional=d.optional||[];var l={};typeof f.ideal=="number"?(l[p("min",h)]=f.ideal,d.optional.push(l),l={},l[p("max",h)]=f.ideal,d.optional.push(l)):(l[p("",h)]=f.ideal,d.optional.push(l))}f.exact!==void 0&&typeof f.exact!="number"?(d.mandatory=d.mandatory||{},d.mandatory[p("",h)]=f.exact):["min","max"].forEach(function(m){f[m]!==void 0&&(d.mandatory=d.mandatory||{},d.mandatory[p(m,h)]=f[m])})}}),u.advanced&&(d.optional=(d.optional||[]).concat(u.advanced)),d},o=function(u,d){if(t.version>=61)return d(u);if(u=JSON.parse(JSON.stringify(u)),u&&ci(u.audio)==="object"){var h=function(g,y,v){y in g&&!(v in g)&&(g[v]=g[y],delete g[y])};u=JSON.parse(JSON.stringify(u)),h(u.audio,"autoGainControl","googAutoGainControl"),h(u.audio,"noiseSuppression","googNoiseSuppression"),u.audio=r(u.audio)}if(u&&ci(u.video)==="object"){var f=u.video.facingMode;f=f&&(ci(f)==="object"?f:{ideal:f});var p=t.version<66;if(f&&(f.exact==="user"||f.exact==="environment"||f.ideal==="user"||f.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!p)){delete u.video.facingMode;var l;if(f.exact==="environment"||f.ideal==="environment"?l=["back","rear"]:(f.exact==="user"||f.ideal==="user")&&(l=["front"]),l)return n.mediaDevices.enumerateDevices().then(function(m){m=m.filter(function(y){return y.kind==="videoinput"});var g=m.find(function(y){return l.some(function(v){return y.label.toLowerCase().includes(v)})});return!g&&m.length&&l.includes("back")&&(g=m[m.length-1]),g&&(u.video.deviceId=f.exact?{exact:g.deviceId}:{ideal:g.deviceId}),u.video=r(u.video),nw("chrome: "+JSON.stringify(u)),d(u)})}u.video=r(u.video)}return nw("chrome: "+JSON.stringify(u)),d(u)},i=function(u){return t.version>=64?u:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[u.name]||u.name,message:u.message,constraint:u.constraint||u.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},s=function(u,d,h){o(u,function(f){n.webkitGetUserMedia(f,d,function(p){h&&h(i(p))})})};if(n.getUserMedia=s.bind(n),n.mediaDevices.getUserMedia){var a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(c){return o(c,function(u){return a(u).then(function(d){if(u.audio&&!d.getAudioTracks().length||u.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(function(h){h.stop()}),new DOMException("","NotFoundError");return d},function(d){return Promise.reject(i(d))})})}}}}var rw={};Object.defineProperty(rw,"__esModule",{value:!0});var yO=rw.shimGetUserMedia=bO,vO=wO(rr);function ow(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ow=function(o){return o?n:t})(e)}function wO(e,t){if(e&&e.__esModule)return e;if(e===null||Bs(e)!="object"&&typeof e!="function")return{default:e};var n=ow(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Bs(e){"@babel/helpers - typeof";return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function bO(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(c,u,d){vO.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(c).then(u,d)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var o=function(u,d,h){d in u&&!(h in u)&&(u[h]=u[d],delete u[d])},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(c){return Bs(c)==="object"&&Bs(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 s=r.prototype.getSettings;r.prototype.getSettings=function(){var c=s.apply(this,arguments);return o(c,"mozAutoGainControl","autoGainControl"),o(c,"mozNoiseSuppression","noiseSuppression"),c}}if(r&&r.prototype.applyConstraints){var a=r.prototype.applyConstraints;r.prototype.applyConstraints=function(c){return this.kind==="audio"&&Bs(c)==="object"&&(c=JSON.parse(JSON.stringify(c)),o(c,"autoGainControl","mozAutoGainControl"),o(c,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[c])}}}}var so={};Object.defineProperty(so,"__esModule",{value:!0}),so.shimAudioContext=OO,so.shimCallbacksAPI=AO,so.shimConstraints=aw,so.shimCreateOfferLegacy=kO;var EO=so.shimGetUserMedia=IO;so.shimLocalStreamsAPI=_O,so.shimRTCIceServerUrls=TO,so.shimRemoteStreamsAPI=SO,so.shimTrackEventTransceiver=xO;var iw=CO(rr);function sw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sw=function(o){return o?n:t})(e)}function CO(e,t){if(e&&e.__esModule)return e;if(e===null||ui(e)!="object"&&typeof e!="function")return{default:e};var n=sw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function _O(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.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 t.call(o,i,r)}),r.getVideoTracks().forEach(function(i){return t.call(o,i,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var o=this,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return s&&s.forEach(function(c){o._localStreams?o._localStreams.includes(c)||o._localStreams.push(c):o._localStreams=[c]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.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 s=r.getTracks();this.getSenders().forEach(function(a){s.includes(a.track)&&o.removeTrack(a)})}})}}function SO(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.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(s){if(o._remoteStreams||(o._remoteStreams=[]),!o._remoteStreams.includes(s)){o._remoteStreams.push(s);var a=new Event("addstream");a.stream=s,o.dispatchEvent(a)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.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 s=new Event("addstream");s.stream=i,r.dispatchEvent(s)}})}),t.apply(r,arguments)}}}function AO(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(u,d){var h=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[h]);return d?(f.then(u,d),Promise.resolve()):f},t.createAnswer=function(u,d){var h=arguments.length>=2?arguments[2]:arguments[0],f=r.apply(this,[h]);return d?(f.then(u,d),Promise.resolve()):f};var a=function(u,d,h){var f=o.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f};t.setLocalDescription=a,a=function(u,d,h){var f=i.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f},t.setRemoteDescription=a,a=function(u,d,h){var f=s.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f},t.addIceCandidate=a}}function IO(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(o){return r(aw(o))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(i,s,a){t.mediaDevices.getUserMedia(i).then(s,a)}).bind(t))}function aw(e){return e&&e.video!==void 0?Object.assign({},e,{video:iw.compactObject(e.video)}):e}function TO(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,o){if(r&&r.iceServers){for(var i=[],s=0;s<r.iceServers.length;s++){var a=r.iceServers[s];a.urls===void 0&&a.url?(iw.deprecated("RTCIceServer.url","RTCIceServer.urls"),a=JSON.parse(JSON.stringify(a)),a.urls=a.url,delete a.url,i.push(a)):i.push(r.iceServers[s])}r.iceServers=i}return new t(r,o)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function xO(e){ui(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function kO(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var o=this.getTransceivers().find(function(s){return s.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(s){return s.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 t.apply(this,arguments)}}function OO(e){ui(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var cw=e=>{throw TypeError(e)},uw=(e,t,n)=>t.has(e)||cw("Cannot "+n),PO=(e,t,n)=>(uw(e,t,"read from private field"),n?n.call(e):t.get(e)),RO=(e,t,n)=>t.has(e)?cw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),NO=(e,t,n,r)=>(uw(e,t,"write to private field"),t.set(e,n),n);const lw=["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 BO(e){return e.join("|")}function MO(e){const t=dw(e);let n=0,r=lw.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),i=lw[o],s=dw(i);if(s===t)return i;s<t?n=o+1:r=o-1}return"None"}function dw(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function DO(e,t){return e.Binarizer[t]}function LO(e,t){return e.CharacterSet[t]}const FO=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function jO(e){return FO[e.value]}function VO(e,t){return e.EanAddOnSymbol[t]}function UO(e,t){return e.TextMode[t]}const Ms={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 fw(e,t){return{...t,formats:BO(t.formats),binarizer:DO(e,t.binarizer),eanAddOnSymbol:VO(e,t.eanAddOnSymbol),textMode:UO(e,t.textMode),characterSet:LO(e,t.characterSet)}}function hw(e){return{...e,format:MO(e.format),eccLevel:e.eccLevel,contentType:jO(e.contentType)}}const HO={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.3.4/dist/${n[1]}/${e}`:t+e}};let pw=new WeakMap;function ip(e,t){var n;const r=pw.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const o=(n=r==null?void 0:r.moduleOverrides)!=null?n:HO,i=e({...o});return pw.set(e,{moduleOverrides:o,modulePromise:i}),i}async function GO(e,t,n=Ms){const r={...Ms,...n},o=await ip(e),{size:i}=t,s=new Uint8Array(await t.arrayBuffer()),a=o._malloc(i);o.HEAPU8.set(s,a);const c=o.readBarcodesFromImage(a,i,fw(o,r));o._free(a);const u=[];for(let d=0;d<c.size();++d)u.push(hw(c.get(d)));return u}async function qO(e,t,n=Ms){const r={...Ms,...n},o=await ip(e),{data:i,width:s,height:a,data:{byteLength:c}}=t,u=o._malloc(c);o.HEAPU8.set(i,u);const d=o.readBarcodesFromPixmap(u,s,a,fw(o,r));o._free(u);const h=[];for(let f=0;f<d.size();++f)h.push(hw(d.get(f)));return h}({...Ms,formats:[...Ms.formats]});var sp=(()=>{var e,t=typeof document<"u"&&((e=document.currentScript)==null?void 0:e.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(n={}){var r,o=n,i,s,a=new Promise((_,S)=>{i=_,s=S}),c=typeof window=="object",u=typeof Bun<"u",d=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var h=Object.assign({},o),f="./this.program",p="";function l(_){return o.locateFile?o.locateFile(_,p):p+_}var m,g;if(c||d||u){var y;d?p=self.location.href:typeof document<"u"&&((y=document.currentScript)===null||y===void 0?void 0:y.tagName.toUpperCase())==="SCRIPT"&&(p=document.currentScript.src),t&&(p=t),p.startsWith("blob:")?p="":p=p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1),d&&(g=_=>{var S=new XMLHttpRequest;return S.open("GET",_,!1),S.responseType="arraybuffer",S.send(null),new Uint8Array(S.response)}),m=_=>fetch(_,{credentials:"same-origin"}).then(S=>S.ok?S.arrayBuffer():Promise.reject(new Error(S.status+" : "+S.url)))}var v=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&&(f=o.thisProgram);var E=o.wasmBinary,C,A=!1,T,x,R,B,F,j,G,H;function P(){var _=C.buffer;o.HEAP8=T=new Int8Array(_),o.HEAP16=R=new Int16Array(_),o.HEAPU8=x=new Uint8Array(_),o.HEAPU16=B=new Uint16Array(_),o.HEAP32=F=new Int32Array(_),o.HEAPU32=j=new Uint32Array(_),o.HEAPF32=G=new Float32Array(_),o.HEAPF64=H=new Float64Array(_)}var V=[],z=[],X=[];function re(){var _=o.preRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(we)),le(V)}function oe(){le(z)}function ce(){var _=o.postRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(Ee)),le(X)}function we(_){V.unshift(_)}function de(_){z.unshift(_)}function Ee(_){X.unshift(_)}var ve=0,$=null;function W(_){var S;ve++,(S=o.monitorRunDependencies)===null||S===void 0||S.call(o,ve)}function Z(_){var S;if(ve--,(S=o.monitorRunDependencies)===null||S===void 0||S.call(o,ve),ve==0&&$){var O=$;$=null,O()}}function I(_){var S;(S=o.onAbort)===null||S===void 0||S.call(o,_),_="Aborted("+_+")",b(_),A=!0,_+=". Build with -sASSERTIONS for more info.";var O=new WebAssembly.RuntimeError(_);throw s(O),O}var L="data:application/octet-stream;base64,",U=_=>_.startsWith(L);function N(){var _="zxing_reader.wasm";return U(_)?_:l(_)}var ee;function J(_){if(_==ee&&E)return new Uint8Array(E);if(g)return g(_);throw"both async and sync fetching of the wasm failed"}function te(_){return E?Promise.resolve().then(()=>J(_)):m(_).then(S=>new Uint8Array(S),()=>J(_))}function K(_,S,O){return te(_).then(M=>WebAssembly.instantiate(M,S)).then(O,M=>{b(`failed to asynchronously prepare wasm: ${M}`),I(M)})}function me(_,S,O,M){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!U(S)&&typeof fetch=="function"?fetch(S,{credentials:"same-origin"}).then(q=>{var Q=WebAssembly.instantiateStreaming(q,O);return Q.then(M,function(ae){return b(`wasm streaming compile failed: ${ae}`),b("falling back to ArrayBuffer instantiation"),K(S,O,M)})}):K(S,O,M)}function be(){return{a:qL}}function he(){var _,S=be();function O(q,Q){return Yt=q.exports,C=Yt.za,P(),Qb=Yt.Da,de(Yt.Aa),Z(),Yt}W();function M(q){O(q.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(S,O)}catch(q){b(`Module.instantiateWasm callback failed with error: ${q}`),s(q)}return(_=ee)!==null&&_!==void 0||(ee=N()),me(E,ee,S,M).catch(s),{}}var le=_=>{_.forEach(S=>S(o))};o.noExitRuntime;var pe=_=>uE(_),ne=()=>lE(),Te=[],Ie=0,et=_=>{var S=new bt(_);return S.get_caught()||(S.set_caught(!0),Ie--),S.set_rethrown(!1),Te.push(S),fE(_),aE(_)},Ke=0,Pt=()=>{st(0,0);var _=Te.pop();dE(_.excPtr),Ke=0};class bt{constructor(S){this.excPtr=S,this.ptr=S-24}set_type(S){j[this.ptr+4>>2]=S}get_type(){return j[this.ptr+4>>2]}set_destructor(S){j[this.ptr+8>>2]=S}get_destructor(){return j[this.ptr+8>>2]}set_caught(S){S=S?1:0,T[this.ptr+12]=S}get_caught(){return T[this.ptr+12]!=0}set_rethrown(S){S=S?1:0,T[this.ptr+13]=S}get_rethrown(){return T[this.ptr+13]!=0}init(S,O){this.set_adjusted_ptr(0),this.set_type(S),this.set_destructor(O)}set_adjusted_ptr(S){j[this.ptr+16>>2]=S}get_adjusted_ptr(){return j[this.ptr+16>>2]}}var Br=_=>{throw Ke||(Ke=_),Ke},Et=_=>cE(_),In=_=>{var S=Ke;if(!S)return Et(0),0;var O=new bt(S);O.set_adjusted_ptr(S);var M=O.get_type();if(!M)return Et(0),S;for(var q of _){if(q===0||q===M)break;var Q=O.ptr+16;if(hE(q,M,Q))return Et(q),S}return Et(M),S},Dt=()=>In([]),De=_=>In([_]),Yr=(_,S)=>In([_,S]),wn=()=>{var _=Te.pop();_||I("no exception to throw");var S=_.excPtr;throw _.get_rethrown()||(Te.push(_),_.set_rethrown(!0),_.set_caught(!1),Ie++),Ke=S,Ke},Yn=(_,S,O)=>{var M=new bt(_);throw M.init(S,O),Ke=_,Ie++,Ke},zn=()=>Ie,co=()=>{I("")},Dn={},Kn=_=>{for(;_.length;){var S=_.pop(),O=_.pop();O(S)}};function bn(_){return this.fromWireType(j[_>>2])}var on={},cr={},uo={},Fe,We=_=>{throw new Fe(_)},Ye=(_,S,O)=>{_.forEach(ie=>uo[ie]=S);function M(ie){var ye=O(ie);ye.length!==_.length&&We("Mismatched type converter count");for(var _e=0;_e<_.length;++_e)Cr(_[_e],ye[_e])}var q=new Array(S.length),Q=[],ae=0;S.forEach((ie,ye)=>{cr.hasOwnProperty(ie)?q[ye]=cr[ie]:(Q.push(ie),on.hasOwnProperty(ie)||(on[ie]=[]),on[ie].push(()=>{q[ye]=cr[ie],++ae,ae===Q.length&&M(q)}))}),Q.length===0&&M(q)},mt=_=>{var S=Dn[_];delete Dn[_];var O=S.rawConstructor,M=S.rawDestructor,q=S.fields,Q=q.map(ae=>ae.getterReturnType).concat(q.map(ae=>ae.setterArgumentType));Ye([_],Q,ae=>{var ie={};return q.forEach((ye,_e)=>{var ke=ye.fieldName,Re=ae[_e],at=ye.getter,_t=ye.getterContext,Ht=ae[_e+q.length],En=ye.setter,cn=ye.setterContext;ie[ke]={read:un=>Re.fromWireType(at(_t,un)),write:(un,Gi)=>{var Xn=[];En(cn,un,Ht.toWireType(Xn,Gi)),Kn(Xn)}}}),[{name:S.name,fromWireType:ye=>{var _e={};for(var ke in ie)_e[ke]=ie[ke].read(ye);return M(ye),_e},toWireType:(ye,_e)=>{for(var ke in ie)if(!(ke in _e))throw new TypeError(`Missing field: "${ke}"`);var Re=O();for(ke in ie)ie[ke].write(Re,_e[ke]);return ye!==null&&ye.push(M,Re),Re},argPackAdvance:Mr,readValueFromPointer:bn,destructorFunction:M}]})},$t=(_,S,O,M,q)=>{},$s=()=>{for(var _=new Array(256),S=0;S<256;++S)_[S]=String.fromCharCode(S);Hi=_},Hi,sn=_=>{for(var S="",O=_;x[O];)S+=Hi[x[O++]];return S},xo,gt=_=>{throw new xo(_)};function Fp(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var M=S.name;if(_||gt(`type "${M}" must have a positive integer typeid pointer`),cr.hasOwnProperty(_)){if(O.ignoreDuplicateRegistrations)return;gt(`Cannot register type '${M}' twice`)}if(cr[_]=S,delete uo[_],on.hasOwnProperty(_)){var q=on[_];delete on[_],q.forEach(Q=>Q())}}function Cr(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fp(_,S,O)}var Mr=8,Y=(_,S,O,M)=>{S=sn(S),Cr(_,{name:S,fromWireType:function(q){return!!q},toWireType:function(q,Q){return Q?O:M},argPackAdvance:Mr,readValueFromPointer:function(q){return this.fromWireType(x[q])},destructorFunction:null})},Ce=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),Oe=_=>{function S(O){return O.$$.ptrType.registeredClass.name}gt(S(_)+" instance already deleted")},Be=!1,yt=_=>{},kt=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},it=_=>{_.count.value-=1;var S=_.count.value===0;S&&kt(_)},nt=(_,S,O)=>{if(S===O)return _;if(O.baseClass===void 0)return null;var M=nt(_,S,O.baseClass);return M===null?null:O.downcast(M)},Tn={},Wt={},Kt=(_,S)=>{for(S===void 0&>("ptr should not be undefined");_.baseClass;)S=_.upcast(S),_=_.baseClass;return S},ur=(_,S)=>(S=Kt(_,S),Wt[S]),zr=(_,S)=>{(!S.ptrType||!S.ptr)&&We("makeClassHandle requires ptr and ptrType");var O=!!S.smartPtrType,M=!!S.smartPtr;return O!==M&&We("Both smartPtrType and smartPtr must be specified"),S.count={value:1},an(Object.create(_,{$$:{value:S,writable:!0}}))};function ko(_){var S=this.getPointee(_);if(!S)return this.destructor(_),null;var O=ur(this.registeredClass,S);if(O!==void 0){if(O.$$.count.value===0)return O.$$.ptr=S,O.$$.smartPtr=_,O.clone();var M=O.clone();return this.destructor(_),M}function q(){return this.isSmartPointer?zr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:S,smartPtrType:this,smartPtr:_}):zr(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var Q=this.registeredClass.getActualType(S),ae=Tn[Q];if(!ae)return q.call(this);var ie;this.isConst?ie=ae.constPointerType:ie=ae.pointerType;var ye=nt(S,this.registeredClass,ie.registeredClass);return ye===null?q.call(this):this.isSmartPointer?zr(ie.registeredClass.instancePrototype,{ptrType:ie,ptr:ye,smartPtrType:this,smartPtr:_}):zr(ie.registeredClass.instancePrototype,{ptrType:ie,ptr:ye})}var an=_=>typeof FinalizationRegistry>"u"?(an=S=>S,_):(Be=new FinalizationRegistry(S=>{it(S.$$)}),an=S=>{var O=S.$$,M=!!O.smartPtr;if(M){var q={$$:O};Be.register(S,q,S)}return S},yt=S=>Be.unregister(S),an(_)),pi=[],jp=()=>{for(;pi.length;){var _=pi.pop();_.$$.deleteScheduled=!1,_.delete()}},Wl,AD=()=>{Object.assign(Yl.prototype,{isAliasOf(_){if(!(this instanceof Yl)||!(_ instanceof Yl))return!1;var S=this.$$.ptrType.registeredClass,O=this.$$.ptr;_.$$=_.$$;for(var M=_.$$.ptrType.registeredClass,q=_.$$.ptr;S.baseClass;)O=S.upcast(O),S=S.baseClass;for(;M.baseClass;)q=M.upcast(q),M=M.baseClass;return S===M&&O===q},clone(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=an(Object.create(Object.getPrototypeOf(this),{$$:{value:Ce(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),yt(this),it(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),pi.push(this),pi.length===1&&Wl&&Wl(jp),this.$$.deleteScheduled=!0,this}})};function Yl(){}var yc=(_,S)=>Object.defineProperty(S,"name",{value:_}),Kb=(_,S,O)=>{if(_[S].overloadTable===void 0){var M=_[S];_[S]=function(){for(var q=arguments.length,Q=new Array(q),ae=0;ae<q;ae++)Q[ae]=arguments[ae];return _[S].overloadTable.hasOwnProperty(Q.length)||gt(`Function '${O}' called with an invalid number of arguments (${Q.length}) - expects one of (${_[S].overloadTable})!`),_[S].overloadTable[Q.length].apply(this,Q)},_[S].overloadTable=[],_[S].overloadTable[M.argCount]=M}},Vp=(_,S,O)=>{o.hasOwnProperty(_)?((O===void 0||o[_].overloadTable!==void 0&&o[_].overloadTable[O]!==void 0)&>(`Cannot register public name '${_}' twice`),Kb(o,_,_),o.hasOwnProperty(O)&>(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),o[_].overloadTable[O]=S):(o[_]=S,O!==void 0&&(o[_].numArguments=O))},ID=48,TD=57,xD=_=>{_=_.replace(/[^a-zA-Z0-9_]/g,"$");var S=_.charCodeAt(0);return S>=ID&&S<=TD?`_${_}`:_};function kD(_,S,O,M,q,Q,ae,ie){this.name=_,this.constructor=S,this.instancePrototype=O,this.rawDestructor=M,this.baseClass=q,this.getActualType=Q,this.upcast=ae,this.downcast=ie,this.pureVirtualFunctions=[]}var Up=(_,S,O)=>{for(;S!==O;)S.upcast||gt(`Expected null or instance of ${O.name}, got an instance of ${S.name}`),_=S.upcast(_),S=S.baseClass;return _};function OD(_,S){if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),0;S.$$||gt(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`);var O=S.$$.ptrType.registeredClass,M=Up(S.$$.ptr,O,this.registeredClass);return M}function PD(_,S){var O;if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),this.isSmartPointer?(O=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,O),O):0;(!S||!S.$$)&>(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&S.$$.ptrType.isConst&>(`Cannot convert argument of type ${S.$$.smartPtrType?S.$$.smartPtrType.name:S.$$.ptrType.name} to parameter type ${this.name}`);var M=S.$$.ptrType.registeredClass;if(O=Up(S.$$.ptr,M,this.registeredClass),this.isSmartPointer)switch(S.$$.smartPtr===void 0&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:S.$$.smartPtrType===this?O=S.$$.smartPtr:gt(`Cannot convert argument of type ${S.$$.smartPtrType?S.$$.smartPtrType.name:S.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:O=S.$$.smartPtr;break;case 2:if(S.$$.smartPtrType===this)O=S.$$.smartPtr;else{var q=S.clone();O=this.rawShare(O,Po.toHandle(()=>q.delete())),_!==null&&_.push(this.rawDestructor,O)}break;default:gt("Unsupporting sharing policy")}return O}function RD(_,S){if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),0;S.$$||gt(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),S.$$.ptrType.isConst&>(`Cannot convert argument of type ${S.$$.ptrType.name} to parameter type ${this.name}`);var O=S.$$.ptrType.registeredClass,M=Up(S.$$.ptr,O,this.registeredClass);return M}var ND=()=>{Object.assign(zl.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var S;(S=this.rawDestructor)===null||S===void 0||S.call(this,_)},argPackAdvance:Mr,readValueFromPointer:bn,fromWireType:ko})};function zl(_,S,O,M,q,Q,ae,ie,ye,_e,ke){this.name=_,this.registeredClass=S,this.isReference=O,this.isConst=M,this.isSmartPointer=q,this.pointeeType=Q,this.sharingPolicy=ae,this.rawGetPointee=ie,this.rawConstructor=ye,this.rawShare=_e,this.rawDestructor=ke,!q&&S.baseClass===void 0?M?(this.toWireType=OD,this.destructorFunction=null):(this.toWireType=RD,this.destructorFunction=null):this.toWireType=PD}var Xb=(_,S,O)=>{o.hasOwnProperty(_)||We("Replacing nonexistent public symbol"),o[_].overloadTable!==void 0&&O!==void 0?o[_].overloadTable[O]=S:(o[_]=S,o[_].argCount=O)},BD=(_,S,O)=>{_=_.replace(/p/g,"i");var M=o["dynCall_"+_];return M(S,...O)},Kl=[],Qb,ft=_=>{var S=Kl[_];return S||(_>=Kl.length&&(Kl.length=_+1),Kl[_]=S=Qb.get(_)),S},MD=function(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return BD(_,S,O);var M=ft(S)(...O);return M},DD=(_,S)=>function(){for(var O=arguments.length,M=new Array(O),q=0;q<O;q++)M[q]=arguments[q];return MD(_,S,M)},Kr=(_,S)=>{_=sn(_);function O(){return _.includes("j")?DD(_,S):ft(S)}var M=O();return typeof M!="function"&>(`unknown function pointer with signature ${_}: ${S}`),M},LD=(_,S)=>{var O=yc(S,function(M){this.name=S,this.message=M;var q=new Error(M).stack;q!==void 0&&(this.stack=this.toString()+`
|
|
139
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z($,W){(W==null||W>$.length)&&(W=$.length);for(var Z=0,I=new Array(W);Z<W;Z++)I[Z]=$[Z];return I}function X($){return X=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},X($)}function re($,W){var Z=Object.keys($);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols($);W&&(I=I.filter(function(L){return Object.getOwnPropertyDescriptor($,L).enumerable})),Z.push.apply(Z,I)}return Z}function oe($,W){for(var Z=0;Z<W.length;Z++){var I=W[Z];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty($,we(I.key),I)}}function ce($,W,Z){return(W=we(W))in $?Object.defineProperty($,W,{value:Z,enumerable:!0,configurable:!0,writable:!0}):$[W]=Z,$}function we($){var W=function(Z,I){if(X(Z)!="object"||!Z)return Z;var L=Z[Symbol.toPrimitive];if(L!==void 0){var U=L.call(Z,I);if(X(U)!="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}($,"string");return X(W)=="symbol"?W:W+""}var de=function(){return $=function I(L,U){var N=this;if(function(le,pe){if(!(le instanceof pe))throw new TypeError("Cannot call a class as a function")}(this,I),ce(this,"input",void 0),ce(this,"options",void 0),ce(this,"utilities",void 0),ce(this,"caretPosition",void 0),ce(this,"caretPositionEnd",void 0),ce(this,"keyboardDOM",void 0),ce(this,"keyboardPluginClasses",void 0),ce(this,"keyboardDOMClass",void 0),ce(this,"buttonElements",void 0),ce(this,"currentInstanceName",void 0),ce(this,"allKeyboardInstances",void 0),ce(this,"keyboardInstanceNames",void 0),ce(this,"isFirstKeyboardInstance",void 0),ce(this,"physicalKeyboard",void 0),ce(this,"modules",void 0),ce(this,"activeButtonClass",void 0),ce(this,"holdInteractionTimeout",void 0),ce(this,"holdTimeout",void 0),ce(this,"isMouseHold",void 0),ce(this,"initialized",void 0),ce(this,"candidateBox",void 0),ce(this,"keyboardRowsDOM",void 0),ce(this,"defaultName","default"),ce(this,"activeInputElement",null),ce(this,"handleParams",function(le,pe){var ne,Te,Ie;if(typeof le=="string")ne=le.split(".").join(""),Te=document.querySelector(".".concat(ne)),Ie=pe;else if(le instanceof HTMLDivElement){if(!le.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ne=le.className.split(" ")[0],Te=le,Ie=pe}else ne="simple-keyboard",Te=document.querySelector(".".concat(ne)),Ie=le;return{keyboardDOMClass:ne,keyboardDOM:Te,options:Ie}}),ce(this,"getOptions",function(){return N.options}),ce(this,"getCaretPosition",function(){return N.caretPosition}),ce(this,"getCaretPositionEnd",function(){return N.caretPositionEnd}),ce(this,"registerModule",function(le,pe){N.modules[le]||(N.modules[le]={}),pe(N.modules[le])}),ce(this,"getKeyboardClassString",function(){for(var le=arguments.length,pe=new Array(le),ne=0;ne<le;ne++)pe[ne]=arguments[ne];return[N.keyboardDOMClass].concat(pe).filter(function(Te){return!!Te}).join(" ")}),typeof window<"u"){var ee=this.handleParams(L,U),J=ee.keyboardDOMClass,te=ee.keyboardDOM,K=ee.options,me=K===void 0?{}:K;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=te,this.options=function(le){for(var pe=1;pe<arguments.length;pe++){var ne=arguments[pe]!=null?arguments[pe]:{};pe%2?re(Object(ne),!0).forEach(function(Te){ce(le,Te,ne[Te])}):Object.getOwnPropertyDescriptors?Object.defineProperties(le,Object.getOwnPropertyDescriptors(ne)):re(Object(ne)).forEach(function(Te){Object.defineProperty(le,Te,Object.getOwnPropertyDescriptor(ne,Te))})}return le}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},me),this.keyboardPluginClasses="",E.bindMethods(I,this);var be=this.options.inputName,he=be===void 0?this.defaultName:be;if(this.input={},this.input[he]="",this.keyboardDOMClass=J,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 R({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(J,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},W=[{key:"setCaretPosition",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I;this.caretPosition=I,this.caretPositionEnd=L}},{key:"getInputCandidates",value:function(I){var L=this,U=this.options,N=U.layoutCandidates,ee=U.layoutCandidatesCaseSensitiveMatch;if(!N||X(N)!=="object")return{};var J=Object.keys(N).filter(function(me){var be=I.substring(0,L.getCaretPositionEnd()||0)||I,he=new RegExp("".concat(L.utilities.escapeRegex(me),"$"),ee?"g":"gi");return!!V(be.matchAll(he)).length});if(J.length>1){var te=J.sort(function(me,be){return be.length-me.length})[0];return{candidateKey:te,candidateValue:N[te]}}if(J.length){var K=J[0];return{candidateKey:K,candidateValue:N[K]}}return{}}},{key:"showCandidatesBox",value:function(I,L,U){var N=this;this.candidateBox&&this.candidateBox.show({candidateValue:L,targetElement:U,onSelect:function(ee,J){var te=N.options,K=te.layoutCandidatesCaseSensitiveMatch,me=te.disableCandidateNormalization,be=te.enableLayoutCandidatesKeyPress,he=ee;me||(he=ee.normalize("NFD")),typeof N.options.beforeInputUpdate=="function"&&N.options.beforeInputUpdate(N);var le=N.getInput(N.options.inputName,!0),pe=N.getCaretPositionEnd()||0,ne=le.substring(0,pe||0)||le,Te=new RegExp("".concat(N.utilities.escapeRegex(I),"$"),K?"g":"gi"),Ie=ne.replace(Te,he),et=le.replace(ne,Ie),Ke=Ie.length-ne.length,Pt=(pe||le.length)+Ke;Pt<0&&(Pt=0),N.setInput(et,N.options.inputName,!0),N.setCaretPosition(Pt),be&&typeof N.options.onKeyPress=="function"&&N.options.onKeyPress(ee,J),typeof N.options.onChange=="function"&&N.options.onChange(N.getInput(N.options.inputName,!0),J),typeof N.options.onChangeAll=="function"&&N.options.onChangeAll(N.getAllInputs(),J)}})}},{key:"handleButtonClicked",value:function(I,L){var U=this.options,N=U.inputName,ee=N===void 0?this.defaultName:N,J=U.debug;if(I!=="{//}"){this.input[ee]||(this.input[ee]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var te=this.utilities.getUpdatedInput(I,this.input[ee],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(I)&&this.activeInputElement&&this.input[ee]&&this.input[ee]===te&&this.caretPosition===0&&this.caretPositionEnd===te.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(I,L);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(I,L),this.input[ee]!==te&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(te))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,te))return;var K=this.utilities.getUpdatedInput(I,this.input[ee],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(K,this.options.inputName,!0),J&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),L==null?void 0:L.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),L),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),L),L!=null&&L.target&&this.options.enableLayoutCandidates){var me,be=this.getInputCandidates(te),he=be.candidateKey,le=be.candidateValue;he&&le?this.showCandidatesBox(he,le,this.keyboardDOM):(me=this.candidateBox)===null||me===void 0||me.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)),J&&console.log("Key pressed:",I)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(I){this.options.syncInstanceInputs?this.dispatch(function(L){L.isMouseHold=I}):this.isMouseHold=I}},{key:"handleButtonMouseDown",value:function(I,L){var U=this;L&&(this.options.preventMouseDownDefault&&L.preventDefault(),this.options.stopMouseDownPropagation&&L.stopPropagation(),L.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(){(U.getMouseHold()&&(!I.includes("{")&&!I.includes("}")||I==="{delete}"||I==="{backspace}"||I==="{bksp}"||I==="{space}"||I==="{tab}")||I==="{arrowright}"||I==="{arrowleft}"||I==="{arrowup}"||I==="{arrowdown}")&&(U.options.debug&&console.log("Button held:",I),U.handleButtonHold(I)),clearTimeout(U.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(I,L){var U=this;L&&(this.options.preventMouseUpDefault&&L.preventDefault&&L.preventDefault(),this.options.stopMouseUpPropagation&&L.stopPropagation&&L.stopPropagation(),!(L.target===this.keyboardDOM||L.target&&this.keyboardDOM.contains(L.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(L.target===this.candidateBox.candidateBoxElement||L.target&&this.candidateBox.candidateBoxElement.contains(L.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(N){N.classList.remove(U.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),I&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(I,L)}},{key:"handleKeyboardContainerMouseDown",value:function(I){this.options.preventMouseDownDefault&&I.preventDefault()}},{key:"handleButtonHold",value:function(I){var L=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){L.getMouseHold()?(L.handleButtonClicked(I),L.handleButtonHold(I)):clearTimeout(L.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var I=this;this.dispatch(function(L){L.replaceInput(I.input),L.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,L=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!L&&this.syncInstanceInputs(),this.options.rtl?""+this.input[I].replace("","").replace("","")+"":this.input[I]}},{key:"getAllInputs",value:function(){var I=this,L={};return Object.keys(this.input).forEach(function(U){L[U]=I.getInput(U,!0)}),L}},{key:"setInput",value:function(I){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,U=arguments.length>2?arguments[2]:void 0;this.input[L]=I,!U&&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]:{},L=this.changedOptions(I);this.options=Object.assign(this.options,I),L.length&&(this.options.debug&&console.log("changedOptions",L),this.onSetOptions(L),this.render())}},{key:"changedOptions",value:function(I){var L=this;return Object.keys(I).filter(function(U){return JSON.stringify(I[U])!==JSON.stringify(L.options[U])})}},{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 P({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(L){I(window.SimpleKeyboardInstances[L],L)})}},{key:"addButtonTheme",value:function(I,L){var U=this;L&&I&&(I.split(" ").forEach(function(N){L.split(" ").forEach(function(ee){U.options.buttonTheme||(U.options.buttonTheme=[]);var J=!1;U.options.buttonTheme.map(function(te){if(te!=null&&te.class.split(" ").includes(ee)){J=!0;var K=te.buttons.split(" ");K.includes(N)||(J=!0,K.push(N),te.buttons=K.join(" "))}return te}),J||U.options.buttonTheme.push({class:ee,buttons:I})})}),this.render())}},{key:"removeButtonTheme",value:function(I,L){var U=this;if(!I&&!L)return this.options.buttonTheme=[],void this.render();I&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(I.split(" ").forEach(function(N){var ee;(ee=U.options)===null||ee===void 0||(ee=ee.buttonTheme)===null||ee===void 0||ee.map(function(J,te){if(J&&L&&L.includes(J.class)||!L){var K,me,be=(K=J)===null||K===void 0?void 0:K.buttons.split(" ").filter(function(he){return he!==N});J&&be!=null&&be.length?J.buttons=be.join(" "):((me=U.options.buttonTheme)===null||me===void 0||me.splice(te,1),J=null)}return J})}),this.render())}},{key:"getButtonElement",value:function(I){var L,U=this.buttonElements[I];return U&&(L=U.length>1?U:U[0]),L}},{key:"inputPatternIsValid",value:function(I){var L,U=this.options.inputPattern;if((L=U instanceof RegExp?U:U[this.options.inputName||this.defaultName])&&I){var N=L.test(I);return this.options.debug&&console.log('inputPattern ("'.concat(L,'"): ').concat(N?"passed":"did not pass!")),N}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,L=I!==void 0&&I;document.addEventListener("keyup",this.handleKeyUp,L),document.addEventListener("keydown",this.handleKeyDown,L),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 L,U=this;I.target.tagName&&(L=I.target.tagName.toLowerCase()),this.dispatch(function(N){var ee=I.target===N.keyboardDOM||I.target&&N.keyboardDOM.contains(I.target);if(U.options.syncInstanceInputs&&Array.isArray(I.path)&&(ee=I.path.some(function(K){var me;return K==null||(me=K.hasAttribute)===null||me===void 0?void 0:me.call(K,"data-skInstance")})),(L==="textarea"||L==="input"&&["text","search","url","tel","password"].includes(I.target.type))&&!N.options.disableCaretPositioning){var J=I.target.selectionStart,te=I.target.selectionEnd;N.options.rtl&&(J=N.utilities.getRtlOffset(J,N.getInput()),te=N.utilities.getRtlOffset(te,N.getInput())),N.setCaretPosition(J,te),U.activeInputElement=I.target,N.options.debug&&console.log("Caret at: ",N.getCaretPosition(),N.getCaretPositionEnd(),I&&I.target.tagName.toLowerCase(),"(".concat(N.keyboardDOMClass,")"),I==null?void 0:I.type)}else!N.options.disableCaretPositioning&&ee||(I==null?void 0:I.type)==="selectionchange"||(N.setCaretPosition(null),U.activeInputElement=null,N.options.debug&&console.log('Caret position reset due to "'.concat(I==null?void 0:I.type,'" event'),I))})}},{key:"recurseButtons",value:function(I){var L=this;I&&Object.keys(this.buttonElements).forEach(function(U){return L.buttonElements[U].forEach(I)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var I=this.options.physicalKeyboardHighlightPreventDefault,L=I!==void 0&&I;document.removeEventListener("keyup",this.handleKeyUp,L),document.removeEventListener("keydown",this.handleKeyDown,L),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(U){U&&(U.onpointerdown=null,U.onpointerup=null,U.onpointercancel=null,U.ontouchstart=null,U.ontouchend=null,U.ontouchcancel=null,U.onclick=null,U.onmousedown=null,U.onmouseup=null,U.remove(),U=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 L=this.options.buttonTheme,U=[];return Array.isArray(L)&&L.forEach(function(N){if(N&&N.class&&typeof N.class=="string"&&N.buttons&&typeof N.buttons=="string"){var ee=N.class.split(" ");N.buttons.split(" ").includes(I)&&(U=[].concat(V(U),V(ee)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',N)}),U}},{key:"setDOMButtonAttributes",value:function(I,L){var U=this.options.buttonAttributes;Array.isArray(U)&&U.forEach(function(N){N.attribute&&typeof N.attribute=="string"&&N.value&&typeof N.value=="string"&&N.buttons&&typeof N.buttons=="string"?N.buttons.split(" ").includes(I)&&L(N.attribute,N.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',N)})}},{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(L){var U=new L(I);U.init&&U.init(I)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(I,L){return!!this.modules[I]&&this.modules[I][L]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(I,L,U,N){var ee=this,J=Array.from(I.children),te=0;return J.length&&U.forEach(function(K,me){var be=N[me];if(!(be&&be>K))return!1;var he=K-te,le=be-te,pe=document.createElement("div");pe.className+="hg-button-container";var ne="".concat(ee.options.layoutName,"-r").concat(L,"c").concat(me);pe.setAttribute("data-skUID",ne);var Te=J.splice(he,le-he+1);te=le-he,Te.forEach(function(Ie){return pe.appendChild(Ie)}),J.splice(he,0,pe),I.innerHTML="",J.forEach(function(Ie){return I.appendChild(Ie)}),ee.options.debug&&console.log("rowDOMContainer",Te,he,le,te+1)}),I}},{key:"render",value:function(){var I=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var L="hg-layout-".concat(this.options.layoutName),U=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}"]},N=this.options.useTouchEvents||!1,ee=N?"hg-touch-events":"",J=this.options.useMouseEvents||!1,te=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,L,this.keyboardPluginClasses,ee),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",U[this.options.layoutName||this.defaultName].forEach(function(K,me){var be=K.split(" ");I.options.excludeFromLayout&&I.options.excludeFromLayout[I.options.layoutName||I.defaultName]&&(be=be.filter(function(ne){return I.options.excludeFromLayout&&!I.options.excludeFromLayout[I.options.layoutName||I.defaultName].includes(ne)}));var he=document.createElement("div");he.className+="hg-row";var le=[],pe=[];be.forEach(function(ne,Te){var Ie,et=!te&&typeof ne=="string"&&ne.length>1&&ne.indexOf("[")===0,Ke=!te&&typeof ne=="string"&&ne.length>1&&ne.indexOf("]")===ne.length-1;et&&(le.push(Te),ne=ne.replace(/\[/g,"")),Ke&&(pe.push(Te),ne=ne.replace(/\]/g,""));var Pt=I.utilities.getButtonClass(ne),bt=I.utilities.getButtonDisplayName(ne,I.options.display,I.options.mergeDisplay),Br=I.options.useButtonTag?"button":"div",Et=document.createElement(Br);Et.className+="hg-button ".concat(Pt),(Ie=Et.classList).add.apply(Ie,V(I.getButtonThemeClasses(ne))),I.setDOMButtonAttributes(ne,function(De,Yr){Et.setAttribute(De,Yr)}),I.activeButtonClass="hg-activeButton",!I.utilities.pointerEventsSupported()||N||J?N?(Et.ontouchstart=function(De){I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.ontouchend=function(De){I.handleButtonMouseUp(ne,De)},Et.ontouchcancel=function(De){I.handleButtonMouseUp(ne,De)}):(Et.onclick=function(De){I.setMouseHold(!1),typeof I.options.onKeyReleased!="function"&&I.handleButtonClicked(ne,De)},Et.onmousedown=function(De){typeof I.options.onKeyReleased!="function"||I.isMouseHold||I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.onmouseup=function(De){I.handleButtonMouseUp(ne,De)}):(Et.onpointerdown=function(De){I.handleButtonClicked(ne,De),I.handleButtonMouseDown(ne,De)},Et.onpointerup=function(De){I.handleButtonMouseUp(ne,De)},Et.onpointercancel=function(De){I.handleButtonMouseUp(ne,De)}),Et.setAttribute("data-skBtn",ne);var In="".concat(I.options.layoutName,"-r").concat(me,"b").concat(Te);Et.setAttribute("data-skBtnUID",In);var Dt=document.createElement("span");Dt.innerHTML=bt,Et.appendChild(Dt),I.buttonElements[ne]||(I.buttonElements[ne]=[]),I.buttonElements[ne].push(Et),he.appendChild(Et)}),he=I.parseRowDOMContainers(he,me,le,pe),I.keyboardRowsDOM.appendChild(he)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||N||J?N?(document.ontouchend=function(K){return I.handleButtonMouseUp(void 0,K)},document.ontouchcancel=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.ontouchstart=function(K){return I.handleKeyboardContainerMouseDown(K)}):N||(document.onmouseup=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.onmousedown=function(K){return I.handleKeyboardContainerMouseDown(K)}):(document.onpointerup=function(K){return I.handleButtonMouseUp(void 0,K)},this.keyboardDOM.onpointerdown=function(K){return I.handleKeyboardContainerMouseDown(K)}),this.onInit())}}],W&&oe($.prototype,W),Z&&oe($,Z),Object.defineProperty($,"prototype",{writable:!1}),$;var $,W,Z}(),Ee=de,ve=de}(),h}()},442:function(a){a.exports=n}},o={};function i(a){var c=o[a];if(c!==void 0)return c.exports;var u=o[a]={exports:{}};return r[a].call(u.exports,u,u.exports,i),u.exports}i.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(c,{a:c}),c},i.d=function(a,c){for(var u in c)i.o(c,u)&&!i.o(a,u)&&Object.defineProperty(a,u,{enumerable:!0,get:c[u]})},i.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},i.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})};var s={};return function(){i.r(s),i.d(s,{KeyboardReact:function(){return m},default:function(){return g}}),i(981);var a=i(442),c=i(548),u=i.n(c);function d(y){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},d(y)}function h(y,v){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);v&&(E=E.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),b.push.apply(b,E)}return b}function f(y){for(var v=1;v<arguments.length;v++){var b=arguments[v]!=null?arguments[v]:{};v%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,v,b){var E;return E=function(C,A){if(d(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var x=T.call(C,A||"default");if(d(x)!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(C)}(v,"string"),(v=d(E)=="symbol"?E:E+"")in y?Object.defineProperty(y,v,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[v]=b,y}var l=function(y){return f(f({},y),{},{keyboardRef:null})},m=function(y){var v=y.baseClass||"react-simple-keyboard",b=a.useRef(null),E=a.useRef(null),C=a.useRef(null),A=a.useRef(y);return a.useEffect(function(){return function(){C.current&&C.current.destroy(),b.current=!1}},[]),a.useEffect(function(){var T=function(j){return f(f({},j),{},{theme:"simple-keyboard ".concat(j.theme||"hg-theme-default")})}(y);if(!b.current){b.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var x=E.current,R=".".concat(v);C.current=new(u())(x||R,T),T.keyboardRef&&T.keyboardRef(C.current)}var B=function(j,G){var H=l(G),P=l(j);return Object.keys(H).filter(function(V){return H[V]!==P[V]})}(A.current,T);if(B.length){var F=C.current;A.current=T,F==null||F.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",B)}},[b,v,A,y]),a.createElement("div",{className:v,ref:E})},g=m}(),s}()})})(Uy);var yx=Uy.exports;const vx=td(yx);function Hy({onChange:e,keyboardRef:t,layout:n,theme:r}){const[o,i]=k.useState("default"),s=a=>{(a==="{shift}"||a==="{lock}")&&i(o==="default"?"shift":"default")};return w.jsx(vx,{keyboardRef:a=>t.current=a,layoutName:o,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Gy(){const{subscribe:e,unsubscribe:t,publish:n}=Da();return{initialize:(a,c)=>{e("openKeyboard",a),e("closeKeyboard",c)},terminate:(a,c)=>{t("openKeyboard",a),t("closeKeyboard",c)},open:a=>{n("openKeyboard",{inputId:a.target.id,inputValue:a.target.value})},close:()=>{n("closeKeyboard")}}}const Or="keyboard-custom-overlap-id";function wx({enabled:e}){const[t,n]=k.useState(!1),r=k.useRef(null),o=k.useRef(null),i=k.useRef(null),[s,a]=k.useState(),[c,u]=k.useState(0),{initialize:d,terminate:h}=Gy(),f=v=>{var b,E;o.current=document.getElementById(v.detail.inputId),(b=r.current)==null||b.setInput(v.detail.inputValue),(E=o.current)==null||E.addEventListener("input",C=>{var T;const A=C.target;(T=r.current)==null||T.setInput(A==null?void 0:A.value)}),u(y()),n(!0)},p=()=>{u(0),n(!1)};k.useEffect(()=>(d(f,p),()=>{h(f,p)}),[t]);const l=v=>{var b,E;if(o&&o.current){m(o.current,v);const C=(b=r.current)==null?void 0:b.getCaretPosition();C&&((E=o.current)==null||E.setSelectionRange(C,C))}},m=(v,b)=>{var A;const E=(A=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:A.set;E==null||E.call(v,b);const C=new Event("input",{bubbles:!0});v.dispatchEvent(C)},g=()=>{var v;if(!s){const b=(v=i.current)==null?void 0:v.getBoundingClientRect();return b&&b.x&&!s&&a(b),b}return s},y=()=>{var T;const v=document.querySelectorAll("#"+Or),b=g(),E=[...v].map(x=>x.getBoundingClientRect()),C=(T=o.current)==null?void 0:T.getBoundingClientRect();E.push(C),E.sort((x,R)=>x.bottom>R.bottom?-1:1);let A=0;return E.every(x=>{if(b&&b.top<x.bottom)return A=x.bottom-b.top+8,!1}),A};return e?w.jsx("div",{className:"relative",style:{height:c},children:w.jsx("div",{ref:i,className:`mobile:hidden absolute bottom-0 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!t&&s&&"hidden"} ${!t&&!s&&"pointer-events-none opacity-0"}`,children:w.jsx(Hy,{keyboardRef:r,onChange:l})})}):w.jsx(w.Fragment,{})}const Oi=({id:e,name:t,label:n,description:r,required:o,type:i="text",value:s,placeholder:a,disabled:c,error:u=!1,helperText:d="",onChange:h,beforeIcon:f,afterIcon:p,autoFocus:l,onFocus:m,onBlur:g})=>{const[y,v]=k.useState(d),b=k.useRef(null),[E,C]=k.useState(!1),{open:A,close:T}=Gy();k.useEffect(()=>()=>{T()},[]);const x=()=>{b.current&&v(b.current.validationMessage),C(!1),T(),g==null||g()},R=async G=>{C(!0),(async()=>A(G))().then(()=>{var P;return(P=b.current)==null?void 0:P.scrollIntoView({behavior:"smooth",block:"center"})}),m==null||m()},B=G=>{h==null||h(G)},F=k.useId(),j=e??F;return w.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:r,disabled:c,htmlFor:j,required:o,children:n}),w.jsx("div",{className:Ln("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&&!u&&"border-core-primary-500 ring-1 ring-core-primary-500",u&&"border-core-red-500",u&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:w.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[f&&w.jsx(Pn,{icon:f}),w.jsx("input",{type:i,id:j,name:t,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:s,onChange:B,onBlur:x,ref:b,placeholder:a,onFocus:R,disabled:c,autoFocus:l}),p&&w.jsx(Pn,{icon:p})]})}),w.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${d||y?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:w.jsx("div",{className:"overflow-hidden",children:w.jsx(qn.Helper,{error:u,helperText:d||y})})})]})};Oi.displayName="Input";const qy=({id:e,name:t,label:n,required:r,description:o,placeholder:i,value:s,disabled:a,error:c=!1,helperText:u,onChange:d,type:h="date"})=>{const[f,p]=k.useState(!1),l=k.useId(),m=e??l;return w.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:o,disabled:a,htmlFor:m,required:r,children:n}),w.jsx("div",{className:Ln("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 ",a?"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 ",f&&!c&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",c&&"border-core-red-500",c&&f&&"border-core-red-500 ring-1 ring-core-red-500"),children:w.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[w.jsx("input",{type:h,id:m,name:t,value:s,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:d,onFocus:()=>p(!0),onBlur:()=>p(!1),disabled:a}),w.jsx(Pn,{icon:"calendar"})]})}),w.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${u?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:w.jsx("div",{className:"overflow-hidden",children:w.jsx(qn.Helper,{error:c,helperText:u})})})]})};qy.displayName="Input";function Fn({children:e}){return w.jsx("div",{className:"h-screen w-screen md:p-6",children:w.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:e})})}function ni({title:e,isOpen:t,onClose:n,primaryAction:r,secondaryAction:o,children:i}){const[s,a]=k.useState(t),c=k.useRef(null);k.useEffect(()=>{a(t)},[t]),k.useEffect(()=>{const h=c.current;h&&(s?h.show():h.close())},[s]);const u=()=>{n&&n(),a(!1)},d=h=>{h.key==="Escape"&&u()};return w.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${s?"flex":"hidden"}`,children:w.jsx("dialog",{ref:c,onKeyDown:d,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:w.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[w.jsx(Vt,{children:w.jsx("div",{className:"flex h-16 items-center",children:w.jsx("p",{children:e})})}),w.jsx(jt,{children:i}),w.jsx(pn,{children:w.jsxs("div",{className:"flex flex-col gap-2",children:[r&&w.jsx(dt,{label:r.label??"",onClick:r.action,disabled:r.disabled,pending:r.loading}),o&&w.jsx(dt,{label:o.label??"",onClick:o.action,disabled:o.disabled,pending:o.loading,variant:"secondary"})]})})]})})})}function bx({option:{label:e},checked:t,onChange:n}){return w.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[w.jsx(Ih,{defaultChecked:t,onChange:n}),w.jsx("p",{children:e})]})}function Ex(e){const{t}=$e(),n=k.useRef(null),[r,o]=k.useState(!1);Vy(n,o);const[i,s]=k.useState(""),[a,c]=k.useState(e.value.split(";")),{name:u,onChange:d}=e,h=(f,p)=>{let l=[];f?l=[...a,p]:l=a.filter(m=>m!==p),c(l),d&&d(u??"",l.join(";"))};return w.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),w.jsxs("div",{className:"relative",children:[w.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${e.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:()=>!e.disabled&&o(!r),children:[w.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${e.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:a.map(f=>{var l;const p=(l=e.options.find(m=>m.value===f))==null?void 0:l.label;return w.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[w.jsx("p",{className:"truncate",children:p}),w.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,f),children:w.jsx(Pn,{icon:"close"})})]},f)})}),w.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),w.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:[e.options.length>6&&w.jsx("div",{className:"px-4",children:w.jsx(Oi,{placeholder:`${t("search")}...`,onChange:f=>s(f.target.value)})}),e.options.map(f=>{if(!(i&&!f.label.toLowerCase().includes(i.toLowerCase())))return w.jsx(bx,{option:f,checked:a.includes(f.value),onChange:p=>h(p,f.value)},`${f.value}_${a.includes(f.value)?"checked":"unchecked"}`)})]})]})]})}function Cx({value:e,max:t,label:n}){return w.jsxs("div",{children:[w.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),w.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:w.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(e/t*100,100)}%`}})})]})}function _x({value:e,placeholder:t,open:n,setOpen:r,disabled:o}){return w.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:[w.jsx("span",{className:`text-sm ${o?"text-core-gray-300":"text-core-gray-800"}`,children:e||t}),w.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function Sx({label:e,children:t}){return w.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[w.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:e}),t]})}function Th(e){return w.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:e.label})}function Ax(e){const t=k.useRef(null),[n,r]=k.useState(!1),[o,i]=k.useState(e.value??"");Vy(t,r);const s=(c,u)=>{i(c),r(!1),e.onChange&&e.onChange(u)},a=k.Children.map(e.children,c=>{if(k.isValidElement(c)){if(c.type===Th)return w.jsx("div",{onClick:()=>s(c.props.label,c.props.value),children:c});if(c.type===Sx){const u=k.Children.map(c.props.children,d=>{if(k.isValidElement(d)&&d.type===Th)return w.jsx("div",{onClick:()=>s(d.props.label,d.props.value),children:d})});return k.cloneElement(c,{},...u)}}});return w.jsxs("div",{ref:t,className:"flex flex-col gap-2 antialiased",children:[w.jsx(qn,{description:e.description,disabled:e.disabled,htmlFor:e.id,required:e.required,children:e.label}),w.jsx("div",{children:w.jsxs("div",{className:"relative",children:[w.jsx(_x,{value:o,placeholder:e.placeholder,open:n,setOpen:r,disabled:e.disabled}),e.children&&w.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:a})]})}),w.jsx(qn.Helper,{helperText:e.helperText})]})}var Ix=Object.defineProperty,Tx=(e,t)=>{for(var n in t)Ix(e,n,{get:t[n],enumerable:!0})},Hr={};Tx(Hr,{assign:()=>Ox,colors:()=>ii,createStringInterpolator:()=>Dh,skipAnimation:()=>Qy,to:()=>Xy,willAdvance:()=>Lh});var xh=Fa(),ze=e=>La(e,xh),kh=Fa();ze.write=e=>La(e,kh);var el=Fa();ze.onStart=e=>La(e,el);var Oh=Fa();ze.onFrame=e=>La(e,Oh);var Ph=Fa();ze.onFinish=e=>La(e,Ph);var ks=[];ze.setTimeout=(e,t)=>{const n=ze.now()+t,r=()=>{const i=ks.findIndex(s=>s.cancel==r);~i&&ks.splice(i,1),oi-=~i?1:0},o={time:n,handler:e,cancel:r};return ks.splice($y(n),0,o),oi+=1,Wy(),o};var $y=e=>~(~ks.findIndex(t=>t.time>e)||~ks.length);ze.cancel=e=>{el.delete(e),Oh.delete(e),Ph.delete(e),xh.delete(e),kh.delete(e)},ze.sync=e=>{Nh=!0,ze.batchedUpdates(e),Nh=!1},ze.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,ze.onStart(n)}return r.handler=e,r.cancel=()=>{el.delete(n),t=null},r};var Rh=typeof window<"u"?window.requestAnimationFrame:()=>{};ze.use=e=>Rh=e,ze.now=typeof performance<"u"?()=>performance.now():Date.now,ze.batchedUpdates=e=>e(),ze.catch=console.error,ze.frameLoop="always",ze.advance=()=>{ze.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):zy()};var ri=-1,oi=0,Nh=!1;function La(e,t){Nh?(t.delete(e),e(0)):(t.add(e),Wy())}function Wy(){ri<0&&(ri=0,ze.frameLoop!=="demand"&&Rh(Yy))}function xx(){ri=-1}function Yy(){~ri&&(Rh(Yy),ze.batchedUpdates(zy))}function zy(){const e=ri;ri=ze.now();const t=$y(ri);if(t&&(Ky(ks.splice(0,t),n=>n.handler()),oi-=t),!oi){xx();return}el.flush(),xh.flush(e?Math.min(64,ri-e):16.667),Oh.flush(),kh.flush(),Ph.flush()}function Fa(){let e=new Set,t=e;return{add(n){oi+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return oi-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,oi-=t.size,Ky(t,r=>r(n)&&e.add(r)),oi+=e.size,t=e)}}}function Ky(e,t){e.forEach(n=>{try{t(n)}catch(r){ze.catch(r)}})}function Bh(){}var kx=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ae={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Ao(e,t){if(Ae.arr(e)){if(!Ae.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var ut=(e,t)=>e.forEach(t);function oo(e,t,n){if(Ae.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var vr=e=>Ae.und(e)?[]:Ae.arr(e)?e:[e];function ja(e,t){if(e.size){const n=Array.from(e);e.clear(),ut(n,t)}}var Va=(e,...t)=>ja(e,n=>n(...t)),Mh=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Dh,Xy,ii=null,Qy=!1,Lh=Bh,Ox=e=>{e.to&&(Xy=e.to),e.now&&(ze.now=e.now),e.colors!==void 0&&(ii=e.colors),e.skipAnimation!=null&&(Qy=e.skipAnimation),e.createStringInterpolator&&(Dh=e.createStringInterpolator),e.requestAnimationFrame&&ze.use(e.requestAnimationFrame),e.batchedUpdates&&(ze.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Lh=e.willAdvance),e.frameLoop&&(ze.frameLoop=e.frameLoop)},Ua=new Set,Pr=[],Fh=[],tl=0,nl={get idle(){return!Ua.size&&!Pr.length},start(e){tl>e.priority?(Ua.add(e),ze.onStart(Px)):(Jy(e),ze(jh))},advance:jh,sort(e){if(tl)ze.onFrame(()=>nl.sort(e));else{const t=Pr.indexOf(e);~t&&(Pr.splice(t,1),Zy(e))}},clear(){Pr=[],Ua.clear()}};function Px(){Ua.forEach(Jy),Ua.clear(),ze(jh)}function Jy(e){Pr.includes(e)||Zy(e)}function Zy(e){Pr.splice(Rx(Pr,t=>t.priority>e.priority),0,e)}function jh(e){const t=Fh;for(let n=0;n<Pr.length;n++){const r=Pr[n];tl=r.priority,r.idle||(Lh(r),r.advance(e),r.idle||t.push(r))}return tl=0,Fh=Pr,Fh.length=0,Pr=t,Pr.length>0}function Rx(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Nx=(e,t,n)=>Math.min(Math.max(n,e),t),Bx={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},Gr="[-+]?\\d*\\.?\\d+",rl=Gr+"%";function ol(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Mx=new RegExp("rgb"+ol(Gr,Gr,Gr)),Dx=new RegExp("rgba"+ol(Gr,Gr,Gr,Gr)),Lx=new RegExp("hsl"+ol(Gr,rl,rl)),Fx=new RegExp("hsla"+ol(Gr,rl,rl,Gr)),jx=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Vx=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ux=/^#([0-9a-fA-F]{6})$/,Hx=/^#([0-9a-fA-F]{8})$/;function Gx(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ux.exec(e))?parseInt(t[1]+"ff",16)>>>0:ii&&ii[e]!==void 0?ii[e]:(t=Mx.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|255)>>>0:(t=Dx.exec(e))?(Os(t[1])<<24|Os(t[2])<<16|Os(t[3])<<8|nv(t[4]))>>>0:(t=jx.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Hx.exec(e))?parseInt(t[1],16)>>>0:(t=Vx.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Lx.exec(e))?(ev(tv(t[1]),il(t[2]),il(t[3]))|255)>>>0:(t=Fx.exec(e))?(ev(tv(t[1]),il(t[2]),il(t[3]))|nv(t[4]))>>>0:null}function Vh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ev(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=Vh(o,r,e+1/3),s=Vh(o,r,e),a=Vh(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(s*255)<<16|Math.round(a*255)<<8}function Os(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function tv(e){return(parseFloat(e)%360+360)%360/360}function nv(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function il(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function rv(e){let t=Gx(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var Ha=(e,t,n)=>{if(Ae.fun(e))return e;if(Ae.arr(e))return Ha({range:e,output:t,extrapolate:n});if(Ae.str(e.output[0]))return Dh(e);const r=e,o=r.output,i=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(u=>u);return u=>{const d=$x(u,i);return qx(u,i[d],i[d+1],o[d],o[d+1],c,s,a,r.map)}};function qx(e,t,n,r,o,i,s,a,c){let u=c?c(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(a==="identity")return u;a==="clamp"&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u=u+r:u=u*(o-r)+r,u)}function $x(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Wx=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return Nx(0,1,o/e)},sl=1.70158,al=sl*1.525,ov=sl+1,iv=2*Math.PI/3,sv=2*Math.PI/4.5,cl=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Yx={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ov*e*e*e-sl*e*e,easeOutBack:e=>1+ov*Math.pow(e-1,3)+sl*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((al+1)*2*e-al)/2:(Math.pow(2*e-2,2)*((al+1)*(e*2-2)+al)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*iv),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*iv)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*sv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*sv)/2+1,easeInBounce:e=>1-cl(1-e),easeOutBounce:cl,easeInOutBounce:e=>e<.5?(1-cl(1-2*e))/2:(1+cl(2*e-1))/2,steps:Wx},Ga=Symbol.for("FluidValue.get"),Ps=Symbol.for("FluidValue.observers"),Rr=e=>!!(e&&e[Ga]),nr=e=>e&&e[Ga]?e[Ga]():e,av=e=>e[Ps]||null;function zx(e,t){e.eventObserved?e.eventObserved(t):e(t)}function qa(e,t){const n=e[Ps];n&&n.forEach(r=>{zx(r,t)})}var cv=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Kx(this,e)}},Kx=(e,t)=>uv(e,Ga,t);function Rs(e,t){if(e[Ga]){let n=e[Ps];n||uv(e,Ps,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function $a(e,t){const n=e[Ps];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ps]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var uv=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ul=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Xx=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,lv=new RegExp(`(${ul.source})(%|[a-z]+)`,"i"),Qx=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ll=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,dv=e=>{const[t,n]=Jx(e);if(!t||Mh())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&ll.test(n))return dv(n);if(n)return n}return e},Jx=e=>{const t=ll.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Uh,Zx=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,fv=e=>{Uh||(Uh=ii?new RegExp(`(${Object.keys(ii).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(i=>nr(i).replace(ll,dv).replace(Xx,rv).replace(Uh,rv)),n=t.map(i=>i.match(ul).map(Number)),o=n[0].map((i,s)=>n.map(a=>{if(!(s in a))throw Error('The arity of each "output" value must be equal');return a[s]})).map(i=>Ha({...e,output:i}));return i=>{var c;const s=!lv.test(t[0])&&((c=t.find(u=>lv.test(u)))==null?void 0:c.replace(ul,""));let a=0;return t[0].replace(ul,()=>`${o[a++](i)}${s||""}`).replace(Qx,Zx)}},Hh="react-spring: ",hv=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Hh}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},ek=hv(console.warn);function tk(){ek(`${Hh}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var nk=hv(console.warn);function rk(){nk(`${Hh}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 dl(e){return Ae.str(e)&&(e[0]=="#"||/\d/.test(e)||!Mh()&&ll.test(e)||e in(ii||{}))}var Gh=Mh()?k.useEffect:k.useLayoutEffect,ok=()=>{const e=k.useRef(!1);return Gh(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function pv(){const e=k.useState()[1],t=ok();return()=>{t.current&&e(Math.random())}}function ik(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),o=r.current;let i=o;return i?t&&i.inputs&&sk(t,i.inputs)||(i={inputs:t,result:e()}):i=n,k.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function sk(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var mv=e=>k.useEffect(e,ak),ak=[];function gv(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var Wa=Symbol.for("Animated:node"),ck=e=>!!e&&e[Wa]===e,io=e=>e&&e[Wa],qh=(e,t)=>kx(e,Wa,t),fl=e=>e&&e[Wa]&&e[Wa].getPayload(),yv=class{constructor(){qh(this,this)}getPayload(){return this.payload||[]}},Ya=class extends yv{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Ae.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Ya(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Ae.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Ae.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},za=class extends Ya{constructor(e){super(0),this._string=null,this._toString=Ha({output:[e,e]})}static create(e){return new za(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Ae.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ha({output:[this.getValue(),e]})),this._value=0,super.reset()}},hl={dependencies:null},pl=class extends yv{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return oo(this.source,(n,r)=>{ck(n)?t[r]=n.getValue(e):Rr(n)?t[r]=nr(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ut(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return oo(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){hl.dependencies&&Rr(e)&&hl.dependencies.add(e);const t=fl(e);t&&ut(t,n=>this.add(n))}},vv=class extends pl{constructor(e){super(e)}static create(e){return new vv(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(uk)),!0)}};function uk(e){return(dl(e)?za:Ya).create(e)}function $h(e){const t=io(e);return t?t.constructor:Ae.arr(e)?vv:dl(e)?za:Ya}var wv=(e,t)=>{const n=!Ae.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,o)=>{const i=k.useRef(null),s=n&&k.useCallback(l=>{i.current=fk(o,l)},[o]),[a,c]=dk(r,t),u=pv(),d=()=>{const l=i.current;if(n&&!l)return;(l?t.applyAnimatedValues(l,a.getValue(!0)):!1)===!1&&u()},h=new lk(d,c),f=k.useRef();Gh(()=>(f.current=h,ut(c,l=>Rs(l,h)),()=>{f.current&&(ut(f.current.deps,l=>$a(l,f.current)),ze.cancel(f.current.update))})),k.useEffect(d,[]),mv(()=>()=>{const l=f.current;ut(l.deps,m=>$a(m,l))});const p=t.getComponentProps(a.getValue());return ue.createElement(e,{...p,ref:s})})},lk=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&ze.write(this.update)}};function dk(e,t){const n=new Set;return hl.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new pl(e),hl.dependencies=null,[e,n]}function fk(e,t){return e&&(Ae.fun(e)?e(t):e.current=t),t}var bv=Symbol.for("AnimatedComponent"),hk=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new pl(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},i=s=>{const a=Ev(s)||"Anonymous";return Ae.str(s)?s=i[s]||(i[s]=wv(s,o)):s=s[bv]||(s[bv]=wv(s,o)),s.displayName=`Animated(${a})`,s};return oo(e,(s,a)=>{Ae.arr(e)&&(a=Ev(s)),i[a]=i(s)}),{animated:i}},Ev=e=>Ae.str(e)?e:e&&Ae.str(e.displayName)?e.displayName:Ae.fun(e)&&e.name||null;function Pi(e,...t){return Ae.fun(e)?e(...t):e}var Ka=(e,t)=>e===!0||!!(t&&e&&(Ae.fun(e)?e(t):vr(e).includes(t))),Cv=(e,t)=>Ae.obj(e)?t&&e[t]:e,_v=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,pk=e=>e,Wh=(e,t=pk)=>{let n=mk;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const i=t(e[o],o);Ae.und(i)||(r[o]=i)}return r},mk=["config","onProps","onStart","onChange","onPause","onResume","onRest"],gk={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 yk(e){const t={};let n=0;if(oo(e,(r,o)=>{gk[o]||(t[o]=r,n++)}),n)return t}function Sv(e){const t=yk(e);if(t){const n={to:t};return oo(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Xa(e){return e=nr(e),Ae.arr(e)?e.map(Xa):dl(e)?Hr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function vk(e){for(const t in e)return!0;return!1}function Yh(e){return Ae.fun(e)||Ae.arr(e)&&Ae.obj(e[0])}function wk(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function bk(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Ek={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}},zh={...Ek.default,mass:1,damping:1,easing:Yx.linear,clamp:!1},Ck=class{constructor(){this.velocity=0,Object.assign(this,zh)}};function _k(e,t,n){n&&(n={...n},Av(n,t),t={...n,...t}),Av(e,t),Object.assign(e,t);for(const s in zh)e[s]==null&&(e[s]=zh[s]);let{frequency:r,damping:o}=e;const{mass:i}=e;return Ae.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*i,e.friction=4*Math.PI*o*i/r),e}function Av(e,t){if(!Ae.und(t.decay))e.duration=void 0;else{const n=!Ae.und(t.tension)||!Ae.und(t.friction);(n||!Ae.und(t.frequency)||!Ae.und(t.damping)||!Ae.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Iv=[],Sk=class{constructor(){this.changed=!1,this.values=Iv,this.toValues=null,this.fromValues=Iv,this.config=new Ck,this.immediate=!1}};function Tv(e,{key:t,props:n,defaultProps:r,state:o,actions:i}){return new Promise((s,a)=>{let c,u,d=Ka(n.cancel??(r==null?void 0:r.cancel),t);if(d)p();else{Ae.und(n.pause)||(o.paused=Ka(n.pause,t));let l=r==null?void 0:r.pause;l!==!0&&(l=o.paused||Ka(l,t)),c=Pi(n.delay||0,t),l?(o.resumeQueue.add(f),i.pause()):(i.resume(),f())}function h(){o.resumeQueue.add(f),o.timeouts.delete(u),u.cancel(),c=u.time-ze.now()}function f(){c>0&&!Hr.skipAnimation?(o.delayed=!0,u=ze.setTimeout(p,c),o.pauseQueue.add(h),o.timeouts.add(u)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(u),e<=(o.cancelId||0)&&(d=!0);try{i.start({...n,callId:e,cancel:d},s)}catch(l){a(l)}}})}var Kh=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ns(e.get()):t.every(n=>n.noop)?xv(e.get()):qr(e.get(),t.every(n=>n.finished)),xv=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),qr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ns=e=>({value:e,cancelled:!0,finished:!1});function kv(e,t,n,r){const{callId:o,parentId:i,onRest:s}=t,{asyncTo:a,promise:c}=n;return!i&&e===a&&!t.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const u=Wh(t,(g,y)=>y==="onRest"?void 0:g);let d,h;const f=new Promise((g,y)=>(d=g,h=y)),p=g=>{const y=o<=(n.cancelId||0)&&Ns(r)||o!==n.asyncId&&qr(r,!1);if(y)throw g.result=y,h(g),g},l=(g,y)=>{const v=new Ov,b=new Pv;return(async()=>{if(Hr.skipAnimation)throw Qa(n),b.result=qr(r,!1),h(b),b;p(v);const E=Ae.obj(g)?{...g}:{...y,to:g};E.parentId=o,oo(u,(A,T)=>{Ae.und(E[T])&&(E[T]=A)});const C=await r.start(E);return p(v),n.paused&&await new Promise(A=>{n.resumeQueue.add(A)}),C})()};let m;if(Hr.skipAnimation)return Qa(n),qr(r,!1);try{let g;Ae.arr(e)?g=(async y=>{for(const v of y)await l(v)})(e):g=Promise.resolve(e(l,r.stop.bind(r))),await Promise.all([g.then(d),f]),m=qr(r.get(),!0,!1)}catch(g){if(g instanceof Ov)m=g.result;else if(g instanceof Pv)m=g.result;else throw g}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?a:void 0,n.promise=i?c:void 0)}return Ae.fun(s)&&ze.batchedUpdates(()=>{s(m,r,r.item)}),m})()}function Qa(e,t){ja(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Ov=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.")}},Pv=class extends Error{constructor(){super("SkipAnimationSignal")}},Xh=e=>e instanceof Qh,Ak=1,Qh=class extends cv{constructor(){super(...arguments),this.id=Ak++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=io(this);return e&&e.getValue()}to(...e){return Hr.to(this,e)}interpolate(...e){return tk(),Hr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){qa(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||nl.sort(this),qa(this,{type:"priority",parent:this,priority:e})}},Ri=Symbol.for("SpringPhase"),Rv=1,Jh=2,Zh=4,ep=e=>(e[Ri]&Rv)>0,si=e=>(e[Ri]&Jh)>0,Ja=e=>(e[Ri]&Zh)>0,Nv=(e,t)=>t?e[Ri]|=Jh|Rv:e[Ri]&=~Jh,Bv=(e,t)=>t?e[Ri]|=Zh:e[Ri]&=~Zh,Ik=class extends Qh{constructor(e,t){if(super(),this.animation=new Sk,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,!Ae.und(e)||!Ae.und(t)){const n=Ae.obj(e)?{...e}:{...t,from:e};Ae.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(si(this)||this._state.asyncTo)||Ja(this)}get goal(){return nr(this.animation.to)}get velocity(){const e=io(this);return e instanceof Ya?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ep(this)}get isAnimating(){return si(this)}get isPaused(){return Ja(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,s=fl(r.to);!s&&Rr(r.to)&&(o=vr(nr(r.to))),r.values.forEach((u,d)=>{if(u.done)return;const h=u.constructor==za?1:s?s[d].lastPosition:o[d];let f=r.immediate,p=h;if(!f){if(p=u.lastPosition,i.tension<=0){u.done=!0;return}let l=u.elapsedTime+=e;const m=r.fromValues[d],g=u.v0!=null?u.v0:u.v0=Ae.arr(i.velocity)?i.velocity[d]:i.velocity;let y;const v=i.precision||(m==h?.005:Math.min(1,Math.abs(h-m)*.001));if(Ae.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,E=Math.exp(-(1-b)*l);p=m+g/(1-b)*(1-E),f=Math.abs(u.lastPosition-p)<=v,y=g*E}else{y=u.lastVelocity==null?g:u.lastVelocity;const b=i.restVelocity||v/10,E=i.clamp?0:i.bounce,C=!Ae.und(E),A=m==h?u.v0>0:m<h;let T,x=!1;const R=1,B=Math.ceil(e/R);for(let F=0;F<B&&(T=Math.abs(y)>b,!(!T&&(f=Math.abs(h-p)<=v,f)));++F){C&&(x=p==h||p>h==A,x&&(y=-y*E,p=h));const j=-i.tension*1e-6*(p-h),G=-i.friction*.001*y,H=(j+G)/i.mass;y=y+H*R,p=p+y*R}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,u.durationProgress>0&&(u.elapsedTime=i.duration*u.durationProgress,l=u.elapsedTime+=e)),b=(i.progress||0)+l/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),p=m+i.easing(b)*(h-m),y=(p-u.lastPosition)/e,f=b==1}u.lastVelocity=y,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),f=!0)}s&&!s[d].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(p,i.round)&&(n=!0)});const a=io(this),c=a.getValue();if(t){const u=nr(r.to);(c!==u||n)&&!i.decay?(a.setValue(u),this._onChange(u)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return ze.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(si(this)){const{to:e,config:t}=this.animation;ze.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Ae.und(e)?(n=this.queue||[],this.queue=[]):n=[Ae.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Kh(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Qa(this._state,e&&this._lastCallId),ze.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Ae.obj(n)?n[t]:n,(n==null||Yh(n))&&(n=void 0),r=Ae.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ep(this)||(e.reverse&&([n,r]=[r,n]),r=nr(r),Ae.und(r)?io(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Wh(e,(s,a)=>/^on/.test(a)?Cv(s,n):s)),Lv(this,e,"onProps"),tc(this,"onProps",e,this);const o=this._prepareNode(e);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 Tv(++this._lastCallId,{key:n,props:e,defaultProps:r,state:i,actions:{pause:()=>{Ja(this)||(Bv(this,!0),Va(i.pauseQueue),tc(this,"onPause",qr(this,Za(this,this.animation.to)),this))},resume:()=>{Ja(this)&&(Bv(this,!1),si(this)&&this._resume(),Va(i.resumeQueue),tc(this,"onResume",qr(this,Za(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const a=Mv(e);if(a)return this._update(a,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ns(this));const r=!Ae.und(e.to),o=!Ae.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ns(this));const{key:i,defaultProps:s,animation:a}=this,{to:c,from:u}=a;let{to:d=c,from:h=u}=e;o&&!r&&(!t.default||Ae.und(d))&&(d=h),t.reverse&&([d,h]=[h,d]);const f=!Ao(h,u);f&&(a.from=h),h=nr(h);const p=!Ao(d,c);p&&this._focus(d);const l=Yh(t.to),{config:m}=a,{decay:g,velocity:y}=m;(r||o)&&(m.velocity=0),t.config&&!l&&_k(m,Pi(t.config,i),t.config!==s.config?Pi(s.config,i):void 0);let v=io(this);if(!v||Ae.und(d))return n(qr(this,!0));const b=Ae.und(t.reset)?o&&!t.default:!Ae.und(h)&&Ka(t.reset,i),E=b?h:this.get(),C=Xa(d),A=Ae.num(C)||Ae.arr(C)||dl(C),T=!l&&(!A||Ka(s.immediate||t.immediate,i));if(p){const F=$h(d);if(F!==v.constructor)if(T)v=this._set(C);else throw Error(`Cannot animate between ${v.constructor.name} and ${F.name}, as the "to" prop suggests`)}const x=v.constructor;let R=Rr(d),B=!1;if(!R){const F=b||!ep(this)&&f;(p||F)&&(B=Ao(Xa(E),C),R=!B),(!Ao(a.immediate,T)&&!T||!Ao(m.decay,g)||!Ao(m.velocity,y))&&(R=!0)}if(B&&si(this)&&(a.changed&&!b?R=!0:R||this._stop(c)),!l&&((R||Rr(c))&&(a.values=v.getPayload(),a.toValues=Rr(d)?null:x==za?[1]:vr(C)),a.immediate!=T&&(a.immediate=T,!T&&!b&&this._set(c)),R)){const{onRest:F}=a;ut(xk,G=>Lv(this,t,G));const j=qr(this,Za(this,c));Va(this._pendingCalls,j),this._pendingCalls.add(n),a.changed&&ze.batchedUpdates(()=>{var G;a.changed=!b,F==null||F(j,this),b?Pi(s.onRest,j):(G=a.onStart)==null||G.call(a,j,this)})}b&&this._set(E),l?n(kv(t.to,t,this._state,this)):R?this._start():si(this)&&!p?this._pendingCalls.add(n):n(xv(E))}_focus(e){const t=this.animation;e!==t.to&&(av(this)&&this._detach(),t.to=e,av(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Rr(t)&&(Rs(t,this),Xh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Rr(e)&&$a(e,this)}_set(e,t=!0){const n=nr(e);if(!Ae.und(n)){const r=io(this);if(!r||!Ao(n,r.getValue())){const o=$h(n);!r||r.constructor!=o?qh(this,o.create(n)):r.setValue(n),r&&ze.batchedUpdates(()=>{this._onChange(n,t)})}}return io(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,tc(this,"onStart",qr(this,Za(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Pi(this.animation.onChange,e,this)),Pi(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;io(this).reset(nr(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),si(this)||(Nv(this,!0),Ja(this)||this._resume())}_resume(){Hr.skipAnimation?this.finish():nl.start(this)}_stop(e,t){if(si(this)){Nv(this,!1);const n=this.animation;ut(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),qa(this,{type:"idle",parent:this});const r=t?Ns(this.get()):qr(this.get(),Za(this,e??n.to));Va(this._pendingCalls,r),n.changed&&(n.changed=!1,tc(this,"onRest",r,this))}}};function Za(e,t){const n=Xa(t),r=Xa(e.get());return Ao(r,n)}function Mv(e,t=e.loop,n=e.to){const r=Pi(t);if(r){const o=r!==!0&&Sv(r),i=(o||e).reverse,s=!o||o.reset;return ec({...e,loop:t,default:!1,pause:void 0,to:!i||Yh(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function ec(e){const{to:t,from:n}=e=Sv(e),r=new Set;return Ae.obj(t)&&Dv(t,r),Ae.obj(n)&&Dv(n,r),e.keys=r.size?Array.from(r):null,e}function Tk(e){const t=ec(e);return Ae.und(t.default)&&(t.default=Wh(t)),t}function Dv(e,t){oo(e,(n,r)=>n!=null&&t.add(r))}var xk=["onStart","onRest","onChange","onPause","onResume"];function Lv(e,t,n){e.animation[n]=t[n]!==_v(t,n)?Cv(t[n],e.key):void 0}function tc(e,t,...n){var r,o,i,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(i=e.defaultProps)[t])==null||s.call(i,...n)}var kk=["onStart","onChange","onRest"],Ok=1,Pk=class{constructor(e,t){this.id=Ok++,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),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];Ae.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(ec(e)),this}start(e){let{queue:t}=this;return e?t=vr(e).map(ec):this.queue=[],this._flush?this._flush(this,t):(Gv(this,t),tp(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ut(vr(t),r=>n[r].stop(!!e))}else Qa(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(Ae.und(e))this.start({pause:!0});else{const t=this.springs;ut(vr(e),n=>t[n].pause())}return this}resume(e){if(Ae.und(e))this.start({pause:!1});else{const t=this.springs;ut(vr(e),n=>t[n].resume())}return this}each(e){oo(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,ja(e,([a,c])=>{c.value=this.get(),a(c,this,this._item)}));const i=!r&&this._started,s=o||i&&n.size?this.get():null;o&&t.size&&ja(t,([a,c])=>{c.value=s,a(c,this,this._item)}),i&&(this._started=!1,ja(n,([a,c])=>{c.value=s,a(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;ze.onFrame(this._onFrame)}};function tp(e,t){return Promise.all(t.map(n=>Fv(e,n))).then(n=>Kh(e,n))}async function Fv(e,t,n){const{keys:r,to:o,from:i,loop:s,onRest:a,onResolve:c}=t,u=Ae.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),i===!1&&(t.from=null);const d=Ae.arr(o)||Ae.fun(o)?o:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):ut(kk,m=>{const g=t[m];if(Ae.fun(g)){const y=e._events[m];t[m]=({finished:v,cancelled:b})=>{const E=y.get(g);E?(v||(E.finished=!1),b&&(E.cancelled=!0)):y.set(g,{value:null,finished:v||!1,cancelled:b||!1})},u&&(u[m]=t[m])}});const h=e._state;t.pause===!h.paused?(h.paused=t.pause,Va(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),p=t.cancel===!0||_v(t,"cancel")===!0;(d||p&&h.asyncId)&&f.push(Tv(++e._lastAsyncId,{props:t,state:h,actions:{pause:Bh,resume:Bh,start(m,g){p?(Qa(h,e._lastAsyncId),g(Ns(e))):(m.onRest=a,g(kv(d,m,h,e)))}}})),h.paused&&await new Promise(m=>{h.resumeQueue.add(m)});const l=Kh(e,await Promise.all(f));if(s&&l.finished&&!(n&&l.noop)){const m=Mv(t,s,o);if(m)return Gv(e,[m]),Fv(e,m,!0)}return c&&ze.batchedUpdates(()=>c(l,e,e.item)),l}function jv(e,t){const n={...e.springs};return t&&ut(vr(t),r=>{Ae.und(r.keys)&&(r=ec(r)),Ae.obj(r.to)||(r={...r,to:void 0}),Hv(n,r,o=>Uv(o))}),Vv(e,n),n}function Vv(e,t){oo(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Rs(n,e))})}function Uv(e,t){const n=new Ik;return n.key=e,t&&Rs(n,t),n}function Hv(e,t,n){t.keys&&ut(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Gv(e,t){ut(t,n=>{Hv(e.springs,n,r=>Uv(r,e))})}var ml=({children:e,...t})=>{const n=k.useContext(gl),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=ik(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=gl;return ue.createElement(i,{value:t},e)},gl=Rk(ml,{});ml.Provider=gl.Provider,ml.Consumer=gl.Consumer;function Rk(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Nk=()=>{const e=[],t=function(r){rk();const o=[];return ut(e,(i,s)=>{if(Ae.und(r))o.push(i.start());else{const a=n(r,i,s);a&&o.push(i.start(a))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return ut(e,r=>r.pause(...arguments)),this},t.resume=function(){return ut(e,r=>r.resume(...arguments)),this},t.set=function(r){ut(e,(o,i)=>{const s=Ae.fun(r)?r(i,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return ut(e,(i,s)=>{if(Ae.und(r))o.push(i.start());else{const a=this._getProps(r,i,s);a&&o.push(i.start(a))}}),o},t.stop=function(){return ut(e,r=>r.stop(...arguments)),this},t.update=function(r){return ut(e,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return Ae.fun(r)?r(i,o):r};return t._getProps=n,t};function Bk(e,t,n){const r=Ae.fun(t)&&t;r&&!n&&(n=[]);const o=k.useMemo(()=>r||arguments.length==3?Nk():void 0,[]),i=k.useRef(0),s=pv(),a=k.useMemo(()=>({ctrls:[],queue:[],flush(y,v){const b=jv(y,v);return i.current>0&&!a.queue.length&&!Object.keys(b).some(C=>!y.springs[C])?tp(y,v):new Promise(C=>{Vv(y,b),a.queue.push(()=>{C(tp(y,v))}),s()})}}),[]),c=k.useRef([...a.ctrls]),u=[],d=gv(e)||0;k.useMemo(()=>{ut(c.current.slice(e,d),y=>{wk(y,o),y.stop(!0)}),c.current.length=e,h(d,e)},[e]),k.useMemo(()=>{h(0,Math.min(d,e))},n);function h(y,v){for(let b=y;b<v;b++){const E=c.current[b]||(c.current[b]=new Pk(null,a.flush)),C=r?r(b,E):t[b];C&&(u[b]=Tk(C))}}const f=c.current.map((y,v)=>jv(y,u[v])),p=k.useContext(ml),l=gv(p),m=p!==l&&vk(p);Gh(()=>{i.current++,a.ctrls=c.current;const{queue:y}=a;y.length&&(a.queue=[],ut(y,v=>v())),ut(c.current,(v,b)=>{o==null||o.add(v),m&&v.start({default:p});const E=u[b];E&&(bk(v,E.ref),v.ref?v.queue.push(E):v.start(E))})}),mv(()=>()=>{ut(a.ctrls,y=>y.stop(!0))});const g=f.map(y=>({...y}));return o?[g,o]:g}function Mk(e,t){const n=Ae.fun(e),[[r],o]=Bk(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,o]:r}var Dk=class extends Qh{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ha(...t);const n=this._get(),r=$h(n);qh(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Ao(t,n)||(io(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&qv(this._active)&&np(this)}_get(){const e=Ae.arr(this.source)?this.source.map(nr):vr(nr(this.source));return this.calc(...e)}_start(){this.idle&&!qv(this._active)&&(this.idle=!1,ut(fl(this),e=>{e.done=!1}),Hr.skipAnimation?(ze.batchedUpdates(()=>this.advance()),np(this)):nl.start(this))}_attach(){let e=1;ut(vr(this.source),t=>{Rr(t)&&Rs(t,this),Xh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){ut(vr(this.source),e=>{Rr(e)&&$a(e,this)}),this._active.clear(),np(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=vr(this.source).reduce((t,n)=>Math.max(t,(Xh(n)?n.priority:0)+1),0))}};function Lk(e){return e.idle!==!1}function qv(e){return!e.size||Array.from(e).every(Lk)}function np(e){e.idle||(e.idle=!0,ut(fl(e),t=>{t.done=!0}),qa(e,{type:"idle",parent:e}))}Hr.assign({createStringInterpolator:fv,to:(e,t)=>new Dk(e,t)});var $v=/^--/;function Fk(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!$v.test(e)&&!(nc.hasOwnProperty(e)&&nc[e])?t+"px":(""+t).trim()}var Wv={};function jk(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:s,viewBox:a,...c}=t,u=Object.values(c),d=Object.keys(c).map(h=>n||e.hasAttribute(h)?h:Wv[h]||(Wv[h]=h.replace(/([A-Z])/g,f=>"-"+f.toLowerCase())));o!==void 0&&(e.textContent=o);for(const h in r)if(r.hasOwnProperty(h)){const f=Fk(h,r[h]);$v.test(h)?e.style.setProperty(h,f):e.style[h]=f}d.forEach((h,f)=>{e.setAttribute(h,u[f])}),i!==void 0&&(e.scrollTop=i),s!==void 0&&(e.scrollLeft=s),a!==void 0&&e.setAttribute("viewBox",a)}var nc={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},Vk=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Uk=["Webkit","Ms","Moz","O"];nc=Object.keys(nc).reduce((e,t)=>(Uk.forEach(n=>e[Vk(n,t)]=e[t]),e),nc);var Hk=/^(matrix|translate|scale|rotate|skew)/,Gk=/^(translate)/,qk=/^(rotate|skew)/,rp=(e,t)=>Ae.num(e)&&e!==0?e+t:e,yl=(e,t)=>Ae.arr(e)?e.every(n=>yl(n,t)):Ae.num(e)?e===t:parseFloat(e)===t,$k=class extends pl{constructor({x:e,y:t,z:n,...r}){const o=[],i=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),i.push(s=>[`translate3d(${s.map(a=>rp(a,"px")).join(",")})`,yl(s,0)])),oo(r,(s,a)=>{if(a==="transform")o.push([s||""]),i.push(c=>[c,c===""]);else if(Hk.test(a)){if(delete r[a],Ae.und(s))return;const c=Gk.test(a)?"px":qk.test(a)?"deg":"";o.push(vr(s)),i.push(a==="rotate3d"?([u,d,h,f])=>[`rotate3d(${u},${d},${h},${rp(f,c)})`,yl(f,0)]:u=>[`${a}(${u.map(d=>rp(d,c)).join(",")})`,yl(u,a.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new Wk(o,i)),super(r)}},Wk=class extends cv{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return ut(this.inputs,(n,r)=>{const o=nr(n[0]),[i,s]=this.transforms[r](Ae.arr(o)?o:n.map(nr));e+=" "+i,t=t&&s}),t?"none":e}observerAdded(e){e==1&&ut(this.inputs,t=>ut(t,n=>Rr(n)&&Rs(n,this)))}observerRemoved(e){e==0&&ut(this.inputs,t=>ut(t,n=>Rr(n)&&$a(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),qa(this,e)}},Yk=["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"];Hr.assign({batchedUpdates:qi.unstable_batchedUpdates,createStringInterpolator:fv,colors:Bx});var zk=hk(Yk,{applyAnimatedValues:jk,createAnimatedStyle:e=>new $k(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Kk=zk.animated;function vl(e){const{rows:t}=e,n=Mk({from:{opacity:0},to:{opacity:1}});return w.jsxs(Kk.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,o)=>w.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),w.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Yv({children:e,offset:t,max:n=4,initialCollapsed:r=!0}){const o=k.useRef(null),[i,s]=k.useState(0),[a,c]=k.useState(r),u=a&&k.Children.count(e)>n?n:k.Children.count(e);k.useEffect(()=>{o.current&&(i?a?o.current.style.marginBottom=`-${i-(i/u+(u-1)*(t??i/u/7.5))}px`:o.current.style.marginBottom="unset":s(o.current.offsetHeight))},[a,i]);const d=f=>(100-(u-1-f))/100,h=f=>f*(i/u-(t??i/u/7.5));return w.jsx("div",{ref:o,className:"hover:cursor-pointer",onClick:()=>u>1&&c(!a),children:k.Children.map(k.Children.toArray(e).slice(-1*u),(f,p)=>w.jsx("div",{className:`${!a&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:a&&u>1?`scaleX(${d(p)}) translateY(-${h(p)}px)`:void 0},children:f}))})}const Xk=xs("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),Qk=xs("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),Jk=({id:e,disabled:t,onChange:n,defaultChecked:r=!1,size:o="md"})=>{const i=t,[s,a]=k.useState(r),[c,u]=k.useState(!1),d=()=>{i||(a(!s),n&&n())},h=()=>{t||u(!0)},f=()=>{u(!1)},p=Ln("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":s&&!t,"bg-core-gray-200 hover:bg-core-gray-300":!s&&!t,"bg-core-gray-100":t},Qk({size:o})),l=o==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return w.jsxs("div",{className:`inline-flex items-center py-1 ${i?"pointer-events-none":"cursor-pointer "}`,onClick:d,onFocus:h,children:[w.jsx("input",{className:"sr-only ",id:e,type:"checkbox",checked:s,disabled:i,onBlur:f,onChange:d,onFocus:h}),w.jsx("div",{className:p,children:w.jsx("div",{className:Ln(Xk({size:o}),`${s?l:""} ${i?"shadow-none":"shadow-xs"}`)})})]})},op=({id:e,children:t,size:n="md",description:r,toggleLeft:o=!0,disabled:i,helperText:s,defaultChecked:a=!1,label:c,required:u=!1,tooltip:d,onChange:h})=>{const f=k.useId(),p=e??f;return w.jsxs("div",{className:`flex ${o?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[w.jsx(Jk,{disabled:i,defaultChecked:a,id:p,size:n,onChange:h}),t||(c||r||d||s)&&w.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[w.jsx(qn,{className:Ln("font-normal"),description:r,required:u,tooltip:d,htmlFor:p,disabled:i,children:c}),w.jsx(qn.Helper,{disabled:i,helperText:s})]})]})};op.displayName="Switch";const zv=k.createContext(null);function Zk(e=!1){const t=k.useContext(zv);if(!t&&!e)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return t}const Kv=k.forwardRef(({toggleLeft:e=!1,size:t="md",children:n,description:r,disabled:o,helperText:i,id:s,label:a,required:c,tooltip:u},d)=>{const h=k.useId(),f=s??h,p=a??r??u??i?w.jsxs("div",{className:"inline-flex flex-col",children:[w.jsx(qn,{className:"cursor-default",description:r,required:c,tooltip:u,htmlFor:f,disabled:o,children:a}),w.jsx(qn.Helper,{disabled:o,helperText:i})]}):null;return w.jsx(zv.Provider,{value:{disabled:o,toggleLeft:e,size:t},children:w.jsxs("div",{ref:d,"aria-describedby":i?`${f}__describer`:void 0,"aria-labelledby":a?`${f}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[a??i??r??u?w.jsx("div",{className:"flex flex-col",children:p}):null,n?w.jsx("div",{className:Ln("flex flex-col gap-2"),children:n}):null]})})});Kv.displayName="SwitchGroup",Object.assign(Kv,{Item:({disabled:e,label:t,defaultChecked:n})=>{const r=Zk(),{disabled:o,size:i,toggleLeft:s}=r??{};return w.jsx(op,{toggleLeft:s,disabled:e??o,label:t,defaultChecked:n,size:i})}});const eO=({children:e})=>w.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:e}),tO=({id:e,label:t,icon:n,pathname:r,activeTab:o,setActiveTab:i})=>w.jsx(Iy,{className:"flex flex-grow items-center",to:r??"",children:w.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===e?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>i(e),children:[w.jsx(Pn,{icon:n,className:"mr-2",variant:o===e?"discovery":"secondary"}),t]})});function Ni({onSubmit:e,children:t}){const n=r=>{r.preventDefault(),e&&e(r)};return w.jsx("form",{onSubmit:n,children:t})}var Xv={},rr={};Object.defineProperty(rr,"__esModule",{value:!0}),rr.compactObject=ew,rr.deprecated=lO;var nO=rr.detectBrowser=dO;rr.disableLog=aO,rr.disableWarnings=cO,rr.extractVersion=wl,rr.filterStats=fO,rr.log=uO,rr.walkStats=bl,rr.wrapPeerConnectionEvent=sO;function rO(e,t,n){return t=oO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oO(e){var t=iO(e,"string");return ai(t)=="symbol"?t:t+""}function iO(e,t){if(ai(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ai(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ai(e){"@babel/helpers - typeof";return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}var Qv=!0,Jv=!0;function wl(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function sO(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(s,a){if(s!==t)return o.apply(this,arguments);var c=function(d){var h=n(d);h&&(a.handleEvent?a.handleEvent(h):a(h))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(a,c),o.apply(this,[s,c])};var i=r.removeEventListener;r.removeEventListener=function(s,a){if(s!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(a))return i.apply(this,arguments);var c=this._eventMap[t].get(a);return this._eventMap[t].delete(a),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,i.apply(this,[s,c])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(a){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),a&&this.addEventListener(t,this["_on"+t]=a)},enumerable:!0,configurable:!0})}}function aO(e){return typeof e!="boolean"?new Error("Argument type: "+ai(e)+". Please use a boolean."):(Qv=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function cO(e){return typeof e!="boolean"?new Error("Argument type: "+ai(e)+". Please use a boolean."):(Jv=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function uO(){if((typeof window>"u"?"undefined":ai(window))==="object"){if(Qv)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function lO(e,t){Jv&&console.warn(e+" is deprecated, please use "+t+" instead.")}function dO(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.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)t.browser="firefox",t.version=wl(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=wl(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=wl(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Zv(e){return Object.prototype.toString.call(e)==="[object Object]"}function ew(e){return Zv(e)?Object.keys(e).reduce(function(t,n){var r=Zv(e[n]),o=r?ew(e[n]):e[n],i=r&&!Object.keys(o).length;return o===void 0||i?t:Object.assign(t,rO({},n,o))},{}):e}function bl(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?bl(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(o){bl(e,e.get(o),n)})}))}function fO(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(t===null)return o;var i=[];return e.forEach(function(s){s.type==="track"&&s.trackIdentifier===t.id&&i.push(s)}),i.forEach(function(s){e.forEach(function(a){a.type===r&&a.trackId===s.id&&bl(e,a,o)})}),o}Object.defineProperty(Xv,"__esModule",{value:!0});var hO=Xv.shimGetUserMedia=gO,pO=mO(rr);function tw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(tw=function(o){return o?n:t})(e)}function mO(e,t){if(e&&e.__esModule)return e;if(e===null||ci(e)!="object"&&typeof e!="function")return{default:e};var n=tw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}var nw=pO.log;function gO(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(u){if(ci(u)!=="object"||u.mandatory||u.optional)return u;var d={};return Object.keys(u).forEach(function(h){if(!(h==="require"||h==="advanced"||h==="mediaSource")){var f=ci(u[h])==="object"?u[h]:{ideal:u[h]};f.exact!==void 0&&typeof f.exact=="number"&&(f.min=f.max=f.exact);var p=function(g,y){return g?g+y.charAt(0).toUpperCase()+y.slice(1):y==="deviceId"?"sourceId":y};if(f.ideal!==void 0){d.optional=d.optional||[];var l={};typeof f.ideal=="number"?(l[p("min",h)]=f.ideal,d.optional.push(l),l={},l[p("max",h)]=f.ideal,d.optional.push(l)):(l[p("",h)]=f.ideal,d.optional.push(l))}f.exact!==void 0&&typeof f.exact!="number"?(d.mandatory=d.mandatory||{},d.mandatory[p("",h)]=f.exact):["min","max"].forEach(function(m){f[m]!==void 0&&(d.mandatory=d.mandatory||{},d.mandatory[p(m,h)]=f[m])})}}),u.advanced&&(d.optional=(d.optional||[]).concat(u.advanced)),d},o=function(u,d){if(t.version>=61)return d(u);if(u=JSON.parse(JSON.stringify(u)),u&&ci(u.audio)==="object"){var h=function(g,y,v){y in g&&!(v in g)&&(g[v]=g[y],delete g[y])};u=JSON.parse(JSON.stringify(u)),h(u.audio,"autoGainControl","googAutoGainControl"),h(u.audio,"noiseSuppression","googNoiseSuppression"),u.audio=r(u.audio)}if(u&&ci(u.video)==="object"){var f=u.video.facingMode;f=f&&(ci(f)==="object"?f:{ideal:f});var p=t.version<66;if(f&&(f.exact==="user"||f.exact==="environment"||f.ideal==="user"||f.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!p)){delete u.video.facingMode;var l;if(f.exact==="environment"||f.ideal==="environment"?l=["back","rear"]:(f.exact==="user"||f.ideal==="user")&&(l=["front"]),l)return n.mediaDevices.enumerateDevices().then(function(m){m=m.filter(function(y){return y.kind==="videoinput"});var g=m.find(function(y){return l.some(function(v){return y.label.toLowerCase().includes(v)})});return!g&&m.length&&l.includes("back")&&(g=m[m.length-1]),g&&(u.video.deviceId=f.exact?{exact:g.deviceId}:{ideal:g.deviceId}),u.video=r(u.video),nw("chrome: "+JSON.stringify(u)),d(u)})}u.video=r(u.video)}return nw("chrome: "+JSON.stringify(u)),d(u)},i=function(u){return t.version>=64?u:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[u.name]||u.name,message:u.message,constraint:u.constraint||u.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},s=function(u,d,h){o(u,function(f){n.webkitGetUserMedia(f,d,function(p){h&&h(i(p))})})};if(n.getUserMedia=s.bind(n),n.mediaDevices.getUserMedia){var a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(c){return o(c,function(u){return a(u).then(function(d){if(u.audio&&!d.getAudioTracks().length||u.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(function(h){h.stop()}),new DOMException("","NotFoundError");return d},function(d){return Promise.reject(i(d))})})}}}}var rw={};Object.defineProperty(rw,"__esModule",{value:!0});var yO=rw.shimGetUserMedia=bO,vO=wO(rr);function ow(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ow=function(o){return o?n:t})(e)}function wO(e,t){if(e&&e.__esModule)return e;if(e===null||Bs(e)!="object"&&typeof e!="function")return{default:e};var n=ow(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function Bs(e){"@babel/helpers - typeof";return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bs(e)}function bO(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(c,u,d){vO.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(c).then(u,d)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var o=function(u,d,h){d in u&&!(h in u)&&(u[h]=u[d],delete u[d])},i=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(c){return Bs(c)==="object"&&Bs(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 s=r.prototype.getSettings;r.prototype.getSettings=function(){var c=s.apply(this,arguments);return o(c,"mozAutoGainControl","autoGainControl"),o(c,"mozNoiseSuppression","noiseSuppression"),c}}if(r&&r.prototype.applyConstraints){var a=r.prototype.applyConstraints;r.prototype.applyConstraints=function(c){return this.kind==="audio"&&Bs(c)==="object"&&(c=JSON.parse(JSON.stringify(c)),o(c,"autoGainControl","mozAutoGainControl"),o(c,"noiseSuppression","mozNoiseSuppression")),a.apply(this,[c])}}}}var so={};Object.defineProperty(so,"__esModule",{value:!0}),so.shimAudioContext=OO,so.shimCallbacksAPI=AO,so.shimConstraints=aw,so.shimCreateOfferLegacy=kO;var EO=so.shimGetUserMedia=IO;so.shimLocalStreamsAPI=_O,so.shimRTCIceServerUrls=TO,so.shimRemoteStreamsAPI=SO,so.shimTrackEventTransceiver=xO;var iw=CO(rr);function sw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sw=function(o){return o?n:t})(e)}function CO(e,t){if(e&&e.__esModule)return e;if(e===null||ui(e)!="object"&&typeof e!="function")return{default:e};var n=sw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}function ui(e){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ui(e)}function _O(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.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 t.call(o,i,r)}),r.getVideoTracks().forEach(function(i){return t.call(o,i,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var o=this,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];return s&&s.forEach(function(c){o._localStreams?o._localStreams.includes(c)||o._localStreams.push(c):o._localStreams=[c]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.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 s=r.getTracks();this.getSenders().forEach(function(a){s.includes(a.track)&&o.removeTrack(a)})}})}}function SO(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.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(s){if(o._remoteStreams||(o._remoteStreams=[]),!o._remoteStreams.includes(s)){o._remoteStreams.push(s);var a=new Event("addstream");a.stream=s,o.dispatchEvent(a)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.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 s=new Event("addstream");s.stream=i,r.dispatchEvent(s)}})}),t.apply(r,arguments)}}}function AO(e){if(!(ui(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(u,d){var h=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[h]);return d?(f.then(u,d),Promise.resolve()):f},t.createAnswer=function(u,d){var h=arguments.length>=2?arguments[2]:arguments[0],f=r.apply(this,[h]);return d?(f.then(u,d),Promise.resolve()):f};var a=function(u,d,h){var f=o.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f};t.setLocalDescription=a,a=function(u,d,h){var f=i.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f},t.setRemoteDescription=a,a=function(u,d,h){var f=s.apply(this,[u]);return h?(f.then(d,h),Promise.resolve()):f},t.addIceCandidate=a}}function IO(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(o){return r(aw(o))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(i,s,a){t.mediaDevices.getUserMedia(i).then(s,a)}).bind(t))}function aw(e){return e&&e.video!==void 0?Object.assign({},e,{video:iw.compactObject(e.video)}):e}function TO(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,o){if(r&&r.iceServers){for(var i=[],s=0;s<r.iceServers.length;s++){var a=r.iceServers[s];a.urls===void 0&&a.url?(iw.deprecated("RTCIceServer.url","RTCIceServer.urls"),a=JSON.parse(JSON.stringify(a)),a.urls=a.url,delete a.url,i.push(a)):i.push(r.iceServers[s])}r.iceServers=i}return new t(r,o)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function xO(e){ui(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function kO(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var o=this.getTransceivers().find(function(s){return s.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(s){return s.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 t.apply(this,arguments)}}function OO(e){ui(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var cw=e=>{throw TypeError(e)},uw=(e,t,n)=>t.has(e)||cw("Cannot "+n),PO=(e,t,n)=>(uw(e,t,"read from private field"),n?n.call(e):t.get(e)),RO=(e,t,n)=>t.has(e)?cw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),NO=(e,t,n,r)=>(uw(e,t,"write to private field"),t.set(e,n),n);const lw=["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 BO(e){return e.join("|")}function MO(e){const t=dw(e);let n=0,r=lw.length-1;for(;n<=r;){const o=Math.floor((n+r)/2),i=lw[o],s=dw(i);if(s===t)return i;s<t?n=o+1:r=o-1}return"None"}function dw(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function DO(e,t){return e.Binarizer[t]}function LO(e,t){return e.CharacterSet[t]}const FO=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function jO(e){return FO[e.value]}function VO(e,t){return e.EanAddOnSymbol[t]}function UO(e,t){return e.TextMode[t]}const Ms={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 fw(e,t){return{...t,formats:BO(t.formats),binarizer:DO(e,t.binarizer),eanAddOnSymbol:VO(e,t.eanAddOnSymbol),textMode:UO(e,t.textMode),characterSet:LO(e,t.characterSet)}}function hw(e){return{...e,format:MO(e.format),eccLevel:e.eccLevel,contentType:jO(e.contentType)}}const HO={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.3.4/dist/${n[1]}/${e}`:t+e}};let pw=new WeakMap;function ip(e,t){var n;const r=pw.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const o=(n=r==null?void 0:r.moduleOverrides)!=null?n:HO,i=e({...o});return pw.set(e,{moduleOverrides:o,modulePromise:i}),i}async function GO(e,t,n=Ms){const r={...Ms,...n},o=await ip(e),{size:i}=t,s=new Uint8Array(await t.arrayBuffer()),a=o._malloc(i);o.HEAPU8.set(s,a);const c=o.readBarcodesFromImage(a,i,fw(o,r));o._free(a);const u=[];for(let d=0;d<c.size();++d)u.push(hw(c.get(d)));return u}async function qO(e,t,n=Ms){const r={...Ms,...n},o=await ip(e),{data:i,width:s,height:a,data:{byteLength:c}}=t,u=o._malloc(c);o.HEAPU8.set(i,u);const d=o.readBarcodesFromPixmap(u,s,a,fw(o,r));o._free(u);const h=[];for(let f=0;f<d.size();++f)h.push(hw(d.get(f)));return h}({...Ms,formats:[...Ms.formats]});var sp=(()=>{var e,t=typeof document<"u"&&((e=document.currentScript)==null?void 0:e.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(n={}){var r,o=n,i,s,a=new Promise((_,S)=>{i=_,s=S}),c=typeof window=="object",u=typeof Bun<"u",d=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var h=Object.assign({},o),f="./this.program",p="";function l(_){return o.locateFile?o.locateFile(_,p):p+_}var m,g;if(c||d||u){var y;d?p=self.location.href:typeof document<"u"&&((y=document.currentScript)===null||y===void 0?void 0:y.tagName.toUpperCase())==="SCRIPT"&&(p=document.currentScript.src),t&&(p=t),p.startsWith("blob:")?p="":p=p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1),d&&(g=_=>{var S=new XMLHttpRequest;return S.open("GET",_,!1),S.responseType="arraybuffer",S.send(null),new Uint8Array(S.response)}),m=_=>fetch(_,{credentials:"same-origin"}).then(S=>S.ok?S.arrayBuffer():Promise.reject(new Error(S.status+" : "+S.url)))}var v=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&&(f=o.thisProgram);var E=o.wasmBinary,C,A=!1,T,x,R,B,F,j,G,H;function P(){var _=C.buffer;o.HEAP8=T=new Int8Array(_),o.HEAP16=R=new Int16Array(_),o.HEAPU8=x=new Uint8Array(_),o.HEAPU16=B=new Uint16Array(_),o.HEAP32=F=new Int32Array(_),o.HEAPU32=j=new Uint32Array(_),o.HEAPF32=G=new Float32Array(_),o.HEAPF64=H=new Float64Array(_)}var V=[],z=[],X=[];function re(){var _=o.preRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(we)),le(V)}function oe(){le(z)}function ce(){var _=o.postRun;_&&(typeof _=="function"&&(_=[_]),_.forEach(Ee)),le(X)}function we(_){V.unshift(_)}function de(_){z.unshift(_)}function Ee(_){X.unshift(_)}var ve=0,$=null;function W(_){var S;ve++,(S=o.monitorRunDependencies)===null||S===void 0||S.call(o,ve)}function Z(_){var S;if(ve--,(S=o.monitorRunDependencies)===null||S===void 0||S.call(o,ve),ve==0&&$){var O=$;$=null,O()}}function I(_){var S;(S=o.onAbort)===null||S===void 0||S.call(o,_),_="Aborted("+_+")",b(_),A=!0,_+=". Build with -sASSERTIONS for more info.";var O=new WebAssembly.RuntimeError(_);throw s(O),O}var L="data:application/octet-stream;base64,",U=_=>_.startsWith(L);function N(){var _="zxing_reader.wasm";return U(_)?_:l(_)}var ee;function J(_){if(_==ee&&E)return new Uint8Array(E);if(g)return g(_);throw"both async and sync fetching of the wasm failed"}function te(_){return E?Promise.resolve().then(()=>J(_)):m(_).then(S=>new Uint8Array(S),()=>J(_))}function K(_,S,O){return te(_).then(M=>WebAssembly.instantiate(M,S)).then(O,M=>{b(`failed to asynchronously prepare wasm: ${M}`),I(M)})}function me(_,S,O,M){return!_&&typeof WebAssembly.instantiateStreaming=="function"&&!U(S)&&typeof fetch=="function"?fetch(S,{credentials:"same-origin"}).then(q=>{var Q=WebAssembly.instantiateStreaming(q,O);return Q.then(M,function(ae){return b(`wasm streaming compile failed: ${ae}`),b("falling back to ArrayBuffer instantiation"),K(S,O,M)})}):K(S,O,M)}function be(){return{a:qL}}function he(){var _,S=be();function O(q,Q){return Yt=q.exports,C=Yt.za,P(),Qb=Yt.Da,de(Yt.Aa),Z(),Yt}W();function M(q){O(q.instance)}if(o.instantiateWasm)try{return o.instantiateWasm(S,O)}catch(q){b(`Module.instantiateWasm callback failed with error: ${q}`),s(q)}return(_=ee)!==null&&_!==void 0||(ee=N()),me(E,ee,S,M).catch(s),{}}var le=_=>{_.forEach(S=>S(o))};o.noExitRuntime;var pe=_=>uE(_),ne=()=>lE(),Te=[],Ie=0,et=_=>{var S=new bt(_);return S.get_caught()||(S.set_caught(!0),Ie--),S.set_rethrown(!1),Te.push(S),fE(_),aE(_)},Ke=0,Pt=()=>{st(0,0);var _=Te.pop();dE(_.excPtr),Ke=0};class bt{constructor(S){this.excPtr=S,this.ptr=S-24}set_type(S){j[this.ptr+4>>2]=S}get_type(){return j[this.ptr+4>>2]}set_destructor(S){j[this.ptr+8>>2]=S}get_destructor(){return j[this.ptr+8>>2]}set_caught(S){S=S?1:0,T[this.ptr+12]=S}get_caught(){return T[this.ptr+12]!=0}set_rethrown(S){S=S?1:0,T[this.ptr+13]=S}get_rethrown(){return T[this.ptr+13]!=0}init(S,O){this.set_adjusted_ptr(0),this.set_type(S),this.set_destructor(O)}set_adjusted_ptr(S){j[this.ptr+16>>2]=S}get_adjusted_ptr(){return j[this.ptr+16>>2]}}var Br=_=>{throw Ke||(Ke=_),Ke},Et=_=>cE(_),In=_=>{var S=Ke;if(!S)return Et(0),0;var O=new bt(S);O.set_adjusted_ptr(S);var M=O.get_type();if(!M)return Et(0),S;for(var q of _){if(q===0||q===M)break;var Q=O.ptr+16;if(hE(q,M,Q))return Et(q),S}return Et(M),S},Dt=()=>In([]),De=_=>In([_]),Yr=(_,S)=>In([_,S]),wn=()=>{var _=Te.pop();_||I("no exception to throw");var S=_.excPtr;throw _.get_rethrown()||(Te.push(_),_.set_rethrown(!0),_.set_caught(!1),Ie++),Ke=S,Ke},Yn=(_,S,O)=>{var M=new bt(_);throw M.init(S,O),Ke=_,Ie++,Ke},zn=()=>Ie,co=()=>{I("")},Dn={},Kn=_=>{for(;_.length;){var S=_.pop(),O=_.pop();O(S)}};function bn(_){return this.fromWireType(j[_>>2])}var on={},cr={},uo={},Fe,We=_=>{throw new Fe(_)},Ye=(_,S,O)=>{_.forEach(ie=>uo[ie]=S);function M(ie){var ye=O(ie);ye.length!==_.length&&We("Mismatched type converter count");for(var _e=0;_e<_.length;++_e)Cr(_[_e],ye[_e])}var q=new Array(S.length),Q=[],ae=0;S.forEach((ie,ye)=>{cr.hasOwnProperty(ie)?q[ye]=cr[ie]:(Q.push(ie),on.hasOwnProperty(ie)||(on[ie]=[]),on[ie].push(()=>{q[ye]=cr[ie],++ae,ae===Q.length&&M(q)}))}),Q.length===0&&M(q)},mt=_=>{var S=Dn[_];delete Dn[_];var O=S.rawConstructor,M=S.rawDestructor,q=S.fields,Q=q.map(ae=>ae.getterReturnType).concat(q.map(ae=>ae.setterArgumentType));Ye([_],Q,ae=>{var ie={};return q.forEach((ye,_e)=>{var ke=ye.fieldName,Re=ae[_e],at=ye.getter,_t=ye.getterContext,Ht=ae[_e+q.length],En=ye.setter,cn=ye.setterContext;ie[ke]={read:un=>Re.fromWireType(at(_t,un)),write:(un,Gi)=>{var Xn=[];En(cn,un,Ht.toWireType(Xn,Gi)),Kn(Xn)}}}),[{name:S.name,fromWireType:ye=>{var _e={};for(var ke in ie)_e[ke]=ie[ke].read(ye);return M(ye),_e},toWireType:(ye,_e)=>{for(var ke in ie)if(!(ke in _e))throw new TypeError(`Missing field: "${ke}"`);var Re=O();for(ke in ie)ie[ke].write(Re,_e[ke]);return ye!==null&&ye.push(M,Re),Re},argPackAdvance:Mr,readValueFromPointer:bn,destructorFunction:M}]})},$t=(_,S,O,M,q)=>{},$s=()=>{for(var _=new Array(256),S=0;S<256;++S)_[S]=String.fromCharCode(S);Hi=_},Hi,sn=_=>{for(var S="",O=_;x[O];)S+=Hi[x[O++]];return S},xo,gt=_=>{throw new xo(_)};function Fp(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var M=S.name;if(_||gt(`type "${M}" must have a positive integer typeid pointer`),cr.hasOwnProperty(_)){if(O.ignoreDuplicateRegistrations)return;gt(`Cannot register type '${M}' twice`)}if(cr[_]=S,delete uo[_],on.hasOwnProperty(_)){var q=on[_];delete on[_],q.forEach(Q=>Q())}}function Cr(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Fp(_,S,O)}var Mr=8,Y=(_,S,O,M)=>{S=sn(S),Cr(_,{name:S,fromWireType:function(q){return!!q},toWireType:function(q,Q){return Q?O:M},argPackAdvance:Mr,readValueFromPointer:function(q){return this.fromWireType(x[q])},destructorFunction:null})},Ce=_=>({count:_.count,deleteScheduled:_.deleteScheduled,preservePointerOnDelete:_.preservePointerOnDelete,ptr:_.ptr,ptrType:_.ptrType,smartPtr:_.smartPtr,smartPtrType:_.smartPtrType}),Oe=_=>{function S(O){return O.$$.ptrType.registeredClass.name}gt(S(_)+" instance already deleted")},Be=!1,yt=_=>{},kt=_=>{_.smartPtr?_.smartPtrType.rawDestructor(_.smartPtr):_.ptrType.registeredClass.rawDestructor(_.ptr)},it=_=>{_.count.value-=1;var S=_.count.value===0;S&&kt(_)},nt=(_,S,O)=>{if(S===O)return _;if(O.baseClass===void 0)return null;var M=nt(_,S,O.baseClass);return M===null?null:O.downcast(M)},Tn={},Wt={},Kt=(_,S)=>{for(S===void 0&>("ptr should not be undefined");_.baseClass;)S=_.upcast(S),_=_.baseClass;return S},ur=(_,S)=>(S=Kt(_,S),Wt[S]),zr=(_,S)=>{(!S.ptrType||!S.ptr)&&We("makeClassHandle requires ptr and ptrType");var O=!!S.smartPtrType,M=!!S.smartPtr;return O!==M&&We("Both smartPtrType and smartPtr must be specified"),S.count={value:1},an(Object.create(_,{$$:{value:S,writable:!0}}))};function ko(_){var S=this.getPointee(_);if(!S)return this.destructor(_),null;var O=ur(this.registeredClass,S);if(O!==void 0){if(O.$$.count.value===0)return O.$$.ptr=S,O.$$.smartPtr=_,O.clone();var M=O.clone();return this.destructor(_),M}function q(){return this.isSmartPointer?zr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:S,smartPtrType:this,smartPtr:_}):zr(this.registeredClass.instancePrototype,{ptrType:this,ptr:_})}var Q=this.registeredClass.getActualType(S),ae=Tn[Q];if(!ae)return q.call(this);var ie;this.isConst?ie=ae.constPointerType:ie=ae.pointerType;var ye=nt(S,this.registeredClass,ie.registeredClass);return ye===null?q.call(this):this.isSmartPointer?zr(ie.registeredClass.instancePrototype,{ptrType:ie,ptr:ye,smartPtrType:this,smartPtr:_}):zr(ie.registeredClass.instancePrototype,{ptrType:ie,ptr:ye})}var an=_=>typeof FinalizationRegistry>"u"?(an=S=>S,_):(Be=new FinalizationRegistry(S=>{it(S.$$)}),an=S=>{var O=S.$$,M=!!O.smartPtr;if(M){var q={$$:O};Be.register(S,q,S)}return S},yt=S=>Be.unregister(S),an(_)),pi=[],jp=()=>{for(;pi.length;){var _=pi.pop();_.$$.deleteScheduled=!1,_.delete()}},Wl,AD=()=>{Object.assign(Yl.prototype,{isAliasOf(_){if(!(this instanceof Yl)||!(_ instanceof Yl))return!1;var S=this.$$.ptrType.registeredClass,O=this.$$.ptr;_.$$=_.$$;for(var M=_.$$.ptrType.registeredClass,q=_.$$.ptr;S.baseClass;)O=S.upcast(O),S=S.baseClass;for(;M.baseClass;)q=M.upcast(q),M=M.baseClass;return S===M&&O===q},clone(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var _=an(Object.create(Object.getPrototypeOf(this),{$$:{value:Ce(this.$$)}}));return _.$$.count.value+=1,_.$$.deleteScheduled=!1,_},delete(){this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),yt(this),it(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&>("Object already scheduled for deletion"),pi.push(this),pi.length===1&&Wl&&Wl(jp),this.$$.deleteScheduled=!0,this}})};function Yl(){}var yc=(_,S)=>Object.defineProperty(S,"name",{value:_}),Kb=(_,S,O)=>{if(_[S].overloadTable===void 0){var M=_[S];_[S]=function(){for(var q=arguments.length,Q=new Array(q),ae=0;ae<q;ae++)Q[ae]=arguments[ae];return _[S].overloadTable.hasOwnProperty(Q.length)||gt(`Function '${O}' called with an invalid number of arguments (${Q.length}) - expects one of (${_[S].overloadTable})!`),_[S].overloadTable[Q.length].apply(this,Q)},_[S].overloadTable=[],_[S].overloadTable[M.argCount]=M}},Vp=(_,S,O)=>{o.hasOwnProperty(_)?((O===void 0||o[_].overloadTable!==void 0&&o[_].overloadTable[O]!==void 0)&>(`Cannot register public name '${_}' twice`),Kb(o,_,_),o.hasOwnProperty(O)&>(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),o[_].overloadTable[O]=S):(o[_]=S,O!==void 0&&(o[_].numArguments=O))},ID=48,TD=57,xD=_=>{_=_.replace(/[^a-zA-Z0-9_]/g,"$");var S=_.charCodeAt(0);return S>=ID&&S<=TD?`_${_}`:_};function kD(_,S,O,M,q,Q,ae,ie){this.name=_,this.constructor=S,this.instancePrototype=O,this.rawDestructor=M,this.baseClass=q,this.getActualType=Q,this.upcast=ae,this.downcast=ie,this.pureVirtualFunctions=[]}var Up=(_,S,O)=>{for(;S!==O;)S.upcast||gt(`Expected null or instance of ${O.name}, got an instance of ${S.name}`),_=S.upcast(_),S=S.baseClass;return _};function OD(_,S){if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),0;S.$$||gt(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`);var O=S.$$.ptrType.registeredClass,M=Up(S.$$.ptr,O,this.registeredClass);return M}function PD(_,S){var O;if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),this.isSmartPointer?(O=this.rawConstructor(),_!==null&&_.push(this.rawDestructor,O),O):0;(!S||!S.$$)&>(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&S.$$.ptrType.isConst&>(`Cannot convert argument of type ${S.$$.smartPtrType?S.$$.smartPtrType.name:S.$$.ptrType.name} to parameter type ${this.name}`);var M=S.$$.ptrType.registeredClass;if(O=Up(S.$$.ptr,M,this.registeredClass),this.isSmartPointer)switch(S.$$.smartPtr===void 0&>("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:S.$$.smartPtrType===this?O=S.$$.smartPtr:gt(`Cannot convert argument of type ${S.$$.smartPtrType?S.$$.smartPtrType.name:S.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:O=S.$$.smartPtr;break;case 2:if(S.$$.smartPtrType===this)O=S.$$.smartPtr;else{var q=S.clone();O=this.rawShare(O,Po.toHandle(()=>q.delete())),_!==null&&_.push(this.rawDestructor,O)}break;default:gt("Unsupporting sharing policy")}return O}function RD(_,S){if(S===null)return this.isReference&>(`null is not a valid ${this.name}`),0;S.$$||gt(`Cannot pass "${Yp(S)}" as a ${this.name}`),S.$$.ptr||gt(`Cannot pass deleted object as a pointer of type ${this.name}`),S.$$.ptrType.isConst&>(`Cannot convert argument of type ${S.$$.ptrType.name} to parameter type ${this.name}`);var O=S.$$.ptrType.registeredClass,M=Up(S.$$.ptr,O,this.registeredClass);return M}var ND=()=>{Object.assign(zl.prototype,{getPointee(_){return this.rawGetPointee&&(_=this.rawGetPointee(_)),_},destructor(_){var S;(S=this.rawDestructor)===null||S===void 0||S.call(this,_)},argPackAdvance:Mr,readValueFromPointer:bn,fromWireType:ko})};function zl(_,S,O,M,q,Q,ae,ie,ye,_e,ke){this.name=_,this.registeredClass=S,this.isReference=O,this.isConst=M,this.isSmartPointer=q,this.pointeeType=Q,this.sharingPolicy=ae,this.rawGetPointee=ie,this.rawConstructor=ye,this.rawShare=_e,this.rawDestructor=ke,!q&&S.baseClass===void 0?M?(this.toWireType=OD,this.destructorFunction=null):(this.toWireType=RD,this.destructorFunction=null):this.toWireType=PD}var Xb=(_,S,O)=>{o.hasOwnProperty(_)||We("Replacing nonexistent public symbol"),o[_].overloadTable!==void 0&&O!==void 0?o[_].overloadTable[O]=S:(o[_]=S,o[_].argCount=O)},BD=(_,S,O)=>{_=_.replace(/p/g,"i");var M=o["dynCall_"+_];return M(S,...O)},Kl=[],Qb,ft=_=>{var S=Kl[_];return S||(_>=Kl.length&&(Kl.length=_+1),Kl[_]=S=Qb.get(_)),S},MD=function(_,S){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(_.includes("j"))return BD(_,S,O);var M=ft(S)(...O);return M},DD=(_,S)=>function(){for(var O=arguments.length,M=new Array(O),q=0;q<O;q++)M[q]=arguments[q];return MD(_,S,M)},Kr=(_,S)=>{_=sn(_);function O(){return _.includes("j")?DD(_,S):ft(S)}var M=O();return typeof M!="function"&>(`unknown function pointer with signature ${_}: ${S}`),M},LD=(_,S)=>{var O=yc(S,function(M){this.name=S,this.message=M;var q=new Error(M).stack;q!==void 0&&(this.stack=this.toString()+`
|
|
140
140
|
`+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},Jb,Zb=_=>{var S=sE(_),O=sn(S);return Ro(S),O},Xl=(_,S)=>{var O=[],M={};function q(Q){if(!M[Q]&&!cr[Q]){if(uo[Q]){uo[Q].forEach(q);return}O.push(Q),M[Q]=!0}}throw S.forEach(q),new Jb(`${_}: `+O.map(Zb).join([", "]))},FD=(_,S,O,M,q,Q,ae,ie,ye,_e,ke,Re,at)=>{ke=sn(ke),Q=Kr(q,Q),ie&&(ie=Kr(ae,ie)),_e&&(_e=Kr(ye,_e)),at=Kr(Re,at);var _t=xD(ke);Vp(_t,function(){Xl(`Cannot construct ${ke} due to unbound types`,[M])}),Ye([_,S,O],M?[M]:[],Ht=>{Ht=Ht[0];var En,cn;M?(En=Ht.registeredClass,cn=En.instancePrototype):cn=Yl.prototype;var un=yc(ke,function(){if(Object.getPrototypeOf(this)!==Gi)throw new xo("Use 'new' to construct "+ke);if(Xn.constructor_body===void 0)throw new xo(ke+" has no accessible constructor");for(var bE=arguments.length,Zl=new Array(bE),ed=0;ed<bE;ed++)Zl[ed]=arguments[ed];var EE=Xn.constructor_body[Zl.length];if(EE===void 0)throw new xo(`Tried to invoke ctor of ${ke} with invalid number of parameters (${Zl.length}) - expected (${Object.keys(Xn.constructor_body).toString()}) parameters instead!`);return EE.apply(this,Zl)}),Gi=Object.create(cn,{constructor:{value:un}});un.prototype=Gi;var Xn=new kD(ke,un,Gi,at,En,Q,ie,_e);if(Xn.baseClass){var No,Jl;(Jl=(No=Xn.baseClass).__derivedClasses)!==null&&Jl!==void 0||(No.__derivedClasses=[]),Xn.baseClass.__derivedClasses.push(Xn)}var AF=new zl(ke,Xn,!0,!1,!1),vE=new zl(ke+"*",Xn,!1,!1,!1),wE=new zl(ke+" const*",Xn,!1,!0,!1);return Tn[_]={pointerType:vE,constPointerType:wE},Xb(_t,un),[AF,vE,wE]})},Hp=(_,S)=>{for(var O=[],M=0;M<_;M++)O.push(j[S+M*4>>2]);return O};function jD(_){for(var S=1;S<_.length;++S)if(_[S]!==null&&_[S].destructorFunction===void 0)return!0;return!1}function Gp(_,S,O,M,q,Q){var ae=S.length;ae<2&>("argTypes array size mismatch! Must at least get return value and 'this' types!");var ie=S[1]!==null&&O!==null,ye=jD(S),_e=S[0].name!=="void",ke=ae-2,Re=new Array(ke),at=[],_t=[],Ht=function(){_t.length=0;var En;at.length=ie?2:1,at[0]=q,ie&&(En=S[1].toWireType(_t,this),at[1]=En);for(var cn=0;cn<ke;++cn)Re[cn]=S[cn+2].toWireType(_t,cn<0||arguments.length<=cn?void 0:arguments[cn]),at.push(Re[cn]);var un=M(...at);function Gi(Xn){if(ye)Kn(_t);else for(var No=ie?1:2;No<S.length;No++){var Jl=No===1?En:Re[No-2];S[No].destructorFunction!==null&&S[No].destructorFunction(Jl)}if(_e)return S[0].fromWireType(Xn)}return Gi(un)};return yc(_,Ht)}var VD=(_,S,O,M,q,Q)=>{var ae=Hp(S,O);q=Kr(M,q),Ye([],[_],ie=>{ie=ie[0];var ye=`constructor ${ie.name}`;if(ie.registeredClass.constructor_body===void 0&&(ie.registeredClass.constructor_body=[]),ie.registeredClass.constructor_body[S-1]!==void 0)throw new xo(`Cannot register multiple constructors with identical number of parameters (${S-1}) for class '${ie.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ie.registeredClass.constructor_body[S-1]=()=>{Xl(`Cannot construct ${ie.name} due to unbound types`,ae)},Ye([],ae,_e=>(_e.splice(1,0,null),ie.registeredClass.constructor_body[S-1]=Gp(ye,_e,null,q,Q),[])),[]})},eE=_=>{_=_.trim();const S=_.indexOf("(");return S!==-1?_.substr(0,S):_},UD=(_,S,O,M,q,Q,ae,ie,ye,_e)=>{var ke=Hp(O,M);S=sn(S),S=eE(S),Q=Kr(q,Q),Ye([],[_],Re=>{Re=Re[0];var at=`${Re.name}.${S}`;S.startsWith("@@")&&(S=Symbol[S.substring(2)]),ie&&Re.registeredClass.pureVirtualFunctions.push(S);function _t(){Xl(`Cannot call ${at} due to unbound types`,ke)}var Ht=Re.registeredClass.instancePrototype,En=Ht[S];return En===void 0||En.overloadTable===void 0&&En.className!==Re.name&&En.argCount===O-2?(_t.argCount=O-2,_t.className=Re.name,Ht[S]=_t):(Kb(Ht,S,at),Ht[S].overloadTable[O-2]=_t),Ye([],ke,cn=>{var un=Gp(at,cn,Re,Q,ae);return Ht[S].overloadTable===void 0?(un.argCount=O-2,Ht[S]=un):Ht[S].overloadTable[O-2]=un,[]}),[]})},qp=[],Oo=[],$p=_=>{_>9&&--Oo[_+1]===0&&(Oo[_]=void 0,qp.push(_))},HD=()=>Oo.length/2-5-qp.length,GD=()=>{Oo.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=HD},Po={toValue:_=>(_||gt("Cannot use deleted val. handle = "+_),Oo[_]),toHandle:_=>{switch(_){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const S=qp.pop()||Oo.length;return Oo[S]=_,Oo[S+1]=1,S}}}},tE={name:"emscripten::val",fromWireType:_=>{var S=Po.toValue(_);return $p(_),S},toWireType:(_,S)=>Po.toHandle(S),argPackAdvance:Mr,readValueFromPointer:bn,destructorFunction:null},qD=_=>Cr(_,tE),$D=(_,S,O)=>{switch(S){case 1:return O?function(M){return this.fromWireType(T[M])}:function(M){return this.fromWireType(x[M])};case 2:return O?function(M){return this.fromWireType(R[M>>1])}:function(M){return this.fromWireType(B[M>>1])};case 4:return O?function(M){return this.fromWireType(F[M>>2])}:function(M){return this.fromWireType(j[M>>2])};default:throw new TypeError(`invalid integer width (${S}): ${_}`)}},WD=(_,S,O,M)=>{S=sn(S);function q(){}q.values={},Cr(_,{name:S,constructor:q,fromWireType:function(Q){return this.constructor.values[Q]},toWireType:(Q,ae)=>ae.value,argPackAdvance:Mr,readValueFromPointer:$D(S,O,M),destructorFunction:null}),Vp(S,q)},Wp=(_,S)=>{var O=cr[_];return O===void 0&>(`${S} has unknown type ${Zb(_)}`),O},YD=(_,S,O)=>{var M=Wp(_,"enum");S=sn(S);var q=M.constructor,Q=Object.create(M.constructor.prototype,{value:{value:O},constructor:{value:yc(`${M.name}_${S}`,function(){})}});q.values[O]=Q,q[S]=Q},Yp=_=>{if(_===null)return"null";var S=typeof _;return S==="object"||S==="array"||S==="function"?_.toString():""+_},zD=(_,S)=>{switch(S){case 4:return function(O){return this.fromWireType(G[O>>2])};case 8:return function(O){return this.fromWireType(H[O>>3])};default:throw new TypeError(`invalid float width (${S}): ${_}`)}},KD=(_,S,O)=>{S=sn(S),Cr(_,{name:S,fromWireType:M=>M,toWireType:(M,q)=>q,argPackAdvance:Mr,readValueFromPointer:zD(S,O),destructorFunction:null})},XD=(_,S,O,M,q,Q,ae,ie)=>{var ye=Hp(S,O);_=sn(_),_=eE(_),q=Kr(M,q),Vp(_,function(){Xl(`Cannot call ${_} due to unbound types`,ye)},S-1),Ye([],ye,_e=>{var ke=[_e[0],null].concat(_e.slice(1));return Xb(_,Gp(_,ke,null,q,Q),S-1),[]})},QD=(_,S,O)=>{switch(S){case 1:return O?M=>T[M]:M=>x[M];case 2:return O?M=>R[M>>1]:M=>B[M>>1];case 4:return O?M=>F[M>>2]:M=>j[M>>2];default:throw new TypeError(`invalid integer width (${S}): ${_}`)}},JD=(_,S,O,M,q)=>{S=sn(S);var Q=ke=>ke;if(M===0){var ae=32-8*O;Q=ke=>ke<<ae>>>ae}var ie=S.includes("unsigned"),ye=(ke,Re)=>{},_e;ie?_e=function(ke,Re){return ye(Re,this.name),Re>>>0}:_e=function(ke,Re){return ye(Re,this.name),Re},Cr(_,{name:S,fromWireType:Q,toWireType:_e,argPackAdvance:Mr,readValueFromPointer:QD(S,O,M!==0),destructorFunction:null})},ZD=(_,S,O)=>{var M=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],q=M[S];function Q(ae){var ie=j[ae>>2],ye=j[ae+4>>2];return new q(T.buffer,ye,ie)}O=sn(O),Cr(_,{name:O,fromWireType:Q,argPackAdvance:Mr,readValueFromPointer:Q},{ignoreDuplicateRegistrations:!0})},eL=Object.assign({optional:!0},tE),tL=(_,S)=>{Cr(_,eL)},nL=(_,S,O,M)=>{if(!(M>0))return 0;for(var q=O,Q=O+M-1,ae=0;ae<_.length;++ae){var ie=_.charCodeAt(ae);if(ie>=55296&&ie<=57343){var ye=_.charCodeAt(++ae);ie=65536+((ie&1023)<<10)|ye&1023}if(ie<=127){if(O>=Q)break;S[O++]=ie}else if(ie<=2047){if(O+1>=Q)break;S[O++]=192|ie>>6,S[O++]=128|ie&63}else if(ie<=65535){if(O+2>=Q)break;S[O++]=224|ie>>12,S[O++]=128|ie>>6&63,S[O++]=128|ie&63}else{if(O+3>=Q)break;S[O++]=240|ie>>18,S[O++]=128|ie>>12&63,S[O++]=128|ie>>6&63,S[O++]=128|ie&63}}return S[O]=0,O-q},vc=(_,S,O)=>nL(_,x,S,O),rL=_=>{for(var S=0,O=0;O<_.length;++O){var M=_.charCodeAt(O);M<=127?S++:M<=2047?S+=2:M>=55296&&M<=57343?(S+=4,++O):S+=3}return S},nE=typeof TextDecoder<"u"?new TextDecoder:void 0,rE=function(_){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var M=S+O,q=S;_[q]&&!(q>=M);)++q;if(q-S>16&&_.buffer&&nE)return nE.decode(_.subarray(S,q));for(var Q="";S<q;){var ae=_[S++];if(!(ae&128)){Q+=String.fromCharCode(ae);continue}var ie=_[S++]&63;if((ae&224)==192){Q+=String.fromCharCode((ae&31)<<6|ie);continue}var ye=_[S++]&63;if((ae&240)==224?ae=(ae&15)<<12|ie<<6|ye:ae=(ae&7)<<18|ie<<12|ye<<6|_[S++]&63,ae<65536)Q+=String.fromCharCode(ae);else{var _e=ae-65536;Q+=String.fromCharCode(55296|_e>>10,56320|_e&1023)}}return Q},oL=(_,S)=>_?rE(x,_,S):"",iL=(_,S)=>{S=sn(S);var O=S==="std::string";Cr(_,{name:S,fromWireType(M){var q=j[M>>2],Q=M+4,ae;if(O)for(var ie=Q,ye=0;ye<=q;++ye){var _e=Q+ye;if(ye==q||x[_e]==0){var ke=_e-ie,Re=oL(ie,ke);ae===void 0?ae=Re:(ae+="\0",ae+=Re),ie=_e+1}}else{for(var at=new Array(q),ye=0;ye<q;++ye)at[ye]=String.fromCharCode(x[Q+ye]);ae=at.join("")}return Ro(M),ae},toWireType(M,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=rL(q):Q=q.length;var ie=Xp(4+Q+1),ye=ie+4;if(j[ie>>2]=Q,O&&ae)vc(q,ye,Q+1);else if(ae)for(var _e=0;_e<Q;++_e){var ke=q.charCodeAt(_e);ke>255&&(Ro(ye),gt("String has UTF-16 code units that do not fit in 8 bits")),x[ye+_e]=ke}else for(var _e=0;_e<Q;++_e)x[ye+_e]=q[_e];return M!==null&&M.push(Ro,ie),ie},argPackAdvance:Mr,readValueFromPointer:bn,destructorFunction(M){Ro(M)}})},oE=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,sL=(_,S)=>{for(var O=_,M=O>>1,q=M+S/2;!(M>=q)&&B[M];)++M;if(O=M<<1,O-_>32&&oE)return oE.decode(x.subarray(_,O));for(var Q="",ae=0;!(ae>=S/2);++ae){var ie=R[_+ae*2>>1];if(ie==0)break;Q+=String.fromCharCode(ie)}return Q},aL=(_,S,O)=>{var M;if((M=O)!==null&&M!==void 0||(O=2147483647),O<2)return 0;O-=2;for(var q=S,Q=O<_.length*2?O/2:_.length,ae=0;ae<Q;++ae){var ie=_.charCodeAt(ae);R[S>>1]=ie,S+=2}return R[S>>1]=0,S-q},cL=_=>_.length*2,uL=(_,S)=>{for(var O=0,M="";!(O>=S/4);){var q=F[_+O*4>>2];if(q==0)break;if(++O,q>=65536){var Q=q-65536;M+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}else M+=String.fromCharCode(q)}return M},lL=(_,S,O)=>{var M;if((M=O)!==null&&M!==void 0||(O=2147483647),O<4)return 0;for(var q=S,Q=q+O-4,ae=0;ae<_.length;++ae){var ie=_.charCodeAt(ae);if(ie>=55296&&ie<=57343){var ye=_.charCodeAt(++ae);ie=65536+((ie&1023)<<10)|ye&1023}if(F[S>>2]=ie,S+=4,S+4>Q)break}return F[S>>2]=0,S-q},dL=_=>{for(var S=0,O=0;O<_.length;++O){var M=_.charCodeAt(O);M>=55296&&M<=57343&&++O,S+=4}return S},fL=(_,S,O)=>{O=sn(O);var M,q,Q,ae;S===2?(M=sL,q=aL,ae=cL,Q=ie=>B[ie>>1]):S===4&&(M=uL,q=lL,ae=dL,Q=ie=>j[ie>>2]),Cr(_,{name:O,fromWireType:ie=>{for(var ye=j[ie>>2],_e,ke=ie+4,Re=0;Re<=ye;++Re){var at=ie+4+Re*S;if(Re==ye||Q(at)==0){var _t=at-ke,Ht=M(ke,_t);_e===void 0?_e=Ht:(_e+="\0",_e+=Ht),ke=at+S}}return Ro(ie),_e},toWireType:(ie,ye)=>{typeof ye!="string"&>(`Cannot pass non-string to C++ string type ${O}`);var _e=ae(ye),ke=Xp(4+_e+S);return j[ke>>2]=_e/S,q(ye,ke+4,_e+S),ie!==null&&ie.push(Ro,ke),ke},argPackAdvance:Mr,readValueFromPointer:bn,destructorFunction(ie){Ro(ie)}})},hL=(_,S,O,M,q,Q)=>{Dn[_]={name:sn(S),rawConstructor:Kr(O,M),rawDestructor:Kr(q,Q),fields:[]}},pL=(_,S,O,M,q,Q,ae,ie,ye,_e)=>{Dn[_].fields.push({fieldName:sn(S),getterReturnType:O,getter:Kr(M,q),getterContext:Q,setterArgumentType:ae,setter:Kr(ie,ye),setterContext:_e})},mL=(_,S)=>{S=sn(S),Cr(_,{isVoid:!0,name:S,argPackAdvance:0,fromWireType:()=>{},toWireType:(O,M)=>{}})},gL=(_,S,O)=>x.copyWithin(_,S,S+O),zp=[],yL=(_,S,O,M)=>(_=zp[_],S=Po.toValue(S),_(null,S,O,M)),vL={},wL=_=>{var S=vL[_];return S===void 0?sn(_):S},iE=()=>{if(typeof globalThis=="object")return globalThis;function _(S){S.$$$embind_global$$$=S;var O=typeof $$$embind_global$$$=="object"&&S.$$$embind_global$$$==S;return O||delete S.$$$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.")},bL=_=>_===0?Po.toHandle(iE()):(_=wL(_),Po.toHandle(iE()[_])),EL=_=>{var S=zp.length;return zp.push(_),S},CL=(_,S)=>{for(var O=new Array(_),M=0;M<_;++M)O[M]=Wp(j[S+M*4>>2],"parameter "+M);return O},_L=Reflect.construct,SL=(_,S,O)=>{var M=[],q=_.toWireType(M,O);return M.length&&(j[S>>2]=Po.toHandle(M)),q},AL=(_,S,O)=>{var M=CL(_,S),q=M.shift();_--;var Q=new Array(_),ae=(ye,_e,ke,Re)=>{for(var at=0,_t=0;_t<_;++_t)Q[_t]=M[_t].readValueFromPointer(Re+at),at+=M[_t].argPackAdvance;var Ht=O===1?_L(_e,Q):_e.apply(ye,Q);return SL(q,ke,Ht)},ie=`methodCaller<(${M.map(ye=>ye.name).join(", ")}) => ${q.name}>`;return EL(yc(ie,ae))},IL=_=>{_>9&&(Oo[_+1]+=1)},TL=_=>{var S=Po.toValue(_);Kn(S),$p(_)},xL=(_,S)=>{_=Wp(_,"_emval_take_value");var O=_.readValueFromPointer(S);return Po.toHandle(O)},kL=(_,S,O,M)=>{var q=new Date().getFullYear(),Q=new Date(q,0,1),ae=new Date(q,6,1),ie=Q.getTimezoneOffset(),ye=ae.getTimezoneOffset(),_e=Math.max(ie,ye);j[_>>2]=_e*60,F[S>>2]=+(ie!=ye);var ke=_t=>{var Ht=_t>=0?"-":"+",En=Math.abs(_t),cn=String(Math.floor(En/60)).padStart(2,"0"),un=String(En%60).padStart(2,"0");return`UTC${Ht}${cn}${un}`},Re=ke(ie),at=ke(ye);ye<ie?(vc(Re,O,17),vc(at,M,17)):(vc(Re,M,17),vc(at,O,17))},OL=()=>2147483648,PL=(_,S)=>Math.ceil(_/S)*S,RL=_=>{var S=C.buffer,O=(_-S.byteLength+65535)/65536|0;try{return C.grow(O),P(),1}catch{}},NL=_=>{var S=x.length;_>>>=0;var O=OL();if(_>O)return!1;for(var M=1;M<=4;M*=2){var q=S*(1+.2/M);q=Math.min(q,_+100663296);var Q=Math.min(O,PL(Math.max(_,q),65536)),ae=RL(Q);if(ae)return!0}return!1},Kp={},BL=()=>f||"./this.program",wc=()=>{if(!wc.strings){var _=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",S={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:_,_:BL()};for(var O in Kp)Kp[O]===void 0?delete S[O]:S[O]=Kp[O];var M=[];for(var O in S)M.push(`${O}=${S[O]}`);wc.strings=M}return wc.strings},ML=(_,S)=>{for(var O=0;O<_.length;++O)T[S++]=_.charCodeAt(O);T[S]=0},DL=(_,S)=>{var O=0;return wc().forEach((M,q)=>{var Q=S+O;j[_+q*4>>2]=Q,ML(M,Q),O+=M.length+1}),0},LL=(_,S)=>{var O=wc();j[_>>2]=O.length;var M=0;return O.forEach(q=>M+=q.length+1),j[S>>2]=M,0},FL=_=>52;function jL(_,S,O,M,q){return 70}var VL=[null,[],[]],UL=(_,S)=>{var O=VL[_];S===0||S===10?((_===1?v:b)(rE(O)),O.length=0):O.push(S)},HL=(_,S,O,M)=>{for(var q=0,Q=0;Q<O;Q++){var ae=j[S>>2],ie=j[S+4>>2];S+=8;for(var ye=0;ye<ie;ye++)UL(_,x[ae+ye]);q+=ie}return j[M>>2]=q,0},GL=_=>_;Fe=o.InternalError=class extends Error{constructor(_){super(_),this.name="InternalError"}},$s(),xo=o.BindingError=class extends Error{constructor(_){super(_),this.name="BindingError"}},AD(),ND(),Jb=o.UnboundTypeError=LD(Error,"UnboundTypeError"),GD();var qL={t:et,x:Pt,a:Dt,j:De,k:Yr,O:wn,q:Yn,ga:zn,d:Br,ca:co,va:mt,ba:$t,pa:Y,ta:FD,sa:VD,E:UD,oa:qD,F:WD,n:YD,W:KD,X:XD,y:JD,u:ZD,ua:tL,V:iL,P:fL,L:hL,wa:pL,qa:mL,ja:gL,T:yL,xa:$p,ya:bL,U:AL,Y:IL,Z:TL,ra:xL,da:kL,ha:NL,ea:DL,fa:LL,ia:FL,$:jL,S:HL,J:dF,C:hF,Q:KL,R:bF,r:aF,b:$L,D:lF,la:mF,c:QL,ka:gF,h:zL,i:tF,s:nF,N:uF,w:oF,I:vF,K:cF,z:pF,H:EF,aa:_F,_:SF,l:JL,f:XL,e:YL,g:WL,M:wF,m:eF,ma:fF,p:rF,v:iF,na:sF,B:yF,o:ZL,G:CF,A:GL},Yt=he(),sE=_=>(sE=Yt.Ba)(_),Ro=o._free=_=>(Ro=o._free=Yt.Ca)(_),Xp=o._malloc=_=>(Xp=o._malloc=Yt.Ea)(_),aE=_=>(aE=Yt.Fa)(_),st=(_,S)=>(st=Yt.Ga)(_,S),cE=_=>(cE=Yt.Ha)(_),uE=_=>(uE=Yt.Ia)(_),lE=()=>(lE=Yt.Ja)(),dE=_=>(dE=Yt.Ka)(_),fE=_=>(fE=Yt.La)(_),hE=(_,S,O)=>(hE=Yt.Ma)(_,S,O);o.dynCall_viijii=(_,S,O,M,q,Q,ae)=>(o.dynCall_viijii=Yt.Na)(_,S,O,M,q,Q,ae);var pE=o.dynCall_jiii=(_,S,O,M)=>(pE=o.dynCall_jiii=Yt.Oa)(_,S,O,M);o.dynCall_jiji=(_,S,O,M,q)=>(o.dynCall_jiji=Yt.Pa)(_,S,O,M,q);var mE=o.dynCall_jiiii=(_,S,O,M,q)=>(mE=o.dynCall_jiiii=Yt.Qa)(_,S,O,M,q);o.dynCall_iiiiij=(_,S,O,M,q,Q,ae)=>(o.dynCall_iiiiij=Yt.Ra)(_,S,O,M,q,Q,ae),o.dynCall_iiiiijj=(_,S,O,M,q,Q,ae,ie,ye)=>(o.dynCall_iiiiijj=Yt.Sa)(_,S,O,M,q,Q,ae,ie,ye),o.dynCall_iiiiiijj=(_,S,O,M,q,Q,ae,ie,ye,_e)=>(o.dynCall_iiiiiijj=Yt.Ta)(_,S,O,M,q,Q,ae,ie,ye,_e);function $L(_,S){var O=ne();try{return ft(_)(S)}catch(M){if(pe(O),M!==M+0)throw M;st(1,0)}}function WL(_,S,O,M){var q=ne();try{ft(_)(S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function YL(_,S,O){var M=ne();try{ft(_)(S,O)}catch(q){if(pe(M),q!==q+0)throw q;st(1,0)}}function zL(_,S,O,M){var q=ne();try{return ft(_)(S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function KL(_,S,O,M,q){var Q=ne();try{return ft(_)(S,O,M,q)}catch(ae){if(pe(Q),ae!==ae+0)throw ae;st(1,0)}}function XL(_,S){var O=ne();try{ft(_)(S)}catch(M){if(pe(O),M!==M+0)throw M;st(1,0)}}function QL(_,S,O){var M=ne();try{return ft(_)(S,O)}catch(q){if(pe(M),q!==q+0)throw q;st(1,0)}}function JL(_){var S=ne();try{ft(_)()}catch(O){if(pe(S),O!==O+0)throw O;st(1,0)}}function ZL(_,S,O,M,q,Q,ae,ie,ye,_e,ke){var Re=ne();try{ft(_)(S,O,M,q,Q,ae,ie,ye,_e,ke)}catch(at){if(pe(Re),at!==at+0)throw at;st(1,0)}}function eF(_,S,O,M,q){var Q=ne();try{ft(_)(S,O,M,q)}catch(ae){if(pe(Q),ae!==ae+0)throw ae;st(1,0)}}function tF(_,S,O,M,q){var Q=ne();try{return ft(_)(S,O,M,q)}catch(ae){if(pe(Q),ae!==ae+0)throw ae;st(1,0)}}function nF(_,S,O,M,q,Q){var ae=ne();try{return ft(_)(S,O,M,q,Q)}catch(ie){if(pe(ae),ie!==ie+0)throw ie;st(1,0)}}function rF(_,S,O,M,q,Q){var ae=ne();try{ft(_)(S,O,M,q,Q)}catch(ie){if(pe(ae),ie!==ie+0)throw ie;st(1,0)}}function oF(_,S,O,M,q,Q,ae){var ie=ne();try{return ft(_)(S,O,M,q,Q,ae)}catch(ye){if(pe(ie),ye!==ye+0)throw ye;st(1,0)}}function iF(_,S,O,M,q,Q,ae,ie){var ye=ne();try{ft(_)(S,O,M,q,Q,ae,ie)}catch(_e){if(pe(ye),_e!==_e+0)throw _e;st(1,0)}}function sF(_,S,O,M,q,Q,ae,ie,ye){var _e=ne();try{ft(_)(S,O,M,q,Q,ae,ie,ye)}catch(ke){if(pe(_e),ke!==ke+0)throw ke;st(1,0)}}function aF(_){var S=ne();try{return ft(_)()}catch(O){if(pe(S),O!==O+0)throw O;st(1,0)}}function cF(_,S,O,M,q,Q,ae,ie,ye){var _e=ne();try{return ft(_)(S,O,M,q,Q,ae,ie,ye)}catch(ke){if(pe(_e),ke!==ke+0)throw ke;st(1,0)}}function uF(_,S,O,M,q,Q,ae){var ie=ne();try{return ft(_)(S,O,M,q,Q,ae)}catch(ye){if(pe(ie),ye!==ye+0)throw ye;st(1,0)}}function lF(_,S,O,M){var q=ne();try{return ft(_)(S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function dF(_,S,O,M){var q=ne();try{return ft(_)(S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function fF(_,S,O,M,q,Q,ae,ie){var ye=ne();try{ft(_)(S,O,M,q,Q,ae,ie)}catch(_e){if(pe(ye),_e!==_e+0)throw _e;st(1,0)}}function hF(_,S,O,M,q,Q){var ae=ne();try{return ft(_)(S,O,M,q,Q)}catch(ie){if(pe(ae),ie!==ie+0)throw ie;st(1,0)}}function pF(_,S,O,M,q,Q,ae,ie,ye,_e){var ke=ne();try{return ft(_)(S,O,M,q,Q,ae,ie,ye,_e)}catch(Re){if(pe(ke),Re!==Re+0)throw Re;st(1,0)}}function mF(_,S,O){var M=ne();try{return ft(_)(S,O)}catch(q){if(pe(M),q!==q+0)throw q;st(1,0)}}function gF(_,S,O,M,q){var Q=ne();try{return ft(_)(S,O,M,q)}catch(ae){if(pe(Q),ae!==ae+0)throw ae;st(1,0)}}function yF(_,S,O,M,q,Q,ae,ie,ye,_e){var ke=ne();try{ft(_)(S,O,M,q,Q,ae,ie,ye,_e)}catch(Re){if(pe(ke),Re!==Re+0)throw Re;st(1,0)}}function vF(_,S,O,M,q,Q,ae,ie){var ye=ne();try{return ft(_)(S,O,M,q,Q,ae,ie)}catch(_e){if(pe(ye),_e!==_e+0)throw _e;st(1,0)}}function wF(_,S,O,M,q,Q,ae){var ie=ne();try{ft(_)(S,O,M,q,Q,ae)}catch(ye){if(pe(ie),ye!==ye+0)throw ye;st(1,0)}}function bF(_,S,O,M){var q=ne();try{return ft(_)(S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function EF(_,S,O,M,q,Q,ae,ie,ye,_e,ke,Re){var at=ne();try{return ft(_)(S,O,M,q,Q,ae,ie,ye,_e,ke,Re)}catch(_t){if(pe(at),_t!==_t+0)throw _t;st(1,0)}}function CF(_,S,O,M,q,Q,ae,ie,ye,_e,ke,Re,at,_t,Ht,En){var cn=ne();try{ft(_)(S,O,M,q,Q,ae,ie,ye,_e,ke,Re,at,_t,Ht,En)}catch(un){if(pe(cn),un!==un+0)throw un;st(1,0)}}function _F(_,S,O,M){var q=ne();try{return pE(_,S,O,M)}catch(Q){if(pe(q),Q!==Q+0)throw Q;st(1,0)}}function SF(_,S,O,M,q){var Q=ne();try{return mE(_,S,O,M,q)}catch(ae){if(pe(Q),ae!==ae+0)throw ae;st(1,0)}}var Ql,gE;$=function _(){Ql||yE(),Ql||($=_)};function yE(){if(ve>0||!gE&&(gE=1,re(),ve>0))return;function _(){var S;Ql||(Ql=1,o.calledRun=1,!A&&(oe(),i(o),(S=o.onRuntimeInitialized)===null||S===void 0||S.call(o),ce()))}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 yE(),r=a,r}})();function $O(e){return ip(sp,e)}async function WO(e,t){return GO(sp,e,t)}async function YO(e,t){return qO(sp,e,t)}const mw=[["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"]],zO=[...mw,["unknown"]].map(e=>e[0]),ap=new Map(mw);function KO(e){for(const[t,n]of ap)if(e===n)return t;return"unknown"}function XO(e){if(gw(e))return{width:e.naturalWidth,height:e.naturalHeight};if(yw(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(vw(e))return{width:e.videoWidth,height:e.videoHeight};if(bw(e))return{width:e.width,height:e.height};if(Cw(e))return{width:e.displayWidth,height:e.displayHeight};if(ww(e))return{width:e.width,height:e.height};if(Ew(e))return{width:e.width,height:e.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 gw(e){var t,n;try{return e instanceof((n=(t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)==null?void 0:n.HTMLImageElement)}catch{return!1}}function yw(e){var t,n;try{return e instanceof((n=(t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)==null?void 0:n.SVGImageElement)}catch{return!1}}function vw(e){var t,n;try{return e instanceof((n=(t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)==null?void 0:n.HTMLVideoElement)}catch{return!1}}function ww(e){var t,n;try{return e instanceof((n=(t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)==null?void 0:n.HTMLCanvasElement)}catch{return!1}}function bw(e){try{return e instanceof ImageBitmap||Object.prototype.toString.call(e)==="[object ImageBitmap]"}catch{return!1}}function Ew(e){try{return e instanceof OffscreenCanvas||Object.prototype.toString.call(e)==="[object OffscreenCanvas]"}catch{return!1}}function Cw(e){try{return e instanceof VideoFrame||Object.prototype.toString.call(e)==="[object VideoFrame]"}catch{return!1}}function _w(e){try{return e instanceof Blob||Object.prototype.toString.call(e)==="[object Blob]"}catch{return!1}}function QO(e){try{return e instanceof ImageData||Object.prototype.toString.call(e)==="[object ImageData]"}catch{return!1}}function JO(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}async function Sw(e){if(gw(e)&&!await nP(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(yw(e)&&!await rP(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Cw(e)&&oP(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(vw(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(bw(e)&&sP(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=XO(e);if(t===0||n===0)return null;const r=JO(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ZO(e){let t;try{if(globalThis.createImageBitmap)t=await createImageBitmap(e);else if(globalThis.Image){t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Sw(t)}function eP(e){const{width:t,height:n}=e;if(t===0||n===0)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function tP(e){if(_w(e))return await ZO(e);if(QO(e)){if(iP(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return ww(e)||Ew(e)?eP(e):await Sw(e)}async function nP(e){try{return await e.decode(),!0}catch{return!1}}async function rP(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function oP(e){return e.format===null}function iP(e){return e.data.buffer.byteLength===0}function sP(e){return e.width===0&&e.height===0}function Aw(e,t){return aP(e)?new DOMException(`${t}: ${e.message}`,e.name):cP(e)?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}function aP(e){return e instanceof DOMException||Object.prototype.toString.call(e)==="[object DOMException]"}function cP(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}var El;let cp=class extends EventTarget{constructor(t={}){var n;super(),RO(this,El);try{const r=(n=t==null?void 0:t.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(!ap.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.`);NO(this,El,r??[]),$O().then(o=>{this.dispatchEvent(new CustomEvent("load",{detail:o}))}).catch(o=>{this.dispatchEvent(new CustomEvent("error",{detail:o}))})}catch(r){throw Aw(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return zO.filter(t=>t!=="unknown")}async detect(t){try{const n=await tP(t);if(n===null)return[];let r;const o={tryHarder:!0,returnCodabarStartEnd:!0,formats:PO(this,El).map(i=>ap.get(i))};try{_w(n)?r=await WO(n,o):r=await YO(n,o)}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:s,y:a},topRight:{x:c,y:u},bottomLeft:{x:d,y:h},bottomRight:{x:f,y:p}}=i.position,l=Math.min(s,c,d,f),m=Math.min(a,u,h,p),g=Math.max(s,c,d,f),y=Math.max(a,u,h,p);return{boundingBox:new DOMRectReadOnly(l,m,g-l,y-m),rawValue:i.text,format:KO(i.format),cornerPoints:[{x:s,y:a},{x:c,y:u},{x:f,y:p},{x:d,y:h}]}})}catch(n){throw Aw(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}};El=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=cp);function uP(e){const{onClick:t,disabled:n,className:r}=e,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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 lP(e){const{onClick:t,disabled:n,className:r}=e,o={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:o,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.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"}),k.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 dP(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[o,i]=k.useState(!1);function s(){i(!0),t?r():n(),setTimeout(()=>i(!1),1e3)}return k.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:o?"default":"pointer"}},t?k.createElement(uP,{disabled:o,onClick:s}):k.createElement(lP,{disabled:o,onClick:s}))}function fP(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.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 hP(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.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 pP(e){const{status:t,scanning:n,torchToggle:r}=e;function o(i){r(i)}return n&&r?k.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?k.createElement(hP,{onClick:()=>o(!1)}):k.createElement(fP,{onClick:()=>o(!0)})):null}function mP(e){const{onClick:t,className:n,disabled:r=!1}=e,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg"},k.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 gP(e){const{onClick:t,className:n,disabled:r=!1}=e,o={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:o,xmlns:"http://www.w3.org/2000/svg"},k.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 yP(e){const{scanning:t,capabilities:n,onZoom:r,value:o}=e;if(!t||!r)return null;const i=(n.max-n.min)/3;return k.createElement(k.Fragment,null,k.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(gP,{disabled:o<=n.min,onClick:function(){r(Math.max(o-i,n.min))}})),k.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(mP,{disabled:o>=n.max,onClick:function(){r(Math.min(o+i,n.max))}})))}function vP(e){const{scanning:t,loading:n,capabilities:r,border:o=35,onOff:i,torch:s,zoom:a,startScanning:c,stopScanning:u}=e,d="rgba(255, 0, 0, 0.5)";return k.createElement("div",{style:{position:"relative"}},k.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&&k.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",k.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),k.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:d,strokeWidth:3})),i&&k.createElement(dP,{scanning:t,startScanning:c,stopScanning:u}),s&&r.torch&&k.createElement(pP,{scanning:t,status:s.status,torchToggle:s.toggle}),a&&r.zoom&&k.createElement(yP,{scanning:t,capabilities:r.zoom,value:a.value,onZoom:a.onChange}))}const wP={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},bP={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},EP={width:"100%",height:"100%",position:"relative"},CP={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var _P=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=nO(window);switch(e.browser){case"chrome":hO(window,e);break;case"firefox":yO(window,e);break;case"safari":EO(window,e);break;default:throw new Error("Unsupported browser")}});const SP="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znO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qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var rc=e=>e instanceof Date,Iw=e=>e==null;const Tw=e=>typeof e=="object";var xw=e=>!Iw(e)&&!Array.isArray(e)&&Tw(e)&&!rc(e),kw=e=>Iw(e)||!Tw(e);function Ow(e,t){if(kw(e)||kw(t))return e===t;if(rc(e)&&rc(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){const i=e[o];if(!r.includes(o))return!1;if(o!=="ref"){const s=t[o];if(rc(i)&&rc(s)||xw(i)&&xw(s)||Array.isArray(i)&&Array.isArray(s)?!Ow(i,s):i!==s)return!1}}return!0}function Cl(e){if(e===null)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(t===null)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function AP(e){var t;const{onScan:n,constraints:r,formats:o=["qr_code"],paused:i=!1,components:s,children:a,styles:c,classNames:u,allowMultiple:d,scanDelay:h,onError:f}=e,p=k.useRef(null),l=k.useRef(null),m=k.useRef(null),g=k.useMemo(()=>({...wP,...r}),[r]),y=k.useMemo(()=>({...bP,...s}),[s]),[v,b]=k.useState(!1),[E,C]=k.useState(!0),[A,T]=k.useState(g),x=function(){const H=k.useRef(Promise.resolve({type:"stop",data:{}})),P=k.useRef(null),V=k.useRef(null),[z,X]=k.useState({}),[re,oe]=k.useState({}),ce=k.useCallback(async($,W)=>{var Z,I,L;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((Z=navigator==null?void 0:navigator.mediaDevices)===null||Z===void 0?void 0:Z.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");_P();const U=await navigator.mediaDevices.getUserMedia({audio:!1,video:W});$.srcObject!==void 0?$.srcObject=U:$.mozSrcObject!==void 0?$.mozSrcObject=U:window.URL.createObjectURL?$.src=window.URL.createObjectURL(U):window.webkitURL?$.src=window.webkitURL.createObjectURL(U):$.src=U.id,await Promise.race([$.play(),new Promise(ee=>setTimeout(ee,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(ee=>setTimeout(ee,500));const[N]=U.getVideoTracks();return oe(N.getSettings()),X((L=(I=N==null?void 0:N.getCapabilities)===null||I===void 0?void 0:I.call(N))!==null&&L!==void 0?L:{}),P.current=U,V.current=N,{type:"start",data:{videoEl:$,stream:U,constraints:W}}},[]),we=k.useCallback(async($,W)=>{$.src="",$.srcObject=null,$.load();for(const Z of W.getTracks())W.removeTrack(Z),Z.stop();return P.current=null,V.current=null,oe({}),{type:"stop",data:{}}},[]),de=k.useCallback(async($,{constraints:W,restart:Z=!1})=>{if(H.current=H.current.then(I=>{if(I.type==="start"){const{data:{videoEl:L,stream:U,constraints:N}}=I;return Z||$!==L||W!==N?we(L,U).then(()=>ce($,W)):I}return ce($,W)}),(await H.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[ce,we]),Ee=k.useCallback(async()=>{if(H.current=H.current.then($=>{if($.type==="stop")return $;const{data:{videoEl:W,stream:Z}}=$;return we(W,Z)}),(await H.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[we]),ve=k.useCallback(async $=>{const W=V.current;if(!W)throw new Error("No active video track found.");{$.advanced&&$.advanced[0].zoom&&W.getCapabilities().torch&&await W.applyConstraints({advanced:[{torch:!1}]}),await W.applyConstraints($);const Z=W.getCapabilities(),I=W.getSettings();X(Z),oe(I)}},[]);return k.useEffect(()=>()=>{(async()=>await Ee())()},[Ee]),{capabilities:z,settings:re,startCamera:de,stopCamera:Ee,updateConstraints:ve}}(),{startScanning:R,stopScanning:B}=function(H){const{videoElementRef:P,onScan:V,onFound:z,retryDelay:X=100,scanDelay:re=0,formats:oe=[],audio:ce=!0,allowMultiple:we=!1}=H,de=k.useRef(new cp({formats:oe})),Ee=k.useRef(null),ve=k.useRef(null);k.useEffect(()=>{de.current=new cp({formats:oe})},[oe]),k.useEffect(()=>{typeof window<"u"&&ce&&(Ee.current=new Audio(SP))},[ce]);const $=k.useCallback(W=>async Z=>{if(P.current!==null&&P.current.readyState>1){const{lastScan:I,contentBefore:L,lastScanHadContent:U}=W;if(Z-I<X)ve.current=window.requestAnimationFrame($(W));else{const N=await de.current.detect(P.current),ee=N.some(me=>!L.includes(me.rawValue)),J=N.length>0;let te=W.lastOnScan;(ee||we&&J&&Z-te>=re)&&(ce&&Ee.current&&Ee.current.paused&&Ee.current.play().catch(me=>console.error("Error playing the sound",me)),te=Z,V(N)),J&&z(N),!J&&U&&z(N);const K={lastScan:Z,lastOnScan:te,lastScanHadContent:J,contentBefore:ee?N.map(me=>me.rawValue):L};ve.current=window.requestAnimationFrame($(K))}}},[P.current,V,z,X]);return{startScanning:k.useCallback(()=>{const W=performance.now(),Z={lastScan:W,lastOnScan:W,contentBefore:[],lastScanHadContent:!1};ve.current=window.requestAnimationFrame($(Z))},[$]),stopScanning:k.useCallback(()=>{ve.current!==null&&(window.cancelAnimationFrame(ve.current),ve.current=null)},[])}}({videoElementRef:p,onScan:n,onFound:H=>function(P,V,z,X){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 oe=V;if(oe==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(P.length===0||X===void 0)Cl(re);else{const ce=oe.offsetWidth,we=oe.offsetHeight,de=oe.videoWidth,Ee=oe.videoHeight,ve=Math.max(ce/de,we/Ee),$=de*ve,W=Ee*ve,Z=$/de,I=W/Ee,L=(ce-$)/2,U=(we-W)/2,N=({x:K,y:me})=>({x:Math.floor(K*Z),y:Math.floor(me*I)}),ee=({x:K,y:me})=>({x:Math.floor(K+L),y:Math.floor(me+U)}),J=P.map(K=>{const{boundingBox:me,cornerPoints:be}=K,{x:he,y:le}=ee(N({x:me.x,y:me.y})),{x:pe,y:ne}=N({x:me.width,y:me.height});return{...K,cornerPoints:be.map(Te=>ee(N(Te))),boundingBox:DOMRectReadOnly.fromRect({x:he,y:le,width:pe,height:ne})}});re.width=oe.offsetWidth,re.height=oe.offsetHeight;const te=re.getContext("2d");if(te===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");X(J,te)}}(H,p.current,m.current,y.tracker),formats:o,audio:y.audio,allowMultiple:d,retryDelay:y.tracker===void 0?500:10,scanDelay:h});k.useEffect(()=>(b(!0),()=>{b(!1)}),[]),k.useEffect(()=>{v&&(B(),R())},[s==null?void 0:s.tracker]),k.useEffect(()=>{if(!Ow(g,A)){const H=g;r!=null&&r.deviceId&&delete H.facingMode,T(H)}},[r]);const F=k.useMemo(()=>({constraints:A,shouldStream:v&&!i}),[A,v,i]),j=async()=>{const H=p.current;if(H==null)throw new Error("Video should be defined when component is mounted.");const P=l.current;if(P==null)throw new Error("Canvas should be defined when component is mounted.");const V=P.getContext("2d");if(V==null)throw new Error("Canvas should be defined when component is mounted.");if(F.shouldStream){await x.stopCamera(),C(!1);try{await x.startCamera(H,F),H?C(!0):await x.stopCamera()}catch(z){f==null||f(z),console.error("error",z)}}else P.width=H.videoWidth,P.height=H.videoHeight,V.drawImage(H,0,0,H.videoWidth,H.videoHeight),await x.stopCamera(),C(!1)};k.useEffect(()=>{(async()=>await j())()},[F]);const G=k.useMemo(()=>F.shouldStream&&E,[F.shouldStream,E]);return k.useEffect(()=>{if(G){if(l.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(Cl(l.current),m.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(Cl(m.current),p.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");R()}},[G]),k.createElement("div",{style:{...EP,...c==null?void 0:c.container},className:u==null?void 0:u.container},k.createElement("video",{ref:p,style:{...CP,...c==null?void 0:c.video,visibility:i?"hidden":"visible"},className:u==null?void 0:u.video,autoPlay:!0,muted:!0,playsInline:!0}),k.createElement("canvas",{ref:l,style:{display:i?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),k.createElement("canvas",{ref:m,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),k.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},y.finder&&k.createElement(vP,{scanning:E,capabilities:x.capabilities,loading:!1,onOff:y.onOff,zoom:y.zoom&&x.settings.zoom?{value:x.settings.zoom,onChange:async H=>{const P={...A,advanced:[{zoom:H}]};await x.updateConstraints(P)}}:void 0,torch:y.torch?{status:(t=x.settings.torch)!==null&&t!==void 0&&t,toggle:async H=>{const P={...A,advanced:[{torch:H}]};await x.updateConstraints(P)}}:void 0,startScanning:async()=>await j(),stopScanning:async()=>{await x.stopCamera(),Cl(m.current),C(!1)},border:c==null?void 0:c.finderBorder}),a))}function IP(){const[e,t]=k.useState([]);return k.useEffect(()=>{(async()=>t(await async function(){return(await navigator.mediaDevices.enumerateDevices()).filter(({kind:n})=>n==="videoinput")}()))()},[]),e}const Pw=k.createContext({cameraService:1,cameraFacingMode:Zn.USER,primaryIdentificationMethod:zi.IDENTIFIER});function mn(){const e=k.useContext(Pw);if(!e)throw new Error("Only use 'useConfigurationContext' within a ConfigurationContext Provider");return e}const up="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 Rw({onScan:e}){const{cameraFacingMode:t}=mn(),[n,r]=k.useState(t??Zn.USER);return w.jsxs("div",{className:"relative w-full",children:[w.jsx("div",{className:"scale-x-[-1]",children:w.jsx(AP,{components:{finder:!1},onScan:o=>e(o[0].rawValue),constraints:{facingMode:n},allowMultiple:!0,classNames:{video:"rounded",container:"max-h-[calc(100vh-381px)] min-h-[267px] overflow-hidden rounded"},onError:o=>{console.log(o),fu(o)}})}),w.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:()=>n===Zn.USER?r(Zn.ENVIRONMENT):r(Zn.USER),children:w.jsx("img",{src:up,alt:"camera-switch"})})]})}var _l,lp,TP=(_l=function(e,t){return _l=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])},_l(e,t)},function(e,t){function n(){this.constructor=e}_l(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}),xP=function(e){function t(n){var r,o,i,s=this.constructor,a=e.call(this,n)||this;return Object.defineProperty(a,"name",{value:s.name,enumerable:!1,configurable:!0}),r=a,o=s.prototype,(i=Object.setPrototypeOf)?i(r,o):r.__proto__=o,function(c,u){u===void 0&&(u=c.constructor);var d=Error.captureStackTrace;d&&d(c,u)}(a),a}return TP(t,e),t}(Error),kP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),or=function(e){function t(n){n===void 0&&(n=void 0);var r=e.call(this,n)||this;return r.message=n,r}return kP(t,e),t.prototype.getKind=function(){return this.constructor.kind},t.kind="Exception",t}(xP),OP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qt=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return OP(t,e),t.kind="ArgumentException",t}(or),PP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ge=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return PP(t,e),t.kind="IllegalArgumentException",t}(or),Nw=function(){function e(t){if(this.binarizer=t,t===null)throw new Ge("Binarizer must be non-null.")}return e.prototype.getWidth=function(){return this.binarizer.getWidth()},e.prototype.getHeight=function(){return this.binarizer.getHeight()},e.prototype.getBlackRow=function(t,n){return this.binarizer.getBlackRow(t,n)},e.prototype.getBlackMatrix=function(){return this.matrix!==null&&this.matrix!==void 0||(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},e.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},e.prototype.crop=function(t,n,r,o){var i=this.binarizer.getLuminanceSource().crop(t,n,r,o);return new e(this.binarizer.createBinarizer(i))},e.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},e.prototype.rotateCounterClockwise=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new e(this.binarizer.createBinarizer(t))},e.prototype.rotateCounterClockwise45=function(){var t=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new e(this.binarizer.createBinarizer(t))},e.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},e}(),RP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return RP(t,e),t.getChecksumInstance=function(){return new t},t.kind="ChecksumException",t}(or),NP=function(){function e(t){this.source=t}return e.prototype.getLuminanceSource=function(){return this.source},e.prototype.getWidth=function(){return this.source.getWidth()},e.prototype.getHeight=function(){return this.source.getHeight()},e}(),Ut=function(){function e(){}return e.arraycopy=function(t,n,r,o,i){for(;i--;)r[o++]=t[n++]},e.currentTimeMillis=function(){return Date.now()},e}(),BP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dp=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return BP(t,e),t.kind="IndexOutOfBoundsException",t}(or),MP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bw=function(e){function t(n,r){n===void 0&&(n=void 0),r===void 0&&(r=void 0);var o=e.call(this,r)||this;return o.index=n,o.message=r,o}return MP(t,e),t.kind="ArrayIndexOutOfBoundsException",t}(dp),DP=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},wr=function(){function e(){}return e.fill=function(t,n){for(var r=0,o=t.length;r<o;r++)t[r]=n},e.fillWithin=function(t,n,r,o){e.rangeCheck(t.length,n,r);for(var i=n;i<r;i++)t[i]=o},e.rangeCheck=function(t,n,r){if(n>r)throw new Ge("fromIndex("+n+") > toIndex("+r+")");if(n<0)throw new Bw(n);if(r>t)throw new Bw(r)},e.asList=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t},e.create=function(t,n,r){return Array.from({length:t}).map(function(o){return Array.from({length:n}).fill(r)})},e.createInt32Array=function(t,n,r){return Array.from({length:t}).map(function(o){return Int32Array.from({length:n}).fill(r)})},e.equals=function(t,n){if(!t||!n||!t.length||!n.length||t.length!==n.length)return!1;for(var r=0,o=t.length;r<o;r++)if(t[r]!==n[r])return!1;return!0},e.hashCode=function(t){var n,r;if(t===null)return 0;var o=1;try{for(var i=DP(t),s=i.next();!s.done;s=i.next())o=31*o+s.value}catch(a){n={error:a}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o},e.fillUint8Array=function(t,n){for(var r=0;r!==t.length;r++)t[r]=n},e.copyOf=function(t,n){return t.slice(0,n)},e.copyOfUint8Array=function(t,n){if(t.length<=n){var r=new Uint8Array(n);return r.set(t),r}return t.slice(0,n)},e.copyOfRange=function(t,n,r){var o=r-n,i=new Int32Array(o);return Ut.arraycopy(t,n,i,0,o),i},e.binarySearch=function(t,n,r){r===void 0&&(r=e.numberComparator);for(var o=0,i=t.length-1;o<=i;){var s=i+o>>1,a=r(n,t[s]);if(a>0)o=s+1;else{if(!(a<0))return s;i=s-1}}return-o-1},e.numberComparator=function(t,n){return t-n},e}(),Rn=function(){function e(){}return e.numberOfTrailingZeros=function(t){var n;if(t===0)return 32;var r=31;return(n=t<<16)!==0&&(r-=16,t=n),(n=t<<8)!==0&&(r-=8,t=n),(n=t<<4)!==0&&(r-=4,t=n),(n=t<<2)!==0&&(r-=2,t=n),r-(t<<1>>>31)},e.numberOfLeadingZeros=function(t){if(t===0)return 32;var n=1;return!(t>>>16)&&(n+=16,t<<=16),!(t>>>24)&&(n+=8,t<<=8),!(t>>>28)&&(n+=4,t<<=4),!(t>>>30)&&(n+=2,t<<=2),n-=t>>>31},e.toHexString=function(t){return t.toString(16)},e.toBinaryString=function(t){return String(parseInt(String(t),2))},e.bitCount=function(t){return t=(t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135,t+=t>>>8,63&(t+=t>>>16)},e.truncDivision=function(t,n){return Math.trunc(t/n)},e.parseInt=function(t,n){return n===void 0&&(n=void 0),parseInt(t,n)},e.MIN_VALUE_32_BITS=-2147483648,e.MAX_VALUE=Number.MAX_SAFE_INTEGER,e}(),ao=function(){function e(t,n){t===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=t,this.bits=n??e.makeArray(t))}return e.prototype.getSize=function(){return this.size},e.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},e.prototype.ensureCapacity=function(t){if(t>32*this.bits.length){var n=e.makeArray(t);Ut.arraycopy(this.bits,0,n,0,this.bits.length),this.bits=n}},e.prototype.get=function(t){return(this.bits[Math.floor(t/32)]&1<<(31&t))!=0},e.prototype.set=function(t){this.bits[Math.floor(t/32)]|=1<<(31&t)},e.prototype.flip=function(t){this.bits[Math.floor(t/32)]^=1<<(31&t)},e.prototype.getNextSet=function(t){var n=this.size;if(t>=n)return n;var r=this.bits,o=Math.floor(t/32),i=r[o];i&=~((1<<(31&t))-1);for(var s=r.length;i===0;){if(++o===s)return n;i=r[o]}var a=32*o+Rn.numberOfTrailingZeros(i);return a>n?n:a},e.prototype.getNextUnset=function(t){var n=this.size;if(t>=n)return n;var r=this.bits,o=Math.floor(t/32),i=~r[o];i&=~((1<<(31&t))-1);for(var s=r.length;i===0;){if(++o===s)return n;i=~r[o]}var a=32*o+Rn.numberOfTrailingZeros(i);return a>n?n:a},e.prototype.setBulk=function(t,n){this.bits[Math.floor(t/32)]=n},e.prototype.setRange=function(t,n){if(n<t||t<0||n>this.size)throw new Ge;if(n!==t){n--;for(var r=Math.floor(t/32),o=Math.floor(n/32),i=this.bits,s=r;s<=o;s++){var a=(2<<(s<o?31:31&n))-(1<<(s>r?0:31&t));i[s]|=a}}},e.prototype.clear=function(){for(var t=this.bits.length,n=this.bits,r=0;r<t;r++)n[r]=0},e.prototype.isRange=function(t,n,r){if(n<t||t<0||n>this.size)throw new Ge;if(n===t)return!0;n--;for(var o=Math.floor(t/32),i=Math.floor(n/32),s=this.bits,a=o;a<=i;a++){var c=(2<<(a<i?31:31&n))-(1<<(a>o?0:31&t))&4294967295;if((s[a]&c)!==(r?c:0))return!1}return!0},e.prototype.appendBit=function(t){this.ensureCapacity(this.size+1),t&&(this.bits[Math.floor(this.size/32)]|=1<<(31&this.size)),this.size++},e.prototype.appendBits=function(t,n){if(n<0||n>32)throw new Ge("Num bits must be between 0 and 32");this.ensureCapacity(this.size+n);for(var r=n;r>0;r--)this.appendBit((t>>r-1&1)==1)},e.prototype.appendBitArray=function(t){var n=t.size;this.ensureCapacity(this.size+n);for(var r=0;r<n;r++)this.appendBit(t.get(r))},e.prototype.xor=function(t){if(this.size!==t.size)throw new Ge("Sizes don't match");for(var n=this.bits,r=0,o=n.length;r<o;r++)n[r]^=t.bits[r]},e.prototype.toBytes=function(t,n,r,o){for(var i=0;i<o;i++){for(var s=0,a=0;a<8;a++)this.get(t)&&(s|=1<<7-a),t++;n[r+i]=s}},e.prototype.getBitArray=function(){return this.bits},e.prototype.reverse=function(){for(var t=new Int32Array(this.bits.length),n=Math.floor((this.size-1)/32),r=n+1,o=this.bits,i=0;i<r;i++){var s=o[i];s=(s=(s=(s=(s=s>>1&1431655765|(1431655765&s)<<1)>>2&858993459|(858993459&s)<<2)>>4&252645135|(252645135&s)<<4)>>8&16711935|(16711935&s)<<8)>>16&65535|(65535&s)<<16,t[n-i]=s}if(this.size!==32*r){var a=32*r-this.size,c=t[0]>>>a;for(i=1;i<r;i++){var u=t[i];c|=u<<32-a,t[i-1]=c,c=u>>>a}t[r-1]=c}this.bits=t},e.makeArray=function(t){return new Int32Array(Math.floor((t+31)/32))},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.size===n.size&&wr.equals(this.bits,n.bits)},e.prototype.hashCode=function(){return 31*this.size+wr.hashCode(this.bits)},e.prototype.toString=function(){for(var t="",n=0,r=this.size;n<r;n++)!(7&n)&&(t+=" "),t+=this.get(n)?"X":".";return t},e.prototype.clone=function(){return new e(this.size,this.bits.slice())},e}();(function(e){e[e.OTHER=0]="OTHER",e[e.PURE_BARCODE=1]="PURE_BARCODE",e[e.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",e[e.TRY_HARDER=3]="TRY_HARDER",e[e.CHARACTER_SET=4]="CHARACTER_SET",e[e.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",e[e.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",e[e.ASSUME_GS1=7]="ASSUME_GS1",e[e.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",e[e.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",e[e.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(lp||(lp={}));var xt,Lt=lp,LP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),xe=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return LP(t,e),t.getFormatInstance=function(){return new t},t.kind="FormatException",t}(or),FP=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(e){e[e.Cp437=0]="Cp437",e[e.ISO8859_1=1]="ISO8859_1",e[e.ISO8859_2=2]="ISO8859_2",e[e.ISO8859_3=3]="ISO8859_3",e[e.ISO8859_4=4]="ISO8859_4",e[e.ISO8859_5=5]="ISO8859_5",e[e.ISO8859_6=6]="ISO8859_6",e[e.ISO8859_7=7]="ISO8859_7",e[e.ISO8859_8=8]="ISO8859_8",e[e.ISO8859_9=9]="ISO8859_9",e[e.ISO8859_10=10]="ISO8859_10",e[e.ISO8859_11=11]="ISO8859_11",e[e.ISO8859_13=12]="ISO8859_13",e[e.ISO8859_14=13]="ISO8859_14",e[e.ISO8859_15=14]="ISO8859_15",e[e.ISO8859_16=15]="ISO8859_16",e[e.SJIS=16]="SJIS",e[e.Cp1250=17]="Cp1250",e[e.Cp1251=18]="Cp1251",e[e.Cp1252=19]="Cp1252",e[e.Cp1256=20]="Cp1256",e[e.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",e[e.UTF8=22]="UTF8",e[e.ASCII=23]="ASCII",e[e.Big5=24]="Big5",e[e.GB18030=25]="GB18030",e[e.EUC_KR=26]="EUC_KR"})(xt||(xt={}));var fp,ir=function(){function e(t,n,r){for(var o,i,s=[],a=3;a<arguments.length;a++)s[a-3]=arguments[a];this.valueIdentifier=t,this.name=r,this.values=typeof n=="number"?Int32Array.from([n]):n,this.otherEncodingNames=s,e.VALUE_IDENTIFIER_TO_ECI.set(t,this),e.NAME_TO_ECI.set(r,this);for(var c=this.values,u=0,d=c.length;u!==d;u++){var h=c[u];e.VALUES_TO_ECI.set(h,this)}try{for(var f=FP(s),p=f.next();!p.done;p=f.next()){var l=p.value;e.NAME_TO_ECI.set(l,this)}}catch(m){o={error:m}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}return e.prototype.getValueIdentifier=function(){return this.valueIdentifier},e.prototype.getName=function(){return this.name},e.prototype.getValue=function(){return this.values[0]},e.getCharacterSetECIByValue=function(t){if(t<0||t>=900)throw new xe("incorect value");var n=e.VALUES_TO_ECI.get(t);if(n===void 0)throw new xe("incorect value");return n},e.getCharacterSetECIByName=function(t){var n=e.NAME_TO_ECI.get(t);if(n===void 0)throw new xe("incorect value");return n},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.getName()===n.getName()},e.VALUE_IDENTIFIER_TO_ECI=new Map,e.VALUES_TO_ECI=new Map,e.NAME_TO_ECI=new Map,e.Cp437=new e(xt.Cp437,Int32Array.from([0,2]),"Cp437"),e.ISO8859_1=new e(xt.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),e.ISO8859_2=new e(xt.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),e.ISO8859_3=new e(xt.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),e.ISO8859_4=new e(xt.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),e.ISO8859_5=new e(xt.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),e.ISO8859_6=new e(xt.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),e.ISO8859_7=new e(xt.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),e.ISO8859_8=new e(xt.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),e.ISO8859_9=new e(xt.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),e.ISO8859_10=new e(xt.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),e.ISO8859_11=new e(xt.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),e.ISO8859_13=new e(xt.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),e.ISO8859_14=new e(xt.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),e.ISO8859_15=new e(xt.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),e.ISO8859_16=new e(xt.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),e.SJIS=new e(xt.SJIS,20,"SJIS","Shift_JIS"),e.Cp1250=new e(xt.Cp1250,21,"Cp1250","windows-1250"),e.Cp1251=new e(xt.Cp1251,22,"Cp1251","windows-1251"),e.Cp1252=new e(xt.Cp1252,23,"Cp1252","windows-1252"),e.Cp1256=new e(xt.Cp1256,24,"Cp1256","windows-1256"),e.UnicodeBigUnmarked=new e(xt.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),e.UTF8=new e(xt.UTF8,26,"UTF8","UTF-8"),e.ASCII=new e(xt.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),e.Big5=new e(xt.Big5,28,"Big5"),e.GB18030=new e(xt.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),e.EUC_KR=new e(xt.EUC_KR,30,"EUC_KR","EUC-KR"),e}(),jP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sl=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return jP(t,e),t.kind="UnsupportedOperationException",t}(or),Bi=function(){function e(){}return e.decode=function(t,n){var r=this.encodingName(n);return this.customDecoder?this.customDecoder(t,r):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(r)?this.decodeFallback(t,r):new TextDecoder(r).decode(t)},e.shouldDecodeOnFallback=function(t){return!e.isBrowser()&&t==="ISO-8859-1"},e.encode=function(t,n){var r=this.encodingName(n);return this.customEncoder?this.customEncoder(t,r):typeof TextEncoder>"u"?this.encodeFallback(t):new TextEncoder().encode(t)},e.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},e.encodingName=function(t){return typeof t=="string"?t:t.getName()},e.encodingCharacterSet=function(t){return t instanceof ir?t:ir.getCharacterSetECIByName(t)},e.decodeFallback=function(t,n){var r=this.encodingCharacterSet(n);if(e.isDecodeFallbackSupported(r)){for(var o="",i=0,s=t.length;i<s;i++){var a=t[i].toString(16);a.length<2&&(a="0"+a),o+="%"+a}return decodeURIComponent(o)}if(r.equals(ir.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(t.buffer));throw new Sl("Encoding "+this.encodingName(n)+" not supported by fallback.")},e.isDecodeFallbackSupported=function(t){return t.equals(ir.UTF8)||t.equals(ir.ISO8859_1)||t.equals(ir.ASCII)},e.encodeFallback=function(t){for(var n=btoa(unescape(encodeURIComponent(t))).split(""),r=[],o=0;o<n.length;o++)r.push(n[o].charCodeAt(0));return new Uint8Array(r)},e}(),Sn=function(){function e(){}return e.castAsNonUtf8Char=function(t,n){n===void 0&&(n=null);var r=n?n.getName():this.ISO88591;return Bi.decode(new Uint8Array([t]),r)},e.guessEncoding=function(t,n){if(n!=null&&n.get(Lt.CHARACTER_SET)!==void 0)return n.get(Lt.CHARACTER_SET).toString();for(var r=t.length,o=!0,i=!0,s=!0,a=0,c=0,u=0,d=0,h=0,f=0,p=0,l=0,m=0,g=0,y=0,v=t.length>3&&t[0]===239&&t[1]===187&&t[2]===191,b=0;b<r&&(o||i||s);b++){var E=255&t[b];s&&(a>0?128&E?a--:s=!1:128&E&&(64&E?(a++,32&E?(a++,16&E?(a++,8&E?s=!1:d++):u++):c++):s=!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?(f++,l=0,++p>m&&(m=p)):E>127?(h++,p=0,++l>g&&(g=l)):(p=0,l=0))}return s&&a>0&&(s=!1),i&&h>0&&(i=!1),s&&(v||c+u+d>0)?e.UTF8:i&&(e.ASSUME_SHIFT_JIS||m>=3||g>=3)?e.SHIFT_JIS:o&&i?m===2&&f===2||10*y>=r?e.SHIFT_JIS:e.ISO88591:o?e.ISO88591:i?e.SHIFT_JIS:s?e.UTF8:e.PLATFORM_DEFAULT_ENCODING},e.format=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=-1;function i(a,c,u,d,h,f){if(a==="%%")return"%";if(n[++o]!==void 0){a=d?parseInt(d.substr(1)):void 0;var p,l=h?parseInt(h.substr(1)):void 0;switch(f){case"s":p=n[o];break;case"c":p=n[o][0];break;case"f":p=parseFloat(n[o]).toFixed(a);break;case"p":p=parseFloat(n[o]).toPrecision(a);break;case"e":p=parseFloat(n[o]).toExponential(a);break;case"x":p=parseInt(n[o]).toString(l||16);break;case"d":p=parseFloat(parseInt(n[o],l||10).toPrecision(a)).toFixed(0)}p=typeof p=="object"?JSON.stringify(p):(+p).toString(l);for(var m=parseInt(u),g=u&&u[0]+""=="0"?"0":" ";p.length<m;)p=c!==void 0?p+g:g+p;return p}}var s=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return t.replace(s,i)},e.getBytes=function(t,n){return Bi.encode(t,n)},e.getCharCode=function(t,n){return n===void 0&&(n=0),t.charCodeAt(n)},e.getCharAt=function(t){return String.fromCharCode(t)},e.SHIFT_JIS=ir.SJIS.getName(),e.GB2312="GB2312",e.ISO88591=ir.ISO8859_1.getName(),e.EUC_JP="EUC_JP",e.UTF8=ir.UTF8.getName(),e.PLATFORM_DEFAULT_ENCODING=e.UTF8,e.ASSUME_SHIFT_JIS=!1,e}(),Nt=function(){function e(t){t===void 0&&(t=""),this.value=t}return e.prototype.enableDecoding=function(t){return this.encoding=t,this},e.prototype.append=function(t){return typeof t=="string"?this.value+=t.toString():this.encoding?this.value+=Sn.castAsNonUtf8Char(t,this.encoding):this.value+=String.fromCharCode(t),this},e.prototype.appendChars=function(t,n,r){for(var o=n;n<n+r;o++)this.append(t[o]);return this},e.prototype.length=function(){return this.value.length},e.prototype.charAt=function(t){return this.value.charAt(t)},e.prototype.deleteCharAt=function(t){this.value=this.value.substr(0,t)+this.value.substring(t+1)},e.prototype.setCharAt=function(t,n){this.value=this.value.substr(0,t)+n+this.value.substr(t+1)},e.prototype.substring=function(t,n){return this.value.substring(t,n)},e.prototype.setLengthToZero=function(){this.value=""},e.prototype.toString=function(){return this.value},e.prototype.insert=function(t,n){this.value=this.value.substr(0,t)+n+this.value.substr(t+n.length)},e}(),Io=function(){function e(t,n,r,o){if(this.width=t,this.height=n,this.rowSize=r,this.bits=o,n==null&&(n=t),this.height=n,t<1||n<1)throw new Ge("Both dimensions must be greater than 0");r==null&&(r=Math.floor((t+31)/32)),this.rowSize=r,o==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return e.parseFromBooleanArray=function(t){for(var n=t.length,r=t[0].length,o=new e(r,n),i=0;i<n;i++)for(var s=t[i],a=0;a<r;a++)s[a]&&o.set(a,i);return o},e.parseFromString=function(t,n,r){if(t===null)throw new Ge("stringRepresentation cannot be null");for(var o=new Array(t.length),i=0,s=0,a=-1,c=0,u=0;u<t.length;)if(t.charAt(u)===`
|
|
141
141
|
`||t.charAt(u)==="\r"){if(i>s){if(a===-1)a=i-s;else if(i-s!==a)throw new Ge("row lengths do not match");s=i,c++}u++}else if(t.substring(u,u+n.length)===n)u+=n.length,o[i]=!0,i++;else{if(t.substring(u,u+r.length)!==r)throw new Ge("illegal character encountered: "+t.substring(u));u+=r.length,o[i]=!1,i++}if(i>s){if(a===-1)a=i-s;else if(i-s!==a)throw new Ge("row lengths do not match");c++}for(var d=new e(a,c),h=0;h<i;h++)o[h]&&d.set(Math.floor(h%a),Math.floor(h/a));return d},e.prototype.get=function(t,n){var r=n*this.rowSize+Math.floor(t/32);return(this.bits[r]>>>(31&t)&1)!=0},e.prototype.set=function(t,n){var r=n*this.rowSize+Math.floor(t/32);this.bits[r]|=1<<(31&t)&4294967295},e.prototype.unset=function(t,n){var r=n*this.rowSize+Math.floor(t/32);this.bits[r]&=~(1<<(31&t)&4294967295)},e.prototype.flip=function(t,n){var r=n*this.rowSize+Math.floor(t/32);this.bits[r]^=1<<(31&t)&4294967295},e.prototype.xor=function(t){if(this.width!==t.getWidth()||this.height!==t.getHeight()||this.rowSize!==t.getRowSize())throw new Ge("input matrix dimensions do not match");for(var n=new ao(Math.floor(this.width/32)+1),r=this.rowSize,o=this.bits,i=0,s=this.height;i<s;i++)for(var a=i*r,c=t.getRow(i,n).getBitArray(),u=0;u<r;u++)o[a+u]^=c[u]},e.prototype.clear=function(){for(var t=this.bits,n=t.length,r=0;r<n;r++)t[r]=0},e.prototype.setRegion=function(t,n,r,o){if(n<0||t<0)throw new Ge("Left and top must be nonnegative");if(o<1||r<1)throw new Ge("Height and width must be at least 1");var i=t+r,s=n+o;if(s>this.height||i>this.width)throw new Ge("The region must fit inside the matrix");for(var a=this.rowSize,c=this.bits,u=n;u<s;u++)for(var d=u*a,h=t;h<i;h++)c[d+Math.floor(h/32)]|=1<<(31&h)&4294967295},e.prototype.getRow=function(t,n){n==null||n.getSize()<this.width?n=new ao(this.width):n.clear();for(var r=this.rowSize,o=this.bits,i=t*r,s=0;s<r;s++)n.setBulk(32*s,o[i+s]);return n},e.prototype.setRow=function(t,n){Ut.arraycopy(n.getBitArray(),0,this.bits,t*this.rowSize,this.rowSize)},e.prototype.rotate180=function(){for(var t=this.getWidth(),n=this.getHeight(),r=new ao(t),o=new ao(t),i=0,s=Math.floor((n+1)/2);i<s;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)},e.prototype.getEnclosingRectangle=function(){for(var t=this.width,n=this.height,r=this.rowSize,o=this.bits,i=t,s=n,a=-1,c=-1,u=0;u<n;u++)for(var d=0;d<r;d++){var h=o[u*r+d];if(h!==0){if(u<s&&(s=u),u>c&&(c=u),32*d<i){for(var f=0;!(h<<31-f&4294967295);)f++;32*d+f<i&&(i=32*d+f)}if(32*d+31>a){for(f=31;!(h>>>f);)f--;32*d+f>a&&(a=32*d+f)}}}return a<i||c<s?null:Int32Array.from([i,s,a-i+1,c-s+1])},e.prototype.getTopLeftOnBit=function(){for(var t=this.rowSize,n=this.bits,r=0;r<n.length&&n[r]===0;)r++;if(r===n.length)return null;for(var o=r/t,i=r%t*32,s=n[r],a=0;!(s<<31-a&4294967295);)a++;return i+=a,Int32Array.from([i,o])},e.prototype.getBottomRightOnBit=function(){for(var t=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/t),i=32*Math.floor(r%t),s=n[r],a=31;!(s>>>a);)a--;return i+=a,Int32Array.from([i,o])},e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.getRowSize=function(){return this.rowSize},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;return this.width===n.width&&this.height===n.height&&this.rowSize===n.rowSize&&wr.equals(this.bits,n.bits)},e.prototype.hashCode=function(){var t=this.width;return t=31*(t=31*(t=31*(t=31*t+this.width)+this.height)+this.rowSize)+wr.hashCode(this.bits)},e.prototype.toString=function(t,n,r){return t===void 0&&(t="X "),n===void 0&&(n=" "),r===void 0&&(r=`
|
|
142
142
|
`),this.buildToString(t,n,r)},e.prototype.buildToString=function(t,n,r){for(var o=new Nt,i=0,s=this.height;i<s;i++){for(var a=0,c=this.width;a<c;a++)o.append(this.get(a,i)?t:n);o.append(r)}return o.toString()},e.prototype.clone=function(){return new e(this.width,this.height,this.rowSize,this.bits.slice())},e}(),VP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ge=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return VP(t,e),t.getNotFoundInstance=function(){return new t},t.kind="NotFoundException",t}(or),UP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),HP=function(e){function t(n){var r=e.call(this,n)||this;return r.luminances=t.EMPTY,r.buckets=new Int32Array(t.LUMINANCE_BUCKETS),r}return UP(t,e),t.prototype.getBlackRow=function(n,r){var o=this.getLuminanceSource(),i=o.getWidth();r==null||r.getSize()<i?r=new ao(i):r.clear(),this.initArrays(i);for(var s=o.getRow(n,this.luminances),a=this.buckets,c=0;c<i;c++)a[(255&s[c])>>t.LUMINANCE_SHIFT]++;var u=t.estimateBlackPoint(a);if(i<3)for(c=0;c<i;c++)(255&s[c])<u&&r.set(c);else{var d=255&s[0],h=255&s[1];for(c=1;c<i-1;c++){var f=255&s[c+1];(4*h-d-f)/2<u&&r.set(c),d=h,h=f}}return r},t.prototype.getBlackMatrix=function(){var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight(),i=new Io(r,o);this.initArrays(r);for(var s=this.buckets,a=1;a<5;a++)for(var c=Math.floor(o*a/5),u=n.getRow(c,this.luminances),d=Math.floor(4*r/5),h=Math.floor(r/5);h<d;h++)s[(255&u[h])>>t.LUMINANCE_SHIFT]++;var f=t.estimateBlackPoint(s),p=n.getMatrix();for(a=0;a<o;a++){var l=a*r;for(h=0;h<r;h++)(255&p[l+h])<f&&i.set(h,a)}return i},t.prototype.createBinarizer=function(n){return new t(n)},t.prototype.initArrays=function(n){this.luminances.length<n&&(this.luminances=new Uint8ClampedArray(n));for(var r=this.buckets,o=0;o<t.LUMINANCE_BUCKETS;o++)r[o]=0},t.estimateBlackPoint=function(n){for(var r=n.length,o=0,i=0,s=0,a=0;a<r;a++)n[a]>s&&(i=a,s=n[a]),n[a]>o&&(o=n[a]);var c=0,u=0;for(a=0;a<r;a++){var d=a-i;(l=n[a]*d*d)>u&&(c=a,u=l)}if(i>c){var h=i;i=c,c=h}if(c-i<=r/16)throw new ge;var f=c-1,p=-1;for(a=c-1;a>i;a--){var l,m=a-i;(l=m*m*(c-a)*(o-n[a]))>p&&(f=a,p=l)}return f<<t.LUMINANCE_SHIFT},t.LUMINANCE_BITS=5,t.LUMINANCE_SHIFT=8-t.LUMINANCE_BITS,t.LUMINANCE_BUCKETS=1<<t.LUMINANCE_BITS,t.EMPTY=Uint8ClampedArray.from([0]),t}(NP),GP=function(){var e=function(t,n){return e=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])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mw=function(e){function t(n){var r=e.call(this,n)||this;return r.matrix=null,r}return GP(t,e),t.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var n=this.getLuminanceSource(),r=n.getWidth(),o=n.getHeight();if(r>=t.MINIMUM_DIMENSION&&o>=t.MINIMUM_DIMENSION){var i=n.getMatrix(),s=r>>t.BLOCK_SIZE_POWER;r&t.BLOCK_SIZE_MASK&&s++;var a=o>>t.BLOCK_SIZE_POWER;o&t.BLOCK_SIZE_MASK&&a++;var c=t.calculateBlackPoints(i,s,a,r,o),u=new Io(r,o);t.calculateThresholdForBlock(i,s,a,r,o,c,u),this.matrix=u}else this.matrix=e.prototype.getBlackMatrix.call(this);return this.matrix},t.prototype.createBinarizer=function(n){return new t(n)},t.calculateThresholdForBlock=function(n,r,o,i,s,a,c){for(var u=s-t.BLOCK_SIZE,d=i-t.BLOCK_SIZE,h=0;h<o;h++){var f=h<<t.BLOCK_SIZE_POWER;f>u&&(f=u);for(var p=t.cap(h,2,o-3),l=0;l<r;l++){var m=l<<t.BLOCK_SIZE_POWER;m>d&&(m=d);for(var g=t.cap(l,2,r-3),y=0,v=-2;v<=2;v++){var b=a[p+v];y+=b[g-2]+b[g-1]+b[g]+b[g+1]+b[g+2]}var E=y/25;t.thresholdBlock(n,m,f,E,i,c)}}},t.cap=function(n,r,o){return n<r?r:n>o?o:n},t.thresholdBlock=function(n,r,o,i,s,a){for(var c=0,u=o*s+r;c<t.BLOCK_SIZE;c++,u+=s)for(var d=0;d<t.BLOCK_SIZE;d++)(255&n[u+d])<=i&&a.set(r+d,o+c)},t.calculateBlackPoints=function(n,r,o,i,s){for(var a=s-t.BLOCK_SIZE,c=i-t.BLOCK_SIZE,u=new Array(o),d=0;d<o;d++){u[d]=new Int32Array(r);var h=d<<t.BLOCK_SIZE_POWER;h>a&&(h=a);for(var f=0;f<r;f++){var p=f<<t.BLOCK_SIZE_POWER;p>c&&(p=c);for(var l=0,m=255,g=0,y=0,v=h*i+p;y<t.BLOCK_SIZE;y++,v+=i){for(var b=0;b<t.BLOCK_SIZE;b++){var E=255&n[v+b];l+=E,E<m&&(m=E),E>g&&(g=E)}if(g-m>t.MIN_DYNAMIC_RANGE)for(y++,v+=i;y<t.BLOCK_SIZE;y++,v+=i)for(b=0;b<t.BLOCK_SIZE;b++)l+=255&n[v+b]}var C=l>>2*t.BLOCK_SIZE_POWER;if(g-m<=t.MIN_DYNAMIC_RANGE&&(C=m/2,d>0&&f>0)){var A=(u[d-1][f]+2*u[d][f-1]+u[d-1][f-1])/4;m<A&&(C=A)}u[d][f]=C}}return u},t.BLOCK_SIZE_POWER=3,t.BLOCK_SIZE=1<<t.BLOCK_SIZE_POWER,t.BLOCK_SIZE_MASK=t.BLOCK_SIZE-1,t.MINIMUM_DIMENSION=5*t.BLOCK_SIZE,t.MIN_DYNAMIC_RANGE=24,t}(HP),oc=function(){function e(t,n){this.width=t,this.height=n}return e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.isCropSupported=function(){return!1},e.prototype.crop=function(t,n,r,o){throw new Sl("This luminance source does not support cropping.")},e.prototype.isRotateSupported=function(){return!1},e.prototype.rotateCounterClockwise=function(){throw new Sl("This luminance source does not support rotation by 90 degrees.")},e.prototype.rotateCounterClockwise45=function(){throw new Sl("This luminance source does not support rotation by 45 degrees.")},e.prototype.toString=function(){for(var t=new Uint8ClampedArray(this.width),n=new Nt,r=0;r<this.height;r++){for(var o=this.getRow(r,t),i=0;i<this.width;i++){var s=255&o[i],a=void 0;a=s<64?"#":s<128?"+":s<192?".":" ",n.append(a)}n.append(`
|