From 78e28b0c782680294951ef57f3f745646e305794 Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Thu, 7 Nov 2024 16:45:52 -0800 Subject: [PATCH] Updates --- assets/{index-C74CO3FN.js => index-CNB12zCh.js} | 4 ++-- index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename assets/{index-C74CO3FN.js => index-CNB12zCh.js} (98%) diff --git a/assets/index-C74CO3FN.js b/assets/index-CNB12zCh.js similarity index 98% rename from assets/index-C74CO3FN.js rename to assets/index-CNB12zCh.js index 92c04ea..9c0efe0 100644 --- a/assets/index-C74CO3FN.js +++ b/assets/index-CNB12zCh.js @@ -37,7 +37,7 @@ var T6=Object.defineProperty;var d2=e=>{throw TypeError(e)};var I6=(e,a,o)=>a in `+h[j].replace(" at new "," at ");return e.displayName&&rt.includes("")&&(rt=rt.replace("",e.displayName)),rt}while(1<=j&&0<=et);break}}}finally{Na=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?Ma(e):""}function Pa(e){switch(e.tag){case 5:return Ma(e.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return e=Oa(e.type,!1),e;case 11:return e=Oa(e.type.render,!1),e;case 1:return e=Oa(e.type,!0),e;default:return""}}function Qa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ca:return(e.displayName||"Context")+".Consumer";case Ba:return(e._context.displayName||"Context")+".Provider";case Da:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ga:return a=e.displayName||null,a!==null?a:Qa(e.type)||"Memo";case Ha:a=e._payload,e=e._init;try{return Qa(e(a))}catch{}}return null}function Ra(e){var a=e.type;switch(e.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=a.render,e=e.displayName||e.name||"",a.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(a);case 8:return a===za?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Sa(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ta(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ua(e){var a=Ta(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,a),c=""+e[a];if(!e.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var h=o.get,d=o.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return h.call(this)},set:function(j){c=""+j,d.call(this,j)}}),Object.defineProperty(e,a,{enumerable:o.enumerable}),{getValue:function(){return c},setValue:function(j){c=""+j},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function Va(e){e._valueTracker||(e._valueTracker=Ua(e))}function Wa(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return e&&(c=Ta(e)?e.checked?"true":"false":e.value),e=c,e!==o?(a.setValue(e),!0):!1}function Xa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ya(e,a){var o=a.checked;return A$1({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Za(e,a){var o=a.defaultValue==null?"":a.defaultValue,c=a.checked!=null?a.checked:a.defaultChecked;o=Sa(a.value!=null?a.value:o),e._wrapperState={initialChecked:c,initialValue:o,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function ab(e,a){a=a.checked,a!=null&&ta(e,"checked",a,!1)}function bb(e,a){ab(e,a);var o=Sa(a.value),c=a.type;if(o!=null)c==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}a.hasOwnProperty("value")?cb(e,a.type,o):a.hasOwnProperty("defaultValue")&&cb(e,a.type,Sa(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(e.defaultChecked=!!a.defaultChecked)}function db(e,a,o){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var c=a.type;if(!(c!=="submit"&&c!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+e._wrapperState.initialValue,o||a===e.value||(e.value=a),e.defaultValue=a}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function cb(e,a,o){(a!=="number"||Xa(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var eb=Array.isArray;function fb(e,a,o,c){if(e=e.options,a){a={};for(var h=0;h"+a.valueOf().toString()+"",a=mb.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;a.firstChild;)e.appendChild(a.firstChild)}});function ob(e,a){if(a){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=a;return}}e.textContent=a}var pb={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(e){qb.forEach(function(a){a=a+e.charAt(0).toUpperCase()+e.substring(1),pb[a]=pb[e]})});function rb(e,a,o){return a==null||typeof a=="boolean"||a===""?"":o||typeof a!="number"||a===0||pb.hasOwnProperty(e)&&pb[e]?(""+a).trim():a+"px"}function sb(e,a){e=e.style;for(var o in a)if(a.hasOwnProperty(o)){var c=o.indexOf("--")===0,h=rb(o,a[o],c);o==="float"&&(o="cssFloat"),c?e.setProperty(o,h):e[o]=h}}var tb=A$1({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(e,a){if(a){if(tb[e]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(p(137,e));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(p(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(p(61))}if(a.style!=null&&typeof a.style!="object")throw Error(p(62))}}function vb(e,a){if(e.indexOf("-")===-1)return typeof a.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yb=null,zb=null,Ab=null;function Bb(e){if(e=Cb(e)){if(typeof yb!="function")throw Error(p(280));var a=e.stateNode;a&&(a=Db(a),yb(e.stateNode,e.type,a))}}function Eb(e){zb?Ab?Ab.push(e):Ab=[e]:zb=e}function Fb(){if(zb){var e=zb,a=Ab;if(Ab=zb=null,Bb(e),a)for(e=0;e>>=0,e===0?32:31-(pc(e)/qc|0)|0}var rc=64,sc=4194304;function tc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function uc(e,a){var o=e.pendingLanes;if(o===0)return 0;var c=0,h=e.suspendedLanes,d=e.pingedLanes,j=o&268435455;if(j!==0){var et=j&~h;et!==0?c=tc(et):(d&=j,d!==0&&(c=tc(d)))}else j=o&~h,j!==0?c=tc(j):d!==0&&(c=tc(d));if(c===0)return 0;if(a!==0&&a!==c&&!(a&h)&&(h=c&-c,d=a&-a,h>=d||h===16&&(d&4194240)!==0))return a;if(c&4&&(c|=o&16),a=e.entangledLanes,a!==0)for(e=e.entanglements,a&=c;0o;o++)a.push(e);return a}function Ac(e,a,o){e.pendingLanes|=a,a!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,a=31-oc(a),e[a]=o}function Bc(e,a){var o=e.pendingLanes&~a;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=a,e.mutableReadLanes&=a,e.entangledLanes&=a,a=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0=be),ee=" ",fe=!1;function ge(e,a){switch(e){case"keyup":return $d.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ie=!1;function je(e,a){switch(e){case"compositionend":return he(a);case"keypress":return a.which!==32?null:(fe=!0,ee);case"textInput":return e=a.data,e===ee&&fe?null:e;default:return null}}function ke(e,a){if(ie)return e==="compositionend"||!ae&&ge(e,a)?(e=nd(),md=ld=kd=null,ie=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1=a)return{node:o,offset:a-e};e=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Je(o)}}function Le(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Le(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function Me(){for(var e=window,a=Xa();a instanceof e.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)e=a.contentWindow;else break;a=Xa(e.document)}return a}function Ne(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}function Oe(e){var a=Me(),o=e.focusedElem,c=e.selectionRange;if(a!==o&&o&&o.ownerDocument&&Le(o.ownerDocument.documentElement,o)){if(c!==null&&Ne(o)){if(a=c.start,e=c.end,e===void 0&&(e=a),"selectionStart"in o)o.selectionStart=a,o.selectionEnd=Math.min(e,o.value.length);else if(e=(a=o.ownerDocument||document)&&a.defaultView||window,e.getSelection){e=e.getSelection();var h=o.textContent.length,d=Math.min(c.start,h);c=c.end===void 0?d:Math.min(c.end,h),!e.extend&&d>c&&(h=c,c=d,d=h),h=Ke(o,d);var j=Ke(o,c);h&&j&&(e.rangeCount!==1||e.anchorNode!==h.node||e.anchorOffset!==h.offset||e.focusNode!==j.node||e.focusOffset!==j.offset)&&(a=a.createRange(),a.setStart(h.node,h.offset),e.removeAllRanges(),d>c?(e.addRange(a),e.extend(j.node,j.offset)):(a.setEnd(j.node,j.offset),e.addRange(a)))}}for(a=[],e=o;e=e.parentNode;)e.nodeType===1&&a.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(e,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Te||Qe==null||Qe!==Xa(c)||(c=Qe,"selectionStart"in c&&Ne(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Se&&Ie(Se,c)||(Se=c,c=oe(Re,"onSelect"),0Tf||(e.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G$1(e,a){Tf++,Sf[Tf]=e.current,e.current=a}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(e,a){var o=e.type.contextTypes;if(!o)return Vf;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===a)return c.__reactInternalMemoizedMaskedChildContext;var h={},d;for(d in o)h[d]=a[d];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=h),h}function Zf(e){return e=e.childContextTypes,e!=null}function $f(){E(Wf),E(H)}function ag(e,a,o){if(H.current!==Vf)throw Error(p(168));G$1(H,a),G$1(Wf,o)}function bg(e,a,o){var c=e.stateNode;if(a=a.childContextTypes,typeof c.getChildContext!="function")return o;c=c.getChildContext();for(var h in c)if(!(h in a))throw Error(p(108,Ra(e)||"Unknown",h));return A$1({},o,c)}function cg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Vf,Xf=H.current,G$1(H,e),G$1(Wf,Wf.current),!0}function dg(e,a,o){var c=e.stateNode;if(!c)throw Error(p(169));o?(e=bg(e,a,Xf),c.__reactInternalMemoizedMergedChildContext=e,E(Wf),E(H),G$1(H,e)):E(Wf),G$1(Wf,o)}var eg=null,fg=!1,gg=!1;function hg(e){eg===null?eg=[e]:eg.push(e)}function ig(e){fg=!0,hg(e)}function jg(){if(!gg&&eg!==null){gg=!0;var e=0,a=C;try{var o=eg;for(C=1;e>=j,h-=j,rg=1<<32-oc(a)+h|o<Xt?(Wt=zt,zt=null):Wt=zt.sibling;var ir=gt(Et,zt,At[Xt],Bt);if(ir===null){zt===null&&(zt=Wt);break}e&&zt&&ir.alternate===null&&a(Et,zt),_t=d(ir,_t,Xt),jt===null?kt=ir:jt.sibling=ir,jt=ir,zt=Wt}if(Xt===At.length)return o(Et,zt),I$1&&tg(Et,Xt),kt;if(zt===null){for(;XtXt?(Wt=zt,zt=null):Wt=zt.sibling;var mt=gt(Et,zt,ir.value,Bt);if(mt===null){zt===null&&(zt=Wt);break}e&&zt&&mt.alternate===null&&a(Et,zt),_t=d(mt,_t,Xt),jt===null?kt=mt:jt.sibling=mt,jt=mt,zt=Wt}if(ir.done)return o(Et,zt),I$1&&tg(Et,Xt),kt;if(zt===null){for(;!ir.done;Xt++,ir=At.next())ir=ot(Et,ir.value,Bt),ir!==null&&(_t=d(ir,_t,Xt),jt===null?kt=ir:jt.sibling=ir,jt=ir);return I$1&&tg(Et,Xt),kt}for(zt=c(Et,zt);!ir.done;Xt++,ir=At.next())ir=bt(zt,Et,Xt,ir.value,Bt),ir!==null&&(e&&ir.alternate!==null&&zt.delete(ir.key===null?Xt:ir.key),_t=d(ir,_t,Xt),jt===null?kt=ir:jt.sibling=ir,jt=ir);return e&&zt.forEach(function($){return a(Et,$)}),I$1&&tg(Et,Xt),kt}function St(Et,_t,At,Bt){if(typeof At=="object"&&At!==null&&At.type===ya&&At.key===null&&(At=At.props.children),typeof At=="object"&&At!==null){switch(At.$$typeof){case va:e:{for(var kt=At.key,jt=_t;jt!==null;){if(jt.key===kt){if(kt=At.type,kt===ya){if(jt.tag===7){o(Et,jt.sibling),_t=h(jt,At.props.children),_t.return=Et,Et=_t;break e}}else if(jt.elementType===kt||typeof kt=="object"&&kt!==null&&kt.$$typeof===Ha&&Ng(kt)===jt.type){o(Et,jt.sibling),_t=h(jt,At.props),_t.ref=Lg(Et,jt,At),_t.return=Et,Et=_t;break e}o(Et,jt);break}else a(Et,jt);jt=jt.sibling}At.type===ya?(_t=Tg(At.props.children,Et.mode,Bt,At.key),_t.return=Et,Et=_t):(Bt=Rg(At.type,At.key,At.props,null,Et.mode,Bt),Bt.ref=Lg(Et,_t,At),Bt.return=Et,Et=Bt)}return j(Et);case wa:e:{for(jt=At.key;_t!==null;){if(_t.key===jt)if(_t.tag===4&&_t.stateNode.containerInfo===At.containerInfo&&_t.stateNode.implementation===At.implementation){o(Et,_t.sibling),_t=h(_t,At.children||[]),_t.return=Et,Et=_t;break e}else{o(Et,_t);break}else a(Et,_t);_t=_t.sibling}_t=Sg(At,Et.mode,Bt),_t.return=Et,Et=_t}return j(Et);case Ha:return jt=At._init,St(Et,_t,jt(At._payload),Bt)}if(eb(At))return wt(Et,_t,At,Bt);if(Ka(At))return $t(Et,_t,At,Bt);Mg(Et,At)}return typeof At=="string"&&At!==""||typeof At=="number"?(At=""+At,_t!==null&&_t.tag===6?(o(Et,_t.sibling),_t=h(_t,At),_t.return=Et,Et=_t):(o(Et,_t),_t=Qg(At,Et.mode,Bt),_t.return=Et,Et=_t),j(Et)):o(Et,_t)}return St}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(e){var a=Wg.current;E(Wg),e._currentValue=a}function bh(e,a,o){for(;e!==null;){var c=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),e===o)break;e=e.return}}function ch$1(e,a){Xg=e,Zg=Yg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&a&&(dh$1=!0),e.firstContext=null)}function eh(e){var a=e._currentValue;if(Zg!==e)if(e={context:e,memoizedValue:a,next:null},Yg===null){if(Xg===null)throw Error(p(308));Yg=e,Xg.dependencies={lanes:0,firstContext:e}}else Yg=Yg.next=e;return a}var fh=null;function gh(e){fh===null?fh=[e]:fh.push(e)}function hh(e,a,o,c){var h=a.interleaved;return h===null?(o.next=o,gh(a)):(o.next=h.next,h.next=o),a.interleaved=o,ih(e,c)}function ih(e,a){e.lanes|=a;var o=e.alternate;for(o!==null&&(o.lanes|=a),o=e,e=e.return;e!==null;)e.childLanes|=a,o=e.alternate,o!==null&&(o.childLanes|=a),o=e,e=e.return;return o.tag===3?o.stateNode:null}var jh=!1;function kh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mh(e,a){return{eventTime:e,lane:a,tag:0,payload:null,callback:null,next:null}}function nh(e,a,o){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,K$4&2){var h=c.pending;return h===null?a.next=a:(a.next=h.next,h.next=a),c.pending=a,ih(e,o)}return h=c.interleaved,h===null?(a.next=a,gh(c)):(a.next=h.next,h.next=a),c.interleaved=a,ih(e,o)}function oh(e,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194240)!==0)){var c=a.lanes;c&=e.pendingLanes,o|=c,a.lanes=o,Cc(e,o)}}function ph(e,a){var o=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var h=null,d=null;if(o=o.firstBaseUpdate,o!==null){do{var j={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};d===null?h=d=j:d=d.next=j,o=o.next}while(o!==null);d===null?h=d=a:d=d.next=a}else h=d=a;o={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:d,shared:c.shared,effects:c.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=a:e.next=a,o.lastBaseUpdate=a}function qh(e,a,o,c){var h=e.updateQueue;jh=!1;var d=h.firstBaseUpdate,j=h.lastBaseUpdate,et=h.shared.pending;if(et!==null){h.shared.pending=null;var rt=et,nt=rt.next;rt.next=null,j===null?d=nt:j.next=nt,j=rt;var at=e.alternate;at!==null&&(at=at.updateQueue,et=at.lastBaseUpdate,et!==j&&(et===null?at.firstBaseUpdate=nt:et.next=nt,at.lastBaseUpdate=rt))}if(d!==null){var ot=h.baseState;j=0,at=nt=rt=null,et=d;do{var gt=et.lane,bt=et.eventTime;if((c>)===gt){at!==null&&(at=at.next={eventTime:bt,lane:0,tag:et.tag,payload:et.payload,callback:et.callback,next:null});e:{var wt=e,$t=et;switch(gt=a,bt=o,$t.tag){case 1:if(wt=$t.payload,typeof wt=="function"){ot=wt.call(bt,ot,gt);break e}ot=wt;break e;case 3:wt.flags=wt.flags&-65537|128;case 0:if(wt=$t.payload,gt=typeof wt=="function"?wt.call(bt,ot,gt):wt,gt==null)break e;ot=A$1({},ot,gt);break e;case 2:jh=!0}}et.callback!==null&&et.lane!==0&&(e.flags|=64,gt=h.effects,gt===null?h.effects=[et]:gt.push(et))}else bt={eventTime:bt,lane:gt,tag:et.tag,payload:et.payload,callback:et.callback,next:null},at===null?(nt=at=bt,rt=ot):at=at.next=bt,j|=gt;if(et=et.next,et===null){if(et=h.shared.pending,et===null)break;gt=et,et=gt.next,gt.next=null,h.lastBaseUpdate=gt,h.shared.pending=null}}while(!0);if(at===null&&(rt=ot),h.baseState=rt,h.firstBaseUpdate=nt,h.lastBaseUpdate=at,a=h.shared.interleaved,a!==null){h=a;do j|=h.lane,h=h.next;while(h!==a)}else d===null&&(h.shared.lanes=0);rh|=j,e.lanes=j,e.memoizedState=ot}}function sh(e,a,o){if(e=a.effects,a.effects=null,e!==null)for(a=0;ao?o:4,e(!0);var c=Gh.transition;Gh.transition={};try{e(!1),a()}finally{C=o,Gh.transition=c}}function wi(){return Uh().memoizedState}function xi(e,a,o){var c=yi(e);if(o={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null},zi(e))Ai(a,o);else if(o=hh(e,a,o,c),o!==null){var h=R$1();gi(o,e,c,h),Bi(o,a,c)}}function ii(e,a,o){var c=yi(e),h={lane:c,action:o,hasEagerState:!1,eagerState:null,next:null};if(zi(e))Ai(a,h);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=a.lastRenderedReducer,d!==null))try{var j=a.lastRenderedState,et=d(j,o);if(h.hasEagerState=!0,h.eagerState=et,He(et,j)){var rt=a.interleaved;rt===null?(h.next=h,gh(a)):(h.next=rt.next,rt.next=h),a.interleaved=h;return}}catch{}finally{}o=hh(e,a,h,c),o!==null&&(h=R$1(),gi(o,e,c,h),Bi(o,a,c))}}function zi(e){var a=e.alternate;return e===M$1||a!==null&&a===M$1}function Ai(e,a){Jh=Ih=!0;var o=e.pending;o===null?a.next=a:(a.next=o.next,o.next=a),e.pending=a}function Bi(e,a,o){if(o&4194240){var c=a.lanes;c&=e.pendingLanes,o|=c,a.lanes=o,Cc(e,o)}}var Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(e,a){return Th().memoizedState=[e,a===void 0?null:a],e},useContext:eh,useEffect:mi,useImperativeHandle:function(e,a,o){return o=o!=null?o.concat([e]):null,ki(4194308,4,pi.bind(null,a,e),o)},useLayoutEffect:function(e,a){return ki(4194308,4,e,a)},useInsertionEffect:function(e,a){return ki(4,2,e,a)},useMemo:function(e,a){var o=Th();return a=a===void 0?null:a,e=e(),o.memoizedState=[e,a],e},useReducer:function(e,a,o){var c=Th();return a=o!==void 0?o(a):a,c.memoizedState=c.baseState=a,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},c.queue=e,e=e.dispatch=xi.bind(null,M$1,e),[c.memoizedState,e]},useRef:function(e){var a=Th();return e={current:e},a.memoizedState=e},useState:hi,useDebugValue:ri,useDeferredValue:function(e){return Th().memoizedState=e},useTransition:function(){var e=hi(!1),a=e[0];return e=vi.bind(null,e[1]),Th().memoizedState=e,[a,e]},useMutableSource:function(){},useSyncExternalStore:function(e,a,o){var c=M$1,h=Th();if(I$1){if(o===void 0)throw Error(p(407));o=o()}else{if(o=a(),Q===null)throw Error(p(349));Hh&30||di(c,a,o)}h.memoizedState=o;var d={value:o,getSnapshot:a};return h.queue=d,mi(ai.bind(null,c,d,e),[e]),c.flags|=2048,bi(9,ci.bind(null,c,d,o,a),void 0,null),o},useId:function(){var e=Th(),a=Q.identifierPrefix;if(I$1){var o=sg,c=rg;o=(c&~(1<<32-oc(c)-1)).toString(32)+o,a=":"+a+"R"+o,o=Kh++,0<\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=j.createElement(o,{is:c.is}):(e=j.createElement(o),o==="select"&&(j=e,c.multiple?j.multiple=!0:c.size&&(j.size=c.size))):e=j.createElementNS(e,o),e[Of]=a,e[Pf]=c,zj(e,a,!1,!1),a.stateNode=e;e:{switch(j=vb(o,c),o){case"dialog":D$1("cancel",e),D$1("close",e),h=c;break;case"iframe":case"object":case"embed":D$1("load",e),h=c;break;case"video":case"audio":for(h=0;hGj&&(a.flags|=128,c=!0,Dj(d,!1),a.lanes=4194304)}else{if(!c)if(e=Ch$1(j),e!==null){if(a.flags|=128,c=!0,o=e.updateQueue,o!==null&&(a.updateQueue=o,a.flags|=4),Dj(d,!0),d.tail===null&&d.tailMode==="hidden"&&!j.alternate&&!I$1)return S$1(a),null}else 2*B()-d.renderingStartTime>Gj&&o!==1073741824&&(a.flags|=128,c=!0,Dj(d,!1),a.lanes=4194304);d.isBackwards?(j.sibling=a.child,a.child=j):(o=d.last,o!==null?o.sibling=j:a.child=j,d.last=j)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=B(),a.sibling=null,o=L$1.current,G$1(L$1,c?o&1|2:o&1),a):(S$1(a),null);case 22:case 23:return Hj(),c=a.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(a.flags|=8192),c&&a.mode&1?fj&1073741824&&(S$1(a),a.subtreeFlags&6&&(a.flags|=8192)):S$1(a),null;case 24:return null;case 25:return null}throw Error(p(156,a.tag))}function Ij(e,a){switch(wg(a),a.tag){case 1:return Zf(a.type)&&$f(),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return zh(),E(Wf),E(H),Eh(),e=a.flags,e&65536&&!(e&128)?(a.flags=e&-65537|128,a):null;case 5:return Bh(a),null;case 13:if(E(L$1),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(p(340));Ig()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return E(L$1),null;case 4:return zh(),null;case 10:return ah(a.type._context),null;case 22:case 23:return Hj(),null;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Lj(e,a){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(c){W$6(e,a,c)}else o.current=null}function Mj(e,a,o){try{o()}catch(c){W$6(e,a,c)}}var Nj=!1;function Oj(e,a){if(Cf=dd,e=Me(),Ne(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var h=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var j=0,et=-1,rt=-1,nt=0,at=0,ot=e,gt=null;t:for(;;){for(var bt;ot!==o||h!==0&&ot.nodeType!==3||(et=j+h),ot!==d||c!==0&&ot.nodeType!==3||(rt=j+c),ot.nodeType===3&&(j+=ot.nodeValue.length),(bt=ot.firstChild)!==null;)gt=ot,ot=bt;for(;;){if(ot===e)break t;if(gt===o&&++nt===h&&(et=j),gt===d&&++at===c&&(rt=j),(bt=ot.nextSibling)!==null)break;ot=gt,gt=ot.parentNode}ot=bt}o=et===-1||rt===-1?null:{start:et,end:rt}}else o=null}o=o||{start:0,end:0}}else o=null;for(Df={focusedElem:e,selectionRange:o},dd=!1,V=a;V!==null;)if(a=V,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,V=e;else for(;V!==null;){a=V;try{var wt=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(wt!==null){var $t=wt.memoizedProps,St=wt.memoizedState,Et=a.stateNode,_t=Et.getSnapshotBeforeUpdate(a.elementType===a.type?$t:Ci(a.type,$t),St);Et.__reactInternalSnapshotBeforeUpdate=_t}break;case 3:var At=a.stateNode.containerInfo;At.nodeType===1?At.textContent="":At.nodeType===9&&At.documentElement&&At.removeChild(At.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch(Bt){W$6(a,a.return,Bt)}if(e=a.sibling,e!==null){e.return=a.return,V=e;break}V=a.return}return wt=Nj,Nj=!1,wt}function Pj(e,a,o){var c=a.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&e)===e){var d=h.destroy;h.destroy=void 0,d!==void 0&&Mj(a,o,d)}h=h.next}while(h!==c)}}function Qj(e,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var o=a=a.next;do{if((o.tag&e)===e){var c=o.create;o.destroy=c()}o=o.next}while(o!==a)}}function Rj(e){var a=e.ref;if(a!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof a=="function"?a(e):a.current=e}}function Sj(e){var a=e.alternate;a!==null&&(e.alternate=null,Sj(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&(delete a[Of],delete a[Pf],delete a[of],delete a[Qf],delete a[Rf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tj(e){return e.tag===5||e.tag===3||e.tag===4}function Uj(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vj(e,a,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?o.nodeType===8?o.parentNode.insertBefore(e,a):o.insertBefore(e,a):(o.nodeType===8?(a=o.parentNode,a.insertBefore(e,o)):(a=o,a.appendChild(e)),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Bf));else if(c!==4&&(e=e.child,e!==null))for(Vj(e,a,o),e=e.sibling;e!==null;)Vj(e,a,o),e=e.sibling}function Wj(e,a,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?o.insertBefore(e,a):o.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(Wj(e,a,o),e=e.sibling;e!==null;)Wj(e,a,o),e=e.sibling}var X$2=null,Xj=!1;function Yj(e,a,o){for(o=o.child;o!==null;)Zj(e,a,o),o=o.sibling}function Zj(e,a,o){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,o)}catch{}switch(o.tag){case 5:U||Lj(o,a);case 6:var c=X$2,h=Xj;X$2=null,Yj(e,a,o),X$2=c,Xj=h,X$2!==null&&(Xj?(e=X$2,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):X$2.removeChild(o.stateNode));break;case 18:X$2!==null&&(Xj?(e=X$2,o=o.stateNode,e.nodeType===8?Kf(e.parentNode,o):e.nodeType===1&&Kf(e,o),bd(e)):Kf(X$2,o.stateNode));break;case 4:c=X$2,h=Xj,X$2=o.stateNode.containerInfo,Xj=!0,Yj(e,a,o),X$2=c,Xj=h;break;case 0:case 11:case 14:case 15:if(!U&&(c=o.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var d=h,j=d.destroy;d=d.tag,j!==void 0&&(d&2||d&4)&&Mj(o,a,j),h=h.next}while(h!==c)}Yj(e,a,o);break;case 1:if(!U&&(Lj(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=o.memoizedProps,c.state=o.memoizedState,c.componentWillUnmount()}catch(et){W$6(o,a,et)}Yj(e,a,o);break;case 21:Yj(e,a,o);break;case 22:o.mode&1?(U=(c=U)||o.memoizedState!==null,Yj(e,a,o),U=c):Yj(e,a,o);break;default:Yj(e,a,o)}}function ak(e){var a=e.updateQueue;if(a!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Kj),a.forEach(function(c){var h=bk.bind(null,e,c);o.has(c)||(o.add(c),c.then(h,h))})}}function ck(e,a){var o=a.deletions;if(o!==null)for(var c=0;ch&&(h=j),c&=~d}if(c=h,c=B()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*lk(c/1960))-c,10e?16:e,wk===null)var c=!1;else{if(e=wk,wk=null,xk=0,K$4&6)throw Error(p(331));var h=K$4;for(K$4|=4,V=e.current;V!==null;){var d=V,j=d.child;if(V.flags&16){var et=d.deletions;if(et!==null){for(var rt=0;rtB()-fk?Kk(e,0):rk|=o),Dk(e,a)}function Yk(e,a){a===0&&(e.mode&1?(a=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):a=1);var o=R$1();e=ih(e,a),e!==null&&(Ac(e,a,o),Dk(e,o))}function uj(e){var a=e.memoizedState,o=0;a!==null&&(o=a.retryLane),Yk(e,o)}function bk(e,a){var o=0;switch(e.tag){case 13:var c=e.stateNode,h=e.memoizedState;h!==null&&(o=h.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(p(314))}c!==null&&c.delete(a),Yk(e,o)}var Vk;Vk=function(e,a,o){if(e!==null)if(e.memoizedProps!==a.pendingProps||Wf.current)dh$1=!0;else{if(!(e.lanes&o)&&!(a.flags&128))return dh$1=!1,yj(e,a,o);dh$1=!!(e.flags&131072)}else dh$1=!1,I$1&&a.flags&1048576&&ug(a,ng,a.index);switch(a.lanes=0,a.tag){case 2:var c=a.type;ij(e,a),e=a.pendingProps;var h=Yf(a,H.current);ch$1(a,o),h=Nh(null,a,c,e,h,o);var d=Sh();return a.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Zf(c)?(d=!0,cg(a)):d=!1,a.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,kh(a),h.updater=Ei,a.stateNode=h,h._reactInternals=a,Ii(a,c,e,o),a=jj(null,a,c,!0,d,o)):(a.tag=0,I$1&&d&&vg(a),Xi(null,a,h,o),a=a.child),a;case 16:c=a.elementType;e:{switch(ij(e,a),e=a.pendingProps,h=c._init,c=h(c._payload),a.type=c,h=a.tag=Zk(c),e=Ci(c,e),h){case 0:a=cj(null,a,c,e,o);break e;case 1:a=hj(null,a,c,e,o);break e;case 11:a=Yi(null,a,c,e,o);break e;case 14:a=$i(null,a,c,Ci(c.type,e),o);break e}throw Error(p(306,c,""))}return a;case 0:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),cj(e,a,c,h,o);case 1:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),hj(e,a,c,h,o);case 3:e:{if(kj(a),e===null)throw Error(p(387));c=a.pendingProps,d=a.memoizedState,h=d.element,lh(e,a),qh(a,c,null,o);var j=a.memoizedState;if(c=j.element,d.isDehydrated)if(d={element:c,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},a.updateQueue.baseState=d,a.memoizedState=d,a.flags&256){h=Ji(Error(p(423)),a),a=lj(e,a,c,o,h);break e}else if(c!==h){h=Ji(Error(p(424)),a),a=lj(e,a,c,o,h);break e}else for(yg=Lf(a.stateNode.containerInfo.firstChild),xg=a,I$1=!0,zg=null,o=Vg(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ig(),c===h){a=Zi(e,a,o);break e}Xi(e,a,c,o)}a=a.child}return a;case 5:return Ah(a),e===null&&Eg(a),c=a.type,h=a.pendingProps,d=e!==null?e.memoizedProps:null,j=h.children,Ef(c,h)?j=null:d!==null&&Ef(c,d)&&(a.flags|=32),gj(e,a),Xi(e,a,j,o),a.child;case 6:return e===null&&Eg(a),null;case 13:return oj(e,a,o);case 4:return yh(a,a.stateNode.containerInfo),c=a.pendingProps,e===null?a.child=Ug(a,null,c,o):Xi(e,a,c,o),a.child;case 11:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),Yi(e,a,c,h,o);case 7:return Xi(e,a,a.pendingProps,o),a.child;case 8:return Xi(e,a,a.pendingProps.children,o),a.child;case 12:return Xi(e,a,a.pendingProps.children,o),a.child;case 10:e:{if(c=a.type._context,h=a.pendingProps,d=a.memoizedProps,j=h.value,G$1(Wg,c._currentValue),c._currentValue=j,d!==null)if(He(d.value,j)){if(d.children===h.children&&!Wf.current){a=Zi(e,a,o);break e}}else for(d=a.child,d!==null&&(d.return=a);d!==null;){var et=d.dependencies;if(et!==null){j=d.child;for(var rt=et.firstContext;rt!==null;){if(rt.context===c){if(d.tag===1){rt=mh(-1,o&-o),rt.tag=2;var nt=d.updateQueue;if(nt!==null){nt=nt.shared;var at=nt.pending;at===null?rt.next=rt:(rt.next=at.next,at.next=rt),nt.pending=rt}}d.lanes|=o,rt=d.alternate,rt!==null&&(rt.lanes|=o),bh(d.return,o,a),et.lanes|=o;break}rt=rt.next}}else if(d.tag===10)j=d.type===a.type?null:d.child;else if(d.tag===18){if(j=d.return,j===null)throw Error(p(341));j.lanes|=o,et=j.alternate,et!==null&&(et.lanes|=o),bh(j,o,a),j=d.sibling}else j=d.child;if(j!==null)j.return=d;else for(j=d;j!==null;){if(j===a){j=null;break}if(d=j.sibling,d!==null){d.return=j.return,j=d;break}j=j.return}d=j}Xi(e,a,h.children,o),a=a.child}return a;case 9:return h=a.type,c=a.pendingProps.children,ch$1(a,o),h=eh(h),c=c(h),a.flags|=1,Xi(e,a,c,o),a.child;case 14:return c=a.type,h=Ci(c,a.pendingProps),h=Ci(c.type,h),$i(e,a,c,h,o);case 15:return bj(e,a,a.type,a.pendingProps,o);case 17:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),ij(e,a),a.tag=1,Zf(c)?(e=!0,cg(a)):e=!1,ch$1(a,o),Gi(a,c,h),Ii(a,c,h,o),jj(null,a,c,!0,e,o);case 19:return xj(e,a,o);case 22:return dj(e,a,o)}throw Error(p(156,a.tag))};function Fk(e,a){return ac(e,a)}function $k(e,a,o,c){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(e,a,o,c){return new $k(e,a,o,c)}function aj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zk(e){if(typeof e=="function")return aj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Da)return 11;if(e===Ga)return 14}return 2}function Pg(e,a){var o=e.alternate;return o===null?(o=Bg(e.tag,a,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=a,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,a=e.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Rg(e,a,o,c,h,d){var j=2;if(c=e,typeof e=="function")aj(e)&&(j=1);else if(typeof e=="string")j=5;else e:switch(e){case ya:return Tg(o.children,h,d,a);case za:j=8,h|=8;break;case Aa:return e=Bg(12,o,a,h|2),e.elementType=Aa,e.lanes=d,e;case Ea:return e=Bg(13,o,a,h),e.elementType=Ea,e.lanes=d,e;case Fa:return e=Bg(19,o,a,h),e.elementType=Fa,e.lanes=d,e;case Ia:return pj(o,h,d,a);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ba:j=10;break e;case Ca:j=9;break e;case Da:j=11;break e;case Ga:j=14;break e;case Ha:j=16,c=null;break e}throw Error(p(130,e==null?e:typeof e,""))}return a=Bg(j,o,a,h),a.elementType=e,a.type=c,a.lanes=d,a}function Tg(e,a,o,c){return e=Bg(7,e,c,a),e.lanes=o,e}function pj(e,a,o,c){return e=Bg(22,e,c,a),e.elementType=Ia,e.lanes=o,e.stateNode={isHidden:!1},e}function Qg(e,a,o){return e=Bg(6,e,null,a),e.lanes=o,e}function Sg(e,a,o){return a=Bg(4,e.children!==null?e.children:[],e.key,a),a.lanes=o,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function al(e,a,o,c,h){this.tag=a,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function bl(e,a,o,c,h,d,j,et,rt){return e=new al(e,a,o,et,rt),a===1?(a=1,d===!0&&(a|=8)):a=0,d=Bg(3,null,null,a),e.current=d,d.stateNode=e,d.memoizedState={element:c,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(d),e}function cl(e,a,o){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs$1(reactDomExports);var createRoot,m=reactDomExports;createRoot=m.createRoot,m.hydrateRoot;function setRef(e,a){typeof e=="function"?e(a):e!=null&&(e.current=a)}function composeRefs(...e){return a=>e.forEach(o=>setRef(o,a))}function useComposedRefs(...e){return reactExports.useCallback(composeRefs(...e),e)}var Slot=reactExports.forwardRef((e,a)=>{const{children:o,...c}=e,h=reactExports.Children.toArray(o),d=h.find(isSlottable);if(d){const j=d.props.children,et=h.map(rt=>rt===d?reactExports.Children.count(j)>1?reactExports.Children.only(null):reactExports.isValidElement(j)?j.props.children:null:rt);return jsxRuntimeExports.jsx(SlotClone,{...c,ref:a,children:reactExports.isValidElement(j)?reactExports.cloneElement(j,void 0,et):null})}return jsxRuntimeExports.jsx(SlotClone,{...c,ref:a,children:o})});Slot.displayName="Slot";var SlotClone=reactExports.forwardRef((e,a)=>{const{children:o,...c}=e;if(reactExports.isValidElement(o)){const h=getElementRef$1(o);return reactExports.cloneElement(o,{...mergeProps(c,o.props),ref:a?composeRefs(a,h):h})}return reactExports.Children.count(o)>1?reactExports.Children.only(null):null});SlotClone.displayName="SlotClone";var Slottable=({children:e})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:e});function isSlottable(e){return reactExports.isValidElement(e)&&e.type===Slottable}function mergeProps(e,a){const o={...a};for(const c in a){const h=e[c],d=a[c];/^on[A-Z]/.test(c)?h&&d?o[c]=(...et)=>{d(...et),h(...et)}:h&&(o[c]=h):c==="style"?o[c]={...h,...d}:c==="className"&&(o[c]=[h,d].filter(Boolean).join(" "))}return{...e,...o}}function getElementRef$1(e){var c,h;let a=(c=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:c.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?e.ref:(a=(h=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:h.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function r$1(e){var a,o,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e))for(a=0;atypeof e=="boolean"?"".concat(e):e===0?"0":e,cx=clsx$1,cva=(e,a)=>o=>{var c;if((a==null?void 0:a.variants)==null)return cx(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:h,defaultVariants:d}=a,j=Object.keys(h).map(nt=>{const at=o==null?void 0:o[nt],ot=d==null?void 0:d[nt];if(at===null)return null;const gt=falsyToString(at)||falsyToString(ot);return h[nt][gt]}),et=o&&Object.entries(o).reduce((nt,at)=>{let[ot,gt]=at;return gt===void 0||(nt[ot]=gt),nt},{}),rt=a==null||(c=a.compoundVariants)===null||c===void 0?void 0:c.reduce((nt,at)=>{let{class:ot,className:gt,...bt}=at;return Object.entries(bt).every(wt=>{let[$t,St]=wt;return Array.isArray(St)?St.includes({...d,...et}[$t]):{...d,...et}[$t]===St})?[...nt,ot,gt]:nt},[]);return cx(e,j,rt,o==null?void 0:o.class,o==null?void 0:o.className)};function r(e){var a,o,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e)){var h=e.length;for(a=0;a{const a=createClassMap(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:c}=e;return{getClassGroupId:j=>{const et=j.split(CLASS_PART_SEPARATOR);return et[0]===""&&et.length!==1&&et.shift(),getGroupRecursive(et,a)||getGroupIdForArbitraryProperty(j)},getConflictingClassGroupIds:(j,et)=>{const rt=o[j]||[];return et&&c[j]?[...rt,...c[j]]:rt}}},getGroupRecursive=(e,a)=>{var j;if(e.length===0)return a.classGroupId;const o=e[0],c=a.nextPart.get(o),h=c?getGroupRecursive(e.slice(1),c):void 0;if(h)return h;if(a.validators.length===0)return;const d=e.join(CLASS_PART_SEPARATOR);return(j=a.validators.find(({validator:et})=>et(d)))==null?void 0:j.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const a=arbitraryPropertyRegex.exec(e)[1],o=a==null?void 0:a.substring(0,a.indexOf(":"));if(o)return"arbitrary.."+o}},createClassMap=e=>{const{theme:a,prefix:o}=e,c={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(e.classGroups),o).forEach(([d,j])=>{processClassesRecursively(j,c,d,a)}),c},processClassesRecursively=(e,a,o,c)=>{e.forEach(h=>{if(typeof h=="string"){const d=h===""?a:getPart(a,h);d.classGroupId=o;return}if(typeof h=="function"){if(isThemeGetter(h)){processClassesRecursively(h(c),a,o,c);return}a.validators.push({validator:h,classGroupId:o});return}Object.entries(h).forEach(([d,j])=>{processClassesRecursively(j,getPart(a,d),o,c)})})},getPart=(e,a)=>{let o=e;return a.split(CLASS_PART_SEPARATOR).forEach(c=>{o.nextPart.has(c)||o.nextPart.set(c,{nextPart:new Map,validators:[]}),o=o.nextPart.get(c)}),o},isThemeGetter=e=>e.isThemeGetter,getPrefixedClassGroupEntries=(e,a)=>a?e.map(([o,c])=>{const h=c.map(d=>typeof d=="string"?a+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([j,et])=>[a+j,et])):d);return[o,h]}):e,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,o=new Map,c=new Map;const h=(d,j)=>{o.set(d,j),a++,a>e&&(a=0,c=o,o=new Map)};return{get(d){let j=o.get(d);if(j!==void 0)return j;if((j=c.get(d))!==void 0)return h(d,j),j},set(d,j){o.has(d)?o.set(d,j):h(d,j)}}},IMPORTANT_MODIFIER="!",createParseClassName=e=>{const{separator:a,experimentalParseClassName:o}=e,c=a.length===1,h=a[0],d=a.length,j=et=>{const rt=[];let nt=0,at=0,ot;for(let St=0;Stat?ot-at:void 0;return{modifiers:rt,hasImportantModifier:bt,baseClassName:wt,maybePostfixModifierPosition:$t}};return o?et=>o({className:et,parseClassName:j}):j},sortModifiers=e=>{if(e.length<=1)return e;const a=[];let o=[];return e.forEach(c=>{c[0]==="["?(a.push(...o.sort(),c),o=[]):o.push(c)}),a.push(...o.sort()),a},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,a)=>{const{parseClassName:o,getClassGroupId:c,getConflictingClassGroupIds:h}=a,d=[],j=e.trim().split(SPLIT_CLASSES_REGEX);let et="";for(let rt=j.length-1;rt>=0;rt-=1){const nt=j[rt],{modifiers:at,hasImportantModifier:ot,baseClassName:gt,maybePostfixModifierPosition:bt}=o(nt);let wt=!!bt,$t=c(wt?gt.substring(0,bt):gt);if(!$t){if(!wt){et=nt+(et.length>0?" "+et:et);continue}if($t=c(gt),!$t){et=nt+(et.length>0?" "+et:et);continue}wt=!1}const St=sortModifiers(at).join(":"),Et=ot?St+IMPORTANT_MODIFIER:St,_t=Et+$t;if(d.includes(_t))continue;d.push(_t);const At=h($t,wt);for(let Bt=0;Bt0?" "+et:et)}return et};function twJoin(){let e=0,a,o,c="";for(;e{if(typeof e=="string")return e;let a,o="";for(let c=0;cot(at),e());return o=createConfigUtils(nt),c=o.cache.get,h=o.cache.set,d=et,et(rt)}function et(rt){const nt=c(rt);if(nt)return nt;const at=mergeClassList(rt,o);return h(rt,at),at}return function(){return d(twJoin.apply(null,arguments))}}const fromTheme=e=>{const a=o=>o[e]||[];return a.isThemeGetter=!0,a},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength=e=>isNumber$3(e)||stringLengths.has(e)||fractionRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,"length",isLengthOnly),isNumber$3=e=>!!e&&!Number.isNaN(Number(e)),isArbitraryNumber=e=>getIsArbitraryValue(e,"number",isNumber$3),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$3(e.slice(0,-1)),isArbitraryValue=e=>arbitraryValueRegex.test(e),isTshirtSize=e=>tshirtUnitRegex.test(e),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=e=>getIsArbitraryValue(e,sizeLabels,isNever),isArbitraryPosition=e=>getIsArbitraryValue(e,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=e=>getIsArbitraryValue(e,imageLabels,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(e,a,o)=>{const c=arbitraryValueRegex.exec(e);return c?c[1]?typeof a=="string"?c[1]===a:a.has(c[1]):o(c[2]):!1},isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),getDefaultConfig=()=>{const e=fromTheme("colors"),a=fromTheme("spacing"),o=fromTheme("blur"),c=fromTheme("brightness"),h=fromTheme("borderColor"),d=fromTheme("borderRadius"),j=fromTheme("borderSpacing"),et=fromTheme("borderWidth"),rt=fromTheme("contrast"),nt=fromTheme("grayscale"),at=fromTheme("hueRotate"),ot=fromTheme("invert"),gt=fromTheme("gap"),bt=fromTheme("gradientColorStops"),wt=fromTheme("gradientColorStopPositions"),$t=fromTheme("inset"),St=fromTheme("margin"),Et=fromTheme("opacity"),_t=fromTheme("padding"),At=fromTheme("saturate"),Bt=fromTheme("scale"),kt=fromTheme("sepia"),jt=fromTheme("skew"),zt=fromTheme("space"),Xt=fromTheme("translate"),Wt=()=>["auto","contain","none"],ir=()=>["auto","hidden","clip","visible","scroll"],mt=()=>["auto",isArbitraryValue,a],$=()=>[isArbitraryValue,a],tt=()=>["",isLength,isArbitraryLength],it=()=>["auto",isNumber$3,isArbitraryValue],st=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ct=()=>["solid","dashed","dotted","double","none"],pt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],vt=()=>["start","end","center","between","around","evenly","stretch"],lt=()=>["","0",isArbitraryValue],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],dt=()=>[isNumber$3,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:dt(),borderColor:[e],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:$(),borderWidth:tt(),contrast:dt(),grayscale:lt(),hueRotate:dt(),invert:lt(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:mt(),margin:mt(),opacity:dt(),padding:$(),saturate:dt(),scale:dt(),sepia:lt(),skew:dt(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...st(),isArbitraryValue]}],overflow:[{overflow:ir()}],"overflow-x":[{"overflow-x":ir()}],"overflow-y":[{"overflow-y":ir()}],overscroll:[{overscroll:Wt()}],"overscroll-x":[{"overscroll-x":Wt()}],"overscroll-y":[{"overscroll-y":Wt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[$t]}],"inset-x":[{"inset-x":[$t]}],"inset-y":[{"inset-y":[$t]}],start:[{start:[$t]}],end:[{end:[$t]}],top:[{top:[$t]}],right:[{right:[$t]}],bottom:[{bottom:[$t]}],left:[{left:[$t]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:mt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:lt()}],shrink:[{shrink:lt()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":it()}],"col-end":[{"col-end":it()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":it()}],"row-end":[{"row-end":it()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[gt]}],"gap-x":[{"gap-x":[gt]}],"gap-y":[{"gap-y":[gt]}],"justify-content":[{justify:["normal",...vt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...vt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...vt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_t]}],px:[{px:[_t]}],py:[{py:[_t]}],ps:[{ps:[_t]}],pe:[{pe:[_t]}],pt:[{pt:[_t]}],pr:[{pr:[_t]}],pb:[{pb:[_t]}],pl:[{pl:[_t]}],m:[{m:[St]}],mx:[{mx:[St]}],my:[{my:[St]}],ms:[{ms:[St]}],me:[{me:[St]}],mt:[{mt:[St]}],mr:[{mr:[St]}],mb:[{mb:[St]}],ml:[{ml:[St]}],"space-x":[{"space-x":[zt]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[zt]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,a]}],"min-w":[{"min-w":[isArbitraryValue,a,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,a,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,a,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$3,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[Et]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[Et]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Et]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...st(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[wt]}],"gradient-via-pos":[{via:[wt]}],"gradient-to-pos":[{to:[wt]}],"gradient-from":[{from:[bt]}],"gradient-via":[{via:[bt]}],"gradient-to":[{to:[bt]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[et]}],"border-w-x":[{"border-x":[et]}],"border-w-y":[{"border-y":[et]}],"border-w-s":[{"border-s":[et]}],"border-w-e":[{"border-e":[et]}],"border-w-t":[{"border-t":[et]}],"border-w-r":[{"border-r":[et]}],"border-w-b":[{"border-b":[et]}],"border-w-l":[{"border-l":[et]}],"border-opacity":[{"border-opacity":[Et]}],"border-style":[{border:[...ct(),"hidden"]}],"divide-x":[{"divide-x":[et]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[et]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Et]}],"divide-style":[{divide:ct()}],"border-color":[{border:[h]}],"border-color-x":[{"border-x":[h]}],"border-color-y":[{"border-y":[h]}],"border-color-t":[{"border-t":[h]}],"border-color-r":[{"border-r":[h]}],"border-color-b":[{"border-b":[h]}],"border-color-l":[{"border-l":[h]}],"divide-color":[{divide:[h]}],"outline-style":[{outline:["",...ct()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:tt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[Et]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[Et]}],"mix-blend":[{"mix-blend":[...pt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pt()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[c]}],contrast:[{contrast:[rt]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[nt]}],"hue-rotate":[{"hue-rotate":[at]}],invert:[{invert:[ot]}],saturate:[{saturate:[At]}],sepia:[{sepia:[kt]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[rt]}],"backdrop-grayscale":[{"backdrop-grayscale":[nt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[at]}],"backdrop-invert":[{"backdrop-invert":[ot]}],"backdrop-opacity":[{"backdrop-opacity":[Et]}],"backdrop-saturate":[{"backdrop-saturate":[At]}],"backdrop-sepia":[{"backdrop-sepia":[kt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[j]}],"border-spacing-x":[{"border-spacing-x":[j]}],"border-spacing-y":[{"border-spacing-y":[j]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:dt()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:dt()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Bt]}],"scale-x":[{"scale-x":[Bt]}],"scale-y":[{"scale-y":[Bt]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[Xt]}],"translate-y":[{"translate-y":[Xt]}],"skew-x":[{"skew-x":[jt]}],"skew-y":[{"skew-y":[jt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig);function cn(...e){return twMerge(clsx(e))}const buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({className:e,variant:a,size:o,asChild:c=!1,...h},d)=>{const j=c?Slot:"button";return jsxRuntimeExports.jsx(j,{className:cn(buttonVariants({variant:a,size:o,className:e})),ref:d,...h})});Button.displayName="Button";var dist$1={},sdk={};(function(){var e={},a="";try{a=location.hash.toString()}catch{}var o=rt(a),c=Et("initParams");if(c)for(var h in c)typeof o[h]>"u"&&(o[h]=c[h]);St("initParams",o);var d=!1,j;try{if(d=window.parent!=null&&window!=window.parent,d){window.addEventListener("message",function(_t){if(_t.source===window.parent){try{var At=JSON.parse(_t.data)}catch{return}if(!(!At||!At.eventType))if(At.eventType=="set_custom_style")_t.origin==="https://web.telegram.org"&&(j.innerHTML=At.eventData);else if(At.eventType=="reload_iframe"){try{window.parent.postMessage(JSON.stringify({eventType:"iframe_will_reload"}),"*")}catch{}location.reload()}else gt(At.eventType,At.eventData)}}),j=document.createElement("style"),document.head.appendChild(j);try{window.parent.postMessage(JSON.stringify({eventType:"iframe_ready",eventData:{reload_supported:!0}}),"*")}catch{}}}catch{}function et(_t){try{return _t=_t.replace(/\+/g,"%20"),decodeURIComponent(_t)}catch{return _t}}function rt(_t){_t=_t.replace(/^#/,"");var At={};if(!_t.length)return At;if(_t.indexOf("=")<0&&_t.indexOf("?")<0)return At._path=et(_t),At;var Bt=_t.indexOf("?");if(Bt>=0){var kt=_t.substr(0,Bt);At._path=et(kt),_t=_t.substr(Bt+1)}var jt=nt(_t);for(var zt in jt)At[zt]=jt[zt];return At}function nt(_t){var At={};if(!_t.length)return At;var Bt=_t.split("&"),kt,jt,zt,Xt;for(kt=0;kt=0?_t+"&"+At:kt.length>0?_t+"?"+At:_t+At}function ot(_t,At,Bt){if(At||(At=function(){}),Bt===void 0&&(Bt=""),console.log("[Telegram.WebView] > postEvent",_t,Bt),window.TelegramWebviewProxy!==void 0)TelegramWebviewProxy.postEvent(_t,JSON.stringify(Bt)),At();else if(window.external&&"notify"in window.external)window.external.notify(JSON.stringify({eventType:_t,eventData:Bt})),At();else if(d)try{var kt="https://web.telegram.org";kt="*",window.parent.postMessage(JSON.stringify({eventType:_t,eventData:Bt}),kt),At()}catch(jt){At(jt)}else At({notAvailable:!0})}function gt(_t,At){console.log("[Telegram.WebView] < receiveEvent",_t,At),bt(_t,function(Bt){Bt(_t,At)})}function bt(_t,At){var Bt=e[_t];if(!(Bt===void 0||!Bt.length))for(var kt=0;ktrn?1:-1;return 0}function cr(Qt){return Rr(nt,Qt)>=0}function xr(Qt){if(window.Blob)try{return new Blob([Qt]).size}catch{}for(var Yt=Qt.length,gr=Qt.length-1;gr>=0;gr--){var ur=Qt.charCodeAt(gr);ur>127&&ur<=2047?Yt++:ur>2047&&ur<=65535&&(Yt+=2),ur>=56320&&ur<=57343&&gr--}return Yt}var Jr=function(){var Qt=!1,Yt={};Object.defineProperty(Yt,"isVisible",{set:function(Sr){an({is_visible:Sr})},get:function(){return Qt},enumerable:!0});var gr=null;a.onEvent("back_button_pressed",ur);function ur(){kt("backButtonClicked")}function br(){return{is_visible:Qt}}function rn(Sr){return typeof Sr>"u"&&(Sr=br()),JSON.stringify(Sr)}function wr(){return cr("6.1")?!0:(console.warn("[Telegram.WebApp] BackButton is not supported in version "+nt),!1)}function Ir(){var Sr=br(),Pr=rn(Sr);gr!==Pr&&(gr=Pr,a.postEvent("web_app_setup_back_button",!1,Sr))}function an(Sr){return wr()&&(typeof Sr.is_visible<"u"&&(Qt=!!Sr.is_visible),Ir()),Yt}return Yt.onClick=function(Sr){return wr()&&jt("backButtonClicked",Sr),Yt},Yt.offClick=function(Sr){return wr()&&zt("backButtonClicked",Sr),Yt},Yt.show=function(){return an({is_visible:!0})},Yt.hide=function(){return an({is_visible:!1})},Yt}(),Ar=0,lr=function(){var Qt=!1,Yt=!0,gr=!1,ur="CONTINUE",br=!1,rn=!1,wr={};Object.defineProperty(wr,"text",{set:function(Zr){wr.setParams({text:Zr})},get:function(){return ur},enumerable:!0}),Object.defineProperty(wr,"color",{set:function(Zr){wr.setParams({color:Zr})},get:function(){return br||et.button_color||"#2481cc"},enumerable:!0}),Object.defineProperty(wr,"textColor",{set:function(Zr){wr.setParams({text_color:Zr})},get:function(){return rn||et.button_text_color||"#ffffff"},enumerable:!0}),Object.defineProperty(wr,"isVisible",{set:function(Zr){wr.setParams({is_visible:Zr})},get:function(){return Qt},enumerable:!0}),Object.defineProperty(wr,"isProgressVisible",{get:function(){return gr},enumerable:!0}),Object.defineProperty(wr,"isActive",{set:function(Zr){wr.setParams({is_active:Zr})},get:function(){return Yt},enumerable:!0});var Ir=null;a.onEvent("main_button_pressed",pn);var an=null,Sr={};if(o.tgWebAppDebug){an=document.createElement("tg-main-button"),Sr={font:"600 14px/18px sans-serif",display:"none",width:"100%",height:"48px",borderRadius:"0",background:"no-repeat right center",position:"fixed",left:"0",right:"0",bottom:"0",margin:"0",padding:"15px 20px",textAlign:"center",boxSizing:"border-box",zIndex:"10000"};for(var Pr in Sr)an.style[Pr]=Sr[Pr];document.addEventListener("DOMContentLoaded",function Zr(Tr){document.removeEventListener("DOMContentLoaded",Zr),document.body.appendChild(an),an.addEventListener("click",pn,!1)})}function pn(){Yt&&kt("mainButtonClicked")}function Lr(){var Zr=wr.color,Tr=wr.textColor;return Qt?{is_visible:!0,is_active:Yt,is_progress_visible:gr,text:ur,color:Zr,text_color:Tr}:{is_visible:!1}}function Wr(Zr){return typeof Zr>"u"&&(Zr=Lr()),JSON.stringify(Zr)}function gn(){var Zr=Lr(),Tr=Wr(Zr);Ir!==Tr&&(Ir=Tr,a.postEvent("web_app_setup_main_button",!1,Zr),o.tgWebAppDebug&&kr(Zr))}function kr(Zr){Zr.is_visible?(an.style.display="block",Ar=48,an.style.opacity=Zr.is_active?"1":"0.8",an.style.cursor=Zr.is_active?"pointer":"auto",an.disabled=!Zr.is_active,an.innerText=Zr.text,an.style.backgroundImage=Zr.is_progress_visible?"url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewport%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%3Ccircle%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%20stroke-dashoffset%3D%22106%22%20r%3D%229%22%20stroke-dasharray%3D%2256.52%22%20rotate%3D%22-90%22%3E%3Canimate%20attributeName%3D%22stroke-dashoffset%22%20attributeType%3D%22XML%22%20dur%3D%22360s%22%20from%3D%220%22%20to%3D%2212500%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3CanimateTransform%20attributeName%3D%22transform%22%20attributeType%3D%22XML%22%20type%3D%22rotate%22%20dur%3D%221s%22%20from%3D%22-90%2024%2024%22%20to%3D%22630%2024%2024%22%20repeatCount%3D%22indefinite%22%3E%3C%2FanimateTransform%3E%3C%2Fcircle%3E%3C%2Fsvg%3E')":"none",an.style.backgroundColor=Zr.color,an.style.color=Zr.text_color):(an.style.display="none",Ar=0),document.documentElement&&(document.documentElement.style.boxSizing="border-box",document.documentElement.style.paddingBottom=Ar+"px"),st()}function jr(Zr){if(typeof Zr.text<"u"){var Tr=Bt(Zr.text);if(!Tr.length)throw console.error("[Telegram.WebApp] Main button text is required",Zr.text),Error("WebAppMainButtonParamInvalid");if(Tr.length>64)throw console.error("[Telegram.WebApp] Main button text is too long",Tr),Error("WebAppMainButtonParamInvalid");ur=Tr}if(typeof Zr.color<"u")if(Zr.color===!1||Zr.color===null)br=!1;else{var Fr=Ft(Zr.color);if(!Fr)throw console.error("[Telegram.WebApp] Main button color format is invalid",Zr.color),Error("WebAppMainButtonParamInvalid");br=Fr}if(typeof Zr.text_color<"u")if(Zr.text_color===!1||Zr.text_color===null)rn=!1;else{var dn=Ft(Zr.text_color);if(!dn)throw console.error("[Telegram.WebApp] Main button text color format is invalid",Zr.text_color),Error("WebAppMainButtonParamInvalid");rn=dn}if(typeof Zr.is_visible<"u"){if(Zr.is_visible&&!wr.text.length)throw console.error("[Telegram.WebApp] Main button text is required"),Error("WebAppMainButtonParamInvalid");Qt=!!Zr.is_visible}return typeof Zr.is_active<"u"&&(Yt=!!Zr.is_active),gn(),wr}return wr.setText=function(Zr){return wr.setParams({text:Zr})},wr.onClick=function(Zr){return jt("mainButtonClicked",Zr),wr},wr.offClick=function(Zr){return zt("mainButtonClicked",Zr),wr},wr.show=function(){return wr.setParams({is_visible:!0})},wr.hide=function(){return wr.setParams({is_visible:!1})},wr.enable=function(){return wr.setParams({is_active:!0})},wr.disable=function(){return wr.setParams({is_active:!1})},wr.showProgress=function(Zr){return Yt=!!Zr,gr=!0,gn(),wr},wr.hideProgress=function(){return wr.isActive||(Yt=!0),gr=!1,gn(),wr},wr.setParams=jr,wr}(),un=function(){var Qt=!1,Yt={};Object.defineProperty(Yt,"isVisible",{set:function(Sr){an({is_visible:Sr})},get:function(){return Qt},enumerable:!0});var gr=null;a.onEvent("settings_button_pressed",ur);function ur(){kt("settingsButtonClicked")}function br(){return{is_visible:Qt}}function rn(Sr){return typeof Sr>"u"&&(Sr=br()),JSON.stringify(Sr)}function wr(){return cr("6.10")?!0:(console.warn("[Telegram.WebApp] SettingsButton is not supported in version "+nt),!1)}function Ir(){var Sr=br(),Pr=rn(Sr);gr!==Pr&&(gr=Pr,a.postEvent("web_app_setup_settings_button",!1,Sr))}function an(Sr){return wr()&&(typeof Sr.is_visible<"u"&&(Qt=!!Sr.is_visible),Ir()),Yt}return Yt.onClick=function(Sr){return wr()&&jt("settingsButtonClicked",Sr),Yt},Yt.offClick=function(Sr){return wr()&&zt("settingsButtonClicked",Sr),Yt},Yt.show=function(){return an({is_visible:!0})},Yt.hide=function(){return an({is_visible:!1})},Yt}(),Cr=function(){var Qt={};function Yt(gr){if(!cr("6.1"))return console.warn("[Telegram.WebApp] HapticFeedback is not supported in version "+nt),Qt;if(gr.type=="impact"){if(gr.impact_style!="light"&&gr.impact_style!="medium"&&gr.impact_style!="heavy"&&gr.impact_style!="rigid"&&gr.impact_style!="soft")throw console.error("[Telegram.WebApp] Haptic impact style is invalid",gr.impact_style),Error("WebAppHapticImpactStyleInvalid")}else if(gr.type=="notification"){if(gr.notification_type!="error"&&gr.notification_type!="success"&&gr.notification_type!="warning")throw console.error("[Telegram.WebApp] Haptic notification type is invalid",gr.notification_type),Error("WebAppHapticNotificationTypeInvalid")}else if(gr.type!="selection_change")throw console.error("[Telegram.WebApp] Haptic feedback type is invalid",gr.type),Error("WebAppHapticFeedbackTypeInvalid");return a.postEvent("web_app_trigger_haptic_feedback",!1,gr),Qt}return Qt.impactOccurred=function(gr){return Yt({type:"impact",impact_style:gr})},Qt.notificationOccurred=function(gr){return Yt({type:"notification",notification_type:gr})},Qt.selectionChanged=function(){return Yt({type:"selection_change"})},Qt}(),Or=function(){var Qt={};function Yt(gr,ur,br){if(!cr("6.9"))throw console.error("[Telegram.WebApp] CloudStorage is not supported in version "+nt),Error("WebAppMethodUnsupported");return sn(gr,ur,br),Qt}return Qt.setItem=function(gr,ur,br){return Yt("saveStorageValue",{key:gr,value:ur},br)},Qt.getItem=function(gr,ur){return Qt.getItems([gr],ur?function(br,rn){br?ur(br):ur(null,rn[gr])}:null)},Qt.getItems=function(gr,ur){return Yt("getStorageValues",{keys:gr},ur)},Qt.removeItem=function(gr,ur){return Qt.removeItems([gr],ur)},Qt.removeItems=function(gr,ur){return Yt("deleteStorageValues",{keys:gr},ur)},Qt.getKeys=function(gr){return Yt("getStorageKeys",{},gr)},Qt}(),fn=function(){var Qt=!1,Yt=!1,gr="unknown",ur=!1,br=!1,rn=!1,wr="",Ir={};Object.defineProperty(Ir,"isInited",{get:function(){return Qt},enumerable:!0}),Object.defineProperty(Ir,"isBiometricAvailable",{get:function(){return Qt&&Yt},enumerable:!0}),Object.defineProperty(Ir,"biometricType",{get:function(){return gr||"unknown"},enumerable:!0}),Object.defineProperty(Ir,"isAccessRequested",{get:function(){return ur},enumerable:!0}),Object.defineProperty(Ir,"isAccessGranted",{get:function(){return ur&&br},enumerable:!0}),Object.defineProperty(Ir,"isBiometricTokenSaved",{get:function(){return rn},enumerable:!0}),Object.defineProperty(Ir,"deviceId",{get:function(){return wr||""},enumerable:!0});var an={callbacks:[]},Sr=!1,Pr=!1,pn=!1;a.onEvent("biometry_info_received",Lr),a.onEvent("biometry_auth_requested",Wr),a.onEvent("biometry_token_updated",gn);function Lr(Zr,Tr){if(Qt=!0,Tr.available?(Yt=!0,gr=Tr.type||"unknown",Tr.access_requested?(ur=!0,br=!!Tr.access_granted,rn=!!Tr.token_saved):(ur=!1,br=!1,rn=!1)):(Yt=!1,gr="unknown",ur=!1,br=!1,rn=!1),wr=Tr.device_id||"",an.callbacks.length>0)for(var Fr=0;Fr128)throw console.error("[Telegram.WebApp] Biometric reason is too long",dn),Error("WebAppBiometricRequestAccessParamInvalid");dn.length>0&&(Fr.reason=dn)}return Sr={callback:Tr},a.postEvent("web_app_biometry_request_access",!1,Fr),Ir},Ir.authenticate=function(Zr,Tr){if(!kr())return Ir;if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!br)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(Pr)throw console.error("[Telegram.WebApp] Authentication request is already in progress."),Error("WebAppBiometricManagerAuthenticationRequested");var Fr={};if(typeof Zr.reason<"u"){var dn=Bt(Zr.reason);if(dn.length>128)throw console.error("[Telegram.WebApp] Biometric reason is too long",dn),Error("WebAppBiometricRequestAccessParamInvalid");dn.length>0&&(Fr.reason=dn)}return Pr={callback:Tr},a.postEvent("web_app_biometry_request_auth",!1,Fr),Ir},Ir.updateBiometricToken=function(Zr,Tr){if(!kr())return Ir;if(Zr=Zr||"",Zr.length>1024)throw console.error("[Telegram.WebApp] Token is too long",Zr),Error("WebAppBiometricManagerTokenInvalid");if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!br)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(pn)throw console.error("[Telegram.WebApp] Token request is already in progress."),Error("WebAppBiometricManagerTokenUpdateRequested");return pn={callback:Tr},a.postEvent("web_app_biometry_update_token",!1,{token:Zr}),Ir},Ir.openSettings=function(){if(!kr())return Ir;if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!ur)throw console.error("[Telegram.WebApp] Biometric access was not requested yet."),Error("WebAppBiometricManagerBiometricsAccessNotRequested");return br?(console.warn("[Telegram.WebApp] Biometric access was granted by the user, no need to go to settings."),Ir):(a.postEvent("web_app_biometry_open_settings",!1),Ir)},Ir}(),Jt={};function or(Qt,Yt){if(Yt.slug&&Jt[Yt.slug]){var gr=Jt[Yt.slug];delete Jt[Yt.slug],gr.callback&&gr.callback(Yt.status),kt("invoiceClosed",{url:gr.url,status:Yt.status})}}var Vr=!1;function vr(Qt,Yt){if(Vr){var gr=Vr;Vr=!1;var ur=null;typeof Yt.button_id<"u"&&(ur=Yt.button_id),gr.callback&&gr.callback(ur),kt("popupClosed",{button_id:ur})}}var yr=!1;function nn(Qt,Yt){if(yr){var gr=yr,ur=null;typeof Yt.data<"u"&&(ur=Yt.data),gr.callback&&gr.callback(ur)&&(yr=!1,a.postEvent("web_app_close_scan_qr_popup",!1)),kt("qrTextReceived",{data:ur})}}function Ut(Qt,Yt){yr=!1,kt("scanQrPopupClosed")}function Tt(Qt,Yt){if(Yt.req_id&&ir[Yt.req_id]){var gr=ir[Yt.req_id];delete ir[Yt.req_id];var ur=null;typeof Yt.data<"u"&&(ur=Yt.data),gr.callback&&gr.callback(ur),kt("clipboardTextReceived",{data:ur})}}var Ot=!1;function qt(Qt,Yt){if(Ot){var gr=Ot;Ot=!1,gr.callback&&gr.callback(Yt.status=="allowed"),kt("writeAccessRequested",{status:Yt.status})}}function tr(Qt,Yt){var gr,ur,br=0,rn=function(){sn("getRequestedContact",{},function(Ir,an){an&&an.length?(clearTimeout(ur),Qt(an)):(br+=50,gr=setTimeout(rn,br))})},wr=function(){clearTimeout(gr),Qt("")};ur=setTimeout(wr,Yt),rn()}var Er=!1;function fr(Qt,Yt){if(Er){var gr=Er;Er=!1;var ur=Yt.status=="sent",br={status:Yt.status};ur?tr(function(rn){if(rn&&rn.length){br.response=rn,br.responseUnsafe=e.urlParseQueryString(rn);for(var wr in br.responseUnsafe){var Ir=br.responseUnsafe[wr];try{(Ir.substr(0,1)=="{"&&Ir.substr(-1)=="}"||Ir.substr(0,1)=="["&&Ir.substr(-1)=="]")&&(br.responseUnsafe[wr]=JSON.parse(Ir))}catch{}}}gr.callback&&gr.callback(ur,br),kt("contactRequested",br)},3e3):(gr.callback&&gr.callback(ur,br),kt("contactRequested",br))}}function Br(Qt,Yt){if(Yt.req_id&&ir[Yt.req_id]){var gr=ir[Yt.req_id];delete ir[Yt.req_id];var ur=null,br=null;typeof Yt.result<"u"&&(ur=Yt.result),typeof Yt.error<"u"&&(br=Yt.error),gr.callback&&gr.callback(br,ur)}}function sn(Qt,Yt,gr){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method invokeCustomMethod is not supported in version "+nt),Error("WebAppMethodUnsupported");var ur=mt(16),br={req_id:ur,method:Qt,params:Yt||{}};ir[ur]={callback:gr},a.postEvent("web_app_invoke_custom_method",!1,br)}window.Telegram||(window.Telegram={}),Object.defineProperty(h,"initData",{get:function(){return d},enumerable:!0}),Object.defineProperty(h,"initDataUnsafe",{get:function(){return j},enumerable:!0}),Object.defineProperty(h,"version",{get:function(){return nt},enumerable:!0}),Object.defineProperty(h,"platform",{get:function(){return at},enumerable:!0}),Object.defineProperty(h,"colorScheme",{get:function(){return rt},enumerable:!0}),Object.defineProperty(h,"themeParams",{get:function(){return et},enumerable:!0}),Object.defineProperty(h,"isExpanded",{get:function(){return it},enumerable:!0}),Object.defineProperty(h,"viewportHeight",{get:function(){return($===!1?window.innerHeight:$)-Ar},enumerable:!0}),Object.defineProperty(h,"viewportStableHeight",{get:function(){return(tt===!1?window.innerHeight:tt)-Ar},enumerable:!0}),Object.defineProperty(h,"isClosingConfirmationEnabled",{set:function(Qt){pt(Qt)},get:function(){return ct},enumerable:!0}),Object.defineProperty(h,"isVerticalSwipesEnabled",{set:function(Qt){lt(Qt)},get:function(){return vt},enumerable:!0}),Object.defineProperty(h,"headerColor",{set:function(Qt){Mt(Qt)},get:function(){return xt()},enumerable:!0}),Object.defineProperty(h,"backgroundColor",{set:function(Qt){Ht(Qt)},get:function(){return Dt()},enumerable:!0}),Object.defineProperty(h,"BackButton",{value:Jr,enumerable:!0}),Object.defineProperty(h,"MainButton",{value:lr,enumerable:!0}),Object.defineProperty(h,"SettingsButton",{value:un,enumerable:!0}),Object.defineProperty(h,"HapticFeedback",{value:Cr,enumerable:!0}),Object.defineProperty(h,"CloudStorage",{value:Or,enumerable:!0}),Object.defineProperty(h,"BiometricManager",{value:fn,enumerable:!0}),h.setHeaderColor=function(Qt){h.headerColor=Qt},h.setBackgroundColor=function(Qt){h.backgroundColor=Qt},h.enableClosingConfirmation=function(){h.isClosingConfirmationEnabled=!0},h.disableClosingConfirmation=function(){h.isClosingConfirmationEnabled=!1},h.enableVerticalSwipes=function(){h.isVerticalSwipesEnabled=!0},h.disableVerticalSwipes=function(){h.isVerticalSwipesEnabled=!1},h.isVersionAtLeast=function(Qt){return cr(Qt)},h.onEvent=function(Qt,Yt){jt(Qt,Yt)},h.offEvent=function(Qt,Yt){zt(Qt,Yt)},h.sendData=function(Qt){if(!Qt||!Qt.length)throw console.error("[Telegram.WebApp] Data is required",Qt),Error("WebAppDataInvalid");if(xr(Qt)>4096)throw console.error("[Telegram.WebApp] Data is too long",Qt),Error("WebAppDataInvalid");a.postEvent("web_app_data_send",!1,{data:Qt})},h.switchInlineQuery=function(Qt,Yt){if(!cr("6.6"))throw console.error("[Telegram.WebApp] Method switchInlineQuery is not supported in version "+nt),Error("WebAppMethodUnsupported");if(!o.tgWebAppBotInline)throw console.error("[Telegram.WebApp] Inline mode is disabled for this bot. Read more about inline mode: https://core.telegram.org/bots/inline"),Error("WebAppInlineModeDisabled");if(Qt=Qt||"",Qt.length>256)throw console.error("[Telegram.WebApp] Inline query is too long",Qt),Error("WebAppInlineQueryInvalid");var gr=[];if(Yt){if(!Array.isArray(Yt))throw console.error("[Telegram.WebApp] Choose chat types should be an array",Yt),Error("WebAppInlineChooseChatTypesInvalid");for(var ur={users:1,bots:1,groups:1,channels:1},br=0;br64)throw console.error("[Telegram.WebApp] Popup title is too long",gr),Error("WebAppPopupParamInvalid");gr.length>0&&(rn.title=gr)}if(typeof Qt.message<"u"&&(ur=Bt(Qt.message)),!ur.length)throw console.error("[Telegram.WebApp] Popup message is required",Qt.message),Error("WebAppPopupParamInvalid");if(ur.length>256)throw console.error("[Telegram.WebApp] Popup message is too long",ur),Error("WebAppPopupParamInvalid");if(rn.message=ur,typeof Qt.buttons<"u"){if(!Array.isArray(Qt.buttons))throw console.error("[Telegram.WebApp] Popup buttons should be an array",Qt.buttons),Error("WebAppPopupParamInvalid");for(var wr=0;wr64))throw console.error("[Telegram.WebApp] Popup button id is too long",Sr),Error("WebAppPopupParamInvalid");an.id=Sr;var Pr=Ir.type;if(typeof Pr>"u"&&(Pr="default"),an.type=Pr,!(Pr=="ok"||Pr=="close"||Pr=="cancel"))if(Pr=="default"||Pr=="destructive"){var pn="";if(typeof Ir.text<"u"&&(pn=Bt(Ir.text)),!pn.length)throw console.error("[Telegram.WebApp] Popup button text is required for type "+Pr,Ir.text),Error("WebAppPopupParamInvalid");if(pn.length>64)throw console.error("[Telegram.WebApp] Popup button text is too long",pn),Error("WebAppPopupParamInvalid");an.text=pn}else throw console.error("[Telegram.WebApp] Popup button type is invalid",Pr),Error("WebAppPopupParamInvalid");br.push(an)}}else br.push({id:"",type:"close"});if(br.length<1)throw console.error("[Telegram.WebApp] Popup should have at least one button"),Error("WebAppPopupParamInvalid");if(br.length>3)throw console.error("[Telegram.WebApp] Popup should not have more than 3 buttons"),Error("WebAppPopupParamInvalid");rn.buttons=br,Vr={callback:Yt},a.postEvent("web_app_open_popup",!1,rn)},h.showAlert=function(Qt,Yt){h.showPopup({message:Qt},Yt?function(){Yt()}:null)},h.showConfirm=function(Qt,Yt){h.showPopup({message:Qt,buttons:[{type:"ok",id:"ok"},{type:"cancel"}]},Yt?function(gr){Yt(gr=="ok")}:null)},h.showScanQrPopup=function(Qt,Yt){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method showScanQrPopup is not supported in version "+nt),Error("WebAppMethodUnsupported");if(yr)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppScanQrPopupOpened");var gr="",ur={};if(typeof Qt.text<"u"){if(gr=Bt(Qt.text),gr.length>64)throw console.error("[Telegram.WebApp] Scan QR popup text is too long",gr),Error("WebAppScanQrPopupParamInvalid");gr.length>0&&(ur.text=gr)}yr={callback:Yt},a.postEvent("web_app_open_scan_qr_popup",!1,ur)},h.closeScanQrPopup=function(){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method closeScanQrPopup is not supported in version "+nt),Error("WebAppMethodUnsupported");yr=!1,a.postEvent("web_app_close_scan_qr_popup",!1)},h.readTextFromClipboard=function(Qt){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method readTextFromClipboard is not supported in version "+nt),Error("WebAppMethodUnsupported");var Yt=mt(16),gr={req_id:Yt};ir[Yt]={callback:Qt},a.postEvent("web_app_read_text_from_clipboard",!1,gr)},h.requestWriteAccess=function(Qt){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method requestWriteAccess is not supported in version "+nt),Error("WebAppMethodUnsupported");if(Ot)throw console.error("[Telegram.WebApp] Write access is already requested"),Error("WebAppWriteAccessRequested");Ot={callback:Qt},a.postEvent("web_app_request_write_access")},h.requestContact=function(Qt){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method requestContact is not supported in version "+nt),Error("WebAppMethodUnsupported");if(Er)throw console.error("[Telegram.WebApp] Contact is already requested"),Error("WebAppContactRequested");Er={callback:Qt},a.postEvent("web_app_request_phone")},h.shareToStory=function(Qt,Yt){if(Yt=Yt||{},!cr("7.8"))throw console.error("[Telegram.WebApp] Method shareToStory is not supported in version "+nt),Error("WebAppMethodUnsupported");var gr=document.createElement("A");if(gr.href=Qt,gr.protocol!="http:"&&gr.protocol!="https:")throw console.error("[Telegram.WebApp] Media url protocol is not supported",url),Error("WebAppMediaUrlInvalid");var ur={};if(ur.media_url=gr.href,typeof Yt.text<"u"){var br=Bt(Yt.text);if(br.length>2048)throw console.error("[Telegram.WebApp] Text is too long",br),Error("WebAppShareToStoryParamInvalid");br.length>0&&(ur.text=br)}if(typeof Yt.widget_link<"u"){if(Yt.widget_link=Yt.widget_link||{},gr.href=Yt.widget_link.url,gr.protocol!="http:"&&gr.protocol!="https:")throw console.error("[Telegram.WebApp] Link protocol is not supported",url),Error("WebAppShareToStoryParamInvalid");var rn={url:gr.href};if(typeof Yt.widget_link.name<"u"){var wr=Bt(Yt.widget_link.name);if(wr.length>48)throw console.error("[Telegram.WebApp] Link name is too long",wr),Error("WebAppShareToStoryParamInvalid");wr.length>0&&(rn.name=wr)}ur.widget_link=rn}a.postEvent("web_app_share_to_story",!1,ur)},h.invokeCustomMethod=function(Qt,Yt,gr){sn(Qt,Yt,gr)},h.ready=function(){a.postEvent("web_app_ready")},h.expand=function(){a.postEvent("web_app_expand")},h.close=function(Qt){Qt=Qt||{};var Yt={};cr("7.6")&&Qt.return_back&&(Yt.return_back=!0),a.postEvent("web_app_close",!1,Yt)},window.Telegram.WebApp=h,Nt(),Vt(),st(),o.tgWebAppShowSettings&&un.show(),window.addEventListener("resize",_t),c&&document.addEventListener("click",At),a.onEvent("theme_changed",$t),a.onEvent("viewport_changed",Et),a.onEvent("invoice_closed",or),a.onEvent("popup_closed",vr),a.onEvent("qr_text_received",nn),a.onEvent("scan_qr_popup_closed",Ut),a.onEvent("clipboard_text_received",Tt),a.onEvent("write_access_requested",qt),a.onEvent("phone_requested",fr),a.onEvent("custom_method_invoked",Br),a.postEvent("web_app_request_theme"),a.postEvent("web_app_request_viewport")})();Object.defineProperty(sdk,"__esModule",{value:!0});sdk.WebApp=void 0;var telegramWindow=window;sdk.WebApp=telegramWindow.Telegram.WebApp;Object.defineProperty(dist$1,"__esModule",{value:!0});var sdk_1=sdk,_default=dist$1.default=sdk_1.WebApp;const telegramCloudStorage={setItem:(e,a,o)=>{_default.CloudStorage.setItem(e,a,o)},getItem:(e,a)=>{_default.CloudStorage.getItem(e,a)},getItems:(e,a)=>{_default.CloudStorage.getItems(e,a)},getKeys:e=>{_default.CloudStorage.getKeys(e)},removeItem:(e,a)=>{_default.CloudStorage.removeItem(e,a)},removeItems:(e,a)=>{_default.CloudStorage.removeItems(e,a)}},INITIAL_CHUNK_COUNT=32,MAX_RETRIES=256,storeWithChunking=async(e,a,o,c)=>{const h=(j,et)=>new Promise((rt,nt)=>{telegramCloudStorage.setItem(j,et,at=>{at?nt(at):rt()})}),d=async(j,et,rt=0)=>{if(rt>MAX_RETRIES)throw new Error(`Failed to store after ${MAX_RETRIES} splitting attempts`);const nt=[];if(await Promise.all(et.map(async(ot,gt)=>{const bt=`${j}_chunk_${gt}`;try{await h(bt,ot)}catch{nt.push({index:gt,value:ot})}})),nt.length===0)return et.length;const at=et.filter((ot,gt)=>!nt.some(bt=>bt.index===gt));for(const{value:ot}of nt){const gt=Math.ceil(ot.length/2);at.push(ot.slice(0,gt),ot.slice(gt))}return d(j,at,rt+1)};try{o(`Storing "${e}"...`);const j=Math.ceil(a.length/INITIAL_CHUNK_COUNT),et=Array.from({length:INITIAL_CHUNK_COUNT},(nt,at)=>a.slice(at*j,(at+1)*j)).filter(nt=>nt.length>0),rt=await d(e,et);return await h(`${e}_meta`,JSON.stringify({totalChunks:rt})),o(`Successfully stored "${e}" in ${rt} chunks`),rt}catch(j){throw c(`Failed to store "${e}": ${j instanceof Error?j.message:String(j)}`),j}},retrieveChunkedData=async(e,a,o)=>{const c=h=>new Promise((d,j)=>{telegramCloudStorage.getItem(h,(et,rt)=>{et?j(et):d(rt)})});try{const h=await c(`${e}_meta`);if(!h)return;const{totalChunks:d}=JSON.parse(h);a(`Retrieving data for "${e}" (${d} chunks)`);const et=(await Promise.all(Array.from({length:d},async(rt,nt)=>await c(`${e}_chunk_${nt}`)||""))).join("");return a(`Successfully retrieved and recombined data for "${e}"`),et}catch(h){throw o(`Failed to retrieve data for "${e}": ${h instanceof Error?h.message:String(h)}`),h}},clearChunkedStorage=async(e,a)=>{try{e("Starting storage clearance...");const o=await new Promise((h,d)=>{telegramCloudStorage.getKeys((j,et)=>{j?d(j):h(et||[])})}),c={};o.forEach(h=>{const d=h.endsWith("_meta")?h.replace("_meta",""):h;c[d]||(c[d]=[]),c[d].push(h)}),await Promise.all(Object.entries(c).map(async([h,d])=>{if(d.includes(`${h}_meta`)){const j=await new Promise((et,rt)=>{telegramCloudStorage.getItem(`${h}_meta`,(nt,at)=>{nt?rt(nt):et(at)})});if(j){const{totalChunks:et}=JSON.parse(j);d.push(...Array.from({length:et},(rt,nt)=>`${h}_chunk_${nt}`))}}await new Promise((j,et)=>{telegramCloudStorage.removeItems(d,rt=>{rt?et(rt):j()})})})),e("Storage cleared successfully")}catch(o){throw a(`Error clearing storage: ${o instanceof Error?o.message:String(o)}`),o}};var buffer$1={},base64Js$1={};base64Js$1.byteLength=byteLength$1;base64Js$1.toByteArray=toByteArray$1;base64Js$1.fromByteArray=fromByteArray$1;var lookup$1=[],revLookup$1=[],Arr$1=typeof Uint8Array<"u"?Uint8Array:Array,code$1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$2=0,len$1=code$1.length;i$20)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");o===-1&&(o=a);var c=o===a?0:4-o%4;return[o,c]}function byteLength$1(e){var a=getLens$1(e),o=a[0],c=a[1];return(o+c)*3/4-c}function _byteLength$1(e,a,o){return(a+o)*3/4-o}function toByteArray$1(e){var a,o=getLens$1(e),c=o[0],h=o[1],d=new Arr$1(_byteLength$1(e,c,h)),j=0,et=h>0?c-4:c,rt;for(rt=0;rt>16&255,d[j++]=a>>8&255,d[j++]=a&255;return h===2&&(a=revLookup$1[e.charCodeAt(rt)]<<2|revLookup$1[e.charCodeAt(rt+1)]>>4,d[j++]=a&255),h===1&&(a=revLookup$1[e.charCodeAt(rt)]<<10|revLookup$1[e.charCodeAt(rt+1)]<<4|revLookup$1[e.charCodeAt(rt+2)]>>2,d[j++]=a>>8&255,d[j++]=a&255),d}function tripletToBase64$1(e){return lookup$1[e>>18&63]+lookup$1[e>>12&63]+lookup$1[e>>6&63]+lookup$1[e&63]}function encodeChunk$1(e,a,o){for(var c,h=[],d=a;det?et:j+d));return c===1?(a=e[o-1],h.push(lookup$1[a>>2]+lookup$1[a<<4&63]+"==")):c===2&&(a=(e[o-2]<<8)+e[o-1],h.push(lookup$1[a>>10]+lookup$1[a>>4&63]+lookup$1[a<<2&63]+"=")),h.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(e,a,o,c,h){var d,j,et=h*8-c-1,rt=(1<>1,at=-7,ot=o?h-1:0,gt=o?-1:1,bt=e[a+ot];for(ot+=gt,d=bt&(1<<-at)-1,bt>>=-at,at+=et;at>0;d=d*256+e[a+ot],ot+=gt,at-=8);for(j=d&(1<<-at)-1,d>>=-at,at+=c;at>0;j=j*256+e[a+ot],ot+=gt,at-=8);if(d===0)d=1-nt;else{if(d===rt)return j?NaN:(bt?-1:1)*(1/0);j=j+Math.pow(2,c),d=d-nt}return(bt?-1:1)*j*Math.pow(2,d-c)};ieee754.write=function(e,a,o,c,h,d){var j,et,rt,nt=d*8-h-1,at=(1<>1,gt=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,bt=c?0:d-1,wt=c?1:-1,$t=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(et=isNaN(a)?1:0,j=at):(j=Math.floor(Math.log(a)/Math.LN2),a*(rt=Math.pow(2,-j))<1&&(j--,rt*=2),j+ot>=1?a+=gt/rt:a+=gt*Math.pow(2,1-ot),a*rt>=2&&(j++,rt/=2),j+ot>=at?(et=0,j=at):j+ot>=1?(et=(a*rt-1)*Math.pow(2,h),j=j+ot):(et=a*Math.pow(2,ot-1)*Math.pow(2,h),j=0));h>=8;e[o+bt]=et&255,bt+=wt,et/=256,h-=8);for(j=j<0;e[o+bt]=j&255,bt+=wt,j/=256,nt-=8);e[o+bt-wt]|=$t*128};/*! +`+d.stack}return{value:e,source:a,stack:h,digest:null}}function Ki(e,a,o){return{value:e,source:null,stack:o??null,digest:a??null}}function Li(e,a){try{console.error(a.value)}catch(o){setTimeout(function(){throw o})}}var Mi=typeof WeakMap=="function"?WeakMap:Map;function Ni(e,a,o){o=mh(-1,o),o.tag=3,o.payload={element:null};var c=a.value;return o.callback=function(){Oi||(Oi=!0,Pi$1=c),Li(e,a)},o}function Qi(e,a,o){o=mh(-1,o),o.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var h=a.value;o.payload=function(){return c(h)},o.callback=function(){Li(e,a)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(o.callback=function(){Li(e,a),typeof c!="function"&&(Ri===null?Ri=new Set([this]):Ri.add(this));var j=a.stack;this.componentDidCatch(a.value,{componentStack:j!==null?j:""})}),o}function Si(e,a,o){var c=e.pingCache;if(c===null){c=e.pingCache=new Mi;var h=new Set;c.set(a,h)}else h=c.get(a),h===void 0&&(h=new Set,c.set(a,h));h.has(o)||(h.add(o),e=Ti.bind(null,e,a,o),a.then(e,e))}function Ui(e){do{var a;if((a=e.tag===13)&&(a=e.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return e;e=e.return}while(e!==null);return null}function Vi(e,a,o,c,h){return e.mode&1?(e.flags|=65536,e.lanes=h,e):(e===a?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(a=mh(-1,1),a.tag=2,nh(o,a,1))),o.lanes|=1),e)}var Wi=ua.ReactCurrentOwner,dh$1=!1;function Xi(e,a,o,c){a.child=e===null?Vg(a,null,o,c):Ug(a,e.child,o,c)}function Yi(e,a,o,c,h){o=o.render;var d=a.ref;return ch$1(a,h),c=Nh(e,a,o,c,d,h),o=Sh(),e!==null&&!dh$1?(a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~h,Zi(e,a,h)):(I$1&&o&&vg(a),a.flags|=1,Xi(e,a,c,h),a.child)}function $i(e,a,o,c,h){if(e===null){var d=o.type;return typeof d=="function"&&!aj(d)&&d.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(a.tag=15,a.type=d,bj(e,a,d,c,h)):(e=Rg(o.type,null,c,a,a.mode,h),e.ref=a.ref,e.return=a,a.child=e)}if(d=e.child,!(e.lanes&h)){var j=d.memoizedProps;if(o=o.compare,o=o!==null?o:Ie,o(j,c)&&e.ref===a.ref)return Zi(e,a,h)}return a.flags|=1,e=Pg(d,c),e.ref=a.ref,e.return=a,a.child=e}function bj(e,a,o,c,h){if(e!==null){var d=e.memoizedProps;if(Ie(d,c)&&e.ref===a.ref)if(dh$1=!1,a.pendingProps=c=d,(e.lanes&h)!==0)e.flags&131072&&(dh$1=!0);else return a.lanes=e.lanes,Zi(e,a,h)}return cj(e,a,o,c,h)}function dj(e,a,o){var c=a.pendingProps,h=c.children,d=e!==null?e.memoizedState:null;if(c.mode==="hidden")if(!(a.mode&1))a.memoizedState={baseLanes:0,cachePool:null,transitions:null},G$1(ej,fj),fj|=o;else{if(!(o&1073741824))return e=d!==null?d.baseLanes|o:o,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:e,cachePool:null,transitions:null},a.updateQueue=null,G$1(ej,fj),fj|=e,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=d!==null?d.baseLanes:o,G$1(ej,fj),fj|=c}else d!==null?(c=d.baseLanes|o,a.memoizedState=null):c=o,G$1(ej,fj),fj|=c;return Xi(e,a,h,o),a.child}function gj(e,a){var o=a.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(a.flags|=512,a.flags|=2097152)}function cj(e,a,o,c,h){var d=Zf(o)?Xf:H.current;return d=Yf(a,d),ch$1(a,h),o=Nh(e,a,o,c,d,h),c=Sh(),e!==null&&!dh$1?(a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~h,Zi(e,a,h)):(I$1&&c&&vg(a),a.flags|=1,Xi(e,a,o,h),a.child)}function hj(e,a,o,c,h){if(Zf(o)){var d=!0;cg(a)}else d=!1;if(ch$1(a,h),a.stateNode===null)ij(e,a),Gi(a,o,c),Ii(a,o,c,h),c=!0;else if(e===null){var j=a.stateNode,et=a.memoizedProps;j.props=et;var rt=j.context,nt=o.contextType;typeof nt=="object"&&nt!==null?nt=eh(nt):(nt=Zf(o)?Xf:H.current,nt=Yf(a,nt));var at=o.getDerivedStateFromProps,ot=typeof at=="function"||typeof j.getSnapshotBeforeUpdate=="function";ot||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(et!==c||rt!==nt)&&Hi(a,j,c,nt),jh=!1;var gt=a.memoizedState;j.state=gt,qh(a,c,j,h),rt=a.memoizedState,et!==c||gt!==rt||Wf.current||jh?(typeof at=="function"&&(Di(a,o,at,c),rt=a.memoizedState),(et=jh||Fi(a,o,et,c,gt,rt,nt))?(ot||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(a.flags|=4194308)):(typeof j.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=rt),j.props=c,j.state=rt,j.context=nt,c=et):(typeof j.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{j=a.stateNode,lh(e,a),et=a.memoizedProps,nt=a.type===a.elementType?et:Ci(a.type,et),j.props=nt,ot=a.pendingProps,gt=j.context,rt=o.contextType,typeof rt=="object"&&rt!==null?rt=eh(rt):(rt=Zf(o)?Xf:H.current,rt=Yf(a,rt));var bt=o.getDerivedStateFromProps;(at=typeof bt=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(et!==ot||gt!==rt)&&Hi(a,j,c,rt),jh=!1,gt=a.memoizedState,j.state=gt,qh(a,c,j,h);var wt=a.memoizedState;et!==ot||gt!==wt||Wf.current||jh?(typeof bt=="function"&&(Di(a,o,bt,c),wt=a.memoizedState),(nt=jh||Fi(a,o,nt,c,gt,wt,rt)||!1)?(at||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(c,wt,rt),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(c,wt,rt)),typeof j.componentDidUpdate=="function"&&(a.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof j.componentDidUpdate!="function"||et===e.memoizedProps&>===e.memoizedState||(a.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||et===e.memoizedProps&>===e.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=wt),j.props=c,j.state=wt,j.context=rt,c=nt):(typeof j.componentDidUpdate!="function"||et===e.memoizedProps&>===e.memoizedState||(a.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||et===e.memoizedProps&>===e.memoizedState||(a.flags|=1024),c=!1)}return jj(e,a,o,c,d,h)}function jj(e,a,o,c,h,d){gj(e,a);var j=(a.flags&128)!==0;if(!c&&!j)return h&&dg(a,o,!1),Zi(e,a,d);c=a.stateNode,Wi.current=a;var et=j&&typeof o.getDerivedStateFromError!="function"?null:c.render();return a.flags|=1,e!==null&&j?(a.child=Ug(a,e.child,null,d),a.child=Ug(a,null,et,d)):Xi(e,a,et,d),a.memoizedState=c.state,h&&dg(a,o,!0),a.child}function kj(e){var a=e.stateNode;a.pendingContext?ag(e,a.pendingContext,a.pendingContext!==a.context):a.context&&ag(e,a.context,!1),yh(e,a.containerInfo)}function lj(e,a,o,c,h){return Ig(),Jg(h),a.flags|=256,Xi(e,a,o,c),a.child}var mj={dehydrated:null,treeContext:null,retryLane:0};function nj(e){return{baseLanes:e,cachePool:null,transitions:null}}function oj(e,a,o){var c=a.pendingProps,h=L$1.current,d=!1,j=(a.flags&128)!==0,et;if((et=j)||(et=e!==null&&e.memoizedState===null?!1:(h&2)!==0),et?(d=!0,a.flags&=-129):(e===null||e.memoizedState!==null)&&(h|=1),G$1(L$1,h&1),e===null)return Eg(a),e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(a.mode&1?e.data==="$!"?a.lanes=8:a.lanes=1073741824:a.lanes=1,null):(j=c.children,e=c.fallback,d?(c=a.mode,d=a.child,j={mode:"hidden",children:j},!(c&1)&&d!==null?(d.childLanes=0,d.pendingProps=j):d=pj(j,c,0,null),e=Tg(e,c,o,null),d.return=a,e.return=a,d.sibling=e,a.child=d,a.child.memoizedState=nj(o),a.memoizedState=mj,e):qj(a,j));if(h=e.memoizedState,h!==null&&(et=h.dehydrated,et!==null))return rj(e,a,j,c,et,h,o);if(d){d=c.fallback,j=a.mode,h=e.child,et=h.sibling;var rt={mode:"hidden",children:c.children};return!(j&1)&&a.child!==h?(c=a.child,c.childLanes=0,c.pendingProps=rt,a.deletions=null):(c=Pg(h,rt),c.subtreeFlags=h.subtreeFlags&14680064),et!==null?d=Pg(et,d):(d=Tg(d,j,o,null),d.flags|=2),d.return=a,c.return=a,c.sibling=d,a.child=c,c=d,d=a.child,j=e.child.memoizedState,j=j===null?nj(o):{baseLanes:j.baseLanes|o,cachePool:null,transitions:j.transitions},d.memoizedState=j,d.childLanes=e.childLanes&~o,a.memoizedState=mj,c}return d=e.child,e=d.sibling,c=Pg(d,{mode:"visible",children:c.children}),!(a.mode&1)&&(c.lanes=o),c.return=a,c.sibling=null,e!==null&&(o=a.deletions,o===null?(a.deletions=[e],a.flags|=16):o.push(e)),a.child=c,a.memoizedState=null,c}function qj(e,a){return a=pj({mode:"visible",children:a},e.mode,0,null),a.return=e,e.child=a}function sj(e,a,o,c){return c!==null&&Jg(c),Ug(a,e.child,null,o),e=qj(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function rj(e,a,o,c,h,d,j){if(o)return a.flags&256?(a.flags&=-257,c=Ki(Error(p(422))),sj(e,a,j,c)):a.memoizedState!==null?(a.child=e.child,a.flags|=128,null):(d=c.fallback,h=a.mode,c=pj({mode:"visible",children:c.children},h,0,null),d=Tg(d,h,j,null),d.flags|=2,c.return=a,d.return=a,c.sibling=d,a.child=c,a.mode&1&&Ug(a,e.child,null,j),a.child.memoizedState=nj(j),a.memoizedState=mj,d);if(!(a.mode&1))return sj(e,a,j,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var et=c.dgst;return c=et,d=Error(p(419)),c=Ki(d,c,void 0),sj(e,a,j,c)}if(et=(j&e.childLanes)!==0,dh$1||et){if(c=Q,c!==null){switch(j&-j){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=h&(c.suspendedLanes|j)?0:h,h!==0&&h!==d.retryLane&&(d.retryLane=h,ih(e,h),gi(c,e,h,-1))}return tj(),c=Ki(Error(p(421))),sj(e,a,j,c)}return h.data==="$?"?(a.flags|=128,a.child=e.child,a=uj.bind(null,e),h._reactRetry=a,null):(e=d.treeContext,yg=Lf(h.nextSibling),xg=a,I$1=!0,zg=null,e!==null&&(og[pg++]=rg,og[pg++]=sg,og[pg++]=qg,rg=e.id,sg=e.overflow,qg=a),a=qj(a,c.children),a.flags|=4096,a)}function vj(e,a,o){e.lanes|=a;var c=e.alternate;c!==null&&(c.lanes|=a),bh(e.return,a,o)}function wj(e,a,o,c,h){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:h}:(d.isBackwards=a,d.rendering=null,d.renderingStartTime=0,d.last=c,d.tail=o,d.tailMode=h)}function xj(e,a,o){var c=a.pendingProps,h=c.revealOrder,d=c.tail;if(Xi(e,a,c.children,o),c=L$1.current,c&2)c=c&1|2,a.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vj(e,o,a);else if(e.tag===19)vj(e,o,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break e;for(;e.sibling===null;){if(e.return===null||e.return===a)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}c&=1}if(G$1(L$1,c),!(a.mode&1))a.memoizedState=null;else switch(h){case"forwards":for(o=a.child,h=null;o!==null;)e=o.alternate,e!==null&&Ch$1(e)===null&&(h=o),o=o.sibling;o=h,o===null?(h=a.child,a.child=null):(h=o.sibling,o.sibling=null),wj(a,!1,h,o,d);break;case"backwards":for(o=null,h=a.child,a.child=null;h!==null;){if(e=h.alternate,e!==null&&Ch$1(e)===null){a.child=h;break}e=h.sibling,h.sibling=o,o=h,h=e}wj(a,!0,o,null,d);break;case"together":wj(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function ij(e,a){!(a.mode&1)&&e!==null&&(e.alternate=null,a.alternate=null,a.flags|=2)}function Zi(e,a,o){if(e!==null&&(a.dependencies=e.dependencies),rh|=a.lanes,!(o&a.childLanes))return null;if(e!==null&&a.child!==e.child)throw Error(p(153));if(a.child!==null){for(e=a.child,o=Pg(e,e.pendingProps),a.child=o,o.return=a;e.sibling!==null;)e=e.sibling,o=o.sibling=Pg(e,e.pendingProps),o.return=a;o.sibling=null}return a.child}function yj(e,a,o){switch(a.tag){case 3:kj(a),Ig();break;case 5:Ah(a);break;case 1:Zf(a.type)&&cg(a);break;case 4:yh(a,a.stateNode.containerInfo);break;case 10:var c=a.type._context,h=a.memoizedProps.value;G$1(Wg,c._currentValue),c._currentValue=h;break;case 13:if(c=a.memoizedState,c!==null)return c.dehydrated!==null?(G$1(L$1,L$1.current&1),a.flags|=128,null):o&a.child.childLanes?oj(e,a,o):(G$1(L$1,L$1.current&1),e=Zi(e,a,o),e!==null?e.sibling:null);G$1(L$1,L$1.current&1);break;case 19:if(c=(o&a.childLanes)!==0,e.flags&128){if(c)return xj(e,a,o);a.flags|=128}if(h=a.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),G$1(L$1,L$1.current),c)break;return null;case 22:case 23:return a.lanes=0,dj(e,a,o)}return Zi(e,a,o)}var zj,Aj,Bj,Cj;zj=function(e,a){for(var o=a.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};Aj=function(){};Bj=function(e,a,o,c){var h=e.memoizedProps;if(h!==c){e=a.stateNode,xh(uh.current);var d=null;switch(o){case"input":h=Ya(e,h),c=Ya(e,c),d=[];break;case"select":h=A$1({},h,{value:void 0}),c=A$1({},c,{value:void 0}),d=[];break;case"textarea":h=gb(e,h),c=gb(e,c),d=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(e.onclick=Bf)}ub(o,c);var j;o=null;for(nt in h)if(!c.hasOwnProperty(nt)&&h.hasOwnProperty(nt)&&h[nt]!=null)if(nt==="style"){var et=h[nt];for(j in et)et.hasOwnProperty(j)&&(o||(o={}),o[j]="")}else nt!=="dangerouslySetInnerHTML"&&nt!=="children"&&nt!=="suppressContentEditableWarning"&&nt!=="suppressHydrationWarning"&&nt!=="autoFocus"&&(ea.hasOwnProperty(nt)?d||(d=[]):(d=d||[]).push(nt,null));for(nt in c){var rt=c[nt];if(et=h!=null?h[nt]:void 0,c.hasOwnProperty(nt)&&rt!==et&&(rt!=null||et!=null))if(nt==="style")if(et){for(j in et)!et.hasOwnProperty(j)||rt&&rt.hasOwnProperty(j)||(o||(o={}),o[j]="");for(j in rt)rt.hasOwnProperty(j)&&et[j]!==rt[j]&&(o||(o={}),o[j]=rt[j])}else o||(d||(d=[]),d.push(nt,o)),o=rt;else nt==="dangerouslySetInnerHTML"?(rt=rt?rt.__html:void 0,et=et?et.__html:void 0,rt!=null&&et!==rt&&(d=d||[]).push(nt,rt)):nt==="children"?typeof rt!="string"&&typeof rt!="number"||(d=d||[]).push(nt,""+rt):nt!=="suppressContentEditableWarning"&&nt!=="suppressHydrationWarning"&&(ea.hasOwnProperty(nt)?(rt!=null&&nt==="onScroll"&&D$1("scroll",e),d||et===rt||(d=[])):(d=d||[]).push(nt,rt))}o&&(d=d||[]).push("style",o);var nt=d;(a.updateQueue=nt)&&(a.flags|=4)}};Cj=function(e,a,o,c){o!==c&&(a.flags|=4)};function Dj(e,a){if(!I$1)switch(e.tailMode){case"hidden":a=e.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function S$1(e){var a=e.alternate!==null&&e.alternate.child===e.child,o=0,c=0;if(a)for(var h=e.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)o|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=c,e.childLanes=o,a}function Ej(e,a,o){var c=a.pendingProps;switch(wg(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S$1(a),null;case 1:return Zf(a.type)&&$f(),S$1(a),null;case 3:return c=a.stateNode,zh(),E(Wf),E(H),Eh(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(e===null||e.child===null)&&(Gg(a)?a.flags|=4:e===null||e.memoizedState.isDehydrated&&!(a.flags&256)||(a.flags|=1024,zg!==null&&(Fj(zg),zg=null))),Aj(e,a),S$1(a),null;case 5:Bh(a);var h=xh(wh.current);if(o=a.type,e!==null&&a.stateNode!=null)Bj(e,a,o,c,h),e.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!c){if(a.stateNode===null)throw Error(p(166));return S$1(a),null}if(e=xh(uh.current),Gg(a)){c=a.stateNode,o=a.type;var d=a.memoizedProps;switch(c[Of]=a,c[Pf]=d,e=(a.mode&1)!==0,o){case"dialog":D$1("cancel",c),D$1("close",c);break;case"iframe":case"object":case"embed":D$1("load",c);break;case"video":case"audio":for(h=0;h<\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=j.createElement(o,{is:c.is}):(e=j.createElement(o),o==="select"&&(j=e,c.multiple?j.multiple=!0:c.size&&(j.size=c.size))):e=j.createElementNS(e,o),e[Of]=a,e[Pf]=c,zj(e,a,!1,!1),a.stateNode=e;e:{switch(j=vb(o,c),o){case"dialog":D$1("cancel",e),D$1("close",e),h=c;break;case"iframe":case"object":case"embed":D$1("load",e),h=c;break;case"video":case"audio":for(h=0;hGj&&(a.flags|=128,c=!0,Dj(d,!1),a.lanes=4194304)}else{if(!c)if(e=Ch$1(j),e!==null){if(a.flags|=128,c=!0,o=e.updateQueue,o!==null&&(a.updateQueue=o,a.flags|=4),Dj(d,!0),d.tail===null&&d.tailMode==="hidden"&&!j.alternate&&!I$1)return S$1(a),null}else 2*B()-d.renderingStartTime>Gj&&o!==1073741824&&(a.flags|=128,c=!0,Dj(d,!1),a.lanes=4194304);d.isBackwards?(j.sibling=a.child,a.child=j):(o=d.last,o!==null?o.sibling=j:a.child=j,d.last=j)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=B(),a.sibling=null,o=L$1.current,G$1(L$1,c?o&1|2:o&1),a):(S$1(a),null);case 22:case 23:return Hj(),c=a.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(a.flags|=8192),c&&a.mode&1?fj&1073741824&&(S$1(a),a.subtreeFlags&6&&(a.flags|=8192)):S$1(a),null;case 24:return null;case 25:return null}throw Error(p(156,a.tag))}function Ij(e,a){switch(wg(a),a.tag){case 1:return Zf(a.type)&&$f(),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return zh(),E(Wf),E(H),Eh(),e=a.flags,e&65536&&!(e&128)?(a.flags=e&-65537|128,a):null;case 5:return Bh(a),null;case 13:if(E(L$1),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(p(340));Ig()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return E(L$1),null;case 4:return zh(),null;case 10:return ah(a.type._context),null;case 22:case 23:return Hj(),null;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=typeof WeakSet=="function"?WeakSet:Set,V=null;function Lj(e,a){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(c){W$6(e,a,c)}else o.current=null}function Mj(e,a,o){try{o()}catch(c){W$6(e,a,c)}}var Nj=!1;function Oj(e,a){if(Cf=dd,e=Me(),Ne(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var h=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var j=0,et=-1,rt=-1,nt=0,at=0,ot=e,gt=null;t:for(;;){for(var bt;ot!==o||h!==0&&ot.nodeType!==3||(et=j+h),ot!==d||c!==0&&ot.nodeType!==3||(rt=j+c),ot.nodeType===3&&(j+=ot.nodeValue.length),(bt=ot.firstChild)!==null;)gt=ot,ot=bt;for(;;){if(ot===e)break t;if(gt===o&&++nt===h&&(et=j),gt===d&&++at===c&&(rt=j),(bt=ot.nextSibling)!==null)break;ot=gt,gt=ot.parentNode}ot=bt}o=et===-1||rt===-1?null:{start:et,end:rt}}else o=null}o=o||{start:0,end:0}}else o=null;for(Df={focusedElem:e,selectionRange:o},dd=!1,V=a;V!==null;)if(a=V,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,V=e;else for(;V!==null;){a=V;try{var wt=a.alternate;if(a.flags&1024)switch(a.tag){case 0:case 11:case 15:break;case 1:if(wt!==null){var $t=wt.memoizedProps,St=wt.memoizedState,Et=a.stateNode,_t=Et.getSnapshotBeforeUpdate(a.elementType===a.type?$t:Ci(a.type,$t),St);Et.__reactInternalSnapshotBeforeUpdate=_t}break;case 3:var At=a.stateNode.containerInfo;At.nodeType===1?At.textContent="":At.nodeType===9&&At.documentElement&&At.removeChild(At.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch(Bt){W$6(a,a.return,Bt)}if(e=a.sibling,e!==null){e.return=a.return,V=e;break}V=a.return}return wt=Nj,Nj=!1,wt}function Pj(e,a,o){var c=a.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&e)===e){var d=h.destroy;h.destroy=void 0,d!==void 0&&Mj(a,o,d)}h=h.next}while(h!==c)}}function Qj(e,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var o=a=a.next;do{if((o.tag&e)===e){var c=o.create;o.destroy=c()}o=o.next}while(o!==a)}}function Rj(e){var a=e.ref;if(a!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof a=="function"?a(e):a.current=e}}function Sj(e){var a=e.alternate;a!==null&&(e.alternate=null,Sj(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&(delete a[Of],delete a[Pf],delete a[of],delete a[Qf],delete a[Rf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Tj(e){return e.tag===5||e.tag===3||e.tag===4}function Uj(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tj(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vj(e,a,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?o.nodeType===8?o.parentNode.insertBefore(e,a):o.insertBefore(e,a):(o.nodeType===8?(a=o.parentNode,a.insertBefore(e,o)):(a=o,a.appendChild(e)),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Bf));else if(c!==4&&(e=e.child,e!==null))for(Vj(e,a,o),e=e.sibling;e!==null;)Vj(e,a,o),e=e.sibling}function Wj(e,a,o){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?o.insertBefore(e,a):o.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(Wj(e,a,o),e=e.sibling;e!==null;)Wj(e,a,o),e=e.sibling}var X$2=null,Xj=!1;function Yj(e,a,o){for(o=o.child;o!==null;)Zj(e,a,o),o=o.sibling}function Zj(e,a,o){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,o)}catch{}switch(o.tag){case 5:U||Lj(o,a);case 6:var c=X$2,h=Xj;X$2=null,Yj(e,a,o),X$2=c,Xj=h,X$2!==null&&(Xj?(e=X$2,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):X$2.removeChild(o.stateNode));break;case 18:X$2!==null&&(Xj?(e=X$2,o=o.stateNode,e.nodeType===8?Kf(e.parentNode,o):e.nodeType===1&&Kf(e,o),bd(e)):Kf(X$2,o.stateNode));break;case 4:c=X$2,h=Xj,X$2=o.stateNode.containerInfo,Xj=!0,Yj(e,a,o),X$2=c,Xj=h;break;case 0:case 11:case 14:case 15:if(!U&&(c=o.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var d=h,j=d.destroy;d=d.tag,j!==void 0&&(d&2||d&4)&&Mj(o,a,j),h=h.next}while(h!==c)}Yj(e,a,o);break;case 1:if(!U&&(Lj(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=o.memoizedProps,c.state=o.memoizedState,c.componentWillUnmount()}catch(et){W$6(o,a,et)}Yj(e,a,o);break;case 21:Yj(e,a,o);break;case 22:o.mode&1?(U=(c=U)||o.memoizedState!==null,Yj(e,a,o),U=c):Yj(e,a,o);break;default:Yj(e,a,o)}}function ak(e){var a=e.updateQueue;if(a!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Kj),a.forEach(function(c){var h=bk.bind(null,e,c);o.has(c)||(o.add(c),c.then(h,h))})}}function ck(e,a){var o=a.deletions;if(o!==null)for(var c=0;ch&&(h=j),c&=~d}if(c=h,c=B()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*lk(c/1960))-c,10e?16:e,wk===null)var c=!1;else{if(e=wk,wk=null,xk=0,K$4&6)throw Error(p(331));var h=K$4;for(K$4|=4,V=e.current;V!==null;){var d=V,j=d.child;if(V.flags&16){var et=d.deletions;if(et!==null){for(var rt=0;rtB()-fk?Kk(e,0):rk|=o),Dk(e,a)}function Yk(e,a){a===0&&(e.mode&1?(a=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):a=1);var o=R$1();e=ih(e,a),e!==null&&(Ac(e,a,o),Dk(e,o))}function uj(e){var a=e.memoizedState,o=0;a!==null&&(o=a.retryLane),Yk(e,o)}function bk(e,a){var o=0;switch(e.tag){case 13:var c=e.stateNode,h=e.memoizedState;h!==null&&(o=h.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(p(314))}c!==null&&c.delete(a),Yk(e,o)}var Vk;Vk=function(e,a,o){if(e!==null)if(e.memoizedProps!==a.pendingProps||Wf.current)dh$1=!0;else{if(!(e.lanes&o)&&!(a.flags&128))return dh$1=!1,yj(e,a,o);dh$1=!!(e.flags&131072)}else dh$1=!1,I$1&&a.flags&1048576&&ug(a,ng,a.index);switch(a.lanes=0,a.tag){case 2:var c=a.type;ij(e,a),e=a.pendingProps;var h=Yf(a,H.current);ch$1(a,o),h=Nh(null,a,c,e,h,o);var d=Sh();return a.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Zf(c)?(d=!0,cg(a)):d=!1,a.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,kh(a),h.updater=Ei,a.stateNode=h,h._reactInternals=a,Ii(a,c,e,o),a=jj(null,a,c,!0,d,o)):(a.tag=0,I$1&&d&&vg(a),Xi(null,a,h,o),a=a.child),a;case 16:c=a.elementType;e:{switch(ij(e,a),e=a.pendingProps,h=c._init,c=h(c._payload),a.type=c,h=a.tag=Zk(c),e=Ci(c,e),h){case 0:a=cj(null,a,c,e,o);break e;case 1:a=hj(null,a,c,e,o);break e;case 11:a=Yi(null,a,c,e,o);break e;case 14:a=$i(null,a,c,Ci(c.type,e),o);break e}throw Error(p(306,c,""))}return a;case 0:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),cj(e,a,c,h,o);case 1:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),hj(e,a,c,h,o);case 3:e:{if(kj(a),e===null)throw Error(p(387));c=a.pendingProps,d=a.memoizedState,h=d.element,lh(e,a),qh(a,c,null,o);var j=a.memoizedState;if(c=j.element,d.isDehydrated)if(d={element:c,isDehydrated:!1,cache:j.cache,pendingSuspenseBoundaries:j.pendingSuspenseBoundaries,transitions:j.transitions},a.updateQueue.baseState=d,a.memoizedState=d,a.flags&256){h=Ji(Error(p(423)),a),a=lj(e,a,c,o,h);break e}else if(c!==h){h=Ji(Error(p(424)),a),a=lj(e,a,c,o,h);break e}else for(yg=Lf(a.stateNode.containerInfo.firstChild),xg=a,I$1=!0,zg=null,o=Vg(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ig(),c===h){a=Zi(e,a,o);break e}Xi(e,a,c,o)}a=a.child}return a;case 5:return Ah(a),e===null&&Eg(a),c=a.type,h=a.pendingProps,d=e!==null?e.memoizedProps:null,j=h.children,Ef(c,h)?j=null:d!==null&&Ef(c,d)&&(a.flags|=32),gj(e,a),Xi(e,a,j,o),a.child;case 6:return e===null&&Eg(a),null;case 13:return oj(e,a,o);case 4:return yh(a,a.stateNode.containerInfo),c=a.pendingProps,e===null?a.child=Ug(a,null,c,o):Xi(e,a,c,o),a.child;case 11:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),Yi(e,a,c,h,o);case 7:return Xi(e,a,a.pendingProps,o),a.child;case 8:return Xi(e,a,a.pendingProps.children,o),a.child;case 12:return Xi(e,a,a.pendingProps.children,o),a.child;case 10:e:{if(c=a.type._context,h=a.pendingProps,d=a.memoizedProps,j=h.value,G$1(Wg,c._currentValue),c._currentValue=j,d!==null)if(He(d.value,j)){if(d.children===h.children&&!Wf.current){a=Zi(e,a,o);break e}}else for(d=a.child,d!==null&&(d.return=a);d!==null;){var et=d.dependencies;if(et!==null){j=d.child;for(var rt=et.firstContext;rt!==null;){if(rt.context===c){if(d.tag===1){rt=mh(-1,o&-o),rt.tag=2;var nt=d.updateQueue;if(nt!==null){nt=nt.shared;var at=nt.pending;at===null?rt.next=rt:(rt.next=at.next,at.next=rt),nt.pending=rt}}d.lanes|=o,rt=d.alternate,rt!==null&&(rt.lanes|=o),bh(d.return,o,a),et.lanes|=o;break}rt=rt.next}}else if(d.tag===10)j=d.type===a.type?null:d.child;else if(d.tag===18){if(j=d.return,j===null)throw Error(p(341));j.lanes|=o,et=j.alternate,et!==null&&(et.lanes|=o),bh(j,o,a),j=d.sibling}else j=d.child;if(j!==null)j.return=d;else for(j=d;j!==null;){if(j===a){j=null;break}if(d=j.sibling,d!==null){d.return=j.return,j=d;break}j=j.return}d=j}Xi(e,a,h.children,o),a=a.child}return a;case 9:return h=a.type,c=a.pendingProps.children,ch$1(a,o),h=eh(h),c=c(h),a.flags|=1,Xi(e,a,c,o),a.child;case 14:return c=a.type,h=Ci(c,a.pendingProps),h=Ci(c.type,h),$i(e,a,c,h,o);case 15:return bj(e,a,a.type,a.pendingProps,o);case 17:return c=a.type,h=a.pendingProps,h=a.elementType===c?h:Ci(c,h),ij(e,a),a.tag=1,Zf(c)?(e=!0,cg(a)):e=!1,ch$1(a,o),Gi(a,c,h),Ii(a,c,h,o),jj(null,a,c,!0,e,o);case 19:return xj(e,a,o);case 22:return dj(e,a,o)}throw Error(p(156,a.tag))};function Fk(e,a){return ac(e,a)}function $k(e,a,o,c){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(e,a,o,c){return new $k(e,a,o,c)}function aj(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zk(e){if(typeof e=="function")return aj(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Da)return 11;if(e===Ga)return 14}return 2}function Pg(e,a){var o=e.alternate;return o===null?(o=Bg(e.tag,a,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=a,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,a=e.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Rg(e,a,o,c,h,d){var j=2;if(c=e,typeof e=="function")aj(e)&&(j=1);else if(typeof e=="string")j=5;else e:switch(e){case ya:return Tg(o.children,h,d,a);case za:j=8,h|=8;break;case Aa:return e=Bg(12,o,a,h|2),e.elementType=Aa,e.lanes=d,e;case Ea:return e=Bg(13,o,a,h),e.elementType=Ea,e.lanes=d,e;case Fa:return e=Bg(19,o,a,h),e.elementType=Fa,e.lanes=d,e;case Ia:return pj(o,h,d,a);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ba:j=10;break e;case Ca:j=9;break e;case Da:j=11;break e;case Ga:j=14;break e;case Ha:j=16,c=null;break e}throw Error(p(130,e==null?e:typeof e,""))}return a=Bg(j,o,a,h),a.elementType=e,a.type=c,a.lanes=d,a}function Tg(e,a,o,c){return e=Bg(7,e,c,a),e.lanes=o,e}function pj(e,a,o,c){return e=Bg(22,e,c,a),e.elementType=Ia,e.lanes=o,e.stateNode={isHidden:!1},e}function Qg(e,a,o){return e=Bg(6,e,null,a),e.lanes=o,e}function Sg(e,a,o){return a=Bg(4,e.children!==null?e.children:[],e.key,a),a.lanes=o,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}function al(e,a,o,c,h){this.tag=a,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function bl(e,a,o,c,h,d,j,et,rt){return e=new al(e,a,o,et,rt),a===1?(a=1,d===!0&&(a|=8)):a=0,d=Bg(3,null,null,a),e.current=d,d.stateNode=e,d.memoizedState={element:c,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(d),e}function cl(e,a,o){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs$1(reactDomExports);var createRoot,m=reactDomExports;createRoot=m.createRoot,m.hydrateRoot;function setRef(e,a){typeof e=="function"?e(a):e!=null&&(e.current=a)}function composeRefs(...e){return a=>e.forEach(o=>setRef(o,a))}function useComposedRefs(...e){return reactExports.useCallback(composeRefs(...e),e)}var Slot=reactExports.forwardRef((e,a)=>{const{children:o,...c}=e,h=reactExports.Children.toArray(o),d=h.find(isSlottable);if(d){const j=d.props.children,et=h.map(rt=>rt===d?reactExports.Children.count(j)>1?reactExports.Children.only(null):reactExports.isValidElement(j)?j.props.children:null:rt);return jsxRuntimeExports.jsx(SlotClone,{...c,ref:a,children:reactExports.isValidElement(j)?reactExports.cloneElement(j,void 0,et):null})}return jsxRuntimeExports.jsx(SlotClone,{...c,ref:a,children:o})});Slot.displayName="Slot";var SlotClone=reactExports.forwardRef((e,a)=>{const{children:o,...c}=e;if(reactExports.isValidElement(o)){const h=getElementRef$1(o);return reactExports.cloneElement(o,{...mergeProps(c,o.props),ref:a?composeRefs(a,h):h})}return reactExports.Children.count(o)>1?reactExports.Children.only(null):null});SlotClone.displayName="SlotClone";var Slottable=({children:e})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:e});function isSlottable(e){return reactExports.isValidElement(e)&&e.type===Slottable}function mergeProps(e,a){const o={...a};for(const c in a){const h=e[c],d=a[c];/^on[A-Z]/.test(c)?h&&d?o[c]=(...et)=>{d(...et),h(...et)}:h&&(o[c]=h):c==="style"?o[c]={...h,...d}:c==="className"&&(o[c]=[h,d].filter(Boolean).join(" "))}return{...e,...o}}function getElementRef$1(e){var c,h;let a=(c=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:c.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?e.ref:(a=(h=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:h.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}function r$1(e){var a,o,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e))for(a=0;atypeof e=="boolean"?"".concat(e):e===0?"0":e,cx=clsx$1,cva=(e,a)=>o=>{var c;if((a==null?void 0:a.variants)==null)return cx(e,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:h,defaultVariants:d}=a,j=Object.keys(h).map(nt=>{const at=o==null?void 0:o[nt],ot=d==null?void 0:d[nt];if(at===null)return null;const gt=falsyToString(at)||falsyToString(ot);return h[nt][gt]}),et=o&&Object.entries(o).reduce((nt,at)=>{let[ot,gt]=at;return gt===void 0||(nt[ot]=gt),nt},{}),rt=a==null||(c=a.compoundVariants)===null||c===void 0?void 0:c.reduce((nt,at)=>{let{class:ot,className:gt,...bt}=at;return Object.entries(bt).every(wt=>{let[$t,St]=wt;return Array.isArray(St)?St.includes({...d,...et}[$t]):{...d,...et}[$t]===St})?[...nt,ot,gt]:nt},[]);return cx(e,j,rt,o==null?void 0:o.class,o==null?void 0:o.className)};function r(e){var a,o,c="";if(typeof e=="string"||typeof e=="number")c+=e;else if(typeof e=="object")if(Array.isArray(e)){var h=e.length;for(a=0;a{const a=createClassMap(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:c}=e;return{getClassGroupId:j=>{const et=j.split(CLASS_PART_SEPARATOR);return et[0]===""&&et.length!==1&&et.shift(),getGroupRecursive(et,a)||getGroupIdForArbitraryProperty(j)},getConflictingClassGroupIds:(j,et)=>{const rt=o[j]||[];return et&&c[j]?[...rt,...c[j]]:rt}}},getGroupRecursive=(e,a)=>{var j;if(e.length===0)return a.classGroupId;const o=e[0],c=a.nextPart.get(o),h=c?getGroupRecursive(e.slice(1),c):void 0;if(h)return h;if(a.validators.length===0)return;const d=e.join(CLASS_PART_SEPARATOR);return(j=a.validators.find(({validator:et})=>et(d)))==null?void 0:j.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=e=>{if(arbitraryPropertyRegex.test(e)){const a=arbitraryPropertyRegex.exec(e)[1],o=a==null?void 0:a.substring(0,a.indexOf(":"));if(o)return"arbitrary.."+o}},createClassMap=e=>{const{theme:a,prefix:o}=e,c={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(e.classGroups),o).forEach(([d,j])=>{processClassesRecursively(j,c,d,a)}),c},processClassesRecursively=(e,a,o,c)=>{e.forEach(h=>{if(typeof h=="string"){const d=h===""?a:getPart(a,h);d.classGroupId=o;return}if(typeof h=="function"){if(isThemeGetter(h)){processClassesRecursively(h(c),a,o,c);return}a.validators.push({validator:h,classGroupId:o});return}Object.entries(h).forEach(([d,j])=>{processClassesRecursively(j,getPart(a,d),o,c)})})},getPart=(e,a)=>{let o=e;return a.split(CLASS_PART_SEPARATOR).forEach(c=>{o.nextPart.has(c)||o.nextPart.set(c,{nextPart:new Map,validators:[]}),o=o.nextPart.get(c)}),o},isThemeGetter=e=>e.isThemeGetter,getPrefixedClassGroupEntries=(e,a)=>a?e.map(([o,c])=>{const h=c.map(d=>typeof d=="string"?a+d:typeof d=="object"?Object.fromEntries(Object.entries(d).map(([j,et])=>[a+j,et])):d);return[o,h]}):e,createLruCache=e=>{if(e<1)return{get:()=>{},set:()=>{}};let a=0,o=new Map,c=new Map;const h=(d,j)=>{o.set(d,j),a++,a>e&&(a=0,c=o,o=new Map)};return{get(d){let j=o.get(d);if(j!==void 0)return j;if((j=c.get(d))!==void 0)return h(d,j),j},set(d,j){o.has(d)?o.set(d,j):h(d,j)}}},IMPORTANT_MODIFIER="!",createParseClassName=e=>{const{separator:a,experimentalParseClassName:o}=e,c=a.length===1,h=a[0],d=a.length,j=et=>{const rt=[];let nt=0,at=0,ot;for(let St=0;Stat?ot-at:void 0;return{modifiers:rt,hasImportantModifier:bt,baseClassName:wt,maybePostfixModifierPosition:$t}};return o?et=>o({className:et,parseClassName:j}):j},sortModifiers=e=>{if(e.length<=1)return e;const a=[];let o=[];return e.forEach(c=>{c[0]==="["?(a.push(...o.sort(),c),o=[]):o.push(c)}),a.push(...o.sort()),a},createConfigUtils=e=>({cache:createLruCache(e.cacheSize),parseClassName:createParseClassName(e),...createClassGroupUtils(e)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(e,a)=>{const{parseClassName:o,getClassGroupId:c,getConflictingClassGroupIds:h}=a,d=[],j=e.trim().split(SPLIT_CLASSES_REGEX);let et="";for(let rt=j.length-1;rt>=0;rt-=1){const nt=j[rt],{modifiers:at,hasImportantModifier:ot,baseClassName:gt,maybePostfixModifierPosition:bt}=o(nt);let wt=!!bt,$t=c(wt?gt.substring(0,bt):gt);if(!$t){if(!wt){et=nt+(et.length>0?" "+et:et);continue}if($t=c(gt),!$t){et=nt+(et.length>0?" "+et:et);continue}wt=!1}const St=sortModifiers(at).join(":"),Et=ot?St+IMPORTANT_MODIFIER:St,_t=Et+$t;if(d.includes(_t))continue;d.push(_t);const At=h($t,wt);for(let Bt=0;Bt0?" "+et:et)}return et};function twJoin(){let e=0,a,o,c="";for(;e{if(typeof e=="string")return e;let a,o="";for(let c=0;cot(at),e());return o=createConfigUtils(nt),c=o.cache.get,h=o.cache.set,d=et,et(rt)}function et(rt){const nt=c(rt);if(nt)return nt;const at=mergeClassList(rt,o);return h(rt,at),at}return function(){return d(twJoin.apply(null,arguments))}}const fromTheme=e=>{const a=o=>o[e]||[];return a.isThemeGetter=!0,a},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength=e=>isNumber$3(e)||stringLengths.has(e)||fractionRegex.test(e),isArbitraryLength=e=>getIsArbitraryValue(e,"length",isLengthOnly),isNumber$3=e=>!!e&&!Number.isNaN(Number(e)),isArbitraryNumber=e=>getIsArbitraryValue(e,"number",isNumber$3),isInteger=e=>!!e&&Number.isInteger(Number(e)),isPercent=e=>e.endsWith("%")&&isNumber$3(e.slice(0,-1)),isArbitraryValue=e=>arbitraryValueRegex.test(e),isTshirtSize=e=>tshirtUnitRegex.test(e),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=e=>getIsArbitraryValue(e,sizeLabels,isNever),isArbitraryPosition=e=>getIsArbitraryValue(e,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=e=>getIsArbitraryValue(e,imageLabels,isImage),isArbitraryShadow=e=>getIsArbitraryValue(e,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(e,a,o)=>{const c=arbitraryValueRegex.exec(e);return c?c[1]?typeof a=="string"?c[1]===a:a.has(c[1]):o(c[2]):!1},isLengthOnly=e=>lengthUnitRegex.test(e)&&!colorFunctionRegex.test(e),isNever=()=>!1,isShadow=e=>shadowRegex.test(e),isImage=e=>imageRegex.test(e),getDefaultConfig=()=>{const e=fromTheme("colors"),a=fromTheme("spacing"),o=fromTheme("blur"),c=fromTheme("brightness"),h=fromTheme("borderColor"),d=fromTheme("borderRadius"),j=fromTheme("borderSpacing"),et=fromTheme("borderWidth"),rt=fromTheme("contrast"),nt=fromTheme("grayscale"),at=fromTheme("hueRotate"),ot=fromTheme("invert"),gt=fromTheme("gap"),bt=fromTheme("gradientColorStops"),wt=fromTheme("gradientColorStopPositions"),$t=fromTheme("inset"),St=fromTheme("margin"),Et=fromTheme("opacity"),_t=fromTheme("padding"),At=fromTheme("saturate"),Bt=fromTheme("scale"),kt=fromTheme("sepia"),jt=fromTheme("skew"),zt=fromTheme("space"),Xt=fromTheme("translate"),Wt=()=>["auto","contain","none"],ir=()=>["auto","hidden","clip","visible","scroll"],mt=()=>["auto",isArbitraryValue,a],$=()=>[isArbitraryValue,a],tt=()=>["",isLength,isArbitraryLength],it=()=>["auto",isNumber$3,isArbitraryValue],st=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ct=()=>["solid","dashed","dotted","double","none"],pt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],vt=()=>["start","end","center","between","around","evenly","stretch"],lt=()=>["","0",isArbitraryValue],_e=()=>["auto","avoid","all","avoid-page","page","left","right","column"],dt=()=>[isNumber$3,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:dt(),borderColor:[e],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:$(),borderWidth:tt(),contrast:dt(),grayscale:lt(),hueRotate:dt(),invert:lt(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:mt(),margin:mt(),opacity:dt(),padding:$(),saturate:dt(),scale:dt(),sepia:lt(),skew:dt(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":_e()}],"break-before":[{"break-before":_e()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...st(),isArbitraryValue]}],overflow:[{overflow:ir()}],"overflow-x":[{"overflow-x":ir()}],"overflow-y":[{"overflow-y":ir()}],overscroll:[{overscroll:Wt()}],"overscroll-x":[{"overscroll-x":Wt()}],"overscroll-y":[{"overscroll-y":Wt()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[$t]}],"inset-x":[{"inset-x":[$t]}],"inset-y":[{"inset-y":[$t]}],start:[{start:[$t]}],end:[{end:[$t]}],top:[{top:[$t]}],right:[{right:[$t]}],bottom:[{bottom:[$t]}],left:[{left:[$t]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger,isArbitraryValue]}],basis:[{basis:mt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:lt()}],shrink:[{shrink:lt()}],order:[{order:["first","last","none",isInteger,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":it()}],"col-end":[{"col-end":it()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":it()}],"row-end":[{"row-end":it()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[gt]}],"gap-x":[{"gap-x":[gt]}],"gap-y":[{"gap-y":[gt]}],"justify-content":[{justify:["normal",...vt()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...vt(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...vt(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_t]}],px:[{px:[_t]}],py:[{py:[_t]}],ps:[{ps:[_t]}],pe:[{pe:[_t]}],pt:[{pt:[_t]}],pr:[{pr:[_t]}],pb:[{pb:[_t]}],pl:[{pl:[_t]}],m:[{m:[St]}],mx:[{mx:[St]}],my:[{my:[St]}],ms:[{ms:[St]}],me:[{me:[St]}],mt:[{mt:[St]}],mr:[{mr:[St]}],mb:[{mb:[St]}],ml:[{ml:[St]}],"space-x":[{"space-x":[zt]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[zt]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,a]}],"min-w":[{"min-w":[isArbitraryValue,a,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,a,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,a,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,a,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,a,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,a,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$3,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[Et]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[Et]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ct(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength,isArbitraryValue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Et]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...st(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[wt]}],"gradient-via-pos":[{via:[wt]}],"gradient-to-pos":[{to:[wt]}],"gradient-from":[{from:[bt]}],"gradient-via":[{via:[bt]}],"gradient-to":[{to:[bt]}],rounded:[{rounded:[d]}],"rounded-s":[{"rounded-s":[d]}],"rounded-e":[{"rounded-e":[d]}],"rounded-t":[{"rounded-t":[d]}],"rounded-r":[{"rounded-r":[d]}],"rounded-b":[{"rounded-b":[d]}],"rounded-l":[{"rounded-l":[d]}],"rounded-ss":[{"rounded-ss":[d]}],"rounded-se":[{"rounded-se":[d]}],"rounded-ee":[{"rounded-ee":[d]}],"rounded-es":[{"rounded-es":[d]}],"rounded-tl":[{"rounded-tl":[d]}],"rounded-tr":[{"rounded-tr":[d]}],"rounded-br":[{"rounded-br":[d]}],"rounded-bl":[{"rounded-bl":[d]}],"border-w":[{border:[et]}],"border-w-x":[{"border-x":[et]}],"border-w-y":[{"border-y":[et]}],"border-w-s":[{"border-s":[et]}],"border-w-e":[{"border-e":[et]}],"border-w-t":[{"border-t":[et]}],"border-w-r":[{"border-r":[et]}],"border-w-b":[{"border-b":[et]}],"border-w-l":[{"border-l":[et]}],"border-opacity":[{"border-opacity":[Et]}],"border-style":[{border:[...ct(),"hidden"]}],"divide-x":[{"divide-x":[et]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[et]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Et]}],"divide-style":[{divide:ct()}],"border-color":[{border:[h]}],"border-color-x":[{"border-x":[h]}],"border-color-y":[{"border-y":[h]}],"border-color-t":[{"border-t":[h]}],"border-color-r":[{"border-r":[h]}],"border-color-b":[{"border-b":[h]}],"border-color-l":[{"border-l":[h]}],"divide-color":[{divide:[h]}],"outline-style":[{outline:["",...ct()]}],"outline-offset":[{"outline-offset":[isLength,isArbitraryValue]}],"outline-w":[{outline:[isLength,isArbitraryLength]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:tt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[Et]}],"ring-offset-w":[{"ring-offset":[isLength,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[Et]}],"mix-blend":[{"mix-blend":[...pt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":pt()}],filter:[{filter:["","none"]}],blur:[{blur:[o]}],brightness:[{brightness:[c]}],contrast:[{contrast:[rt]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[nt]}],"hue-rotate":[{"hue-rotate":[at]}],invert:[{invert:[ot]}],saturate:[{saturate:[At]}],sepia:[{sepia:[kt]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[o]}],"backdrop-brightness":[{"backdrop-brightness":[c]}],"backdrop-contrast":[{"backdrop-contrast":[rt]}],"backdrop-grayscale":[{"backdrop-grayscale":[nt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[at]}],"backdrop-invert":[{"backdrop-invert":[ot]}],"backdrop-opacity":[{"backdrop-opacity":[Et]}],"backdrop-saturate":[{"backdrop-saturate":[At]}],"backdrop-sepia":[{"backdrop-sepia":[kt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[j]}],"border-spacing-x":[{"border-spacing-x":[j]}],"border-spacing-y":[{"border-spacing-y":[j]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:dt()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:dt()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Bt]}],"scale-x":[{"scale-x":[Bt]}],"scale-y":[{"scale-y":[Bt]}],rotate:[{rotate:[isInteger,isArbitraryValue]}],"translate-x":[{"translate-x":[Xt]}],"translate-y":[{"translate-y":[Xt]}],"skew-x":[{"skew-x":[jt]}],"skew-y":[{"skew-y":[jt]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[isLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig);function cn(...e){return twMerge(clsx(e))}const buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Button=reactExports.forwardRef(({className:e,variant:a,size:o,asChild:c=!1,...h},d)=>{const j=c?Slot:"button";return jsxRuntimeExports.jsx(j,{className:cn(buttonVariants({variant:a,size:o,className:e})),ref:d,...h})});Button.displayName="Button";var dist$1={},sdk={};(function(){var e={},a="";try{a=location.hash.toString()}catch{}var o=rt(a),c=Et("initParams");if(c)for(var h in c)typeof o[h]>"u"&&(o[h]=c[h]);St("initParams",o);var d=!1,j;try{if(d=window.parent!=null&&window!=window.parent,d){window.addEventListener("message",function(_t){if(_t.source===window.parent){try{var At=JSON.parse(_t.data)}catch{return}if(!(!At||!At.eventType))if(At.eventType=="set_custom_style")_t.origin==="https://web.telegram.org"&&(j.innerHTML=At.eventData);else if(At.eventType=="reload_iframe"){try{window.parent.postMessage(JSON.stringify({eventType:"iframe_will_reload"}),"*")}catch{}location.reload()}else gt(At.eventType,At.eventData)}}),j=document.createElement("style"),document.head.appendChild(j);try{window.parent.postMessage(JSON.stringify({eventType:"iframe_ready",eventData:{reload_supported:!0}}),"*")}catch{}}}catch{}function et(_t){try{return _t=_t.replace(/\+/g,"%20"),decodeURIComponent(_t)}catch{return _t}}function rt(_t){_t=_t.replace(/^#/,"");var At={};if(!_t.length)return At;if(_t.indexOf("=")<0&&_t.indexOf("?")<0)return At._path=et(_t),At;var Bt=_t.indexOf("?");if(Bt>=0){var kt=_t.substr(0,Bt);At._path=et(kt),_t=_t.substr(Bt+1)}var jt=nt(_t);for(var zt in jt)At[zt]=jt[zt];return At}function nt(_t){var At={};if(!_t.length)return At;var Bt=_t.split("&"),kt,jt,zt,Xt;for(kt=0;kt=0?_t+"&"+At:kt.length>0?_t+"?"+At:_t+At}function ot(_t,At,Bt){if(At||(At=function(){}),Bt===void 0&&(Bt=""),console.log("[Telegram.WebView] > postEvent",_t,Bt),window.TelegramWebviewProxy!==void 0)TelegramWebviewProxy.postEvent(_t,JSON.stringify(Bt)),At();else if(window.external&&"notify"in window.external)window.external.notify(JSON.stringify({eventType:_t,eventData:Bt})),At();else if(d)try{var kt="https://web.telegram.org";kt="*",window.parent.postMessage(JSON.stringify({eventType:_t,eventData:Bt}),kt),At()}catch(jt){At(jt)}else At({notAvailable:!0})}function gt(_t,At){console.log("[Telegram.WebView] < receiveEvent",_t,At),bt(_t,function(Bt){Bt(_t,At)})}function bt(_t,At){var Bt=e[_t];if(!(Bt===void 0||!Bt.length))for(var kt=0;ktrn?1:-1;return 0}function cr(Qt){return Rr(nt,Qt)>=0}function xr(Qt){if(window.Blob)try{return new Blob([Qt]).size}catch{}for(var Yt=Qt.length,gr=Qt.length-1;gr>=0;gr--){var ur=Qt.charCodeAt(gr);ur>127&&ur<=2047?Yt++:ur>2047&&ur<=65535&&(Yt+=2),ur>=56320&&ur<=57343&&gr--}return Yt}var Jr=function(){var Qt=!1,Yt={};Object.defineProperty(Yt,"isVisible",{set:function(Sr){an({is_visible:Sr})},get:function(){return Qt},enumerable:!0});var gr=null;a.onEvent("back_button_pressed",ur);function ur(){kt("backButtonClicked")}function br(){return{is_visible:Qt}}function rn(Sr){return typeof Sr>"u"&&(Sr=br()),JSON.stringify(Sr)}function wr(){return cr("6.1")?!0:(console.warn("[Telegram.WebApp] BackButton is not supported in version "+nt),!1)}function Ir(){var Sr=br(),Pr=rn(Sr);gr!==Pr&&(gr=Pr,a.postEvent("web_app_setup_back_button",!1,Sr))}function an(Sr){return wr()&&(typeof Sr.is_visible<"u"&&(Qt=!!Sr.is_visible),Ir()),Yt}return Yt.onClick=function(Sr){return wr()&&jt("backButtonClicked",Sr),Yt},Yt.offClick=function(Sr){return wr()&&zt("backButtonClicked",Sr),Yt},Yt.show=function(){return an({is_visible:!0})},Yt.hide=function(){return an({is_visible:!1})},Yt}(),Ar=0,lr=function(){var Qt=!1,Yt=!0,gr=!1,ur="CONTINUE",br=!1,rn=!1,wr={};Object.defineProperty(wr,"text",{set:function(Zr){wr.setParams({text:Zr})},get:function(){return ur},enumerable:!0}),Object.defineProperty(wr,"color",{set:function(Zr){wr.setParams({color:Zr})},get:function(){return br||et.button_color||"#2481cc"},enumerable:!0}),Object.defineProperty(wr,"textColor",{set:function(Zr){wr.setParams({text_color:Zr})},get:function(){return rn||et.button_text_color||"#ffffff"},enumerable:!0}),Object.defineProperty(wr,"isVisible",{set:function(Zr){wr.setParams({is_visible:Zr})},get:function(){return Qt},enumerable:!0}),Object.defineProperty(wr,"isProgressVisible",{get:function(){return gr},enumerable:!0}),Object.defineProperty(wr,"isActive",{set:function(Zr){wr.setParams({is_active:Zr})},get:function(){return Yt},enumerable:!0});var Ir=null;a.onEvent("main_button_pressed",pn);var an=null,Sr={};if(o.tgWebAppDebug){an=document.createElement("tg-main-button"),Sr={font:"600 14px/18px sans-serif",display:"none",width:"100%",height:"48px",borderRadius:"0",background:"no-repeat right center",position:"fixed",left:"0",right:"0",bottom:"0",margin:"0",padding:"15px 20px",textAlign:"center",boxSizing:"border-box",zIndex:"10000"};for(var Pr in Sr)an.style[Pr]=Sr[Pr];document.addEventListener("DOMContentLoaded",function Zr(Tr){document.removeEventListener("DOMContentLoaded",Zr),document.body.appendChild(an),an.addEventListener("click",pn,!1)})}function pn(){Yt&&kt("mainButtonClicked")}function Lr(){var Zr=wr.color,Tr=wr.textColor;return Qt?{is_visible:!0,is_active:Yt,is_progress_visible:gr,text:ur,color:Zr,text_color:Tr}:{is_visible:!1}}function Wr(Zr){return typeof Zr>"u"&&(Zr=Lr()),JSON.stringify(Zr)}function gn(){var Zr=Lr(),Tr=Wr(Zr);Ir!==Tr&&(Ir=Tr,a.postEvent("web_app_setup_main_button",!1,Zr),o.tgWebAppDebug&&kr(Zr))}function kr(Zr){Zr.is_visible?(an.style.display="block",Ar=48,an.style.opacity=Zr.is_active?"1":"0.8",an.style.cursor=Zr.is_active?"pointer":"auto",an.disabled=!Zr.is_active,an.innerText=Zr.text,an.style.backgroundImage=Zr.is_progress_visible?"url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewport%3D%220%200%2048%2048%22%20width%3D%2248px%22%20height%3D%2248px%22%3E%3Ccircle%20cx%3D%2250%25%22%20cy%3D%2250%25%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222.25%22%20stroke-linecap%3D%22round%22%20fill%3D%22none%22%20stroke-dashoffset%3D%22106%22%20r%3D%229%22%20stroke-dasharray%3D%2256.52%22%20rotate%3D%22-90%22%3E%3Canimate%20attributeName%3D%22stroke-dashoffset%22%20attributeType%3D%22XML%22%20dur%3D%22360s%22%20from%3D%220%22%20to%3D%2212500%22%20repeatCount%3D%22indefinite%22%3E%3C%2Fanimate%3E%3CanimateTransform%20attributeName%3D%22transform%22%20attributeType%3D%22XML%22%20type%3D%22rotate%22%20dur%3D%221s%22%20from%3D%22-90%2024%2024%22%20to%3D%22630%2024%2024%22%20repeatCount%3D%22indefinite%22%3E%3C%2FanimateTransform%3E%3C%2Fcircle%3E%3C%2Fsvg%3E')":"none",an.style.backgroundColor=Zr.color,an.style.color=Zr.text_color):(an.style.display="none",Ar=0),document.documentElement&&(document.documentElement.style.boxSizing="border-box",document.documentElement.style.paddingBottom=Ar+"px"),st()}function jr(Zr){if(typeof Zr.text<"u"){var Tr=Bt(Zr.text);if(!Tr.length)throw console.error("[Telegram.WebApp] Main button text is required",Zr.text),Error("WebAppMainButtonParamInvalid");if(Tr.length>64)throw console.error("[Telegram.WebApp] Main button text is too long",Tr),Error("WebAppMainButtonParamInvalid");ur=Tr}if(typeof Zr.color<"u")if(Zr.color===!1||Zr.color===null)br=!1;else{var Fr=Ft(Zr.color);if(!Fr)throw console.error("[Telegram.WebApp] Main button color format is invalid",Zr.color),Error("WebAppMainButtonParamInvalid");br=Fr}if(typeof Zr.text_color<"u")if(Zr.text_color===!1||Zr.text_color===null)rn=!1;else{var dn=Ft(Zr.text_color);if(!dn)throw console.error("[Telegram.WebApp] Main button text color format is invalid",Zr.text_color),Error("WebAppMainButtonParamInvalid");rn=dn}if(typeof Zr.is_visible<"u"){if(Zr.is_visible&&!wr.text.length)throw console.error("[Telegram.WebApp] Main button text is required"),Error("WebAppMainButtonParamInvalid");Qt=!!Zr.is_visible}return typeof Zr.is_active<"u"&&(Yt=!!Zr.is_active),gn(),wr}return wr.setText=function(Zr){return wr.setParams({text:Zr})},wr.onClick=function(Zr){return jt("mainButtonClicked",Zr),wr},wr.offClick=function(Zr){return zt("mainButtonClicked",Zr),wr},wr.show=function(){return wr.setParams({is_visible:!0})},wr.hide=function(){return wr.setParams({is_visible:!1})},wr.enable=function(){return wr.setParams({is_active:!0})},wr.disable=function(){return wr.setParams({is_active:!1})},wr.showProgress=function(Zr){return Yt=!!Zr,gr=!0,gn(),wr},wr.hideProgress=function(){return wr.isActive||(Yt=!0),gr=!1,gn(),wr},wr.setParams=jr,wr}(),un=function(){var Qt=!1,Yt={};Object.defineProperty(Yt,"isVisible",{set:function(Sr){an({is_visible:Sr})},get:function(){return Qt},enumerable:!0});var gr=null;a.onEvent("settings_button_pressed",ur);function ur(){kt("settingsButtonClicked")}function br(){return{is_visible:Qt}}function rn(Sr){return typeof Sr>"u"&&(Sr=br()),JSON.stringify(Sr)}function wr(){return cr("6.10")?!0:(console.warn("[Telegram.WebApp] SettingsButton is not supported in version "+nt),!1)}function Ir(){var Sr=br(),Pr=rn(Sr);gr!==Pr&&(gr=Pr,a.postEvent("web_app_setup_settings_button",!1,Sr))}function an(Sr){return wr()&&(typeof Sr.is_visible<"u"&&(Qt=!!Sr.is_visible),Ir()),Yt}return Yt.onClick=function(Sr){return wr()&&jt("settingsButtonClicked",Sr),Yt},Yt.offClick=function(Sr){return wr()&&zt("settingsButtonClicked",Sr),Yt},Yt.show=function(){return an({is_visible:!0})},Yt.hide=function(){return an({is_visible:!1})},Yt}(),Cr=function(){var Qt={};function Yt(gr){if(!cr("6.1"))return console.warn("[Telegram.WebApp] HapticFeedback is not supported in version "+nt),Qt;if(gr.type=="impact"){if(gr.impact_style!="light"&&gr.impact_style!="medium"&&gr.impact_style!="heavy"&&gr.impact_style!="rigid"&&gr.impact_style!="soft")throw console.error("[Telegram.WebApp] Haptic impact style is invalid",gr.impact_style),Error("WebAppHapticImpactStyleInvalid")}else if(gr.type=="notification"){if(gr.notification_type!="error"&&gr.notification_type!="success"&&gr.notification_type!="warning")throw console.error("[Telegram.WebApp] Haptic notification type is invalid",gr.notification_type),Error("WebAppHapticNotificationTypeInvalid")}else if(gr.type!="selection_change")throw console.error("[Telegram.WebApp] Haptic feedback type is invalid",gr.type),Error("WebAppHapticFeedbackTypeInvalid");return a.postEvent("web_app_trigger_haptic_feedback",!1,gr),Qt}return Qt.impactOccurred=function(gr){return Yt({type:"impact",impact_style:gr})},Qt.notificationOccurred=function(gr){return Yt({type:"notification",notification_type:gr})},Qt.selectionChanged=function(){return Yt({type:"selection_change"})},Qt}(),Or=function(){var Qt={};function Yt(gr,ur,br){if(!cr("6.9"))throw console.error("[Telegram.WebApp] CloudStorage is not supported in version "+nt),Error("WebAppMethodUnsupported");return sn(gr,ur,br),Qt}return Qt.setItem=function(gr,ur,br){return Yt("saveStorageValue",{key:gr,value:ur},br)},Qt.getItem=function(gr,ur){return Qt.getItems([gr],ur?function(br,rn){br?ur(br):ur(null,rn[gr])}:null)},Qt.getItems=function(gr,ur){return Yt("getStorageValues",{keys:gr},ur)},Qt.removeItem=function(gr,ur){return Qt.removeItems([gr],ur)},Qt.removeItems=function(gr,ur){return Yt("deleteStorageValues",{keys:gr},ur)},Qt.getKeys=function(gr){return Yt("getStorageKeys",{},gr)},Qt}(),fn=function(){var Qt=!1,Yt=!1,gr="unknown",ur=!1,br=!1,rn=!1,wr="",Ir={};Object.defineProperty(Ir,"isInited",{get:function(){return Qt},enumerable:!0}),Object.defineProperty(Ir,"isBiometricAvailable",{get:function(){return Qt&&Yt},enumerable:!0}),Object.defineProperty(Ir,"biometricType",{get:function(){return gr||"unknown"},enumerable:!0}),Object.defineProperty(Ir,"isAccessRequested",{get:function(){return ur},enumerable:!0}),Object.defineProperty(Ir,"isAccessGranted",{get:function(){return ur&&br},enumerable:!0}),Object.defineProperty(Ir,"isBiometricTokenSaved",{get:function(){return rn},enumerable:!0}),Object.defineProperty(Ir,"deviceId",{get:function(){return wr||""},enumerable:!0});var an={callbacks:[]},Sr=!1,Pr=!1,pn=!1;a.onEvent("biometry_info_received",Lr),a.onEvent("biometry_auth_requested",Wr),a.onEvent("biometry_token_updated",gn);function Lr(Zr,Tr){if(Qt=!0,Tr.available?(Yt=!0,gr=Tr.type||"unknown",Tr.access_requested?(ur=!0,br=!!Tr.access_granted,rn=!!Tr.token_saved):(ur=!1,br=!1,rn=!1)):(Yt=!1,gr="unknown",ur=!1,br=!1,rn=!1),wr=Tr.device_id||"",an.callbacks.length>0)for(var Fr=0;Fr128)throw console.error("[Telegram.WebApp] Biometric reason is too long",dn),Error("WebAppBiometricRequestAccessParamInvalid");dn.length>0&&(Fr.reason=dn)}return Sr={callback:Tr},a.postEvent("web_app_biometry_request_access",!1,Fr),Ir},Ir.authenticate=function(Zr,Tr){if(!kr())return Ir;if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!br)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(Pr)throw console.error("[Telegram.WebApp] Authentication request is already in progress."),Error("WebAppBiometricManagerAuthenticationRequested");var Fr={};if(typeof Zr.reason<"u"){var dn=Bt(Zr.reason);if(dn.length>128)throw console.error("[Telegram.WebApp] Biometric reason is too long",dn),Error("WebAppBiometricRequestAccessParamInvalid");dn.length>0&&(Fr.reason=dn)}return Pr={callback:Tr},a.postEvent("web_app_biometry_request_auth",!1,Fr),Ir},Ir.updateBiometricToken=function(Zr,Tr){if(!kr())return Ir;if(Zr=Zr||"",Zr.length>1024)throw console.error("[Telegram.WebApp] Token is too long",Zr),Error("WebAppBiometricManagerTokenInvalid");if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!br)throw console.error("[Telegram.WebApp] Biometric access was not granted by the user."),Error("WebAppBiometricManagerBiometricAccessNotGranted");if(pn)throw console.error("[Telegram.WebApp] Token request is already in progress."),Error("WebAppBiometricManagerTokenUpdateRequested");return pn={callback:Tr},a.postEvent("web_app_biometry_update_token",!1,{token:Zr}),Ir},Ir.openSettings=function(){if(!kr())return Ir;if(jr(),!Yt)throw console.error("[Telegram.WebApp] Biometrics is not available on this device."),Error("WebAppBiometricManagerBiometricsNotAvailable");if(!ur)throw console.error("[Telegram.WebApp] Biometric access was not requested yet."),Error("WebAppBiometricManagerBiometricsAccessNotRequested");return br?(console.warn("[Telegram.WebApp] Biometric access was granted by the user, no need to go to settings."),Ir):(a.postEvent("web_app_biometry_open_settings",!1),Ir)},Ir}(),Jt={};function or(Qt,Yt){if(Yt.slug&&Jt[Yt.slug]){var gr=Jt[Yt.slug];delete Jt[Yt.slug],gr.callback&&gr.callback(Yt.status),kt("invoiceClosed",{url:gr.url,status:Yt.status})}}var Vr=!1;function vr(Qt,Yt){if(Vr){var gr=Vr;Vr=!1;var ur=null;typeof Yt.button_id<"u"&&(ur=Yt.button_id),gr.callback&&gr.callback(ur),kt("popupClosed",{button_id:ur})}}var yr=!1;function nn(Qt,Yt){if(yr){var gr=yr,ur=null;typeof Yt.data<"u"&&(ur=Yt.data),gr.callback&&gr.callback(ur)&&(yr=!1,a.postEvent("web_app_close_scan_qr_popup",!1)),kt("qrTextReceived",{data:ur})}}function Ut(Qt,Yt){yr=!1,kt("scanQrPopupClosed")}function Tt(Qt,Yt){if(Yt.req_id&&ir[Yt.req_id]){var gr=ir[Yt.req_id];delete ir[Yt.req_id];var ur=null;typeof Yt.data<"u"&&(ur=Yt.data),gr.callback&&gr.callback(ur),kt("clipboardTextReceived",{data:ur})}}var Ot=!1;function qt(Qt,Yt){if(Ot){var gr=Ot;Ot=!1,gr.callback&&gr.callback(Yt.status=="allowed"),kt("writeAccessRequested",{status:Yt.status})}}function tr(Qt,Yt){var gr,ur,br=0,rn=function(){sn("getRequestedContact",{},function(Ir,an){an&&an.length?(clearTimeout(ur),Qt(an)):(br+=50,gr=setTimeout(rn,br))})},wr=function(){clearTimeout(gr),Qt("")};ur=setTimeout(wr,Yt),rn()}var Er=!1;function fr(Qt,Yt){if(Er){var gr=Er;Er=!1;var ur=Yt.status=="sent",br={status:Yt.status};ur?tr(function(rn){if(rn&&rn.length){br.response=rn,br.responseUnsafe=e.urlParseQueryString(rn);for(var wr in br.responseUnsafe){var Ir=br.responseUnsafe[wr];try{(Ir.substr(0,1)=="{"&&Ir.substr(-1)=="}"||Ir.substr(0,1)=="["&&Ir.substr(-1)=="]")&&(br.responseUnsafe[wr]=JSON.parse(Ir))}catch{}}}gr.callback&&gr.callback(ur,br),kt("contactRequested",br)},3e3):(gr.callback&&gr.callback(ur,br),kt("contactRequested",br))}}function Br(Qt,Yt){if(Yt.req_id&&ir[Yt.req_id]){var gr=ir[Yt.req_id];delete ir[Yt.req_id];var ur=null,br=null;typeof Yt.result<"u"&&(ur=Yt.result),typeof Yt.error<"u"&&(br=Yt.error),gr.callback&&gr.callback(br,ur)}}function sn(Qt,Yt,gr){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method invokeCustomMethod is not supported in version "+nt),Error("WebAppMethodUnsupported");var ur=mt(16),br={req_id:ur,method:Qt,params:Yt||{}};ir[ur]={callback:gr},a.postEvent("web_app_invoke_custom_method",!1,br)}window.Telegram||(window.Telegram={}),Object.defineProperty(h,"initData",{get:function(){return d},enumerable:!0}),Object.defineProperty(h,"initDataUnsafe",{get:function(){return j},enumerable:!0}),Object.defineProperty(h,"version",{get:function(){return nt},enumerable:!0}),Object.defineProperty(h,"platform",{get:function(){return at},enumerable:!0}),Object.defineProperty(h,"colorScheme",{get:function(){return rt},enumerable:!0}),Object.defineProperty(h,"themeParams",{get:function(){return et},enumerable:!0}),Object.defineProperty(h,"isExpanded",{get:function(){return it},enumerable:!0}),Object.defineProperty(h,"viewportHeight",{get:function(){return($===!1?window.innerHeight:$)-Ar},enumerable:!0}),Object.defineProperty(h,"viewportStableHeight",{get:function(){return(tt===!1?window.innerHeight:tt)-Ar},enumerable:!0}),Object.defineProperty(h,"isClosingConfirmationEnabled",{set:function(Qt){pt(Qt)},get:function(){return ct},enumerable:!0}),Object.defineProperty(h,"isVerticalSwipesEnabled",{set:function(Qt){lt(Qt)},get:function(){return vt},enumerable:!0}),Object.defineProperty(h,"headerColor",{set:function(Qt){Mt(Qt)},get:function(){return xt()},enumerable:!0}),Object.defineProperty(h,"backgroundColor",{set:function(Qt){Ht(Qt)},get:function(){return Dt()},enumerable:!0}),Object.defineProperty(h,"BackButton",{value:Jr,enumerable:!0}),Object.defineProperty(h,"MainButton",{value:lr,enumerable:!0}),Object.defineProperty(h,"SettingsButton",{value:un,enumerable:!0}),Object.defineProperty(h,"HapticFeedback",{value:Cr,enumerable:!0}),Object.defineProperty(h,"CloudStorage",{value:Or,enumerable:!0}),Object.defineProperty(h,"BiometricManager",{value:fn,enumerable:!0}),h.setHeaderColor=function(Qt){h.headerColor=Qt},h.setBackgroundColor=function(Qt){h.backgroundColor=Qt},h.enableClosingConfirmation=function(){h.isClosingConfirmationEnabled=!0},h.disableClosingConfirmation=function(){h.isClosingConfirmationEnabled=!1},h.enableVerticalSwipes=function(){h.isVerticalSwipesEnabled=!0},h.disableVerticalSwipes=function(){h.isVerticalSwipesEnabled=!1},h.isVersionAtLeast=function(Qt){return cr(Qt)},h.onEvent=function(Qt,Yt){jt(Qt,Yt)},h.offEvent=function(Qt,Yt){zt(Qt,Yt)},h.sendData=function(Qt){if(!Qt||!Qt.length)throw console.error("[Telegram.WebApp] Data is required",Qt),Error("WebAppDataInvalid");if(xr(Qt)>4096)throw console.error("[Telegram.WebApp] Data is too long",Qt),Error("WebAppDataInvalid");a.postEvent("web_app_data_send",!1,{data:Qt})},h.switchInlineQuery=function(Qt,Yt){if(!cr("6.6"))throw console.error("[Telegram.WebApp] Method switchInlineQuery is not supported in version "+nt),Error("WebAppMethodUnsupported");if(!o.tgWebAppBotInline)throw console.error("[Telegram.WebApp] Inline mode is disabled for this bot. Read more about inline mode: https://core.telegram.org/bots/inline"),Error("WebAppInlineModeDisabled");if(Qt=Qt||"",Qt.length>256)throw console.error("[Telegram.WebApp] Inline query is too long",Qt),Error("WebAppInlineQueryInvalid");var gr=[];if(Yt){if(!Array.isArray(Yt))throw console.error("[Telegram.WebApp] Choose chat types should be an array",Yt),Error("WebAppInlineChooseChatTypesInvalid");for(var ur={users:1,bots:1,groups:1,channels:1},br=0;br64)throw console.error("[Telegram.WebApp] Popup title is too long",gr),Error("WebAppPopupParamInvalid");gr.length>0&&(rn.title=gr)}if(typeof Qt.message<"u"&&(ur=Bt(Qt.message)),!ur.length)throw console.error("[Telegram.WebApp] Popup message is required",Qt.message),Error("WebAppPopupParamInvalid");if(ur.length>256)throw console.error("[Telegram.WebApp] Popup message is too long",ur),Error("WebAppPopupParamInvalid");if(rn.message=ur,typeof Qt.buttons<"u"){if(!Array.isArray(Qt.buttons))throw console.error("[Telegram.WebApp] Popup buttons should be an array",Qt.buttons),Error("WebAppPopupParamInvalid");for(var wr=0;wr64))throw console.error("[Telegram.WebApp] Popup button id is too long",Sr),Error("WebAppPopupParamInvalid");an.id=Sr;var Pr=Ir.type;if(typeof Pr>"u"&&(Pr="default"),an.type=Pr,!(Pr=="ok"||Pr=="close"||Pr=="cancel"))if(Pr=="default"||Pr=="destructive"){var pn="";if(typeof Ir.text<"u"&&(pn=Bt(Ir.text)),!pn.length)throw console.error("[Telegram.WebApp] Popup button text is required for type "+Pr,Ir.text),Error("WebAppPopupParamInvalid");if(pn.length>64)throw console.error("[Telegram.WebApp] Popup button text is too long",pn),Error("WebAppPopupParamInvalid");an.text=pn}else throw console.error("[Telegram.WebApp] Popup button type is invalid",Pr),Error("WebAppPopupParamInvalid");br.push(an)}}else br.push({id:"",type:"close"});if(br.length<1)throw console.error("[Telegram.WebApp] Popup should have at least one button"),Error("WebAppPopupParamInvalid");if(br.length>3)throw console.error("[Telegram.WebApp] Popup should not have more than 3 buttons"),Error("WebAppPopupParamInvalid");rn.buttons=br,Vr={callback:Yt},a.postEvent("web_app_open_popup",!1,rn)},h.showAlert=function(Qt,Yt){h.showPopup({message:Qt},Yt?function(){Yt()}:null)},h.showConfirm=function(Qt,Yt){h.showPopup({message:Qt,buttons:[{type:"ok",id:"ok"},{type:"cancel"}]},Yt?function(gr){Yt(gr=="ok")}:null)},h.showScanQrPopup=function(Qt,Yt){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method showScanQrPopup is not supported in version "+nt),Error("WebAppMethodUnsupported");if(yr)throw console.error("[Telegram.WebApp] Popup is already opened"),Error("WebAppScanQrPopupOpened");var gr="",ur={};if(typeof Qt.text<"u"){if(gr=Bt(Qt.text),gr.length>64)throw console.error("[Telegram.WebApp] Scan QR popup text is too long",gr),Error("WebAppScanQrPopupParamInvalid");gr.length>0&&(ur.text=gr)}yr={callback:Yt},a.postEvent("web_app_open_scan_qr_popup",!1,ur)},h.closeScanQrPopup=function(){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method closeScanQrPopup is not supported in version "+nt),Error("WebAppMethodUnsupported");yr=!1,a.postEvent("web_app_close_scan_qr_popup",!1)},h.readTextFromClipboard=function(Qt){if(!cr("6.4"))throw console.error("[Telegram.WebApp] Method readTextFromClipboard is not supported in version "+nt),Error("WebAppMethodUnsupported");var Yt=mt(16),gr={req_id:Yt};ir[Yt]={callback:Qt},a.postEvent("web_app_read_text_from_clipboard",!1,gr)},h.requestWriteAccess=function(Qt){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method requestWriteAccess is not supported in version "+nt),Error("WebAppMethodUnsupported");if(Ot)throw console.error("[Telegram.WebApp] Write access is already requested"),Error("WebAppWriteAccessRequested");Ot={callback:Qt},a.postEvent("web_app_request_write_access")},h.requestContact=function(Qt){if(!cr("6.9"))throw console.error("[Telegram.WebApp] Method requestContact is not supported in version "+nt),Error("WebAppMethodUnsupported");if(Er)throw console.error("[Telegram.WebApp] Contact is already requested"),Error("WebAppContactRequested");Er={callback:Qt},a.postEvent("web_app_request_phone")},h.shareToStory=function(Qt,Yt){if(Yt=Yt||{},!cr("7.8"))throw console.error("[Telegram.WebApp] Method shareToStory is not supported in version "+nt),Error("WebAppMethodUnsupported");var gr=document.createElement("A");if(gr.href=Qt,gr.protocol!="http:"&&gr.protocol!="https:")throw console.error("[Telegram.WebApp] Media url protocol is not supported",url),Error("WebAppMediaUrlInvalid");var ur={};if(ur.media_url=gr.href,typeof Yt.text<"u"){var br=Bt(Yt.text);if(br.length>2048)throw console.error("[Telegram.WebApp] Text is too long",br),Error("WebAppShareToStoryParamInvalid");br.length>0&&(ur.text=br)}if(typeof Yt.widget_link<"u"){if(Yt.widget_link=Yt.widget_link||{},gr.href=Yt.widget_link.url,gr.protocol!="http:"&&gr.protocol!="https:")throw console.error("[Telegram.WebApp] Link protocol is not supported",url),Error("WebAppShareToStoryParamInvalid");var rn={url:gr.href};if(typeof Yt.widget_link.name<"u"){var wr=Bt(Yt.widget_link.name);if(wr.length>48)throw console.error("[Telegram.WebApp] Link name is too long",wr),Error("WebAppShareToStoryParamInvalid");wr.length>0&&(rn.name=wr)}ur.widget_link=rn}a.postEvent("web_app_share_to_story",!1,ur)},h.invokeCustomMethod=function(Qt,Yt,gr){sn(Qt,Yt,gr)},h.ready=function(){a.postEvent("web_app_ready")},h.expand=function(){a.postEvent("web_app_expand")},h.close=function(Qt){Qt=Qt||{};var Yt={};cr("7.6")&&Qt.return_back&&(Yt.return_back=!0),a.postEvent("web_app_close",!1,Yt)},window.Telegram.WebApp=h,Nt(),Vt(),st(),o.tgWebAppShowSettings&&un.show(),window.addEventListener("resize",_t),c&&document.addEventListener("click",At),a.onEvent("theme_changed",$t),a.onEvent("viewport_changed",Et),a.onEvent("invoice_closed",or),a.onEvent("popup_closed",vr),a.onEvent("qr_text_received",nn),a.onEvent("scan_qr_popup_closed",Ut),a.onEvent("clipboard_text_received",Tt),a.onEvent("write_access_requested",qt),a.onEvent("phone_requested",fr),a.onEvent("custom_method_invoked",Br),a.postEvent("web_app_request_theme"),a.postEvent("web_app_request_viewport")})();Object.defineProperty(sdk,"__esModule",{value:!0});sdk.WebApp=void 0;var telegramWindow=window;sdk.WebApp=telegramWindow.Telegram.WebApp;Object.defineProperty(dist$1,"__esModule",{value:!0});var sdk_1=sdk,_default=dist$1.default=sdk_1.WebApp;const telegramCloudStorage={setItem:(e,a,o)=>{_default.CloudStorage.setItem(e,a,o)},getItem:(e,a)=>{_default.CloudStorage.getItem(e,a)},getItems:(e,a)=>{_default.CloudStorage.getItems(e,a)},getKeys:e=>{_default.CloudStorage.getKeys(e)},removeItem:(e,a)=>{_default.CloudStorage.removeItem(e,a)},removeItems:(e,a)=>{_default.CloudStorage.removeItems(e,a)}},INITIAL_CHUNK_COUNT=32,MAX_RETRIES=256,storeWithChunking=async(e,a,o)=>{const c=(d,j)=>new Promise((et,rt)=>{telegramCloudStorage.setItem(d,j,nt=>{nt?rt(nt):et()})}),h=async(d,j,et=0)=>{if(et>MAX_RETRIES)throw new Error(`Failed to store after ${MAX_RETRIES} splitting attempts`);const rt=[];if(await Promise.all(j.map(async(at,ot)=>{const gt=`${d}_chunk_${ot}`;try{await c(gt,at)}catch{rt.push({index:ot,value:at})}})),rt.length===0)return j.length;const nt=j.filter((at,ot)=>!rt.some(gt=>gt.index===ot));for(const{value:at}of rt){const ot=Math.ceil(at.length/2);nt.push(at.slice(0,ot),at.slice(ot))}return h(d,nt,et+1)};try{const d=Math.ceil(a.length/INITIAL_CHUNK_COUNT),j=Array.from({length:INITIAL_CHUNK_COUNT},(rt,nt)=>a.slice(nt*d,(nt+1)*d)).filter(rt=>rt.length>0),et=await h(e,j);return await c(`${e}_meta`,JSON.stringify({totalChunks:et})),et}catch(d){throw o(`Failed to store "${e}": ${d instanceof Error?d.message:String(d)}`),d}},retrieveChunkedData=async(e,a,o)=>{const c=h=>new Promise((d,j)=>{telegramCloudStorage.getItem(h,(et,rt)=>{et?j(et):d(rt)})});try{const h=await c(`${e}_meta`);if(!h)return;const{totalChunks:d}=JSON.parse(h);a(`Retrieving data for "${e}" (${d} chunks)`),await new Promise(rt=>setTimeout(rt,250));const et=(await Promise.all(Array.from({length:d},async(rt,nt)=>await c(`${e}_chunk_${nt}`)||""))).join("");return a(`Successfully retrieved and recombined data for "${e}"`),await new Promise(rt=>setTimeout(rt,500)),et}catch(h){throw o(`Failed to retrieve data for "${e}": ${h instanceof Error?h.message:String(h)}`),h}},clearChunkedStorage=async(e,a)=>{try{e("Starting storage clearance..."),await new Promise(h=>setTimeout(h,500));const o=await new Promise((h,d)=>{telegramCloudStorage.getKeys((j,et)=>{j?d(j):h(et||[])})}),c={};o.forEach(h=>{const d=h.endsWith("_meta")?h.replace("_meta",""):h;c[d]||(c[d]=[]),c[d].push(h)}),await Promise.all(Object.entries(c).map(async([h,d])=>{if(d.includes(`${h}_meta`)){const j=await new Promise((et,rt)=>{telegramCloudStorage.getItem(`${h}_meta`,(nt,at)=>{nt?rt(nt):et(at)})});if(j){const{totalChunks:et}=JSON.parse(j);d.push(...Array.from({length:et},(rt,nt)=>`${h}_chunk_${nt}`))}}await new Promise((j,et)=>{telegramCloudStorage.removeItems(d,rt=>{rt?et(rt):j()})})})),e("Storage cleared successfully"),await new Promise(h=>setTimeout(h,500))}catch(o){throw a(`Error clearing storage: ${o instanceof Error?o.message:String(o)}`),o}};var buffer$1={},base64Js$1={};base64Js$1.byteLength=byteLength$1;base64Js$1.toByteArray=toByteArray$1;base64Js$1.fromByteArray=fromByteArray$1;var lookup$1=[],revLookup$1=[],Arr$1=typeof Uint8Array<"u"?Uint8Array:Array,code$1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$2=0,len$1=code$1.length;i$20)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");o===-1&&(o=a);var c=o===a?0:4-o%4;return[o,c]}function byteLength$1(e){var a=getLens$1(e),o=a[0],c=a[1];return(o+c)*3/4-c}function _byteLength$1(e,a,o){return(a+o)*3/4-o}function toByteArray$1(e){var a,o=getLens$1(e),c=o[0],h=o[1],d=new Arr$1(_byteLength$1(e,c,h)),j=0,et=h>0?c-4:c,rt;for(rt=0;rt>16&255,d[j++]=a>>8&255,d[j++]=a&255;return h===2&&(a=revLookup$1[e.charCodeAt(rt)]<<2|revLookup$1[e.charCodeAt(rt+1)]>>4,d[j++]=a&255),h===1&&(a=revLookup$1[e.charCodeAt(rt)]<<10|revLookup$1[e.charCodeAt(rt+1)]<<4|revLookup$1[e.charCodeAt(rt+2)]>>2,d[j++]=a>>8&255,d[j++]=a&255),d}function tripletToBase64$1(e){return lookup$1[e>>18&63]+lookup$1[e>>12&63]+lookup$1[e>>6&63]+lookup$1[e&63]}function encodeChunk$1(e,a,o){for(var c,h=[],d=a;det?et:j+d));return c===1?(a=e[o-1],h.push(lookup$1[a>>2]+lookup$1[a<<4&63]+"==")):c===2&&(a=(e[o-2]<<8)+e[o-1],h.push(lookup$1[a>>10]+lookup$1[a>>4&63]+lookup$1[a<<2&63]+"=")),h.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(e,a,o,c,h){var d,j,et=h*8-c-1,rt=(1<>1,at=-7,ot=o?h-1:0,gt=o?-1:1,bt=e[a+ot];for(ot+=gt,d=bt&(1<<-at)-1,bt>>=-at,at+=et;at>0;d=d*256+e[a+ot],ot+=gt,at-=8);for(j=d&(1<<-at)-1,d>>=-at,at+=c;at>0;j=j*256+e[a+ot],ot+=gt,at-=8);if(d===0)d=1-nt;else{if(d===rt)return j?NaN:(bt?-1:1)*(1/0);j=j+Math.pow(2,c),d=d-nt}return(bt?-1:1)*j*Math.pow(2,d-c)};ieee754.write=function(e,a,o,c,h,d){var j,et,rt,nt=d*8-h-1,at=(1<>1,gt=h===23?Math.pow(2,-24)-Math.pow(2,-77):0,bt=c?0:d-1,wt=c?1:-1,$t=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(et=isNaN(a)?1:0,j=at):(j=Math.floor(Math.log(a)/Math.LN2),a*(rt=Math.pow(2,-j))<1&&(j--,rt*=2),j+ot>=1?a+=gt/rt:a+=gt*Math.pow(2,1-ot),a*rt>=2&&(j++,rt/=2),j+ot>=at?(et=0,j=at):j+ot>=1?(et=(a*rt-1)*Math.pow(2,h),j=j+ot):(et=a*Math.pow(2,ot-1)*Math.pow(2,h),j=0));h>=8;e[o+bt]=et&255,bt+=wt,et/=256,h-=8);for(j=j<0;e[o+bt]=j&255,bt+=wt,j/=256,nt-=8);e[o+bt-wt]|=$t*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh @@ -261,7 +261,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Zap=createLucideIcon("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),ErrorState=({error:e,onRetry:a})=>jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center p-6 animate-fade-in fill-both",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-md mx-auto text-center space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"relative inline-flex",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-destructive/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsx("div",{className:"relative bg-background border border-border rounded-full p-4",children:jsxRuntimeExports.jsx(CircleAlert,{className:"w-12 h-12 text-destructive animate-fade-in"})})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-2 animate-slide-in-from-bottom delay-1 fill-both",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Something went wrong"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-base max-w-sm mx-auto break-words",children:e})]}),a&&jsxRuntimeExports.jsx(Button,{onClick:a,className:"animate-slide-in-from-bottom delay-2 fill-both bg-secondary hover:bg-secondary/90 transition-colors duration-200",children:"Try Again"})]})}),LoadingState=({message:e="Loading..."})=>jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center p-6 animate-fade-in fill-both",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-md mx-auto text-center space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"relative inline-flex",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-secondary/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-16 rounded-full border-4 border-secondary/30 border-t-secondary animate-spin"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 w-16 h-16 rounded-full border-4 border-primary/20 border-b-primary animate-spin-reverse"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 m-auto w-3 h-3 bg-primary rounded-full animate-pulse"})]})]}),jsxRuntimeExports.jsx("div",{className:"space-y-2 animate-slide-in-from-bottom delay-1 fill-both",children:jsxRuntimeExports.jsx("p",{className:"text-base font-medium text-foreground",children:e})})]})}),OnboardingScreen=({setScreen:e})=>{const[a,o]=reactExports.useState(!1),[c,h]=reactExports.useState(""),[d,j]=reactExports.useState(null);reactExports.useEffect(()=>{et()},[]);const et=async()=>{var nt;o(!0),h("Starting the initialization of Capsule Telegram Mini App Demo..."),j(null);try{if(_default.ready(),!_default.initDataUnsafe.user){j("Error during initialization: User data not found");return}const at=(nt=_default.initDataUnsafe.user)==null?void 0:nt.username;if(!at){j("Error during initialization: Username not found");return}h(`User authenticated successfully: ${at}`),await new Promise(gt=>setTimeout(gt,1e3)),h(`Checking Telegram cloud storage for existing wallet data associated with user ${at}...`);const ot=await retrieveChunkedData("userShare",h,j);ot?(h("Existing wallet data found. Setting up your wallet..."),await capsuleClient.setUserShare(ot),h("Initialization complete. Redirecting to the app..."),await new Promise(gt=>setTimeout(gt,1e3)),e("home")):(h(`No existing wallet data found for user ${at}. Proceeding with new wallet creation...`),await new Promise(gt=>setTimeout(gt,1e3)))}catch(at){j(`Initialization error: ${at instanceof Error?at.message:String(at)}. Please try again or contact support if the issue persists.`)}finally{o(!1),h("")}},rt=async()=>{var nt;o(!0),h("Generating a new wallet..."),j(null);try{const at=(nt=_default.initDataUnsafe.user)==null?void 0:nt.username;if(!at){j("Error: Username not found. Unable to create wallet.");return}const ot=`${at+crypto.randomUUID().split("-")[0]}@test.usecapsule.com`;h("Creating wallet with pre-generated identifier...");const gt=await capsuleClient.createWalletPreGen(WalletType.EVM,ot);h(`Wallet created successfully. Address: ${gt.address||"N/A"}`),await new Promise(wt=>setTimeout(wt,1e3)),h("Retrieving user wallet share...");const bt=await capsuleClient.getUserShare()||"";await new Promise(wt=>setTimeout(wt,1e3)),h("Wallet setup complete. Redirecting to the app..."),await new Promise(wt=>setTimeout(wt,1e3)),storeWithChunking("userShare",bt,h,j).catch(wt=>{console.error("Failed to store wallet data:",wt)}),await new Promise(wt=>setTimeout(wt,1e3)),e("home")}catch(at){j(`Error: ${at instanceof Error?at.message:String(at)}. Please try again or contact support.`)}finally{o(!1),h("")}};return d?jsxRuntimeExports.jsx(ErrorState,{error:d}):a?jsxRuntimeExports.jsx(LoadingState,{message:c}):jsxRuntimeExports.jsxs("div",{className:"h-full flex flex-col justify-between p-6 bg-background animate-fade-in fill-both",children:[jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center",children:[jsxRuntimeExports.jsxs("div",{className:"relative mb-8",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsx("div",{className:"relative w-24 h-24 text-primary transition-all duration-300 hover:scale-105 hover:rotate-3",children:jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full animate-slide-in-from-top fill-both",children:[jsxRuntimeExports.jsx("path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4"}),jsxRuntimeExports.jsx("path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5"}),jsxRuntimeExports.jsx("path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z"})]})})]}),jsxRuntimeExports.jsxs("div",{className:"text-center space-y-4 mb-12 animate-slide-in-from-bottom delay-1 fill-both",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold text-foreground",children:"Beyond Web3 Authentication"}),jsxRuntimeExports.jsx("p",{className:"text-lg text-muted-foreground max-w-sm",children:"Cross-app wallets that work everywhere"})]}),jsxRuntimeExports.jsxs("div",{className:"w-full max-w-sm space-y-4 animate-slide-in-from-bottom delay-2 fill-both",children:[jsxRuntimeExports.jsx("div",{className:"group bg-secondary/5 border border-secondary/20 rounded-lg p-4 transition-all duration-200 hover:bg-secondary/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-secondary/10 text-secondary",children:jsxRuntimeExports.jsx(Shield,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Enterprise Security"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Industry-leading MPC protection"})]})]})}),jsxRuntimeExports.jsx("div",{className:"group bg-primary/5 border border-primary/20 rounded-lg p-4 transition-all duration-200 hover:bg-primary/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-primary/10 text-primary",children:jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Universal Access"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Cross-app compatibility built in"})]})]})}),jsxRuntimeExports.jsx("div",{className:"group bg-accent/5 border border-accent/20 rounded-lg p-4 transition-all duration-200 hover:bg-accent/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-accent/10 text-accent",children:jsxRuntimeExports.jsx(Wallet,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Start Instantly"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Ready to use in seconds"})]})]})})]})]}),jsxRuntimeExports.jsx("div",{className:"animate-slide-in-from-bottom delay-4 fill-both",children:jsxRuntimeExports.jsx(Button,{size:"lg",onClick:rt,className:"w-full h-14 bg-primary text-primary-foreground hover:bg-primary/90 transition-all duration-300 group",children:jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-2",children:["Create Wallet",jsxRuntimeExports.jsx(Wallet,{className:"w-5 h-5 transition-transform duration-300 group-hover:rotate-6"})]})})})]})};function composeEventHandlers(e,a,{checkForDefaultPrevented:o=!0}={}){return function(h){if(e==null||e(h),o===!1||!h.defaultPrevented)return a==null?void 0:a(h)}}function createContext2(e,a){const o=reactExports.createContext(a),c=d=>{const{children:j,...et}=d,rt=reactExports.useMemo(()=>et,Object.values(et));return jsxRuntimeExports.jsx(o.Provider,{value:rt,children:j})};c.displayName=e+"Provider";function h(d){const j=reactExports.useContext(o);if(j)return j;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${e}\``)}return[c,h]}function createContextScope(e,a=[]){let o=[];function c(d,j){const et=reactExports.createContext(j),rt=o.length;o=[...o,j];const nt=ot=>{var Et;const{scope:gt,children:bt,...wt}=ot,$t=((Et=gt==null?void 0:gt[e])==null?void 0:Et[rt])||et,St=reactExports.useMemo(()=>wt,Object.values(wt));return jsxRuntimeExports.jsx($t.Provider,{value:St,children:bt})};nt.displayName=d+"Provider";function at(ot,gt){var $t;const bt=(($t=gt==null?void 0:gt[e])==null?void 0:$t[rt])||et,wt=reactExports.useContext(bt);if(wt)return wt;if(j!==void 0)return j;throw new Error(`\`${ot}\` must be used within \`${d}\``)}return[nt,at]}const h=()=>{const d=o.map(j=>reactExports.createContext(j));return function(et){const rt=(et==null?void 0:et[e])||d;return reactExports.useMemo(()=>({[`__scope${e}`]:{...et,[e]:rt}}),[et,rt])}};return h.scopeName=e,[c,composeContextScopes(h,...a)]}function composeContextScopes(...e){const a=e[0];if(e.length===1)return a;const o=()=>{const c=e.map(h=>({useScope:h(),scopeName:h.scopeName}));return function(d){const j=c.reduce((et,{useScope:rt,scopeName:nt})=>{const ot=rt(d)[`__scope${nt}`];return{...et,...ot}},{});return reactExports.useMemo(()=>({[`__scope${a.scopeName}`]:j}),[j])}};return o.scopeName=a.scopeName,o}var useLayoutEffect2=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},useReactId=React$1.useId||(()=>{}),count$1=0;function useId(e){const[a,o]=reactExports.useState(useReactId());return useLayoutEffect2(()=>{e||o(c=>c??String(count$1++))},[e]),e||(a?`radix-${a}`:"")}function useCallbackRef$1(e){const a=reactExports.useRef(e);return reactExports.useEffect(()=>{a.current=e}),reactExports.useMemo(()=>(...o)=>{var c;return(c=a.current)==null?void 0:c.call(a,...o)},[])}function useControllableState({prop:e,defaultProp:a,onChange:o=()=>{}}){const[c,h]=useUncontrolledState({defaultProp:a,onChange:o}),d=e!==void 0,j=d?e:c,et=useCallbackRef$1(o),rt=reactExports.useCallback(nt=>{if(d){const ot=typeof nt=="function"?nt(e):nt;ot!==e&&et(ot)}else h(nt)},[d,e,h,et]);return[j,rt]}function useUncontrolledState({defaultProp:e,onChange:a}){const o=reactExports.useState(e),[c]=o,h=reactExports.useRef(c),d=useCallbackRef$1(a);return reactExports.useEffect(()=>{h.current!==c&&(d(c),h.current=c)},[c,h,d]),o}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Primitive$1=NODES.reduce((e,a)=>{const o=reactExports.forwardRef((c,h)=>{const{asChild:d,...j}=c,et=d?Slot:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntimeExports.jsx(et,{...j,ref:h})});return o.displayName=`Primitive.${a}`,{...e,[a]:o}},{});function dispatchDiscreteCustomEvent(e,a){e&&reactDomExports.flushSync(()=>e.dispatchEvent(a))}function useEscapeKeydown(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e);reactExports.useEffect(()=>{const c=h=>{h.key==="Escape"&&o(h)};return a.addEventListener("keydown",c,{capture:!0}),()=>a.removeEventListener("keydown",c,{capture:!0})},[o,a])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=reactExports.forwardRef((e,a)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:c,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:j,onDismiss:et,...rt}=e,nt=reactExports.useContext(DismissableLayerContext),[at,ot]=reactExports.useState(null),gt=(at==null?void 0:at.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,bt]=reactExports.useState({}),wt=useComposedRefs(a,zt=>ot(zt)),$t=Array.from(nt.layers),[St]=[...nt.layersWithOutsidePointerEventsDisabled].slice(-1),Et=$t.indexOf(St),_t=at?$t.indexOf(at):-1,At=nt.layersWithOutsidePointerEventsDisabled.size>0,Bt=_t>=Et,kt=usePointerDownOutside(zt=>{const Xt=zt.target,Wt=[...nt.branches].some(ir=>ir.contains(Xt));!Bt||Wt||(h==null||h(zt),j==null||j(zt),zt.defaultPrevented||et==null||et())},gt),jt=useFocusOutside(zt=>{const Xt=zt.target;[...nt.branches].some(ir=>ir.contains(Xt))||(d==null||d(zt),j==null||j(zt),zt.defaultPrevented||et==null||et())},gt);return useEscapeKeydown(zt=>{_t===nt.layers.size-1&&(c==null||c(zt),!zt.defaultPrevented&&et&&(zt.preventDefault(),et()))},gt),reactExports.useEffect(()=>{if(at)return o&&(nt.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=gt.body.style.pointerEvents,gt.body.style.pointerEvents="none"),nt.layersWithOutsidePointerEventsDisabled.add(at)),nt.layers.add(at),dispatchUpdate(),()=>{o&&nt.layersWithOutsidePointerEventsDisabled.size===1&&(gt.body.style.pointerEvents=originalBodyPointerEvents)}},[at,gt,o,nt]),reactExports.useEffect(()=>()=>{at&&(nt.layers.delete(at),nt.layersWithOutsidePointerEventsDisabled.delete(at),dispatchUpdate())},[at,nt]),reactExports.useEffect(()=>{const zt=()=>bt({});return document.addEventListener(CONTEXT_UPDATE,zt),()=>document.removeEventListener(CONTEXT_UPDATE,zt)},[]),jsxRuntimeExports.jsx(Primitive$1.div,{...rt,ref:wt,style:{pointerEvents:At?Bt?"auto":"none":void 0,...e.style},onFocusCapture:composeEventHandlers(e.onFocusCapture,jt.onFocusCapture),onBlurCapture:composeEventHandlers(e.onBlurCapture,jt.onBlurCapture),onPointerDownCapture:composeEventHandlers(e.onPointerDownCapture,kt.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=reactExports.forwardRef((e,a)=>{const o=reactExports.useContext(DismissableLayerContext),c=reactExports.useRef(null),h=useComposedRefs(a,c);return reactExports.useEffect(()=>{const d=c.current;if(d)return o.branches.add(d),()=>{o.branches.delete(d)}},[o.branches]),jsxRuntimeExports.jsx(Primitive$1.div,{...e,ref:h})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e),c=reactExports.useRef(!1),h=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const d=et=>{if(et.target&&!c.current){let rt=function(){handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE,o,nt,{discrete:!0})};const nt={originalEvent:et};et.pointerType==="touch"?(a.removeEventListener("click",h.current),h.current=rt,a.addEventListener("click",h.current,{once:!0})):rt()}else a.removeEventListener("click",h.current);c.current=!1},j=window.setTimeout(()=>{a.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(j),a.removeEventListener("pointerdown",d),a.removeEventListener("click",h.current)}},[a,o]),{onPointerDownCapture:()=>c.current=!0}}function useFocusOutside(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e),c=reactExports.useRef(!1);return reactExports.useEffect(()=>{const h=d=>{d.target&&!c.current&&handleAndDispatchCustomEvent(FOCUS_OUTSIDE,o,{originalEvent:d},{discrete:!1})};return a.addEventListener("focusin",h),()=>a.removeEventListener("focusin",h)},[a,o]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function dispatchUpdate(){const e=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(e)}function handleAndDispatchCustomEvent(e,a,o,{discrete:c}){const h=o.originalEvent.target,d=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});a&&h.addEventListener(e,a,{once:!0}),c?dispatchDiscreteCustomEvent(h,d):h.dispatchEvent(d)}var AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=reactExports.forwardRef((e,a)=>{const{loop:o=!1,trapped:c=!1,onMountAutoFocus:h,onUnmountAutoFocus:d,...j}=e,[et,rt]=reactExports.useState(null),nt=useCallbackRef$1(h),at=useCallbackRef$1(d),ot=reactExports.useRef(null),gt=useComposedRefs(a,$t=>rt($t)),bt=reactExports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;reactExports.useEffect(()=>{if(c){let $t=function(At){if(bt.paused||!et)return;const Bt=At.target;et.contains(Bt)?ot.current=Bt:focus(ot.current,{select:!0})},St=function(At){if(bt.paused||!et)return;const Bt=At.relatedTarget;Bt!==null&&(et.contains(Bt)||focus(ot.current,{select:!0}))},Et=function(At){if(document.activeElement===document.body)for(const kt of At)kt.removedNodes.length>0&&focus(et)};document.addEventListener("focusin",$t),document.addEventListener("focusout",St);const _t=new MutationObserver(Et);return et&&_t.observe(et,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",$t),document.removeEventListener("focusout",St),_t.disconnect()}}},[c,et,bt.paused]),reactExports.useEffect(()=>{if(et){focusScopesStack.add(bt);const $t=document.activeElement;if(!et.contains($t)){const Et=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);et.addEventListener(AUTOFOCUS_ON_MOUNT,nt),et.dispatchEvent(Et),Et.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(et)),{select:!0}),document.activeElement===$t&&focus(et))}return()=>{et.removeEventListener(AUTOFOCUS_ON_MOUNT,nt),setTimeout(()=>{const Et=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS);et.addEventListener(AUTOFOCUS_ON_UNMOUNT,at),et.dispatchEvent(Et),Et.defaultPrevented||focus($t??document.body,{select:!0}),et.removeEventListener(AUTOFOCUS_ON_UNMOUNT,at),focusScopesStack.remove(bt)},0)}}},[et,nt,at,bt]);const wt=reactExports.useCallback($t=>{if(!o&&!c||bt.paused)return;const St=$t.key==="Tab"&&!$t.altKey&&!$t.ctrlKey&&!$t.metaKey,Et=document.activeElement;if(St&&Et){const _t=$t.currentTarget,[At,Bt]=getTabbableEdges(_t);At&&Bt?!$t.shiftKey&&Et===Bt?($t.preventDefault(),o&&focus(At,{select:!0})):$t.shiftKey&&Et===At&&($t.preventDefault(),o&&focus(Bt,{select:!0})):Et===_t&&$t.preventDefault()}},[o,c,bt.paused]);return jsxRuntimeExports.jsx(Primitive$1.div,{tabIndex:-1,...j,ref:gt,onKeyDown:wt})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst(e,{select:a=!1}={}){const o=document.activeElement;for(const c of e)if(focus(c,{select:a}),document.activeElement!==o)return}function getTabbableEdges(e){const a=getTabbableCandidates(e),o=findVisible(a,e),c=findVisible(a.reverse(),e);return[o,c]}function getTabbableCandidates(e){const a=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const h=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||h?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)a.push(o.currentNode);return a}function findVisible(e,a){for(const o of e)if(!isHidden(o,{upTo:a}))return o}function isHidden(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function isSelectableInput(e){return e instanceof HTMLInputElement&&"select"in e}function focus(e,{select:a=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&isSelectableInput(e)&&a&&e.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let e=[];return{add(a){const o=e[0];a!==o&&(o==null||o.pause()),e=arrayRemove(e,a),e.unshift(a)},remove(a){var o;e=arrayRemove(e,a),(o=e[0])==null||o.resume()}}}function arrayRemove(e,a){const o=[...e],c=o.indexOf(a);return c!==-1&&o.splice(c,1),o}function removeLinks(e){return e.filter(a=>a.tagName!=="A")}var PORTAL_NAME$1="Portal",Portal$1=reactExports.forwardRef((e,a)=>{var et;const{container:o,...c}=e,[h,d]=reactExports.useState(!1);useLayoutEffect2(()=>d(!0),[]);const j=o||h&&((et=globalThis==null?void 0:globalThis.document)==null?void 0:et.body);return j?ReactDOM.createPortal(jsxRuntimeExports.jsx(Primitive$1.div,{...c,ref:a}),j):null});Portal$1.displayName=PORTAL_NAME$1;function useStateMachine(e,a){return reactExports.useReducer((o,c)=>a[o][c]??o,e)}var Presence=e=>{const{present:a,children:o}=e,c=usePresence(a),h=typeof o=="function"?o({present:c.isPresent}):reactExports.Children.only(o),d=useComposedRefs(c.ref,getElementRef(h));return typeof o=="function"||c.isPresent?reactExports.cloneElement(h,{ref:d}):null};Presence.displayName="Presence";function usePresence(e){const[a,o]=reactExports.useState(),c=reactExports.useRef({}),h=reactExports.useRef(e),d=reactExports.useRef("none"),j=e?"mounted":"unmounted",[et,rt]=useStateMachine(j,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const nt=getAnimationName(c.current);d.current=et==="mounted"?nt:"none"},[et]),useLayoutEffect2(()=>{const nt=c.current,at=h.current;if(at!==e){const gt=d.current,bt=getAnimationName(nt);e?rt("MOUNT"):bt==="none"||(nt==null?void 0:nt.display)==="none"?rt("UNMOUNT"):rt(at&>!==bt?"ANIMATION_OUT":"UNMOUNT"),h.current=e}},[e,rt]),useLayoutEffect2(()=>{if(a){let nt;const at=a.ownerDocument.defaultView??window,ot=bt=>{const $t=getAnimationName(c.current).includes(bt.animationName);if(bt.target===a&&$t&&(rt("ANIMATION_END"),!h.current)){const St=a.style.animationFillMode;a.style.animationFillMode="forwards",nt=at.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=St)})}},gt=bt=>{bt.target===a&&(d.current=getAnimationName(c.current))};return a.addEventListener("animationstart",gt),a.addEventListener("animationcancel",ot),a.addEventListener("animationend",ot),()=>{at.clearTimeout(nt),a.removeEventListener("animationstart",gt),a.removeEventListener("animationcancel",ot),a.removeEventListener("animationend",ot)}}else rt("ANIMATION_END")},[a,rt]),{isPresent:["mounted","unmountSuspended"].includes(et),ref:reactExports.useCallback(nt=>{nt&&(c.current=getComputedStyle(nt)),o(nt)},[])}}function getAnimationName(e){return(e==null?void 0:e.animationName)||"none"}function getElementRef(e){var c,h;let a=(c=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:c.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?e.ref:(a=(h=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:h.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var count=0;function useFocusGuards(){reactExports.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",e[1]??createFocusGuard()),count++,()=>{count===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),count--}},[])}function createFocusGuard(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var __assign$1=function(){return __assign$1=Object.assign||function(a){for(var o,c=1,h=arguments.length;c"u")return zeroGap;var a=getOffset(e),o=document.documentElement.clientWidth,c=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,c-o+a[2]-a[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,a,o,c){var h=e.left,d=e.top,j=e.right,et=e.gap;return o===void 0&&(o="margin"),` + */const Zap=createLucideIcon("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),ErrorState=({error:e,onRetry:a})=>jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center p-6 animate-fade-in fill-both",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-md mx-auto text-center space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"relative inline-flex",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-destructive/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsx("div",{className:"relative bg-background border border-border rounded-full p-4",children:jsxRuntimeExports.jsx(CircleAlert,{className:"w-12 h-12 text-destructive animate-fade-in"})})]}),jsxRuntimeExports.jsxs("div",{className:"space-y-2 animate-slide-in-from-bottom delay-1 fill-both",children:[jsxRuntimeExports.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:"Something went wrong"}),jsxRuntimeExports.jsx("p",{className:"text-muted-foreground text-base max-w-sm mx-auto break-words",children:e})]}),a&&jsxRuntimeExports.jsx(Button,{onClick:a,className:"animate-slide-in-from-bottom delay-2 fill-both bg-secondary hover:bg-secondary/90 transition-colors duration-200",children:"Try Again"})]})}),LoadingState=({message:e="Loading..."})=>jsxRuntimeExports.jsx("div",{className:"h-full flex flex-col items-center justify-center p-6 animate-fade-in fill-both",children:jsxRuntimeExports.jsxs("div",{className:"w-full max-w-md mx-auto text-center space-y-6",children:[jsxRuntimeExports.jsxs("div",{className:"relative inline-flex",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-secondary/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsxs("div",{className:"relative",children:[jsxRuntimeExports.jsx("div",{className:"w-16 h-16 rounded-full border-4 border-secondary/30 border-t-secondary animate-spin"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 w-16 h-16 rounded-full border-4 border-primary/20 border-b-primary animate-spin-reverse"}),jsxRuntimeExports.jsx("div",{className:"absolute inset-0 m-auto w-3 h-3 bg-primary rounded-full animate-pulse"})]})]}),jsxRuntimeExports.jsx("div",{className:"space-y-2 animate-slide-in-from-bottom delay-1 fill-both",children:jsxRuntimeExports.jsx("p",{className:"text-base font-medium text-foreground",children:e})})]})}),OnboardingScreen=({setScreen:e})=>{const[a,o]=reactExports.useState(!1),[c,h]=reactExports.useState(""),[d,j]=reactExports.useState(null);reactExports.useEffect(()=>{et()},[]);const et=async()=>{var nt;o(!0),h("Starting the initialization of Capsule Telegram Mini App Demo..."),j(null);try{if(_default.ready(),!_default.initDataUnsafe.user){j("Error during initialization: User data not found");return}const at=(nt=_default.initDataUnsafe.user)==null?void 0:nt.username;if(!at){j("Error during initialization: Username not found");return}h(`User authenticated successfully: ${at}`),await new Promise(gt=>setTimeout(gt,1e3)),h(`Checking Telegram cloud storage for existing wallet data associated with user ${at}...`);const ot=await retrieveChunkedData("userShare",h,j);ot?(h("Existing wallet data found. Setting up your wallet..."),await capsuleClient.setUserShare(ot),h("Initialization complete. Redirecting to the app..."),await new Promise(gt=>setTimeout(gt,1e3)),e("home")):(h(`No existing wallet data found for user ${at}. Proceeding with new wallet creation...`),await new Promise(gt=>setTimeout(gt,1e3)))}catch(at){j(`Initialization error: ${at instanceof Error?at.message:String(at)}. Please try again or contact support if the issue persists.`),await new Promise(ot=>setTimeout(ot,1e3)),clearChunkedStorage(h,j).catch(ot=>{console.error("Failed to clear storage:",ot)})}finally{o(!1),h("")}},rt=async()=>{var nt;o(!0),h("Generating a new wallet..."),j(null);try{const at=(nt=_default.initDataUnsafe.user)==null?void 0:nt.username;if(!at){j("Error: Username not found. Unable to create wallet.");return}const ot=`${at+crypto.randomUUID().split("-")[0]}@test.usecapsule.com`;h("Creating wallet with pre-generated identifier...");const gt=await capsuleClient.createWalletPreGen(WalletType.EVM,ot);h(`Wallet created successfully. Address: ${gt.address||"N/A"}`),await new Promise(wt=>setTimeout(wt,1e3)),h("Retrieving user wallet share...");const bt=await capsuleClient.getUserShare()||"";await new Promise(wt=>setTimeout(wt,1e3)),h("Wallet setup complete. Redirecting to the app..."),await new Promise(wt=>setTimeout(wt,1e3)),storeWithChunking("userShare",bt,j).catch(wt=>{console.error("Failed to store wallet data:",wt)}),await new Promise(wt=>setTimeout(wt,1e3)),e("home")}catch(at){j(`Error: ${at instanceof Error?at.message:String(at)}. Please try again or contact support.`)}finally{o(!1),h("")}};return d?jsxRuntimeExports.jsx(ErrorState,{error:d}):a?jsxRuntimeExports.jsx(LoadingState,{message:c}):jsxRuntimeExports.jsxs("div",{className:"h-full flex flex-col justify-between p-6 bg-background animate-fade-in fill-both",children:[jsxRuntimeExports.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center",children:[jsxRuntimeExports.jsxs("div",{className:"relative mb-8",children:[jsxRuntimeExports.jsx("div",{className:"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse"}),jsxRuntimeExports.jsx("div",{className:"relative w-24 h-24 text-primary transition-all duration-300 hover:scale-105 hover:rotate-3",children:jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full animate-slide-in-from-top fill-both",children:[jsxRuntimeExports.jsx("path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4"}),jsxRuntimeExports.jsx("path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5"}),jsxRuntimeExports.jsx("path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z"})]})})]}),jsxRuntimeExports.jsxs("div",{className:"text-center space-y-4 mb-12 animate-slide-in-from-bottom delay-1 fill-both",children:[jsxRuntimeExports.jsx("h1",{className:"text-4xl font-bold text-foreground",children:"Beyond Web3 Authentication"}),jsxRuntimeExports.jsx("p",{className:"text-lg text-muted-foreground max-w-sm",children:"Cross-app wallets that work everywhere"})]}),jsxRuntimeExports.jsxs("div",{className:"w-full max-w-sm space-y-4 animate-slide-in-from-bottom delay-2 fill-both",children:[jsxRuntimeExports.jsx("div",{className:"group bg-secondary/5 border border-secondary/20 rounded-lg p-4 transition-all duration-200 hover:bg-secondary/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-secondary/10 text-secondary",children:jsxRuntimeExports.jsx(Shield,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Enterprise Security"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Industry-leading MPC protection"})]})]})}),jsxRuntimeExports.jsx("div",{className:"group bg-primary/5 border border-primary/20 rounded-lg p-4 transition-all duration-200 hover:bg-primary/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-primary/10 text-primary",children:jsxRuntimeExports.jsx(CircleCheckBig,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Universal Access"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Cross-app compatibility built in"})]})]})}),jsxRuntimeExports.jsx("div",{className:"group bg-accent/5 border border-accent/20 rounded-lg p-4 transition-all duration-200 hover:bg-accent/10",children:jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-3",children:[jsxRuntimeExports.jsx("div",{className:"p-2 rounded-full bg-accent/10 text-accent",children:jsxRuntimeExports.jsx(Wallet,{className:"w-5 h-5"})}),jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("h3",{className:"font-medium text-foreground",children:"Start Instantly"}),jsxRuntimeExports.jsx("p",{className:"text-sm text-muted-foreground",children:"Ready to use in seconds"})]})]})})]})]}),jsxRuntimeExports.jsx("div",{className:"animate-slide-in-from-bottom delay-4 fill-both",children:jsxRuntimeExports.jsx(Button,{size:"lg",onClick:rt,className:"w-full h-14 bg-primary text-primary-foreground hover:bg-primary/90 transition-all duration-300 group",children:jsxRuntimeExports.jsxs("span",{className:"flex items-center gap-2",children:["Create Wallet",jsxRuntimeExports.jsx(Wallet,{className:"w-5 h-5 transition-transform duration-300 group-hover:rotate-6"})]})})})]})};function composeEventHandlers(e,a,{checkForDefaultPrevented:o=!0}={}){return function(h){if(e==null||e(h),o===!1||!h.defaultPrevented)return a==null?void 0:a(h)}}function createContext2(e,a){const o=reactExports.createContext(a),c=d=>{const{children:j,...et}=d,rt=reactExports.useMemo(()=>et,Object.values(et));return jsxRuntimeExports.jsx(o.Provider,{value:rt,children:j})};c.displayName=e+"Provider";function h(d){const j=reactExports.useContext(o);if(j)return j;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${e}\``)}return[c,h]}function createContextScope(e,a=[]){let o=[];function c(d,j){const et=reactExports.createContext(j),rt=o.length;o=[...o,j];const nt=ot=>{var Et;const{scope:gt,children:bt,...wt}=ot,$t=((Et=gt==null?void 0:gt[e])==null?void 0:Et[rt])||et,St=reactExports.useMemo(()=>wt,Object.values(wt));return jsxRuntimeExports.jsx($t.Provider,{value:St,children:bt})};nt.displayName=d+"Provider";function at(ot,gt){var $t;const bt=(($t=gt==null?void 0:gt[e])==null?void 0:$t[rt])||et,wt=reactExports.useContext(bt);if(wt)return wt;if(j!==void 0)return j;throw new Error(`\`${ot}\` must be used within \`${d}\``)}return[nt,at]}const h=()=>{const d=o.map(j=>reactExports.createContext(j));return function(et){const rt=(et==null?void 0:et[e])||d;return reactExports.useMemo(()=>({[`__scope${e}`]:{...et,[e]:rt}}),[et,rt])}};return h.scopeName=e,[c,composeContextScopes(h,...a)]}function composeContextScopes(...e){const a=e[0];if(e.length===1)return a;const o=()=>{const c=e.map(h=>({useScope:h(),scopeName:h.scopeName}));return function(d){const j=c.reduce((et,{useScope:rt,scopeName:nt})=>{const ot=rt(d)[`__scope${nt}`];return{...et,...ot}},{});return reactExports.useMemo(()=>({[`__scope${a.scopeName}`]:j}),[j])}};return o.scopeName=a.scopeName,o}var useLayoutEffect2=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},useReactId=React$1.useId||(()=>{}),count$1=0;function useId(e){const[a,o]=reactExports.useState(useReactId());return useLayoutEffect2(()=>{e||o(c=>c??String(count$1++))},[e]),e||(a?`radix-${a}`:"")}function useCallbackRef$1(e){const a=reactExports.useRef(e);return reactExports.useEffect(()=>{a.current=e}),reactExports.useMemo(()=>(...o)=>{var c;return(c=a.current)==null?void 0:c.call(a,...o)},[])}function useControllableState({prop:e,defaultProp:a,onChange:o=()=>{}}){const[c,h]=useUncontrolledState({defaultProp:a,onChange:o}),d=e!==void 0,j=d?e:c,et=useCallbackRef$1(o),rt=reactExports.useCallback(nt=>{if(d){const ot=typeof nt=="function"?nt(e):nt;ot!==e&&et(ot)}else h(nt)},[d,e,h,et]);return[j,rt]}function useUncontrolledState({defaultProp:e,onChange:a}){const o=reactExports.useState(e),[c]=o,h=reactExports.useRef(c),d=useCallbackRef$1(a);return reactExports.useEffect(()=>{h.current!==c&&(d(c),h.current=c)},[c,h,d]),o}var NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Primitive$1=NODES.reduce((e,a)=>{const o=reactExports.forwardRef((c,h)=>{const{asChild:d,...j}=c,et=d?Slot:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),jsxRuntimeExports.jsx(et,{...j,ref:h})});return o.displayName=`Primitive.${a}`,{...e,[a]:o}},{});function dispatchDiscreteCustomEvent(e,a){e&&reactDomExports.flushSync(()=>e.dispatchEvent(a))}function useEscapeKeydown(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e);reactExports.useEffect(()=>{const c=h=>{h.key==="Escape"&&o(h)};return a.addEventListener("keydown",c,{capture:!0}),()=>a.removeEventListener("keydown",c,{capture:!0})},[o,a])}var DISMISSABLE_LAYER_NAME="DismissableLayer",CONTEXT_UPDATE="dismissableLayer.update",POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",FOCUS_OUTSIDE="dismissableLayer.focusOutside",originalBodyPointerEvents,DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),DismissableLayer=reactExports.forwardRef((e,a)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:c,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:j,onDismiss:et,...rt}=e,nt=reactExports.useContext(DismissableLayerContext),[at,ot]=reactExports.useState(null),gt=(at==null?void 0:at.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,bt]=reactExports.useState({}),wt=useComposedRefs(a,zt=>ot(zt)),$t=Array.from(nt.layers),[St]=[...nt.layersWithOutsidePointerEventsDisabled].slice(-1),Et=$t.indexOf(St),_t=at?$t.indexOf(at):-1,At=nt.layersWithOutsidePointerEventsDisabled.size>0,Bt=_t>=Et,kt=usePointerDownOutside(zt=>{const Xt=zt.target,Wt=[...nt.branches].some(ir=>ir.contains(Xt));!Bt||Wt||(h==null||h(zt),j==null||j(zt),zt.defaultPrevented||et==null||et())},gt),jt=useFocusOutside(zt=>{const Xt=zt.target;[...nt.branches].some(ir=>ir.contains(Xt))||(d==null||d(zt),j==null||j(zt),zt.defaultPrevented||et==null||et())},gt);return useEscapeKeydown(zt=>{_t===nt.layers.size-1&&(c==null||c(zt),!zt.defaultPrevented&&et&&(zt.preventDefault(),et()))},gt),reactExports.useEffect(()=>{if(at)return o&&(nt.layersWithOutsidePointerEventsDisabled.size===0&&(originalBodyPointerEvents=gt.body.style.pointerEvents,gt.body.style.pointerEvents="none"),nt.layersWithOutsidePointerEventsDisabled.add(at)),nt.layers.add(at),dispatchUpdate(),()=>{o&&nt.layersWithOutsidePointerEventsDisabled.size===1&&(gt.body.style.pointerEvents=originalBodyPointerEvents)}},[at,gt,o,nt]),reactExports.useEffect(()=>()=>{at&&(nt.layers.delete(at),nt.layersWithOutsidePointerEventsDisabled.delete(at),dispatchUpdate())},[at,nt]),reactExports.useEffect(()=>{const zt=()=>bt({});return document.addEventListener(CONTEXT_UPDATE,zt),()=>document.removeEventListener(CONTEXT_UPDATE,zt)},[]),jsxRuntimeExports.jsx(Primitive$1.div,{...rt,ref:wt,style:{pointerEvents:At?Bt?"auto":"none":void 0,...e.style},onFocusCapture:composeEventHandlers(e.onFocusCapture,jt.onFocusCapture),onBlurCapture:composeEventHandlers(e.onBlurCapture,jt.onBlurCapture),onPointerDownCapture:composeEventHandlers(e.onPointerDownCapture,kt.onPointerDownCapture)})});DismissableLayer.displayName=DISMISSABLE_LAYER_NAME;var BRANCH_NAME="DismissableLayerBranch",DismissableLayerBranch=reactExports.forwardRef((e,a)=>{const o=reactExports.useContext(DismissableLayerContext),c=reactExports.useRef(null),h=useComposedRefs(a,c);return reactExports.useEffect(()=>{const d=c.current;if(d)return o.branches.add(d),()=>{o.branches.delete(d)}},[o.branches]),jsxRuntimeExports.jsx(Primitive$1.div,{...e,ref:h})});DismissableLayerBranch.displayName=BRANCH_NAME;function usePointerDownOutside(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e),c=reactExports.useRef(!1),h=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const d=et=>{if(et.target&&!c.current){let rt=function(){handleAndDispatchCustomEvent(POINTER_DOWN_OUTSIDE,o,nt,{discrete:!0})};const nt={originalEvent:et};et.pointerType==="touch"?(a.removeEventListener("click",h.current),h.current=rt,a.addEventListener("click",h.current,{once:!0})):rt()}else a.removeEventListener("click",h.current);c.current=!1},j=window.setTimeout(()=>{a.addEventListener("pointerdown",d)},0);return()=>{window.clearTimeout(j),a.removeEventListener("pointerdown",d),a.removeEventListener("click",h.current)}},[a,o]),{onPointerDownCapture:()=>c.current=!0}}function useFocusOutside(e,a=globalThis==null?void 0:globalThis.document){const o=useCallbackRef$1(e),c=reactExports.useRef(!1);return reactExports.useEffect(()=>{const h=d=>{d.target&&!c.current&&handleAndDispatchCustomEvent(FOCUS_OUTSIDE,o,{originalEvent:d},{discrete:!1})};return a.addEventListener("focusin",h),()=>a.removeEventListener("focusin",h)},[a,o]),{onFocusCapture:()=>c.current=!0,onBlurCapture:()=>c.current=!1}}function dispatchUpdate(){const e=new CustomEvent(CONTEXT_UPDATE);document.dispatchEvent(e)}function handleAndDispatchCustomEvent(e,a,o,{discrete:c}){const h=o.originalEvent.target,d=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});a&&h.addEventListener(e,a,{once:!0}),c?dispatchDiscreteCustomEvent(h,d):h.dispatchEvent(d)}var AUTOFOCUS_ON_MOUNT="focusScope.autoFocusOnMount",AUTOFOCUS_ON_UNMOUNT="focusScope.autoFocusOnUnmount",EVENT_OPTIONS={bubbles:!1,cancelable:!0},FOCUS_SCOPE_NAME="FocusScope",FocusScope=reactExports.forwardRef((e,a)=>{const{loop:o=!1,trapped:c=!1,onMountAutoFocus:h,onUnmountAutoFocus:d,...j}=e,[et,rt]=reactExports.useState(null),nt=useCallbackRef$1(h),at=useCallbackRef$1(d),ot=reactExports.useRef(null),gt=useComposedRefs(a,$t=>rt($t)),bt=reactExports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;reactExports.useEffect(()=>{if(c){let $t=function(At){if(bt.paused||!et)return;const Bt=At.target;et.contains(Bt)?ot.current=Bt:focus(ot.current,{select:!0})},St=function(At){if(bt.paused||!et)return;const Bt=At.relatedTarget;Bt!==null&&(et.contains(Bt)||focus(ot.current,{select:!0}))},Et=function(At){if(document.activeElement===document.body)for(const kt of At)kt.removedNodes.length>0&&focus(et)};document.addEventListener("focusin",$t),document.addEventListener("focusout",St);const _t=new MutationObserver(Et);return et&&_t.observe(et,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",$t),document.removeEventListener("focusout",St),_t.disconnect()}}},[c,et,bt.paused]),reactExports.useEffect(()=>{if(et){focusScopesStack.add(bt);const $t=document.activeElement;if(!et.contains($t)){const Et=new CustomEvent(AUTOFOCUS_ON_MOUNT,EVENT_OPTIONS);et.addEventListener(AUTOFOCUS_ON_MOUNT,nt),et.dispatchEvent(Et),Et.defaultPrevented||(focusFirst(removeLinks(getTabbableCandidates(et)),{select:!0}),document.activeElement===$t&&focus(et))}return()=>{et.removeEventListener(AUTOFOCUS_ON_MOUNT,nt),setTimeout(()=>{const Et=new CustomEvent(AUTOFOCUS_ON_UNMOUNT,EVENT_OPTIONS);et.addEventListener(AUTOFOCUS_ON_UNMOUNT,at),et.dispatchEvent(Et),Et.defaultPrevented||focus($t??document.body,{select:!0}),et.removeEventListener(AUTOFOCUS_ON_UNMOUNT,at),focusScopesStack.remove(bt)},0)}}},[et,nt,at,bt]);const wt=reactExports.useCallback($t=>{if(!o&&!c||bt.paused)return;const St=$t.key==="Tab"&&!$t.altKey&&!$t.ctrlKey&&!$t.metaKey,Et=document.activeElement;if(St&&Et){const _t=$t.currentTarget,[At,Bt]=getTabbableEdges(_t);At&&Bt?!$t.shiftKey&&Et===Bt?($t.preventDefault(),o&&focus(At,{select:!0})):$t.shiftKey&&Et===At&&($t.preventDefault(),o&&focus(Bt,{select:!0})):Et===_t&&$t.preventDefault()}},[o,c,bt.paused]);return jsxRuntimeExports.jsx(Primitive$1.div,{tabIndex:-1,...j,ref:gt,onKeyDown:wt})});FocusScope.displayName=FOCUS_SCOPE_NAME;function focusFirst(e,{select:a=!1}={}){const o=document.activeElement;for(const c of e)if(focus(c,{select:a}),document.activeElement!==o)return}function getTabbableEdges(e){const a=getTabbableCandidates(e),o=findVisible(a,e),c=findVisible(a.reverse(),e);return[o,c]}function getTabbableCandidates(e){const a=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:c=>{const h=c.tagName==="INPUT"&&c.type==="hidden";return c.disabled||c.hidden||h?NodeFilter.FILTER_SKIP:c.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)a.push(o.currentNode);return a}function findVisible(e,a){for(const o of e)if(!isHidden(o,{upTo:a}))return o}function isHidden(e,{upTo:a}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(a!==void 0&&e===a)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function isSelectableInput(e){return e instanceof HTMLInputElement&&"select"in e}function focus(e,{select:a=!1}={}){if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&isSelectableInput(e)&&a&&e.select()}}var focusScopesStack=createFocusScopesStack();function createFocusScopesStack(){let e=[];return{add(a){const o=e[0];a!==o&&(o==null||o.pause()),e=arrayRemove(e,a),e.unshift(a)},remove(a){var o;e=arrayRemove(e,a),(o=e[0])==null||o.resume()}}}function arrayRemove(e,a){const o=[...e],c=o.indexOf(a);return c!==-1&&o.splice(c,1),o}function removeLinks(e){return e.filter(a=>a.tagName!=="A")}var PORTAL_NAME$1="Portal",Portal$1=reactExports.forwardRef((e,a)=>{var et;const{container:o,...c}=e,[h,d]=reactExports.useState(!1);useLayoutEffect2(()=>d(!0),[]);const j=o||h&&((et=globalThis==null?void 0:globalThis.document)==null?void 0:et.body);return j?ReactDOM.createPortal(jsxRuntimeExports.jsx(Primitive$1.div,{...c,ref:a}),j):null});Portal$1.displayName=PORTAL_NAME$1;function useStateMachine(e,a){return reactExports.useReducer((o,c)=>a[o][c]??o,e)}var Presence=e=>{const{present:a,children:o}=e,c=usePresence(a),h=typeof o=="function"?o({present:c.isPresent}):reactExports.Children.only(o),d=useComposedRefs(c.ref,getElementRef(h));return typeof o=="function"||c.isPresent?reactExports.cloneElement(h,{ref:d}):null};Presence.displayName="Presence";function usePresence(e){const[a,o]=reactExports.useState(),c=reactExports.useRef({}),h=reactExports.useRef(e),d=reactExports.useRef("none"),j=e?"mounted":"unmounted",[et,rt]=useStateMachine(j,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const nt=getAnimationName(c.current);d.current=et==="mounted"?nt:"none"},[et]),useLayoutEffect2(()=>{const nt=c.current,at=h.current;if(at!==e){const gt=d.current,bt=getAnimationName(nt);e?rt("MOUNT"):bt==="none"||(nt==null?void 0:nt.display)==="none"?rt("UNMOUNT"):rt(at&>!==bt?"ANIMATION_OUT":"UNMOUNT"),h.current=e}},[e,rt]),useLayoutEffect2(()=>{if(a){let nt;const at=a.ownerDocument.defaultView??window,ot=bt=>{const $t=getAnimationName(c.current).includes(bt.animationName);if(bt.target===a&&$t&&(rt("ANIMATION_END"),!h.current)){const St=a.style.animationFillMode;a.style.animationFillMode="forwards",nt=at.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=St)})}},gt=bt=>{bt.target===a&&(d.current=getAnimationName(c.current))};return a.addEventListener("animationstart",gt),a.addEventListener("animationcancel",ot),a.addEventListener("animationend",ot),()=>{at.clearTimeout(nt),a.removeEventListener("animationstart",gt),a.removeEventListener("animationcancel",ot),a.removeEventListener("animationend",ot)}}else rt("ANIMATION_END")},[a,rt]),{isPresent:["mounted","unmountSuspended"].includes(et),ref:reactExports.useCallback(nt=>{nt&&(c.current=getComputedStyle(nt)),o(nt)},[])}}function getAnimationName(e){return(e==null?void 0:e.animationName)||"none"}function getElementRef(e){var c,h;let a=(c=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:c.get,o=a&&"isReactWarning"in a&&a.isReactWarning;return o?e.ref:(a=(h=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:h.get,o=a&&"isReactWarning"in a&&a.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var count=0;function useFocusGuards(){reactExports.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??createFocusGuard()),document.body.insertAdjacentElement("beforeend",e[1]??createFocusGuard()),count++,()=>{count===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),count--}},[])}function createFocusGuard(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var __assign$1=function(){return __assign$1=Object.assign||function(a){for(var o,c=1,h=arguments.length;c"u")return zeroGap;var a=getOffset(e),o=document.documentElement.clientWidth,c=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,c-o+a[2]-a[0])}},Style=styleSingleton(),lockAttribute="data-scroll-locked",getStyles=function(e,a,o,c){var h=e.left,d=e.top,j=e.right,et=e.gap;return o===void 0&&(o="margin"),` .`.concat(noScrollbarsClassName,` { overflow: hidden `).concat(c,`; padding-right: `).concat(et,"px ").concat(c,`; diff --git a/index.html b/index.html index 9c2ab31..90d74f3 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ content="width=device-width, initial-scale=1.0" /> Capsule Telegram Mini App - +