function Rg(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ng={exports:{}},Ka={},Lg={exports:{}},ee={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Xi=Symbol.for("react.element"),ex=Symbol.for("react.portal"),tx=Symbol.for("react.fragment"),nx=Symbol.for("react.strict_mode"),rx=Symbol.for("react.profiler"),ox=Symbol.for("react.provider"),ix=Symbol.for("react.context"),sx=Symbol.for("react.forward_ref"),ax=Symbol.for("react.suspense"),lx=Symbol.for("react.memo"),ux=Symbol.for("react.lazy"),uh=Symbol.iterator;function cx(e){return e===null||typeof e!="object"?null:(e=uh&&e[uh]||e["@@iterator"],typeof e=="function"?e:null)}var Ag={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Og=Object.assign,jg={};function No(e,t,n){this.props=e,this.context=t,this.refs=jg,this.updater=n||Ag}No.prototype.isReactComponent={};No.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};No.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fg(){}Fg.prototype=No.prototype;function td(e,t,n){this.props=e,this.context=t,this.refs=jg,this.updater=n||Ag}var nd=td.prototype=new Fg;nd.constructor=td;Og(nd,No.prototype);nd.isPureReactComponent=!0;var ch=Array.isArray,Ig=Object.prototype.hasOwnProperty,rd={current:null},Vg={key:!0,ref:!0,__self:!0,__source:!0};function Bg(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Ig.call(t,r)&&!Vg.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1>>1,ve=M[Q];if(0>>1;Qo(jt,W))eto(an,jt)?(M[Q]=an,M[et]=W,Q=et):(M[Q]=jt,M[Be]=W,Q=Be);else if(eto(an,W))M[Q]=an,M[et]=W,Q=et;else break e}}return U}function o(M,U){var W=M.sortIndex-U.sortIndex;return W!==0?W:M.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,p=!1,m=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(M){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=M)r(u),U.sortIndex=U.expirationTime,t(l,U);else break;U=n(u)}}function b(M){if(v=!1,y(M),!m)if(n(l)!==null)m=!0,Ye(k);else{var U=n(u);U!==null&&A(b,U.startTime-M)}}function k(M,U){m=!1,v&&(v=!1,g(D),D=-1),p=!0;var W=f;try{for(y(U),d=n(l);d!==null&&(!(d.expirationTime>U)||M&&!J());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var ve=Q(d.expirationTime<=U);U=e.unstable_now(),typeof ve=="function"?d.callback=ve:d===n(l)&&r(l),y(U)}else r(l);d=n(l)}if(d!==null)var Gt=!0;else{var Be=n(u);Be!==null&&A(b,Be.startTime-U),Gt=!1}return Gt}finally{d=null,f=W,p=!1}}var C=!1,_=null,D=-1,j=5,O=-1;function J(){return!(e.unstable_now()-OM||125Q?(M.sortIndex=W,t(u,M),n(l)===null&&M===n(u)&&(v?(g(D),D=-1):v=!0,A(b,W-Q))):(M.sortIndex=ve,t(l,M),m||p||(m=!0,Ye(k))),M},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(M){var U=f;return function(){var W=f;f=U;try{return M.apply(this,arguments)}finally{f=W}}}})(Hg);$g.exports=Hg;var Px=$g.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var bx=S,Pt=Px;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nu=Object.prototype.hasOwnProperty,Ex=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,fh={},hh={};function kx(e){return Nu.call(hh,e)?!0:Nu.call(fh,e)?!1:Ex.test(e)?hh[e]=!0:(fh[e]=!0,!1)}function Tx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Dx(e,t,n,r){if(t===null||typeof t>"u"||Tx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){He[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var id=/[\-:]([a-z])/g;function sd(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(id,sd);He[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(id,sd);He[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(id,sd);He[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function ad(e,t,n,r){var o=He.hasOwnProperty(t)?He[t]:null;(o!==null?o.type!==0:r||!(2a||o[s]!==i[a]){var l=` `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?si(e):""}function Mx(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=Ol(e.type,!1),e;case 11:return e=Ol(e.type.render,!1),e;case 1:return e=Ol(e.type,!0),e;default:return""}}function ju(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 Xr:return"Fragment";case Qr:return"Portal";case Lu:return"Profiler";case ld:return"StrictMode";case Au:return"Suspense";case Ou:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gg:return(e.displayName||"Context")+".Consumer";case Kg:return(e._context.displayName||"Context")+".Provider";case ud:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case cd:return t=e.displayName||null,t!==null?t:ju(e.type)||"Memo";case jn:t=e._payload,e=e._init;try{return ju(e(t))}catch{}}return null}function Rx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ju(t);case 8:return t===ld?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Jn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _x(e){var t=Xg(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ss(e){e._valueTracker||(e._valueTracker=_x(e))}function qg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Xg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function aa(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 Fu(e,t){var n=t.checked;return Te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function mh(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Jn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Jg(e,t){t=t.checked,t!=null&&ad(e,"checked",t,!1)}function Iu(e,t){Jg(e,t);var n=Jn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Vu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vu(e,t.type,Jn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gh(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Vu(e,t,n){(t!=="number"||aa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ai=Array.isArray;function ho(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Cs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ki(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var hi={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},Nx=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(e){Nx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hi[t]=hi[e]})});function nv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||hi.hasOwnProperty(e)&&hi[e]?(""+t).trim():t+"px"}function rv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=nv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Lx=Te({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 Uu(e,t){if(t){if(Lx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function Wu(e,t){if(e.indexOf("-")===-1)return typeof t.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 $u=null;function dd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hu=null,po=null,mo=null;function wh(e){if(e=Zi(e)){if(typeof Hu!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Ja(t),Hu(e.stateNode,e.type,t))}}function ov(e){po?mo?mo.push(e):mo=[e]:po=e}function iv(){if(po){var e=po,t=mo;if(mo=po=null,wh(e),t)for(e=0;e>>=0,e===0?32:31-($x(e)/Hx|0)|0}var Ps=64,bs=4194304;function li(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 da(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=li(a):(i&=s,i!==0&&(r=li(i)))}else s=n&~o,s!==0?r=li(s):i!==0&&(r=li(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function qi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ut(t),e[t]=n}function Qx(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=mi),Dh=" ",Mh=!1;function Ev(e,t){switch(e){case"keyup":return PS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qr=!1;function ES(e,t){switch(e){case"compositionend":return kv(t);case"keypress":return t.which!==32?null:(Mh=!0,Dh);case"textInput":return e=t.data,e===Dh&&Mh?null:e;default:return null}}function kS(e,t){if(qr)return e==="compositionend"||!wd&&Ev(e,t)?(e=Pv(),$s=gd=Bn=null,qr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Lh(n)}}function Rv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _v(){for(var e=window,t=aa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=aa(e.document)}return t}function xd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function OS(e){var t=_v(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rv(n.ownerDocument.documentElement,n)){if(r!==null&&xd(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ah(n,i);var s=Ah(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Jr=null,qu=null,vi=null,Ju=!1;function Oh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ju||Jr==null||Jr!==aa(r)||(r=Jr,"selectionStart"in r&&xd(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),vi&&Ni(vi,r)||(vi=r,r=pa(qu,"onSelect"),0to||(e.current=oc[to],oc[to]=null,to--)}function me(e,t){to++,oc[to]=e.current,e.current=t}var Zn={},Ze=or(Zn),ft=or(!1),_r=Zn;function So(e,t){var n=e.type.contextTypes;if(!n)return Zn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ht(e){return e=e.childContextTypes,e!=null}function ga(){xe(ft),xe(Ze)}function Uh(e,t,n){if(Ze.current!==Zn)throw Error(L(168));me(Ze,t),me(ft,n)}function Bv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(L(108,Rx(e)||"Unknown",o));return Te({},n,r)}function va(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Zn,_r=Ze.current,me(Ze,e),me(ft,ft.current),!0}function Wh(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Bv(e,t,_r),r.__reactInternalMemoizedMergedChildContext=e,xe(ft),xe(Ze),me(Ze,e)):xe(ft),me(ft,n)}var hn=null,Za=!1,Ql=!1;function zv(e){hn===null?hn=[e]:hn.push(e)}function KS(e){Za=!0,zv(e)}function ir(){if(!Ql&&hn!==null){Ql=!0;var e=0,t=ce;try{var n=hn;for(ce=1;e>=s,o-=s,pn=1<<32-Ut(t)+o|n<D?(j=_,_=null):j=_.sibling;var O=f(g,_,y[D],b);if(O===null){_===null&&(_=j);break}e&&_&&O.alternate===null&&t(g,_),h=i(O,h,D),C===null?k=O:C.sibling=O,C=O,_=j}if(D===y.length)return n(g,_),Ce&&pr(g,D),k;if(_===null){for(;DD?(j=_,_=null):j=_.sibling;var J=f(g,_,O.value,b);if(J===null){_===null&&(_=j);break}e&&_&&J.alternate===null&&t(g,_),h=i(J,h,D),C===null?k=J:C.sibling=J,C=J,_=j}if(O.done)return n(g,_),Ce&&pr(g,D),k;if(_===null){for(;!O.done;D++,O=y.next())O=d(g,O.value,b),O!==null&&(h=i(O,h,D),C===null?k=O:C.sibling=O,C=O);return Ce&&pr(g,D),k}for(_=r(g,_);!O.done;D++,O=y.next())O=p(_,g,D,O.value,b),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?D:O.key),h=i(O,h,D),C===null?k=O:C.sibling=O,C=O);return e&&_.forEach(function(Y){return t(g,Y)}),Ce&&pr(g,D),k}function w(g,h,y,b){if(typeof y=="object"&&y!==null&&y.type===Xr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case xs:e:{for(var k=y.key,C=h;C!==null;){if(C.key===k){if(k=y.type,k===Xr){if(C.tag===7){n(g,C.sibling),h=o(C,y.props.children),h.return=g,g=h;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===jn&&Yh(k)===C.type){n(g,C.sibling),h=o(C,y.props),h.ref=Go(g,C,y),h.return=g,g=h;break e}n(g,C);break}else t(g,C);C=C.sibling}y.type===Xr?(h=Dr(y.props.children,g.mode,b,y.key),h.return=g,g=h):(b=Js(y.type,y.key,y.props,null,g.mode,b),b.ref=Go(g,h,y),b.return=g,g=b)}return s(g);case Qr:e:{for(C=y.key;h!==null;){if(h.key===C)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){n(g,h.sibling),h=o(h,y.children||[]),h.return=g,g=h;break e}else{n(g,h);break}else t(g,h);h=h.sibling}h=ru(y,g.mode,b),h.return=g,g=h}return s(g);case jn:return C=y._init,w(g,h,C(y._payload),b)}if(ai(y))return m(g,h,y,b);if(Wo(y))return v(g,h,y,b);_s(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(n(g,h.sibling),h=o(h,y),h.return=g,g=h):(n(g,h),h=nu(y,g.mode,b),h.return=g,g=h),s(g)):n(g,h)}return w}var Po=Hv(!0),Yv=Hv(!1),xa=or(null),Sa=null,oo=null,bd=null;function Ed(){bd=oo=Sa=null}function kd(e){var t=xa.current;xe(xa),e._currentValue=t}function ac(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vo(e,t){Sa=e,bd=oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ct=!0),e.firstContext=null)}function At(e){var t=e._currentValue;if(bd!==e)if(e={context:e,memoizedValue:t,next:null},oo===null){if(Sa===null)throw Error(L(308));oo=e,Sa.dependencies={lanes:0,firstContext:e}}else oo=oo.next=e;return t}var Cr=null;function Td(e){Cr===null?Cr=[e]:Cr.push(e)}function Kv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Td(t)):(n.next=o.next,o.next=n),t.interleaved=n,bn(e,r)}function bn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Fn=!1;function Dd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function vn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Kn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,bn(e,n)}return o=r.interleaved,o===null?(t.next=t,Td(r)):(t.next=o.next,o.next=t),r.interleaved=t,bn(e,n)}function Ys(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hd(e,n)}}function Kh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ca(e,t,n,r){var o=e.updateQueue;Fn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=e,v=a;switch(f=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Te({},d,f);break e;case 2:Fn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Ar|=s,e.lanes=s,e.memoizedState=d}}function Gh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ql.transition;ql.transition={};try{e(!1),t()}finally{ce=n,ql.transition=r}}function dy(){return Ot().memoizedState}function qS(e,t,n){var r=Qn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},fy(e))hy(t,n);else if(n=Kv(e,t,n,r),n!==null){var o=ot();Wt(n,e,r,o),py(n,t,r)}}function JS(e,t,n){var r=Qn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(fy(e))hy(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,$t(a,s)){var l=t.interleaved;l===null?(o.next=o,Td(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=Kv(e,t,o,r),n!==null&&(o=ot(),Wt(n,e,r,o),py(n,t,r))}}function fy(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function hy(e,t){yi=ba=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function py(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hd(e,n)}}var Ea={readContext:At,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},ZS={readContext:At,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Xh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,sy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=qt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=qt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=qS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:Qh,useDebugValue:jd,useDeferredValue:function(e){return qt().memoizedState=e},useTransition:function(){var e=Qh(!1),t=e[0];return e=XS.bind(null,e[1]),qt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=qt();if(Ce){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Ve===null)throw Error(L(349));Lr&30||Jv(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Xh(ey.bind(null,r,i,e),[e]),r.flags|=2048,Bi(9,Zv.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=qt(),t=Ve.identifierPrefix;if(Ce){var n=mn,r=pn;n=(r&~(1<<32-Ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ii++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Jt]=t,e[Oi]=r,by(e,t,!1,!1),t.stateNode=e;e:{switch(s=Wu(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;oko&&(t.flags|=128,r=!0,Qo(i,!1),t.lanes=4194304)}else{if(!r)if(e=Pa(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ce)return Ge(t),null}else 2*Ne()-i.renderingStartTime>ko&&n!==1073741824&&(t.flags|=128,r=!0,Qo(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ne(),t.sibling=null,n=be.current,me(be,r?n&1|2:n&1),t):(Ge(t),null);case 22:case 23:return Ud(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Ge(t),t.subtreeFlags&6&&(t.flags|=8192)):Ge(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function aC(e,t){switch(Cd(t),t.tag){case 1:return ht(t.type)&&ga(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bo(),xe(ft),xe(Ze),_d(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rd(t),null;case 13:if(xe(be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Co()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xe(be),null;case 4:return bo(),null;case 10:return kd(t.type._context),null;case 22:case 23:return Ud(),null;case 24:return null;default:return null}}var Ls=!1,Xe=!1,lC=typeof WeakSet=="function"?WeakSet:Set,F=null;function io(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Re(e,t,r)}else n.current=null}function gc(e,t,n){try{n()}catch(r){Re(e,t,r)}}var ap=!1;function uC(e,t){if(Zu=fa,e=_v(),xd(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ec={focusedElem:e,selectionRange:n},fa=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,w=m.memoizedState,g=t.stateNode,h=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:It(t.type,v),w);g.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(b){Re(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return m=ap,ap=!1,m}function wi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&gc(t,n,i)}o=o.next}while(o!==r)}}function nl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ty(e){var t=e.alternate;t!==null&&(e.alternate=null,Ty(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Jt],delete t[Oi],delete t[rc],delete t[HS],delete t[YS])),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 Dy(e){return e.tag===5||e.tag===3||e.tag===4}function lp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dy(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 yc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ma));else if(r!==4&&(e=e.child,e!==null))for(yc(e,t,n),e=e.sibling;e!==null;)yc(e,t,n),e=e.sibling}function wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(wc(e,t,n),e=e.sibling;e!==null;)wc(e,t,n),e=e.sibling}var Ue=null,Vt=!1;function Mn(e,t,n){for(n=n.child;n!==null;)My(e,t,n),n=n.sibling}function My(e,t,n){if(tn&&typeof tn.onCommitFiberUnmount=="function")try{tn.onCommitFiberUnmount(Ga,n)}catch{}switch(n.tag){case 5:Xe||io(n,t);case 6:var r=Ue,o=Vt;Ue=null,Mn(e,t,n),Ue=r,Vt=o,Ue!==null&&(Vt?(e=Ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ue.removeChild(n.stateNode));break;case 18:Ue!==null&&(Vt?(e=Ue,n=n.stateNode,e.nodeType===8?Gl(e.parentNode,n):e.nodeType===1&&Gl(e,n),Ri(e)):Gl(Ue,n.stateNode));break;case 4:r=Ue,o=Vt,Ue=n.stateNode.containerInfo,Vt=!0,Mn(e,t,n),Ue=r,Vt=o;break;case 0:case 11:case 14:case 15:if(!Xe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&gc(n,t,s),o=o.next}while(o!==r)}Mn(e,t,n);break;case 1:if(!Xe&&(io(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Re(n,t,a)}Mn(e,t,n);break;case 21:Mn(e,t,n);break;case 22:n.mode&1?(Xe=(r=Xe)||n.memoizedState!==null,Mn(e,t,n),Xe=r):Mn(e,t,n);break;default:Mn(e,t,n)}}function up(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new lC),t.forEach(function(r){var o=yC.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dC(r/1960))-r,10e?16:e,zn===null)var r=!1;else{if(e=zn,zn=null,Da=0,oe&6)throw Error(L(331));var o=oe;for(oe|=4,F=e.current;F!==null;){var i=F,s=i.child;if(F.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lNe()-Bd?Tr(e,0):Vd|=n),pt(e,t)}function Fy(e,t){t===0&&(e.mode&1?(t=bs,bs<<=1,!(bs&130023424)&&(bs=4194304)):t=1);var n=ot();e=bn(e,t),e!==null&&(qi(e,t,n),pt(e,n))}function vC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fy(e,n)}function yC(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),Fy(e,n)}var Iy;Iy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)ct=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ct=!1,iC(e,t,n);ct=!!(e.flags&131072)}else ct=!1,Ce&&t.flags&1048576&&Uv(t,wa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qs(e,t),e=t.pendingProps;var o=So(t,Ze.current);vo(t,n),o=Ld(null,t,r,e,o,n);var i=Ad();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ht(r)?(i=!0,va(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Dd(t),o.updater=tl,t.stateNode=o,o._reactInternals=t,uc(t,r,e,n),t=fc(null,t,r,!0,i,n)):(t.tag=0,Ce&&i&&Sd(t),nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xC(r),e=It(r,e),o){case 0:t=dc(null,t,r,e,n);break e;case 1:t=op(null,t,r,e,n);break e;case 11:t=np(null,t,r,e,n);break e;case 14:t=rp(null,t,r,It(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),dc(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),op(e,t,r,o,n);case 3:e:{if(Sy(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Gv(e,t),Ca(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Eo(Error(L(423)),t),t=ip(e,t,r,n,o);break e}else if(r!==o){o=Eo(Error(L(424)),t),t=ip(e,t,r,n,o);break e}else for(xt=Yn(t.stateNode.containerInfo.firstChild),St=t,Ce=!0,zt=null,n=Yv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Co(),r===o){t=En(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return Qv(t),e===null&&sc(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,tc(r,o)?s=null:i!==null&&tc(r,i)&&(t.flags|=32),xy(e,t),nt(e,t,s,n),t.child;case 6:return e===null&&sc(t),null;case 13:return Cy(e,t,n);case 4:return Md(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Po(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),np(e,t,r,o,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,me(xa,r._currentValue),r._currentValue=s,i!==null)if($t(i.value,s)){if(i.children===o.children&&!ft.current){t=En(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=vn(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),ac(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(L(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ac(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,vo(t,n),o=At(o),r=r(o),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,o=It(r,t.pendingProps),o=It(r.type,o),rp(e,t,r,o,n);case 15:return yy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Qs(e,t),t.tag=1,ht(r)?(e=!0,va(t)):e=!1,vo(t,n),my(t,r,o),uc(t,r,o,n),fc(null,t,r,!0,e,n);case 19:return Py(e,t,n);case 22:return wy(e,t,n)}throw Error(L(156,t.tag))};function Vy(e,t){return fv(e,t)}function wC(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(e,t,n,r){return new wC(e,t,n,r)}function $d(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xC(e){if(typeof e=="function")return $d(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ud)return 11;if(e===cd)return 14}return 2}function Xn(e,t){var n=e.alternate;return n===null?(n=Nt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Js(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")$d(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Xr:return Dr(n.children,o,i,t);case ld:s=8,o|=8;break;case Lu:return e=Nt(12,n,t,o|2),e.elementType=Lu,e.lanes=i,e;case Au:return e=Nt(13,n,t,o),e.elementType=Au,e.lanes=i,e;case Ou:return e=Nt(19,n,t,o),e.elementType=Ou,e.lanes=i,e;case Qg:return ol(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Kg:s=10;break e;case Gg:s=9;break e;case ud:s=11;break e;case cd:s=14;break e;case jn:s=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Nt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Dr(e,t,n,r){return e=Nt(7,e,r,t),e.lanes=n,e}function ol(e,t,n,r){return e=Nt(22,e,r,t),e.elementType=Qg,e.lanes=n,e.stateNode={isHidden:!1},e}function nu(e,t,n){return e=Nt(6,e,null,t),e.lanes=n,e}function ru(e,t,n){return t=Nt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function SC(e,t,n,r,o){this.tag=t,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=Fl(0),this.expirationTimes=Fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Hd(e,t,n,r,o,i,s,a,l){return e=new SC(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Nt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dd(i),e}function CC(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wy)}catch(e){console.error(e)}}Wy(),Wg.exports=kt;var Qd=Wg.exports;const TC=_g(Qd),DC=Rg({__proto__:null,default:TC},[Qd]);var $y,vp=Qd;$y=vp.createRoot,vp.hydrateRoot;/** * @remix-run/router v1.20.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function To(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function RC(){return Math.random().toString(36).substr(2,8)}function wp(e,t){return{usr:e.state,key:e.key,idx:t}}function Ui(e,t,n,r){return n===void 0&&(n=null),Se({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?sr(t):t,{state:n,key:t&&t.key||r||RC()})}function ts(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function sr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function _C(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,a=Ae.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(Se({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=Ae.Pop;let w=c(),g=w==null?null:w-u;u=w,l&&l({action:a,location:v.location,delta:g})}function f(w,g){a=Ae.Push;let h=Ui(v.location,w,g);u=c()+1;let y=wp(h,u),b=v.createHref(h);try{s.pushState(y,"",b)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(b)}i&&l&&l({action:a,location:v.location,delta:1})}function p(w,g){a=Ae.Replace;let h=Ui(v.location,w,g);u=c();let y=wp(h,u),b=v.createHref(h);s.replaceState(y,"",b),i&&l&&l({action:a,location:v.location,delta:0})}function m(w){let g=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof w=="string"?w:ts(w);return h=h.replace(/ $/,"%20"),ne(g,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,g)}let v={get action(){return a},get location(){return e(o,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(yp,d),l=w,()=>{o.removeEventListener(yp,d),l=null}},createHref(w){return t(o,w)},createURL:m,encodeLocation(w){let g=m(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(w){return s.go(w)}};return v}var de;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(de||(de={}));const NC=new Set(["lazy","caseSensitive","path","id","index","children"]);function LC(e){return e.index===!0}function _a(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let s=[...n,String(i)],a=typeof o.id=="string"?o.id:s.join("-");if(ne(o.index!==!0||!o.children,"Cannot specify children on an index route"),ne(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),LC(o)){let l=Se({},o,t(o),{id:a});return r[a]=l,l}else{let l=Se({},o,t(o),{id:a,children:void 0});return r[a]=l,o.children&&(l.children=_a(o.children,t,s,r)),l}})}function wr(e,t,n){return n===void 0&&(n="/"),Zs(e,t,n,!1)}function Zs(e,t,n,r){let o=typeof t=="string"?sr(t):t,i=ns(o.pathname||"/",n);if(i==null)return null;let s=Hy(e);OC(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(ne(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=qn([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(ne(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hy(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:UC(u,i.index),routesMeta:c})};return e.forEach((i,s)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))o(i,s);else for(let l of Yy(i.path))o(i,s,l)}),t}function Yy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Yy(r.join("/")),a=[];return a.push(...s.map(l=>l===""?i:[i,l].join("/"))),o&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function OC(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:WC(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const jC=/^:[\w-]+$/,FC=3,IC=2,VC=1,BC=10,zC=-2,xp=e=>e==="*";function UC(e,t){let n=e.split("/"),r=n.length;return n.some(xp)&&(r+=zC),t&&(r+=IC),n.filter(o=>!xp(o)).reduce((o,i)=>o+(jC.test(i)?FC:i===""?VC:BC),r)}function WC(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function $C(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,o={},i="/",s=[];for(let a=0;a{let{paramName:f,isOptional:p}=c;if(f==="*"){let v=a[d]||"";s=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const m=a[d];return p&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function HC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),To(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function YC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return To(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ns(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function KC(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?sr(e):e;return{pathname:n?n.startsWith("/")?n:GC(n,t):t,search:XC(r),hash:qC(o)}}function GC(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function ou(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ky(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Gy(e,t){let n=Ky(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qy(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=sr(e):(o=Se({},e),ne(!o.pathname||!o.pathname.includes("?"),ou("?","pathname","search",o)),ne(!o.pathname||!o.pathname.includes("#"),ou("#","pathname","hash",o)),ne(!o.search||!o.search.includes("#"),ou("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=KC(o,a),u=s&&s!=="/"&&s.endsWith("/"),c=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const qn=e=>e.join("/").replace(/\/\/+/g,"/"),QC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Na{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ul(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Xy=["post","put","patch","delete"],JC=new Set(Xy),ZC=["get",...Xy],eP=new Set(ZC),tP=new Set([301,302,303,307,308]),nP=new Set([307,308]),iu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},rP={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qo={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Xd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oP=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),qy="remix-router-transitions";function iP(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ne(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let P=e.detectErrorBoundary;o=E=>({hasErrorBoundary:P(E)})}else o=oP;let i={},s=_a(e.routes,o,void 0,i),a,l=e.basename||"/",u=e.dataStrategy||uP,c=e.patchRoutesOnNavigation,d=Se({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,m=null,v=null,w=null,g=e.hydrationData!=null,h=wr(s,e.history.location,l),y=null;if(h==null&&!c){let P=lt(404,{pathname:e.history.location.pathname}),{matches:E,route:T}=Np(s);h=E,y={[T.id]:P}}h&&!e.hydrationData&&ps(h,s,e.history.location.pathname).active&&(h=null);let b;if(h)if(h.some(P=>P.route.lazy))b=!1;else if(!h.some(P=>P.route.loader))b=!0;else if(d.v7_partialHydration){let P=e.hydrationData?e.hydrationData.loaderData:null,E=e.hydrationData?e.hydrationData.errors:null;if(E){let T=h.findIndex(N=>E[N.route.id]!==void 0);b=h.slice(0,T+1).every(N=>!Ec(N.route,P,E))}else b=h.every(T=>!Ec(T.route,P,E))}else b=e.hydrationData!=null;else if(b=!1,h=[],d.v7_partialHydration){let P=ps(null,s,e.history.location.pathname);P.active&&P.matches&&(h=P.matches)}let k,C={historyAction:e.history.action,location:e.history.location,matches:h,initialized:b,navigation:iu,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||y,fetchers:new Map,blockers:new Map},_=Ae.Pop,D=!1,j,O=!1,J=new Map,Y=null,he=!1,le=!1,at=[],Ye=new Set,A=new Map,M=0,U=-1,W=new Map,Q=new Set,ve=new Map,Gt=new Map,Be=new Set,jt=new Map,et=new Map,an;function Fw(){if(f=e.history.listen(P=>{let{action:E,location:T,delta:N}=P;if(an){an(),an=void 0;return}To(et.size===0||N!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let I=ih({currentLocation:C.location,nextLocation:T,historyAction:E});if(I&&N!=null){let $=new Promise(X=>{an=X});e.history.go(N*-1),hs(I,{state:"blocked",location:T,proceed(){hs(I,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),$.then(()=>e.history.go(N))},reset(){let X=new Map(C.blockers);X.set(I,qo),tt({blockers:X})}});return}return cr(E,T)}),n){PP(t,J);let P=()=>bP(t,J);t.addEventListener("pagehide",P),Y=()=>t.removeEventListener("pagehide",P)}return C.initialized||cr(Ae.Pop,C.location,{initialHydration:!0}),k}function Iw(){f&&f(),Y&&Y(),p.clear(),j&&j.abort(),C.fetchers.forEach((P,E)=>fs(E)),C.blockers.forEach((P,E)=>oh(E))}function Vw(P){return p.add(P),()=>p.delete(P)}function tt(P,E){E===void 0&&(E={}),C=Se({},C,P);let T=[],N=[];d.v7_fetcherPersist&&C.fetchers.forEach((I,$)=>{I.state==="idle"&&(Be.has($)?N.push($):T.push($))}),[...p].forEach(I=>I(C,{deletedFetchers:N,viewTransitionOpts:E.viewTransitionOpts,flushSync:E.flushSync===!0})),d.v7_fetcherPersist&&(T.forEach(I=>C.fetchers.delete(I)),N.forEach(I=>fs(I)))}function Ur(P,E,T){var N,I;let{flushSync:$}=T===void 0?{}:T,X=C.actionData!=null&&C.navigation.formMethod!=null&&Bt(C.navigation.formMethod)&&C.navigation.state==="loading"&&((N=P.state)==null?void 0:N._isRedirect)!==!0,B;E.actionData?Object.keys(E.actionData).length>0?B=E.actionData:B=null:X?B=C.actionData:B=null;let z=E.loaderData?Rp(C.loaderData,E.loaderData,E.matches||[],E.errors):C.loaderData,V=C.blockers;V.size>0&&(V=new Map(V),V.forEach((re,ze)=>V.set(ze,qo)));let H=D===!0||C.navigation.formMethod!=null&&Bt(C.navigation.formMethod)&&((I=P.state)==null?void 0:I._isRedirect)!==!0;a&&(s=a,a=void 0),he||_===Ae.Pop||(_===Ae.Push?e.history.push(P,P.state):_===Ae.Replace&&e.history.replace(P,P.state));let te;if(_===Ae.Pop){let re=J.get(C.location.pathname);re&&re.has(P.pathname)?te={currentLocation:C.location,nextLocation:P}:J.has(P.pathname)&&(te={currentLocation:P,nextLocation:C.location})}else if(O){let re=J.get(C.location.pathname);re?re.add(P.pathname):(re=new Set([P.pathname]),J.set(C.location.pathname,re)),te={currentLocation:C.location,nextLocation:P}}tt(Se({},E,{actionData:B,loaderData:z,historyAction:_,location:P,initialized:!0,navigation:iu,revalidation:"idle",restoreScrollPosition:ah(P,E.matches||C.matches),preventScrollReset:H,blockers:V}),{viewTransitionOpts:te,flushSync:$===!0}),_=Ae.Pop,D=!1,O=!1,he=!1,le=!1,at=[]}async function qf(P,E){if(typeof P=="number"){e.history.go(P);return}let T=bc(C.location,C.matches,l,d.v7_prependBasename,P,d.v7_relativeSplatPath,E==null?void 0:E.fromRouteId,E==null?void 0:E.relative),{path:N,submission:I,error:$}=Cp(d.v7_normalizeFormMethod,!1,T,E),X=C.location,B=Ui(C.location,N,E&&E.state);B=Se({},B,e.history.encodeLocation(B));let z=E&&E.replace!=null?E.replace:void 0,V=Ae.Push;z===!0?V=Ae.Replace:z===!1||I!=null&&Bt(I.formMethod)&&I.formAction===C.location.pathname+C.location.search&&(V=Ae.Replace);let H=E&&"preventScrollReset"in E?E.preventScrollReset===!0:void 0,te=(E&&E.flushSync)===!0,re=ih({currentLocation:X,nextLocation:B,historyAction:V});if(re){hs(re,{state:"blocked",location:B,proceed(){hs(re,{state:"proceeding",proceed:void 0,reset:void 0,location:B}),qf(P,E)},reset(){let ze=new Map(C.blockers);ze.set(re,qo),tt({blockers:ze})}});return}return await cr(V,B,{submission:I,pendingError:$,preventScrollReset:H,replace:E&&E.replace,enableViewTransition:E&&E.viewTransition,flushSync:te})}function Bw(){if(Dl(),tt({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){cr(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}cr(_||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:O===!0})}}async function cr(P,E,T){j&&j.abort(),j=null,_=P,he=(T&&T.startUninterruptedRevalidation)===!0,Xw(C.location,C.matches),D=(T&&T.preventScrollReset)===!0,O=(T&&T.enableViewTransition)===!0;let N=a||s,I=T&&T.overrideNavigation,$=wr(N,E,l),X=(T&&T.flushSync)===!0,B=ps($,N,E.pathname);if(B.active&&B.matches&&($=B.matches),!$){let{error:pe,notFoundMatches:ae,route:De}=Ml(E.pathname);Ur(E,{matches:ae,loaderData:{},errors:{[De.id]:pe}},{flushSync:X});return}if(C.initialized&&!le&&mP(C.location,E)&&!(T&&T.submission&&Bt(T.submission.formMethod))){Ur(E,{matches:$},{flushSync:X});return}j=new AbortController;let z=Kr(e.history,E,j.signal,T&&T.submission),V;if(T&&T.pendingError)V=[xr($).route.id,{type:de.error,error:T.pendingError}];else if(T&&T.submission&&Bt(T.submission.formMethod)){let pe=await zw(z,E,T.submission,$,B.active,{replace:T.replace,flushSync:X});if(pe.shortCircuited)return;if(pe.pendingActionResult){let[ae,De]=pe.pendingActionResult;if(wt(De)&&ul(De.error)&&De.error.status===404){j=null,Ur(E,{matches:pe.matches,loaderData:{},errors:{[ae]:De.error}});return}}$=pe.matches||$,V=pe.pendingActionResult,I=su(E,T.submission),X=!1,B.active=!1,z=Kr(e.history,z.url,z.signal)}let{shortCircuited:H,matches:te,loaderData:re,errors:ze}=await Uw(z,E,$,B.active,I,T&&T.submission,T&&T.fetcherSubmission,T&&T.replace,T&&T.initialHydration===!0,X,V);H||(j=null,Ur(E,Se({matches:te||$},_p(V),{loaderData:re,errors:ze})))}async function zw(P,E,T,N,I,$){$===void 0&&($={}),Dl();let X=SP(E,T);if(tt({navigation:X},{flushSync:$.flushSync===!0}),I){let V=await ms(N,E.pathname,P.signal);if(V.type==="aborted")return{shortCircuited:!0};if(V.type==="error"){let H=xr(V.partialMatches).route.id;return{matches:V.partialMatches,pendingActionResult:[H,{type:de.error,error:V.error}]}}else if(V.matches)N=V.matches;else{let{notFoundMatches:H,error:te,route:re}=Ml(E.pathname);return{matches:H,pendingActionResult:[re.id,{type:de.error,error:te}]}}}let B,z=ci(N,E);if(!z.route.action&&!z.route.lazy)B={type:de.error,error:lt(405,{method:P.method,pathname:E.pathname,routeId:z.route.id})};else if(B=(await Vo("action",C,P,[z],N,null))[z.route.id],P.signal.aborted)return{shortCircuited:!0};if(br(B)){let V;return $&&$.replace!=null?V=$.replace:V=Tp(B.response.headers.get("Location"),new URL(P.url),l)===C.location.pathname+C.location.search,await dr(P,B,!0,{submission:T,replace:V}),{shortCircuited:!0}}if(Un(B))throw lt(400,{type:"defer-action"});if(wt(B)){let V=xr(N,z.route.id);return($&&$.replace)!==!0&&(_=Ae.Push),{matches:N,pendingActionResult:[V.route.id,B]}}return{matches:N,pendingActionResult:[z.route.id,B]}}async function Uw(P,E,T,N,I,$,X,B,z,V,H){let te=I||su(E,$),re=$||X||Ap(te),ze=!he&&(!d.v7_partialHydration||!z);if(N){if(ze){let Me=Jf(H);tt(Se({navigation:te},Me!==void 0?{actionData:Me}:{}),{flushSync:V})}let se=await ms(T,E.pathname,P.signal);if(se.type==="aborted")return{shortCircuited:!0};if(se.type==="error"){let Me=xr(se.partialMatches).route.id;return{matches:se.partialMatches,loaderData:{},errors:{[Me]:se.error}}}else if(se.matches)T=se.matches;else{let{error:Me,notFoundMatches:$r,route:Uo}=Ml(E.pathname);return{matches:$r,loaderData:{},errors:{[Uo.id]:Me}}}}let pe=a||s,[ae,De]=bp(e.history,C,T,re,E,d.v7_partialHydration&&z===!0,d.v7_skipActionErrorRevalidation,le,at,Ye,Be,ve,Q,pe,l,H);if(Rl(se=>!(T&&T.some(Me=>Me.route.id===se))||ae&&ae.some(Me=>Me.route.id===se)),U=++M,ae.length===0&&De.length===0){let se=nh();return Ur(E,Se({matches:T,loaderData:{},errors:H&&wt(H[1])?{[H[0]]:H[1].error}:null},_p(H),se?{fetchers:new Map(C.fetchers)}:{}),{flushSync:V}),{shortCircuited:!0}}if(ze){let se={};if(!N){se.navigation=te;let Me=Jf(H);Me!==void 0&&(se.actionData=Me)}De.length>0&&(se.fetchers=Ww(De)),tt(se,{flushSync:V})}De.forEach(se=>{Dn(se.key),se.controller&&A.set(se.key,se.controller)});let Wr=()=>De.forEach(se=>Dn(se.key));j&&j.signal.addEventListener("abort",Wr);let{loaderResults:Bo,fetcherResults:un}=await Zf(C,T,ae,De,P);if(P.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",Wr),De.forEach(se=>A.delete(se.key));let Qt=js(Bo);if(Qt)return await dr(P,Qt.result,!0,{replace:B}),{shortCircuited:!0};if(Qt=js(un),Qt)return Q.add(Qt.key),await dr(P,Qt.result,!0,{replace:B}),{shortCircuited:!0};let{loaderData:_l,errors:zo}=Mp(C,T,Bo,H,De,un,jt);jt.forEach((se,Me)=>{se.subscribe($r=>{($r||se.done)&&jt.delete(Me)})}),d.v7_partialHydration&&z&&C.errors&&(zo=Se({},C.errors,zo));let fr=nh(),gs=rh(U),vs=fr||gs||De.length>0;return Se({matches:T,loaderData:_l,errors:zo},vs?{fetchers:new Map(C.fetchers)}:{})}function Jf(P){if(P&&!wt(P[1]))return{[P[0]]:P[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function Ww(P){return P.forEach(E=>{let T=C.fetchers.get(E.key),N=Jo(void 0,T?T.data:void 0);C.fetchers.set(E.key,N)}),new Map(C.fetchers)}function $w(P,E,T,N){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Dn(P);let I=(N&&N.flushSync)===!0,$=a||s,X=bc(C.location,C.matches,l,d.v7_prependBasename,T,d.v7_relativeSplatPath,E,N==null?void 0:N.relative),B=wr($,X,l),z=ps(B,$,X);if(z.active&&z.matches&&(B=z.matches),!B){ln(P,E,lt(404,{pathname:X}),{flushSync:I});return}let{path:V,submission:H,error:te}=Cp(d.v7_normalizeFormMethod,!0,X,N);if(te){ln(P,E,te,{flushSync:I});return}let re=ci(B,V),ze=(N&&N.preventScrollReset)===!0;if(H&&Bt(H.formMethod)){Hw(P,E,V,re,B,z.active,I,ze,H);return}ve.set(P,{routeId:E,path:V}),Yw(P,E,V,re,B,z.active,I,ze,H)}async function Hw(P,E,T,N,I,$,X,B,z){Dl(),ve.delete(P);function V(Le){if(!Le.route.action&&!Le.route.lazy){let Hr=lt(405,{method:z.formMethod,pathname:T,routeId:E});return ln(P,E,Hr,{flushSync:X}),!0}return!1}if(!$&&V(N))return;let H=C.fetchers.get(P);Tn(P,CP(z,H),{flushSync:X});let te=new AbortController,re=Kr(e.history,T,te.signal,z);if($){let Le=await ms(I,T,re.signal);if(Le.type==="aborted")return;if(Le.type==="error"){ln(P,E,Le.error,{flushSync:X});return}else if(Le.matches){if(I=Le.matches,N=ci(I,T),V(N))return}else{ln(P,E,lt(404,{pathname:T}),{flushSync:X});return}}A.set(P,te);let ze=M,ae=(await Vo("action",C,re,[N],I,P))[N.route.id];if(re.signal.aborted){A.get(P)===te&&A.delete(P);return}if(d.v7_fetcherPersist&&Be.has(P)){if(br(ae)||wt(ae)){Tn(P,An(void 0));return}}else{if(br(ae))if(A.delete(P),U>ze){Tn(P,An(void 0));return}else return Q.add(P),Tn(P,Jo(z)),dr(re,ae,!1,{fetcherSubmission:z,preventScrollReset:B});if(wt(ae)){ln(P,E,ae.error);return}}if(Un(ae))throw lt(400,{type:"defer-action"});let De=C.navigation.location||C.location,Wr=Kr(e.history,De,te.signal),Bo=a||s,un=C.navigation.state!=="idle"?wr(Bo,C.navigation.location,l):C.matches;ne(un,"Didn't find any matches after fetcher action");let Qt=++M;W.set(P,Qt);let _l=Jo(z,ae.data);C.fetchers.set(P,_l);let[zo,fr]=bp(e.history,C,un,z,De,!1,d.v7_skipActionErrorRevalidation,le,at,Ye,Be,ve,Q,Bo,l,[N.route.id,ae]);fr.filter(Le=>Le.key!==P).forEach(Le=>{let Hr=Le.key,lh=C.fetchers.get(Hr),Zw=Jo(void 0,lh?lh.data:void 0);C.fetchers.set(Hr,Zw),Dn(Hr),Le.controller&&A.set(Hr,Le.controller)}),tt({fetchers:new Map(C.fetchers)});let gs=()=>fr.forEach(Le=>Dn(Le.key));te.signal.addEventListener("abort",gs);let{loaderResults:vs,fetcherResults:se}=await Zf(C,un,zo,fr,Wr);if(te.signal.aborted)return;te.signal.removeEventListener("abort",gs),W.delete(P),A.delete(P),fr.forEach(Le=>A.delete(Le.key));let Me=js(vs);if(Me)return dr(Wr,Me.result,!1,{preventScrollReset:B});if(Me=js(se),Me)return Q.add(Me.key),dr(Wr,Me.result,!1,{preventScrollReset:B});let{loaderData:$r,errors:Uo}=Mp(C,un,vs,void 0,fr,se,jt);if(C.fetchers.has(P)){let Le=An(ae.data);C.fetchers.set(P,Le)}rh(Qt),C.navigation.state==="loading"&&Qt>U?(ne(_,"Expected pending action"),j&&j.abort(),Ur(C.navigation.location,{matches:un,loaderData:$r,errors:Uo,fetchers:new Map(C.fetchers)})):(tt({errors:Uo,loaderData:Rp(C.loaderData,$r,un,Uo),fetchers:new Map(C.fetchers)}),le=!1)}async function Yw(P,E,T,N,I,$,X,B,z){let V=C.fetchers.get(P);Tn(P,Jo(z,V?V.data:void 0),{flushSync:X});let H=new AbortController,te=Kr(e.history,T,H.signal);if($){let ae=await ms(I,T,te.signal);if(ae.type==="aborted")return;if(ae.type==="error"){ln(P,E,ae.error,{flushSync:X});return}else if(ae.matches)I=ae.matches,N=ci(I,T);else{ln(P,E,lt(404,{pathname:T}),{flushSync:X});return}}A.set(P,H);let re=M,pe=(await Vo("loader",C,te,[N],I,P))[N.route.id];if(Un(pe)&&(pe=await qd(pe,te.signal,!0)||pe),A.get(P)===H&&A.delete(P),!te.signal.aborted){if(Be.has(P)){Tn(P,An(void 0));return}if(br(pe))if(U>re){Tn(P,An(void 0));return}else{Q.add(P),await dr(te,pe,!1,{preventScrollReset:B});return}if(wt(pe)){ln(P,E,pe.error);return}ne(!Un(pe),"Unhandled fetcher deferred data"),Tn(P,An(pe.data))}}async function dr(P,E,T,N){let{submission:I,fetcherSubmission:$,preventScrollReset:X,replace:B}=N===void 0?{}:N;E.response.headers.has("X-Remix-Revalidate")&&(le=!0);let z=E.response.headers.get("Location");ne(z,"Expected a Location header on the redirect Response"),z=Tp(z,new URL(P.url),l);let V=Ui(C.location,z,{_isRedirect:!0});if(n){let ae=!1;if(E.response.headers.has("X-Remix-Reload-Document"))ae=!0;else if(Xd.test(z)){const De=e.history.createURL(z);ae=De.origin!==t.location.origin||ns(De.pathname,l)==null}if(ae){B?t.location.replace(z):t.location.assign(z);return}}j=null;let H=B===!0||E.response.headers.has("X-Remix-Replace")?Ae.Replace:Ae.Push,{formMethod:te,formAction:re,formEncType:ze}=C.navigation;!I&&!$&&te&&re&&ze&&(I=Ap(C.navigation));let pe=I||$;if(nP.has(E.response.status)&&pe&&Bt(pe.formMethod))await cr(H,V,{submission:Se({},pe,{formAction:z}),preventScrollReset:X||D,enableViewTransition:T?O:void 0});else{let ae=su(V,I);await cr(H,V,{overrideNavigation:ae,fetcherSubmission:$,preventScrollReset:X||D,enableViewTransition:T?O:void 0})}}async function Vo(P,E,T,N,I,$){let X,B={};try{X=await cP(u,P,E,T,N,I,$,i,o)}catch(z){return N.forEach(V=>{B[V.route.id]={type:de.error,error:z}}),B}for(let[z,V]of Object.entries(X))if(gP(V)){let H=V.result;B[z]={type:de.redirect,response:hP(H,T,z,I,l,d.v7_relativeSplatPath)}}else B[z]=await fP(V);return B}async function Zf(P,E,T,N,I){let $=P.matches,X=Vo("loader",P,I,T,E,null),B=Promise.all(N.map(async H=>{if(H.matches&&H.match&&H.controller){let re=(await Vo("loader",P,Kr(e.history,H.path,H.controller.signal),[H.match],H.matches,H.key))[H.match.route.id];return{[H.key]:re}}else return Promise.resolve({[H.key]:{type:de.error,error:lt(404,{pathname:H.path})}})})),z=await X,V=(await B).reduce((H,te)=>Object.assign(H,te),{});return await Promise.all([wP(E,z,I.signal,$,P.loaderData),xP(E,V,N)]),{loaderResults:z,fetcherResults:V}}function Dl(){le=!0,at.push(...Rl()),ve.forEach((P,E)=>{A.has(E)&&Ye.add(E),Dn(E)})}function Tn(P,E,T){T===void 0&&(T={}),C.fetchers.set(P,E),tt({fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function ln(P,E,T,N){N===void 0&&(N={});let I=xr(C.matches,E);fs(P),tt({errors:{[I.route.id]:T},fetchers:new Map(C.fetchers)},{flushSync:(N&&N.flushSync)===!0})}function eh(P){return d.v7_fetcherPersist&&(Gt.set(P,(Gt.get(P)||0)+1),Be.has(P)&&Be.delete(P)),C.fetchers.get(P)||rP}function fs(P){let E=C.fetchers.get(P);A.has(P)&&!(E&&E.state==="loading"&&W.has(P))&&Dn(P),ve.delete(P),W.delete(P),Q.delete(P),Be.delete(P),Ye.delete(P),C.fetchers.delete(P)}function Kw(P){if(d.v7_fetcherPersist){let E=(Gt.get(P)||0)-1;E<=0?(Gt.delete(P),Be.add(P)):Gt.set(P,E)}else fs(P);tt({fetchers:new Map(C.fetchers)})}function Dn(P){let E=A.get(P);E&&(E.abort(),A.delete(P))}function th(P){for(let E of P){let T=eh(E),N=An(T.data);C.fetchers.set(E,N)}}function nh(){let P=[],E=!1;for(let T of Q){let N=C.fetchers.get(T);ne(N,"Expected fetcher: "+T),N.state==="loading"&&(Q.delete(T),P.push(T),E=!0)}return th(P),E}function rh(P){let E=[];for(let[T,N]of W)if(N0}function Gw(P,E){let T=C.blockers.get(P)||qo;return et.get(P)!==E&&et.set(P,E),T}function oh(P){C.blockers.delete(P),et.delete(P)}function hs(P,E){let T=C.blockers.get(P)||qo;ne(T.state==="unblocked"&&E.state==="blocked"||T.state==="blocked"&&E.state==="blocked"||T.state==="blocked"&&E.state==="proceeding"||T.state==="blocked"&&E.state==="unblocked"||T.state==="proceeding"&&E.state==="unblocked","Invalid blocker state transition: "+T.state+" -> "+E.state);let N=new Map(C.blockers);N.set(P,E),tt({blockers:N})}function ih(P){let{currentLocation:E,nextLocation:T,historyAction:N}=P;if(et.size===0)return;et.size>1&&To(!1,"A router only supports one blocker at a time");let I=Array.from(et.entries()),[$,X]=I[I.length-1],B=C.blockers.get($);if(!(B&&B.state==="proceeding")&&X({currentLocation:E,nextLocation:T,historyAction:N}))return $}function Ml(P){let E=lt(404,{pathname:P}),T=a||s,{matches:N,route:I}=Np(T);return Rl(),{notFoundMatches:N,route:I,error:E}}function Rl(P){let E=[];return jt.forEach((T,N)=>{(!P||P(N))&&(T.cancel(),E.push(N),jt.delete(N))}),E}function Qw(P,E,T){if(m=P,w=E,v=T||null,!g&&C.navigation===iu){g=!0;let N=ah(C.location,C.matches);N!=null&&tt({restoreScrollPosition:N})}return()=>{m=null,w=null,v=null}}function sh(P,E){return v&&v(P,E.map(N=>AC(N,C.loaderData)))||P.key}function Xw(P,E){if(m&&w){let T=sh(P,E);m[T]=w()}}function ah(P,E){if(m){let T=sh(P,E),N=m[T];if(typeof N=="number")return N}return null}function ps(P,E,T){if(c)if(P){if(Object.keys(P[0].params).length>0)return{active:!0,matches:Zs(E,T,l,!0)}}else return{active:!0,matches:Zs(E,T,l,!0)||[]};return{active:!1,matches:null}}async function ms(P,E,T){if(!c)return{type:"success",matches:P};let N=P;for(;;){let I=a==null,$=a||s,X=i;try{await c({path:E,matches:N,patch:(V,H)=>{T.aborted||kp(V,H,$,X,o)}})}catch(V){return{type:"error",error:V,partialMatches:N}}finally{I&&!T.aborted&&(s=[...s])}if(T.aborted)return{type:"aborted"};let B=wr($,E,l);if(B)return{type:"success",matches:B};let z=Zs($,E,l,!0);if(!z||N.length===z.length&&N.every((V,H)=>V.route.id===z[H].route.id))return{type:"success",matches:null};N=z}}function qw(P){i={},a=_a(P,o,void 0,i)}function Jw(P,E){let T=a==null;kp(P,E,a||s,i,o),T&&(s=[...s],tt({}))}return k={get basename(){return l},get future(){return d},get state(){return C},get routes(){return s},get window(){return t},initialize:Fw,subscribe:Vw,enableScrollRestoration:Qw,navigate:qf,fetch:$w,revalidate:Bw,createHref:P=>e.history.createHref(P),encodeLocation:P=>e.history.encodeLocation(P),getFetcher:eh,deleteFetcher:Kw,dispose:Iw,getBlocker:Gw,deleteBlocker:oh,patchRoutes:Jw,_internalFetchControllers:A,_internalActiveDeferreds:jt,_internalSetRoutes:qw},k}function sP(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function bc(e,t,n,r,o,i,s,a){let l,u;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){u=d;break}}else l=t,u=t[t.length-1];let c=Qy(o||".",Gy(l,i),ns(e.pathname,n)||e.pathname,a==="path");if(o==null&&(c.search=e.search,c.hash=e.hash),(o==null||o===""||o===".")&&u){let d=Jd(c.search);if(u.route.index&&!d)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&d){let f=new URLSearchParams(c.search),p=f.getAll("index");f.delete("index"),p.filter(v=>v).forEach(v=>f.append("index",v));let m=f.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:qn([n,c.pathname])),ts(c)}function Cp(e,t,n,r){if(!r||!sP(r))return{path:n};if(r.formMethod&&!yP(r.formMethod))return{path:n,error:lt(405,{method:r.formMethod})};let o=()=>({path:n,error:lt(400,{type:"invalid-body"})}),i=r.formMethod||"get",s=e?i.toUpperCase():i.toLowerCase(),a=e0(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Bt(s))return o();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,w]=m;return""+p+v+"="+w+` `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Bt(s))return o();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:a,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return o()}}}ne(typeof FormData=="function","FormData is not available in this environment");let l,u;if(r.formData)l=kc(r.formData),u=r.formData;else if(r.body instanceof FormData)l=kc(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=Dp(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=Dp(l)}catch{return o()}let c={formMethod:s,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Bt(c.formMethod))return{path:n,submission:c};let d=sr(n);return t&&d.search&&Jd(d.search)&&l.append("index",""),d.search="?"+l,{path:ts(d),submission:c}}function Pp(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(o=>o.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function bp(e,t,n,r,o,i,s,a,l,u,c,d,f,p,m,v){let w=v?wt(v[1])?v[1].error:v[1].data:void 0,g=e.createURL(t.location),h=e.createURL(o),y=n;i&&t.errors?y=Pp(n,Object.keys(t.errors)[0],!0):v&&wt(v[1])&&(y=Pp(n,v[0]));let b=v?v[1].statusCode:void 0,k=s&&b&&b>=400,C=y.filter((D,j)=>{let{route:O}=D;if(O.lazy)return!0;if(O.loader==null)return!1;if(i)return Ec(O,t.loaderData,t.errors);if(aP(t.loaderData,t.matches[j],D)||l.some(he=>he===D.route.id))return!0;let J=t.matches[j],Y=D;return Ep(D,Se({currentUrl:g,currentParams:J.params,nextUrl:h,nextParams:Y.params},r,{actionResult:w,actionStatus:b,defaultShouldRevalidate:k?!1:a||g.pathname+g.search===h.pathname+h.search||g.search!==h.search||Jy(J,Y)}))}),_=[];return d.forEach((D,j)=>{if(i||!n.some(le=>le.route.id===D.routeId)||c.has(j))return;let O=wr(p,D.path,m);if(!O){_.push({key:j,routeId:D.routeId,path:D.path,matches:null,match:null,controller:null});return}let J=t.fetchers.get(j),Y=ci(O,D.path),he=!1;f.has(j)?he=!1:u.has(j)?(u.delete(j),he=!0):J&&J.state!=="idle"&&J.data===void 0?he=a:he=Ep(Y,Se({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:n[n.length-1].params},r,{actionResult:w,actionStatus:b,defaultShouldRevalidate:k?!1:a})),he&&_.push({key:j,routeId:D.routeId,path:D.path,matches:O,match:Y,controller:new AbortController})}),[C,_]}function Ec(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,o=n!=null&&n[e.id]!==void 0;return!r&&o?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!o}function aP(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function Jy(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ep(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function kp(e,t,n,r,o){var i;let s;if(e){let u=r[e];ne(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),s=u.children}else s=n;let a=t.filter(u=>!s.some(c=>Zy(u,c))),l=_a(a,o,[e||"_","patch",String(((i=s)==null?void 0:i.length)||"0")],r);s.push(...l)}function Zy(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var o;return(o=t.children)==null?void 0:o.some(i=>Zy(n,i))}):!1}async function lP(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];ne(o,"No route found in manifest");let i={};for(let s in r){let l=o[s]!==void 0&&s!=="hasErrorBoundary";To(!l,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!NC.has(s)&&(i[s]=r[s])}Object.assign(o,i),Object.assign(o,Se({},t(o),{lazy:void 0}))}async function uP(e){let{matches:t}=e,n=t.filter(o=>o.shouldLoad);return(await Promise.all(n.map(o=>o.resolve()))).reduce((o,i,s)=>Object.assign(o,{[n[s].route.id]:i}),{})}async function cP(e,t,n,r,o,i,s,a,l,u){let c=i.map(p=>p.route.lazy?lP(p.route,l,a):void 0),d=i.map((p,m)=>{let v=c[m],w=o.some(h=>h.route.id===p.route.id);return Se({},p,{shouldLoad:w,resolve:async h=>(h&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(w=!0),w?dP(t,r,p,v,h,u):Promise.resolve({type:de.data,result:void 0}))})}),f=await e({matches:d,request:r,params:i[0].params,fetcherKey:s,context:u});try{await Promise.all(c)}catch{}return f}async function dP(e,t,n,r,o,i){let s,a,l=u=>{let c,d=new Promise((m,v)=>c=v);a=()=>c(),t.signal.addEventListener("abort",a);let f=m=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:i},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(o?o(v=>f(v)):f())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,d])};try{let u=n.route[e];if(r)if(u){let c,[d]=await Promise.all([l(u).catch(f=>{c=f}),r]);if(c!==void 0)throw c;s=d}else if(await r,u=n.route[e],u)s=await l(u);else if(e==="action"){let c=new URL(t.url),d=c.pathname+c.search;throw lt(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:de.data,result:void 0};else if(u)s=await l(u);else{let c=new URL(t.url),d=c.pathname+c.search;throw lt(404,{pathname:d})}ne(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:de.error,result:u}}finally{a&&t.signal.removeEventListener("abort",a)}return s}async function fP(e){let{result:t,type:n}=e;if(t0(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:de.error,error:c}}return n===de.error?{type:de.error,error:new Na(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:de.data,data:u,statusCode:t.status,headers:t.headers}}if(n===de.error){if(Lp(t)){var r;if(t.data instanceof Error){var o;return{type:de.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status}}t=new Na(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:de.error,error:t,statusCode:ul(t)?t.status:void 0}}if(vP(t)){var i,s;return{type:de.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((s=t.init)==null?void 0:s.headers)&&new Headers(t.init.headers)}}if(Lp(t)){var a,l;return{type:de.data,data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:de.data,data:t}}function hP(e,t,n,r,o,i){let s=e.headers.get("Location");if(ne(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xd.test(s)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=bc(new URL(t.url),a,o,!0,s,i),e.headers.set("Location",s)}return e}function Tp(e,t,n){if(Xd.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=ns(o.pathname,n)!=null;if(o.origin===t.origin&&i)return o.pathname+o.search+o.hash}return e}function Kr(e,t,n,r){let o=e.createURL(e0(t)).toString(),i={signal:n};if(r&&Bt(r.formMethod)){let{formMethod:s,formEncType:a}=r;i.method=s.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(r.json)):a==="text/plain"?i.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?i.body=kc(r.formData):i.body=r.formData}return new Request(o,i)}function kc(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Dp(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function pP(e,t,n,r,o){let i={},s=null,a,l=!1,u={},c=n&&wt(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let f=d.route.id,p=t[f];if(ne(!br(p),"Cannot handle redirect results in processLoaderData"),wt(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),s=s||{};{let v=xr(e,f);s[v.route.id]==null&&(s[v.route.id]=m)}i[f]=void 0,l||(l=!0,a=ul(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else Un(p)?(r.set(f,p.deferredData),i[f]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(u[f]=p.headers)):(i[f]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(u[f]=p.headers))}),c!==void 0&&n&&(s={[n[0]]:c},i[n[0]]=void 0),{loaderData:i,errors:s,statusCode:a||200,loaderHeaders:u}}function Mp(e,t,n,r,o,i,s){let{loaderData:a,errors:l}=pP(t,n,r,s);return o.forEach(u=>{let{key:c,match:d,controller:f}=u,p=i[c];if(ne(p,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(wt(p)){let m=xr(e.matches,d==null?void 0:d.route.id);l&&l[m.route.id]||(l=Se({},l,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(br(p))ne(!1,"Unhandled fetcher revalidation redirect");else if(Un(p))ne(!1,"Unhandled fetcher deferred data");else{let m=An(p.data);e.fetchers.set(c,m)}}),{loaderData:a,errors:l}}function Rp(e,t,n,r){let o=Se({},t);for(let i of n){let s=i.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&i.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function _p(e){return e?wt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Np(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function lt(e,t){let{pathname:n,routeId:r,method:o,type:i,message:s}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",o&&n&&r?l="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",o&&n&&r?l="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new Na(e||500,a,new Error(l),!0)}function js(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,o]=t[n];if(br(o))return{key:r,result:o}}}function e0(e){let t=typeof e=="string"?sr(e):e;return ts(Se({},t,{hash:""}))}function mP(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function gP(e){return t0(e.result)&&tP.has(e.result.status)}function Un(e){return e.type===de.deferred}function wt(e){return e.type===de.error}function br(e){return(e&&e.type)===de.redirect}function Lp(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function vP(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function t0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function yP(e){return eP.has(e.toLowerCase())}function Bt(e){return JC.has(e.toLowerCase())}async function wP(e,t,n,r,o){let i=Object.entries(t);for(let s=0;s(f==null?void 0:f.route.id)===a);if(!u)continue;let c=r.find(f=>f.route.id===u.route.id),d=c!=null&&!Jy(c,u)&&(o&&o[u.route.id])!==void 0;Un(l)&&d&&await qd(l,n,!1).then(f=>{f&&(t[a]=f)})}}async function xP(e,t,n){for(let r=0;r(u==null?void 0:u.route.id)===i)&&Un(a)&&(ne(s,"Expected an AbortController for revalidating fetcher deferred result"),await qd(a,s.signal,!0).then(u=>{u&&(t[o]=u)}))}}async function qd(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:de.data,data:e.deferredData.unwrappedData}}catch(o){return{type:de.error,error:o}}return{type:de.data,data:e.deferredData.data}}}function Jd(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ci(e,t){let n=typeof t=="string"?sr(t).search:t.search;if(e[e.length-1].route.index&&Jd(n||""))return e[e.length-1];let r=Ky(e);return r[r.length-1]}function Ap(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function su(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function SP(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Jo(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function CP(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function An(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function PP(e,t){try{let n=e.sessionStorage.getItem(qy);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function bP(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(qy,JSON.stringify(n))}catch(r){To(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),S.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=Qy(u,JSON.parse(s),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:qn([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,s,i,e])}const kP=S.createContext(null);function TP(e){let t=S.useContext(Br).outlet;return t&&S.createElement(kP.Provider,{value:e},t)}function DP(e,t,n,r){fl()||ne(!1);let{navigator:o}=S.useContext(dl),{matches:i}=S.useContext(Br),s=i[i.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=o0(),c;c=u;let d=c.pathname||"/",f=d;if(l!=="/"){let v=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=wr(e,{pathname:f});return LP(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:qn([l,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:qn([l,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r)}function MP(){let e=FP(),t=ul(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:o},n):null,null)}const RP=S.createElement(MP,null);class _P extends S.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?S.createElement(Br.Provider,{value:this.props.routeContext},S.createElement(r0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function NP(e){let{routeContext:t,match:n,children:r}=e,o=S.useContext(cl);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Br.Provider,{value:t},r)}function LP(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(o=n)==null?void 0:o.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||ne(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let p,m=!1,v=null,w=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,v=d.route.errorElement||RP,l&&(u<0&&f===0?(VP("route-fallback"),m=!0,w=null):u===f&&(m=!0,w=d.route.hydrateFallbackElement||null)));let g=t.concat(s.slice(0,f+1)),h=()=>{let y;return p?y=v:m?y=w:d.route.Component?y=S.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=c,S.createElement(NP,{match:d,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?S.createElement(_P,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:h(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):h()},null)}var a0=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(a0||{}),Aa=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Aa||{});function AP(e){let t=S.useContext(cl);return t||ne(!1),t}function OP(e){let t=S.useContext(n0);return t||ne(!1),t}function jP(e){let t=S.useContext(Br);return t||ne(!1),t}function l0(e){let t=jP(),n=t.matches[t.matches.length-1];return n.route.id||ne(!1),n.route.id}function FP(){var e;let t=S.useContext(r0),n=OP(Aa.UseRouteError),r=l0(Aa.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function IP(){let{router:e}=AP(a0.UseNavigateStable),t=l0(Aa.UseNavigateStable),n=S.useRef(!1);return i0(()=>{n.current=!0}),S.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,La({fromRouteId:t},i)))},[e,t])}const Op={};function VP(e,t,n){Op[e]||(Op[e]=!0)}function BP(e){return TP(e.context)}function zP(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ae.Pop,navigator:i,static:s=!1,future:a}=e;fl()&&ne(!1);let l=t.replace(/^\/*/,"/"),u=S.useMemo(()=>({basename:l,navigator:i,static:s,future:La({v7_relativeSplatPath:!1},a)}),[l,a,i,s]);typeof r=="string"&&(r=sr(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,v=S.useMemo(()=>{let w=ns(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:p,key:m},navigationType:o}},[l,c,d,f,p,m,o]);return v==null?null:S.createElement(dl.Provider,{value:u},S.createElement(Zd.Provider,{children:n,value:v}))}new Promise(()=>{});function UP(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:S.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:S.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:S.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ZP(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=S.useState(n.state),[s,a]=S.useState(),[l,u]=S.useState({isTransitioning:!1}),[c,d]=S.useState(),[f,p]=S.useState(),[m,v]=S.useState(),w=S.useRef(new Map),{v7_startTransition:g}=r||{},h=S.useCallback(D=>{g?qP(D):D()},[g]),y=S.useCallback((D,j)=>{let{deletedFetchers:O,flushSync:J,viewTransitionOpts:Y}=j;O.forEach(le=>w.current.delete(le)),D.fetchers.forEach((le,at)=>{le.data!==void 0&&w.current.set(at,le.data)});let he=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Y||he){J?Zo(()=>i(D)):h(()=>i(D));return}if(J){Zo(()=>{f&&(c&&c.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let le=n.window.document.startViewTransition(()=>{Zo(()=>i(D))});le.finished.finally(()=>{Zo(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})})}),Zo(()=>p(le));return}f?(c&&c.resolve(),f.skipTransition(),v({state:D,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(a(D),u({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[n.window,f,c,w,h]);S.useLayoutEffect(()=>n.subscribe(y),[n,y]),S.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new JP)},[l]),S.useEffect(()=>{if(c&&s&&n.window){let D=s,j=c.promise,O=n.window.document.startViewTransition(async()=>{h(()=>i(D)),await j});O.finished.finally(()=>{d(void 0),p(void 0),a(void 0),u({isTransitioning:!1})}),p(O)}},[h,s,c,n.window]),S.useEffect(()=>{c&&s&&o.location.key===s.location.key&&c.resolve()},[c,f,o.location,s]),S.useEffect(()=>{!l.isTransitioning&&m&&(a(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[l.isTransitioning,m]),S.useEffect(()=>{},[]);let b=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:D=>n.navigate(D),push:(D,j,O)=>n.navigate(D,{state:j,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(D,j,O)=>n.navigate(D,{replace:!0,state:j,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),k=n.basename||"/",C=S.useMemo(()=>({router:n,navigator:b,static:!1,basename:k}),[n,b,k]),_=S.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return S.createElement(S.Fragment,null,S.createElement(cl.Provider,{value:C},S.createElement(n0.Provider,{value:o},S.createElement(GP.Provider,{value:w.current},S.createElement(KP.Provider,{value:l},S.createElement(zP,{basename:k,location:o.location,navigationType:o.historyAction,navigator:b,future:_},o.initialized||n.future.v7_partialHydration?S.createElement(eb,{routes:n.routes,future:n.future,state:o}):t))))),null)}const eb=S.memo(tb);function tb(e){let{routes:t,future:n,state:r}=e;return DP(t,void 0,r,n)}var Ip;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ip||(Ip={}));var Vp;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vp||(Vp={}));function u0(e,t){return function(){return e.apply(t,arguments)}}const{toString:nb}=Object.prototype,{getPrototypeOf:ef}=Object,hl=(e=>t=>{const n=nb.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kt=e=>(e=e.toLowerCase(),t=>hl(t)===e),pl=e=>t=>typeof t===e,{isArray:Oo}=Array,Wi=pl("undefined");function rb(e){return e!==null&&!Wi(e)&&e.constructor!==null&&!Wi(e.constructor)&&Ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const c0=Kt("ArrayBuffer");function ob(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&c0(e.buffer),t}const ib=pl("string"),Ct=pl("function"),d0=pl("number"),ml=e=>e!==null&&typeof e=="object",sb=e=>e===!0||e===!1,ea=e=>{if(hl(e)!=="object")return!1;const t=ef(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ab=Kt("Date"),lb=Kt("File"),ub=Kt("Blob"),cb=Kt("FileList"),db=e=>ml(e)&&Ct(e.pipe),fb=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ct(e.append)&&((t=hl(e))==="formdata"||t==="object"&&Ct(e.toString)&&e.toString()==="[object FormData]"))},hb=Kt("URLSearchParams"),[pb,mb,gb,vb]=["ReadableStream","Request","Response","Headers"].map(Kt),yb=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rs(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Oo(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Er=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,h0=e=>!Wi(e)&&e!==Er;function Tc(){const{caseless:e}=h0(this)&&this||{},t={},n=(r,o)=>{const i=e&&f0(t,o)||o;ea(t[i])&&ea(r)?t[i]=Tc(t[i],r):ea(r)?t[i]=Tc({},r):Oo(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(rs(t,(o,i)=>{n&&Ct(o)?e[i]=u0(o,n):e[i]=o},{allOwnKeys:r}),e),xb=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Sb=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Cb=(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&ef(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Pb=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bb=e=>{if(!e)return null;if(Oo(e))return e;let t=e.length;if(!d0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Eb=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ef(Uint8Array)),kb=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Tb=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Db=Kt("HTMLFormElement"),Mb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Bp=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rb=Kt("RegExp"),p0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};rs(n,(o,i)=>{let s;(s=t(o,i,e))!==!1&&(r[i]=s||o)}),Object.defineProperties(e,r)},_b=e=>{p0(e,(t,n)=>{if(Ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Nb=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Oo(e)?r(e):r(String(e).split(t)),n},Lb=()=>{},Ab=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,au="abcdefghijklmnopqrstuvwxyz",zp="0123456789",m0={DIGIT:zp,ALPHA:au,ALPHA_DIGIT:au+au.toUpperCase()+zp},Ob=(e=16,t=m0.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function jb(e){return!!(e&&Ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Fb=e=>{const t=new Array(10),n=(r,o)=>{if(ml(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Oo(r)?[]:{};return rs(r,(s,a)=>{const l=n(s,o+1);!Wi(l)&&(i[a]=l)}),t[o]=void 0,i}}return r};return n(e,0)},Ib=Kt("AsyncFunction"),Vb=e=>e&&(ml(e)||Ct(e))&&Ct(e.then)&&Ct(e.catch),g0=((e,t)=>e?setImmediate:t?((n,r)=>(Er.addEventListener("message",({source:o,data:i})=>{o===Er&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Er.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ct(Er.postMessage)),Bb=typeof queueMicrotask<"u"?queueMicrotask.bind(Er):typeof process<"u"&&process.nextTick||g0,R={isArray:Oo,isArrayBuffer:c0,isBuffer:rb,isFormData:fb,isArrayBufferView:ob,isString:ib,isNumber:d0,isBoolean:sb,isObject:ml,isPlainObject:ea,isReadableStream:pb,isRequest:mb,isResponse:gb,isHeaders:vb,isUndefined:Wi,isDate:ab,isFile:lb,isBlob:ub,isRegExp:Rb,isFunction:Ct,isStream:db,isURLSearchParams:hb,isTypedArray:Eb,isFileList:cb,forEach:rs,merge:Tc,extend:wb,trim:yb,stripBOM:xb,inherits:Sb,toFlatObject:Cb,kindOf:hl,kindOfTest:Kt,endsWith:Pb,toArray:bb,forEachEntry:kb,matchAll:Tb,isHTMLForm:Db,hasOwnProperty:Bp,hasOwnProp:Bp,reduceDescriptors:p0,freezeMethods:_b,toObjectSet:Nb,toCamelCase:Mb,noop:Lb,toFiniteNumber:Ab,findKey:f0,global:Er,isContextDefined:h0,ALPHABET:m0,generateString:Ob,isSpecCompliantForm:jb,toJSONObject:Fb,isAsyncFn:Ib,isThenable:Vb,setImmediate:g0,asap:Bb};function q(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}R.inherits(q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.status}}});const v0=q.prototype,y0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{y0[e]={value:e}});Object.defineProperties(q,y0);Object.defineProperty(v0,"isAxiosError",{value:!0});q.from=(e,t,n,r,o,i)=>{const s=Object.create(v0);return R.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),q.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const zb=null;function Dc(e){return R.isPlainObject(e)||R.isArray(e)}function w0(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function Up(e,t,n){return e?e.concat(t).map(function(o,i){return o=w0(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function Ub(e){return R.isArray(e)&&!e.some(Dc)}const Wb=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function gl(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!R.isUndefined(w[v])});const r=n.metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(o))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(R.isDate(m))return m.toISOString();if(!l&&R.isBlob(m))throw new q("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(m)||R.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,w){let g=m;if(m&&!w&&typeof m=="object"){if(R.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(R.isArray(m)&&Ub(m)||(R.isFileList(m)||R.endsWith(v,"[]"))&&(g=R.toArray(m)))return v=w0(v),g.forEach(function(y,b){!(R.isUndefined(y)||y===null)&&t.append(s===!0?Up([v],b,i):s===null?v:v+"[]",u(y))}),!1}return Dc(m)?!0:(t.append(Up(w,v,i),u(m)),!1)}const d=[],f=Object.assign(Wb,{defaultVisitor:c,convertValue:u,isVisitable:Dc});function p(m,v){if(!R.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(m),R.forEach(m,function(g,h){(!(R.isUndefined(g)||g===null)&&o.call(t,g,R.isString(h)?h.trim():h,v,f))===!0&&p(g,v?v.concat(h):[h])}),d.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Wp(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function tf(e,t){this._pairs=[],e&&gl(e,this,t)}const x0=tf.prototype;x0.append=function(t,n){this._pairs.push([t,n])};x0.toString=function(t){const n=t?function(r){return t.call(this,r,Wp)}:Wp;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function $b(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function S0(e,t,n){if(!t)return e;const r=n&&n.encode||$b,o=n&&n.serialize;let i;if(o?i=o(t,n):i=R.isURLSearchParams(t)?t.toString():new tf(t,n).toString(r),i){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class $p{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const C0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hb=typeof URLSearchParams<"u"?URLSearchParams:tf,Yb=typeof FormData<"u"?FormData:null,Kb=typeof Blob<"u"?Blob:null,Gb={isBrowser:!0,classes:{URLSearchParams:Hb,FormData:Yb,Blob:Kb},protocols:["http","https","file","blob","url","data"]},nf=typeof window<"u"&&typeof document<"u",Mc=typeof navigator=="object"&&navigator||void 0,Qb=nf&&(!Mc||["ReactNative","NativeScript","NS"].indexOf(Mc.product)<0),Xb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qb=nf&&window.location.href||"http://localhost",Jb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nf,hasStandardBrowserEnv:Qb,hasStandardBrowserWebWorkerEnv:Xb,navigator:Mc,origin:qb},Symbol.toStringTag,{value:"Module"})),mt={...Jb,...Gb};function Zb(e,t){return gl(e,new mt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return mt.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function eE(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function tE(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return s=!s&&R.isArray(o)?o.length:s,l?(R.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!R.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],i)&&R.isArray(o[s])&&(o[s]=tE(o[s])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,o)=>{t(eE(r),o,n,0)}),n}return null}function nE(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const os={transitional:C0,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=R.isObject(t);if(i&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return o?JSON.stringify(P0(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t)||R.isReadableStream(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Zb(t,this.formSerializer).toString();if((a=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gl(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),nE(t)):t}],transformResponse:[function(t){const n=this.transitional||os.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(R.isResponse(t)||R.isReadableStream(t))return t;if(t&&R.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?q.from(a,q.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mt.classes.FormData,Blob:mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],e=>{os.headers[e]={}});const rE=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oE=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&rE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Hp=Symbol("internals");function ei(e){return e&&String(e).trim().toLowerCase()}function ta(e){return e===!1||e==null?e:R.isArray(e)?e.map(ta):String(e)}function iE(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const sE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lu(e,t,n,r,o){if(R.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function aE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function lE(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,s){return this[r].call(this,t,o,i,s)},configurable:!0})})}class gt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(a,l,u){const c=ei(l);if(!c)throw new Error("header name must be a non-empty string");const d=R.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||l]=ta(a))}const s=(a,l)=>R.forEach(a,(u,c)=>i(u,c,l));if(R.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(R.isString(t)&&(t=t.trim())&&!sE(t))s(oE(t),n);else if(R.isHeaders(t))for(const[a,l]of t.entries())i(l,a,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=ei(t),t){const r=R.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return iE(o);if(R.isFunction(n))return n.call(this,o,r);if(R.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ei(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lu(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(s){if(s=ei(s),s){const a=R.findKey(r,s);a&&(!n||lu(r,r[a],a,n))&&(delete r[a],o=!0)}}return R.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||lu(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return R.forEach(this,(o,i)=>{const s=R.findKey(r,i);if(s){n[s]=ta(o),delete n[i];return}const a=t?aE(i):String(i).trim();a!==i&&delete n[i],n[a]=ta(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Hp]=this[Hp]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=ei(s);r[a]||(lE(o,s),r[a]=!0)}return R.isArray(t)?t.forEach(i):i(t),this}}gt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(gt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});R.freezeMethods(gt);function uu(e,t){const n=this||os,r=t||n,o=gt.from(r.headers);let i=r.data;return R.forEach(e,function(a){i=a.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function b0(e){return!!(e&&e.__CANCEL__)}function jo(e,t,n){q.call(this,e??"canceled",q.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(jo,q,{__CANCEL__:!0});function E0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new q("Request failed with status code "+n.status,[q.ERR_BAD_REQUEST,q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function uE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cE(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,s;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[i];s||(s=u),n[o]=l,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-s{n=c,o=null,i&&(clearTimeout(i),i=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?s(u,c):(o=u,i||(i=setTimeout(()=>{i=null,s(o)},r-d)))},()=>o&&s(o)]}const ja=(e,t,n=3)=>{let r=0;const o=cE(50,250);return dE(i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,l=s-r,u=o(l),c=s<=a;r=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Yp=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kp=e=>(...t)=>R.asap(()=>e(...t)),fE=mt.hasStandardBrowserEnv?function(){const t=mt.navigator&&/(msie|trident)/i.test(mt.navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const a=R.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}(),hE=mt.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];R.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),R.isString(r)&&s.push("path="+r),R.isString(o)&&s.push("domain="+o),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function pE(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function k0(e,t){return e&&!pE(t)?mE(e,t):t}const Gp=e=>e instanceof gt?{...e}:e;function jr(e,t){t=t||{};const n={};function r(u,c,d){return R.isPlainObject(u)&&R.isPlainObject(c)?R.merge.call({caseless:d},u,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function o(u,c,d){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!R.isUndefined(c))return r(void 0,c)}function s(u,c){if(R.isUndefined(c)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>o(Gp(u),Gp(c),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=l[c]||o,f=d(e[c],t[c],c);R.isUndefined(f)&&d!==a||(n[c]=f)}),n}const T0=e=>{const t=jr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;t.headers=s=gt.from(s),t.url=S0(k0(t.baseURL,t.url),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(R.isFormData(n)){if(mt.hasStandardBrowserEnv||mt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...c].join("; "))}}if(mt.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(t)),r||r!==!1&&fE(t.url))){const u=o&&i&&hE.read(i);u&&s.set(o,u)}return t},gE=typeof XMLHttpRequest<"u",vE=gE&&function(e){return new Promise(function(n,r){const o=T0(e);let i=o.data;const s=gt.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=o,c,d,f,p,m;function v(){p&&p(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function g(){if(!w)return;const y=gt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:y,config:e,request:w};E0(function(_){n(_),v()},function(_){r(_),v()},k),w=null}"onloadend"in w?w.onloadend=g:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(g)},w.onabort=function(){w&&(r(new q("Request aborted",q.ECONNABORTED,e,w)),w=null)},w.onerror=function(){r(new q("Network Error",q.ERR_NETWORK,e,w)),w=null},w.ontimeout=function(){let b=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||C0;o.timeoutErrorMessage&&(b=o.timeoutErrorMessage),r(new q(b,k.clarifyTimeoutError?q.ETIMEDOUT:q.ECONNABORTED,e,w)),w=null},i===void 0&&s.setContentType(null),"setRequestHeader"in w&&R.forEach(s.toJSON(),function(b,k){w.setRequestHeader(k,b)}),R.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),a&&a!=="json"&&(w.responseType=o.responseType),u&&([f,m]=ja(u,!0),w.addEventListener("progress",f)),l&&w.upload&&([d,p]=ja(l),w.upload.addEventListener("progress",d),w.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(c=y=>{w&&(r(!y||y.type?new jo(null,e,w):y),w.abort(),w=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const h=uE(o.url);if(h&&mt.protocols.indexOf(h)===-1){r(new q("Unsupported protocol "+h+":",q.ERR_BAD_REQUEST,e));return}w.send(i||null)})},yE=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(u){if(!o){o=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof q?c:new jo(c instanceof Error?c.message:c))}};let s=t&&setTimeout(()=>{s=null,i(new q(`timeout ${t} of ms exceeded`,q.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>R.asap(a),l}},wE=function*(e,t){let n=e.byteLength;if(n{const o=xE(e,t);let i=0,s,a=l=>{s||(s=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await o.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},vl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",D0=vl&&typeof ReadableStream=="function",CE=vl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),M0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},PE=D0&&M0(()=>{let e=!1;const t=new Request(mt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Xp=64*1024,Rc=D0&&M0(()=>R.isReadableStream(new Response("").body)),Fa={stream:Rc&&(e=>e.body)};vl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Fa[t]&&(Fa[t]=R.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new q(`Response type '${t}' is not supported`,q.ERR_NOT_SUPPORT,r)})})})(new Response);const bE=async e=>{if(e==null)return 0;if(R.isBlob(e))return e.size;if(R.isSpecCompliantForm(e))return(await new Request(mt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(R.isArrayBufferView(e)||R.isArrayBuffer(e))return e.byteLength;if(R.isURLSearchParams(e)&&(e=e+""),R.isString(e))return(await CE(e)).byteLength},EE=async(e,t)=>{const n=R.toFiniteNumber(e.getContentLength());return n??bE(t)},kE=vl&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=T0(e);u=u?(u+"").toLowerCase():"text";let p=yE([o,i&&i.toAbortSignal()],s),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let w;try{if(l&&PE&&n!=="get"&&n!=="head"&&(w=await EE(c,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(R.isFormData(r)&&(C=k.headers.get("content-type"))&&c.setContentType(C),k.body){const[_,D]=Yp(w,ja(Kp(l)));r=Qp(k.body,Xp,_,D)}}R.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let h=await fetch(m);const y=Rc&&(u==="stream"||u==="response");if(Rc&&(a||y&&v)){const k={};["status","statusText","headers"].forEach(j=>{k[j]=h[j]});const C=R.toFiniteNumber(h.headers.get("content-length")),[_,D]=a&&Yp(C,ja(Kp(a),!0))||[];h=new Response(Qp(h.body,Xp,_,()=>{D&&D(),v&&v()}),k)}u=u||"text";let b=await Fa[R.findKey(Fa,u)||"text"](h,e);return!y&&v&&v(),await new Promise((k,C)=>{E0(k,C,{data:b,headers:gt.from(h.headers),status:h.status,statusText:h.statusText,config:e,request:m})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/fetch/i.test(g.message)?Object.assign(new q("Network Error",q.ERR_NETWORK,e,m),{cause:g.cause||g}):q.from(g,g&&g.code,e,m)}}),_c={http:zb,xhr:vE,fetch:kE};R.forEach(_c,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qp=e=>`- ${e}`,TE=e=>R.isFunction(e)||e===null||e===!1,R0={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?i.length>1?`since : `+i.map(qp).join(` `):" "+qp(i[0]):"as no adapter specified";throw new q("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:_c};function cu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jo(null,e)}function Jp(e){return cu(e),e.headers=gt.from(e.headers),e.data=uu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),R0.getAdapter(e.adapter||os.adapter)(e).then(function(r){return cu(e),r.data=uu.call(e,e.transformResponse,r),r.headers=gt.from(r.headers),r},function(r){return b0(r)||(cu(e),r&&r.response&&(r.response.data=uu.call(e,e.transformResponse,r.response),r.response.headers=gt.from(r.response.headers))),Promise.reject(r)})}const _0="1.7.7",rf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zp={};rf.transitional=function(t,n,r){function o(i,s){return"[Axios v"+_0+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(t===!1)throw new q(o(s," has been removed"+(n?" in "+n:"")),q.ERR_DEPRECATED);return n&&!Zp[s]&&(Zp[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,a):!0}};function DE(e,t,n){if(typeof e!="object")throw new q("options must be an object",q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const a=e[i],l=a===void 0||s(a,i,e);if(l!==!0)throw new q("option "+i+" must be "+l,q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new q("Unknown option "+i,q.ERR_BAD_OPTION)}}const Nc={assertOptions:DE,validators:rf},Rn=Nc.validators;class Mr{constructor(t){this.defaults=t,this.interceptors={request:new $p,response:new $p}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=jr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Nc.assertOptions(r,{silentJSONParsing:Rn.transitional(Rn.boolean),forcedJSONParsing:Rn.transitional(Rn.boolean),clarifyTimeoutError:Rn.transitional(Rn.boolean)},!1),o!=null&&(R.isFunction(o)?n.paramsSerializer={serialize:o}:Nc.assertOptions(o,{encode:Rn.function,serialize:Rn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&R.merge(i.common,i[n.method]);i&&R.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=gt.concat(s,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,d=0,f;if(!l){const m=[Jp.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),f=m.length,c=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},t(function(i,s,a){r.reason||(r.reason=new jo(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new of(function(o){t=o}),cancel:t}}}function ME(e){return function(n){return e.apply(null,n)}}function RE(e){return R.isObject(e)&&e.isAxiosError===!0}const Lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lc).forEach(([e,t])=>{Lc[t]=e});function N0(e){const t=new Mr(e),n=u0(Mr.prototype.request,t);return R.extend(n,Mr.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return N0(jr(e,o))},n}const Pe=N0(os);Pe.Axios=Mr;Pe.CanceledError=jo;Pe.CancelToken=of;Pe.isCancel=b0;Pe.VERSION=_0;Pe.toFormData=gl;Pe.AxiosError=q;Pe.Cancel=Pe.CanceledError;Pe.all=function(t){return Promise.all(t)};Pe.spread=ME;Pe.isAxiosError=RE;Pe.mergeConfig=jr;Pe.AxiosHeaders=gt;Pe.formToJSON=e=>P0(R.isHTMLForm(e)?new FormData(e):e);Pe.getAdapter=R0.getAdapter;Pe.HttpStatusCode=Lc;Pe.default=Pe;const yl=S.createContext(void 0),_E=({children:e})=>{const[t,n]=S.useState(null),[r,o]=S.useState(),[i,s]=S.useState(!1),a=s0();S.useEffect(()=>{l()},[]);const l=async()=>{s(!0);const f=localStorage.getItem("access_token");if(f)try{const p=await Pe.post("https://extra.turkmentv.gov.tm/api/auth/me",{},{headers:{Authorization:`Bearer ${f}`}});n(p.data),a("/dashboard"),s(!1)}catch{await c()}else a("/"),s(!1)},u=async(f,p)=>{try{const m=await Pe.post("https://extra.turkmentv.gov.tm/api/auth/login",{login:f,password:p});localStorage.setItem("access_token",m.data.access_token),n(m.data),a("/dashboard"),s(!1)}catch{o(!1)}},c=async()=>{const f=localStorage.getItem("access_token");if(f)try{const p=await Pe.post("https://extra.turkmentv.gov.tm/api/auth/refresh",{},{headers:{Authorization:`Bearer ${f}`}});localStorage.setItem("access_token",p.data.access_token);const m=await Pe.post("https://extra.turkmentv.gov.tm/api/auth/me",{},{headers:{Authorization:`Bearer ${p.data.access_token}`}});n(m.data),s(!1)}catch{localStorage.removeItem("access_token"),n(null),a("/"),s(!1)}},d=async()=>{const f=localStorage.getItem("access_token");f&&(await Pe.post("https://extra.turkmentv.gov.tm/api/auth/logout",{},{headers:{Authorization:`Bearer ${f}`}}),localStorage.removeItem("access_token"),n(null),a("/"),s(!1),o(void 0))};return x.jsx(yl.Provider,{value:{user:t,login:u,logout:d,checkUserLoggedIn:l,userIsLoading:i,setUserIsLoading:s,userLogedIn:r,setUserLogedIn:o},children:e})};function ie(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function bt(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function rt(e,t){const n=ie(e);return isNaN(t)?bt(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Ht(e,t){const n=ie(e);if(isNaN(t))return bt(e,NaN);if(!t)return n;const r=n.getDate(),o=bt(e,n.getTime());o.setMonth(n.getMonth()+t+1,0);const i=o.getDate();return r>=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const sf=6048e5,NE=864e5;let LE={};function is(){return LE}function sn(e,t){var a,l,u,c;const n=is(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=ie(e),i=o.getDay(),s=(i=o.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function Do(e){const t=ie(e);return t.setHours(0,0,0,0),t}function Ia(e){const t=ie(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Zt(e,t){const n=Do(e),r=Do(t),o=+n-Ia(n),i=+r-Ia(r);return Math.round((o-i)/NE)}function AE(e){const t=L0(e),n=bt(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Fr(n)}function Ac(e,t){const n=t*7;return rt(e,n)}function OE(e,t){return Ht(e,t*12)}function jE(e){let t;return e.forEach(function(n){const r=ie(n);(t===void 0||t{const r=ie(n);(!t||t>r||isNaN(+r))&&(t=r)}),t||new Date(NaN)}function dt(e,t){const n=Do(e),r=Do(t);return+n==+r}function af(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function IE(e){if(!af(e)&&typeof e!="number")return!1;const t=ie(e);return!isNaN(Number(t))}function $i(e,t){const n=ie(e),r=ie(t),o=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return o*12+i}function VE(e,t,n){const r=sn(e,n),o=sn(t,n),i=+r-Ia(r),s=+o-Ia(o);return Math.round((i-s)/sf)}function lf(e){const t=ie(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function vt(e){const t=ie(e);return t.setDate(1),t.setHours(0,0,0,0),t}function A0(e){const t=ie(e),n=bt(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function uf(e,t){var a,l,u,c;const n=is(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,o=ie(e),i=o.getDay(),s=(i{let r;const o=BE[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function du(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const UE={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},WE={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$E={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},HE={date:du({formats:UE,defaultWidth:"full"}),time:du({formats:WE,defaultWidth:"full"}),dateTime:du({formats:$E,defaultWidth:"full"})},YE={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},KE=(e,t,n,r)=>YE[e];function ti(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const GE={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QE={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},XE={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qE={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},JE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ZE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ek=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},tk={ordinalNumber:ek,era:ti({values:GE,defaultWidth:"wide"}),quarter:ti({values:QE,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ti({values:XE,defaultWidth:"wide"}),day:ti({values:qE,defaultWidth:"wide"}),dayPeriod:ti({values:JE,defaultWidth:"wide",formattingValues:ZE,defaultFormattingWidth:"wide"})};function ni(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?rk(a,d=>d.test(s)):nk(a,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const c=t.slice(s.length);return{value:u,rest:c}}}function nk(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function rk(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const ik=/^(\d+)(th|st|nd|rd)?/i,sk=/\d+/i,ak={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lk={any:[/^b/i,/^(a|c)/i]},uk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ck={any:[/1/i,/2/i,/3/i,/4/i]},dk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},fk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},hk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},pk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},mk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},vk={ordinalNumber:ok({matchPattern:ik,parsePattern:sk,valueCallback:e=>parseInt(e,10)}),era:ni({matchPatterns:ak,defaultMatchWidth:"wide",parsePatterns:lk,defaultParseWidth:"any"}),quarter:ni({matchPatterns:uk,defaultMatchWidth:"wide",parsePatterns:ck,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ni({matchPatterns:dk,defaultMatchWidth:"wide",parsePatterns:fk,defaultParseWidth:"any"}),day:ni({matchPatterns:hk,defaultMatchWidth:"wide",parsePatterns:pk,defaultParseWidth:"any"}),dayPeriod:ni({matchPatterns:mk,defaultMatchWidth:"any",parsePatterns:gk,defaultParseWidth:"any"})},j0={code:"en-US",formatDistance:zE,formatLong:HE,formatRelative:KE,localize:tk,match:vk,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yk(e){const t=ie(e);return Zt(t,A0(t))+1}function F0(e){const t=ie(e),n=+Fr(t)-+AE(t);return Math.round(n/sf)+1}function I0(e,t){var c,d,f,p;const n=ie(e),r=n.getFullYear(),o=is(),i=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(f=o.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,s=bt(e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=sn(s,t),l=bt(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=sn(l,t);return n.getTime()>=a.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function wk(e,t){var a,l,u,c;const n=is(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((c=(u=n.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,o=I0(e,t),i=bt(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),sn(i,t)}function V0(e,t){const n=ie(e),r=+sn(n,t)-+wk(n,t);return Math.round(r/sf)+1}function ue(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const _n={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ue(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ue(n+1,2)},d(e,t){return ue(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ue(e.getHours()%12||12,t.length)},H(e,t){return ue(e.getHours(),t.length)},m(e,t){return ue(e.getMinutes(),t.length)},s(e,t){return ue(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ue(o,t.length)}},Gr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},em={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return _n.y(e,t)},Y:function(e,t,n,r){const o=I0(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ue(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ue(i,t.length)},R:function(e,t){const n=L0(e);return ue(n,t.length)},u:function(e,t){const n=e.getFullYear();return ue(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ue(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ue(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return _n.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ue(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=V0(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ue(o,t.length)},I:function(e,t,n){const r=F0(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ue(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):_n.d(e,t)},D:function(e,t,n){const r=yk(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ue(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ue(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ue(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ue(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Gr.noon:r===0?o=Gr.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Gr.evening:r>=12?o=Gr.afternoon:r>=4?o=Gr.morning:o=Gr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return _n.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):_n.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ue(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_n.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_n.s(e,t)},S:function(e,t){return _n.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return nm(r);case"XXXX":case"XX":return gr(r);case"XXXXX":case"XXX":default:return gr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return nm(r);case"xxxx":case"xx":return gr(r);case"xxxxx":case"xxx":default:return gr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tm(r,":");case"OOOO":default:return"GMT"+gr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tm(r,":");case"zzzz":default:return"GMT"+gr(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return ue(r,t.length)},T:function(e,t,n){const r=e.getTime();return ue(r,t.length)}};function tm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ue(i,2)}function nm(e,t){return e%60===0?(e>0?"-":"+")+ue(Math.abs(e)/60,2):gr(e,t)}function gr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ue(Math.trunc(r/60),2),i=ue(r%60,2);return n+o+t+i}const rm=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},B0=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},xk=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return rm(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",rm(r,t)).replace("{{time}}",B0(o,t))},Sk={p:B0,P:xk},Ck=/^D+$/,Pk=/^Y+$/,bk=["D","DD","YY","YYYY"];function Ek(e){return Ck.test(e)}function kk(e){return Pk.test(e)}function Tk(e,t,n){const r=Dk(e,t,n);if(console.warn(r),bk.includes(e))throw new RangeError(r)}function Dk(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Mk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,_k=/^'([^]*?)'?$/,Nk=/''/g,Lk=/[a-zA-Z]/;function ar(e,t,n){var c,d,f,p,m,v,w,g;const r=is(),o=(n==null?void 0:n.locale)??r.locale??j0,i=(n==null?void 0:n.firstWeekContainsDate)??((d=(c=n==null?void 0:n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((v=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((g=(w=r.locale)==null?void 0:w.options)==null?void 0:g.weekStartsOn)??0,a=ie(e);if(!IE(a))throw new RangeError("Invalid time value");let l=t.match(Rk).map(h=>{const y=h[0];if(y==="p"||y==="P"){const b=Sk[y];return b(h,o.formatLong)}return h}).join("").match(Mk).map(h=>{if(h==="''")return{isToken:!1,value:"'"};const y=h[0];if(y==="'")return{isToken:!1,value:Ak(h)};if(em[y])return{isToken:!0,value:h};if(y.match(Lk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:h}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const u={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(h=>{if(!h.isToken)return h.value;const y=h.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&kk(y)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Ek(y))&&Tk(y,t,String(e));const b=em[y[0]];return b(a,y,o.localize,u)}).join("")}function Ak(e){const t=e.match(_k);return t?t[1].replace(Nk,"'"):e}function Ok(e){const t=ie(e),n=t.getFullYear(),r=t.getMonth(),o=bt(e,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}function jk(e){return Math.trunc(+ie(e)/1e3)}function Fk(e){const t=ie(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}function Ik(e,t){return VE(Fk(e),vt(e),t)+1}function Oc(e,t){const n=ie(e),r=ie(t);return n.getTime()>r.getTime()}function z0(e,t){const n=ie(e),r=ie(t);return+n<+r}function cf(e,t){const n=ie(e),r=ie(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Vk(e,t){const n=ie(e),r=ie(t);return n.getFullYear()===r.getFullYear()}function fu(e,t){return rt(e,-t)}function hu(e,t){const n=ie(e),r=n.getFullYear(),o=n.getDate(),i=bt(e,0);i.setFullYear(r,t,15),i.setHours(0,0,0,0);const s=Ok(i);return n.setMonth(t,Math.min(o,s)),n}function om(e,t){const n=ie(e);return isNaN(+n)?bt(e,NaN):(n.setFullYear(t),n)}const zr=S.createContext(void 0),Bk=({children:e})=>{const[t,n]=S.useState("desc"),[r,o]=S.useState(),[i,s]=S.useState(!0),[a,l]=S.useState(void 0),[u,c]=S.useState(void 0),[d,f]=S.useState(1),[p,m]=S.useState(!1),[v,w]=S.useState(),[g,h]=S.useState(""),[y,b]=S.useState(""),[k,C]=S.useState(""),_=v&&ar(v,"P").split("/").reverse(),D=_?`${_[0]}-${_[2]}-${_[1]}`:"";return x.jsx(zr.Provider,{value:{activeNumber:r,tableIsLoading:i,setTableIsLoading:s,smsData:a,setSmsData:l,setActiveNumber:o,smsTableData:u,setSmsTableData:c,setCurrentPage:f,currentPage:d,isError:p,setIsError:m,activeSort:t,setActiveSort:n,datee:v,setDatee:w,formatedDate:_,dateValue:D,searchValue:g,setSearchValue:h,searchFecth:y,setSearchFecth:b,timeDate:k,setTimeDate:C},children:e})};function U0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}function Hi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const jc=e=>Array.isArray(e);function W0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function df(e,t,n,r){if(typeof t=="function"){const[o,i]=im(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=im(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function wl(e,t,n){const r=e.getProps();return df(r,t,n!==void 0?n:r.custom,e)}const ff=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hf=["initial",...ff],ss=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lr=new Set(ss),yn=e=>e*1e3,wn=e=>e/1e3,Uk={type:"spring",stiffness:500,damping:25,restSpeed:10},Wk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),$k={type:"keyframes",duration:.8},Hk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yk=(e,{keyframes:t})=>t.length>2?$k:lr.has(e)?e.startsWith("scale")?Wk(t[1]):Uk:Hk;function pf(e,t){return e?e[t]||e.default||e:void 0}const Kk={skipAnimations:!1,useManualTiming:!1},Gk=e=>e!==null;function xl(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Gk),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return!i||r===void 0?o[i]:r}const Je=e=>e;function Qk(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(s)}const l={schedule:(u,c=!1,d=!1)=>{const p=d&&r?t:n;return c&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(s=u,r){o=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,o&&(o=!1,l.process(u))}};return l}const Fs=["read","resolveKeyframes","update","preRender","render","postRender"],Xk=40;function $0(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Fs.reduce((g,h)=>(g[h]=Qk(i),g),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:d,postRender:f}=s,p=()=>{const g=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(g-o.timestamp,Xk),1),o.timestamp=g,o.isProcessing=!0,a.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Fs.reduce((g,h)=>{const y=s[h];return g[h]=(b,k=!1,C=!1)=>(n||m(),y.schedule(b,k,C)),g},{}),cancel:g=>{for(let h=0;h(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qk=1e-7,Jk=12;function Zk(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=H0(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>qk&&++aZk(i,0,1,e,n);return i=>i===0||i===1?i:H0(o(i),t,r)}const Y0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,K0=e=>t=>1-e(1-t),G0=as(.33,1.53,.69,.99),mf=K0(G0),Q0=Y0(mf),X0=e=>(e*=2)<1?.5*mf(e):.5*(2-Math.pow(2,-10*(e-1))),gf=e=>1-Math.sin(Math.acos(e)),q0=K0(gf),J0=Y0(gf),Z0=e=>/^0[^.\s]+$/u.test(e);function eT(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Z0(e):!0}let Fc=Je;const e1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),t1=e=>t=>typeof t=="string"&&t.startsWith(e),n1=t1("--"),tT=t1("var(--"),vf=e=>tT(e)?nT.test(e.split("/*")[0].trim()):!1,nT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function oT(e){const t=rT.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}function r1(e,t,n=1){const[r,o]=oT(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return e1(s)?parseFloat(s):s}return vf(o)?r1(o,t,n+1):o}const tr=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Ki={...Fo,transform:e=>tr(0,1,e)},Is={...Fo,default:1},ls=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),On=ls("deg"),rn=ls("%"),K=ls("px"),iT=ls("vh"),sT=ls("vw"),sm={...rn,parse:e=>rn.parse(e)/100,transform:e=>rn.transform(e*100)},aT=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),am=e=>e===Fo||e===K,lm=(e,t)=>parseFloat(e.split(", ")[t]),um=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return lm(o[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?lm(i[1],e):0}},lT=new Set(["x","y","z"]),uT=ss.filter(e=>!lT.has(e));function cT(e){const t=[];return uT.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:um(4,13),y:um(5,14)};Mo.translateX=Mo.x;Mo.translateY=Mo.y;const o1=e=>t=>t.test(e),dT={test:e=>e==="auto",parse:e=>e},i1=[Fo,K,rn,On,sT,iT,dT],cm=e=>i1.find(o1(e)),Rr=new Set;let Ic=!1,Vc=!1;function s1(){if(Vc){const e=Array.from(Rr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=cT(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Vc=!1,Ic=!1,Rr.forEach(e=>e.complete()),Rr.clear()}function a1(){Rr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vc=!0)})}function fT(){a1(),s1()}class yf{constructor(t,n,r,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rr.add(this),Ic||(Ic=!0,fe.read(a1),fe.resolveKeyframes(s1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let i=0;iMath.round(e*1e5)/1e5,wf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hT(e){return e==null}const pT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,xf=(e,t)=>n=>!!(typeof n=="string"&&pT.test(n)&&n.startsWith(e)||t&&!hT(n)&&Object.prototype.hasOwnProperty.call(n,t)),l1=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(wf);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},mT=e=>tr(0,255,e),mu={...Fo,transform:e=>Math.round(mT(e))},kr={test:xf("rgb","red"),parse:l1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+mu.transform(e)+", "+mu.transform(t)+", "+mu.transform(n)+", "+Ci(Ki.transform(r))+")"};function gT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Bc={test:xf("#"),parse:gT,transform:kr.transform},ao={test:xf("hsl","hue"),parse:l1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+rn.transform(Ci(t))+", "+rn.transform(Ci(n))+", "+Ci(Ki.transform(r))+")"},Qe={test:e=>kr.test(e)||Bc.test(e)||ao.test(e),parse:e=>kr.test(e)?kr.parse(e):ao.test(e)?ao.parse(e):Bc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?kr.transform(e):ao.transform(e)},vT=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yT(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(vT))===null||n===void 0?void 0:n.length)||0)>0}const u1="number",c1="color",wT="var",xT="var(",dm="${}",ST=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Gi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(ST,l=>(Qe.test(l)?(r.color.push(i),o.push(c1),n.push(Qe.parse(l))):l.startsWith(xT)?(r.var.push(i),o.push(wT),n.push(l)):(r.number.push(i),o.push(u1),n.push(parseFloat(l))),++i,dm)).split(dm);return{values:n,split:a,indexes:r,types:o}}function d1(e){return Gi(e).values}function f1(e){const{split:t,types:n}=Gi(e),r=t.length;return o=>{let i="";for(let s=0;stypeof e=="number"?0:e;function PT(e){const t=d1(e);return f1(e)(t.map(CT))}const nr={test:yT,parse:d1,createTransformer:f1,getAnimatableNone:PT},bT=new Set(["brightness","contrast","saturate","opacity"]);function ET(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wf)||[];if(!r)return e;const o=n.replace(r,"");let i=bT.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const kT=/\b([a-z-]*)\(.*?\)/gu,zc={...nr,getAnimatableNone:e=>{const t=e.match(kT);return t?t.map(ET).join(" "):e}},TT={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K},DT={rotate:On,rotateX:On,rotateY:On,rotateZ:On,scale:Is,scaleX:Is,scaleY:Is,scaleZ:Is,skew:On,skewX:On,skewY:On,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Ki,originX:sm,originY:sm,originZ:K},fm={...Fo,transform:Math.round},Sf={...TT,...DT,zIndex:fm,size:K,fillOpacity:Ki,strokeOpacity:Ki,numOctaves:fm},MT={...Sf,color:Qe,backgroundColor:Qe,outlineColor:Qe,fill:Qe,stroke:Qe,borderColor:Qe,borderTopColor:Qe,borderRightColor:Qe,borderBottomColor:Qe,borderLeftColor:Qe,filter:zc,WebkitFilter:zc},Cf=e=>MT[e];function h1(e,t){let n=Cf(e);return n!==zc&&(n=nr),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const RT=new Set(["auto","none","0"]);function _T(e,t,n){let r=0,o;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Pf(e){return typeof e=="function"}let na;function NT(){na=void 0}const on={now:()=>(na===void 0&&on.set(We.isProcessing||Kk.useManualTiming?We.timestamp:performance.now()),na),set:e=>{na=e,queueMicrotask(NT)}},hm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(nr.test(e)||e==="0")&&!e.startsWith("url("));function LT(e){const t=e[0];if(e.length===1)return!0;for(let n=0;nOT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&fT(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=on.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!AT(t,r,o,i))if(s)this.options.duration=0;else{l==null||l(xl(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function g1(e,t){return t?e*(1e3/t):0}const jT=5;function v1(e,t,n){const r=Math.max(t-jT,0);return g1(n-e(r),t-r)}const gu=.001,FT=.01,IT=10,VT=.05,BT=1;function zT({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i,s=1-t;s=tr(VT,BT,s),e=tr(FT,IT,wn(e)),s<1?(o=u=>{const c=u*s,d=c*e,f=c-n,p=Uc(u,s),m=Math.exp(-d);return gu-f/p*m},i=u=>{const d=u*s*e,f=d*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-d),v=Uc(Math.pow(u,2),s);return(-o(u)+gu>0?-1:1)*((f-p)*m)/v}):(o=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-gu+c*d},i=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=WT(o,i,a);if(e=yn(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const UT=12;function WT(e,t,n){let r=n;for(let o=1;oe[n]!==void 0)}function YT(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!pm(e,HT)&&pm(e,$T)){const n=zT(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function y1({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],s={done:!1,value:o},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=YT({...r,velocity:-wn(r.velocity||0)}),p=d||0,m=l/(2*Math.sqrt(a*u)),v=i-o,w=wn(Math.sqrt(a/u)),g=Math.abs(v)<5;n||(n=g?.01:2),t||(t=g?.005:.5);let h;if(m<1){const y=Uc(w,m);h=b=>{const k=Math.exp(-m*w*b);return i-k*((p+m*w*v)/y*Math.sin(y*b)+v*Math.cos(y*b))}}else if(m===1)h=y=>i-Math.exp(-w*y)*(v+(p+w*v)*y);else{const y=w*Math.sqrt(m*m-1);h=b=>{const k=Math.exp(-m*w*b),C=Math.min(y*b,300);return i-k*((p+m*w*v)*Math.sinh(C)+y*v*Math.cosh(C))/y}}return{calculatedDuration:f&&c||null,next:y=>{const b=h(y);if(f)s.done=y>=c;else{let k=0;m<1&&(k=y===0?yn(p):v1(h,y,b));const C=Math.abs(k)<=n,_=Math.abs(i-b)<=t;s.done=C&&_}return s.value=s.done?i:b,s}}}function mm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=D=>a!==void 0&&Dl,m=D=>a===void 0?l:l===void 0||Math.abs(a-D)-v*Math.exp(-D/r),y=D=>g+h(D),b=D=>{const j=h(D),O=y(D);f.done=Math.abs(j)<=u,f.value=f.done?g:O};let k,C;const _=D=>{p(f.value)&&(k=D,C=y1({keyframes:[f.value,m(f.value)],velocity:v1(y,D,f.value),damping:o,stiffness:i,restDelta:u,restSpeed:c}))};return _(0),{calculatedDuration:null,next:D=>{let j=!1;return!C&&k===void 0&&(j=!0,b(D),_(D)),k!==void 0&&D>=k?C.next(D-k):(!j&&b(D),f)}}}const KT=as(.42,0,1,1),GT=as(0,0,.58,1),w1=as(.42,0,.58,1),QT=e=>Array.isArray(e)&&typeof e[0]!="number",bf=e=>Array.isArray(e)&&typeof e[0]=="number",gm={linear:Je,easeIn:KT,easeInOut:w1,easeOut:GT,circIn:gf,circInOut:J0,circOut:q0,backIn:mf,backInOut:Q0,backOut:G0,anticipate:X0},vm=e=>{if(bf(e)){Fc(e.length===4);const[t,n,r,o]=e;return as(t,n,r,o)}else if(typeof e=="string")return Fc(gm[e]!==void 0),gm[e];return e},XT=(e,t)=>n=>t(e(n)),xn=(...e)=>e.reduce(XT),Ro=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ee=(e,t,n)=>e+(t-e)*n;function vu(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qT({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=vu(l,a,e+1/3),i=vu(l,a,e),s=vu(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Va(e,t){return n=>n>0?t:e}const yu=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},JT=[Bc,kr,ao],ZT=e=>JT.find(t=>t.test(e));function ym(e){const t=ZT(e);if(!t)return!1;let n=t.parse(e);return t===ao&&(n=qT(n)),n}const wm=(e,t)=>{const n=ym(e),r=ym(t);if(!n||!r)return Va(e,t);const o={...n};return i=>(o.red=yu(n.red,r.red,i),o.green=yu(n.green,r.green,i),o.blue=yu(n.blue,r.blue,i),o.alpha=Ee(n.alpha,r.alpha,i),kr.transform(o))},Wc=new Set(["none","hidden"]);function eD(e,t){return Wc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function tD(e,t){return n=>Ee(e,t,n)}function Ef(e){return typeof e=="number"?tD:typeof e=="string"?vf(e)?Va:Qe.test(e)?wm:oD:Array.isArray(e)?x1:typeof e=="object"?Qe.test(e)?wm:nD:Va}function x1(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Ef(i)(i,t[s]));return i=>{for(let s=0;s{for(const i in r)n[i]=r[i](o);return n}}function rD(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i{const n=nr.createTransformer(t),r=Gi(e),o=Gi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Wc.has(e)&&!o.values.length||Wc.has(t)&&!r.values.length?eD(e,t):xn(x1(rD(r,o),o.values),n):Va(e,t)};function S1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ee(e,t,n):Ef(e)(e,t)}function iD(e,t,n){const r=[],o=n||S1,i=e.length-1;for(let s=0;st[0];if(i===2&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=iD(t,r,o),a=s.length,l=u=>{let c=0;if(a>1)for(;cl(tr(e[0],e[i-1],u)):l}function aD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ro(0,t,r);e.push(Ee(n,1,o))}}function lD(e){const t=[0];return aD(t,e.length-1),t}function uD(e,t){return e.map(n=>n*t)}function cD(e,t){return e.map(()=>t||w1).splice(0,e.length-1)}function Ba({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=QT(r)?r.map(vm):vm(r),i={done:!1,value:t[0]},s=uD(n&&n.length===t.length?n:lD(t),e),a=sD(s,t,{ease:Array.isArray(o)?o:cD(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const xm=2e4;function dD(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=xm?1/0:t}const fD=e=>{const t=({timestamp:n})=>e(n);return{start:()=>fe.update(t,!0),stop:()=>er(t),now:()=>We.isProcessing?We.timestamp:on.now()}},hD={decay:mm,inertia:mm,tween:Ba,keyframes:Ba,spring:y1},pD=e=>e/100;class kf extends m1{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:i}=this.options,s=(o==null?void 0:o.KeyframeResolver)||yf,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new s(i,a,n,r,o),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=Pf(n)?n:hD[n]||Ba;let l,u;a!==Ba&&typeof t[0]!="number"&&(l=xn(pD,S1(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=dD(c));const{calculatedDuration:d}=c,f=d+o,p=f*(r+1)-o;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:v,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),h=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,b=i;if(p){const D=Math.min(this.currentTime,c)/d;let j=Math.floor(D),O=D%1;!O&&D>=1&&(O=1),O===1&&j--,j=Math.min(j,p+1),!!(j%2)&&(m==="reverse"?(O=1-O,v&&(O-=v/d)):m==="mirror"&&(b=s)),y=tr(0,1,O)*d}const k=h?{done:!1,value:l[0]}:b.next(y);a&&(k.value=a(k.value));let{done:C}=k;!h&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return _&&o!==void 0&&(k.value=xl(l,this.options,o)),w&&w(k.value),_&&this.finish(),k}get duration(){const{resolved:t}=this;return t?wn(t.calculatedDuration):0}get time(){return wn(this.currentTime)}set time(t){t=yn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=wn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=fD,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const C1=new Set(["opacity","clipPath","filter","transform"]),mD=10,gD=(e,t)=>{let n="";const r=Math.max(Math.round(t/mD),2);for(let o=0;o(t===void 0&&(t=e()),t)}const vD={linearEasing:void 0};function yD(e,t){const n=Tf(e);return()=>{var r;return(r=vD[t])!==null&&r!==void 0?r:n()}}const za=yD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function P1(e){return!!(typeof e=="function"&&za()||!e||typeof e=="string"&&(e in $c||za())||bf(e)||Array.isArray(e)&&e.every(P1))}const di=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$c={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:di([0,.65,.55,1]),circOut:di([.55,0,1,.45]),backIn:di([.31,.01,.66,-.59]),backOut:di([.33,1.53,.69,.99])};function b1(e,t){if(e)return typeof e=="function"&&za()?gD(e,t):bf(e)?di(e):Array.isArray(e)?e.map(n=>b1(n,t)||$c.easeOut):$c[e]}function wD(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=b1(a,o);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:o,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}function Sm(e,t){e.timeline=t,e.onfinish=null}const xD=Tf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ua=10,SD=2e4;function CD(e){return Pf(e.type)||e.type==="spring"||!P1(e.ease)}function PD(e,t){const n=new kf({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(s,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:o=300,times:i,ease:s,type:a,motionValue:l,name:u,startTime:c}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof s=="string"&&za()&&bD(s)&&(s=E1[s]),CD(this.options)){const{onComplete:f,onUpdate:p,motionValue:m,element:v,...w}=this.options,g=PD(t,w);t=g.keyframes,t.length===1&&(t[1]=t[0]),o=g.duration,i=g.times,s=g.ease,a="keyframes"}const d=wD(l.owner.current,u,t,{...this.options,duration:o,times:i,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(Sm(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(xl(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:i,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return wn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return wn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=yn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Je;const{animation:r}=n;Sm(r,t)}return Je}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:i,ease:s,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:d,element:f,...p}=this.options,m=new kf({...p,keyframes:r,duration:o,type:i,ease:s,times:a,isGenerator:!0}),v=yn(this.time);u.setWithVelocity(m.sample(v-Ua).value,m.sample(v).value,Ua)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:i,damping:s,type:a}=t;return xD()&&r&&C1.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}}const ED=Tf(()=>window.ScrollTimeline!==void 0);class kD{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rED()&&o.attachTimeline?o.attachTimeline(t):n(o));return()=>{r.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function TD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Df=(e,t,n,r={},o,i)=>s=>{const a=pf(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-yn(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};TD(a)||(c={...c,...Yk(e,c)}),c.duration&&(c.duration=yn(c.duration)),c.repeatDelay&&(c.repeatDelay=yn(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!i&&t.get()!==void 0){const f=xl(c.keyframes,a);if(f!==void 0)return fe.update(()=>{c.onUpdate(f),c.onComplete()}),new kD([])}return!i&&Cm.supports(c)?new Cm(c):new kf(c)},DD=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),MD=e=>jc(e)?e[e.length-1]||0:e;function Mf(e,t){e.indexOf(t)===-1&&e.push(t)}function Rf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class _f{constructor(){this.subscriptions=[]}add(t){return Mf(this.subscriptions,t),()=>Rf(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class _D{constructor(t,n={}){this.version="11.11.9",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const i=on.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=on.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=RD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new _f);const r=this.events[t].add(n);return t==="change"?()=>{r(),fe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=on.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Pm)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Pm);return g1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(e,t){return new _D(e,t)}function ND(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qi(n))}function LD(e,t){const n=wl(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=MD(i[s]);ND(e,s,a)}}const Sl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),AD="framerAppearId",k1="data-"+Sl(AD);function T1(e){return e.props[k1]}const qe=e=>!!(e&&e.getVelocity);function OD(e){return!!(qe(e)&&e.add)}function Hc(e,t){if(!e.applyWillChange)return;const n=e.getValue("willChange");if(OD(n))return n.add(t)}function jD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function D1(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const u=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const d in l){const f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||c&&jD(c,d))continue;const m={delay:n,...pf(s||{},d)};let v=!1;if(window.MotionHandoffAnimation){const g=T1(e);if(g){const h=window.MotionHandoffAnimation(g,d,fe);h!==null&&(m.startTime=h,v=!0)}}Hc(e,d),f.start(Df(d,f,p,e.shouldReduceMotion&&lr.has(d)?{type:!1}:m,e,v));const w=f.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{fe.update(()=>{a&&LD(e,a)})}),u}function Yc(e,t,n={}){var r;const o=wl(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(D1(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=i;return FD(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>c())}else return Promise.all([s(),a(n.delay)])}function FD(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=o===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(ID).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Yc(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function ID(e,t){return e.sortNodePosition(t)}function VD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Yc(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Yc(e,t,n);else{const o=typeof t=="function"?wl(e,t,n.custom):t;r=Promise.all(D1(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const BD=hf.length;function M1(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?M1(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>VD(e,n,r)))}function $D(e){let t=WD(e),n=bm(),r=!0;const o=l=>(u,c)=>{var d;const f=wl(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:m,...v}=f;u={...u,...v,...m}}return u};function i(l){t=l(e)}function s(l){const{props:u}=e,c=M1(e.parent)||{},d=[],f=new Set;let p={},m=1/0;for(let w=0;wm&&b,j=!1;const O=Array.isArray(y)?y:[y];let J=O.reduce(o(g),{});k===!1&&(J={});const{prevResolvedValues:Y={}}=h,he={...Y,...J},le=A=>{D=!0,f.has(A)&&(j=!0,f.delete(A)),h.needsAnimating[A]=!0;const M=e.getValue(A);M&&(M.liveStyle=!1)};for(const A in he){const M=J[A],U=Y[A];if(p.hasOwnProperty(A))continue;let W=!1;jc(M)&&jc(U)?W=!W0(M,U):W=M!==U,W?M!=null?le(A):f.add(A):M!==void 0&&f.has(A)?le(A):h.protectedKeys[A]=!0}h.prevProp=y,h.prevResolvedValues=J,h.isActive&&(p={...p,...J}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(C&&_)||j)&&d.push(...O.map(A=>({animation:A,options:{type:g}})))}if(f.size){const w={};f.forEach(g=>{const h=e.getBaseTarget(g),y=e.getValue(g);y&&(y.liveStyle=!0),w[g]=h??null}),d.push({animation:w})}let v=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,u)}),n[l].isActive=u;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=bm(),r=!0}}}function HD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!W0(t,e):!1}function hr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bm(){return{animate:hr(!0),whileInView:hr(),whileHover:hr(),whileTap:hr(),whileDrag:hr(),whileFocus:hr(),exit:hr()}}class ur{constructor(t){this.isMounted=!1,this.node=t}update(){}}class YD extends ur{constructor(t){super(t),t.animationState||(t.animationState=$D(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Hi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let KD=0;class GD extends ur{constructor(){super(...arguments),this.id=KD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const QD={animation:{Feature:YD},exit:{Feature:GD}},R1=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Cl(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const XD=e=>t=>R1(t)&&e(t,Cl(t));function gn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Sn(e,t,n,r){return gn(e,t,XD(n),r)}const Em=(e,t)=>Math.abs(e-t);function qD(e,t){const n=Em(e.x,t.x),r=Em(e.y,t.y);return Math.sqrt(n**2+r**2)}class _1{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=xu(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=qD(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=d,{timestamp:v}=We;this.history.push({...m,timestamp:v});const{onStart:w,onMove:g}=this.handlers;f||(w&&w(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=wu(f,this.transformPagePoint),fe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=xu(d.type==="pointercancel"?this.lastMoveEventInfo:wu(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,w),m&&m(d,w)},!R1(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const s=Cl(t),a=wu(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=We;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,xu(a,this.history)),this.removeListeners=xn(Sn(this.contextWindow,"pointermove",this.handlePointerMove),Sn(this.contextWindow,"pointerup",this.handlePointerUp),Sn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),er(this.updatePoint)}}function wu(e,t){return t?{point:t(e.point)}:e}function km(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xu({point:e},t){return{point:e,delta:km(e,N1(t)),offset:km(e,JD(t)),velocity:ZD(t,.1)}}function JD(e){return e[0]}function N1(e){return e[e.length-1]}function ZD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=N1(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>yn(t)));)n--;if(!r)return{x:0,y:0};const i=wn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function L1(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Tm=L1("dragHorizontal"),Dm=L1("dragVertical");function A1(e){let t=!1;if(e==="y")t=Dm();else if(e==="x")t=Tm();else{const n=Tm(),r=Dm();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function O1(){const e=A1(!0);return e?(e(),!1):!0}function lo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const j1=1e-4,eM=1-j1,tM=1+j1,F1=.01,nM=0-F1,rM=0+F1;function Et(e){return e.max-e.min}function oM(e,t,n){return Math.abs(e-t)<=n}function Mm(e,t,n,r=.5){e.origin=r,e.originPoint=Ee(t.min,t.max,e.origin),e.scale=Et(n)/Et(t),e.translate=Ee(n.min,n.max,e.origin)-e.originPoint,(e.scale>=eM&&e.scale<=tM||isNaN(e.scale))&&(e.scale=1),(e.translate>=nM&&e.translate<=rM||isNaN(e.translate))&&(e.translate=0)}function Pi(e,t,n,r){Mm(e.x,t.x,n.x,r?r.originX:void 0),Mm(e.y,t.y,n.y,r?r.originY:void 0)}function Rm(e,t,n){e.min=n.min+t.min,e.max=e.min+Et(t)}function iM(e,t,n){Rm(e.x,t.x,n.x),Rm(e.y,t.y,n.y)}function _m(e,t,n){e.min=t.min-n.min,e.max=e.min+Et(t)}function bi(e,t,n){_m(e.x,t.x,n.x),_m(e.y,t.y,n.y)}function sM(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ee(n,e,r.max):Math.min(e,n)),e}function Nm(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aM(e,{top:t,left:n,bottom:r,right:o}){return{x:Nm(e.x,n,o),y:Nm(e.y,t,r)}}function Lm(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Ro(t.min,t.max-r,e.min):r>o&&(n=Ro(e.min,e.max-o,t.min)),tr(0,1,n)}function cM(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Kc=.35;function dM(e=Kc){return e===!1?e=0:e===!0&&(e=Kc),{x:Am(e,"left","right"),y:Am(e,"top","bottom")}}function Am(e,t,n){return{min:Om(e,t),max:Om(e,n)}}function Om(e,t){return typeof e=="number"?e:e[t]||0}const jm=()=>({translate:0,scale:1,origin:0,originPoint:0}),uo=()=>({x:jm(),y:jm()}),Fm=()=>({min:0,max:0}),_e=()=>({x:Fm(),y:Fm()});function Mt(e){return[e("x"),e("y")]}function I1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function fM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function hM(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Su(e){return e===void 0||e===1}function Gc({scale:e,scaleX:t,scaleY:n}){return!Su(e)||!Su(t)||!Su(n)}function vr(e){return Gc(e)||V1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function V1(e){return Im(e.x)||Im(e.y)}function Im(e){return e&&e!=="0%"}function Wa(e,t,n){const r=e-n,o=t*r;return n+o}function Vm(e,t,n,r,o){return o!==void 0&&(e=Wa(e,o,r)),Wa(e,n,r)+t}function Qc(e,t=0,n=1,r,o){e.min=Vm(e.min,t,n,r,o),e.max=Vm(e.max,t,n,r,o)}function B1(e,{x:t,y:n}){Qc(e.x,t.translate,t.scale,t.originPoint),Qc(e.y,n.translate,n.scale,n.originPoint)}const Bm=.999999999999,zm=1.0000000000001;function pM(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;aBm&&(t.x=1),t.yBm&&(t.y=1)}function co(e,t){e.min=e.min+t,e.max=e.max+t}function Um(e,t,n,r,o=.5){const i=Ee(e.min,e.max,o);Qc(e,t,n,i,r)}function fo(e,t){Um(e.x,t.x,t.scaleX,t.scale,t.originX),Um(e.y,t.y,t.scaleY,t.scale,t.originY)}function z1(e,t){return I1(hM(e.getBoundingClientRect(),t))}function mM(e,t,n){const r=z1(e,n),{scroll:o}=t;return o&&(co(r.x,o.offset.x),co(r.y,o.offset.y)),r}const U1=({current:e})=>e?e.ownerDocument.defaultView:null,gM=new WeakMap;class vM{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_e(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Cl(c,"page").point)},i=(c,d)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=A1(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mt(w=>{let g=this.getAxisMotionValue(w).get()||0;if(rn.test(g)){const{projection:h}=this.visualElement;if(h&&h.layout){const y=h.layout.layoutBox[w];y&&(g=Et(y)*(parseFloat(g)/100))}}this.originPoint[w]=g}),m&&fe.postRender(()=>m(c,d)),Hc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},s=(c,d)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:v}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:w}=d;if(p&&this.currentDirection===null){this.currentDirection=yM(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,w),this.updateAxis("y",d.point,w),this.visualElement.render(),v&&v(c,d)},a=(c,d)=>this.stop(c,d),l=()=>Mt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new _1(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:U1(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&fe.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Vs(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=sM(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&lo(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=aM(o.layoutBox,n):this.constraints=!1,this.elastic=dM(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Mt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=cM(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!lo(t))return!1;const r=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=mM(r,o.root,this.visualElement.getTransformPagePoint());let s=lM(o.layout.layoutBox,i);if(n){const a=n(fM(s));this.hasMutatedConstraints=!!a,a&&(s=I1(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Mt(c=>{if(!Vs(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hc(this.visualElement,t),r.start(Df(t,r,0,n,this.visualElement,!1))}stopAnimation(){Mt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Mt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Mt(n=>{const{drag:r}=this.getProps();if(!Vs(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n];i.set(t[n]-Ee(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!lo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Mt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=uM({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Mt(s=>{if(!Vs(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(Ee(l,u,o[s]))})}addListeners(){if(!this.visualElement.current)return;gM.set(this.visualElement,this);const t=this.visualElement.current,n=Sn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();lo(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),fe.read(r);const s=gn(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Mt(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=Kc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Vs(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yM(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class wM extends ur{constructor(t){super(t),this.removeGroupControls=Je,this.removeListeners=Je,this.controls=new vM(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Je}unmount(){this.removeGroupControls(),this.removeListeners()}}const Wm=e=>(t,n)=>{e&&fe.postRender(()=>e(t,n))};class xM extends ur{constructor(){super(...arguments),this.removePointerDownListener=Je}onPointerDown(t){this.session=new _1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:U1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Wm(t),onStart:Wm(n),onMove:r,onEnd:(i,s)=>{delete this.session,o&&fe.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Sn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Pl=S.createContext(null);function SM(){const e=S.useContext(Pl);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=S.useId();S.useEffect(()=>r(o),[]);const i=S.useCallback(()=>n&&n(o),[o,n]);return!t&&n?[!1,i]:[!0]}const Nf=S.createContext({}),W1=S.createContext({}),ra={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $m(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ri={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(K.test(e))e=parseFloat(e);else return e;const n=$m(e,t.target.x),r=$m(e,t.target.y);return`${n}% ${r}%`}},CM={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=nr.parse(e);if(o.length>5)return r;const i=nr.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const u=Ee(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=u),typeof o[3+s]=="number"&&(o[3+s]/=u),i(o)}},$a={};function PM(e){Object.assign($a,e)}const{schedule:Lf,cancel:rL}=$0(queueMicrotask,!1);class bM extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;PM(EM),i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ra.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,s=r.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||fe.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $1(e){const[t,n]=SM(),r=S.useContext(Nf);return x.jsx(bM,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(W1),isPresent:t,safeToRemove:n})}const EM={borderRadius:{...ri,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ri,borderTopRightRadius:ri,borderBottomLeftRadius:ri,borderBottomRightRadius:ri,boxShadow:CM},H1=["TopLeft","TopRight","BottomLeft","BottomRight"],kM=H1.length,Hm=e=>typeof e=="string"?parseFloat(e):e,Ym=e=>typeof e=="number"||K.test(e);function TM(e,t,n,r,o,i){o?(e.opacity=Ee(0,n.opacity!==void 0?n.opacity:1,DM(r)),e.opacityExit=Ee(t.opacity!==void 0?t.opacity:1,0,MM(r))):i&&(e.opacity=Ee(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;srt?1:n(Ro(e,t,r))}function Gm(e,t){e.min=t.min,e.max=t.max}function Dt(e,t){Gm(e.x,t.x),Gm(e.y,t.y)}function Qm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xm(e,t,n,r,o){return e-=t,e=Wa(e,1/n,r),o!==void 0&&(e=Wa(e,1/o,r)),e}function RM(e,t=0,n=1,r=.5,o,i=e,s=e){if(rn.test(t)&&(t=parseFloat(t),t=Ee(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ee(i.min,i.max,r);e===i&&(a-=t),e.min=Xm(e.min,t,n,a,o),e.max=Xm(e.max,t,n,a,o)}function qm(e,t,[n,r,o],i,s){RM(e,t[n],t[r],t[o],t.scale,i,s)}const _M=["x","scaleX","originX"],NM=["y","scaleY","originY"];function Jm(e,t,n,r){qm(e.x,t,_M,n?n.x:void 0,r?r.x:void 0),qm(e.y,t,NM,n?n.y:void 0,r?r.y:void 0)}function Zm(e){return e.translate===0&&e.scale===1}function K1(e){return Zm(e.x)&&Zm(e.y)}function eg(e,t){return e.min===t.min&&e.max===t.max}function LM(e,t){return eg(e.x,t.x)&&eg(e.y,t.y)}function tg(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function G1(e,t){return tg(e.x,t.x)&&tg(e.y,t.y)}function ng(e){return Et(e.x)/Et(e.y)}function rg(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class AM{constructor(){this.members=[]}add(t){Mf(this.members,t),t.scheduleRender()}remove(t){if(Rf(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function OM(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const jM=(e,t)=>e.depth-t.depth;class FM{constructor(){this.children=[],this.isDirty=!1}add(t){Mf(this.children,t),this.isDirty=!0}remove(t){Rf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(jM),this.isDirty=!1,this.children.forEach(t)}}function oa(e){const t=qe(e)?e.get():e;return DD(t)?t.toValue():t}function IM(e,t){const n=on.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(er(r),e(i-t))};return fe.read(r,!0),()=>er(r)}function VM(e){return e instanceof SVGElement&&e.tagName!=="svg"}function BM(e,t,n){const r=qe(e)?e:Qi(e);return r.start(Df("",r,t,n)),r.animation}const yr={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},fi=typeof window<"u"&&window.MotionDebug!==void 0,Cu=["","X","Y","Z"],zM={visibility:"hidden"},og=1e3;let UM=0;function Pu(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Q1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=T1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",fe,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Q1(r)}function X1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t==null?void 0:t()){this.id=UM++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,fi&&(yr.totalNodes=yr.resolvedTargetDeltas=yr.recalculatedProjection=0),this.nodes.forEach(HM),this.nodes.forEach(XM),this.nodes.forEach(qM),this.nodes.forEach(YM),fi&&window.MotionDebug.record(yr)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=IM(f,250),ra.hasAnimatedSinceResize&&(ra.hasAnimatedSinceResize=!1,this.nodes.forEach(sg))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||n2,{onLayoutAnimationStart:w,onLayoutAnimationComplete:g}=c.getProps(),h=!this.targetLayout||!G1(this.targetLayout,m)||p,y=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const b={...pf(v,"layout"),onPlay:w,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||sg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,er(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(JM),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Q1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const k=b/1e3;ag(d.x,s.x,k),ag(d.y,s.y,k),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),e2(this.relativeTarget,this.relativeTargetOrigin,f,k),y&&LM(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=_e()),Dt(y,this.relativeTarget)),v&&(this.animationValues=c,TM(c,u,this.latestValues,k,h,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(er(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{ra.hasAnimatedSinceResize=!0,this.currentAnimation=BM(0,og,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(og),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&q1(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||_e();const d=Et(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=Et(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Dt(a,l),fo(a,c),Pi(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new AM),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Pu("z",s,u,this.animationValues);for(let c=0;c{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ig),this.root.sharedNodes.clear()}}}function WM(e){e.updateLayout()}function $M(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:i}=e.options,s=n.source!==e.layout.source;i==="size"?Mt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Et(f);f.min=r[d].min,f.max=f.min+p}):q1(i,n.layoutBox,r)&&Mt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],p=Et(r[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const a=uo();Pi(a,r,n.layoutBox);const l=uo();s?Pi(l,e.applyTransform(o,!0),n.measuredBox):Pi(l,r,n.layoutBox);const u=!K1(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:p}=d;if(f&&p){const m=_e();bi(m,n.layoutBox,f.layoutBox);const v=_e();bi(v,r,p.layoutBox),G1(m,v)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function HM(e){fi&&yr.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function YM(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function KM(e){e.clearSnapshot()}function ig(e){e.clearMeasurements()}function GM(e){e.isLayoutDirty=!1}function QM(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function sg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function XM(e){e.resolveTargetDelta()}function qM(e){e.calcProjection()}function JM(e){e.resetSkewAndRotation()}function ZM(e){e.removeLeadSnapshot()}function ag(e,t,n){e.translate=Ee(t.translate,0,n),e.scale=Ee(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function lg(e,t,n,r){e.min=Ee(t.min,n.min,r),e.max=Ee(t.max,n.max,r)}function e2(e,t,n,r){lg(e.x,t.x,n.x,r),lg(e.y,t.y,n.y,r)}function t2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const n2={duration:.45,ease:[.4,0,.1,1]},ug=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cg=ug("applewebkit/")&&!ug("chrome/")?Math.round:Je;function dg(e){e.min=cg(e.min),e.max=cg(e.max)}function r2(e){dg(e.x),dg(e.y)}function q1(e,t,n){return e==="position"||e==="preserve-aspect"&&!oM(ng(t),ng(n),.2)}function o2(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const i2=X1({attachResizeListener:(e,t)=>gn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),bu={current:void 0},J1=X1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!bu.current){const e=new i2({});e.mount(window),e.setOptions({layoutScroll:!0}),bu.current=e}return bu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),s2={pan:{Feature:xM},drag:{Feature:wM,ProjectionNode:J1,MeasureLayout:$1}};function fg(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",o=(i,s)=>{if(i.pointerType==="touch"||O1())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t);const l=a[r];l&&fe.postRender(()=>l(i,s))};return Sn(e.current,n,o,{passive:!e.getProps()[r]})}class a2 extends ur{mount(){this.unmount=xn(fg(this.node,!0),fg(this.node,!1))}unmount(){}}class l2 extends ur{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=xn(gn(this.node.current,"focus",()=>this.onFocus()),gn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Z1=(e,t)=>t?e===t?!0:Z1(e,t.parentElement):!1;function Eu(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Cl(n))}class u2 extends ur{constructor(){super(...arguments),this.removeStartListeners=Je,this.removeEndListeners=Je,this.removeAccessibleListeners=Je,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),i=Sn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps(),f=!d&&!Z1(this.node.current,a.target)?c:u;f&&fe.update(()=>f(a,l))},{passive:!(r.onTap||r.onPointerUp)}),s=Sn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=xn(i,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Eu("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&fe.postRender(()=>c(l,u))})};this.removeEndListeners(),this.removeEndListeners=gn(this.node.current,"keyup",s),Eu("down",(a,l)=>{this.startPress(a,l)})},n=gn(this.node.current,"keydown",t),r=()=>{this.isPressing&&Eu("cancel",(i,s)=>this.cancelPress(i,s))},o=gn(this.node.current,"blur",r);this.removeAccessibleListeners=xn(n,o)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:o}=this.node.getProps();o&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&fe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!O1()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&fe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Sn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=gn(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=xn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Xc=new WeakMap,ku=new WeakMap,c2=e=>{const t=Xc.get(e.target);t&&t(e)},d2=e=>{e.forEach(c2)};function f2({root:e,...t}){const n=e||document;ku.has(n)||ku.set(n,{});const r=ku.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(d2,{root:e,...t})),r[o]}function h2(e,t,n){const r=f2(t);return Xc.set(e,n),r.observe(e),()=>{Xc.delete(e),r.unobserve(e)}}const p2={some:0,all:1};class m2 extends ur{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:p2[o]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return h2(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(g2(t,n))&&this.startObserver()}unmount(){}}function g2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const v2={inView:{Feature:m2},tap:{Feature:u2},focus:{Feature:l2},hover:{Feature:a2}},y2={layout:{ProjectionNode:J1,MeasureLayout:$1}},Af=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),bl=S.createContext({}),Of=typeof window<"u",ew=Of?S.useLayoutEffect:S.useEffect,tw=S.createContext({strict:!1});function w2(e,t,n,r,o){var i,s;const{visualElement:a}=S.useContext(bl),l=S.useContext(tw),u=S.useContext(Pl),c=S.useContext(Af).reducedMotion,d=S.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=d.current,p=S.useContext(W1);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&x2(d.current,n,o,p),S.useInsertionEffect(()=>{f&&f.update(n,u)});const m=n[k1],v=S.useRef(!!m&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,m))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,m)));return ew(()=>{f&&(window.MotionIsMounted=!0,f.updateFeatures(),Lf.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),S.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,m)}),v.current=!1))}),f}function x2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:nw(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&lo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function nw(e){if(e)return e.options.allowProjection!==!1?e.projection:nw(e.parent)}function S2(e,t,n){return S.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):lo(n)&&(n.current=r))},[t])}function El(e){return Hi(e.animate)||hf.some(t=>Yi(e[t]))}function rw(e){return!!(El(e)||e.variants)}function C2(e,t){if(El(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Yi(n)?n:void 0,animate:Yi(r)?r:void 0}}return e.inherit!==!1?t:{}}function P2(e){const{initial:t,animate:n}=C2(e,S.useContext(bl));return S.useMemo(()=>({initial:t,animate:n}),[hg(t),hg(n)])}function hg(e){return Array.isArray(e)?e.join(" "):e}const pg={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},_o={};for(const e in pg)_o[e]={isEnabled:t=>pg[e].some(n=>!!t[n])};function b2(e){for(const t in e)_o[t]={..._o[t],...e[t]}}const E2=Symbol.for("motionComponentSymbol");function k2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&b2(e);function i(a,l){let u;const c={...S.useContext(Af),...a,layoutId:T2(a)},{isStatic:d}=c,f=P2(a),p=r(a,d);if(!d&&Of){D2();const m=M2(c);u=m.MeasureLayout,f.visualElement=w2(o,p,c,t,m.ProjectionNode)}return x.jsxs(bl.Provider,{value:f,children:[u&&f.visualElement?x.jsx(u,{visualElement:f.visualElement,...c}):null,n(o,a,S2(p,f.visualElement,l),p,d,f.visualElement)]})}const s=S.forwardRef(i);return s[E2]=o,s}function T2({layoutId:e}){const t=S.useContext(Nf).id;return t&&e!==void 0?t+"-"+e:e}function D2(e,t){S.useContext(tw).strict}function M2(e){const{drag:t,layout:n}=_o;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const R2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function jf(e){return typeof e!="string"||e.includes("-")?!1:!!(R2.indexOf(e)>-1||/[A-Z]/u.test(e))}function ow(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const iw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function sw(e,t,n,r){ow(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(iw.has(o)?o:Sl(o),t.attrs[o])}function aw(e,{layout:t,layoutId:n}){return lr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$a[e]||e==="opacity")}function Ff(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(qe(o[s])||t.style&&qe(t.style[s])||aw(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[s]=o[s]);return n&&o&&typeof o.willChange=="string"&&(n.applyWillChange=!1),i}function lw(e,t,n){const r=Ff(e,t,n);for(const o in e)if(qe(e[o])||qe(t[o])){const i=ss.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}function If(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}function _2(e){if(lr.has(e))return"transform";if(C1.has(e))return Sl(e)}function N2({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},o,i,s,a){const l={latestValues:L2(o,i,s,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(o,u,l)),l}const uw=e=>(t,n)=>{const r=S.useContext(bl),o=S.useContext(Pl),i=()=>N2(e,t,r,o,n);return n?i():If(i)};function mg(e,t,n){const r=Array.isArray(t)?t:[t];for(let o=0;o{for(const h in w){let y=w[h];if(Array.isArray(y)){const b=m?y.length-1:0;y=y[b]}y!==null&&(s[h]=y)}for(const h in g)s[h]=g[h]}),l&&(d&&c!==!1&&!Hi(d)&&mg(e,d,w=>{for(const g in w){const h=_2(g);h&&a.add(h)}}),a.size&&(s.willChange=Array.from(a).join(","))),s}const Vf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),cw=()=>({...Vf(),attrs:{}}),dw=(e,t)=>t&&typeof e=="number"?t.transform(e):e,A2={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O2=ss.length;function j2(e,t,n){let r="",o=!0;for(let i=0;itypeof e=="string"&&e.toLowerCase()==="svg",z2={useVisualState:uw({scrapeMotionValuesFromProps:lw,createRenderState:cw,onMount:(e,t,{renderState:n,latestValues:r})=>{fe.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),fe.render(()=>{zf(n,r,Uf(t.tagName),e.transformTemplate),sw(t,n)})}})},U2={useVisualState:uw({applyWillChange:!0,scrapeMotionValuesFromProps:Ff,createRenderState:Vf})};function fw(e,t,n){for(const r in t)!qe(t[r])&&!aw(r,n)&&(e[r]=t[r])}function W2({transformTemplate:e},t){return S.useMemo(()=>{const n=Vf();return Bf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function $2(e,t){const n=e.style||{},r={};return fw(r,n,e),Object.assign(r,W2(e,t)),r}function H2(e,t){const n={},r=$2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Y2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ha(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Y2.has(e)}let hw=e=>!Ha(e);function K2(e){e&&(hw=t=>t.startsWith("on")?!Ha(t):e(t))}try{K2(require("@emotion/is-prop-valid").default)}catch{}function G2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(hw(o)||n===!0&&Ha(o)||!t&&!Ha(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Q2(e,t,n,r){const o=S.useMemo(()=>{const i=cw();return zf(i,t,Uf(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};fw(i,e.style,e),o.style={...i,...o.style}}return o}function X2(e=!1){return(n,r,o,{latestValues:i},s)=>{const l=(jf(n)?Q2:H2)(r,i,s,n),u=G2(r,typeof n=="string",e),c=n!==S.Fragment?{...u,...l,ref:o}:{},{children:d}=r,f=S.useMemo(()=>qe(d)?d.get():d,[d]);return S.createElement(n,{...c,children:f})}}function q2(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const s={...jf(r)?z2:U2,preloadedFeatures:e,useRender:X2(o),createVisualElement:t,Component:r};return k2(s)}}const qc={current:null},pw={current:!1};function J2(){if(pw.current=!0,!!Of)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qc.current=e.matches;e.addListener(t),t()}else qc.current=!1}function Z2(e,t,n){for(const r in t){const o=t[r],i=n[r];if(qe(o))e.addValue(r,o);else if(qe(i))e.addValue(r,Qi(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Qi(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const vg=new WeakMap,eR=[...i1,Qe,nr],tR=e=>eR.find(o1(e)),yg=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class nR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=on.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),pw.current||J2(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){vg.delete(this.current),this.projection&&this.projection.unmount(),er(this.notifyUpdate),er(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=lr.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&fe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _o){const n=_o[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Qi(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(e1(o)||Z0(o))?o=parseFloat(o):!tR(o)&&nr.test(n)&&(o=h1(t,n)),this.setBaseTarget(t,qe(o)?o.get():o)),qe(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const s=df(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);s&&(o=s[t])}if(r&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qe(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _f),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class mw extends nR{constructor(){super(...arguments),this.KeyframeResolver=p1}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function rR(e){return window.getComputedStyle(e)}class oR extends mw{constructor(){super(...arguments),this.type="html",this.applyWillChange=!0,this.renderInstance=ow}readValueFromInstance(t,n){if(lr.has(n)){const r=Cf(n);return r&&r.default||0}else{const r=rR(t),o=(n1(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return z1(t,n)}build(t,n,r){Bf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ff(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class iR extends mw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_e}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(lr.has(n)){const r=Cf(n);return r&&r.default||0}return n=iw.has(n)?n:Sl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return lw(t,n,r)}build(t,n,r){zf(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){sw(t,n,r,o)}mount(t){this.isSVGTag=Uf(t.tagName),super.mount(t)}}const sR=(e,t)=>jf(e)?new iR(t):new oR(t,{allowProjection:e!==S.Fragment}),aR=q2({...QD,...v2,...s2,...y2},sR),lR=zk(aR);class uR extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function cR({children:e,isPresent:t}){const n=S.useId(),r=S.useRef(null),o=S.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=S.useContext(Af);return S.useInsertionEffect(()=>{const{width:s,height:a,top:l,left:u}=o.current;if(t||!r.current||!s||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${s}px !important; height: ${a}px !important; top: ${l}px !important; left: ${u}px !important; } `),()=>{document.head.removeChild(c)}},[t]),x.jsx(uR,{isPresent:t,childRef:r,sizeRef:o,children:S.cloneElement(e,{ref:r})})}const dR=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s})=>{const a=If(fR),l=S.useId(),u=S.useCallback(d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},[a,r]),c=S.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:u,register:d=>(a.set(d,!1),()=>a.delete(d))}),i?[Math.random(),u]:[n,u]);return S.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),S.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=x.jsx(cR,{isPresent:n,children:e})),x.jsx(Pl.Provider,{value:c,children:e})};function fR(){return new Map}const Bs=e=>e.key||"";function wg(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const hR=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync"})=>{const a=S.useMemo(()=>wg(e),[e]),l=a.map(Bs),u=S.useRef(!0),c=S.useRef(a),d=If(()=>new Map),[f,p]=S.useState(a),[m,v]=S.useState(a);ew(()=>{u.current=!1,c.current=a;for(let h=0;h{const y=Bs(h),b=a===m||l.includes(y),k=()=>{if(d.has(y))d.set(y,!0);else return;let C=!0;d.forEach(_=>{_||(C=!1)}),C&&(g==null||g(),v(c.current),o&&o())};return x.jsx(dR,{isPresent:b,initial:!u.current||r?void 0:!1,custom:b?void 0:n,presenceAffectsLayout:i,mode:s,onExitComplete:b?void 0:k,children:h},y)})})};var pR=typeof ys=="object"&&ys&&ys.Object===Object&&ys,mR=typeof self=="object"&&self&&self.Object===Object&&self;pR||mR||Function("return this")();var gR=typeof window<"u"?S.useLayoutEffect:S.useEffect;function vR(e,t,n,r){const o=S.useRef(t);gR(()=>{o.current=t},[t]),S.useEffect(()=>{const i=window;if(!(i&&i.addEventListener))return;const s=a=>{o.current(a)};return i.addEventListener(e,s,r),()=>{i.removeEventListener(e,s,r)}},[e,n,r])}function yR(e,t,n="mousedown",r={}){vR(n,o=>{const i=o.target;if(!i||!i.isConnected)return;(Array.isArray(e)?e.filter(a=>!!a.current).every(a=>a.current&&!a.current.contains(i)):e.current&&!e.current.contains(i))&&t(o)},void 0,r)}/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gw=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var xR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SR=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...xR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:gw("lucide",o),...a},[...s.map(([u,c])=>S.createElement(u,c)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vw=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(SR,{ref:i,iconNode:t,className:gw(`lucide-${wR(e)}`,r),...o}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CR=vw("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.453.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PR=vw("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var G=function(){return G=Object.assign||function(t){for(var n,r=1,o=arguments.length;r1&&(l||!u),d=t>1&&(u||!l),f=function(){r&&i(r)},p=function(){o&&i(o)};return x.jsx(n_,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:d,nextMonth:o,previousMonth:r,onPreviousClick:f,onNextClick:p})}function r_(e){var t,n=ge(),r=n.classNames,o=n.disableNavigation,i=n.styles,s=n.captionLayout,a=n.components,l=(t=a==null?void 0:a.CaptionLabel)!==null&&t!==void 0?t:xw,u;return o?u=x.jsx(l,{id:e.id,displayMonth:e.displayMonth}):s==="dropdown"?u=x.jsx(xg,{displayMonth:e.displayMonth,id:e.id}):s==="dropdown-buttons"?u=x.jsxs(x.Fragment,{children:[x.jsx(xg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),x.jsx(Sg,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):u=x.jsxs(x.Fragment,{children:[x.jsx(l,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),x.jsx(Sg,{displayMonth:e.displayMonth,id:e.id})]}),x.jsx("div",{className:r.caption,style:i.caption,children:u})}function o_(e){var t=ge(),n=t.footer,r=t.styles,o=t.classNames.tfoot;return n?x.jsx("tfoot",{className:o,style:r.tfoot,children:x.jsx("tr",{children:x.jsx("td",{colSpan:8,children:n})})}):x.jsx(x.Fragment,{})}function i_(e,t,n){for(var r=n?Fr(new Date):sn(new Date,{locale:e,weekStartsOn:t}),o=[],i=0;i<7;i++){var s=rt(r,i);o.push(s)}return o}function s_(){var e=ge(),t=e.classNames,n=e.styles,r=e.showWeekNumber,o=e.locale,i=e.weekStartsOn,s=e.ISOWeek,a=e.formatters.formatWeekdayName,l=e.labels.labelWeekday,u=i_(o,i,s);return x.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&x.jsx("td",{style:n.head_cell,className:t.head_cell}),u.map(function(c,d){return x.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":l(c,{locale:o}),children:a(c,{locale:o})},d)})]})}function a_(){var e,t=ge(),n=t.classNames,r=t.styles,o=t.components,i=(e=o==null?void 0:o.HeadRow)!==null&&e!==void 0?e:s_;return x.jsx("thead",{style:r.head,className:n.head,children:x.jsx(i,{})})}function l_(e){var t=ge(),n=t.locale,r=t.formatters.formatDay;return x.jsx(x.Fragment,{children:r(e.date,{locale:n})})}var Wf=S.createContext(void 0);function u_(e){if(!us(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return x.jsx(Wf.Provider,{value:t,children:e.children})}return x.jsx(c_,{initialProps:e.initialProps,children:e.children})}function c_(e){var t=e.initialProps,n=e.children,r=t.selected,o=t.min,i=t.max,s=function(u,c,d){var f,p;(f=t.onDayClick)===null||f===void 0||f.call(t,u,c,d);var m=!!(c.selected&&o&&(r==null?void 0:r.length)===o);if(!m){var v=!!(!c.selected&&i&&(r==null?void 0:r.length)===i);if(!v){var w=r?yw([],r):[];if(c.selected){var g=w.findIndex(function(h){return dt(u,h)});w.splice(g,1)}else w.push(u);(p=t.onSelect)===null||p===void 0||p.call(t,w,u,c,d)}}},a={disabled:[]};r&&a.disabled.push(function(u){var c=i&&r.length>i-1,d=r.some(function(f){return dt(f,u)});return!!(c&&!d)});var l={selected:r,onDayClick:s,modifiers:a};return x.jsx(Wf.Provider,{value:l,children:n})}function $f(){var e=S.useContext(Wf);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function d_(e,t){var n=t||{},r=n.from,o=n.to;return r&&o?dt(o,e)&&dt(r,e)?void 0:dt(o,e)?{from:o,to:void 0}:dt(r,e)?void 0:Oc(r,e)?{from:e,to:o}:{from:r,to:e}:o?Oc(e,o)?{from:o,to:e}:{from:e,to:o}:r?z0(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var Hf=S.createContext(void 0);function f_(e){if(!cs(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return x.jsx(Hf.Provider,{value:t,children:e.children})}return x.jsx(h_,{initialProps:e.initialProps,children:e.children})}function h_(e){var t=e.initialProps,n=e.children,r=t.selected,o=r||{},i=o.from,s=o.to,a=t.min,l=t.max,u=function(p,m,v){var w,g;(w=t.onDayClick)===null||w===void 0||w.call(t,p,m,v);var h=d_(p,r);(g=t.onSelect)===null||g===void 0||g.call(t,h,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(c.range_start=[i],s?(c.range_end=[s],dt(i,s)||(c.range_middle=[{after:i,before:s}])):c.range_end=[i]):s&&(c.range_start=[s],c.range_end=[s]),a&&(i&&!s&&c.disabled.push({after:fu(i,a-1),before:rt(i,a-1)}),i&&s&&c.disabled.push({after:i,before:rt(i,a-1)}),!i&&s&&c.disabled.push({after:fu(s,a-1),before:rt(s,a-1)})),l){if(i&&!s&&(c.disabled.push({before:rt(i,-l+1)}),c.disabled.push({after:rt(i,l-1)})),i&&s){var d=Zt(s,i)+1,f=l-d;c.disabled.push({before:fu(i,f)}),c.disabled.push({after:rt(s,f)})}!i&&s&&(c.disabled.push({before:rt(s,-l+1)}),c.disabled.push({after:rt(s,l-1)}))}return x.jsx(Hf.Provider,{value:{selected:r,onDayClick:u,modifiers:c},children:n})}function Yf(){var e=S.useContext(Hf);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function ia(e){return Array.isArray(e)?yw([],e):e!==void 0?[e]:[]}function p_(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],o=n[1];t[r]=ia(o)}),t}var Yt;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Yt||(Yt={}));var m_=Yt.Selected,cn=Yt.Disabled,g_=Yt.Hidden,v_=Yt.Today,Tu=Yt.RangeEnd,Du=Yt.RangeMiddle,Mu=Yt.RangeStart,y_=Yt.Outside;function w_(e,t,n){var r,o=(r={},r[m_]=ia(e.selected),r[cn]=ia(e.disabled),r[g_]=ia(e.hidden),r[v_]=[e.today],r[Tu]=[],r[Du]=[],r[Mu]=[],r[y_]=[],r);return e.fromDate&&o[cn].push({before:e.fromDate}),e.toDate&&o[cn].push({after:e.toDate}),us(e)?o[cn]=o[cn].concat(t.modifiers[cn]):cs(e)&&(o[cn]=o[cn].concat(n.modifiers[cn]),o[Mu]=n.modifiers[Mu],o[Du]=n.modifiers[Du],o[Tu]=n.modifiers[Tu]),o}var Pw=S.createContext(void 0);function x_(e){var t=ge(),n=$f(),r=Yf(),o=w_(t,n,r),i=p_(t.modifiers),s=G(G({},o),i);return x.jsx(Pw.Provider,{value:s,children:e.children})}function bw(){var e=S.useContext(Pw);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function S_(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function C_(e){return!!(e&&typeof e=="object"&&"from"in e)}function P_(e){return!!(e&&typeof e=="object"&&"after"in e)}function b_(e){return!!(e&&typeof e=="object"&&"before"in e)}function E_(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function k_(e,t){var n,r=t.from,o=t.to;if(r&&o){var i=Zt(o,r)<0;i&&(n=[o,r],r=n[0],o=n[1]);var s=Zt(e,r)>=0&&Zt(o,e)>=0;return s}return o?dt(o,e):r?dt(r,e):!1}function T_(e){return af(e)}function D_(e){return Array.isArray(e)&&e.every(af)}function M_(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(T_(n))return dt(e,n);if(D_(n))return n.includes(e);if(C_(n))return k_(e,n);if(E_(n))return n.dayOfWeek.includes(e.getDay());if(S_(n)){var r=Zt(n.before,e),o=Zt(n.after,e),i=r>0,s=o<0,a=Oc(n.before,n.after);return a?s&&i:i||s}return P_(n)?Zt(e,n.after)>0:b_(n)?Zt(n.before,e)>0:typeof n=="function"?n(e):!1})}function Kf(e,t,n){var r=Object.keys(t).reduce(function(i,s){var a=t[s];return M_(e,a)&&i.push(s),i},[]),o={};return r.forEach(function(i){return o[i]=!0}),n&&!cf(e,n)&&(o.outside=!0),o}function R_(e,t){for(var n=vt(e[0]),r=lf(e[e.length-1]),o,i,s=n;s<=r;){var a=Kf(s,t),l=!a.disabled&&!a.hidden;if(!l){s=rt(s,1);continue}if(a.selected)return s;a.today&&!i&&(i=s),o||(o=s),s=rt(s,1)}return i||o}var __=365;function Ew(e,t){var n=t.moveBy,r=t.direction,o=t.context,i=t.modifiers,s=t.retry,a=s===void 0?{count:0,lastFocused:e}:s,l=o.weekStartsOn,u=o.fromDate,c=o.toDate,d=o.locale,f={day:rt,week:Ac,month:Ht,year:OE,startOfWeek:function(w){return o.ISOWeek?Fr(w):sn(w,{locale:d,weekStartsOn:l})},endOfWeek:function(w){return o.ISOWeek?O0(w):uf(w,{locale:d,weekStartsOn:l})}},p=f[n](e,r==="after"?1:-1);r==="before"&&u?p=jE([u,p]):r==="after"&&c&&(p=FE([c,p]));var m=!0;if(i){var v=Kf(p,i);m=!v.disabled&&!v.hidden}return m?p:a.count>__?a.lastFocused:Ew(p,{moveBy:n,direction:r,context:o,modifiers:i,retry:G(G({},a),{count:a.count+1})})}var kw=S.createContext(void 0);function N_(e){var t=ds(),n=bw(),r=S.useState(),o=r[0],i=r[1],s=S.useState(),a=s[0],l=s[1],u=R_(t.displayMonths,n),c=o??(a&&t.isDateDisplayed(a))?a:u,d=function(){l(o),i(void 0)},f=function(w){i(w)},p=ge(),m=function(w,g){if(o){var h=Ew(o,{moveBy:w,direction:g,context:p,modifiers:n});dt(o,h)||(t.goToDate(h,o),f(h))}},v={focusedDay:o,focusTarget:c,blur:d,focus:f,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return x.jsx(kw.Provider,{value:v,children:e.children})}function Gf(){var e=S.useContext(kw);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function L_(e,t){var n=bw(),r=Kf(e,n,t);return r}var Qf=S.createContext(void 0);function A_(e){if(!kl(e.initialProps)){var t={selected:void 0};return x.jsx(Qf.Provider,{value:t,children:e.children})}return x.jsx(O_,{initialProps:e.initialProps,children:e.children})}function O_(e){var t=e.initialProps,n=e.children,r=function(i,s,a){var l,u,c;if((l=t.onDayClick)===null||l===void 0||l.call(t,i,s,a),s.selected&&!t.required){(u=t.onSelect)===null||u===void 0||u.call(t,void 0,i,s,a);return}(c=t.onSelect)===null||c===void 0||c.call(t,i,i,s,a)},o={selected:t.selected,onDayClick:r};return x.jsx(Qf.Provider,{value:o,children:n})}function Tw(){var e=S.useContext(Qf);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function j_(e,t){var n=ge(),r=Tw(),o=$f(),i=Yf(),s=Gf(),a=s.focusDayAfter,l=s.focusDayBefore,u=s.focusWeekAfter,c=s.focusWeekBefore,d=s.blur,f=s.focus,p=s.focusMonthBefore,m=s.focusMonthAfter,v=s.focusYearBefore,w=s.focusYearAfter,g=s.focusStartOfWeek,h=s.focusEndOfWeek,y=function(A){var M,U,W,Q;kl(n)?(M=r.onDayClick)===null||M===void 0||M.call(r,e,t,A):us(n)?(U=o.onDayClick)===null||U===void 0||U.call(o,e,t,A):cs(n)?(W=i.onDayClick)===null||W===void 0||W.call(i,e,t,A):(Q=n.onDayClick)===null||Q===void 0||Q.call(n,e,t,A)},b=function(A){var M;f(e),(M=n.onDayFocus)===null||M===void 0||M.call(n,e,t,A)},k=function(A){var M;d(),(M=n.onDayBlur)===null||M===void 0||M.call(n,e,t,A)},C=function(A){var M;(M=n.onDayMouseEnter)===null||M===void 0||M.call(n,e,t,A)},_=function(A){var M;(M=n.onDayMouseLeave)===null||M===void 0||M.call(n,e,t,A)},D=function(A){var M;(M=n.onDayPointerEnter)===null||M===void 0||M.call(n,e,t,A)},j=function(A){var M;(M=n.onDayPointerLeave)===null||M===void 0||M.call(n,e,t,A)},O=function(A){var M;(M=n.onDayTouchCancel)===null||M===void 0||M.call(n,e,t,A)},J=function(A){var M;(M=n.onDayTouchEnd)===null||M===void 0||M.call(n,e,t,A)},Y=function(A){var M;(M=n.onDayTouchMove)===null||M===void 0||M.call(n,e,t,A)},he=function(A){var M;(M=n.onDayTouchStart)===null||M===void 0||M.call(n,e,t,A)},le=function(A){var M;(M=n.onDayKeyUp)===null||M===void 0||M.call(n,e,t,A)},at=function(A){var M;switch(A.key){case"ArrowLeft":A.preventDefault(),A.stopPropagation(),n.dir==="rtl"?a():l();break;case"ArrowRight":A.preventDefault(),A.stopPropagation(),n.dir==="rtl"?l():a();break;case"ArrowDown":A.preventDefault(),A.stopPropagation(),u();break;case"ArrowUp":A.preventDefault(),A.stopPropagation(),c();break;case"PageUp":A.preventDefault(),A.stopPropagation(),A.shiftKey?v():p();break;case"PageDown":A.preventDefault(),A.stopPropagation(),A.shiftKey?w():m();break;case"Home":A.preventDefault(),A.stopPropagation(),g();break;case"End":A.preventDefault(),A.stopPropagation(),h();break}(M=n.onDayKeyDown)===null||M===void 0||M.call(n,e,t,A)},Ye={onClick:y,onFocus:b,onBlur:k,onKeyDown:at,onKeyUp:le,onMouseEnter:C,onMouseLeave:_,onPointerEnter:D,onPointerLeave:j,onTouchCancel:O,onTouchEnd:J,onTouchMove:Y,onTouchStart:he};return Ye}function F_(){var e=ge(),t=Tw(),n=$f(),r=Yf(),o=kl(e)?t.selected:us(e)?n.selected:cs(e)?r.selected:void 0;return o}function I_(e){return Object.values(Yt).includes(e)}function V_(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var o=e.modifiersClassNames[r];if(o)n.push(o);else if(I_(r)){var i=e.classNames["day_".concat(r)];i&&n.push(i)}}),n}function B_(e,t){var n=G({},e.styles.day);return Object.keys(t).forEach(function(r){var o;n=G(G({},n),(o=e.modifiersStyles)===null||o===void 0?void 0:o[r])}),n}function z_(e,t,n){var r,o,i,s=ge(),a=Gf(),l=L_(e,t),u=j_(e,l),c=F_(),d=!!(s.onDayClick||s.mode!=="default");S.useEffect(function(){var C;l.outside||a.focusedDay&&d&&dt(a.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[a.focusedDay,e,n,d,l.outside]);var f=V_(s,l).join(" "),p=B_(s,l),m=!!(l.outside&&!s.showOutsideDays||l.hidden),v=(i=(o=s.components)===null||o===void 0?void 0:o.DayContent)!==null&&i!==void 0?i:l_,w=x.jsx(v,{date:e,displayMonth:t,activeModifiers:l}),g={style:p,className:f,children:w,role:"gridcell"},h=a.focusTarget&&dt(a.focusTarget,e)&&!l.outside,y=a.focusedDay&&dt(a.focusedDay,e),b=G(G(G({},g),(r={disabled:l.disabled,role:"gridcell"},r["aria-selected"]=l.selected,r.tabIndex=y||h?0:-1,r)),u),k={isButton:d,isHidden:m,activeModifiers:l,selectedDays:c,buttonProps:b,divProps:g};return k}function U_(e){var t=S.useRef(null),n=z_(e.date,e.displayMonth,t);return n.isHidden?x.jsx("div",{role:"gridcell"}):n.isButton?x.jsx(Ya,G({name:"day",ref:t},n.buttonProps)):x.jsx("div",G({},n.divProps))}function W_(e){var t=e.number,n=e.dates,r=ge(),o=r.onWeekNumberClick,i=r.styles,s=r.classNames,a=r.locale,l=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,c=u(Number(t),{locale:a});if(!o)return x.jsx("span",{className:s.weeknumber,style:i.weeknumber,children:c});var d=l(Number(t),{locale:a}),f=function(p){o(t,n,p)};return x.jsx(Ya,{name:"week-number","aria-label":d,className:s.weeknumber,style:i.weeknumber,onClick:f,children:c})}function $_(e){var t,n,r=ge(),o=r.styles,i=r.classNames,s=r.showWeekNumber,a=r.components,l=(t=a==null?void 0:a.Day)!==null&&t!==void 0?t:U_,u=(n=a==null?void 0:a.WeekNumber)!==null&&n!==void 0?n:W_,c;return s&&(c=x.jsx("td",{className:i.cell,style:o.cell,children:x.jsx(u,{number:e.weekNumber,dates:e.dates})})),x.jsxs("tr",{className:i.row,style:o.row,children:[c,e.dates.map(function(d){return x.jsx("td",{className:i.cell,style:o.cell,role:"presentation",children:x.jsx(l,{displayMonth:e.displayMonth,date:d})},jk(d))})]})}function Cg(e,t,n){for(var r=n!=null&&n.ISOWeek?O0(t):uf(t,n),o=n!=null&&n.ISOWeek?Fr(e):sn(e,n),i=Zt(r,o),s=[],a=0;a<=i;a++)s.push(rt(o,a));var l=s.reduce(function(u,c){var d=n!=null&&n.ISOWeek?F0(c):V0(c,n),f=u.find(function(p){return p.weekNumber===d});return f?(f.dates.push(c),u):(u.push({weekNumber:d,dates:[c]}),u)},[]);return l}function H_(e,t){var n=Cg(vt(e),lf(e),t);if(t!=null&&t.useFixedWeeks){var r=Ik(e,t);if(r<6){var o=n[n.length-1],i=o.dates[o.dates.length-1],s=Ac(i,6-r),a=Cg(Ac(i,1),s,t);n.push.apply(n,a)}}return n}function Y_(e){var t,n,r,o=ge(),i=o.locale,s=o.classNames,a=o.styles,l=o.hideHead,u=o.fixedWeeks,c=o.components,d=o.weekStartsOn,f=o.firstWeekContainsDate,p=o.ISOWeek,m=H_(e.displayMonth,{useFixedWeeks:!!u,ISOWeek:p,locale:i,weekStartsOn:d,firstWeekContainsDate:f}),v=(t=c==null?void 0:c.Head)!==null&&t!==void 0?t:a_,w=(n=c==null?void 0:c.Row)!==null&&n!==void 0?n:$_,g=(r=c==null?void 0:c.Footer)!==null&&r!==void 0?r:o_;return x.jsxs("table",{id:e.id,className:s.table,style:a.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!l&&x.jsx(v,{}),x.jsx("tbody",{className:s.tbody,style:a.tbody,children:m.map(function(h){return x.jsx(w,{displayMonth:e.displayMonth,dates:h.dates,weekNumber:h.weekNumber},h.weekNumber)})}),x.jsx(g,{displayMonth:e.displayMonth})]})}function K_(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var G_=K_()?S.useLayoutEffect:S.useEffect,Ru=!1,Q_=0;function Pg(){return"react-day-picker-".concat(++Q_)}function X_(e){var t,n=e??(Ru?Pg():null),r=S.useState(n),o=r[0],i=r[1];return G_(function(){o===null&&i(Pg())},[]),S.useEffect(function(){Ru===!1&&(Ru=!0)},[]),(t=e??o)!==null&&t!==void 0?t:void 0}function q_(e){var t,n,r=ge(),o=r.dir,i=r.classNames,s=r.styles,a=r.components,l=ds().displayMonths,u=X_(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,d=[i.month],f=s.month,p=e.displayIndex===0,m=e.displayIndex===l.length-1,v=!p&&!m;o==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(d.push(i.caption_start),f=G(G({},f),s.caption_start)),m&&(d.push(i.caption_end),f=G(G({},f),s.caption_end)),v&&(d.push(i.caption_between),f=G(G({},f),s.caption_between));var w=(n=a==null?void 0:a.Caption)!==null&&n!==void 0?n:r_;return x.jsxs("div",{className:d.join(" "),style:f,children:[x.jsx(w,{id:u,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),x.jsx(Y_,{id:c,"aria-labelledby":u,displayMonth:e.displayMonth})]},e.displayIndex)}function J_(e){var t=ge(),n=t.classNames,r=t.styles;return x.jsx("div",{className:n.months,style:r.months,children:e.children})}function Z_(e){var t,n,r=e.initialProps,o=ge(),i=Gf(),s=ds(),a=S.useState(!1),l=a[0],u=a[1];S.useEffect(function(){o.initialFocus&&i.focusTarget&&(l||(i.focus(i.focusTarget),u(!0)))},[o.initialFocus,l,i.focus,i.focusTarget,i]);var c=[o.classNames.root,o.className];o.numberOfMonths>1&&c.push(o.classNames.multiple_months),o.showWeekNumber&&c.push(o.classNames.with_weeknumber);var d=G(G({},o.styles.root),o.style),f=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var w;return G(G({},m),(w={},w[v]=r[v],w))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:J_;return x.jsx("div",G({className:c.join(" "),style:d,dir:o.dir,id:o.id,nonce:r.nonce,title:r.title,lang:r.lang},f,{children:x.jsx(p,{children:s.displayMonths.map(function(m,v){return x.jsx(q_,{displayIndex:v,displayMonth:m},v)})})}))}function eN(e){var t=e.children,n=bR(e,["children"]);return x.jsx(WR,{initialProps:n,children:x.jsx(ZR,{children:x.jsx(A_,{initialProps:n,children:x.jsx(u_,{initialProps:n,children:x.jsx(f_,{initialProps:n,children:x.jsx(x_,{children:x.jsx(N_,{children:t})})})})})})})}function tN(e){return x.jsx(eN,G({},e,{children:x.jsx(Z_,{initialProps:e})}))}const Xf="-",nN=e=>{const t=oN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Xf);return a[0]===""&&a.length!==1&&a.shift(),Dw(a,t)||rN(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Dw=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Dw(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Xf);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},bg=/^\[(.+)\]$/,rN=e=>{if(bg.test(e)){const t=bg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},oN=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sN(Object.entries(e.classGroups),n).forEach(([i,s])=>{Jc(s,r,i,t)}),r},Jc=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:Eg(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(iN(o)){Jc(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Jc(s,Eg(t,i),n,r)})})},Eg=(e,t)=>{let n=e;return t.split(Xf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},iN=e=>e.isThemeGetter,sN=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,aN=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Mw="!",lN=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let u=0,c=0,d;for(let w=0;wc?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:s}):s},uN=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},cN=e=>({cache:aN(e.cacheSize),parseClassName:lN(e),...nN(e)}),dN=/\s+/,fN=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(dN);let a="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let m=!!p,v=r(m?f.substring(0,p):f);if(!v){if(!m){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}m=!1}const w=uN(c).join(":"),g=d?w+Mw:w,h=g+v;if(i.includes(h))continue;i.push(h);const y=o(v,m);for(let b=0;b0?" "+a:a)}return a};function hN(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(c),e());return n=cN(u),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=fN(l,n);return o(l,c),c}return function(){return i(hN.apply(null,arguments))}}const ye=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},_w=/^\[(?:([a-z-]+):)?(.+)\]$/i,mN=/^\d+\/\d+$/,gN=new Set(["px","full","screen"]),vN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yN=/\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$/,wN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,SN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dn=e=>wo(e)||gN.has(e)||mN.test(e),Nn=e=>Io(e,"length",MN),wo=e=>!!e&&!Number.isNaN(Number(e)),_u=e=>Io(e,"number",wo),oi=e=>!!e&&Number.isInteger(Number(e)),CN=e=>e.endsWith("%")&&wo(e.slice(0,-1)),Z=e=>_w.test(e),Ln=e=>vN.test(e),PN=new Set(["length","size","percentage"]),bN=e=>Io(e,PN,Nw),EN=e=>Io(e,"position",Nw),kN=new Set(["image","url"]),TN=e=>Io(e,kN,_N),DN=e=>Io(e,"",RN),ii=()=>!0,Io=(e,t,n)=>{const r=_w.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},MN=e=>yN.test(e)&&!wN.test(e),Nw=()=>!1,RN=e=>xN.test(e),_N=e=>SN.test(e),NN=()=>{const e=ye("colors"),t=ye("spacing"),n=ye("blur"),r=ye("brightness"),o=ye("borderColor"),i=ye("borderRadius"),s=ye("borderSpacing"),a=ye("borderWidth"),l=ye("contrast"),u=ye("grayscale"),c=ye("hueRotate"),d=ye("invert"),f=ye("gap"),p=ye("gradientColorStops"),m=ye("gradientColorStopPositions"),v=ye("inset"),w=ye("margin"),g=ye("opacity"),h=ye("padding"),y=ye("saturate"),b=ye("scale"),k=ye("sepia"),C=ye("skew"),_=ye("space"),D=ye("translate"),j=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],J=()=>["auto",Z,t],Y=()=>[Z,t],he=()=>["",dn,Nn],le=()=>["auto",wo,Z],at=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Ye=()=>["solid","dashed","dotted","double","none"],A=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",Z],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[wo,Z];return{cacheSize:500,separator:":",theme:{colors:[ii],spacing:[dn,Nn],blur:["none","",Ln,Z],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Ln,Z],borderSpacing:Y(),borderWidth:he(),contrast:Q(),grayscale:U(),hueRotate:Q(),invert:U(),gap:Y(),gradientColorStops:[e],gradientColorStopPositions:[CN,Nn],inset:J(),margin:J(),opacity:Q(),padding:Y(),saturate:Q(),scale:Q(),sepia:U(),skew:Q(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",Z]}],container:["container"],columns:[{columns:[Ln]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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:[...at(),Z]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",oi,Z]}],basis:[{basis:J()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Z]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",oi,Z]}],"grid-cols":[{"grid-cols":[ii]}],"col-start-end":[{col:["auto",{span:["full",oi,Z]},Z]}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":[ii]}],"row-start-end":[{row:["auto",{span:[oi,Z]},Z]}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Z]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Z,t]}],"min-w":[{"min-w":[Z,t,"min","max","fit"]}],"max-w":[{"max-w":[Z,t,"none","full","min","max","fit","prose",{screen:[Ln]},Ln]}],h:[{h:[Z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ln,Nn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_u]}],"font-family":[{font:[ii]}],"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",Z]}],"line-clamp":[{"line-clamp":["none",wo,_u]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",dn,Z]}],"list-image":[{"list-image":["none",Z]}],"list-style-type":[{list:["none","disc","decimal",Z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ye(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",dn,Nn]}],"underline-offset":[{"underline-offset":["auto",dn,Z]}],"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:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z]}],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",Z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...at(),EN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",bN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Ye(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Ye()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...Ye()]}],"outline-offset":[{"outline-offset":[dn,Z]}],"outline-w":[{outline:[dn,Nn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[dn,Nn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ln,DN]}],"shadow-color":[{shadow:[ii]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...A(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":A()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ln,Z]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Z]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Z]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[oi,Z]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Z]}],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",Z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",Z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[dn,Nn,_u]}],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-s","border-color-e","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"]}}},LN=pN(NN);function sa(...e){return LN(en(e))}function AN(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function ON(...e){return t=>e.forEach(n=>AN(n,t))}var Lw=S.forwardRef((e,t)=>{const{children:n,...r}=e,o=S.Children.toArray(n),i=o.find(FN);if(i){const s=i.props.children,a=o.map(l=>l===i?S.Children.count(s)>1?S.Children.only(null):S.isValidElement(s)?s.props.children:null:l);return x.jsx(Zc,{...r,ref:t,children:S.isValidElement(s)?S.cloneElement(s,void 0,a):null})}return x.jsx(Zc,{...r,ref:t,children:n})});Lw.displayName="Slot";var Zc=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const o=VN(n);return S.cloneElement(n,{...IN(r,n.props),ref:t?ON(t,o):o})}return S.Children.count(n)>1?S.Children.only(null):null});Zc.displayName="SlotClone";var jN=({children:e})=>x.jsx(x.Fragment,{children:e});function FN(e){return S.isValidElement(e)&&e.type===jN}function IN(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{i(...a),o(...a)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function VN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Aw(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,Tg=BN,zN=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Tg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=kg(c)||kg(d);return o[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(m=>{let[v,w]=m;return Array.isArray(w)?w.includes({...i,...a}[v]):{...i,...a}[v]===w})?[...u,d,f]:u},[]);return Tg(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},ed=zN("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"}}),UN=S.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Lw:"button";return x.jsx(s,{className:sa(ed({variant:t,size:n,className:e})),ref:i,...o})});UN.displayName="Button";function Ow({className:e,classNames:t,showOutsideDays:n=!0,...r}){return x.jsx(tN,{showOutsideDays:n,className:sa("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:sa(ed({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:sa(ed({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:bg-fillButtonAccentDefault hover:bg-fillButtonAccentDefault hover:text-white"),day_range_end:"day-range-end",day_selected:"bg-fillButtonAccentDefault text-white rounded-full hover:bg-fillButtonAccentDefault hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-fillTableHead text-black",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-black/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:()=>x.jsx(CR,{className:"h-4 w-4"}),IconRight:()=>x.jsx(PR,{className:"h-4 w-4"})},...r})}Ow.displayName="Calendar";const WN=[{title:"Newest",id:"desc"},{title:"Oldest",id:"asc"}],$N=()=>{const e=S.useContext(zr);if(!e)throw new Error("smsContext must be used within an AuthProvider");const{datee:t,setDatee:n,setActiveSort:r,activeSort:o,searchValue:i,setSearchValue:s,setSearchFecth:a,searchFecth:l,timeDate:u,setTimeDate:c,smsTableData:d}=e,f=S.useRef(null),[p,m]=S.useState(!1),[v,w]=S.useState(!1);yR(f,()=>{m(!1)});const h=()=>{w(!!(o==="asc"||t||l))},y=()=>{r("desc"),n(void 0),a(""),s("")},b=()=>{a(""),s("")};return S.useEffect(()=>{h()},[o,t,l]),x.jsx("div",{className:"",children:x.jsxs("div",{className:"flex gap-6 w-full justify-between items-start",children:[x.jsxs("div",{className:"flex flex-col gap-[16px]",children:[x.jsx("div",{className:"bg-[#F0F0FA] rounded-full flex gap-6 shadow-tableShadow",children:x.jsxs("div",{className:"flex items-center pr-[24px] w-fit gap-[24px]",children:[x.jsx("div",{className:en("leading-[115%] text-[14px] py-[16px] px-[24px] bg-[#E1E1F5] text-black font-semibold rounded-l-full",{}),children:"Filtr"}),WN.map((k,C)=>x.jsx("div",{onClick:()=>{r(k.id)},className:en("leading-[115%] text-[14px] cursor-pointer",{"text-fillButtonAccentDefault font-[600]":o===k.id,"text-textDarkt":o!==k.id}),children:k.title},C)),x.jsxs("div",{className:"relative",children:[x.jsx("div",{onClick:()=>m(k=>!k),className:en("leading-[115%] text-[14px] text-textDarkt cursor-pointer w-fit ",{}),children:"Kalendar"}),x.jsx(hR,{children:p&&x.jsx(lR.div,{initial:{opacity:0,y:-20,pointerEvents:"none"},animate:{opacity:1,y:0,pointerEvents:"all"},exit:{opacity:0,y:-20,pointerEvents:"none"},transition:{ease:"easeInOut"},ref:f,className:"absolute top-5",children:x.jsx(Ow,{mode:"single",selected:t,onSelect:n,initialFocus:!0,onDayClick:()=>m(!1),className:en("my-20 bg-[#F5F5FA] w-fit rounded-[8px] -translate-y-[50px] -translate-x-[60px] shadow-[0_2px_32px_rgba(0,0,0,0.3)] transition-all")})})})]})]})}),t&&(d==null?void 0:d.data.length)!==0&&x.jsx("input",{type:"text",placeholder:"Sagat boýunça gözle... 18:1",onChange:k=>c(k.target.value),value:u,className:"w-full outline-none px-6 py-3 shadow-tableShadow bg-[#F0F0FA] rounded-full"}),v?x.jsxs("div",{className:"cursor-pointer h-fit flex items-center gap-[8px] stroke-lightOutline ",onClick:y,children:[x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-all ease-out duration-[0.3s]",children:[x.jsx("path",{d:"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16",stroke:"current","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),")"]}),x.jsx("h1",{className:" text-[14px] font-medium w-fit",children:"Filteri aýyr"})]}):null]}),x.jsxs("div",{className:"flex shadow-tableShadow rounded-full w-fit",children:[x.jsxs("div",{className:"flex items-center justify-between bg-[#F0F0FA] w-fit py-3 px-4 rounded-[9999px_0_0_9999px] ",children:[x.jsx("input",{type:"text",placeholder:"Gözle...",onChange:k=>s(k.target.value),value:i,className:"w-full bg-transparent outline-none"}),x.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"cursor-pointer stroke-textGray hover:stroke-fillNavyBlue transition-all ease-out duration-[0.3s]",onClick:b,children:l?x.jsx("path",{d:"M16 16L12 12M12 12L8 8M12 12L16 8M12 12L8 16",stroke:"current","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}):null})]}),x.jsx("div",{onClick:()=>a(i),className:"bg-fillButtonAccentDefault rounded-[0_9999px_9999px_0] px-4 py-[12px] cursor-pointer",children:x.jsx("img",{src:"/search.svg",alt:"search",className:"w-6 h-6"})})]})]})})},Dg={SMS_SRC:"https://extra.turkmentv.gov.tm/api"},Mg={myTvAdmins:"/my-tv-admins",messagesByTvAdmin:e=>`/messages-by-tv-admin/${e}`};class jw{static async getAdmins(){const t=localStorage.getItem("access_token");return await fetch(`${Dg.SMS_SRC}${Mg.myTvAdmins}`,{headers:{Authorization:`Bearer ${t}`}}).then(n=>n.json().then(r=>r))}static async getMessages(t,n,r,o,i){const s=localStorage.getItem("access_token");return await fetch(`${Dg.SMS_SRC}${Mg.messagesByTvAdmin(t)}?per_page=60&page=${n}${r?"&filter_by_date="+r.toString():""}${i?"&search="+i:""}&order=${o}`,{headers:{Authorization:`Bearer ${s}`}}).then(a=>a.json().then(l=>l))}}const Tl=({height:e="auto"})=>x.jsx("div",{className:"loader my-6 w-full flex justify-center items-center",style:{height:e},children:x.jsx("img",{src:"/spin-blue.svg",alt:"loader",className:"object-contain w-[50px] h-[50px]"})}),HN=()=>{const e=S.useContext(zr);if(!e)throw new Error("smsContext must be used within an AuthProvider");const{activeNumber:t,setActiveNumber:n,smsData:r,setSmsData:o,setIsError:i}=e,s=()=>{try{jw.getAdmins().then(a=>{o(a),n(a.data[0].id),a.data||i(!0)})}catch{i(!0)}};return S.useEffect(()=>{s()},[]),r?x.jsxs("div",{className:"bg-[#F0F0FA] rounded-3xl w-[314px] shadow-tableShadow",children:[x.jsx("div",{className:"font-semibold leading-[125%] bg-[#E1E1F5] rounded-[25px_25px_0_0] py-6 px-5",children:"Gysga belgi boýunça filtr"}),x.jsx("div",{className:"flex flex-col w-full",children:r==null?void 0:r.data.map(a=>x.jsx("div",{className:en("h-[60px] px-6 py-5 font-semibold cursor-pointer hover:text-fillButtonAccentDefault transition-all duration-75",{"text-fillButtonAccentDefault":a.id===t}),onClick:()=>n(a.id),children:a.login},a.id))})]}):x.jsx("div",{className:"w-[314px]",children:x.jsx(Tl,{})})},YN=({children:e})=>{const t=S.useContext(yl),n=s0();if(!t)throw new Error("AuthContext must be used within an AuthProvider");const{user:r}=t;return S.useEffect(()=>{r||(n("/"),console.log("first"))},[r,n]),r?x.jsx(x.Fragment,{children:e}):null},KN=()=>{const e=S.useContext(zr);if(!e)throw new Error("smsContext must be used within an AuthProvider");const{setCurrentPage:t,smsTableData:n}=e;if(!n)return x.jsx("div",{children:x.jsx(Tl,{})});const{current_page:r,last_page:o}=n.meta,s=(()=>{const a=[];if(o<=7)for(let l=1;l<=o;l++)a.push(l);else{a.push(1),r>4&&a.push("...");const l=Math.max(2,r-2),u=Math.min(o-1,r+2);for(let c=l;c<=u;c++)a.push(c);rt(r!==1?r-1:r),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M8.5415 12.8333L10.9165 15.2083C11.0832 15.375 11.1632 15.5694 11.1565 15.7916C11.1498 16.0138 11.0698 16.2083 10.9165 16.375C10.7498 16.5416 10.5521 16.6286 10.3232 16.6358C10.0943 16.643 9.89623 16.563 9.729 16.3958L5.9165 12.5833C5.74984 12.4166 5.6665 12.2222 5.6665 12C5.6665 11.7777 5.74984 11.5833 5.9165 11.4166L9.729 7.60412C9.89567 7.43745 10.0937 7.35773 10.3232 7.36495C10.5526 7.37217 10.7504 7.45884 10.9165 7.62495C11.0693 7.79162 11.1493 7.98606 11.1565 8.20828C11.1637 8.43051 11.0837 8.62495 10.9165 8.79162L8.5415 11.1666H17.8332C18.0693 11.1666 18.2673 11.2466 18.4273 11.4066C18.5873 11.5666 18.6671 11.7644 18.6665 12C18.6665 12.2361 18.5865 12.4341 18.4265 12.5941C18.2665 12.7541 18.0687 12.8338 17.8332 12.8333H8.5415Z",fill:r===1?"#C0C0CC":"#878799"})}),s.map((a,l)=>x.jsx("span",{className:en("text-[14px] font-[500] leading-[125%]",{"cursor-pointer text-[#878799]":a!=="..."&&a!==r,"cursor-default text-gray-400":a==="...","cursor-pointer text-[#4D4D99] font-semibold":a===r}),onClick:()=>typeof a=="number"&&t(a),children:a},l)),x.jsx("svg",{onClick:()=>t(r!==o?r+1:o),className:en("cursor-pointer",{"pointer-events-none cursor-default":r===o}),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M15.4585 12.8332H6.16683C5.93072 12.8332 5.73294 12.7532 5.5735 12.5932C5.41405 12.4332 5.33405 12.2354 5.3335 11.9999C5.3335 11.7638 5.4135 11.566 5.5735 11.4066C5.7335 11.2471 5.93127 11.1671 6.16683 11.1666H15.4585L13.0835 8.79155C12.9168 8.62489 12.8368 8.43044 12.8435 8.20822C12.8502 7.986 12.9302 7.79155 13.0835 7.62489C13.2502 7.45822 13.4482 7.37155 13.6777 7.36489C13.9071 7.35822 14.1049 7.43794 14.271 7.60405L18.0835 11.4166C18.1668 11.4999 18.226 11.5902 18.261 11.6874C18.296 11.7846 18.3132 11.8888 18.3127 11.9999C18.3127 12.111 18.2954 12.2152 18.261 12.3124C18.2266 12.4096 18.1674 12.4999 18.0835 12.5832L14.271 16.3957C14.1043 16.5624 13.9066 16.6424 13.6777 16.6357C13.4488 16.6291 13.2507 16.5421 13.0835 16.3749C12.9307 16.2082 12.8507 16.0138 12.8435 15.7916C12.8363 15.5693 12.9163 15.3749 13.0835 15.2082L15.4585 12.8332Z",fill:r===o?"#C0C0CC":"#878799"})})]})]})},GN=({index:e,number:t,sms:n,date:r})=>{const o=a=>{const l=a.split(" ")[0].split("-").reverse().join("."),u=a.split(" ")[1];return{parsedDate:l,parsedTime:u}},{parsedDate:i,parsedTime:s}=o(r);return x.jsxs("div",{className:en(" flex justify-between",{"bg-fillTableRow":e%2!==0,"bg-fillTableRow2":e%2===0}),children:[x.jsx("div",{className:"w-[80px] px-[24px] py-[20px]",children:x.jsx("span",{className:"text-black font-[600] leading-[125%] text-[16px]",children:e})}),x.jsx("div",{className:"w-[200px] px-[24px] py-[20px]",children:x.jsxs("span",{className:"text-textDarkt leading-[125%] text-[16px]",children:["+",t]})}),x.jsx("div",{className:"w-[380px] px-[24px] py-[20px] flex flex-wrap break-words text-textDarkt",children:x.jsx("span",{className:"text-textDarkt leading-[125%] text-[16px] inline-block w-[340px] break-words",children:n})}),x.jsxs("div",{className:"w-[180px] px-[24px] py-[20px] flex flex-col",children:[x.jsxs("span",{className:"text-textDarkt leading-[125%] text-[16px]",children:[i,"ý."]}),x.jsx("span",{className:"text-textDarkt leading-[125%] text-[14px]",children:s})]})]})},QN=()=>{const e=S.useContext(zr);if(!e)throw new Error("smsContext must be used within an AuthProvider");const{smsTableData:t,currentPage:n,timeDate:r}=e;return console.log(t==null?void 0:t.data[0].dt.slice(11,15)),x.jsx("div",{className:"flex flex-col w-full gap-[24px]",children:x.jsx("div",{className:"flex flex-col w-full rounded-b-[25px] ",children:t==null?void 0:t.data.filter(o=>r?o.dt.slice(11,15).includes(r):o).map((o,i)=>x.jsx(GN,{index:n!==1?30*(n-1)+i+1:i+1,sms:o.msg,date:o.dt,number:o.client},o.id))})})},XN=()=>x.jsxs("div",{className:"flex w-full justify-between bg-fillTableHead",children:[x.jsx("div",{className:"w-[80px] px-[24px] py-[20px]",children:x.jsx("span",{className:"text-black font-[600] leading-[125%] text-[16px]",children:"ID"})}),x.jsx("div",{className:"w-[200px] px-[24px] py-[20px]",children:x.jsx("span",{className:"text-black font-[600] leading-[125%] text-[16px]",children:"Telefon belgi"})}),x.jsx("div",{className:"w-[380px] px-[24px] py-[20px]",children:x.jsx("span",{className:"text-black font-[600] leading-[125%] text-[16px]",children:"SMS"})}),x.jsx("div",{className:"w-[180px] px-[24px] py-[20px]",children:x.jsx("span",{className:"text-black font-[600] leading-[125%] text-[16px]",children:"Wagty"})})]}),qN=()=>{const e=S.useContext(zr);if(!e)throw new Error("smsContext must be used within an AuthProvider");const{tableIsLoading:t,smsData:n,smsTableData:r,setSmsTableData:o,setTableIsLoading:i,setCurrentPage:s,setIsError:a,currentPage:l,activeNumber:u,searchFecth:c,activeSort:d,dateValue:f}=e,p=()=>{if(n&&u){i(!0);try{jw.getMessages(u,l,f,d,c).then(m=>{o(m),i(!1),m.data||(i(!0),a(!0))})}catch{i(!0),a(!0)}}};return S.useEffect(()=>{p()},[n,l,u,c,d,f]),S.useEffect(()=>{s(1)},[u]),t?x.jsx("div",{className:"w-full",children:x.jsx(Tl,{})}):r!=null&&r.data.length?x.jsxs("div",{className:"flex flex-col w-full gap-[24px] max-w-[900px]",children:[x.jsxs("div",{className:"flex flex-col w-full rounded-[25px] overflow-hidden shadow-tableShadow",children:[x.jsx(XN,{}),x.jsx(QN,{})]}),r.meta.last_page>1?x.jsx(KN,{}):null]}):x.jsx("h1",{className:"mt-[20px] text-[32px] leading-[120%] font-semibold text-textBlack",children:"Нет результатов!"})},JN=()=>{const e=S.useContext(yl);if(!e)throw new Error("AuthContext must be used within an AuthProvider");const{logout:t,userIsLoading:n}=e,r=S.useContext(zr);if(!r)throw new Error("smsContext must be used within an AuthProvider");const{setCurrentPage:o,isError:i,smsTableData:s,currentPage:a}=r;return S.useEffect(()=>{window.scrollTo(0,0)},[s,a]),i?x.jsx("main",{children:x.jsxs("div",{className:"container flex flex-col justify-center items-center h-screen",children:[x.jsx("h1",{className:"text-[44px] sm:text-[80px] leading-[100%] font-bold bg-fancyTitle bg-clip-text text-transparent text-center ",children:"Gysga belgi birikdirilmedi"}),x.jsx("button",{onClick:()=>{t(),o(1)},type:"submit",className:"p-3 bg-[#7A7ACC] text-[18px] leading-[150%] font-medium text-white w-[200px] rounded-xl mt-[30px]",children:"Yza"})]})}):n?x.jsx("main",{children:x.jsx("div",{className:"container flex justify-center items-center h-screen",children:x.jsx(Tl,{})})}):x.jsx(YN,{children:x.jsx("div",{className:"pt-[100px] pb-[200px]",children:x.jsx("div",{className:"container",children:x.jsxs("div",{className:"flex gap-[40px]",children:[x.jsxs("div",{className:"flex flex-col gap-[32px]",children:[x.jsx(HN,{}),x.jsx("span",{onClick:()=>{t(),o(1)},className:"text-textLight text-[16px] leading-[140%] font-semibold cursor-pointer w-full py-2",children:"Ulgamdan çykmak"})]}),x.jsxs("div",{className:"flex flex-col w-full gap-5",children:[x.jsx($N,{}),x.jsx(qN,{})]})]})})})})},ZN=()=>x.jsx(Bk,{children:x.jsx(JN,{})}),eL=()=>{const[e,t]=S.useState(""),[n,r]=S.useState(""),o=S.useContext(yl);if(!o)throw new Error("AuthContext must be used within an AuthProvider");const{login:i,userLogedIn:s}=o,{checkUserLoggedIn:a}=o,l=u=>{u.preventDefault(),i(e,n),t(""),r("")};return S.useEffect(()=>{a()},[]),x.jsx("main",{className:"container flex justify-center h-screen items-center ",children:x.jsx("form",{onSubmit:l,id:"create-course-form",children:x.jsxs("div",{className:"bg-lightSurfaceContainer p-10 rounded-[25px] w-[522px] -mt-28 shadow-tableShadow",children:[x.jsx("h2",{className:"mb-10 text-[40px] leading-none text-#242429 font-semibold",children:"SMS ulgamy"}),x.jsxs("div",{className:"flex flex-col gap-2 mb-5 leading-[150%]",children:[x.jsx("label",{htmlFor:"login",className:"text-[16px] font-semibold text-[#242429]",children:"Login"}),x.jsx("input",{id:"login",type:"text",className:"px-[16px] py-[12px] bg-lightPrimaryContainer rounded-[12px] outline-none text-lightOnSurfaceVariant text-textSmall leading-textSmall",value:e,onChange:u=>t(u.target.value),placeholder:"Login giriziň"})]}),x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("label",{htmlFor:"password",className:"text-[16px] font-semibold text-[#242429]",children:"Açar sözi"}),x.jsx("input",{id:"password",type:"password",className:"px-[16px] py-[12px] bg-lightPrimaryContainer rounded-[12px] outline-none text-lightOnSurfaceVariant text-textSmall leading-textSmall",value:n,onChange:u=>r(u.target.value),placeholder:"Açar sözi giriziň"})]}),x.jsx("button",{type:"submit",className:"p-3 bg-[#7A7ACC] text-[18px] leading-[150%] font-medium text-white w-full rounded-xl mt-[30px]",children:"Ulgama gir"}),s===!1?x.jsx("p",{className:"text-center pt-[16px] text-[16px] font-[600] text-red-400",children:"Login ýa-da açar sözi ýalňyş"}):null]})})})};function tL(){return x.jsx("main",{className:"min-h-screen",children:x.jsx("div",{className:"container",children:x.jsx(_E,{children:x.jsx(BP,{})})})})}const nL=$P([{path:"/",element:x.jsx(tL,{}),children:[{path:"",element:x.jsx(eL,{})},{path:"dashboard",element:x.jsx(ZN,{})}]}]);$y(document.getElementById("root")).render(x.jsx(S.StrictMode,{children:x.jsx(ZP,{router:nL})}));