@leatcom/portal-sessions 0.0.108 → 0.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/portal-sessions.es.js +208 -207
- package/dist/portal-sessions.umd.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(yt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(yt=typeof globalThis<"u"?globalThis:yt||self,x(yt.PortalSessions={},yt.React,yt.ReactDOM))})(this,function(yt,x,Pi){"use strict";var dR=Object.defineProperty;var fR=(yt,x,Pi)=>x in yt?dR(yt,x,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):yt[x]=Pi;var $n=(yt,x,Pi)=>fR(yt,typeof x!="symbol"?x+"":x,Pi);try{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},x=new yt.Error().stack;x&&(yt._sentryDebugIds=yt._sentryDebugIds||{},yt._sentryDebugIds[x]="
|
|
1
|
+
(function(yt,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],x):(yt=typeof globalThis<"u"?globalThis:yt||self,x(yt.PortalSessions={},yt.React,yt.ReactDOM))})(this,function(yt,x,Pi){"use strict";var dR=Object.defineProperty;var fR=(yt,x,Pi)=>x in yt?dR(yt,x,{enumerable:!0,configurable:!0,writable:!0,value:Pi}):yt[x]=Pi;var $n=(yt,x,Pi)=>fR(yt,typeof x!="symbol"?x+"":x,Pi);try{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},x=new yt.Error().stack;x&&(yt._sentryDebugIds=yt._sentryDebugIds||{},yt._sentryDebugIds[x]="5d1ed12c-2997-4ef4-a7fc-8e9e542c8809",yt._sentryDebugIdIdentifier="sentry-dbid-5d1ed12c-2997-4ef4-a7fc-8e9e542c8809")}catch{}{let yt=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};yt._sentryModuleMetadata=yt._sentryModuleMetadata||{},yt._sentryModuleMetadata[new yt.Error().stack]=Object.assign({},yt._sentryModuleMetadata[new yt.Error().stack],{"_sentryBundlerPluginAppKey:portal-sessions-application-key":!0})}function Tw(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}function xw(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const ce=Tw(x);{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"eefe66b9c4ef910a08d372e8e0aff1ef33e62de5"}}var Jo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dl={exports:{}},_a={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -98,7 +98,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
98
98
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(H,W){if(H){if(typeof H=="string")return u(H,W);var J=Object.prototype.toString.call(H).slice(8,-1);return J==="Object"&&H.constructor&&(J=H.constructor.name),J==="Map"||J==="Set"?Array.from(H):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?u(H,W):void 0}}function u(H,W){(W==null||W>H.length)&&(W=H.length);for(var J=0,I=new Array(W);J<W;J++)I[J]=H[J];return I}function g(H){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},g(H)}function m(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,w(I.key),I)}}function y(H,W,J){return(W=w(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function w(H){var W=function(J,I){if(g(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I||"default");if(g(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(J)}(H,"string");return g(W)=="symbol"?W:W+""}f.r(h),f.d(h,{SimpleKeyboard:function(){return Ce},default:function(){return ye}}),f(5276),f(8598),f(4782),f(4554),f(2010),f(7427),f(6099),f(7495),f(8781),f(5440),f(744),f(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(H){if("Element"in H){var W="classList",J="prototype",I=H.Element[J],M=Object,F=String[J].trim||function(){return this.replace(/^\s+|\s+$/g,"")},B=Array[J].indexOf||function(fe){for(var he=0,ve=this.length;he<ve;he++)if(he in this&&this[he]===fe)return he;return-1},X=function(fe,he){this.name=fe,this.code=DOMException[fe],this.message=he},ee=function(fe,he){if(he==="")throw new X("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(he))throw new X("INVALID_CHARACTER_ERR","The token must not contain space characters.");return B.call(fe,he)},Z=function(fe){for(var he=F.call(fe.getAttribute("class")||""),ve=he?he.split(/\s+/):[],ue=0,Be=ve.length;ue<Be;ue++)this.push(ve[ue]);this._updateClassName=function(){fe.setAttribute("class",this.toString())}},$=Z[J]=[],pe=function(){return new Z(this)};if(X[J]=Error[J],$.item=function(fe){return this[fe]||null},$.contains=function(fe){return~ee(this,fe+"")},$.add=function(){var fe,he=arguments,ve=0,ue=he.length,Be=!1;do~ee(this,fe=he[ve]+"")||(this.push(fe),Be=!0);while(++ve<ue);Be&&this._updateClassName()},$.remove=function(){var fe,he,ve=arguments,ue=0,Be=ve.length,Re=!1;do for(he=ee(this,fe=ve[ue]+"");~he;)this.splice(he,1),Re=!0,he=ee(this,fe);while(++ue<Be);Re&&this._updateClassName()},$.toggle=function(fe,he){var ve=this.contains(fe),ue=ve?he!==!0&&"remove":he!==!1&&"add";return ue&&this[ue](fe),he===!0||he===!1?he:!ve},$.replace=function(fe,he){var ve=ee(fe+"");~ve&&(this.splice(ve,1,he),this._updateClassName())},$.toString=function(){return this.join(" ")},M.defineProperty){var be={get:pe,enumerable:!0,configurable:!0};try{M.defineProperty(I,W,be)}catch(fe){fe.number!==void 0&&fe.number!==-2146823252||(be.enumerable=!1,M.defineProperty(I,W,be))}}else M[J].__defineGetter__&&I.__defineGetter__(W,pe)}}(self),function(){var H=document.createElement("_");if(H.classList.add("c1","c2"),!H.classList.contains("c2")){var W=function(I){var M=DOMTokenList.prototype[I];DOMTokenList.prototype[I]=function(F){var B,X=arguments.length;for(B=0;B<X;B++)F=arguments[B],M.call(this,F)}};W("add"),W("remove")}if(H.classList.toggle("c3",!1),H.classList.contains("c3")){var J=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(I,M){return 1 in arguments&&!this.contains(I)==!M?M:J.call(this,I)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(I,M){var F=this.toString().split(" "),B=F.indexOf(I+"");~B&&(F=F.slice(B),this.remove.apply(this,F),this.add(M),this.add.apply(this,F.slice(1)))}),H=null}()),f(2675),f(9463),f(2259),f(5700),f(8706),f(2008),f(3418),f(4423),f(3792),f(2062),f(6910),f(739),f(9572),f(2892),f(9085),f(3851),f(1278),f(9432),f(4864),f(1699),f(7764),f(8344),f(3500),f(2953),f(2712),f(2637),f(1480),f(1761);var b=function(){return H=function I(M){var F=M.getOptions,B=M.getCaretPosition,X=M.getCaretPositionEnd,ee=M.dispatch;(function(Z,$){if(!(Z instanceof $))throw new TypeError("Cannot call a class as a function")})(this,I),y(this,"getOptions",void 0),y(this,"getCaretPosition",void 0),y(this,"getCaretPositionEnd",void 0),y(this,"dispatch",void 0),y(this,"maxLengthReached",void 0),y(this,"isStandardButton",function(Z){return Z&&!(Z[0]==="{"&&Z[Z.length-1]==="}")}),this.getOptions=F,this.getCaretPosition=B,this.getCaretPositionEnd=X,this.dispatch=ee,I.bindMethods(I,this)},W=[{key:"getButtonType",value:function(I){return I.includes("{")&&I.includes("}")&&I!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(I){var M=this.getButtonType(I),F=I.replace("{","").replace("}",""),B="";return M!=="standardBtn"&&(B=" hg-button-".concat(F)),"hg-".concat(M).concat(B)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(I,M){return(M=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),M):M||this.getDefaultDiplay())[I]||I}},{key:"getUpdatedInput",value:function(I,M,F){var B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:F,X=arguments.length>4&&arguments[4]!==void 0&&arguments[4],ee=this.getOptions(),Z=[F,B,X],$=M;return(I==="{bksp}"||I==="{backspace}")&&$.length>0?$=this.removeAt.apply(this,[$].concat(Z)):(I==="{delete}"||I==="{forwarddelete}")&&$.length>0?$=this.removeForwardsAt.apply(this,[$].concat(Z)):I==="{space}"?$=this.addStringAt.apply(this,[$," "].concat(Z)):I!=="{tab}"||typeof ee.tabCharOnTab=="boolean"&&ee.tabCharOnTab===!1?I!=="{enter}"&&I!=="{numpadenter}"||!ee.newLineOnEnter?I.includes("numpad")&&Number.isInteger(Number(I[I.length-2]))?$=this.addStringAt.apply(this,[$,I[I.length-2]].concat(Z)):I==="{numpaddivide}"?$=this.addStringAt.apply(this,[$,"/"].concat(Z)):I==="{numpadmultiply}"?$=this.addStringAt.apply(this,[$,"*"].concat(Z)):I==="{numpadsubtract}"?$=this.addStringAt.apply(this,[$,"-"].concat(Z)):I==="{numpadadd}"?$=this.addStringAt.apply(this,[$,"+"].concat(Z)):I==="{numpaddecimal}"?$=this.addStringAt.apply(this,[$,"."].concat(Z)):I==="{"||I==="}"?$=this.addStringAt.apply(this,[$,I].concat(Z)):I.includes("{")||I.includes("}")||($=this.addStringAt.apply(this,[$,I].concat(Z))):$=this.addStringAt.apply(this,[$,`
|
|
99
99
|
`].concat(Z)):$=this.addStringAt.apply(this,[$," "].concat(Z)),ee.debug&&console.log("Input will be: "+$),$}},{key:"updateCaretPos",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],F=this.updateCaretPosAction(I,M);this.dispatch(function(B){B.setCaretPosition(F)})}},{key:"updateCaretPosAction",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],F=this.getOptions(),B=this.getCaretPosition();return B!=null&&(M?B>0&&(B-=I):B+=I),F.debug&&console.log("Caret at:",B),B}},{key:"addStringAt",value:function(I,M){var F,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:I.length,ee=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return B||B===0?(F=[I.slice(0,B),M,I.slice(X)].join(""),this.isMaxLengthReached()||ee&&this.updateCaretPos(M.length)):F=I+M,F}},{key:"removeAt",value:function(I){var M,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(F===0&&B===0)return I;if(F===B){var ee=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;F&&F>=0?I.substring(F-2,F).match(ee)?(M=I.substr(0,F-2)+I.substr(F),X&&this.updateCaretPos(2,!0)):(M=I.substr(0,F-1)+I.substr(F),X&&this.updateCaretPos(1,!0)):I.slice(-2).match(ee)?(M=I.slice(0,-2),X&&this.updateCaretPos(2,!0)):(M=I.slice(0,-1),X&&this.updateCaretPos(1,!0))}else M=I.slice(0,F)+I.slice(B),X&&this.dispatch(function(Z){Z.setCaretPosition(F)});return M}},{key:"removeForwardsAt",value:function(I){var M,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:I.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return I!=null&&I.length&&F!==null?(F===B?M=I.substring(F,F+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?I.substr(0,F)+I.substr(F+2):I.substr(0,F)+I.substr(F+1):(M=I.slice(0,F)+I.slice(B),X&&this.dispatch(function(ee){ee.setCaretPosition(F)})),M):I}},{key:"handleMaxLength",value:function(I,M){var F=this.getOptions(),B=F.maxLength,X=I[F.inputName||"default"],ee=M.length-1>=B;if(M.length<=X.length)return!1;if(Number.isInteger(B))return F.debug&&console.log("maxLength (num) reached:",ee),ee?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(g(B)==="object"){var Z=M.length-1>=B[F.inputName||"default"];return F.debug&&console.log("maxLength (obj) reached:",Z),Z?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(I){return I?I.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(M,F){return F.length?M+F[0].toUpperCase()+F.slice(1):M}):""}},{key:"chunkArray",value:function(I,M){return d(Array(Math.ceil(I.length/M))).map(function(F,B){return I.slice(M*B,M+M*B)})}},{key:"escapeRegex",value:function(I){return I.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(I,M){var F=I,B=M.indexOf("");return B<I&&B!=-1&&F--,M.indexOf("")<I&&B!=-1&&F--,F<0?0:F}}],J=[{key:"bindMethods",value:function(I,M){var F,B=function(ee,Z){var $=typeof Symbol<"u"&&ee[Symbol.iterator]||ee["@@iterator"];if(!$){if(Array.isArray(ee)||($=p(ee))||Z){$&&(ee=$);var pe=0,be=function(){};return{s:be,n:function(){return pe>=ee.length?{done:!0}:{done:!1,value:ee[pe++]}},e:function(ue){throw ue},f:be}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
100
100
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fe,he=!0,ve=!1;return{s:function(){$=$.call(ee)},n:function(){var ue=$.next();return he=ue.done,ue},e:function(ue){ve=!0,fe=ue},f:function(){try{he||$.return==null||$.return()}finally{if(ve)throw fe}}}}(Object.getOwnPropertyNames(I.prototype));try{for(B.s();!(F=B.n()).done;){var X=F.value;X==="constructor"||X==="bindMethods"||(M[X]=M[X].bind(M))}}catch(ee){B.e(ee)}finally{B.f()}}}],W&&m(H.prototype,W),J&&m(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}();y(b,"noop",function(){});var E=b;function C(H){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},C(H)}function S(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,P(I.key),I)}}function T(H,W,J){return(W=P(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function P(H){var W=function(J,I){if(C(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(C(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return C(W)=="symbol"?W:W+""}var N=function(){return H=function I(M){var F=this,B=M.dispatch,X=M.getOptions;(function(ee,Z){if(!(ee instanceof Z))throw new TypeError("Cannot call a class as a function")})(this,I),T(this,"getOptions",void 0),T(this,"dispatch",void 0),T(this,"isModifierKey",function(ee){return ee.altKey||ee.ctrlKey||ee.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(ee.code||ee.key||F.keyCodeToKey(ee==null?void 0:ee.keyCode))}),this.dispatch=B,this.getOptions=X,E.bindMethods(I,this)},(W=[{key:"handleHighlightKeyDown",value:function(I){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var F=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(B){var X,ee,Z=B.getButtonElement(F),$=B.getButtonElement("{".concat(F,"}"));if(Z)X=Z,ee=F;else{if(!$)return;X=$,ee="{".concat(F,"}")}var pe,be,fe,he,ve=function(Be){Be.style.background=M.physicalKeyboardHighlightBgColor||"#dadce4",Be.style.color=M.physicalKeyboardHighlightTextColor||"black"};if(X)if(Array.isArray(X)){if(X.forEach(function(Be){return ve(Be)}),M.physicalKeyboardHighlightPress)if(M.physicalKeyboardHighlightPressUsePointerEvents)(pe=X[0])===null||pe===void 0||(be=pe.onpointerdown)===null||be===void 0||be.call(pe,I);else if(M.physicalKeyboardHighlightPressUseClick){var ue;(ue=X[0])===null||ue===void 0||ue.click()}else B.handleButtonClicked(ee,I)}else ve(X),M.physicalKeyboardHighlightPress&&(M.physicalKeyboardHighlightPressUsePointerEvents?(fe=X)===null||fe===void 0||(he=fe.onpointerdown)===null||he===void 0||he.call(fe,I):M.physicalKeyboardHighlightPressUseClick?X.click():B.handleButtonClicked(ee,I))})}},{key:"handleHighlightKeyUp",value:function(I){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(I)&&(I.preventDefault(),I.stopImmediatePropagation());var F=this.getSimpleKeyboardLayoutKey(I);this.dispatch(function(B){var X,ee,Z,$=B.getButtonElement(F)||B.getButtonElement("{".concat(F,"}")),pe=function(be){be.removeAttribute&&be.removeAttribute("style")};$&&(Array.isArray($)?($.forEach(function(be){return pe(be)}),M.physicalKeyboardHighlightPressUsePointerEvents&&((X=$[0])===null||X===void 0||(ee=X.onpointerup)===null||ee===void 0||ee.call(X,I))):(pe($),M.physicalKeyboardHighlightPressUsePointerEvents&&($==null||(Z=$.onpointerup)===null||Z===void 0||Z.call($,I))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(I){var M,F="",B=I.code||I.key||this.keyCodeToKey(I==null?void 0:I.keyCode);return(F=B!=null&&B.includes("Numpad")||B!=null&&B.includes("Shift")||B!=null&&B.includes("Space")||B!=null&&B.includes("Backspace")||B!=null&&B.includes("Control")||B!=null&&B.includes("Alt")||B!=null&&B.includes("Meta")?I.code||"":I.key||this.keyCodeToKey(I==null?void 0:I.keyCode)||"").length>1?(M=F)===null||M===void 0?void 0:M.toLowerCase():F}},{key:"keyCodeToKey",value:function(I){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[I]||""}}])&&S(H.prototype,W),J&&S(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}();function L(H){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},L(H)}function U(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,K(I.key),I)}}function j(H,W,J){return(W=K(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function K(H){var W=function(J,I){if(L(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(L(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return L(W)=="symbol"?W:W+""}var G=function(){return H=function I(M){var F=M.utilities,B=M.options;(function(X,ee){if(!(X instanceof ee))throw new TypeError("Cannot call a class as a function")})(this,I),j(this,"utilities",void 0),j(this,"options",void 0),j(this,"candidateBoxElement",void 0),j(this,"pageIndex",0),j(this,"pageSize",void 0),this.utilities=F,this.options=B,E.bindMethods(I,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},W=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(I){var M=this,F=I.candidateValue,B=I.targetElement,X=I.onSelect;if(F&&F.length){var ee=this.utilities.chunkArray(F.split(" "),this.pageSize);this.renderPage({candidateListPages:ee,targetElement:B,pageIndex:this.pageIndex,nbPages:ee.length,onItemSelected:function(Z,$){X(Z,$),M.destroy()}})}}},{key:"renderPage",value:function(I){var M,F=this,B=I.candidateListPages,X=I.targetElement,ee=I.pageIndex,Z=I.nbPages,$=I.onItemSelected;(M=this.candidateBoxElement)===null||M===void 0||M.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var pe=document.createElement("ul");pe.className="hg-candidate-box-list",B[ee].forEach(function(Re){var at,xe=document.createElement("li"),De=function(){var Pe=new(F.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(Pe,"target",{value:xe}),Pe};xe.className="hg-candidate-box-list-item",xe.innerHTML=((at=F.options.display)===null||at===void 0?void 0:at[Re])||Re,F.options.useTouchEvents?xe.ontouchstart=function(Pe){return $(Re,Pe||De())}:xe.onclick=function(){var Pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:De();return $(Re,Pe)},pe.appendChild(xe)});var be=ee>0,fe=document.createElement("div");fe.classList.add("hg-candidate-box-prev"),be&&fe.classList.add("hg-candidate-box-btn-active");var he=function(){be&&F.renderPage({candidateListPages:B,targetElement:X,pageIndex:ee-1,nbPages:Z,onItemSelected:$})};this.options.useTouchEvents?fe.ontouchstart=he:fe.onclick=he,this.candidateBoxElement.appendChild(fe),this.candidateBoxElement.appendChild(pe);var ve=ee<Z-1,ue=document.createElement("div");ue.classList.add("hg-candidate-box-next"),ve&&ue.classList.add("hg-candidate-box-btn-active");var Be=function(){ve&&F.renderPage({candidateListPages:B,targetElement:X,pageIndex:ee+1,nbPages:Z,onItemSelected:$})};this.options.useTouchEvents?ue.ontouchstart=Be:ue.onclick=Be,this.candidateBoxElement.appendChild(ue),X.prepend(this.candidateBoxElement)}}],W&&U(H.prototype,W),J&&U(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}(),k=G;function V(H){return function(W){if(Array.isArray(W))return z(W)}(H)||function(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}(H)||function(W,J){if(W){if(typeof W=="string")return z(W,J);var I=Object.prototype.toString.call(W).slice(8,-1);return I==="Object"&&W.constructor&&(I=W.constructor.name),I==="Map"||I==="Set"?Array.from(W):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?z(W,J):void 0}}(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
101
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z(H,W){(W==null||W>H.length)&&(W=H.length);for(var J=0,I=new Array(W);J<W;J++)I[J]=H[J];return I}function te(H){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},te(H)}function re(H,W){var J=Object.keys(H);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(H);W&&(I=I.filter(function(M){return Object.getOwnPropertyDescriptor(H,M).enumerable})),J.push.apply(J,I)}return J}function ne(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,we(I.key),I)}}function se(H,W,J){return(W=we(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function we(H){var W=function(J,I){if(te(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(te(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return te(W)=="symbol"?W:W+""}var le=function(){return H=function I(M,F){var B=this;if(function(he,ve){if(!(he instanceof ve))throw new TypeError("Cannot call a class as a function")}(this,I),se(this,"input",void 0),se(this,"options",void 0),se(this,"utilities",void 0),se(this,"caretPosition",void 0),se(this,"caretPositionEnd",void 0),se(this,"keyboardDOM",void 0),se(this,"keyboardPluginClasses",void 0),se(this,"keyboardDOMClass",void 0),se(this,"buttonElements",void 0),se(this,"currentInstanceName",void 0),se(this,"allKeyboardInstances",void 0),se(this,"keyboardInstanceNames",void 0),se(this,"isFirstKeyboardInstance",void 0),se(this,"physicalKeyboard",void 0),se(this,"modules",void 0),se(this,"activeButtonClass",void 0),se(this,"holdInteractionTimeout",void 0),se(this,"holdTimeout",void 0),se(this,"isMouseHold",void 0),se(this,"initialized",void 0),se(this,"candidateBox",void 0),se(this,"keyboardRowsDOM",void 0),se(this,"defaultName","default"),se(this,"activeInputElement",null),se(this,"handleParams",function(he,ve){var ue,Be,Re;if(typeof he=="string")ue=he.split(".").join(""),Be=document.querySelector(".".concat(ue)),Re=ve;else if(he instanceof HTMLDivElement){if(!he.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ue=he.className.split(" ")[0],Be=he,Re=ve}else ue="simple-keyboard",Be=document.querySelector(".".concat(ue)),Re=he;return{keyboardDOMClass:ue,keyboardDOM:Be,options:Re}}),se(this,"getOptions",function(){return B.options}),se(this,"getCaretPosition",function(){return B.caretPosition}),se(this,"getCaretPositionEnd",function(){return B.caretPositionEnd}),se(this,"registerModule",function(he,ve){B.modules[he]||(B.modules[he]={}),ve(B.modules[he])}),se(this,"getKeyboardClassString",function(){for(var he=arguments.length,ve=new Array(he),ue=0;ue<he;ue++)ve[ue]=arguments[ue];return[B.keyboardDOMClass].concat(ve).filter(function(Be){return!!Be}).join(" ")}),typeof window<"u"){var X=this.handleParams(M,F),ee=X.keyboardDOMClass,Z=X.keyboardDOM,$=X.options,pe=$===void 0?{}:$;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Z,this.options=function(he){for(var ve=1;ve<arguments.length;ve++){var ue=arguments[ve]!=null?arguments[ve]:{};ve%2?re(Object(ue),!0).forEach(function(Be){se(he,Be,ue[Be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(he,Object.getOwnPropertyDescriptors(ue)):re(Object(ue)).forEach(function(Be){Object.defineProperty(he,Be,Object.getOwnPropertyDescriptor(ue,Be))})}return he}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(I,this);var be=this.options.inputName,fe=be===void 0?this.defaultName:be;if(this.input={},this.input[fe]="",this.keyboardDOMClass=ee,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new k({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(ee,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},W=[{key:"setCaretPosition",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I;this.caretPosition=I,this.caretPositionEnd=M}},{key:"getInputCandidates",value:function(I){var M=this,F=this.options,B=F.layoutCandidates,X=F.layoutCandidatesCaseSensitiveMatch;if(!B||te(B)!=="object")return{};var ee=Object.keys(B).filter(function(pe){var be=I.substring(0,M.getCaretPositionEnd()||0)||I,fe=new RegExp("".concat(M.utilities.escapeRegex(pe),"$"),X?"g":"gi");return!!V(be.matchAll(fe)).length});if(ee.length>1){var Z=ee.sort(function(pe,be){return be.length-pe.length})[0];return{candidateKey:Z,candidateValue:B[Z]}}if(ee.length){var $=ee[0];return{candidateKey:$,candidateValue:B[$]}}return{}}},{key:"showCandidatesBox",value:function(I,M,F){var B=this;this.candidateBox&&this.candidateBox.show({candidateValue:M,targetElement:F,onSelect:function(X,ee){var Z=B.options,$=Z.layoutCandidatesCaseSensitiveMatch,pe=Z.disableCandidateNormalization,be=Z.enableLayoutCandidatesKeyPress,fe=X;pe||(fe=X.normalize("NFD")),typeof B.options.beforeInputUpdate=="function"&&B.options.beforeInputUpdate(B);var he=B.getInput(B.options.inputName,!0),ve=B.getCaretPositionEnd()||0,ue=he.substring(0,ve||0)||he,Be=new RegExp("".concat(B.utilities.escapeRegex(I),"$"),$?"g":"gi"),Re=ue.replace(Be,fe),at=he.replace(ue,Re),xe=Re.length-ue.length,De=(ve||he.length)+xe;De<0&&(De=0),B.setInput(at,B.options.inputName,!0),B.setCaretPosition(De),be&&typeof B.options.onKeyPress=="function"&&B.options.onKeyPress(X,ee),typeof B.options.onChange=="function"&&B.options.onChange(B.getInput(B.options.inputName,!0),ee),typeof B.options.onChangeAll=="function"&&B.options.onChangeAll(B.getAllInputs(),ee)}})}},{key:"handleButtonClicked",value:function(I,M){var F=this.options,B=F.inputName,X=B===void 0?this.defaultName:B,ee=F.debug;if(I!=="{//}"){this.input[X]||(this.input[X]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Z=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(I)&&this.activeInputElement&&this.input[X]&&this.input[X]===Z&&this.caretPosition===0&&this.caretPositionEnd===Z.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(I,M);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(I,M),this.input[X]!==Z&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Z))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Z))return;var $=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput($,this.options.inputName,!0),ee&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),M==null?void 0:M.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),M),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),M),M!=null&&M.target&&this.options.enableLayoutCandidates){var pe,be=this.getInputCandidates(Z),fe=be.candidateKey,he=be.candidateValue;fe&&he?this.showCandidatesBox(fe,he,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),ee&&console.log("Key pressed:",I)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(I){this.options.syncInstanceInputs?this.dispatch(function(M){M.isMouseHold=I}):this.isMouseHold=I}},{key:"handleButtonMouseDown",value:function(I,M){var F=this;M&&(this.options.preventMouseDownDefault&&M.preventDefault(),this.options.stopMouseDownPropagation&&M.stopPropagation(),M.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(F.getMouseHold()&&(!I.includes("{")&&!I.includes("}")||I==="{delete}"||I==="{backspace}"||I==="{bksp}"||I==="{space}"||I==="{tab}")||I==="{arrowright}"||I==="{arrowleft}"||I==="{arrowup}"||I==="{arrowdown}")&&(F.options.debug&&console.log("Button held:",I),F.handleButtonHold(I)),clearTimeout(F.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(I,M){var F=this;M&&(this.options.preventMouseUpDefault&&M.preventDefault&&M.preventDefault(),this.options.stopMouseUpPropagation&&M.stopPropagation&&M.stopPropagation(),!(M.target===this.keyboardDOM||M.target&&this.keyboardDOM.contains(M.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(M.target===this.candidateBox.candidateBoxElement||M.target&&this.candidateBox.candidateBoxElement.contains(M.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(B){B.classList.remove(F.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),I&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(I,M)}},{key:"handleKeyboardContainerMouseDown",value:function(I){this.options.preventMouseDownDefault&&I.preventDefault()}},{key:"handleButtonHold",value:function(I){var M=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){M.getMouseHold()?(M.handleButtonClicked(I),M.handleButtonHold(I)):clearTimeout(M.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var I=this;this.dispatch(function(M){M.replaceInput(I.input),M.setCaretPosition(I.caretPosition,I.caretPositionEnd)})}},{key:"clearInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[I]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,M=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!M&&this.syncInstanceInputs(),this.options.rtl?""+this.input[I].replace("","").replace("","")+"":this.input[I]}},{key:"getAllInputs",value:function(){var I=this,M={};return Object.keys(this.input).forEach(function(F){M[F]=I.getInput(F,!0)}),M}},{key:"setInput",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,F=arguments.length>2?arguments[2]:void 0;this.input[M]=I,!F&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(I){this.input=I}},{key:"setOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=this.changedOptions(I);this.options=Object.assign(this.options,I),M.length&&(this.options.debug&&console.log("changedOptions",M),this.onSetOptions(M),this.render())}},{key:"changedOptions",value:function(I){var M=this;return Object.keys(I).filter(function(F){return JSON.stringify(I[F])!==JSON.stringify(M.options[F])})}},{key:"onSetOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];I.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(I.includes("layoutCandidatesPageSize")||I.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new k({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(I){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(M){I(window.SimpleKeyboardInstances[M],M)})}},{key:"addButtonTheme",value:function(I,M){var F=this;M&&I&&(I.split(" ").forEach(function(B){M.split(" ").forEach(function(X){F.options.buttonTheme||(F.options.buttonTheme=[]);var ee=!1;F.options.buttonTheme.map(function(Z){if(Z!=null&&Z.class.split(" ").includes(X)){ee=!0;var $=Z.buttons.split(" ");$.includes(B)||(ee=!0,$.push(B),Z.buttons=$.join(" "))}return Z}),ee||F.options.buttonTheme.push({class:X,buttons:I})})}),this.render())}},{key:"removeButtonTheme",value:function(I,M){var F=this;if(!I&&!M)return this.options.buttonTheme=[],void this.render();I&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(I.split(" ").forEach(function(B){var X;(X=F.options)===null||X===void 0||(X=X.buttonTheme)===null||X===void 0||X.map(function(ee,Z){if(ee&&M&&M.includes(ee.class)||!M){var $,pe,be=($=ee)===null||$===void 0?void 0:$.buttons.split(" ").filter(function(fe){return fe!==B});ee&&be!=null&&be.length?ee.buttons=be.join(" "):((pe=F.options.buttonTheme)===null||pe===void 0||pe.splice(Z,1),ee=null)}return ee})}),this.render())}},{key:"getButtonElement",value:function(I){var M,F=this.buttonElements[I];return F&&(M=F.length>1?F:F[0]),M}},{key:"inputPatternIsValid",value:function(I){var M,F=this.options.inputPattern;if((M=F instanceof RegExp?F:F[this.options.inputName||this.defaultName])&&I){var B=M.test(I);return this.options.debug&&console.log('inputPattern ("'.concat(M,'"): ').concat(B?"passed":"did not pass!")),B}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.addEventListener("keyup",this.handleKeyUp,M),document.addEventListener("keydown",this.handleKeyDown,M),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(I){this.caretEventHandler(I),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(I)}},{key:"handleKeyDown",value:function(I){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(I)}},{key:"handleMouseUp",value:function(I){this.caretEventHandler(I)}},{key:"handleTouchEnd",value:function(I){this.caretEventHandler(I)}},{key:"handleSelect",value:function(I){this.caretEventHandler(I)}},{key:"handleSelectionChange",value:function(I){navigator.userAgent.includes("Firefox")||this.caretEventHandler(I)}},{key:"caretEventHandler",value:function(I){var M,F=this;I.target.tagName&&(M=I.target.tagName.toLowerCase()),this.dispatch(function(B){var X=I.target===B.keyboardDOM||I.target&&B.keyboardDOM.contains(I.target);if(F.options.syncInstanceInputs&&Array.isArray(I.path)&&(X=I.path.some(function($){var pe;return $==null||(pe=$.hasAttribute)===null||pe===void 0?void 0:pe.call($,"data-skInstance")})),(M==="textarea"||M==="input"&&["text","search","url","tel","password"].includes(I.target.type))&&!B.options.disableCaretPositioning){var ee=I.target.selectionStart,Z=I.target.selectionEnd;B.options.rtl&&(ee=B.utilities.getRtlOffset(ee,B.getInput()),Z=B.utilities.getRtlOffset(Z,B.getInput())),B.setCaretPosition(ee,Z),F.activeInputElement=I.target,B.options.debug&&console.log("Caret at: ",B.getCaretPosition(),B.getCaretPositionEnd(),I&&I.target.tagName.toLowerCase(),"(".concat(B.keyboardDOMClass,")"),I==null?void 0:I.type)}else!B.options.disableCaretPositioning&&X||(I==null?void 0:I.type)==="selectionchange"||(B.setCaretPosition(null),F.activeInputElement=null,B.options.debug&&console.log('Caret position reset due to "'.concat(I==null?void 0:I.type,'" event'),I))})}},{key:"recurseButtons",value:function(I){var M=this;I&&Object.keys(this.buttonElements).forEach(function(F){return M.buttonElements[F].forEach(I)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.removeEventListener("keyup",this.handleKeyUp,M),document.removeEventListener("keydown",this.handleKeyDown,M),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(F){F&&(F.onpointerdown=null,F.onpointerup=null,F.onpointercancel=null,F.ontouchstart=null,F.ontouchend=null,F.ontouchcancel=null,F.onclick=null,F.onmousedown=null,F.onmouseup=null,F.remove(),F=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(I){var M=this.options.buttonTheme,F=[];return Array.isArray(M)&&M.forEach(function(B){if(B&&B.class&&typeof B.class=="string"&&B.buttons&&typeof B.buttons=="string"){var X=B.class.split(" ");B.buttons.split(" ").includes(I)&&(F=[].concat(V(F),V(X)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',B)}),F}},{key:"setDOMButtonAttributes",value:function(I,M){var F=this.options.buttonAttributes;Array.isArray(F)&&F.forEach(function(B){B.attribute&&typeof B.attribute=="string"&&B.value&&typeof B.value=="string"&&B.buttons&&typeof B.buttons=="string"?B.buttons.split(" ").includes(I)&&M(B.attribute,B.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',B)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(I){if(I.target.classList.contains("hg-button"))return I.preventDefault(),I.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var I=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(M){var F=new M(I);F.init&&F.init(I)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(I,M){return!!this.modules[I]&&this.modules[I][M]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(I,M,F,B){var X=this,ee=Array.from(I.children),Z=0;return ee.length&&F.forEach(function($,pe){var be=B[pe];if(!(be&&be>$))return!1;var fe=$-Z,he=be-Z,ve=document.createElement("div");ve.className+="hg-button-container";var ue="".concat(X.options.layoutName,"-r").concat(M,"c").concat(pe);ve.setAttribute("data-skUID",ue);var Be=ee.splice(fe,he-fe+1);Z=he-fe,Be.forEach(function(Re){return ve.appendChild(Re)}),ee.splice(fe,0,ve),I.innerHTML="",ee.forEach(function(Re){return I.appendChild(Re)}),X.options.debug&&console.log("rowDOMContainer",Be,fe,he,Z+1)}),I}},{key:"render",value:function(){var I=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var M="hg-layout-".concat(this.options.layoutName),F=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},B=this.options.useTouchEvents||!1,X=B?"hg-touch-events":"",ee=this.options.useMouseEvents||!1,Z=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,M,this.keyboardPluginClasses,X),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",F[this.options.layoutName||this.defaultName].forEach(function($,pe){var be=$.split(" ");I.options.excludeFromLayout&&I.options.excludeFromLayout[I.options.layoutName||I.defaultName]&&(be=be.filter(function(ue){return I.options.excludeFromLayout&&!I.options.excludeFromLayout[I.options.layoutName||I.defaultName].includes(ue)}));var fe=document.createElement("div");fe.className+="hg-row";var he=[],ve=[];be.forEach(function(ue,Be){var Re,at=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("[")===0,xe=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("]")===ue.length-1;at&&(he.push(Be),ue=ue.replace(/\[/g,"")),xe&&(ve.push(Be),ue=ue.replace(/\]/g,""));var De=I.utilities.getButtonClass(ue),Pe=I.utilities.getButtonDisplayName(ue,I.options.display,I.options.mergeDisplay),ot=I.options.useButtonTag?"button":"div",Ze=document.createElement(ot);Ze.className+="hg-button ".concat(De),(Re=Ze.classList).add.apply(Re,V(I.getButtonThemeClasses(ue))),I.setDOMButtonAttributes(ue,function(_e,$t){Ze.setAttribute(_e,$t)}),I.activeButtonClass="hg-activeButton",!I.utilities.pointerEventsSupported()||B||ee?B?(Ze.ontouchstart=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.ontouchend=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.ontouchcancel=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onclick=function(_e){I.setMouseHold(!1),typeof I.options.onKeyReleased!="function"&&I.handleButtonClicked(ue,_e)},Ze.onmousedown=function(_e){typeof I.options.onKeyReleased!="function"||I.isMouseHold||I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onmouseup=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onpointerdown=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onpointerup=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.onpointercancel=function(_e){I.handleButtonMouseUp(ue,_e)}),Ze.setAttribute("data-skBtn",ue);var Ot="".concat(I.options.layoutName,"-r").concat(pe,"b").concat(Be);Ze.setAttribute("data-skBtnUID",Ot);var Le=document.createElement("span");Le.innerHTML=Pe,Ze.appendChild(Le),I.buttonElements[ue]||(I.buttonElements[ue]=[]),I.buttonElements[ue].push(Ze),fe.appendChild(Ze)}),fe=I.parseRowDOMContainers(fe,pe,he,ve),I.keyboardRowsDOM.appendChild(fe)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||B||ee?B?(document.ontouchend=function($){return I.handleButtonMouseUp(void 0,$)},document.ontouchcancel=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.ontouchstart=function($){return I.handleKeyboardContainerMouseDown($)}):B||(document.onmouseup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onmousedown=function($){return I.handleKeyboardContainerMouseDown($)}):(document.onpointerup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onpointerdown=function($){return I.handleKeyboardContainerMouseDown($)}),this.onInit())}}],W&&ne(H.prototype,W),J&&ne(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}(),Ce=le,ye=le}(),h}()},442:function(s){s.exports=n}},o={};function i(s){var c=o[s];if(c!==void 0)return c.exports;var l=o[s]={exports:{}};return r[s].call(l.exports,l,l.exports,i),l.exports}i.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(c,{a:c}),c},i.d=function(s,c){for(var l in c)i.o(c,l)&&!i.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:c[l]})},i.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{KeyboardReact:function(){return g},default:function(){return m}}),i(981);var s=i(442),c=i(548),l=i.n(c);function f(y){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},f(y)}function h(y,w){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);w&&(E=E.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),b.push.apply(b,E)}return b}function d(y){for(var w=1;w<arguments.length;w++){var b=arguments[w]!=null?arguments[w]:{};w%2?h(Object(b),!0).forEach(function(E){p(y,E,b[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):h(Object(b)).forEach(function(E){Object.defineProperty(y,E,Object.getOwnPropertyDescriptor(b,E))})}return y}function p(y,w,b){var E;return E=function(C,S){if(f(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var P=T.call(C,S||"default");if(f(P)!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(w,"string"),(w=f(E)=="symbol"?E:E+"")in y?Object.defineProperty(y,w,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[w]=b,y}var u=function(y){return d(d({},y),{},{keyboardRef:null})},g=function(y){var w=y.baseClass||"react-simple-keyboard",b=s.useRef(null),E=s.useRef(null),C=s.useRef(null),S=s.useRef(y);return s.useEffect(function(){return function(){C.current&&C.current.destroy(),b.current=!1}},[]),s.useEffect(function(){var T=function(j){return d(d({},j),{},{theme:"simple-keyboard ".concat(j.theme||"hg-theme-default")})}(y);if(!b.current){b.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var P=E.current,N=".".concat(w);C.current=new(l())(P||N,T),T.keyboardRef&&T.keyboardRef(C.current)}var L=function(j,K){var G=u(K),k=u(j);return Object.keys(G).filter(function(V){return G[V]!==k[V]})}(S.current,T);if(L.length){var U=C.current;S.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",L)}},[b,w,S,y]),s.createElement("div",{className:w,ref:E})},m=g}(),a}()})})(F1);var d6=F1.exports;const f6=ll(d6);function j1({onChange:t,keyboardRef:e,layout:n,theme:r}){const[o,i]=x.useState("default"),a=s=>{(s==="{shift}"||s==="{lock}")&&i(o==="default"?"shift":"default")};return v.jsx(f6,{keyboardRef:s=>e.current=s,layoutName:o,layout:n,theme:r,onChange:t,onKeyPress:a,preventMouseDownDefault:!0})}function V1(){const{subscribe:t,unsubscribe:e,publish:n}=qa();return{initialize:(s,c)=>{t("openKeyboard",s),t("closeKeyboard",c)},terminate:(s,c)=>{e("openKeyboard",s),e("closeKeyboard",c)},open:s=>{n("openKeyboard",{inputId:s.target.id,inputValue:s.target.value})},close:()=>{n("closeKeyboard")}}}const fr="keyboard-custom-overlap-id";function h6({enabled:t}){const[e,n]=x.useState(!1),r=x.useRef(null),o=x.useRef(null),i=x.useRef(null),[a,s]=x.useState(),[c,l]=x.useState(0),{initialize:f,terminate:h}=V1(),d=w=>{var b,E;o.current=document.getElementById(w.detail.inputId),(b=r.current)==null||b.setInput(w.detail.inputValue),(E=o.current)==null||E.addEventListener("input",C=>{var T;const S=C.target;(T=r.current)==null||T.setInput(S==null?void 0:S.value)}),l(y()),n(!0)},p=()=>{l(0),n(!1)};x.useEffect(()=>(f(d,p),()=>{h(d,p)}),[e]);const u=w=>{var b,E;if(o&&o.current){g(o.current,w);const C=(b=r.current)==null?void 0:b.getCaretPosition();C&&((E=o.current)==null||E.setSelectionRange(C,C))}},g=(w,b)=>{var S;const E=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;E==null||E.call(w,b);const C=new Event("input",{bubbles:!0});w.dispatchEvent(C)},m=()=>{var w;if(!a){const b=(w=i.current)==null?void 0:w.getBoundingClientRect();return b&&b.x&&!a&&s(b),b}return a},y=()=>{var T;const w=document.querySelectorAll("#"+fr),b=m(),E=[...w].map(P=>P.getBoundingClientRect()),C=(T=o.current)==null?void 0:T.getBoundingClientRect();E.push(C),E.sort((P,N)=>P.bottom>N.bottom?-1:1);let S=0;return E.every(P=>{if(b&&b.top<P.bottom)return S=P.bottom-b.top+8,!1}),S};return t?v.jsx("div",{className:"relative",style:{height:c},children:v.jsx("div",{ref:i,className:`mobile:hidden absolute bottom-0 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&a&&"hidden"} ${!e&&!a&&"pointer-events-none opacity-0"}`,children:v.jsx(j1,{keyboardRef:r,onChange:u})})}):v.jsx(v.Fragment,{})}const oi=({id:t,name:e,label:n,description:r,required:o,type:i="text",value:a,placeholder:s,disabled:c,error:l=!1,helperText:f="",onChange:h,beforeIcon:d,afterIcon:p,autoFocus:u,onFocus:g,onBlur:m})=>{const[y,w]=x.useState(f),b=x.useRef(null),[E,C]=x.useState(!1),{open:S,close:T}=V1();x.useEffect(()=>()=>{T()},[]);const P=()=>{b.current&&w(b.current.validationMessage),C(!1),T(),m==null||m()},N=async K=>{C(!0),(async()=>S(K))().then(()=>{var k;return(k=b.current)==null?void 0:k.scrollIntoView({behavior:"smooth",block:"center"})}),g==null||g()},L=K=>{h==null||h(K)},U=x.useId(),j=t??U;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:r,disabled:c,htmlFor:j,required:o,children:n}),v.jsx("div",{className:Dn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!l&&"border-core-primary-500 ring-1 ring-core-primary-500",l&&"border-core-red-500",l&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[d&&v.jsx(In,{icon:d}),v.jsx("input",{type:i,id:j,name:e,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:a,onChange:L,onBlur:P,ref:b,placeholder:s,onFocus:N,disabled:c,autoFocus:u}),p&&v.jsx(In,{icon:p})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||y?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:l,helperText:f||y})})})]})};oi.displayName="Input";const U1=({id:t,name:e,label:n,required:r,description:o,placeholder:i,value:a,disabled:s,error:c=!1,helperText:l,onChange:f,type:h="date"})=>{const[d,p]=x.useState(!1),u=x.useId(),g=t??u;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:o,disabled:s,htmlFor:g,required:r,children:n}),v.jsx("div",{className:Dn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",s?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",d&&!c&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",c&&"border-core-red-500",c&&d&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[v.jsx("input",{type:h,id:g,name:e,value:a,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:i,onChange:f,onFocus:()=>p(!0),onBlur:()=>p(!1),disabled:s}),v.jsx(In,{icon:"calendar"})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${l?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:c,helperText:l})})})]})};U1.displayName="Input";function Tn({children:t}){return v.jsx("div",{className:"h-screen w-screen md:p-6",children:v.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:t})})}function Po({title:t,isOpen:e,onClose:n,primaryAction:r,secondaryAction:o,children:i}){const[a,s]=x.useState(e),c=x.useRef(null);x.useEffect(()=>{s(e)},[e]),x.useEffect(()=>{const h=c.current;h&&(a?h.show():h.close())},[a]);const l=()=>{n&&n(),s(!1)},f=h=>{h.key==="Escape"&&l()};return v.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${a?"flex":"hidden"}`,children:v.jsx("dialog",{ref:c,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:v.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t})})}),v.jsx(Mt,{children:i}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[r&&v.jsx(nt,{label:r.label??"",onClick:r.action,disabled:r.disabled,pending:r.loading}),o&&v.jsx(nt,{label:o.label??"",onClick:o.action,disabled:o.disabled,pending:o.loading,variant:"secondary"})]})})]})})})}function p6({option:{label:t},checked:e,onChange:n}){return v.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[v.jsx(Oc,{defaultChecked:e,onChange:n}),v.jsx("p",{children:t})]})}function g6(t){const{t:e}=Ve(),n=x.useRef(null),[r,o]=x.useState(!1);L1(n,o);const[i,a]=x.useState(""),[s,c]=x.useState(t.value.split(";")),{name:l,onChange:f}=t,h=(d,p)=>{let u=[];d?u=[...s,p]:u=s.filter(g=>g!==p),c(u),f&&f(l??"",u.join(";"))};return v.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsxs("div",{className:"relative",children:[v.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${t.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!t.disabled&&o(!r),children:[v.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${t.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:s.map(d=>{var u;const p=(u=t.options.find(g=>g.value===d))==null?void 0:u.label;return v.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[v.jsx("p",{className:"truncate",children:p}),v.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,d),children:v.jsx(In,{icon:"close"})})]},d)})}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),v.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[t.options.length>6&&v.jsx("div",{className:"px-4",children:v.jsx(oi,{placeholder:`${e("search")}...`,onChange:d=>a(d.target.value)})}),t.options.map(d=>{if(!(i&&!d.label.toLowerCase().includes(i.toLowerCase())))return v.jsx(p6,{option:d,checked:s.includes(d.value),onChange:p=>h(p,d.value)},`${d.value}_${s.includes(d.value)?"checked":"unchecked"}`)})]})]})]})}function m6({value:t,max:e,label:n}){return v.jsxs("div",{children:[v.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),v.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:v.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(t/e*100,100)}%`}})})]})}function y6({value:t,placeholder:e,open:n,setOpen:r,disabled:o}){return v.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${o?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!o&&r(!n),children:[v.jsx("span",{className:`text-sm ${o?"text-core-gray-300":"text-core-gray-800"}`,children:t||e}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function v6({label:t,children:e}){return v.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[v.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:t}),e]})}function sd(t){return v.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:t.label})}function w6(t){const e=x.useRef(null),[n,r]=x.useState(!1),[o,i]=x.useState(t.value??"");L1(e,r);const a=(c,l)=>{i(c),r(!1),t.onChange&&t.onChange(l)},s=x.Children.map(t.children,c=>{if(x.isValidElement(c)){if(c.type===sd)return v.jsx("div",{onClick:()=>a(c.props.label,c.props.value),children:c});if(c.type===v6){const l=x.Children.map(c.props.children,f=>{if(x.isValidElement(f)&&f.type===sd)return v.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f})});return x.cloneElement(c,{},...l)}}});return v.jsxs("div",{ref:e,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:t.description,disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsx("div",{children:v.jsxs("div",{className:"relative",children:[v.jsx(y6,{value:o,placeholder:t.placeholder,open:n,setOpen:r,disabled:t.disabled}),t.children&&v.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:s})]})}),v.jsx(Gn.Helper,{helperText:t.helperText})]})}var b6=Object.defineProperty,E6=(t,e)=>{for(var n in e)b6(t,n,{get:e[n],enumerable:!0})},Dr={};E6(Dr,{assign:()=>A6,colors:()=>No,createStringInterpolator:()=>md,skipAnimation:()=>z1,to:()=>K1,willAdvance:()=>yd});var cd=Wa(),Qe=t=>Ha(t,cd),ud=Wa();Qe.write=t=>Ha(t,ud);var Pc=Wa();Qe.onStart=t=>Ha(t,Pc);var ld=Wa();Qe.onFrame=t=>Ha(t,ld);var dd=Wa();Qe.onFinish=t=>Ha(t,dd);var Gi=[];Qe.setTimeout=(t,e)=>{const n=Qe.now()+e,r=()=>{const i=Gi.findIndex(a=>a.cancel==r);~i&&Gi.splice(i,1),Bo-=~i?1:0},o={time:n,handler:t,cancel:r};return Gi.splice(G1(n),0,o),Bo+=1,q1(),o};var G1=t=>~(~Gi.findIndex(e=>e.time>t)||~Gi.length);Qe.cancel=t=>{Pc.delete(t),ld.delete(t),dd.delete(t),cd.delete(t),ud.delete(t)},Qe.sync=t=>{hd=!0,Qe.batchedUpdates(t),hd=!1},Qe.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function r(...o){e=o,Qe.onStart(n)}return r.handler=t,r.cancel=()=>{Pc.delete(n),e=null},r};var fd=typeof window<"u"?window.requestAnimationFrame:()=>{};Qe.use=t=>fd=t,Qe.now=typeof performance<"u"?()=>performance.now():Date.now,Qe.batchedUpdates=t=>t(),Qe.catch=console.error,Qe.frameLoop="always",Qe.advance=()=>{Qe.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):W1()};var ko=-1,Bo=0,hd=!1;function Ha(t,e){hd?(e.delete(t),t(0)):(e.add(t),q1())}function q1(){ko<0&&(ko=0,Qe.frameLoop!=="demand"&&fd(H1))}function C6(){ko=-1}function H1(){~ko&&(fd(H1),Qe.batchedUpdates(W1))}function W1(){const t=ko;ko=Qe.now();const e=G1(ko);if(e&&(Y1(Gi.splice(0,e),n=>n.handler()),Bo-=e),!Bo){C6();return}Pc.flush(),cd.flush(t?Math.min(64,ko-t):16.667),ld.flush(),ud.flush(),dd.flush()}function Wa(){let t=new Set,e=t;return{add(n){Bo+=e==t&&!t.has(n)?1:0,t.add(n)},delete(n){return Bo-=e==t&&t.has(n)?1:0,t.delete(n)},flush(n){e.size&&(t=new Set,Bo-=e.size,Y1(e,r=>r(n)&&t.add(r)),Bo+=t.size,e=t)}}}function Y1(t,e){t.forEach(n=>{try{e(n)}catch(r){Qe.catch(r)}})}function pd(){}var _6=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),Se={arr:Array.isArray,obj:t=>!!t&&t.constructor.name==="Object",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0};function oo(t,e){if(Se.arr(t)){if(!Se.arr(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t===e}var dt=(t,e)=>t.forEach(e);function Wr(t,e,n){if(Se.arr(t)){for(let r=0;r<t.length;r++)e.call(n,t[r],`${r}`);return}for(const r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r)}var hr=t=>Se.und(t)?[]:Se.arr(t)?t:[t];function Ya(t,e){if(t.size){const n=Array.from(t);t.clear(),dt(n,e)}}var Ka=(t,...e)=>Ya(t,n=>n(...e)),gd=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),md,K1,No=null,z1=!1,yd=pd,A6=t=>{t.to&&(K1=t.to),t.now&&(Qe.now=t.now),t.colors!==void 0&&(No=t.colors),t.skipAnimation!=null&&(z1=t.skipAnimation),t.createStringInterpolator&&(md=t.createStringInterpolator),t.requestAnimationFrame&&Qe.use(t.requestAnimationFrame),t.batchedUpdates&&(Qe.batchedUpdates=t.batchedUpdates),t.willAdvance&&(yd=t.willAdvance),t.frameLoop&&(Qe.frameLoop=t.frameLoop)},za=new Set,Sr=[],vd=[],kc=0,Bc={get idle(){return!za.size&&!Sr.length},start(t){kc>t.priority?(za.add(t),Qe.onStart(S6)):($1(t),Qe(wd))},advance:wd,sort(t){if(kc)Qe.onFrame(()=>Bc.sort(t));else{const e=Sr.indexOf(t);~e&&(Sr.splice(e,1),X1(t))}},clear(){Sr=[],za.clear()}};function S6(){za.forEach($1),za.clear(),Qe(wd)}function $1(t){Sr.includes(t)||X1(t)}function X1(t){Sr.splice(I6(Sr,e=>e.priority>t.priority),0,t)}function wd(t){const e=vd;for(let n=0;n<Sr.length;n++){const r=Sr[n];kc=r.priority,r.idle||(yd(r),r.advance(t),r.idle||e.push(r))}return kc=0,vd=Sr,vd.length=0,Sr=e,Sr.length>0}function I6(t,e){const n=t.findIndex(e);return n<0?t.length:n}var T6=(t,e,n)=>Math.min(Math.max(n,t),e),x6={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Mr="[-+]?\\d*\\.?\\d+",Nc=Mr+"%";function Rc(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var O6=new RegExp("rgb"+Rc(Mr,Mr,Mr)),P6=new RegExp("rgba"+Rc(Mr,Mr,Mr,Mr)),k6=new RegExp("hsl"+Rc(Mr,Nc,Nc)),B6=new RegExp("hsla"+Rc(Mr,Nc,Nc,Mr)),N6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,R6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,D6=/^#([0-9a-fA-F]{6})$/,M6=/^#([0-9a-fA-F]{8})$/;function L6(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=D6.exec(t))?parseInt(e[1]+"ff",16)>>>0:No&&No[t]!==void 0?No[t]:(e=O6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|255)>>>0:(e=P6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|Z1(e[4]))>>>0:(e=N6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=M6.exec(t))?parseInt(e[1],16)>>>0:(e=R6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=k6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|255)>>>0:(e=B6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|Z1(e[4]))>>>0:null}function bd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Q1(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,o=2*n-r,i=bd(o,r,t+1/3),a=bd(o,r,t),s=bd(o,r,t-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function qi(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function J1(t){return(parseFloat(t)%360+360)%360/360}function Z1(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Dc(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function e0(t){let e=L6(t);if(e===null)return t;e=e||0;const n=(e&4278190080)>>>24,r=(e&16711680)>>>16,o=(e&65280)>>>8,i=(e&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var $a=(t,e,n)=>{if(Se.fun(t))return t;if(Se.arr(t))return $a({range:t,output:e,extrapolate:n});if(Se.str(t.output[0]))return md(t);const r=t,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const f=j6(l,i);return F6(l,i[f],i[f+1],o[f],o[f+1],c,a,s,r.map)}};function F6(t,e,n,r,o,i,a,s,c){let l=c?c(t):t;if(l<e){if(a==="identity")return l;a==="clamp"&&(l=e)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===o?r:e===n?t<=e?r:o:(e===-1/0?l=-l:n===1/0?l=l-e:l=(l-e)/(n-e),l=i(l),r===-1/0?l=-l:o===1/0?l=l+r:l=l*(o-r)+r,l)}function j6(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}var V6=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*t,o=e==="end"?Math.floor(r):Math.ceil(r);return T6(0,1,o/t)},Mc=1.70158,Lc=Mc*1.525,t0=Mc+1,n0=2*Math.PI/3,r0=2*Math.PI/4.5,Fc=t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,U6={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>t===0?0:Math.pow(2,10*t-10),easeOutExpo:t=>t===1?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>t===0?0:t===1?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>t0*t*t*t-Mc*t*t,easeOutBack:t=>1+t0*Math.pow(t-1,3)+Mc*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*((Lc+1)*2*t-Lc)/2:(Math.pow(2*t-2,2)*((Lc+1)*(t*2-2)+Lc)+2)/2,easeInElastic:t=>t===0?0:t===1?1:-Math.pow(2,10*t-10)*Math.sin((t*10-10.75)*n0),easeOutElastic:t=>t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*n0)+1,easeInOutElastic:t=>t===0?0:t===1?1:t<.5?-(Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*r0))/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*r0)/2+1,easeInBounce:t=>1-Fc(1-t),easeOutBounce:Fc,easeInOutBounce:t=>t<.5?(1-Fc(1-2*t))/2:(1+Fc(2*t-1))/2,steps:V6},Xa=Symbol.for("FluidValue.get"),Hi=Symbol.for("FluidValue.observers"),Ir=t=>!!(t&&t[Xa]),Jn=t=>t&&t[Xa]?t[Xa]():t,o0=t=>t[Hi]||null;function G6(t,e){t.eventObserved?t.eventObserved(e):t(e)}function Qa(t,e){const n=t[Hi];n&&n.forEach(r=>{G6(r,e)})}var i0=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");q6(this,t)}},q6=(t,e)=>a0(t,Xa,e);function Wi(t,e){if(t[Xa]){let n=t[Hi];n||a0(t,Hi,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function Ja(t,e){const n=t[Hi];if(n&&n.has(e)){const r=n.size-1;r?n.delete(e):t[Hi]=null,t.observerRemoved&&t.observerRemoved(r,e)}}var a0=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),jc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,H6=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,s0=new RegExp(`(${jc.source})(%|[a-z]+)`,"i"),W6=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Vc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,c0=t=>{const[e,n]=Y6(t);if(!e||gd())return t;const r=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||t}else{if(n&&Vc.test(n))return c0(n);if(n)return n}return t},Y6=t=>{const e=Vc.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]},Ed,K6=(t,e,n,r,o)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,u0=t=>{Ed||(Ed=No?new RegExp(`(${Object.keys(No).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(i=>Jn(i).replace(Vc,c0).replace(H6,e0).replace(Ed,e0)),n=e.map(i=>i.match(jc).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>$a({...t,output:i}));return i=>{var c;const a=!s0.test(e[0])&&((c=e.find(l=>s0.test(l)))==null?void 0:c.replace(jc,""));let s=0;return e[0].replace(jc,()=>`${o[s++](i)}${a||""}`).replace(W6,K6)}},Cd="react-spring: ",l0=t=>{const e=t;let n=!1;if(typeof e!="function")throw new TypeError(`${Cd}once requires a function parameter`);return(...r)=>{n||(e(...r),n=!0)}},z6=l0(console.warn);function $6(){z6(`${Cd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var X6=l0(console.warn);function Q6(){X6(`${Cd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Uc(t){return Se.str(t)&&(t[0]=="#"||/\d/.test(t)||!gd()&&Vc.test(t)||t in(No||{}))}var _d=gd()?x.useEffect:x.useLayoutEffect,J6=()=>{const t=x.useRef(!1);return _d(()=>(t.current=!0,()=>{t.current=!1}),[]),t};function d0(){const t=x.useState()[1],e=J6();return()=>{e.current&&t(Math.random())}}function Z6(t,e){const[n]=x.useState(()=>({inputs:e,result:t()})),r=x.useRef(),o=r.current;let i=o;return i?e&&i.inputs&&e8(e,i.inputs)||(i={inputs:e,result:t()}):i=n,x.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function e8(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var f0=t=>x.useEffect(t,t8),t8=[];function h0(t){const e=x.useRef();return x.useEffect(()=>{e.current=t}),e.current}var Za=Symbol.for("Animated:node"),n8=t=>!!t&&t[Za]===t,Yr=t=>t&&t[Za],Ad=(t,e)=>_6(t,Za,e),Gc=t=>t&&t[Za]&&t[Za].getPayload(),p0=class{constructor(){Ad(this,this)}getPayload(){return this.payload||[]}},es=class extends p0{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,Se.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new es(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return Se.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,Se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},ts=class extends es{constructor(t){super(0),this._string=null,this._toString=$a({output:[t,t]})}static create(t){return new ts(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(Se.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=$a({output:[this.getValue(),t]})),this._value=0,super.reset()}},qc={dependencies:null},Hc=class extends p0{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return Wr(this.source,(n,r)=>{n8(n)?e[r]=n.getValue(t):Ir(n)?e[r]=Jn(n):t||(e[r]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&dt(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return Wr(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){qc.dependencies&&Ir(t)&&qc.dependencies.add(t);const e=Gc(t);e&&dt(e,n=>this.add(n))}},g0=class extends Hc{constructor(t){super(t)}static create(t){return new g0(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((n,r)=>n.setValue(t[r])).some(Boolean):(super.setValue(t.map(r8)),!0)}};function r8(t){return(Uc(t)?ts:es).create(t)}function Sd(t){const e=Yr(t);return e?e.constructor:Se.arr(t)?g0:Uc(t)?ts:es}var m0=(t,e)=>{const n=!Se.fun(t)||t.prototype&&t.prototype.isReactComponent;return x.forwardRef((r,o)=>{const i=x.useRef(null),a=n&&x.useCallback(u=>{i.current=a8(o,u)},[o]),[s,c]=i8(r,e),l=d0(),f=()=>{const u=i.current;if(n&&!u)return;(u?e.applyAnimatedValues(u,s.getValue(!0)):!1)===!1&&l()},h=new o8(f,c),d=x.useRef();_d(()=>(d.current=h,dt(c,u=>Wi(u,h)),()=>{d.current&&(dt(d.current.deps,u=>Ja(u,d.current)),Qe.cancel(d.current.update))})),x.useEffect(f,[]),f0(()=>()=>{const u=d.current;dt(u.deps,g=>Ja(g,u))});const p=e.getComponentProps(s.getValue());return ce.createElement(t,{...p,ref:a})})},o8=class{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){t.type=="change"&&Qe.write(this.update)}};function i8(t,e){const n=new Set;return qc.dependencies=n,t.style&&(t={...t,style:e.createAnimatedStyle(t.style)}),t=new Hc(t),qc.dependencies=null,[t,n]}function a8(t,e){return t&&(Se.fun(t)?t(e):t.current=e),e}var y0=Symbol.for("AnimatedComponent"),s8=(t,{applyAnimatedValues:e=()=>!1,createAnimatedStyle:n=o=>new Hc(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=v0(a)||"Anonymous";return Se.str(a)?a=i[a]||(i[a]=m0(a,o)):a=a[y0]||(a[y0]=m0(a,o)),a.displayName=`Animated(${s})`,a};return Wr(t,(a,s)=>{Se.arr(t)&&(s=v0(a)),i[s]=i(a)}),{animated:i}},v0=t=>Se.str(t)?t:t&&Se.str(t.displayName)?t.displayName:Se.fun(t)&&t.name||null;function ii(t,...e){return Se.fun(t)?t(...e):t}var ns=(t,e)=>t===!0||!!(e&&t&&(Se.fun(t)?t(e):hr(t).includes(e))),w0=(t,e)=>Se.obj(t)?e&&t[e]:t,b0=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,c8=t=>t,Id=(t,e=c8)=>{let n=u8;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));const r={};for(const o of n){const i=e(t[o],o);Se.und(i)||(r[o]=i)}return r},u8=["config","onProps","onStart","onChange","onPause","onResume","onRest"],l8={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function d8(t){const e={};let n=0;if(Wr(t,(r,o)=>{l8[o]||(e[o]=r,n++)}),n)return e}function E0(t){const e=d8(t);if(e){const n={to:e};return Wr(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function rs(t){return t=Jn(t),Se.arr(t)?t.map(rs):Uc(t)?Dr.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function f8(t){for(const e in t)return!0;return!1}function Td(t){return Se.fun(t)||Se.arr(t)&&Se.obj(t[0])}function h8(t,e){var n;(n=t.ref)==null||n.delete(t),e==null||e.delete(t)}function p8(t,e){var n;e&&t.ref!==e&&((n=t.ref)==null||n.delete(t),e.add(t),t.ref=e)}var g8={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},xd={...g8.default,mass:1,damping:1,easing:U6.linear,clamp:!1},m8=class{constructor(){this.velocity=0,Object.assign(this,xd)}};function y8(t,e,n){n&&(n={...n},C0(n,e),e={...n,...e}),C0(t,e),Object.assign(t,e);for(const a in xd)t[a]==null&&(t[a]=xd[a]);let{frequency:r,damping:o}=t;const{mass:i}=t;return Se.und(r)||(r<.01&&(r=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/r,2)*i,t.friction=4*Math.PI*o*i/r),t}function C0(t,e){if(!Se.und(e.decay))t.duration=void 0;else{const n=!Se.und(e.tension)||!Se.und(e.friction);(n||!Se.und(e.frequency)||!Se.und(e.damping)||!Se.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var _0=[],v8=class{constructor(){this.changed=!1,this.values=_0,this.toValues=null,this.fromValues=_0,this.config=new m8,this.immediate=!1}};function A0(t,{key:e,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,l,f=ns(n.cancel??(r==null?void 0:r.cancel),e);if(f)p();else{Se.und(n.pause)||(o.paused=ns(n.pause,e));let u=r==null?void 0:r.pause;u!==!0&&(u=o.paused||ns(u,e)),c=ii(n.delay||0,e),u?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function h(){o.resumeQueue.add(d),o.timeouts.delete(l),l.cancel(),c=l.time-Qe.now()}function d(){c>0&&!Dr.skipAnimation?(o.delayed=!0,l=Qe.setTimeout(p,c),o.pauseQueue.add(h),o.timeouts.add(l)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(l),t<=(o.cancelId||0)&&(f=!0);try{i.start({...n,callId:t,cancel:f},a)}catch(u){s(u)}}})}var Od=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?Yi(t.get()):e.every(n=>n.noop)?S0(t.get()):Lr(t.get(),e.every(n=>n.finished)),S0=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),Lr=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),Yi=t=>({value:t,cancelled:!0,finished:!1});function I0(t,e,n,r){const{callId:o,parentId:i,onRest:a}=e,{asyncTo:s,promise:c}=n;return!i&&t===s&&!e.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const l=Id(e,(m,y)=>y==="onRest"?void 0:m);let f,h;const d=new Promise((m,y)=>(f=m,h=y)),p=m=>{const y=o<=(n.cancelId||0)&&Yi(r)||o!==n.asyncId&&Lr(r,!1);if(y)throw m.result=y,h(m),m},u=(m,y)=>{const w=new T0,b=new x0;return(async()=>{if(Dr.skipAnimation)throw os(n),b.result=Lr(r,!1),h(b),b;p(w);const E=Se.obj(m)?{...m}:{...y,to:m};E.parentId=o,Wr(l,(S,T)=>{Se.und(E[T])&&(E[T]=S)});const C=await r.start(E);return p(w),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let g;if(Dr.skipAnimation)return os(n),Lr(r,!1);try{let m;Se.arr(t)?m=(async y=>{for(const w of y)await u(w)})(t):m=Promise.resolve(t(u,r.stop.bind(r))),await Promise.all([m.then(f),d]),g=Lr(r.get(),!0,!1)}catch(m){if(m instanceof T0)g=m.result;else if(m instanceof x0)g=m.result;else throw m}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return Se.fun(a)&&Qe.batchedUpdates(()=>{a(g,r,r.item)}),g})()}function os(t,e){Ya(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var T0=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},x0=class extends Error{constructor(){super("SkipAnimationSignal")}},Pd=t=>t instanceof kd,w8=1,kd=class extends i0{constructor(){super(...arguments),this.id=w8++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Yr(this);return t&&t.getValue()}to(...t){return Dr.to(this,t)}interpolate(...t){return $6(),Dr.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Qa(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||Bc.sort(this),Qa(this,{type:"priority",parent:this,priority:t})}},ai=Symbol.for("SpringPhase"),O0=1,Bd=2,Nd=4,Rd=t=>(t[ai]&O0)>0,Ro=t=>(t[ai]&Bd)>0,is=t=>(t[ai]&Nd)>0,P0=(t,e)=>e?t[ai]|=Bd|O0:t[ai]&=~Bd,k0=(t,e)=>e?t[ai]|=Nd:t[ai]&=~Nd,b8=class extends kd{constructor(t,e){if(super(),this.animation=new v8,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Se.und(t)||!Se.und(e)){const n=Se.obj(t)?{...t}:{...e,from:t};Se.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ro(this)||this._state.asyncTo)||is(this)}get goal(){return Jn(this.animation.to)}get velocity(){const t=Yr(this);return t instanceof es?t.lastVelocity||0:t.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Rd(this)}get isAnimating(){return Ro(this)}get isPaused(){return is(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Gc(r.to);!a&&Ir(r.to)&&(o=hr(Jn(r.to))),r.values.forEach((l,f)=>{if(l.done)return;const h=l.constructor==ts?1:a?a[f].lastPosition:o[f];let d=r.immediate,p=h;if(!d){if(p=l.lastPosition,i.tension<=0){l.done=!0;return}let u=l.elapsedTime+=t;const g=r.fromValues[f],m=l.v0!=null?l.v0:l.v0=Se.arr(i.velocity)?i.velocity[f]:i.velocity;let y;const w=i.precision||(g==h?.005:Math.min(1,Math.abs(h-g)*.001));if(Se.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,E=Math.exp(-(1-b)*u);p=g+m/(1-b)*(1-E),d=Math.abs(l.lastPosition-p)<=w,y=m*E}else{y=l.lastVelocity==null?m:l.lastVelocity;const b=i.restVelocity||w/10,E=i.clamp?0:i.bounce,C=!Se.und(E),S=g==h?l.v0>0:g<h;let T,P=!1;const N=1,L=Math.ceil(t/N);for(let U=0;U<L&&(T=Math.abs(y)>b,!(!T&&(d=Math.abs(h-p)<=w,d)));++U){C&&(P=p==h||p>h==S,P&&(y=-y*E,p=h));const j=-i.tension*1e-6*(p-h),K=-i.friction*.001*y,G=(j+K)/i.mass;y=y+G*N,p=p+y*N}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,u=l.elapsedTime+=t)),b=(i.progress||0)+u/this._memoizedDuration,b=b>1?1:b<0?0:b,l.durationProgress=b),p=g+i.easing(b)*(h-g),y=(p-l.lastPosition)/t,d=b==1}l.lastVelocity=y,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?l.done=!0:e=!1,l.setValue(p,i.round)&&(n=!0)});const s=Yr(this),c=s.getValue();if(e){const l=Jn(r.to);(c!==l||n)&&!i.decay?(s.setValue(l),this._onChange(l)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(t){return Qe.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ro(this)){const{to:t,config:e}=this.animation;Qe.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return Se.und(t)?(n=this.queue||[],this.queue=[]):n=[Se.obj(t)?t:{...e,to:t}],Promise.all(n.map(r=>this._update(r))).then(r=>Od(this,r))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),os(this._state,t&&this._lastCallId),Qe.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:r}=t;n=Se.obj(n)?n[e]:n,(n==null||Td(n))&&(n=void 0),r=Se.obj(r)?r[e]:r,r==null&&(r=void 0);const o={to:n,from:r};return Rd(this)||(t.reverse&&([n,r]=[r,n]),r=Jn(r),Se.und(r)?Yr(this)||this._set(n):this._set(r)),o}_update({...t},e){const{key:n,defaultProps:r}=this;t.default&&Object.assign(r,Id(t,(a,s)=>/^on/.test(s)?w0(a,n):a)),R0(this,t,"onProps"),cs(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return A0(++this._lastCallId,{key:n,props:t,defaultProps:r,state:i,actions:{pause:()=>{is(this)||(k0(this,!0),Ka(i.pauseQueue),cs(this,"onPause",Lr(this,as(this,this.animation.to)),this))},resume:()=>{is(this)&&(k0(this,!1),Ro(this)&&this._resume(),Ka(i.resumeQueue),cs(this,"onResume",Lr(this,as(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(t.loop&&a.finished&&!(e&&a.noop)){const s=B0(t);if(s)return this._update(s,!0)}return a})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(Yi(this));const r=!Se.und(t.to),o=!Se.und(t.from);if(r||o)if(e.callId>this._lastToId)this._lastToId=e.callId;else return n(Yi(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:l}=s;let{to:f=c,from:h=l}=t;o&&!r&&(!e.default||Se.und(f))&&(f=h),e.reverse&&([f,h]=[h,f]);const d=!oo(h,l);d&&(s.from=h),h=Jn(h);const p=!oo(f,c);p&&this._focus(f);const u=Td(e.to),{config:g}=s,{decay:m,velocity:y}=g;(r||o)&&(g.velocity=0),e.config&&!u&&y8(g,ii(e.config,i),e.config!==a.config?ii(a.config,i):void 0);let w=Yr(this);if(!w||Se.und(f))return n(Lr(this,!0));const b=Se.und(e.reset)?o&&!e.default:!Se.und(h)&&ns(e.reset,i),E=b?h:this.get(),C=rs(f),S=Se.num(C)||Se.arr(C)||Uc(C),T=!u&&(!S||ns(a.immediate||e.immediate,i));if(p){const U=Sd(f);if(U!==w.constructor)if(T)w=this._set(C);else throw Error(`Cannot animate between ${w.constructor.name} and ${U.name}, as the "to" prop suggests`)}const P=w.constructor;let N=Ir(f),L=!1;if(!N){const U=b||!Rd(this)&&d;(p||U)&&(L=oo(rs(E),C),N=!L),(!oo(s.immediate,T)&&!T||!oo(g.decay,m)||!oo(g.velocity,y))&&(N=!0)}if(L&&Ro(this)&&(s.changed&&!b?N=!0:N||this._stop(c)),!u&&((N||Ir(c))&&(s.values=w.getPayload(),s.toValues=Ir(f)?null:P==ts?[1]:hr(C)),s.immediate!=T&&(s.immediate=T,!T&&!b&&this._set(c)),N)){const{onRest:U}=s;dt(C8,K=>R0(this,e,K));const j=Lr(this,as(this,c));Ka(this._pendingCalls,j),this._pendingCalls.add(n),s.changed&&Qe.batchedUpdates(()=>{var K;s.changed=!b,U==null||U(j,this),b?ii(a.onRest,j):(K=s.onStart)==null||K.call(s,j,this)})}b&&this._set(E),u?n(I0(e.to,e,this._state,this)):N?this._start():Ro(this)&&!p?this._pendingCalls.add(n):n(S0(E))}_focus(t){const e=this.animation;t!==e.to&&(o0(this)&&this._detach(),e.to=t,o0(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;Ir(e)&&(Wi(e,this),Pd(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Ir(t)&&Ja(t,this)}_set(t,e=!0){const n=Jn(t);if(!Se.und(n)){const r=Yr(this);if(!r||!oo(n,r.getValue())){const o=Sd(n);!r||r.constructor!=o?Ad(this,o.create(n)):r.setValue(n),r&&Qe.batchedUpdates(()=>{this._onChange(n,e)})}}return Yr(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,cs(this,"onStart",Lr(this,as(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),ii(this.animation.onChange,t,this)),ii(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Yr(this).reset(Jn(t.to)),t.immediate||(t.fromValues=t.values.map(e=>e.lastPosition)),Ro(this)||(P0(this,!0),is(this)||this._resume())}_resume(){Dr.skipAnimation?this.finish():Bc.start(this)}_stop(t,e){if(Ro(this)){P0(this,!1);const n=this.animation;dt(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qa(this,{type:"idle",parent:this});const r=e?Yi(this.get()):Lr(this.get(),as(this,t??n.to));Ka(this._pendingCalls,r),n.changed&&(n.changed=!1,cs(this,"onRest",r,this))}}};function as(t,e){const n=rs(e),r=rs(t.get());return oo(r,n)}function B0(t,e=t.loop,n=t.to){const r=ii(e);if(r){const o=r!==!0&&E0(r),i=(o||t).reverse,a=!o||o.reset;return ss({...t,loop:e,default:!1,pause:void 0,to:!i||Td(n)?n:void 0,from:a?t.from:void 0,reset:a,...o})}}function ss(t){const{to:e,from:n}=t=E0(t),r=new Set;return Se.obj(e)&&N0(e,r),Se.obj(n)&&N0(n,r),t.keys=r.size?Array.from(r):null,t}function E8(t){const e=ss(t);return Se.und(e.default)&&(e.default=Id(e)),e}function N0(t,e){Wr(t,(n,r)=>n!=null&&e.add(r))}var C8=["onStart","onRest","onChange","onPause","onResume"];function R0(t,e,n){t.animation[n]=e[n]!==b0(e,n)?w0(e[n],t.key):void 0}function cs(t,e,...n){var r,o,i,a;(o=(r=t.animation)[e])==null||o.call(r,...n),(a=(i=t.defaultProps)[e])==null||a.call(i,...n)}var _8=["onStart","onChange","onRest"],A8=1,S8=class{constructor(t,e){this.id=A8++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];Se.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(ss(t)),this}start(t){let{queue:e}=this;return t?e=hr(t).map(ss):this.queue=[],this._flush?this._flush(this,e):(V0(this,e),Dd(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;dt(hr(e),r=>n[r].stop(!!t))}else os(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(Se.und(t))this.start({pause:!0});else{const e=this.springs;dt(hr(t),n=>e[n].pause())}return this}resume(t){if(Se.und(t))this.start({pause:!1});else{const e=this.springs;dt(hr(t),n=>e[n].resume())}return this}each(t){Wr(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ya(t,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&e.size&&Ya(e,([s,c])=>{c.value=a,s(c,this,this._item)}),i&&(this._started=!1,Ya(n,([s,c])=>{c.value=a,s(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Qe.onFrame(this._onFrame)}};function Dd(t,e){return Promise.all(e.map(n=>D0(t,n))).then(n=>Od(t,n))}async function D0(t,e,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=e,l=Se.obj(e.default)&&e.default;a&&(e.loop=!1),o===!1&&(e.to=null),i===!1&&(e.from=null);const f=Se.arr(o)||Se.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,l&&(l.onRest=void 0)):dt(_8,g=>{const m=e[g];if(Se.fun(m)){const y=t._events[g];e[g]=({finished:w,cancelled:b})=>{const E=y.get(m);E?(w||(E.finished=!1),b&&(E.cancelled=!0)):y.set(m,{value:null,finished:w||!1,cancelled:b||!1})},l&&(l[g]=e[g])}});const h=t._state;e.pause===!h.paused?(h.paused=e.pause,Ka(e.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(e.pause=!0);const d=(r||Object.keys(t.springs)).map(g=>t.springs[g].start(e)),p=e.cancel===!0||b0(e,"cancel")===!0;(f||p&&h.asyncId)&&d.push(A0(++t._lastAsyncId,{props:e,state:h,actions:{pause:pd,resume:pd,start(g,m){p?(os(h,t._lastAsyncId),m(Yi(t))):(g.onRest=s,m(I0(f,g,h,t)))}}})),h.paused&&await new Promise(g=>{h.resumeQueue.add(g)});const u=Od(t,await Promise.all(d));if(a&&u.finished&&!(n&&u.noop)){const g=B0(e,a,o);if(g)return V0(t,[g]),D0(t,g,!0)}return c&&Qe.batchedUpdates(()=>c(u,t,t.item)),u}function M0(t,e){const n={...t.springs};return e&&dt(hr(e),r=>{Se.und(r.keys)&&(r=ss(r)),Se.obj(r.to)||(r={...r,to:void 0}),j0(n,r,o=>F0(o))}),L0(t,n),n}function L0(t,e){Wr(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Wi(n,t))})}function F0(t,e){const n=new b8;return n.key=t,e&&Wi(n,e),n}function j0(t,e,n){e.keys&&dt(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function V0(t,e){dt(e,n=>{j0(t.springs,n,r=>F0(r,t))})}var Wc=({children:t,...e})=>{const n=x.useContext(Yc),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=Z6(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Yc;return ce.createElement(i,{value:e},t)},Yc=I8(Wc,{});Wc.Provider=Yc.Provider,Wc.Consumer=Yc.Consumer;function I8(t,e){return Object.assign(t,ce.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}var T8=()=>{const t=[],e=function(r){Q6();const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){const o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return dt(t,r=>r.pause(...arguments)),this},e.resume=function(){return dt(t,r=>r.resume(...arguments)),this},e.set=function(r){dt(t,(o,i)=>{const a=Se.fun(r)?r(i,o):r;a&&o.set(a)})},e.start=function(r){const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},e.stop=function(){return dt(t,r=>r.stop(...arguments)),this},e.update=function(r){return dt(t,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return Se.fun(r)?r(i,o):r};return e._getProps=n,e};function x8(t,e,n){const r=Se.fun(e)&&e;r&&!n&&(n=[]);const o=x.useMemo(()=>r||arguments.length==3?T8():void 0,[]),i=x.useRef(0),a=d0(),s=x.useMemo(()=>({ctrls:[],queue:[],flush(y,w){const b=M0(y,w);return i.current>0&&!s.queue.length&&!Object.keys(b).some(C=>!y.springs[C])?Dd(y,w):new Promise(C=>{L0(y,b),s.queue.push(()=>{C(Dd(y,w))}),a()})}}),[]),c=x.useRef([...s.ctrls]),l=[],f=h0(t)||0;x.useMemo(()=>{dt(c.current.slice(t,f),y=>{h8(y,o),y.stop(!0)}),c.current.length=t,h(f,t)},[t]),x.useMemo(()=>{h(0,Math.min(f,t))},n);function h(y,w){for(let b=y;b<w;b++){const E=c.current[b]||(c.current[b]=new S8(null,s.flush)),C=r?r(b,E):e[b];C&&(l[b]=E8(C))}}const d=c.current.map((y,w)=>M0(y,l[w])),p=x.useContext(Wc),u=h0(p),g=p!==u&&f8(p);_d(()=>{i.current++,s.ctrls=c.current;const{queue:y}=s;y.length&&(s.queue=[],dt(y,w=>w())),dt(c.current,(w,b)=>{o==null||o.add(w),g&&w.start({default:p});const E=l[b];E&&(p8(w,E.ref),w.ref?w.queue.push(E):w.start(E))})}),f0(()=>()=>{dt(s.ctrls,y=>y.stop(!0))});const m=d.map(y=>({...y}));return o?[m,o]:m}function O8(t,e){const n=Se.fun(t),[[r],o]=x8(1,n?t:[t],n?[]:e);return n||arguments.length==2?[r,o]:r}var P8=class extends kd{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=$a(...e);const n=this._get(),r=Sd(n);Ad(this,r.create(n))}advance(t){const e=this._get(),n=this.get();oo(e,n)||(Yr(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&U0(this._active)&&Md(this)}_get(){const t=Se.arr(this.source)?this.source.map(Jn):hr(Jn(this.source));return this.calc(...t)}_start(){this.idle&&!U0(this._active)&&(this.idle=!1,dt(Gc(this),t=>{t.done=!1}),Dr.skipAnimation?(Qe.batchedUpdates(()=>this.advance()),Md(this)):Bc.start(this))}_attach(){let t=1;dt(hr(this.source),e=>{Ir(e)&&Wi(e,this),Pd(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){dt(hr(this.source),t=>{Ir(t)&&Ja(t,this)}),this._active.clear(),Md(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=hr(this.source).reduce((e,n)=>Math.max(e,(Pd(n)?n.priority:0)+1),0))}};function k8(t){return t.idle!==!1}function U0(t){return!t.size||Array.from(t).every(k8)}function Md(t){t.idle||(t.idle=!0,dt(Gc(t),e=>{e.done=!0}),Qa(t,{type:"idle",parent:t}))}Dr.assign({createStringInterpolator:u0,to:(t,e)=>new P8(t,e)});var G0=/^--/;function B8(t,e){return e==null||typeof e=="boolean"||e===""?"":typeof e=="number"&&e!==0&&!G0.test(t)&&!(us.hasOwnProperty(t)&&us[t])?e+"px":(""+e).trim()}var q0={};function N8(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=e,l=Object.values(c),f=Object.keys(c).map(h=>n||t.hasAttribute(h)?h:q0[h]||(q0[h]=h.replace(/([A-Z])/g,d=>"-"+d.toLowerCase())));o!==void 0&&(t.textContent=o);for(const h in r)if(r.hasOwnProperty(h)){const d=B8(h,r[h]);G0.test(h)?t.style.setProperty(h,d):t.style[h]=d}f.forEach((h,d)=>{t.setAttribute(h,l[d])}),i!==void 0&&(t.scrollTop=i),a!==void 0&&(t.scrollLeft=a),s!==void 0&&t.setAttribute("viewBox",s)}var us={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},R8=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),D8=["Webkit","Ms","Moz","O"];us=Object.keys(us).reduce((t,e)=>(D8.forEach(n=>t[R8(n,e)]=t[e]),t),us);var M8=/^(matrix|translate|scale|rotate|skew)/,L8=/^(translate)/,F8=/^(rotate|skew)/,Ld=(t,e)=>Se.num(t)&&t!==0?t+e:t,Kc=(t,e)=>Se.arr(t)?t.every(n=>Kc(n,e)):Se.num(t)?t===e:parseFloat(t)===e,j8=class extends Hc{constructor({x:t,y:e,z:n,...r}){const o=[],i=[];(t||e||n)&&(o.push([t||0,e||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>Ld(s,"px")).join(",")})`,Kc(a,0)])),Wr(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(M8.test(s)){if(delete r[s],Se.und(a))return;const c=L8.test(s)?"px":F8.test(s)?"deg":"";o.push(hr(a)),i.push(s==="rotate3d"?([l,f,h,d])=>[`rotate3d(${l},${f},${h},${Ld(d,c)})`,Kc(d,0)]:l=>[`${s}(${l.map(f=>Ld(f,c)).join(",")})`,Kc(l,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new V8(o,i)),super(r)}},V8=class extends i0{constructor(t,e){super(),this.inputs=t,this.transforms=e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return dt(this.inputs,(n,r)=>{const o=Jn(n[0]),[i,a]=this.transforms[r](Se.arr(o)?o:n.map(Jn));t+=" "+i,e=e&&a}),e?"none":t}observerAdded(t){t==1&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Wi(n,this)))}observerRemoved(t){t==0&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Ja(n,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Qa(this,t)}},U8=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Dr.assign({batchedUpdates:Pi.unstable_batchedUpdates,createStringInterpolator:u0,colors:x6});var G8=s8(U8,{applyAnimatedValues:N8,createAnimatedStyle:t=>new j8(t),getComponentProps:({scrollTop:t,scrollLeft:e,...n})=>n}),q8=G8.animated;function zc(t){const{rows:e}=t,n=O8({from:{opacity:0},to:{opacity:1}});return v.jsxs(q8.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(e)].map((r,o)=>v.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),v.jsx("span",{className:"sr-only",children:"Loading..."})]})}function H0({children:t,offset:e,max:n=4,initialCollapsed:r=!0}){const o=x.useRef(null),[i,a]=x.useState(0),[s,c]=x.useState(r),l=s&&x.Children.count(t)>n?n:x.Children.count(t);x.useEffect(()=>{o.current&&(i?s?o.current.style.marginBottom=`-${i-(i/l+(l-1)*(e??i/l/7.5))}px`:o.current.style.marginBottom="unset":a(o.current.offsetHeight))},[s,i]);const f=d=>(100-(l-1-d))/100,h=d=>d*(i/l-(e??i/l/7.5));return v.jsx("div",{ref:o,className:"hover:cursor-pointer",onClick:()=>l>1&&c(!s),children:x.Children.map(x.Children.toArray(t).slice(-1*l),(d,p)=>v.jsx("div",{className:`${!s&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:s&&l>1?`scaleX(${f(p)}) translateY(-${h(p)}px)`:void 0},children:d}))})}const H8=Ui("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),W8=Ui("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),Y8=({id:t,disabled:e,onChange:n,defaultChecked:r=!1,size:o="md"})=>{const i=e,[a,s]=x.useState(r),[c,l]=x.useState(!1),f=()=>{i||(s(!a),n&&n())},h=()=>{e||l(!0)},d=()=>{l(!1)},p=Dn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":c,"bg-core-primary-500 hover:bg-core-primary-600":a&&!e,"bg-core-gray-200 hover:bg-core-gray-300":!a&&!e,"bg-core-gray-100":e},W8({size:o})),u=o==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return v.jsxs("div",{className:`inline-flex items-center py-1 ${i?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:h,children:[v.jsx("input",{className:"sr-only ",id:t,type:"checkbox",checked:a,disabled:i,onBlur:d,onChange:f,onFocus:h}),v.jsx("div",{className:p,children:v.jsx("div",{className:Dn(H8({size:o}),`${a?u:""} ${i?"shadow-none":"shadow-xs"}`)})})]})},$c=({id:t,children:e,size:n="md",description:r,toggleLeft:o=!0,disabled:i,helperText:a,defaultChecked:s=!1,label:c,required:l=!1,tooltip:f,onChange:h})=>{const d=x.useId(),p=t??d;return v.jsxs("div",{className:`flex ${o?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[v.jsx(Y8,{disabled:i,defaultChecked:s,id:p,size:n,onChange:h}),e||(c||r||f||a)&&v.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[v.jsx(Gn,{className:Dn("font-normal"),description:r,required:l,tooltip:f,htmlFor:p,disabled:i,children:c}),v.jsx(Gn.Helper,{disabled:i,helperText:a})]})]})};$c.displayName="Switch";const W0=x.createContext(null);function K8(t=!1){const e=x.useContext(W0);if(!e&&!t)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return e}const Y0=x.forwardRef(({toggleLeft:t=!1,size:e="md",children:n,description:r,disabled:o,helperText:i,id:a,label:s,required:c,tooltip:l},f)=>{const h=x.useId(),d=a??h,p=s??r??l??i?v.jsxs("div",{className:"inline-flex flex-col",children:[v.jsx(Gn,{className:"cursor-default",description:r,required:c,tooltip:l,htmlFor:d,disabled:o,children:s}),v.jsx(Gn.Helper,{disabled:o,helperText:i})]}):null;return v.jsx(W0.Provider,{value:{disabled:o,toggleLeft:t,size:e},children:v.jsxs("div",{ref:f,"aria-describedby":i?`${d}__describer`:void 0,"aria-labelledby":s?`${d}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??i??r??l?v.jsx("div",{className:"flex flex-col",children:p}):null,n?v.jsx("div",{className:Dn("flex flex-col gap-2"),children:n}):null]})})});Y0.displayName="SwitchGroup",Object.assign(Y0,{Item:({disabled:t,label:e,defaultChecked:n})=>{const r=K8(),{disabled:o,size:i,toggleLeft:a}=r??{};return v.jsx($c,{toggleLeft:a,disabled:t??o,label:e,defaultChecked:n,size:i})}});const z8=({children:t})=>v.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:t}),$8=({id:t,label:e,icon:n,pathname:r,activeTab:o,setActiveTab:i})=>v.jsx(_1,{className:"flex flex-grow items-center",to:r??"",children:v.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${o===t?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>i(t),children:[v.jsx(In,{icon:n,className:"mr-2",variant:o===t?"discovery":"secondary"}),e]})}),K0=Object.prototype.toString;function Fd(t){switch(K0.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ao(t,Error)}}function Ki(t,e){return K0.call(t)===`[object ${e}]`}function z0(t){return Ki(t,"ErrorEvent")}function $0(t){return Ki(t,"DOMError")}function X8(t){return Ki(t,"DOMException")}function io(t){return Ki(t,"String")}function jd(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Vd(t){return t===null||jd(t)||typeof t!="object"&&typeof t!="function"}function zi(t){return Ki(t,"Object")}function Xc(t){return typeof Event<"u"&&ao(t,Event)}function Q8(t){return typeof Element<"u"&&ao(t,Element)}function J8(t){return Ki(t,"RegExp")}function Qc(t){return!!(t&&t.then&&typeof t.then=="function")}function Z8(t){return zi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function ao(t,e){try{return t instanceof e}catch{return!1}}function X0(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function $i(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Q0(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const o=t[r];try{X0(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function eC(t,e,n=!1){return io(t)?J8(e)?e.test(t):io(e)?n?t===e:t.includes(e):!1:!1}function si(t,e=[],n=!1){return e.some(r=>eC(t,r,n))}function tC(t,e,n=250,r,o,i,a){if(!i.exception||!i.exception.values||!a||!ao(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=nC(Ud(t,e,o,a.originalException,r,i.exception.values,s,0),n))}function Ud(t,e,n,r,o,i,a,s){if(i.length>=n+1)return i;let c=[...i];if(ao(r[o],Error)){J0(a,s);const l=t(e,r[o]),f=c.length;Z0(l,o,f,s),c=Ud(t,e,n,r[o],o,[l,...c],l,f)}return Array.isArray(r.errors)&&r.errors.forEach((l,f)=>{if(ao(l,Error)){J0(a,s);const h=t(e,l),d=c.length;Z0(h,`errors[${f}]`,d,s),c=Ud(t,e,n,l,o,[h,...c],h,d)}}),c}function J0(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Z0(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function nC(t,e){return t.map(n=>(n.value&&(n.value=$i(n.value,e)),n))}function eg(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const ci="8.34.0",bt=globalThis;function Jc(t,e,n){const r=bt,o=r.__SENTRY__=r.__SENTRY__||{},i=o[ci]=o[ci]||{};return i[t]||(i[t]=e())}const Xi=bt,rC=80;function ui(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let i=0,a=0;const s=" > ",c=s.length;let l;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||rC;for(;n&&i++<r&&(l=oC(n,f),!(l==="html"||i>1&&a+o.length*c+l.length>=h));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function oC(t,e){const n=t,r=[];if(!n||!n.tagName)return"";if(Xi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=e&&e.length?e.filter(a=>n.getAttribute(a)).map(a=>[a,n.getAttribute(a)]):null;if(o&&o.length)o.forEach(a=>{r.push(`[${a[0]}="${a[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&io(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const a of i){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function iC(){try{return Xi.document.location.href}catch{return""}}function aC(t){return Xi.document&&Xi.document.querySelector?Xi.document.querySelector(t):null}function tg(t){if(!Xi.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}const Qi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sC="Sentry Logger ",Gd=["debug","info","warn","error","log","assert","trace"],Zc={};function qd(t){if(!("console"in bt))return t();const e=bt.console,n={},r=Object.keys(Zc);r.forEach(o=>{const i=Zc[o];n[o]=e[o],e[o]=i});try{return t()}finally{r.forEach(o=>{e[o]=n[o]})}}function cC(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Qi?Gd.forEach(n=>{e[n]=(...r)=>{t&&qd(()=>{bt.console[n](`${sC}[${n}]:`,...r)})}}):Gd.forEach(n=>{e[n]=()=>{}}),e}const Te=Jc("logger",cC),uC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function lC(t){return t==="http"||t==="https"}function ls(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function dC(t){const e=uC.exec(t);if(!e){qd(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,o="",i="",a="",s=""]=e.slice(1);let c="",l=s;const f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){const h=l.match(/^\d+/);h&&(l=h[0])}return ng({host:i,pass:o,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function ng(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function fC(t){if(!Qi)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(Te.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?lC(r)?e&&isNaN(parseInt(e,10))?(Te.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(Te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function hC(t){const e=typeof t=="string"?dC(t):ng(t);if(!(!e||!fC(e)))return e}class Kr extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function pr(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);typeof o=="function"&&rg(o,r),t[e]=o}function Tr(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Qi&&Te.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function rg(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Tr(t,"__sentry_original__",e)}catch{}}function Hd(t){return t.__sentry_original__}function pC(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function og(t){if(Fd(t))return{message:t.message,name:t.name,stack:t.stack,...ag(t)};if(Xc(t)){const e={type:t.type,target:ig(t.target),currentTarget:ig(t.currentTarget),...ag(t)};return typeof CustomEvent<"u"&&ao(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function ig(t){try{return Q8(t)?ui(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ag(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function gC(t,e=40){const n=Object.keys(og(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return $i(r,e);for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(!(i.length>e))return o===n.length?i:$i(i,e)}return""}function Mn(t){return Wd(t,new Map)}function Wd(t,e){if(mC(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const o of Object.getOwnPropertyNames(t))typeof t[o]<"u"&&(r[o]=Wd(t[o],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(o=>{r.push(Wd(o,e))}),r}return t}function mC(t){if(!zi(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const sg=50,li="?",cg=/\(error: (.*)\)/,ug=/captureMessage|captureException/;function yC(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const i=[],a=n.split(`
|
|
101
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function z(H,W){(W==null||W>H.length)&&(W=H.length);for(var J=0,I=new Array(W);J<W;J++)I[J]=H[J];return I}function te(H){return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},te(H)}function re(H,W){var J=Object.keys(H);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(H);W&&(I=I.filter(function(M){return Object.getOwnPropertyDescriptor(H,M).enumerable})),J.push.apply(J,I)}return J}function ne(H,W){for(var J=0;J<W.length;J++){var I=W[J];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(H,we(I.key),I)}}function se(H,W,J){return(W=we(W))in H?Object.defineProperty(H,W,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[W]=J,H}function we(H){var W=function(J,I){if(te(J)!="object"||!J)return J;var M=J[Symbol.toPrimitive];if(M!==void 0){var F=M.call(J,I);if(te(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(H,"string");return te(W)=="symbol"?W:W+""}var le=function(){return H=function I(M,F){var B=this;if(function(he,ve){if(!(he instanceof ve))throw new TypeError("Cannot call a class as a function")}(this,I),se(this,"input",void 0),se(this,"options",void 0),se(this,"utilities",void 0),se(this,"caretPosition",void 0),se(this,"caretPositionEnd",void 0),se(this,"keyboardDOM",void 0),se(this,"keyboardPluginClasses",void 0),se(this,"keyboardDOMClass",void 0),se(this,"buttonElements",void 0),se(this,"currentInstanceName",void 0),se(this,"allKeyboardInstances",void 0),se(this,"keyboardInstanceNames",void 0),se(this,"isFirstKeyboardInstance",void 0),se(this,"physicalKeyboard",void 0),se(this,"modules",void 0),se(this,"activeButtonClass",void 0),se(this,"holdInteractionTimeout",void 0),se(this,"holdTimeout",void 0),se(this,"isMouseHold",void 0),se(this,"initialized",void 0),se(this,"candidateBox",void 0),se(this,"keyboardRowsDOM",void 0),se(this,"defaultName","default"),se(this,"activeInputElement",null),se(this,"handleParams",function(he,ve){var ue,Be,Re;if(typeof he=="string")ue=he.split(".").join(""),Be=document.querySelector(".".concat(ue)),Re=ve;else if(he instanceof HTMLDivElement){if(!he.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ue=he.className.split(" ")[0],Be=he,Re=ve}else ue="simple-keyboard",Be=document.querySelector(".".concat(ue)),Re=he;return{keyboardDOMClass:ue,keyboardDOM:Be,options:Re}}),se(this,"getOptions",function(){return B.options}),se(this,"getCaretPosition",function(){return B.caretPosition}),se(this,"getCaretPositionEnd",function(){return B.caretPositionEnd}),se(this,"registerModule",function(he,ve){B.modules[he]||(B.modules[he]={}),ve(B.modules[he])}),se(this,"getKeyboardClassString",function(){for(var he=arguments.length,ve=new Array(he),ue=0;ue<he;ue++)ve[ue]=arguments[ue];return[B.keyboardDOMClass].concat(ve).filter(function(Be){return!!Be}).join(" ")}),typeof window<"u"){var X=this.handleParams(M,F),ee=X.keyboardDOMClass,Z=X.keyboardDOM,$=X.options,pe=$===void 0?{}:$;this.utilities=new E({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=Z,this.options=function(he){for(var ve=1;ve<arguments.length;ve++){var ue=arguments[ve]!=null?arguments[ve]:{};ve%2?re(Object(ue),!0).forEach(function(Be){se(he,Be,ue[Be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(he,Object.getOwnPropertyDescriptors(ue)):re(Object(ue)).forEach(function(Be){Object.defineProperty(he,Be,Object.getOwnPropertyDescriptor(ue,Be))})}return he}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},pe),this.keyboardPluginClasses="",E.bindMethods(I,this);var be=this.options.inputName,fe=be===void 0?this.defaultName:be;if(this.input={},this.input[fe]="",this.keyboardDOMClass=ee,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new N({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new k({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(ee,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},W=[{key:"setCaretPosition",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I;this.caretPosition=I,this.caretPositionEnd=M}},{key:"getInputCandidates",value:function(I){var M=this,F=this.options,B=F.layoutCandidates,X=F.layoutCandidatesCaseSensitiveMatch;if(!B||te(B)!=="object")return{};var ee=Object.keys(B).filter(function(pe){var be=I.substring(0,M.getCaretPositionEnd()||0)||I,fe=new RegExp("".concat(M.utilities.escapeRegex(pe),"$"),X?"g":"gi");return!!V(be.matchAll(fe)).length});if(ee.length>1){var Z=ee.sort(function(pe,be){return be.length-pe.length})[0];return{candidateKey:Z,candidateValue:B[Z]}}if(ee.length){var $=ee[0];return{candidateKey:$,candidateValue:B[$]}}return{}}},{key:"showCandidatesBox",value:function(I,M,F){var B=this;this.candidateBox&&this.candidateBox.show({candidateValue:M,targetElement:F,onSelect:function(X,ee){var Z=B.options,$=Z.layoutCandidatesCaseSensitiveMatch,pe=Z.disableCandidateNormalization,be=Z.enableLayoutCandidatesKeyPress,fe=X;pe||(fe=X.normalize("NFD")),typeof B.options.beforeInputUpdate=="function"&&B.options.beforeInputUpdate(B);var he=B.getInput(B.options.inputName,!0),ve=B.getCaretPositionEnd()||0,ue=he.substring(0,ve||0)||he,Be=new RegExp("".concat(B.utilities.escapeRegex(I),"$"),$?"g":"gi"),Re=ue.replace(Be,fe),at=he.replace(ue,Re),xe=Re.length-ue.length,De=(ve||he.length)+xe;De<0&&(De=0),B.setInput(at,B.options.inputName,!0),B.setCaretPosition(De),be&&typeof B.options.onKeyPress=="function"&&B.options.onKeyPress(X,ee),typeof B.options.onChange=="function"&&B.options.onChange(B.getInput(B.options.inputName,!0),ee),typeof B.options.onChangeAll=="function"&&B.options.onChangeAll(B.getAllInputs(),ee)}})}},{key:"handleButtonClicked",value:function(I,M){var F=this.options,B=F.inputName,X=B===void 0?this.defaultName:B,ee=F.debug;if(I!=="{//}"){this.input[X]||(this.input[X]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var Z=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(I)&&this.activeInputElement&&this.input[X]&&this.input[X]===Z&&this.caretPosition===0&&this.caretPositionEnd===Z.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(I,M);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(I,M),this.input[X]!==Z&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(Z))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,Z))return;var $=this.utilities.getUpdatedInput(I,this.input[X],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput($,this.options.inputName,!0),ee&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),M==null?void 0:M.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),M),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),M),M!=null&&M.target&&this.options.enableLayoutCandidates){var pe,be=this.getInputCandidates(Z),fe=be.candidateKey,he=be.candidateValue;fe&&he?this.showCandidatesBox(fe,he,this.keyboardDOM):(pe=this.candidateBox)===null||pe===void 0||pe.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),ee&&console.log("Key pressed:",I)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(I){this.options.syncInstanceInputs?this.dispatch(function(M){M.isMouseHold=I}):this.isMouseHold=I}},{key:"handleButtonMouseDown",value:function(I,M){var F=this;M&&(this.options.preventMouseDownDefault&&M.preventDefault(),this.options.stopMouseDownPropagation&&M.stopPropagation(),M.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(F.getMouseHold()&&(!I.includes("{")&&!I.includes("}")||I==="{delete}"||I==="{backspace}"||I==="{bksp}"||I==="{space}"||I==="{tab}")||I==="{arrowright}"||I==="{arrowleft}"||I==="{arrowup}"||I==="{arrowdown}")&&(F.options.debug&&console.log("Button held:",I),F.handleButtonHold(I)),clearTimeout(F.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(I,M){var F=this;M&&(this.options.preventMouseUpDefault&&M.preventDefault&&M.preventDefault(),this.options.stopMouseUpPropagation&&M.stopPropagation&&M.stopPropagation(),!(M.target===this.keyboardDOM||M.target&&this.keyboardDOM.contains(M.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(M.target===this.candidateBox.candidateBoxElement||M.target&&this.candidateBox.candidateBoxElement.contains(M.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(B){B.classList.remove(F.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),I&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(I,M)}},{key:"handleKeyboardContainerMouseDown",value:function(I){this.options.preventMouseDownDefault&&I.preventDefault()}},{key:"handleButtonHold",value:function(I){var M=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){M.getMouseHold()?(M.handleButtonClicked(I),M.handleButtonHold(I)):clearTimeout(M.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var I=this;this.dispatch(function(M){M.replaceInput(I.input),M.setCaretPosition(I.caretPosition,I.caretPositionEnd)})}},{key:"clearInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[I]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,M=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!M&&this.syncInstanceInputs(),this.options.rtl?""+this.input[I].replace("","").replace("","")+"":this.input[I]}},{key:"getAllInputs",value:function(){var I=this,M={};return Object.keys(this.input).forEach(function(F){M[F]=I.getInput(F,!0)}),M}},{key:"setInput",value:function(I){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,F=arguments.length>2?arguments[2]:void 0;this.input[M]=I,!F&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(I){this.input=I}},{key:"setOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=this.changedOptions(I);this.options=Object.assign(this.options,I),M.length&&(this.options.debug&&console.log("changedOptions",M),this.onSetOptions(M),this.render())}},{key:"changedOptions",value:function(I){var M=this;return Object.keys(I).filter(function(F){return JSON.stringify(I[F])!==JSON.stringify(M.options[F])})}},{key:"onSetOptions",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];I.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(I.includes("layoutCandidatesPageSize")||I.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new k({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(I){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(M){I(window.SimpleKeyboardInstances[M],M)})}},{key:"addButtonTheme",value:function(I,M){var F=this;M&&I&&(I.split(" ").forEach(function(B){M.split(" ").forEach(function(X){F.options.buttonTheme||(F.options.buttonTheme=[]);var ee=!1;F.options.buttonTheme.map(function(Z){if(Z!=null&&Z.class.split(" ").includes(X)){ee=!0;var $=Z.buttons.split(" ");$.includes(B)||(ee=!0,$.push(B),Z.buttons=$.join(" "))}return Z}),ee||F.options.buttonTheme.push({class:X,buttons:I})})}),this.render())}},{key:"removeButtonTheme",value:function(I,M){var F=this;if(!I&&!M)return this.options.buttonTheme=[],void this.render();I&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(I.split(" ").forEach(function(B){var X;(X=F.options)===null||X===void 0||(X=X.buttonTheme)===null||X===void 0||X.map(function(ee,Z){if(ee&&M&&M.includes(ee.class)||!M){var $,pe,be=($=ee)===null||$===void 0?void 0:$.buttons.split(" ").filter(function(fe){return fe!==B});ee&&be!=null&&be.length?ee.buttons=be.join(" "):((pe=F.options.buttonTheme)===null||pe===void 0||pe.splice(Z,1),ee=null)}return ee})}),this.render())}},{key:"getButtonElement",value:function(I){var M,F=this.buttonElements[I];return F&&(M=F.length>1?F:F[0]),M}},{key:"inputPatternIsValid",value:function(I){var M,F=this.options.inputPattern;if((M=F instanceof RegExp?F:F[this.options.inputName||this.defaultName])&&I){var B=M.test(I);return this.options.debug&&console.log('inputPattern ("'.concat(M,'"): ').concat(B?"passed":"did not pass!")),B}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.addEventListener("keyup",this.handleKeyUp,M),document.addEventListener("keydown",this.handleKeyDown,M),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(I){this.caretEventHandler(I),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(I)}},{key:"handleKeyDown",value:function(I){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(I)}},{key:"handleMouseUp",value:function(I){this.caretEventHandler(I)}},{key:"handleTouchEnd",value:function(I){this.caretEventHandler(I)}},{key:"handleSelect",value:function(I){this.caretEventHandler(I)}},{key:"handleSelectionChange",value:function(I){navigator.userAgent.includes("Firefox")||this.caretEventHandler(I)}},{key:"caretEventHandler",value:function(I){var M,F=this;I.target.tagName&&(M=I.target.tagName.toLowerCase()),this.dispatch(function(B){var X=I.target===B.keyboardDOM||I.target&&B.keyboardDOM.contains(I.target);if(F.options.syncInstanceInputs&&Array.isArray(I.path)&&(X=I.path.some(function($){var pe;return $==null||(pe=$.hasAttribute)===null||pe===void 0?void 0:pe.call($,"data-skInstance")})),(M==="textarea"||M==="input"&&["text","search","url","tel","password"].includes(I.target.type))&&!B.options.disableCaretPositioning){var ee=I.target.selectionStart,Z=I.target.selectionEnd;B.options.rtl&&(ee=B.utilities.getRtlOffset(ee,B.getInput()),Z=B.utilities.getRtlOffset(Z,B.getInput())),B.setCaretPosition(ee,Z),F.activeInputElement=I.target,B.options.debug&&console.log("Caret at: ",B.getCaretPosition(),B.getCaretPositionEnd(),I&&I.target.tagName.toLowerCase(),"(".concat(B.keyboardDOMClass,")"),I==null?void 0:I.type)}else!B.options.disableCaretPositioning&&X||(I==null?void 0:I.type)==="selectionchange"||(B.setCaretPosition(null),F.activeInputElement=null,B.options.debug&&console.log('Caret position reset due to "'.concat(I==null?void 0:I.type,'" event'),I))})}},{key:"recurseButtons",value:function(I){var M=this;I&&Object.keys(this.buttonElements).forEach(function(F){return M.buttonElements[F].forEach(I)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var I=this.options.physicalKeyboardHighlightPreventDefault,M=I!==void 0&&I;document.removeEventListener("keyup",this.handleKeyUp,M),document.removeEventListener("keydown",this.handleKeyDown,M),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(F){F&&(F.onpointerdown=null,F.onpointerup=null,F.onpointercancel=null,F.ontouchstart=null,F.ontouchend=null,F.ontouchcancel=null,F.onclick=null,F.onmousedown=null,F.onmouseup=null,F.remove(),F=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(I){var M=this.options.buttonTheme,F=[];return Array.isArray(M)&&M.forEach(function(B){if(B&&B.class&&typeof B.class=="string"&&B.buttons&&typeof B.buttons=="string"){var X=B.class.split(" ");B.buttons.split(" ").includes(I)&&(F=[].concat(V(F),V(X)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',B)}),F}},{key:"setDOMButtonAttributes",value:function(I,M){var F=this.options.buttonAttributes;Array.isArray(F)&&F.forEach(function(B){B.attribute&&typeof B.attribute=="string"&&B.value&&typeof B.value=="string"&&B.buttons&&typeof B.buttons=="string"?B.buttons.split(" ").includes(I)&&M(B.attribute,B.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',B)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(I){if(I.target.classList.contains("hg-button"))return I.preventDefault(),I.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var I=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(M){var F=new M(I);F.init&&F.init(I)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(I,M){return!!this.modules[I]&&this.modules[I][M]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(I,M,F,B){var X=this,ee=Array.from(I.children),Z=0;return ee.length&&F.forEach(function($,pe){var be=B[pe];if(!(be&&be>$))return!1;var fe=$-Z,he=be-Z,ve=document.createElement("div");ve.className+="hg-button-container";var ue="".concat(X.options.layoutName,"-r").concat(M,"c").concat(pe);ve.setAttribute("data-skUID",ue);var Be=ee.splice(fe,he-fe+1);Z=he-fe,Be.forEach(function(Re){return ve.appendChild(Re)}),ee.splice(fe,0,ve),I.innerHTML="",ee.forEach(function(Re){return I.appendChild(Re)}),X.options.debug&&console.log("rowDOMContainer",Be,fe,he,Z+1)}),I}},{key:"render",value:function(){var I=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var M="hg-layout-".concat(this.options.layoutName),F=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},B=this.options.useTouchEvents||!1,X=B?"hg-touch-events":"",ee=this.options.useMouseEvents||!1,Z=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,M,this.keyboardPluginClasses,X),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",F[this.options.layoutName||this.defaultName].forEach(function($,pe){var be=$.split(" ");I.options.excludeFromLayout&&I.options.excludeFromLayout[I.options.layoutName||I.defaultName]&&(be=be.filter(function(ue){return I.options.excludeFromLayout&&!I.options.excludeFromLayout[I.options.layoutName||I.defaultName].includes(ue)}));var fe=document.createElement("div");fe.className+="hg-row";var he=[],ve=[];be.forEach(function(ue,Be){var Re,at=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("[")===0,xe=!Z&&typeof ue=="string"&&ue.length>1&&ue.indexOf("]")===ue.length-1;at&&(he.push(Be),ue=ue.replace(/\[/g,"")),xe&&(ve.push(Be),ue=ue.replace(/\]/g,""));var De=I.utilities.getButtonClass(ue),Pe=I.utilities.getButtonDisplayName(ue,I.options.display,I.options.mergeDisplay),ot=I.options.useButtonTag?"button":"div",Ze=document.createElement(ot);Ze.className+="hg-button ".concat(De),(Re=Ze.classList).add.apply(Re,V(I.getButtonThemeClasses(ue))),I.setDOMButtonAttributes(ue,function(_e,$t){Ze.setAttribute(_e,$t)}),I.activeButtonClass="hg-activeButton",!I.utilities.pointerEventsSupported()||B||ee?B?(Ze.ontouchstart=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.ontouchend=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.ontouchcancel=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onclick=function(_e){I.setMouseHold(!1),typeof I.options.onKeyReleased!="function"&&I.handleButtonClicked(ue,_e)},Ze.onmousedown=function(_e){typeof I.options.onKeyReleased!="function"||I.isMouseHold||I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onmouseup=function(_e){I.handleButtonMouseUp(ue,_e)}):(Ze.onpointerdown=function(_e){I.handleButtonClicked(ue,_e),I.handleButtonMouseDown(ue,_e)},Ze.onpointerup=function(_e){I.handleButtonMouseUp(ue,_e)},Ze.onpointercancel=function(_e){I.handleButtonMouseUp(ue,_e)}),Ze.setAttribute("data-skBtn",ue);var Ot="".concat(I.options.layoutName,"-r").concat(pe,"b").concat(Be);Ze.setAttribute("data-skBtnUID",Ot);var Le=document.createElement("span");Le.innerHTML=Pe,Ze.appendChild(Le),I.buttonElements[ue]||(I.buttonElements[ue]=[]),I.buttonElements[ue].push(Ze),fe.appendChild(Ze)}),fe=I.parseRowDOMContainers(fe,pe,he,ve),I.keyboardRowsDOM.appendChild(fe)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||B||ee?B?(document.ontouchend=function($){return I.handleButtonMouseUp(void 0,$)},document.ontouchcancel=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.ontouchstart=function($){return I.handleKeyboardContainerMouseDown($)}):B||(document.onmouseup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onmousedown=function($){return I.handleKeyboardContainerMouseDown($)}):(document.onpointerup=function($){return I.handleButtonMouseUp(void 0,$)},this.keyboardDOM.onpointerdown=function($){return I.handleKeyboardContainerMouseDown($)}),this.onInit())}}],W&&ne(H.prototype,W),J&&ne(H,J),Object.defineProperty(H,"prototype",{writable:!1}),H;var H,W,J}(),Ce=le,ye=le}(),h}()},442:function(s){s.exports=n}},o={};function i(s){var c=o[s];if(c!==void 0)return c.exports;var l=o[s]={exports:{}};return r[s].call(l.exports,l,l.exports,i),l.exports}i.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return i.d(c,{a:c}),c},i.d=function(s,c){for(var l in c)i.o(c,l)&&!i.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:c[l]})},i.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},i.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{KeyboardReact:function(){return g},default:function(){return m}}),i(981);var s=i(442),c=i(548),l=i.n(c);function f(y){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},f(y)}function h(y,w){var b=Object.keys(y);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(y);w&&(E=E.filter(function(C){return Object.getOwnPropertyDescriptor(y,C).enumerable})),b.push.apply(b,E)}return b}function d(y){for(var w=1;w<arguments.length;w++){var b=arguments[w]!=null?arguments[w]:{};w%2?h(Object(b),!0).forEach(function(E){p(y,E,b[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(b)):h(Object(b)).forEach(function(E){Object.defineProperty(y,E,Object.getOwnPropertyDescriptor(b,E))})}return y}function p(y,w,b){var E;return E=function(C,S){if(f(C)!="object"||!C)return C;var T=C[Symbol.toPrimitive];if(T!==void 0){var P=T.call(C,S||"default");if(f(P)!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(w,"string"),(w=f(E)=="symbol"?E:E+"")in y?Object.defineProperty(y,w,{value:b,enumerable:!0,configurable:!0,writable:!0}):y[w]=b,y}var u=function(y){return d(d({},y),{},{keyboardRef:null})},g=function(y){var w=y.baseClass||"react-simple-keyboard",b=s.useRef(null),E=s.useRef(null),C=s.useRef(null),S=s.useRef(y);return s.useEffect(function(){return function(){C.current&&C.current.destroy(),b.current=!1}},[]),s.useEffect(function(){var T=function(j){return d(d({},j),{},{theme:"simple-keyboard ".concat(j.theme||"hg-theme-default")})}(y);if(!b.current){b.current=!0,T.debug&&console.log("ReactSimpleKeyboard: Init");var P=E.current,N=".".concat(w);C.current=new(l())(P||N,T),T.keyboardRef&&T.keyboardRef(C.current)}var L=function(j,K){var G=u(K),k=u(j);return Object.keys(G).filter(function(V){return G[V]!==k[V]})}(S.current,T);if(L.length){var U=C.current;S.current=T,U==null||U.setOptions(T),T.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",L)}},[b,w,S,y]),s.createElement("div",{className:w,ref:E})},m=g}(),a}()})})(F1);var d6=F1.exports;const f6=ll(d6);function j1({onChange:t,keyboardRef:e,layout:n,theme:r}){const[o,i]=x.useState("default"),a=s=>{(s==="{shift}"||s==="{lock}")&&i(o==="default"?"shift":"default")};return v.jsx(f6,{keyboardRef:s=>e.current=s,layoutName:o,layout:n,theme:r,onChange:t,onKeyPress:a,preventMouseDownDefault:!0})}function V1(){const{subscribe:t,unsubscribe:e,publish:n}=qa();return{initialize:(s,c)=>{t("openKeyboard",s),t("closeKeyboard",c)},terminate:(s,c)=>{e("openKeyboard",s),e("closeKeyboard",c)},open:s=>{n("openKeyboard",{inputId:s.target.id,inputValue:s.target.value})},close:()=>{n("closeKeyboard")}}}const fr="keyboard-custom-overlap-id";function h6({enabled:t}){const[e,n]=x.useState(!1),r=x.useRef(null),o=x.useRef(null),i=x.useRef(null),[a,s]=x.useState(),[c,l]=x.useState(0),{initialize:f,terminate:h}=V1(),d=w=>{var b,E;o.current=document.getElementById(w.detail.inputId),(b=r.current)==null||b.setInput(w.detail.inputValue),(E=o.current)==null||E.addEventListener("input",C=>{var T;const S=C.target;(T=r.current)==null||T.setInput(S==null?void 0:S.value)}),l(y()),n(!0)},p=()=>{l(0),n(!1)};x.useEffect(()=>(f(d,p),()=>{h(d,p)}),[e]);const u=w=>{var b,E;if(o&&o.current){g(o.current,w);const C=(b=r.current)==null?void 0:b.getCaretPosition();C&&((E=o.current)==null||E.setSelectionRange(C,C))}},g=(w,b)=>{var S;const E=(S=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:S.set;E==null||E.call(w,b);const C=new Event("input",{bubbles:!0});w.dispatchEvent(C)},m=()=>{var w;if(!a){const b=(w=i.current)==null?void 0:w.getBoundingClientRect();return b&&b.x&&!a&&s(b),b}return a},y=()=>{var T;const w=document.querySelectorAll("#"+fr),b=m(),E=[...w].map(P=>P.getBoundingClientRect()),C=(T=o.current)==null?void 0:T.getBoundingClientRect();E.push(C),E.sort((P,N)=>P.bottom>N.bottom?-1:1);let S=0;return E.every(P=>{if(b&&b.top<P.bottom)return S=P.bottom-b.top+8,!1}),S};return t?v.jsx("div",{className:"relative",style:{height:c},children:v.jsx("div",{ref:i,className:`mobile:hidden absolute bottom-0 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&a&&"hidden"} ${!e&&!a&&"pointer-events-none opacity-0"}`,children:v.jsx(j1,{keyboardRef:r,onChange:u})})}):v.jsx(v.Fragment,{})}const oi=({id:t,name:e,label:n,description:r,required:o,type:i="text",value:a,placeholder:s,disabled:c,error:l=!1,helperText:f="",onChange:h,beforeIcon:d,afterIcon:p,autoFocus:u,onFocus:g,onBlur:m})=>{const[y,w]=x.useState(f),b=x.useRef(null),[E,C]=x.useState(!1),{open:S,close:T}=V1();x.useEffect(()=>()=>{T()},[]);const P=()=>{b.current&&w(b.current.validationMessage),C(!1),T(),m==null||m()},N=async K=>{C(!0),(async()=>S(K))().then(()=>{var k;return(k=b.current)==null?void 0:k.scrollIntoView({behavior:"smooth",block:"center"})}),g==null||g()},L=K=>{h==null||h(K)},U=x.useId(),j=t??U;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:r,disabled:c,htmlFor:j,required:o,children:n}),v.jsx("div",{className:Dn("flex-start box flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs",c?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",E&&!l&&"border-core-primary-500 ring-1 ring-core-primary-500",l&&"border-core-red-500",l&&E&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex flex-row gap-2 self-stretch p-2",children:[d&&v.jsx(In,{icon:d}),v.jsx("input",{type:i,id:j,name:e,className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",value:a,onChange:L,onBlur:P,ref:b,placeholder:s,onFocus:N,disabled:c,autoFocus:u}),p&&v.jsx(In,{icon:p})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${f||y?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:l,helperText:f||y})})})]})};oi.displayName="Input";const U1=({id:t,name:e,label:n,required:r,description:o,placeholder:i,value:a,disabled:s,error:c=!1,helperText:l,onChange:f,type:h="date"})=>{const[d,p]=x.useState(!1),u=x.useId(),g=t??u;return v.jsxs("div",{className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:o,disabled:s,htmlFor:g,required:r,children:n}),v.jsx("div",{className:Dn("flex-start box relative flex h-10 flex-col justify-center self-stretch rounded border border-core-gray-200 shadow-xs ring-core-primary-500 ",s?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":" bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none ",d&&!c&&"border-core-primary-500 ring-1 ring-core-primary-500 selection:bg-core-primary-500",c&&"border-core-red-500",c&&d&&"border-core-red-500 ring-1 ring-core-red-500"),children:v.jsxs("div",{className:"flex w-full flex-row gap-2 self-stretch p-2",children:[v.jsx("input",{type:h,id:g,name:e,value:a,max:"2200-01-01",className:"flex flex-grow border-none bg-transparent p-0 text-sm text-core-gray-800 placeholder:text-core-gray-500 focus:ring-0 disabled:text-core-gray-300 placeholder:disabled:text-core-gray-300",placeholder:i,onChange:f,onFocus:()=>p(!0),onBlur:()=>p(!1),disabled:s}),v.jsx(In,{icon:"calendar"})]})}),v.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-out ${l?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-100"}`,children:v.jsx("div",{className:"overflow-hidden",children:v.jsx(Gn.Helper,{error:c,helperText:l})})})]})};U1.displayName="Input";function Tn({children:t}){return v.jsx("div",{className:"h-screen w-screen md:p-6",children:v.jsx("div",{className:"flex h-full max-h-full items-center justify-center md:container [&>*]:grow",children:t})})}function Po({title:t,isOpen:e,onClose:n,primaryAction:r,secondaryAction:o,children:i}){const[a,s]=x.useState(e),c=x.useRef(null);x.useEffect(()=>{s(e)},[e]),x.useEffect(()=>{const h=c.current;h&&(a?h.show():h.close())},[a]);const l=()=>{n&&n(),s(!1)},f=h=>{h.key==="Escape"&&l()};return v.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${a?"flex":"hidden"}`,children:v.jsx("dialog",{ref:c,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:v.jsxs("div",{className:"rounded-lg bg-white md:min-w-[420px]",children:[v.jsx(Lt,{children:v.jsx("div",{className:"flex h-16 items-center",children:v.jsx("p",{children:t})})}),v.jsx(Mt,{children:i}),v.jsx(on,{children:v.jsxs("div",{className:"flex flex-col gap-2",children:[r&&v.jsx(nt,{label:r.label??"",onClick:r.action,disabled:r.disabled,pending:r.loading}),o&&v.jsx(nt,{label:o.label??"",onClick:o.action,disabled:o.disabled,pending:o.loading,variant:"secondary"})]})})]})})})}function p6({option:{label:t},checked:e,onChange:n}){return v.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 text-sm hover:bg-core-gray-50",children:[v.jsx(Oc,{defaultChecked:e,onChange:n}),v.jsx("p",{children:t})]})}function g6(t){var d;const{t:e}=Ve(),n=x.useRef(null),[r,o]=x.useState(!1);L1(n,o);const[i,a]=x.useState(""),[s,c]=x.useState(((d=t.value)==null?void 0:d.split(";"))??[]),{name:l,onChange:f}=t,h=(p,u)=>{let g=[];p?g=[...s,u]:g=s.filter(m=>m!==u),c(g),f&&f(l??"",g.join(";"))};return v.jsxs("div",{ref:n,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsxs("div",{className:"relative",children:[v.jsxs("div",{className:`flex h-10 items-center justify-between rounded border p-2 ${t.disabled?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!t.disabled&&o(!r),children:[v.jsx("div",{className:`flex gap-1 overflow-hidden text-sm ${t.disabled?"text-core-gray-300":"text-core-gray-800"}`,children:s.map(p=>{var g;const u=(g=t.options.find(m=>m.value===p))==null?void 0:g.label;return v.jsxs("div",{className:"pointer-events-none flex items-center overflow-hidden rounded bg-core-gray-100 px-1.5 py-0.5",children:[v.jsx("p",{className:"truncate",children:u}),v.jsx("span",{className:"pointer-events-auto cursor-pointer",onClick:()=>h(!1,p),children:v.jsx(In,{icon:"close"})})]},p)})}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:r?"▴":"▾"})]}),v.jsxs("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!r&&"hidden"} py-2`,children:[t.options.length>6&&v.jsx("div",{className:"px-4",children:v.jsx(oi,{placeholder:`${e("search")}...`,onChange:p=>a(p.target.value)})}),t.options.map(p=>{if(!(i&&!p.label.toLowerCase().includes(i.toLowerCase())))return v.jsx(p6,{option:p,checked:s.includes(p.value),onChange:u=>h(u,p.value)},`${p.value}_${s.includes(p.value)?"checked":"unchecked"}`)})]})]})]})}function m6({value:t,max:e,label:n}){return v.jsxs("div",{children:[v.jsx("div",{className:"font-sm mb-1 text-right text-core-gray-500",children:n}),v.jsx("div",{className:"h-1 w-full rounded-full bg-core-gray-200",children:v.jsx("div",{className:"h-1 rounded-full bg-core-primary-500",style:{width:`${Math.min(t/e*100,100)}%`}})})]})}function y6({value:t,placeholder:e,open:n,setOpen:r,disabled:o}){return v.jsxs("div",{className:`flex items-center justify-between rounded border p-2 ${o?"pointer-events-none bg-core-gray-50 shadow-none outline-core-gray-200":"bg-core-white-900 hover:border hover:border-core-gray-300 hover:shadow-none"}`,onClick:()=>!o&&r(!n),children:[v.jsx("span",{className:`text-sm ${o?"text-core-gray-300":"text-core-gray-800"}`,children:t||e}),v.jsx("span",{className:"ml-2 text-core-gray-500",children:n?"▴":"▾"})]})}function v6({label:t,children:e}){return v.jsxs("div",{className:"[&:not(:last-child)]:mb-2",children:[v.jsx("p",{className:"mb-2 px-4 text-xs text-core-gray-500",children:t}),e]})}function sd(t){return v.jsx("div",{className:"px-4 py-2 text-sm hover:bg-core-gray-50",children:t.label})}function w6(t){const e=x.useRef(null),[n,r]=x.useState(!1),[o,i]=x.useState(t.value??"");L1(e,r);const a=(c,l)=>{i(c),r(!1),t.onChange&&t.onChange(l)},s=x.Children.map(t.children,c=>{if(x.isValidElement(c)){if(c.type===sd)return v.jsx("div",{onClick:()=>a(c.props.label,c.props.value),children:c});if(c.type===v6){const l=x.Children.map(c.props.children,f=>{if(x.isValidElement(f)&&f.type===sd)return v.jsx("div",{onClick:()=>a(f.props.label,f.props.value),children:f})});return x.cloneElement(c,{},...l)}}});return v.jsxs("div",{ref:e,className:"flex flex-col gap-2 antialiased",children:[v.jsx(Gn,{description:t.description,disabled:t.disabled,htmlFor:t.id,required:t.required,children:t.label}),v.jsx("div",{children:v.jsxs("div",{className:"relative",children:[v.jsx(y6,{value:o,placeholder:t.placeholder,open:n,setOpen:r,disabled:t.disabled}),t.children&&v.jsx("div",{className:`absolute left-0 right-0 top-11 z-50 rounded border bg-core-white-900 shadow-xl ${!n&&"hidden"} py-2`,children:s})]})}),v.jsx(Gn.Helper,{helperText:t.helperText})]})}var b6=Object.defineProperty,E6=(t,e)=>{for(var n in e)b6(t,n,{get:e[n],enumerable:!0})},Dr={};E6(Dr,{assign:()=>A6,colors:()=>No,createStringInterpolator:()=>md,skipAnimation:()=>z1,to:()=>K1,willAdvance:()=>yd});var cd=Wa(),Qe=t=>Ha(t,cd),ud=Wa();Qe.write=t=>Ha(t,ud);var Pc=Wa();Qe.onStart=t=>Ha(t,Pc);var ld=Wa();Qe.onFrame=t=>Ha(t,ld);var dd=Wa();Qe.onFinish=t=>Ha(t,dd);var Gi=[];Qe.setTimeout=(t,e)=>{const n=Qe.now()+e,r=()=>{const i=Gi.findIndex(a=>a.cancel==r);~i&&Gi.splice(i,1),Bo-=~i?1:0},o={time:n,handler:t,cancel:r};return Gi.splice(G1(n),0,o),Bo+=1,q1(),o};var G1=t=>~(~Gi.findIndex(e=>e.time>t)||~Gi.length);Qe.cancel=t=>{Pc.delete(t),ld.delete(t),dd.delete(t),cd.delete(t),ud.delete(t)},Qe.sync=t=>{hd=!0,Qe.batchedUpdates(t),hd=!1},Qe.throttle=t=>{let e;function n(){try{t(...e)}finally{e=null}}function r(...o){e=o,Qe.onStart(n)}return r.handler=t,r.cancel=()=>{Pc.delete(n),e=null},r};var fd=typeof window<"u"?window.requestAnimationFrame:()=>{};Qe.use=t=>fd=t,Qe.now=typeof performance<"u"?()=>performance.now():Date.now,Qe.batchedUpdates=t=>t(),Qe.catch=console.error,Qe.frameLoop="always",Qe.advance=()=>{Qe.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):W1()};var ko=-1,Bo=0,hd=!1;function Ha(t,e){hd?(e.delete(t),t(0)):(e.add(t),q1())}function q1(){ko<0&&(ko=0,Qe.frameLoop!=="demand"&&fd(H1))}function C6(){ko=-1}function H1(){~ko&&(fd(H1),Qe.batchedUpdates(W1))}function W1(){const t=ko;ko=Qe.now();const e=G1(ko);if(e&&(Y1(Gi.splice(0,e),n=>n.handler()),Bo-=e),!Bo){C6();return}Pc.flush(),cd.flush(t?Math.min(64,ko-t):16.667),ld.flush(),ud.flush(),dd.flush()}function Wa(){let t=new Set,e=t;return{add(n){Bo+=e==t&&!t.has(n)?1:0,t.add(n)},delete(n){return Bo-=e==t&&t.has(n)?1:0,t.delete(n)},flush(n){e.size&&(t=new Set,Bo-=e.size,Y1(e,r=>r(n)&&t.add(r)),Bo+=t.size,e=t)}}}function Y1(t,e){t.forEach(n=>{try{e(n)}catch(r){Qe.catch(r)}})}function pd(){}var _6=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),Se={arr:Array.isArray,obj:t=>!!t&&t.constructor.name==="Object",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",und:t=>t===void 0};function oo(t,e){if(Se.arr(t)){if(!Se.arr(e)||t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t===e}var dt=(t,e)=>t.forEach(e);function Wr(t,e,n){if(Se.arr(t)){for(let r=0;r<t.length;r++)e.call(n,t[r],`${r}`);return}for(const r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r)}var hr=t=>Se.und(t)?[]:Se.arr(t)?t:[t];function Ya(t,e){if(t.size){const n=Array.from(t);t.clear(),dt(n,e)}}var Ka=(t,...e)=>Ya(t,n=>n(...e)),gd=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),md,K1,No=null,z1=!1,yd=pd,A6=t=>{t.to&&(K1=t.to),t.now&&(Qe.now=t.now),t.colors!==void 0&&(No=t.colors),t.skipAnimation!=null&&(z1=t.skipAnimation),t.createStringInterpolator&&(md=t.createStringInterpolator),t.requestAnimationFrame&&Qe.use(t.requestAnimationFrame),t.batchedUpdates&&(Qe.batchedUpdates=t.batchedUpdates),t.willAdvance&&(yd=t.willAdvance),t.frameLoop&&(Qe.frameLoop=t.frameLoop)},za=new Set,Sr=[],vd=[],kc=0,Bc={get idle(){return!za.size&&!Sr.length},start(t){kc>t.priority?(za.add(t),Qe.onStart(S6)):($1(t),Qe(wd))},advance:wd,sort(t){if(kc)Qe.onFrame(()=>Bc.sort(t));else{const e=Sr.indexOf(t);~e&&(Sr.splice(e,1),X1(t))}},clear(){Sr=[],za.clear()}};function S6(){za.forEach($1),za.clear(),Qe(wd)}function $1(t){Sr.includes(t)||X1(t)}function X1(t){Sr.splice(I6(Sr,e=>e.priority>t.priority),0,t)}function wd(t){const e=vd;for(let n=0;n<Sr.length;n++){const r=Sr[n];kc=r.priority,r.idle||(yd(r),r.advance(t),r.idle||e.push(r))}return kc=0,vd=Sr,vd.length=0,Sr=e,Sr.length>0}function I6(t,e){const n=t.findIndex(e);return n<0?t.length:n}var T6=(t,e,n)=>Math.min(Math.max(n,t),e),x6={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Mr="[-+]?\\d*\\.?\\d+",Nc=Mr+"%";function Rc(...t){return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var O6=new RegExp("rgb"+Rc(Mr,Mr,Mr)),P6=new RegExp("rgba"+Rc(Mr,Mr,Mr,Mr)),k6=new RegExp("hsl"+Rc(Mr,Nc,Nc)),B6=new RegExp("hsla"+Rc(Mr,Nc,Nc,Mr)),N6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,R6=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,D6=/^#([0-9a-fA-F]{6})$/,M6=/^#([0-9a-fA-F]{8})$/;function L6(t){let e;return typeof t=="number"?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=D6.exec(t))?parseInt(e[1]+"ff",16)>>>0:No&&No[t]!==void 0?No[t]:(e=O6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|255)>>>0:(e=P6.exec(t))?(qi(e[1])<<24|qi(e[2])<<16|qi(e[3])<<8|Z1(e[4]))>>>0:(e=N6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=M6.exec(t))?parseInt(e[1],16)>>>0:(e=R6.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=k6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|255)>>>0:(e=B6.exec(t))?(Q1(J1(e[1]),Dc(e[2]),Dc(e[3]))|Z1(e[4]))>>>0:null}function bd(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Q1(t,e,n){const r=n<.5?n*(1+e):n+e-n*e,o=2*n-r,i=bd(o,r,t+1/3),a=bd(o,r,t),s=bd(o,r,t-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function qi(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function J1(t){return(parseFloat(t)%360+360)%360/360}function Z1(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(e*255)}function Dc(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function e0(t){let e=L6(t);if(e===null)return t;e=e||0;const n=(e&4278190080)>>>24,r=(e&16711680)>>>16,o=(e&65280)>>>8,i=(e&255)/255;return`rgba(${n}, ${r}, ${o}, ${i})`}var $a=(t,e,n)=>{if(Se.fun(t))return t;if(Se.arr(t))return $a({range:t,output:e,extrapolate:n});if(Se.str(t.output[0]))return md(t);const r=t,o=r.output,i=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const f=j6(l,i);return F6(l,i[f],i[f+1],o[f],o[f+1],c,a,s,r.map)}};function F6(t,e,n,r,o,i,a,s,c){let l=c?c(t):t;if(l<e){if(a==="identity")return l;a==="clamp"&&(l=e)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===o?r:e===n?t<=e?r:o:(e===-1/0?l=-l:n===1/0?l=l-e:l=(l-e)/(n-e),l=i(l),r===-1/0?l=-l:o===1/0?l=l+r:l=l*(o-r)+r,l)}function j6(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}var V6=(t,e="end")=>n=>{n=e==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*t,o=e==="end"?Math.floor(r):Math.ceil(r);return T6(0,1,o/t)},Mc=1.70158,Lc=Mc*1.525,t0=Mc+1,n0=2*Math.PI/3,r0=2*Math.PI/4.5,Fc=t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,U6={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>1-(1-t)*(1-t),easeInOutQuad:t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2,easeInCubic:t=>t*t*t,easeOutCubic:t=>1-Math.pow(1-t,3),easeInOutCubic:t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1-Math.pow(1-t,4),easeInOutQuart:t=>t<.5?8*t*t*t*t:1-Math.pow(-2*t+2,4)/2,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1-Math.pow(1-t,5),easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1-Math.pow(-2*t+2,5)/2,easeInSine:t=>1-Math.cos(t*Math.PI/2),easeOutSine:t=>Math.sin(t*Math.PI/2),easeInOutSine:t=>-(Math.cos(Math.PI*t)-1)/2,easeInExpo:t=>t===0?0:Math.pow(2,10*t-10),easeOutExpo:t=>t===1?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>t===0?0:t===1?1:t<.5?Math.pow(2,20*t-10)/2:(2-Math.pow(2,-20*t+10))/2,easeInCirc:t=>1-Math.sqrt(1-Math.pow(t,2)),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>t<.5?(1-Math.sqrt(1-Math.pow(2*t,2)))/2:(Math.sqrt(1-Math.pow(-2*t+2,2))+1)/2,easeInBack:t=>t0*t*t*t-Mc*t*t,easeOutBack:t=>1+t0*Math.pow(t-1,3)+Mc*Math.pow(t-1,2),easeInOutBack:t=>t<.5?Math.pow(2*t,2)*((Lc+1)*2*t-Lc)/2:(Math.pow(2*t-2,2)*((Lc+1)*(t*2-2)+Lc)+2)/2,easeInElastic:t=>t===0?0:t===1?1:-Math.pow(2,10*t-10)*Math.sin((t*10-10.75)*n0),easeOutElastic:t=>t===0?0:t===1?1:Math.pow(2,-10*t)*Math.sin((t*10-.75)*n0)+1,easeInOutElastic:t=>t===0?0:t===1?1:t<.5?-(Math.pow(2,20*t-10)*Math.sin((20*t-11.125)*r0))/2:Math.pow(2,-20*t+10)*Math.sin((20*t-11.125)*r0)/2+1,easeInBounce:t=>1-Fc(1-t),easeOutBounce:Fc,easeInOutBounce:t=>t<.5?(1-Fc(1-2*t))/2:(1+Fc(2*t-1))/2,steps:V6},Xa=Symbol.for("FluidValue.get"),Hi=Symbol.for("FluidValue.observers"),Ir=t=>!!(t&&t[Xa]),Jn=t=>t&&t[Xa]?t[Xa]():t,o0=t=>t[Hi]||null;function G6(t,e){t.eventObserved?t.eventObserved(e):t(e)}function Qa(t,e){const n=t[Hi];n&&n.forEach(r=>{G6(r,e)})}var i0=class{constructor(t){if(!t&&!(t=this.get))throw Error("Unknown getter");q6(this,t)}},q6=(t,e)=>a0(t,Xa,e);function Wi(t,e){if(t[Xa]){let n=t[Hi];n||a0(t,Hi,n=new Set),n.has(e)||(n.add(e),t.observerAdded&&t.observerAdded(n.size,e))}return e}function Ja(t,e){const n=t[Hi];if(n&&n.has(e)){const r=n.size-1;r?n.delete(e):t[Hi]=null,t.observerRemoved&&t.observerRemoved(r,e)}}var a0=(t,e,n)=>Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0}),jc=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,H6=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,s0=new RegExp(`(${jc.source})(%|[a-z]+)`,"i"),W6=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Vc=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,c0=t=>{const[e,n]=Y6(t);if(!e||gd())return t;const r=window.getComputedStyle(document.documentElement).getPropertyValue(e);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||t}else{if(n&&Vc.test(n))return c0(n);if(n)return n}return t},Y6=t=>{const e=Vc.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]},Ed,K6=(t,e,n,r,o)=>`rgba(${Math.round(e)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,u0=t=>{Ed||(Ed=No?new RegExp(`(${Object.keys(No).join("|")})(?!\\w)`,"g"):/^\b$/);const e=t.output.map(i=>Jn(i).replace(Vc,c0).replace(H6,e0).replace(Ed,e0)),n=e.map(i=>i.match(jc).map(Number)),o=n[0].map((i,a)=>n.map(s=>{if(!(a in s))throw Error('The arity of each "output" value must be equal');return s[a]})).map(i=>$a({...t,output:i}));return i=>{var c;const a=!s0.test(e[0])&&((c=e.find(l=>s0.test(l)))==null?void 0:c.replace(jc,""));let s=0;return e[0].replace(jc,()=>`${o[s++](i)}${a||""}`).replace(W6,K6)}},Cd="react-spring: ",l0=t=>{const e=t;let n=!1;if(typeof e!="function")throw new TypeError(`${Cd}once requires a function parameter`);return(...r)=>{n||(e(...r),n=!0)}},z6=l0(console.warn);function $6(){z6(`${Cd}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var X6=l0(console.warn);function Q6(){X6(`${Cd}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Uc(t){return Se.str(t)&&(t[0]=="#"||/\d/.test(t)||!gd()&&Vc.test(t)||t in(No||{}))}var _d=gd()?x.useEffect:x.useLayoutEffect,J6=()=>{const t=x.useRef(!1);return _d(()=>(t.current=!0,()=>{t.current=!1}),[]),t};function d0(){const t=x.useState()[1],e=J6();return()=>{e.current&&t(Math.random())}}function Z6(t,e){const[n]=x.useState(()=>({inputs:e,result:t()})),r=x.useRef(),o=r.current;let i=o;return i?e&&i.inputs&&e8(e,i.inputs)||(i={inputs:e,result:t()}):i=n,x.useEffect(()=>{r.current=i,o==n&&(n.inputs=n.result=void 0)},[i]),i.result}function e8(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}var f0=t=>x.useEffect(t,t8),t8=[];function h0(t){const e=x.useRef();return x.useEffect(()=>{e.current=t}),e.current}var Za=Symbol.for("Animated:node"),n8=t=>!!t&&t[Za]===t,Yr=t=>t&&t[Za],Ad=(t,e)=>_6(t,Za,e),Gc=t=>t&&t[Za]&&t[Za].getPayload(),p0=class{constructor(){Ad(this,this)}getPayload(){return this.payload||[]}},es=class extends p0{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,Se.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new es(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,e){return Se.num(t)&&(this.lastPosition=t,e&&(t=Math.round(t/e)*e,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,Se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},ts=class extends es{constructor(t){super(0),this._string=null,this._toString=$a({output:[t,t]})}static create(t){return new ts(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(Se.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=$a({output:[this.getValue(),t]})),this._value=0,super.reset()}},qc={dependencies:null},Hc=class extends p0{constructor(t){super(),this.source=t,this.setValue(t)}getValue(t){const e={};return Wr(this.source,(n,r)=>{n8(n)?e[r]=n.getValue(t):Ir(n)?e[r]=Jn(n):t||(e[r]=n)}),e}setValue(t){this.source=t,this.payload=this._makePayload(t)}reset(){this.payload&&dt(this.payload,t=>t.reset())}_makePayload(t){if(t){const e=new Set;return Wr(t,this._addToPayload,e),Array.from(e)}}_addToPayload(t){qc.dependencies&&Ir(t)&&qc.dependencies.add(t);const e=Gc(t);e&&dt(e,n=>this.add(n))}},g0=class extends Hc{constructor(t){super(t)}static create(t){return new g0(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const e=this.getPayload();return t.length==e.length?e.map((n,r)=>n.setValue(t[r])).some(Boolean):(super.setValue(t.map(r8)),!0)}};function r8(t){return(Uc(t)?ts:es).create(t)}function Sd(t){const e=Yr(t);return e?e.constructor:Se.arr(t)?g0:Uc(t)?ts:es}var m0=(t,e)=>{const n=!Se.fun(t)||t.prototype&&t.prototype.isReactComponent;return x.forwardRef((r,o)=>{const i=x.useRef(null),a=n&&x.useCallback(u=>{i.current=a8(o,u)},[o]),[s,c]=i8(r,e),l=d0(),f=()=>{const u=i.current;if(n&&!u)return;(u?e.applyAnimatedValues(u,s.getValue(!0)):!1)===!1&&l()},h=new o8(f,c),d=x.useRef();_d(()=>(d.current=h,dt(c,u=>Wi(u,h)),()=>{d.current&&(dt(d.current.deps,u=>Ja(u,d.current)),Qe.cancel(d.current.update))})),x.useEffect(f,[]),f0(()=>()=>{const u=d.current;dt(u.deps,g=>Ja(g,u))});const p=e.getComponentProps(s.getValue());return ce.createElement(t,{...p,ref:a})})},o8=class{constructor(t,e){this.update=t,this.deps=e}eventObserved(t){t.type=="change"&&Qe.write(this.update)}};function i8(t,e){const n=new Set;return qc.dependencies=n,t.style&&(t={...t,style:e.createAnimatedStyle(t.style)}),t=new Hc(t),qc.dependencies=null,[t,n]}function a8(t,e){return t&&(Se.fun(t)?t(e):t.current=e),e}var y0=Symbol.for("AnimatedComponent"),s8=(t,{applyAnimatedValues:e=()=>!1,createAnimatedStyle:n=o=>new Hc(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:e,createAnimatedStyle:n,getComponentProps:r},i=a=>{const s=v0(a)||"Anonymous";return Se.str(a)?a=i[a]||(i[a]=m0(a,o)):a=a[y0]||(a[y0]=m0(a,o)),a.displayName=`Animated(${s})`,a};return Wr(t,(a,s)=>{Se.arr(t)&&(s=v0(a)),i[s]=i(a)}),{animated:i}},v0=t=>Se.str(t)?t:t&&Se.str(t.displayName)?t.displayName:Se.fun(t)&&t.name||null;function ii(t,...e){return Se.fun(t)?t(...e):t}var ns=(t,e)=>t===!0||!!(e&&t&&(Se.fun(t)?t(e):hr(t).includes(e))),w0=(t,e)=>Se.obj(t)?e&&t[e]:t,b0=(t,e)=>t.default===!0?t[e]:t.default?t.default[e]:void 0,c8=t=>t,Id=(t,e=c8)=>{let n=u8;t.default&&t.default!==!0&&(t=t.default,n=Object.keys(t));const r={};for(const o of n){const i=e(t[o],o);Se.und(i)||(r[o]=i)}return r},u8=["config","onProps","onStart","onChange","onPause","onResume","onRest"],l8={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function d8(t){const e={};let n=0;if(Wr(t,(r,o)=>{l8[o]||(e[o]=r,n++)}),n)return e}function E0(t){const e=d8(t);if(e){const n={to:e};return Wr(t,(r,o)=>o in e||(n[o]=r)),n}return{...t}}function rs(t){return t=Jn(t),Se.arr(t)?t.map(rs):Uc(t)?Dr.createStringInterpolator({range:[0,1],output:[t,t]})(1):t}function f8(t){for(const e in t)return!0;return!1}function Td(t){return Se.fun(t)||Se.arr(t)&&Se.obj(t[0])}function h8(t,e){var n;(n=t.ref)==null||n.delete(t),e==null||e.delete(t)}function p8(t,e){var n;e&&t.ref!==e&&((n=t.ref)==null||n.delete(t),e.add(t),t.ref=e)}var g8={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},xd={...g8.default,mass:1,damping:1,easing:U6.linear,clamp:!1},m8=class{constructor(){this.velocity=0,Object.assign(this,xd)}};function y8(t,e,n){n&&(n={...n},C0(n,e),e={...n,...e}),C0(t,e),Object.assign(t,e);for(const a in xd)t[a]==null&&(t[a]=xd[a]);let{frequency:r,damping:o}=t;const{mass:i}=t;return Se.und(r)||(r<.01&&(r=.01),o<0&&(o=0),t.tension=Math.pow(2*Math.PI/r,2)*i,t.friction=4*Math.PI*o*i/r),t}function C0(t,e){if(!Se.und(e.decay))t.duration=void 0;else{const n=!Se.und(e.tension)||!Se.und(e.friction);(n||!Se.und(e.frequency)||!Se.und(e.damping)||!Se.und(e.mass))&&(t.duration=void 0,t.decay=void 0),n&&(t.frequency=void 0)}}var _0=[],v8=class{constructor(){this.changed=!1,this.values=_0,this.toValues=null,this.fromValues=_0,this.config=new m8,this.immediate=!1}};function A0(t,{key:e,props:n,defaultProps:r,state:o,actions:i}){return new Promise((a,s)=>{let c,l,f=ns(n.cancel??(r==null?void 0:r.cancel),e);if(f)p();else{Se.und(n.pause)||(o.paused=ns(n.pause,e));let u=r==null?void 0:r.pause;u!==!0&&(u=o.paused||ns(u,e)),c=ii(n.delay||0,e),u?(o.resumeQueue.add(d),i.pause()):(i.resume(),d())}function h(){o.resumeQueue.add(d),o.timeouts.delete(l),l.cancel(),c=l.time-Qe.now()}function d(){c>0&&!Dr.skipAnimation?(o.delayed=!0,l=Qe.setTimeout(p,c),o.pauseQueue.add(h),o.timeouts.add(l)):p()}function p(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(h),o.timeouts.delete(l),t<=(o.cancelId||0)&&(f=!0);try{i.start({...n,callId:t,cancel:f},a)}catch(u){s(u)}}})}var Od=(t,e)=>e.length==1?e[0]:e.some(n=>n.cancelled)?Yi(t.get()):e.every(n=>n.noop)?S0(t.get()):Lr(t.get(),e.every(n=>n.finished)),S0=t=>({value:t,noop:!0,finished:!0,cancelled:!1}),Lr=(t,e,n=!1)=>({value:t,finished:e,cancelled:n}),Yi=t=>({value:t,cancelled:!0,finished:!1});function I0(t,e,n,r){const{callId:o,parentId:i,onRest:a}=e,{asyncTo:s,promise:c}=n;return!i&&t===s&&!e.reset?c:n.promise=(async()=>{n.asyncId=o,n.asyncTo=t;const l=Id(e,(m,y)=>y==="onRest"?void 0:m);let f,h;const d=new Promise((m,y)=>(f=m,h=y)),p=m=>{const y=o<=(n.cancelId||0)&&Yi(r)||o!==n.asyncId&&Lr(r,!1);if(y)throw m.result=y,h(m),m},u=(m,y)=>{const w=new T0,b=new x0;return(async()=>{if(Dr.skipAnimation)throw os(n),b.result=Lr(r,!1),h(b),b;p(w);const E=Se.obj(m)?{...m}:{...y,to:m};E.parentId=o,Wr(l,(S,T)=>{Se.und(E[T])&&(E[T]=S)});const C=await r.start(E);return p(w),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let g;if(Dr.skipAnimation)return os(n),Lr(r,!1);try{let m;Se.arr(t)?m=(async y=>{for(const w of y)await u(w)})(t):m=Promise.resolve(t(u,r.stop.bind(r))),await Promise.all([m.then(f),d]),g=Lr(r.get(),!0,!1)}catch(m){if(m instanceof T0)g=m.result;else if(m instanceof x0)g=m.result;else throw m}finally{o==n.asyncId&&(n.asyncId=i,n.asyncTo=i?s:void 0,n.promise=i?c:void 0)}return Se.fun(a)&&Qe.batchedUpdates(()=>{a(g,r,r.item)}),g})()}function os(t,e){Ya(t.timeouts,n=>n.cancel()),t.pauseQueue.clear(),t.resumeQueue.clear(),t.asyncId=t.asyncTo=t.promise=void 0,e&&(t.cancelId=e)}var T0=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},x0=class extends Error{constructor(){super("SkipAnimationSignal")}},Pd=t=>t instanceof kd,w8=1,kd=class extends i0{constructor(){super(...arguments),this.id=w8++,this._priority=0}get priority(){return this._priority}set priority(t){this._priority!=t&&(this._priority=t,this._onPriorityChange(t))}get(){const t=Yr(this);return t&&t.getValue()}to(...t){return Dr.to(this,t)}interpolate(...t){return $6(),Dr.to(this,t)}toJSON(){return this.get()}observerAdded(t){t==1&&this._attach()}observerRemoved(t){t==0&&this._detach()}_attach(){}_detach(){}_onChange(t,e=!1){Qa(this,{type:"change",parent:this,value:t,idle:e})}_onPriorityChange(t){this.idle||Bc.sort(this),Qa(this,{type:"priority",parent:this,priority:t})}},ai=Symbol.for("SpringPhase"),O0=1,Bd=2,Nd=4,Rd=t=>(t[ai]&O0)>0,Ro=t=>(t[ai]&Bd)>0,is=t=>(t[ai]&Nd)>0,P0=(t,e)=>e?t[ai]|=Bd|O0:t[ai]&=~Bd,k0=(t,e)=>e?t[ai]|=Nd:t[ai]&=~Nd,b8=class extends kd{constructor(t,e){if(super(),this.animation=new v8,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Se.und(t)||!Se.und(e)){const n=Se.obj(t)?{...t}:{...e,from:t};Se.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Ro(this)||this._state.asyncTo)||is(this)}get goal(){return Jn(this.animation.to)}get velocity(){const t=Yr(this);return t instanceof es?t.lastVelocity||0:t.getPayload().map(e=>e.lastVelocity||0)}get hasAnimated(){return Rd(this)}get isAnimating(){return Ro(this)}get isPaused(){return is(this)}get isDelayed(){return this._state.delayed}advance(t){let e=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:i}=r,a=Gc(r.to);!a&&Ir(r.to)&&(o=hr(Jn(r.to))),r.values.forEach((l,f)=>{if(l.done)return;const h=l.constructor==ts?1:a?a[f].lastPosition:o[f];let d=r.immediate,p=h;if(!d){if(p=l.lastPosition,i.tension<=0){l.done=!0;return}let u=l.elapsedTime+=t;const g=r.fromValues[f],m=l.v0!=null?l.v0:l.v0=Se.arr(i.velocity)?i.velocity[f]:i.velocity;let y;const w=i.precision||(g==h?.005:Math.min(1,Math.abs(h-g)*.001));if(Se.und(i.duration))if(i.decay){const b=i.decay===!0?.998:i.decay,E=Math.exp(-(1-b)*u);p=g+m/(1-b)*(1-E),d=Math.abs(l.lastPosition-p)<=w,y=m*E}else{y=l.lastVelocity==null?m:l.lastVelocity;const b=i.restVelocity||w/10,E=i.clamp?0:i.bounce,C=!Se.und(E),S=g==h?l.v0>0:g<h;let T,P=!1;const N=1,L=Math.ceil(t/N);for(let U=0;U<L&&(T=Math.abs(y)>b,!(!T&&(d=Math.abs(h-p)<=w,d)));++U){C&&(P=p==h||p>h==S,P&&(y=-y*E,p=h));const j=-i.tension*1e-6*(p-h),K=-i.friction*.001*y,G=(j+K)/i.mass;y=y+G*N,p=p+y*N}}else{let b=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,l.durationProgress>0&&(l.elapsedTime=i.duration*l.durationProgress,u=l.elapsedTime+=t)),b=(i.progress||0)+u/this._memoizedDuration,b=b>1?1:b<0?0:b,l.durationProgress=b),p=g+i.easing(b)*(h-g),y=(p-l.lastPosition)/t,d=b==1}l.lastVelocity=y,Number.isNaN(p)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?l.done=!0:e=!1,l.setValue(p,i.round)&&(n=!0)});const s=Yr(this),c=s.getValue();if(e){const l=Jn(r.to);(c!==l||n)&&!i.decay?(s.setValue(l),this._onChange(l)):n&&i.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(t){return Qe.batchedUpdates(()=>{this._stop(),this._focus(t),this._set(t)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Ro(this)){const{to:t,config:e}=this.animation;Qe.batchedUpdates(()=>{this._onStart(),e.decay||this._set(t,!1),this._stop()})}return this}update(t){return(this.queue||(this.queue=[])).push(t),this}start(t,e){let n;return Se.und(t)?(n=this.queue||[],this.queue=[]):n=[Se.obj(t)?t:{...e,to:t}],Promise.all(n.map(r=>this._update(r))).then(r=>Od(this,r))}stop(t){const{to:e}=this.animation;return this._focus(this.get()),os(this._state,t&&this._lastCallId),Qe.batchedUpdates(()=>this._stop(e,t)),this}reset(){this._update({reset:!0})}eventObserved(t){t.type=="change"?this._start():t.type=="priority"&&(this.priority=t.priority+1)}_prepareNode(t){const e=this.key||"";let{to:n,from:r}=t;n=Se.obj(n)?n[e]:n,(n==null||Td(n))&&(n=void 0),r=Se.obj(r)?r[e]:r,r==null&&(r=void 0);const o={to:n,from:r};return Rd(this)||(t.reverse&&([n,r]=[r,n]),r=Jn(r),Se.und(r)?Yr(this)||this._set(n):this._set(r)),o}_update({...t},e){const{key:n,defaultProps:r}=this;t.default&&Object.assign(r,Id(t,(a,s)=>/^on/.test(s)?w0(a,n):a)),R0(this,t,"onProps"),cs(this,"onProps",t,this);const o=this._prepareNode(t);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const i=this._state;return A0(++this._lastCallId,{key:n,props:t,defaultProps:r,state:i,actions:{pause:()=>{is(this)||(k0(this,!0),Ka(i.pauseQueue),cs(this,"onPause",Lr(this,as(this,this.animation.to)),this))},resume:()=>{is(this)&&(k0(this,!1),Ro(this)&&this._resume(),Ka(i.resumeQueue),cs(this,"onResume",Lr(this,as(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(a=>{if(t.loop&&a.finished&&!(e&&a.noop)){const s=B0(t);if(s)return this._update(s,!0)}return a})}_merge(t,e,n){if(e.cancel)return this.stop(!0),n(Yi(this));const r=!Se.und(t.to),o=!Se.und(t.from);if(r||o)if(e.callId>this._lastToId)this._lastToId=e.callId;else return n(Yi(this));const{key:i,defaultProps:a,animation:s}=this,{to:c,from:l}=s;let{to:f=c,from:h=l}=t;o&&!r&&(!e.default||Se.und(f))&&(f=h),e.reverse&&([f,h]=[h,f]);const d=!oo(h,l);d&&(s.from=h),h=Jn(h);const p=!oo(f,c);p&&this._focus(f);const u=Td(e.to),{config:g}=s,{decay:m,velocity:y}=g;(r||o)&&(g.velocity=0),e.config&&!u&&y8(g,ii(e.config,i),e.config!==a.config?ii(a.config,i):void 0);let w=Yr(this);if(!w||Se.und(f))return n(Lr(this,!0));const b=Se.und(e.reset)?o&&!e.default:!Se.und(h)&&ns(e.reset,i),E=b?h:this.get(),C=rs(f),S=Se.num(C)||Se.arr(C)||Uc(C),T=!u&&(!S||ns(a.immediate||e.immediate,i));if(p){const U=Sd(f);if(U!==w.constructor)if(T)w=this._set(C);else throw Error(`Cannot animate between ${w.constructor.name} and ${U.name}, as the "to" prop suggests`)}const P=w.constructor;let N=Ir(f),L=!1;if(!N){const U=b||!Rd(this)&&d;(p||U)&&(L=oo(rs(E),C),N=!L),(!oo(s.immediate,T)&&!T||!oo(g.decay,m)||!oo(g.velocity,y))&&(N=!0)}if(L&&Ro(this)&&(s.changed&&!b?N=!0:N||this._stop(c)),!u&&((N||Ir(c))&&(s.values=w.getPayload(),s.toValues=Ir(f)?null:P==ts?[1]:hr(C)),s.immediate!=T&&(s.immediate=T,!T&&!b&&this._set(c)),N)){const{onRest:U}=s;dt(C8,K=>R0(this,e,K));const j=Lr(this,as(this,c));Ka(this._pendingCalls,j),this._pendingCalls.add(n),s.changed&&Qe.batchedUpdates(()=>{var K;s.changed=!b,U==null||U(j,this),b?ii(a.onRest,j):(K=s.onStart)==null||K.call(s,j,this)})}b&&this._set(E),u?n(I0(e.to,e,this._state,this)):N?this._start():Ro(this)&&!p?this._pendingCalls.add(n):n(S0(E))}_focus(t){const e=this.animation;t!==e.to&&(o0(this)&&this._detach(),e.to=t,o0(this)&&this._attach())}_attach(){let t=0;const{to:e}=this.animation;Ir(e)&&(Wi(e,this),Pd(e)&&(t=e.priority+1)),this.priority=t}_detach(){const{to:t}=this.animation;Ir(t)&&Ja(t,this)}_set(t,e=!0){const n=Jn(t);if(!Se.und(n)){const r=Yr(this);if(!r||!oo(n,r.getValue())){const o=Sd(n);!r||r.constructor!=o?Ad(this,o.create(n)):r.setValue(n),r&&Qe.batchedUpdates(()=>{this._onChange(n,e)})}}return Yr(this)}_onStart(){const t=this.animation;t.changed||(t.changed=!0,cs(this,"onStart",Lr(this,as(this,t.to)),this))}_onChange(t,e){e||(this._onStart(),ii(this.animation.onChange,t,this)),ii(this.defaultProps.onChange,t,this),super._onChange(t,e)}_start(){const t=this.animation;Yr(this).reset(Jn(t.to)),t.immediate||(t.fromValues=t.values.map(e=>e.lastPosition)),Ro(this)||(P0(this,!0),is(this)||this._resume())}_resume(){Dr.skipAnimation?this.finish():Bc.start(this)}_stop(t,e){if(Ro(this)){P0(this,!1);const n=this.animation;dt(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qa(this,{type:"idle",parent:this});const r=e?Yi(this.get()):Lr(this.get(),as(this,t??n.to));Ka(this._pendingCalls,r),n.changed&&(n.changed=!1,cs(this,"onRest",r,this))}}};function as(t,e){const n=rs(e),r=rs(t.get());return oo(r,n)}function B0(t,e=t.loop,n=t.to){const r=ii(e);if(r){const o=r!==!0&&E0(r),i=(o||t).reverse,a=!o||o.reset;return ss({...t,loop:e,default:!1,pause:void 0,to:!i||Td(n)?n:void 0,from:a?t.from:void 0,reset:a,...o})}}function ss(t){const{to:e,from:n}=t=E0(t),r=new Set;return Se.obj(e)&&N0(e,r),Se.obj(n)&&N0(n,r),t.keys=r.size?Array.from(r):null,t}function E8(t){const e=ss(t);return Se.und(e.default)&&(e.default=Id(e)),e}function N0(t,e){Wr(t,(n,r)=>n!=null&&e.add(r))}var C8=["onStart","onRest","onChange","onPause","onResume"];function R0(t,e,n){t.animation[n]=e[n]!==b0(e,n)?w0(e[n],t.key):void 0}function cs(t,e,...n){var r,o,i,a;(o=(r=t.animation)[e])==null||o.call(r,...n),(a=(i=t.defaultProps)[e])==null||a.call(i,...n)}var _8=["onStart","onChange","onRest"],A8=1,S8=class{constructor(t,e){this.id=A8++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),e&&(this._flush=e),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((e,n)=>t[n]=e.get()),t}set(t){for(const e in t){const n=t[e];Se.und(n)||this.springs[e].set(n)}}update(t){return t&&this.queue.push(ss(t)),this}start(t){let{queue:e}=this;return t?e=hr(t).map(ss):this.queue=[],this._flush?this._flush(this,e):(V0(this,e),Dd(this,e))}stop(t,e){if(t!==!!t&&(e=t),e){const n=this.springs;dt(hr(e),r=>n[r].stop(!!t))}else os(this._state,this._lastAsyncId),this.each(n=>n.stop(!!t));return this}pause(t){if(Se.und(t))this.start({pause:!0});else{const e=this.springs;dt(hr(t),n=>e[n].pause())}return this}resume(t){if(Se.und(t))this.start({pause:!1});else{const e=this.springs;dt(hr(t),n=>e[n].resume())}return this}each(t){Wr(this.springs,t)}_onFrame(){const{onStart:t,onChange:e,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,Ya(t,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const i=!r&&this._started,a=o||i&&n.size?this.get():null;o&&e.size&&Ya(e,([s,c])=>{c.value=a,s(c,this,this._item)}),i&&(this._started=!1,Ya(n,([s,c])=>{c.value=a,s(c,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;Qe.onFrame(this._onFrame)}};function Dd(t,e){return Promise.all(e.map(n=>D0(t,n))).then(n=>Od(t,n))}async function D0(t,e,n){const{keys:r,to:o,from:i,loop:a,onRest:s,onResolve:c}=e,l=Se.obj(e.default)&&e.default;a&&(e.loop=!1),o===!1&&(e.to=null),i===!1&&(e.from=null);const f=Se.arr(o)||Se.fun(o)?o:void 0;f?(e.to=void 0,e.onRest=void 0,l&&(l.onRest=void 0)):dt(_8,g=>{const m=e[g];if(Se.fun(m)){const y=t._events[g];e[g]=({finished:w,cancelled:b})=>{const E=y.get(m);E?(w||(E.finished=!1),b&&(E.cancelled=!0)):y.set(m,{value:null,finished:w||!1,cancelled:b||!1})},l&&(l[g]=e[g])}});const h=t._state;e.pause===!h.paused?(h.paused=e.pause,Ka(e.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(e.pause=!0);const d=(r||Object.keys(t.springs)).map(g=>t.springs[g].start(e)),p=e.cancel===!0||b0(e,"cancel")===!0;(f||p&&h.asyncId)&&d.push(A0(++t._lastAsyncId,{props:e,state:h,actions:{pause:pd,resume:pd,start(g,m){p?(os(h,t._lastAsyncId),m(Yi(t))):(g.onRest=s,m(I0(f,g,h,t)))}}})),h.paused&&await new Promise(g=>{h.resumeQueue.add(g)});const u=Od(t,await Promise.all(d));if(a&&u.finished&&!(n&&u.noop)){const g=B0(e,a,o);if(g)return V0(t,[g]),D0(t,g,!0)}return c&&Qe.batchedUpdates(()=>c(u,t,t.item)),u}function M0(t,e){const n={...t.springs};return e&&dt(hr(e),r=>{Se.und(r.keys)&&(r=ss(r)),Se.obj(r.to)||(r={...r,to:void 0}),j0(n,r,o=>F0(o))}),L0(t,n),n}function L0(t,e){Wr(e,(n,r)=>{t.springs[r]||(t.springs[r]=n,Wi(n,t))})}function F0(t,e){const n=new b8;return n.key=t,e&&Wi(n,e),n}function j0(t,e,n){e.keys&&dt(e.keys,r=>{(t[r]||(t[r]=n(r)))._prepareNode(e)})}function V0(t,e){dt(e,n=>{j0(t.springs,n,r=>F0(r,t))})}var Wc=({children:t,...e})=>{const n=x.useContext(Yc),r=e.pause||!!n.pause,o=e.immediate||!!n.immediate;e=Z6(()=>({pause:r,immediate:o}),[r,o]);const{Provider:i}=Yc;return ce.createElement(i,{value:e},t)},Yc=I8(Wc,{});Wc.Provider=Yc.Provider,Wc.Consumer=Yc.Consumer;function I8(t,e){return Object.assign(t,ce.createContext(e)),t.Provider._context=t,t.Consumer._context=t,t}var T8=()=>{const t=[],e=function(r){Q6();const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=n(r,i,a);s&&o.push(i.start(s))}}),o};e.current=t,e.add=function(r){t.includes(r)||t.push(r)},e.delete=function(r){const o=t.indexOf(r);~o&&t.splice(o,1)},e.pause=function(){return dt(t,r=>r.pause(...arguments)),this},e.resume=function(){return dt(t,r=>r.resume(...arguments)),this},e.set=function(r){dt(t,(o,i)=>{const a=Se.fun(r)?r(i,o):r;a&&o.set(a)})},e.start=function(r){const o=[];return dt(t,(i,a)=>{if(Se.und(r))o.push(i.start());else{const s=this._getProps(r,i,a);s&&o.push(i.start(s))}}),o},e.stop=function(){return dt(t,r=>r.stop(...arguments)),this},e.update=function(r){return dt(t,(o,i)=>o.update(this._getProps(r,o,i))),this};const n=function(r,o,i){return Se.fun(r)?r(i,o):r};return e._getProps=n,e};function x8(t,e,n){const r=Se.fun(e)&&e;r&&!n&&(n=[]);const o=x.useMemo(()=>r||arguments.length==3?T8():void 0,[]),i=x.useRef(0),a=d0(),s=x.useMemo(()=>({ctrls:[],queue:[],flush(y,w){const b=M0(y,w);return i.current>0&&!s.queue.length&&!Object.keys(b).some(C=>!y.springs[C])?Dd(y,w):new Promise(C=>{L0(y,b),s.queue.push(()=>{C(Dd(y,w))}),a()})}}),[]),c=x.useRef([...s.ctrls]),l=[],f=h0(t)||0;x.useMemo(()=>{dt(c.current.slice(t,f),y=>{h8(y,o),y.stop(!0)}),c.current.length=t,h(f,t)},[t]),x.useMemo(()=>{h(0,Math.min(f,t))},n);function h(y,w){for(let b=y;b<w;b++){const E=c.current[b]||(c.current[b]=new S8(null,s.flush)),C=r?r(b,E):e[b];C&&(l[b]=E8(C))}}const d=c.current.map((y,w)=>M0(y,l[w])),p=x.useContext(Wc),u=h0(p),g=p!==u&&f8(p);_d(()=>{i.current++,s.ctrls=c.current;const{queue:y}=s;y.length&&(s.queue=[],dt(y,w=>w())),dt(c.current,(w,b)=>{o==null||o.add(w),g&&w.start({default:p});const E=l[b];E&&(p8(w,E.ref),w.ref?w.queue.push(E):w.start(E))})}),f0(()=>()=>{dt(s.ctrls,y=>y.stop(!0))});const m=d.map(y=>({...y}));return o?[m,o]:m}function O8(t,e){const n=Se.fun(t),[[r],o]=x8(1,n?t:[t],n?[]:e);return n||arguments.length==2?[r,o]:r}var P8=class extends kd{constructor(t,e){super(),this.source=t,this.idle=!0,this._active=new Set,this.calc=$a(...e);const n=this._get(),r=Sd(n);Ad(this,r.create(n))}advance(t){const e=this._get(),n=this.get();oo(e,n)||(Yr(this).setValue(e),this._onChange(e,this.idle)),!this.idle&&U0(this._active)&&Md(this)}_get(){const t=Se.arr(this.source)?this.source.map(Jn):hr(Jn(this.source));return this.calc(...t)}_start(){this.idle&&!U0(this._active)&&(this.idle=!1,dt(Gc(this),t=>{t.done=!1}),Dr.skipAnimation?(Qe.batchedUpdates(()=>this.advance()),Md(this)):Bc.start(this))}_attach(){let t=1;dt(hr(this.source),e=>{Ir(e)&&Wi(e,this),Pd(e)&&(e.idle||this._active.add(e),t=Math.max(t,e.priority+1))}),this.priority=t,this._start()}_detach(){dt(hr(this.source),t=>{Ir(t)&&Ja(t,this)}),this._active.clear(),Md(this)}eventObserved(t){t.type=="change"?t.idle?this.advance():(this._active.add(t.parent),this._start()):t.type=="idle"?this._active.delete(t.parent):t.type=="priority"&&(this.priority=hr(this.source).reduce((e,n)=>Math.max(e,(Pd(n)?n.priority:0)+1),0))}};function k8(t){return t.idle!==!1}function U0(t){return!t.size||Array.from(t).every(k8)}function Md(t){t.idle||(t.idle=!0,dt(Gc(t),e=>{e.done=!0}),Qa(t,{type:"idle",parent:t}))}Dr.assign({createStringInterpolator:u0,to:(t,e)=>new P8(t,e)});var G0=/^--/;function B8(t,e){return e==null||typeof e=="boolean"||e===""?"":typeof e=="number"&&e!==0&&!G0.test(t)&&!(us.hasOwnProperty(t)&&us[t])?e+"px":(""+e).trim()}var q0={};function N8(t,e){if(!t.nodeType||!t.setAttribute)return!1;const n=t.nodeName==="filter"||t.parentNode&&t.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:i,scrollLeft:a,viewBox:s,...c}=e,l=Object.values(c),f=Object.keys(c).map(h=>n||t.hasAttribute(h)?h:q0[h]||(q0[h]=h.replace(/([A-Z])/g,d=>"-"+d.toLowerCase())));o!==void 0&&(t.textContent=o);for(const h in r)if(r.hasOwnProperty(h)){const d=B8(h,r[h]);G0.test(h)?t.style.setProperty(h,d):t.style[h]=d}f.forEach((h,d)=>{t.setAttribute(h,l[d])}),i!==void 0&&(t.scrollTop=i),a!==void 0&&(t.scrollLeft=a),s!==void 0&&t.setAttribute("viewBox",s)}var us={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},R8=(t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1),D8=["Webkit","Ms","Moz","O"];us=Object.keys(us).reduce((t,e)=>(D8.forEach(n=>t[R8(n,e)]=t[e]),t),us);var M8=/^(matrix|translate|scale|rotate|skew)/,L8=/^(translate)/,F8=/^(rotate|skew)/,Ld=(t,e)=>Se.num(t)&&t!==0?t+e:t,Kc=(t,e)=>Se.arr(t)?t.every(n=>Kc(n,e)):Se.num(t)?t===e:parseFloat(t)===e,j8=class extends Hc{constructor({x:t,y:e,z:n,...r}){const o=[],i=[];(t||e||n)&&(o.push([t||0,e||0,n||0]),i.push(a=>[`translate3d(${a.map(s=>Ld(s,"px")).join(",")})`,Kc(a,0)])),Wr(r,(a,s)=>{if(s==="transform")o.push([a||""]),i.push(c=>[c,c===""]);else if(M8.test(s)){if(delete r[s],Se.und(a))return;const c=L8.test(s)?"px":F8.test(s)?"deg":"";o.push(hr(a)),i.push(s==="rotate3d"?([l,f,h,d])=>[`rotate3d(${l},${f},${h},${Ld(d,c)})`,Kc(d,0)]:l=>[`${s}(${l.map(f=>Ld(f,c)).join(",")})`,Kc(l,s.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new V8(o,i)),super(r)}},V8=class extends i0{constructor(t,e){super(),this.inputs=t,this.transforms=e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let t="",e=!0;return dt(this.inputs,(n,r)=>{const o=Jn(n[0]),[i,a]=this.transforms[r](Se.arr(o)?o:n.map(Jn));t+=" "+i,e=e&&a}),e?"none":t}observerAdded(t){t==1&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Wi(n,this)))}observerRemoved(t){t==0&&dt(this.inputs,e=>dt(e,n=>Ir(n)&&Ja(n,this)))}eventObserved(t){t.type=="change"&&(this._value=null),Qa(this,t)}},U8=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Dr.assign({batchedUpdates:Pi.unstable_batchedUpdates,createStringInterpolator:u0,colors:x6});var G8=s8(U8,{applyAnimatedValues:N8,createAnimatedStyle:t=>new j8(t),getComponentProps:({scrollTop:t,scrollLeft:e,...n})=>n}),q8=G8.animated;function zc(t){const{rows:e}=t,n=O8({from:{opacity:0},to:{opacity:1}});return v.jsxs(q8.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(e)].map((r,o)=>v.jsx("div",{className:"h-10 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),v.jsx("span",{className:"sr-only",children:"Loading..."})]})}function H0({children:t,offset:e,max:n=4,initialCollapsed:r=!0}){const o=x.useRef(null),[i,a]=x.useState(0),[s,c]=x.useState(r),l=s&&x.Children.count(t)>n?n:x.Children.count(t);x.useEffect(()=>{o.current&&(i?s?o.current.style.marginBottom=`-${i-(i/l+(l-1)*(e??i/l/7.5))}px`:o.current.style.marginBottom="unset":a(o.current.offsetHeight))},[s,i]);const f=d=>(100-(l-1-d))/100,h=d=>d*(i/l-(e??i/l/7.5));return v.jsx("div",{ref:o,className:"hover:cursor-pointer",onClick:()=>l>1&&c(!s),children:x.Children.map(x.Children.toArray(t).slice(-1*l),(d,p)=>v.jsx("div",{className:`${!s&&"[&:not(:last-child)]:mb-1"} h-full w-full transition-all duration-300 ease-in-out`,style:{transform:s&&l>1?`scaleX(${f(p)}) translateY(-${h(p)}px)`:void 0},children:d}))})}const H8=Ui("flex flex-shrink bg-white rounded-full transform transition-transform ease-out",{variants:{size:{md:"w-3 h-3",lg:"w-7 h-7"}}}),W8=Ui("",{variants:{size:{md:"pr-4",lg:"pr-6"}}}),Y8=({id:t,disabled:e,onChange:n,defaultChecked:r=!1,size:o="md"})=>{const i=e,[a,s]=x.useState(r),[c,l]=x.useState(!1),f=()=>{i||(s(!a),n&&n())},h=()=>{e||l(!0)},d=()=>{l(!1)},p=Dn("relative py-0.5 pl-0.5 rounded-full",{"ring-2 ring-core-white-900 outline-core-primary-500 outline outline-2 outline-offset-2":c,"bg-core-primary-500 hover:bg-core-primary-600":a&&!e,"bg-core-gray-200 hover:bg-core-gray-300":!a&&!e,"bg-core-gray-100":e},W8({size:o})),u=o==="lg"?"translate-x-[1.375rem] ease-out":"translate-x-3.5 ease-out";return v.jsxs("div",{className:`inline-flex items-center py-1 ${i?"pointer-events-none":"cursor-pointer "}`,onClick:f,onFocus:h,children:[v.jsx("input",{className:"sr-only ",id:t,type:"checkbox",checked:a,disabled:i,onBlur:d,onChange:f,onFocus:h}),v.jsx("div",{className:p,children:v.jsx("div",{className:Dn(H8({size:o}),`${a?u:""} ${i?"shadow-none":"shadow-xs"}`)})})]})},$c=({id:t,children:e,size:n="md",description:r,toggleLeft:o=!0,disabled:i,helperText:a,defaultChecked:s=!1,label:c,required:l=!1,tooltip:f,onChange:h})=>{const d=x.useId(),p=t??d;return v.jsxs("div",{className:`flex ${o?"flex-row":"flex-row-reverse"} items-start gap-3`,children:[v.jsx(Y8,{disabled:i,defaultChecked:s,id:p,size:n,onChange:h}),e||(c||r||f||a)&&v.jsxs("div",{className:"inline-flex w-full flex-col self-center",children:[v.jsx(Gn,{className:Dn("font-normal"),description:r,required:l,tooltip:f,htmlFor:p,disabled:i,children:c}),v.jsx(Gn.Helper,{disabled:i,helperText:a})]})]})};$c.displayName="Switch";const W0=x.createContext(null);function K8(t=!1){const e=x.useContext(W0);if(!e&&!t)throw new Error("Switch.Item must be used within a SwitchGroup or SwitchGroup.Root");return e}const Y0=x.forwardRef(({toggleLeft:t=!1,size:e="md",children:n,description:r,disabled:o,helperText:i,id:a,label:s,required:c,tooltip:l},f)=>{const h=x.useId(),d=a??h,p=s??r??l??i?v.jsxs("div",{className:"inline-flex flex-col",children:[v.jsx(Gn,{className:"cursor-default",description:r,required:c,tooltip:l,htmlFor:d,disabled:o,children:s}),v.jsx(Gn.Helper,{disabled:o,helperText:i})]}):null;return v.jsx(W0.Provider,{value:{disabled:o,toggleLeft:t,size:e},children:v.jsxs("div",{ref:f,"aria-describedby":i?`${d}__describer`:void 0,"aria-labelledby":s?`${d}__label`:void 0,className:"flex flex-col gap-4",role:"group",children:[s??i??r??l?v.jsx("div",{className:"flex flex-col",children:p}):null,n?v.jsx("div",{className:Dn("flex flex-col gap-2"),children:n}):null]})})});Y0.displayName="SwitchGroup",Object.assign(Y0,{Item:({disabled:t,label:e,defaultChecked:n})=>{const r=K8(),{disabled:o,size:i,toggleLeft:a}=r??{};return v.jsx($c,{toggleLeft:a,disabled:t??o,label:e,defaultChecked:n,size:i})}});const z8=({children:t})=>v.jsx("div",{className:"fixed bottom-0 z-10 flex h-[70px] w-full border-b-0 border-t border-gray-100 bg-white lg:bottom-auto lg:top-0 lg:h-[50px] lg:border-b lg:border-t-0",children:t}),$8=({id:t,label:e,icon:n,pathname:r,activeTab:o,setActiveTab:i})=>v.jsx(_1,{className:"flex flex-grow items-center",to:r??"",children:v.jsxs("button",{className:`flex h-full flex-grow flex-col items-center justify-center gap-1 border-b-0 border-t-2 px-3 py-3 text-xs focus:outline-none lg:flex-row lg:border-b-2 lg:border-t-0 lg:text-sm ${o===t?"border-core-primary-500 text-core-primary-500":"border-transparent text-core-gray-500 hover:text-core-gray-800"}`,onClick:()=>i(t),children:[v.jsx(In,{icon:n,className:"mr-2",variant:o===t?"discovery":"secondary"}),e]})}),K0=Object.prototype.toString;function Fd(t){switch(K0.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ao(t,Error)}}function Ki(t,e){return K0.call(t)===`[object ${e}]`}function z0(t){return Ki(t,"ErrorEvent")}function $0(t){return Ki(t,"DOMError")}function X8(t){return Ki(t,"DOMException")}function io(t){return Ki(t,"String")}function jd(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function Vd(t){return t===null||jd(t)||typeof t!="object"&&typeof t!="function"}function zi(t){return Ki(t,"Object")}function Xc(t){return typeof Event<"u"&&ao(t,Event)}function Q8(t){return typeof Element<"u"&&ao(t,Element)}function J8(t){return Ki(t,"RegExp")}function Qc(t){return!!(t&&t.then&&typeof t.then=="function")}function Z8(t){return zi(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function ao(t,e){try{return t instanceof e}catch{return!1}}function X0(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}function $i(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function Q0(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const o=t[r];try{X0(o)?n.push("[VueViewModel]"):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function eC(t,e,n=!1){return io(t)?J8(e)?e.test(t):io(e)?n?t===e:t.includes(e):!1:!1}function si(t,e=[],n=!1){return e.some(r=>eC(t,r,n))}function tC(t,e,n=250,r,o,i,a){if(!i.exception||!i.exception.values||!a||!ao(a.originalException,Error))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=nC(Ud(t,e,o,a.originalException,r,i.exception.values,s,0),n))}function Ud(t,e,n,r,o,i,a,s){if(i.length>=n+1)return i;let c=[...i];if(ao(r[o],Error)){J0(a,s);const l=t(e,r[o]),f=c.length;Z0(l,o,f,s),c=Ud(t,e,n,r[o],o,[l,...c],l,f)}return Array.isArray(r.errors)&&r.errors.forEach((l,f)=>{if(ao(l,Error)){J0(a,s);const h=t(e,l),d=c.length;Z0(h,`errors[${f}]`,d,s),c=Ud(t,e,n,l,o,[h,...c],h,d)}}),c}function J0(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Z0(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function nC(t,e){return t.map(n=>(n.value&&(n.value=$i(n.value,e)),n))}function eg(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const ci="8.34.0",bt=globalThis;function Jc(t,e,n){const r=bt,o=r.__SENTRY__=r.__SENTRY__||{},i=o[ci]=o[ci]||{};return i[t]||(i[t]=e())}const Xi=bt,rC=80;function ui(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let i=0,a=0;const s=" > ",c=s.length;let l;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||rC;for(;n&&i++<r&&(l=oC(n,f),!(l==="html"||i>1&&a+o.length*c+l.length>=h));)o.push(l),a+=l.length,n=n.parentNode;return o.reverse().join(s)}catch{return"<unknown>"}}function oC(t,e){const n=t,r=[];if(!n||!n.tagName)return"";if(Xi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const o=e&&e.length?e.filter(a=>n.getAttribute(a)).map(a=>[a,n.getAttribute(a)]):null;if(o&&o.length)o.forEach(a=>{r.push(`[${a[0]}="${a[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const a=n.className;if(a&&io(a)){const s=a.split(/\s+/);for(const c of s)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const a of i){const s=n.getAttribute(a);s&&r.push(`[${a}="${s}"]`)}return r.join("")}function iC(){try{return Xi.document.location.href}catch{return""}}function aC(t){return Xi.document&&Xi.document.querySelector?Xi.document.querySelector(t):null}function tg(t){if(!Xi.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}const Qi=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,sC="Sentry Logger ",Gd=["debug","info","warn","error","log","assert","trace"],Zc={};function qd(t){if(!("console"in bt))return t();const e=bt.console,n={},r=Object.keys(Zc);r.forEach(o=>{const i=Zc[o];n[o]=e[o],e[o]=i});try{return t()}finally{r.forEach(o=>{e[o]=n[o]})}}function cC(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return Qi?Gd.forEach(n=>{e[n]=(...r)=>{t&&qd(()=>{bt.console[n](`${sC}[${n}]:`,...r)})}}):Gd.forEach(n=>{e[n]=()=>{}}),e}const Te=Jc("logger",cC),uC=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function lC(t){return t==="http"||t==="https"}function ls(t,e=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=t;return`${s}://${c}${e&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${a}`}function dC(t){const e=uC.exec(t);if(!e){qd(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,o="",i="",a="",s=""]=e.slice(1);let c="",l=s;const f=l.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),l=f.pop()),l){const h=l.match(/^\d+/);h&&(l=h[0])}return ng({host:i,pass:o,path:c,projectId:l,port:a,protocol:n,publicKey:r})}function ng(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function fC(t){if(!Qi)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(a=>t[a]?!1:(Te.error(`Invalid Sentry Dsn: ${a} missing`),!0))?!1:n.match(/^\d+$/)?lC(r)?e&&isNaN(parseInt(e,10))?(Te.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(Te.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(Te.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function hC(t){const e=typeof t=="string"?dC(t):ng(t);if(!(!e||!fC(e)))return e}class Kr extends Error{constructor(e,n="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function pr(t,e,n){if(!(e in t))return;const r=t[e],o=n(r);typeof o=="function"&&rg(o,r),t[e]=o}function Tr(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{Qi&&Te.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function rg(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,Tr(t,"__sentry_original__",e)}catch{}}function Hd(t){return t.__sentry_original__}function pC(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function og(t){if(Fd(t))return{message:t.message,name:t.name,stack:t.stack,...ag(t)};if(Xc(t)){const e={type:t.type,target:ig(t.target),currentTarget:ig(t.currentTarget),...ag(t)};return typeof CustomEvent<"u"&&ao(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function ig(t){try{return Q8(t)?ui(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function ag(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function gC(t,e=40){const n=Object.keys(og(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return $i(r,e);for(let o=n.length;o>0;o--){const i=n.slice(0,o).join(", ");if(!(i.length>e))return o===n.length?i:$i(i,e)}return""}function Mn(t){return Wd(t,new Map)}function Wd(t,e){if(mC(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const o of Object.getOwnPropertyNames(t))typeof t[o]<"u"&&(r[o]=Wd(t[o],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(o=>{r.push(Wd(o,e))}),r}return t}function mC(t){if(!zi(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const sg=50,li="?",cg=/\(error: (.*)\)/,ug=/captureMessage|captureException/;function yC(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const i=[],a=n.split(`
|
|
102
102
|
`);for(let s=r;s<a.length;s++){const c=a[s];if(c.length>1024)continue;const l=cg.test(c)?c.replace(cg,"$1"):c;if(!l.match(/\S*Error: /)){for(const f of e){const h=f(l);if(h){i.push(h);break}}if(i.length>=sg+o)break}}return vC(i.slice(o))}}function vC(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(eu(e).function||"")&&e.pop(),e.reverse(),ug.test(eu(e).function||"")&&(e.pop(),ug.test(eu(e).function||"")&&e.pop()),e.slice(0,sg).map(n=>({...n,filename:n.filename||eu(e).filename,function:n.function||li}))}function eu(t){return t[t.length-1]||{}}const Yd="<anonymous>";function so(t){try{return!t||typeof t!="function"?Yd:t.name||Yd}catch{return Yd}}function lg(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const tu={},dg={};function Do(t,e){tu[t]=tu[t]||[],tu[t].push(e)}function Mo(t,e){dg[t]||(e(),dg[t]=!0)}function xr(t,e){const n=t&&tu[t];if(n)for(const r of n)try{r(e)}catch(o){Qi&&Te.error(`Error while triggering instrumentation handler.
|
|
103
103
|
Type: ${t}
|
|
104
104
|
Name: ${so(r)}
|