var e,t,n=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,l=Math.pow,u=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var n in t||(t={}))s.call(t,n)&&u(e,n,t[n]);if(o)for(var n of o(t))a.call(t,n)&&u(e,n,t[n]);return e},d=(e,t)=>r(e,i(t)),h=(e,t)=>{var n={};for(var r in e)s.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&o)for(var r of o(e))t.indexOf(r)<0&&a.call(e,r)&&(n[r]=e[r]);return n},f=(e,t,n)=>u(e,"symbol"!=typeof t?t+"":t,n),p=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function y(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var v={exports:{}},b={},w={exports:{}},k={},S=Symbol.for("react.element"),x=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),P=Symbol.for("react.provider"),C=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),L=Symbol.iterator;var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,I={};function N(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||M}function U(){}function F(e,t,n){this.props=e,this.context=t,this.refs=I,this.updater=n||M}N.prototype.isReactComponent={},N.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},N.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},U.prototype=N.prototype;var V=F.prototype=new U;V.constructor=F,D(V,N.prototype),V.isPureReactComponent=!0;var z=Array.isArray,B=Object.prototype.hasOwnProperty,W={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,n){var r,i={},o=null,s=null;if(null!=t)for(r in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)B.call(t,r)&&!H.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(1===a)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps)void 0===i[r]&&(i[r]=a[r]);return{$$typeof:S,type:e,key:o,ref:s,props:i,_owner:W.current}}function K(e){return"object"==typeof e&&null!==e&&e.$$typeof===S}var $=/\/+/g;function G(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function Y(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s=!1;if(null===e)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case S:case x:s=!0}}if(s)return i=i(s=e),e=""===r?"."+G(s,0):r,z(i)?(n="",null!=e&&(n=e.replace($,"$&/")+"/"),Y(i,t,n,"",function(e){return e})):null!=i&&(K(i)&&(i=function(e,t){return{$$typeof:S,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace($,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=""===r?".":r+":",z(e))for(var a=0;a<e.length;a++){var l=r+G(o=e[a],a);s+=Y(o,t,n,l,i)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),a=0;!(o=e.next()).done;)s+=Y(o=o.value,t,n,l=r+G(o,a++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function J(e,t,n){if(null==e)return e;var r=[],i=0;return Y(e,r,"","",function(e){return t.call(n,e,i++)}),r}function Q(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var X={current:null},Z={transition:null},ee={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:Z,ReactCurrentOwner:W};function te(){throw Error("act(...) is not supported in production builds of React.")}k.Children={map:J,forEach:function(e,t,n){J(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return J(e,function(){t++}),t},toArray:function(e){return J(e,function(e){return e})||[]},only:function(e){if(!K(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},k.Component=N,k.Fragment=_,k.Profiler=E,k.PureComponent=F,k.StrictMode=T,k.Suspense=O,k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,k.act=te,k.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=D({},e.props),i=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=W.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)B.call(t,l)&&!H.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==a?a[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:S,type:e.type,key:i,ref:o,props:r,_owner:s}},k.createContext=function(e){return(e={$$typeof:C,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:P,_context:e},e.Consumer=e},k.createElement=q,k.createFactory=function(e){var t=q.bind(null,e);return t.type=e,t},k.createRef=function(){return{current:null}},k.forwardRef=function(e){return{$$typeof:A,render:e}},k.isValidElement=K,k.lazy=function(e){return{$$typeof:j,_payload:{_status:-1,_result:e},_init:Q}},k.memo=function(e,t){return{$$typeof:R,type:e,compare:void 0===t?null:t}},k.startTransition=function(e){var t=Z.transition;Z.transition={};try{e()}finally{Z.transition=t}},k.unstable_act=te,k.useCallback=function(e,t){return X.current.useCallback(e,t)},k.useContext=function(e){return X.current.useContext(e)},k.useDebugValue=function(){},k.useDeferredValue=function(e){return X.current.useDeferredValue(e)},k.useEffect=function(e,t){return X.current.useEffect(e,t)},k.useId=function(){return X.current.useId()},k.useImperativeHandle=function(e,t,n){return X.current.useImperativeHandle(e,t,n)},k.useInsertionEffect=function(e,t){return X.current.useInsertionEffect(e,t)},k.useLayoutEffect=function(e,t){return X.current.useLayoutEffect(e,t)},k.useMemo=function(e,t){return X.current.useMemo(e,t)},k.useReducer=function(e,t,n){return X.current.useReducer(e,t,n)},k.useRef=function(e){return X.current.useRef(e)},k.useState=function(e){return X.current.useState(e)},k.useSyncExternalStore=function(e,t,n){return X.current.useSyncExternalStore(e,t,n)},k.useTransition=function(){return X.current.useTransition()},k.version="18.3.1",w.exports=k;var ne=w.exports;const re=g(ne);var ie=ne,oe=Symbol.for("react.element"),se=Symbol.for("react.fragment"),ae=Object.prototype.hasOwnProperty,le=ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ue={key:!0,ref:!0,__self:!0,__source:!0};function ce(e,t,n){var r,i={},o=null,s=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(s=t.ref),t)ae.call(t,r)&&!ue.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:oe,type:e,key:o,ref:s,props:i,_owner:le.current}}b.Fragment=se,b.jsx=ce,b.jsxs=ce,v.exports=b;var de=v.exports,he={exports:{}},fe={},pe={exports:{}},me={};!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,s=o>>>1;r<s;){var a=2*(r+1)-1,l=e[a],u=a+1,c=e[u];if(0>i(l,n))u<o&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[a]=n,r=a);else{if(!(u<o&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,h=3,f=!1,p=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(u);null!==i;){if(null===i.callback)r(u);else{if(!(i.startTime<=e))break;r(u),i.sortIndex=i.expirationTime,t(l,i)}i=n(u)}}function w(e){if(m=!1,b(e),!p)if(null!==n(l))p=!0,j(k);else{var t=n(u);null!==t&&L(w,t.startTime-e)}}function k(t,i){p=!1,m&&(m=!1,y(T),T=-1),f=!0;var o=h;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!C());){var s=d.callback;if("function"==typeof s){d.callback=null,h=d.priorityLevel;var a=s(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof a?d.callback=a:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&L(w,g.startTime-i),c=!1}return c}finally{d=null,h=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,x=!1,_=null,T=-1,E=5,P=-1;function C(){return!(e.unstable_now()-P<E)}function A(){if(null!==_){var t=e.unstable_now();P=t;var n=!0;try{n=_(!0,t)}finally{n?S():(x=!1,_=null)}}else x=!1}if("function"==typeof v)S=function(){v(A)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=A,S=function(){R.postMessage(null)}}else S=function(){g(A,0)};function j(e){_=e,x||(x=!0,S())}function L(t,n){T=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){p||f||(p=!0,j(k))},e.unstable_forceFrameRate=function(e){0>e||125<e||(E=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},e.unstable_scheduleCallback=function(r,i,o){var s=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?s+o:s:o=s,r){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return r={id:c++,callback:i,priorityLevel:r,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(r.sortIndex=o,t(u,r),null===n(l)&&r===n(u)&&(m?(y(T),T=-1):m=!0,L(w,o-s))):(r.sortIndex=a,t(l,r),p||f||(p=!0,j(k))),r},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}(me),pe.exports=me;var ge=pe.exports,ye=ne,ve=ge;function be(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var we=new Set,ke={};function Se(e,t){xe(e,t),xe(e+"Capture",t)}function xe(e,t){for(ke[e]=t,e=0;e<t.length;e++)we.add(t[e])}var _e=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),Te=Object.prototype.hasOwnProperty,Ee=/^[: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]*$/,Pe={},Ce={};function Ae(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[e]=new Ae(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Oe[t]=new Ae(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[e]=new Ae(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){Oe[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new Ae(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){Oe[e]=new Ae(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){Oe[e]=new Ae(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){Oe[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var Re=/[\-:]([a-z])/g;function je(e){return e[1].toUpperCase()}function Le(e,t,n,r){var i=Oe.hasOwnProperty(t)?Oe[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!Te.call(Ce,e)||!Te.call(Pe,e)&&(Ee.test(e)?Ce[e]=!0:(Pe[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(Re,je);Oe[t]=new Ae(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(Re,je);Oe[t]=new Ae(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(Re,je);Oe[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)}),Oe.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){Oe[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});var Me=ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,De=Symbol.for("react.element"),Ie=Symbol.for("react.portal"),Ne=Symbol.for("react.fragment"),Ue=Symbol.for("react.strict_mode"),Fe=Symbol.for("react.profiler"),Ve=Symbol.for("react.provider"),ze=Symbol.for("react.context"),Be=Symbol.for("react.forward_ref"),We=Symbol.for("react.suspense"),He=Symbol.for("react.suspense_list"),qe=Symbol.for("react.memo"),Ke=Symbol.for("react.lazy"),$e=Symbol.for("react.offscreen"),Ge=Symbol.iterator;function Ye(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Ge&&e[Ge]||e["@@iterator"])?e:null}var Je,Qe=Object.assign;function Xe(e){if(void 0===Je)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||""}return"\n"+Je+e}var Ze=!1;function et(e,t){if(!e||Ze)return"";Ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var i=u.stack.split("\n"),o=r.stack.split("\n"),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(1!==s||1!==a)do{if(s--,0>--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{Ze=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xe(e):""}function tt(e){switch(e.tag){case 5:return Xe(e.type);case 16:return Xe("Lazy");case 13:return Xe("Suspense");case 19:return Xe("SuspenseList");case 0:case 2:case 15:return e=et(e.type,!1);case 11:return e=et(e.type.render,!1);case 1:return e=et(e.type,!0);default:return""}}function nt(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Ne:return"Fragment";case Ie:return"Portal";case Fe:return"Profiler";case Ue:return"StrictMode";case We:return"Suspense";case He:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ze:return(e.displayName||"Context")+".Consumer";case Ve:return(e._context.displayName||"Context")+".Provider";case Be:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case qe:return null!==(t=e.displayName||null)?t:nt(e.type)||"Memo";case Ke:t=e._payload,e=e._init;try{return nt(e(t))}catch(n){}}return null}function rt(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=(e=t.render).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 nt(t);case 8:return t===Ue?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function it(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ot(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function st(e){e._valueTracker||(e._valueTracker=function(e){var t=ot(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function at(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ot(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function lt(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function ut(e,t){var n=t.checked;return Qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ct(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=it(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function dt(e,t){null!=(t=t.checked)&&Le(e,"checked",t,!1)}function ht(e,t){dt(e,t);var n=it(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?pt(e,t.type,n):t.hasOwnProperty("defaultValue")&&pt(e,t.type,it(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function ft(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function pt(e,t,n){"number"===t&<(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var mt=Array.isArray;function gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+it(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function yt(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(be(91));return Qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(be(92));if(mt(n)){if(1<n.length)throw Error(be(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:it(n)}}function bt(e,t){var n=it(t.value),r=it(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function wt(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function kt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function St(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?kt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var xt,_t,Tt=(_t=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((xt=xt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return _t(e,t)})}:_t);function Et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Pt={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},Ct=["Webkit","ms","Moz","O"];function At(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Pt.hasOwnProperty(e)&&Pt[e]?(""+t).trim():t+"px"}function Ot(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=At(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(Pt).forEach(function(e){Ct.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pt[t]=Pt[e]})});var Rt=Qe({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 jt(e,t){if(t){if(Rt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(be(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(be(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(be(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(be(62))}}function Lt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Mt=null;function Dt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var It=null,Nt=null,Ut=null;function Ft(e){if(e=Mo(e)){if("function"!=typeof It)throw Error(be(280));var t=e.stateNode;t&&(t=Io(t),It(e.stateNode,e.type,t))}}function Vt(e){Nt?Ut?Ut.push(e):Ut=[e]:Nt=e}function zt(){if(Nt){var e=Nt,t=Ut;if(Ut=Nt=null,Ft(e),t)for(e=0;e<t.length;e++)Ft(t[e])}}function Bt(e,t){return e(t)}function Wt(){}var Ht=!1;function qt(e,t,n){if(Ht)return e(t,n);Ht=!0;try{return Bt(e,t,n)}finally{Ht=!1,(null!==Nt||null!==Ut)&&(Wt(),zt())}}function Kt(e,t){var n=e.stateNode;if(null===n)return null;var r=Io(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(be(231,t,typeof n));return n}var $t=!1;if(_e)try{var Gt={};Object.defineProperty(Gt,"passive",{get:function(){$t=!0}}),window.addEventListener("test",Gt,Gt),window.removeEventListener("test",Gt,Gt)}catch(_t){$t=!1}function Yt(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Jt=!1,Qt=null,Xt=!1,Zt=null,en={onError:function(e){Jt=!0,Qt=e}};function tn(e,t,n,r,i,o,s,a,l){Jt=!1,Qt=null,Yt.apply(en,arguments)}function nn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function rn(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function on(e){if(nn(e)!==e)throw Error(be(188))}function sn(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=nn(e)))throw Error(be(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return on(i),e;if(o===r)return on(i),t;o=o.sibling}throw Error(be(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error(be(189))}}if(n.alternate!==r)throw Error(be(190))}if(3!==n.tag)throw Error(be(188));return n.stateNode.current===n?e:t}(e))?an(e):null}function an(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=an(e);if(null!==t)return t;e=e.sibling}return null}var ln=ve.unstable_scheduleCallback,un=ve.unstable_cancelCallback,cn=ve.unstable_shouldYield,dn=ve.unstable_requestPaint,hn=ve.unstable_now,fn=ve.unstable_getCurrentPriorityLevel,pn=ve.unstable_ImmediatePriority,mn=ve.unstable_UserBlockingPriority,gn=ve.unstable_NormalPriority,yn=ve.unstable_LowPriority,vn=ve.unstable_IdlePriority,bn=null,wn=null;var kn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(Sn(e)/xn|0)|0},Sn=Math.log,xn=Math.LN2;var _n=64,Tn=4194304;function En(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=En(a):0!==(o&=s)&&(r=En(o))}else 0!==(s=n&~i)?r=En(s):0!==o&&(r=En(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-kn(t)),r|=e[n],t&=~i;return r}function Cn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;default:return-1}}function An(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function On(){var e=_n;return!(4194240&(_n<<=1))&&(_n=64),e}function Rn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-kn(t)]=n}function Ln(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-kn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Mn=0;function Dn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var In,Nn,Un,Fn,Vn,zn=!1,Bn=[],Wn=null,Hn=null,qn=null,Kn=new Map,$n=new Map,Gn=[],Yn="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Jn(e,t){switch(e){case"focusin":case"focusout":Wn=null;break;case"dragenter":case"dragleave":Hn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":Kn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$n.delete(t.pointerId)}}function Qn(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=Mo(t))&&Nn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Xn(e){var t=Lo(e.target);if(null!==t){var n=nn(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=rn(n)))return e.blockedOn=t,void Vn(e.priority,function(){Un(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Zn(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=cr(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Mo(n))&&Nn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Mt=r,n.target.dispatchEvent(r),Mt=null,t.shift()}return!0}function er(e,t,n){Zn(e)&&n.delete(t)}function tr(){zn=!1,null!==Wn&&Zn(Wn)&&(Wn=null),null!==Hn&&Zn(Hn)&&(Hn=null),null!==qn&&Zn(qn)&&(qn=null),Kn.forEach(er),$n.forEach(er)}function nr(e,t){e.blockedOn===t&&(e.blockedOn=null,zn||(zn=!0,ve.unstable_scheduleCallback(ve.unstable_NormalPriority,tr)))}function rr(e){function t(t){return nr(t,e)}if(0<Bn.length){nr(Bn[0],e);for(var n=1;n<Bn.length;n++){var r=Bn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Wn&&nr(Wn,e),null!==Hn&&nr(Hn,e),null!==qn&&nr(qn,e),Kn.forEach(t),$n.forEach(t),n=0;n<Gn.length;n++)(r=Gn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Gn.length&&null===(n=Gn[0]).blockedOn;)Xn(n),null===n.blockedOn&&Gn.shift()}var ir=Me.ReactCurrentBatchConfig,or=!0;function sr(e,t,n,r){var i=Mn,o=ir.transition;ir.transition=null;try{Mn=1,lr(e,t,n,r)}finally{Mn=i,ir.transition=o}}function ar(e,t,n,r){var i=Mn,o=ir.transition;ir.transition=null;try{Mn=4,lr(e,t,n,r)}finally{Mn=i,ir.transition=o}}function lr(e,t,n,r){if(or){var i=cr(e,t,n,r);if(null===i)io(e,t,r,ur,n),Jn(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Wn=Qn(Wn,e,t,n,r,i),!0;case"dragenter":return Hn=Qn(Hn,e,t,n,r,i),!0;case"mouseover":return qn=Qn(qn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Kn.set(o,Qn(Kn.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,$n.set(o,Qn($n.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Jn(e,r),4&t&&-1<Yn.indexOf(e)){for(;null!==i;){var o=Mo(i);if(null!==o&&In(o),null===(o=cr(e,t,n,r))&&io(e,t,r,ur,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else io(e,t,r,null,n)}}var ur=null;function cr(e,t,n,r){if(ur=null,null!==(e=Lo(e=Dt(r))))if(null===(t=nn(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=rn(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ur=e,null}function dr(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(fn()){case pn:return 1;case mn:return 4;case gn:case yn:return 16;case vn:return 536870912;default:return 16}default:return 16}}var hr=null,fr=null,pr=null;function mr(){if(pr)return pr;var e,t,n=fr,r=n.length,i="value"in hr?hr.value:hr.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return pr=i.slice(e,1<t?1-t:void 0)}function gr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function yr(){return!0}function vr(){return!1}function br(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?yr:vr,this.isPropagationStopped=vr,this}return Qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=yr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=yr)},persist:function(){},isPersistent:yr}),t}var wr,kr,Sr,xr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_r=br(xr),Tr=Qe({},xr,{view:0,detail:0}),Er=br(Tr),Pr=Qe({},Tr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Sr&&(Sr&&"mousemove"===e.type?(wr=e.screenX-Sr.screenX,kr=e.screenY-Sr.screenY):kr=wr=0,Sr=e),wr)},movementY:function(e){return"movementY"in e?e.movementY:kr}}),Cr=br(Pr),Ar=br(Qe({},Pr,{dataTransfer:0})),Or=br(Qe({},Tr,{relatedTarget:0})),Rr=br(Qe({},xr,{animationName:0,elapsedTime:0,pseudoElement:0})),jr=Qe({},xr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lr=br(jr),Mr=br(Qe({},xr,{data:0})),Dr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ir={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Nr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ur(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Nr[e])&&!!t[e]}function Fr(){return Ur}var Vr=Qe({},Tr,{key:function(e){if(e.key){var t=Dr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=gr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Ir[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fr,charCode:function(e){return"keypress"===e.type?gr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?gr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),zr=br(Vr),Br=br(Qe({},Pr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wr=br(Qe({},Tr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fr})),Hr=br(Qe({},xr,{propertyName:0,elapsedTime:0,pseudoElement:0})),qr=Qe({},Pr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kr=br(qr),$r=[9,13,27,32],Gr=_e&&"CompositionEvent"in window,Yr=null;_e&&"documentMode"in document&&(Yr=document.documentMode);var Jr=_e&&"TextEvent"in window&&!Yr,Qr=_e&&(!Gr||Yr&&8<Yr&&11>=Yr),Xr=String.fromCharCode(32),Zr=!1;function ei(e,t){switch(e){case"keyup":return-1!==$r.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ti(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ni=!1;var ri={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ii(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ri[e.type]:"textarea"===t}function oi(e,t,n,r){Vt(r),0<(t=so(t,"onChange")).length&&(n=new _r("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var si=null,ai=null;function li(e){Xi(e,0)}function ui(e){if(at(Do(e)))return e}function ci(e,t){if("change"===e)return t}var di=!1;if(_e){var hi;if(_e){var fi="oninput"in document;if(!fi){var pi=document.createElement("div");pi.setAttribute("oninput","return;"),fi="function"==typeof pi.oninput}hi=fi}else hi=!1;di=hi&&(!document.documentMode||9<document.documentMode)}function mi(){si&&(si.detachEvent("onpropertychange",gi),ai=si=null)}function gi(e){if("value"===e.propertyName&&ui(ai)){var t=[];oi(t,ai,e,Dt(e)),qt(li,t)}}function yi(e,t,n){"focusin"===e?(mi(),ai=n,(si=t).attachEvent("onpropertychange",gi)):"focusout"===e&&mi()}function vi(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return ui(ai)}function bi(e,t){if("click"===e)return ui(t)}function wi(e,t){if("input"===e||"change"===e)return ui(t)}var ki="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function Si(e,t){if(ki(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Te.call(t,i)||!ki(e[i],t[i]))return!1}return!0}function xi(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _i(e,t){var n,r=xi(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=xi(r)}}function Ti(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?Ti(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function Ei(){for(var e=window,t=lt();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=lt((e=t.contentWindow).document)}return t}function Pi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function Ci(e){var t=Ei(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ti(n.ownerDocument.documentElement,n)){if(null!==r&&Pi(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_i(n,o);var s=_i(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>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;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ai=_e&&"documentMode"in document&&11>=document.documentMode,Oi=null,Ri=null,ji=null,Li=!1;function Mi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Li||null==Oi||Oi!==lt(r)||("selectionStart"in(r=Oi)&&Pi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},ji&&Si(ji,r)||(ji=r,0<(r=so(Ri,"onSelect")).length&&(t=new _r("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Oi)))}function Di(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ii={animationend:Di("Animation","AnimationEnd"),animationiteration:Di("Animation","AnimationIteration"),animationstart:Di("Animation","AnimationStart"),transitionend:Di("Transition","TransitionEnd")},Ni={},Ui={};function Fi(e){if(Ni[e])return Ni[e];if(!Ii[e])return e;var t,n=Ii[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ui)return Ni[e]=n[t];return e}_e&&(Ui=document.createElement("div").style,"AnimationEvent"in window||(delete Ii.animationend.animation,delete Ii.animationiteration.animation,delete Ii.animationstart.animation),"TransitionEvent"in window||delete Ii.transitionend.transition);var Vi=Fi("animationend"),zi=Fi("animationiteration"),Bi=Fi("animationstart"),Wi=Fi("transitionend"),Hi=new Map,qi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ki(e,t){Hi.set(e,t),Se(t,[e])}for(var $i=0;$i<qi.length;$i++){var Gi=qi[$i];Ki(Gi.toLowerCase(),"on"+(Gi[0].toUpperCase()+Gi.slice(1)))}Ki(Vi,"onAnimationEnd"),Ki(zi,"onAnimationIteration"),Ki(Bi,"onAnimationStart"),Ki("dblclick","onDoubleClick"),Ki("focusin","onFocus"),Ki("focusout","onBlur"),Ki(Wi,"onTransitionEnd"),xe("onMouseEnter",["mouseout","mouseover"]),xe("onMouseLeave",["mouseout","mouseover"]),xe("onPointerEnter",["pointerout","pointerover"]),xe("onPointerLeave",["pointerout","pointerover"]),Se("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Se("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Se("onBeforeInput",["compositionend","keypress","textInput","paste"]),Se("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Se("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Se("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ji=new Set("cancel close invalid load scroll toggle".split(" ").concat(Yi));function Qi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,a,l){if(tn.apply(this,arguments),Jt){if(!Jt)throw Error(be(198));var u=Qt;Jt=!1,Qt=null,Xt||(Xt=!0,Zt=u)}}(r,t,void 0,e),e.currentTarget=null}function Xi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;Qi(i,a,u),o=l}else for(s=0;s<r.length;s++){if(l=(a=r[s]).instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;Qi(i,a,u),o=l}}}if(Xt)throw e=Zt,Xt=!1,Zt=null,e}function Zi(e,t){var n=t[Oo];void 0===n&&(n=t[Oo]=new Set);var r=e+"__bubble";n.has(r)||(ro(t,e,2,!1),n.add(r))}function eo(e,t,n){var r=0;t&&(r|=4),ro(n,e,r,t)}var to="_reactListening"+Math.random().toString(36).slice(2);function no(e){if(!e[to]){e[to]=!0,we.forEach(function(t){"selectionchange"!==t&&(Ji.has(t)||eo(t,!1,e),eo(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[to]||(t[to]=!0,eo("selectionchange",!1,t))}}function ro(e,t,n,r){switch(dr(t)){case 1:var i=sr;break;case 4:i=ar;break;default:i=lr}n=i.bind(null,t,n,e),i=void 0,!$t||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function io(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i||8===a.nodeType&&a.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==a;){if(null===(s=Lo(a)))return;if(5===(l=s.tag)||6===l){r=o=s;continue e}a=a.parentNode}}r=r.return}qt(function(){var r=o,i=Dt(n),s=[];e:{var a=Hi.get(e);if(void 0!==a){var l=_r,u=e;switch(e){case"keypress":if(0===gr(n))break e;case"keydown":case"keyup":l=zr;break;case"focusin":u="focus",l=Or;break;case"focusout":u="blur",l=Or;break;case"beforeblur":case"afterblur":l=Or;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=Cr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=Ar;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Wr;break;case Vi:case zi:case Bi:l=Rr;break;case Wi:l=Hr;break;case"scroll":l=Er;break;case"wheel":l=Kr;break;case"copy":case"cut":case"paste":l=Lr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Br}var c=!!(4&t),d=!c&&"scroll"===e,h=c?null!==a?a+"Capture":null:a;c=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&(null!=(m=Kt(p,h))&&c.push(oo(p,m,f)))),d)break;p=p.return}0<c.length&&(a=new l(a,u,null,n,i),s.push({event:a,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===Mt||!(u=n.relatedTarget||n.fromElement)||!Lo(u)&&!u[Ao])&&(l||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Lo(u):null)&&(u!==(d=nn(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=Cr,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Br,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?a:Do(l),f=null==u?a:Do(u),(a=new c(m,p+"leave",l,n,i)).target=d,a.relatedTarget=f,m=null,Lo(i)===r&&((c=new c(h,p+"enter",u,n,i)).target=f,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(h=u,p=0,f=c=l;f;f=ao(f))p++;for(f=0,m=h;m;m=ao(m))f++;for(;0<p-f;)c=ao(c),p--;for(;0<f-p;)h=ao(h),f--;for(;p--;){if(c===h||null!==h&&c===h.alternate)break e;c=ao(c),h=ao(h)}c=null}else c=null;null!==l&&lo(s,a,l,c,!1),null!==u&&null!==d&&lo(s,d,u,c,!0)}if("select"===(l=(a=r?Do(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===l&&"file"===a.type)var g=ci;else if(ii(a))if(di)g=wi;else{g=vi;var y=yi}else(l=a.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===a.type||"radio"===a.type)&&(g=bi);switch(g&&(g=g(e,r))?oi(s,g,n,i):(y&&y(e,a,r),"focusout"===e&&(y=a._wrapperState)&&y.controlled&&"number"===a.type&&pt(a,"number",a.value)),y=r?Do(r):window,e){case"focusin":(ii(y)||"true"===y.contentEditable)&&(Oi=y,Ri=r,ji=null);break;case"focusout":ji=Ri=Oi=null;break;case"mousedown":Li=!0;break;case"contextmenu":case"mouseup":case"dragend":Li=!1,Mi(s,n,i);break;case"selectionchange":if(Ai)break;case"keydown":case"keyup":Mi(s,n,i)}var v;if(Gr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else ni?ei(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Qr&&"ko"!==n.locale&&(ni||"onCompositionStart"!==b?"onCompositionEnd"===b&&ni&&(v=mr()):(fr="value"in(hr=i)?hr.value:hr.textContent,ni=!0)),0<(y=so(r,b)).length&&(b=new Mr(b,e,null,n,i),s.push({event:b,listeners:y}),v?b.data=v:null!==(v=ti(n))&&(b.data=v))),(v=Jr?function(e,t){switch(e){case"compositionend":return ti(t);case"keypress":return 32!==t.which?null:(Zr=!0,Xr);case"textInput":return(e=t.data)===Xr&&Zr?null:e;default:return null}}(e,n):function(e,t){if(ni)return"compositionend"===e||!Gr&&ei(e,t)?(e=mr(),pr=fr=hr=null,ni=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Qr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=so(r,"onBeforeInput")).length&&(i=new Mr("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=v))}Xi(s,t)})}function oo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function so(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Kt(e,n))&&r.unshift(oo(e,o,i)),null!=(o=Kt(e,t))&&r.push(oo(e,o,i))),e=e.return}return r}function ao(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function lo(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(null!==l&&l===r)break;5===a.tag&&null!==u&&(a=u,i?null!=(l=Kt(n,o))&&s.unshift(oo(n,l,a)):i||null!=(l=Kt(n,o))&&s.push(oo(n,l,a))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var uo=/\r\n?/g,co=/\u0000|\uFFFD/g;function ho(e){return("string"==typeof e?e:""+e).replace(uo,"\n").replace(co,"")}function fo(e,t,n){if(t=ho(t),ho(e)!==t&&n)throw Error(be(425))}function po(){}var mo=null,go=null;function yo(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var vo="function"==typeof setTimeout?setTimeout:void 0,bo="function"==typeof clearTimeout?clearTimeout:void 0,wo="function"==typeof Promise?Promise:void 0,ko="function"==typeof queueMicrotask?queueMicrotask:void 0!==wo?function(e){return wo.resolve(null).then(e).catch(So)}:vo;function So(e){setTimeout(function(){throw e})}function xo(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void rr(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);rr(t)}function _o(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function To(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Eo=Math.random().toString(36).slice(2),Po="__reactFiber$"+Eo,Co="__reactProps$"+Eo,Ao="__reactContainer$"+Eo,Oo="__reactEvents$"+Eo,Ro="__reactListeners$"+Eo,jo="__reactHandles$"+Eo;function Lo(e){var t=e[Po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ao]||n[Po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=To(e);null!==e;){if(n=e[Po])return n;e=To(e)}return t}n=(e=n).parentNode}return null}function Mo(e){return!(e=e[Po]||e[Ao])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Do(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(be(33))}function Io(e){return e[Co]||null}var No=[],Uo=-1;function Fo(e){return{current:e}}function Vo(e){0>Uo||(e.current=No[Uo],No[Uo]=null,Uo--)}function zo(e,t){Uo++,No[Uo]=e.current,e.current=t}var Bo={},Wo=Fo(Bo),Ho=Fo(!1),qo=Bo;function Ko(e,t){var n=e.type.contextTypes;if(!n)return Bo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function $o(e){return null!=(e=e.childContextTypes)}function Go(){Vo(Ho),Vo(Wo)}function Yo(e,t,n){if(Wo.current!==Bo)throw Error(be(168));zo(Wo,t),zo(Ho,n)}function Jo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(be(108,rt(e)||"Unknown",i));return Qe({},n,r)}function Qo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bo,qo=Wo.current,zo(Wo,e),zo(Ho,Ho.current),!0}function Xo(e,t,n){var r=e.stateNode;if(!r)throw Error(be(169));n?(e=Jo(e,t,qo),r.__reactInternalMemoizedMergedChildContext=e,Vo(Ho),Vo(Wo),zo(Wo,e)):Vo(Ho),zo(Ho,n)}var Zo=null,es=!1,ts=!1;function ns(e){null===Zo?Zo=[e]:Zo.push(e)}function rs(){if(!ts&&null!==Zo){ts=!0;var e=0,t=Mn;try{var n=Zo;for(Mn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Zo=null,es=!1}catch(i){throw null!==Zo&&(Zo=Zo.slice(e+1)),ln(pn,rs),i}finally{Mn=t,ts=!1}}return null}var is=[],os=0,ss=null,as=0,ls=[],us=0,cs=null,ds=1,hs="";function fs(e,t){is[os++]=as,is[os++]=ss,ss=e,as=t}function ps(e,t,n){ls[us++]=ds,ls[us++]=hs,ls[us++]=cs,cs=e;var r=ds;e=hs;var i=32-kn(r)-1;r&=~(1<<i),n+=1;var o=32-kn(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,ds=1<<32-kn(t)+i|n<<i|r,hs=o+e}else ds=1<<o|n<<i|r,hs=e}function ms(e){null!==e.return&&(fs(e,1),ps(e,1,0))}function gs(e){for(;e===ss;)ss=is[--os],is[os]=null,as=is[--os],is[os]=null;for(;e===cs;)cs=ls[--us],ls[us]=null,hs=ls[--us],ls[us]=null,ds=ls[--us],ls[us]=null}var ys=null,vs=null,bs=!1,ws=null;function ks(e,t){var n=Hc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Ss(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ys=e,vs=_o(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ys=e,vs=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==cs?{id:ds,overflow:hs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Hc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ys=e,vs=null,!0);default:return!1}}function xs(e){return!(!(1&e.mode)||128&e.flags)}function _s(e){if(bs){var t=vs;if(t){var n=t;if(!Ss(e,t)){if(xs(e))throw Error(be(418));t=_o(n.nextSibling);var r=ys;t&&Ss(e,t)?ks(r,n):(e.flags=-4097&e.flags|2,bs=!1,ys=e)}}else{if(xs(e))throw Error(be(418));e.flags=-4097&e.flags|2,bs=!1,ys=e}}}function Ts(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ys=e}function Es(e){if(e!==ys)return!1;if(!bs)return Ts(e),bs=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!yo(e.type,e.memoizedProps)),t&&(t=vs)){if(xs(e))throw Ps(),Error(be(418));for(;t;)ks(e,t),t=_o(t.nextSibling)}if(Ts(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(be(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){vs=_o(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}vs=null}}else vs=ys?_o(e.stateNode.nextSibling):null;return!0}function Ps(){for(var e=vs;e;)e=_o(e.nextSibling)}function Cs(){vs=ys=null,bs=!1}function As(e){null===ws?ws=[e]:ws.push(e)}var Os=Me.ReactCurrentBatchConfig;function Rs(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(be(309));var r=n.stateNode}if(!r)throw Error(be(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(be(284));if(!n._owner)throw Error(be(290,e))}return e}function js(e,t){throw e=Object.prototype.toString.call(t),Error(be(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ls(e){return(0,e._init)(e._payload)}function Ms(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Kc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function a(e,t,n,r){return null===t||6!==t.tag?((t=Jc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===Ne?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Ke&&Ls(o)===t.type)?((r=i(t,n.props)).ref=Rs(e,t,n),r.return=e,r):((r=$c(n.type,n.key,n.props,null,e.mode,r)).ref=Rs(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Qc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function c(e,t,n,r,o){return null===t||7!==t.tag?((t=Gc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Jc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case De:return(n=$c(t.type,t.key,t.props,null,e.mode,n)).ref=Rs(e,null,t),n.return=e,n;case Ie:return(t=Qc(t,e.mode,n)).return=e,t;case Ke:return d(e,(0,t._init)(t._payload),n)}if(mt(t)||Ye(t))return(t=Gc(t,e.mode,n,null)).return=e,t;js(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:a(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case De:return n.key===i?l(e,t,n,r):null;case Ie:return n.key===i?u(e,t,n,r):null;case Ke:return h(e,t,(i=n._init)(n._payload),r)}if(mt(n)||Ye(n))return null!==i?null:c(e,t,n,r,null);js(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return a(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case De:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Ie:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Ke:return f(e,t,n,(0,r._init)(r._payload),i)}if(mt(r)||Ye(r))return c(t,e=e.get(n)||null,r,i,null);js(t,r)}return null}return function a(l,u,c,p){if("object"==typeof c&&null!==c&&c.type===Ne&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case De:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Ne){if(7===g.tag){n(l,g.sibling),(u=i(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Ke&&Ls(m)===g.type){n(l,g.sibling),(u=i(g,c.props)).ref=Rs(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Ne?((u=Gc(c.props.children,l.mode,p,c.key)).return=l,l=u):((p=$c(c.type,c.key,c.props,null,l.mode,p)).ref=Rs(l,u,c),p.return=l,l=p)}return s(l);case Ie:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=i(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=Qc(c,l.mode,p)).return=l,l=u}return s(l);case Ke:return a(l,u,(g=c._init)(c._payload),p)}if(mt(c))return function(i,s,a,l){for(var u=null,c=null,p=s,m=s=0,g=null;null!==p&&m<a.length;m++){p.index>m?(g=p,p=null):g=p.sibling;var y=h(i,p,a[m],l);if(null===y){null===p&&(p=g);break}e&&p&&null===y.alternate&&t(i,p),s=o(y,s,m),null===c?u=y:c.sibling=y,c=y,p=g}if(m===a.length)return n(i,p),bs&&fs(i,m),u;if(null===p){for(;m<a.length;m++)null!==(p=d(i,a[m],l))&&(s=o(p,s,m),null===c?u=p:c.sibling=p,c=p);return bs&&fs(i,m),u}for(p=r(i,p);m<a.length;m++)null!==(g=f(p,i,m,a[m],l))&&(e&&null!==g.alternate&&p.delete(null===g.key?m:g.key),s=o(g,s,m),null===c?u=g:c.sibling=g,c=g);return e&&p.forEach(function(e){return t(i,e)}),bs&&fs(i,m),u}(l,u,c,p);if(Ye(c))return function(i,s,a,l){var u=Ye(a);if("function"!=typeof u)throw Error(be(150));if(null==(a=u.call(a)))throw Error(be(151));for(var c=u=null,p=s,m=s=0,g=null,y=a.next();null!==p&&!y.done;m++,y=a.next()){p.index>m?(g=p,p=null):g=p.sibling;var v=h(i,p,y.value,l);if(null===v){null===p&&(p=g);break}e&&p&&null===v.alternate&&t(i,p),s=o(v,s,m),null===c?u=v:c.sibling=v,c=v,p=g}if(y.done)return n(i,p),bs&&fs(i,m),u;if(null===p){for(;!y.done;m++,y=a.next())null!==(y=d(i,y.value,l))&&(s=o(y,s,m),null===c?u=y:c.sibling=y,c=y);return bs&&fs(i,m),u}for(p=r(i,p);!y.done;m++,y=a.next())null!==(y=f(p,i,m,y.value,l))&&(e&&null!==y.alternate&&p.delete(null===y.key?m:y.key),s=o(y,s,m),null===c?u=y:c.sibling=y,c=y);return e&&p.forEach(function(e){return t(i,e)}),bs&&fs(i,m),u}(l,u,c,p);js(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=i(u,c)).return=l,l=u):(n(l,u),(u=Jc(c,l.mode,p)).return=l,l=u),s(l)):n(l,u)}}var Ds=Ms(!0),Is=Ms(!1),Ns=Fo(null),Us=null,Fs=null,Vs=null;function zs(){Vs=Fs=Us=null}function Bs(e){var t=Ns.current;Vo(Ns),e._currentValue=t}function Ws(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Hs(e,t){Us=e,Vs=Fs=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(jl=!0),e.firstContext=null)}function qs(e){var t=e._currentValue;if(Vs!==e)if(e={context:e,memoizedValue:t,next:null},null===Fs){if(null===Us)throw Error(be(308));Fs=e,Us.dependencies={lanes:0,firstContext:e}}else Fs=Fs.next=e;return t}var Ks=null;function $s(e){null===Ks?Ks=[e]:Ks.push(e)}function Gs(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,$s(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ys(e,r)}function Ys(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Js=!1;function Qs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xs(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 Zs(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ea(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&zu){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ys(e,n)}return null===(i=r.interleaved)?(t.next=t,$s(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ys(e,n)}function ta(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ln(e,n)}}function na(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ra(e,t,n,r){var i=e.updateQueue;Js=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var l=a,u=l.next;l.next=null,null===s?o=u:s.next=u,s=l;var c=e.alternate;null!==c&&((a=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===a?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(s=0,c=u=l=null,a=o;;){var h=a.lane,f=a.eventTime;if((r&h)===h){null!==c&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=Qe({},d,h);break e;case 2:Js=!0}}null!==a.callback&&0!==a.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[a]:h.push(a))}else f={eventTime:f,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===c?(u=c=f,l=d):c=c.next=f,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(h=a).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===c&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Yu|=s,e.lanes=s,e.memoizedState=d}}function ia(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(be(191,i));i.call(r)}}}var oa={},sa=Fo(oa),aa=Fo(oa),la=Fo(oa);function ua(e){if(e===oa)throw Error(be(174));return e}function ca(e,t){switch(zo(la,t),zo(aa,e),zo(sa,oa),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:St(null,"");break;default:t=St(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Vo(sa),zo(sa,t)}function da(){Vo(sa),Vo(aa),Vo(la)}function ha(e){ua(la.current);var t=ua(sa.current),n=St(t,e.type);t!==n&&(zo(aa,e),zo(sa,n))}function fa(e){aa.current===e&&(Vo(sa),Vo(aa))}var pa=Fo(0);function ma(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ga=[];function ya(){for(var e=0;e<ga.length;e++)ga[e]._workInProgressVersionPrimary=null;ga.length=0}var va=Me.ReactCurrentDispatcher,ba=Me.ReactCurrentBatchConfig,wa=0,ka=null,Sa=null,xa=null,_a=!1,Ta=!1,Ea=0,Pa=0;function Ca(){throw Error(be(321))}function Aa(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ki(e[n],t[n]))return!1;return!0}function Oa(e,t,n,r,i,o){if(wa=o,ka=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,va.current=null===e||null===e.memoizedState?fl:pl,e=n(r,i),Ta){o=0;do{if(Ta=!1,Ea=0,25<=o)throw Error(be(301));o+=1,xa=Sa=null,t.updateQueue=null,va.current=ml,e=n(r,i)}while(Ta)}if(va.current=hl,t=null!==Sa&&null!==Sa.next,wa=0,xa=Sa=ka=null,_a=!1,t)throw Error(be(300));return e}function Ra(){var e=0!==Ea;return Ea=0,e}function ja(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===xa?ka.memoizedState=xa=e:xa=xa.next=e,xa}function La(){if(null===Sa){var e=ka.alternate;e=null!==e?e.memoizedState:null}else e=Sa.next;var t=null===xa?ka.memoizedState:xa.next;if(null!==t)xa=t,Sa=e;else{if(null===e)throw Error(be(310));e={memoizedState:(Sa=e).memoizedState,baseState:Sa.baseState,baseQueue:Sa.baseQueue,queue:Sa.queue,next:null},null===xa?ka.memoizedState=xa=e:xa=xa.next=e}return xa}function Ma(e,t){return"function"==typeof t?t(e):t}function Da(e){var t=La(),n=t.queue;if(null===n)throw Error(be(311));n.lastRenderedReducer=e;var r=Sa,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var a=s=null,l=null,u=o;do{var c=u.lane;if((wa&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(a=l=d,s=r):l=l.next=d,ka.lanes|=c,Yu|=c}u=u.next}while(null!==u&&u!==o);null===l?s=r:l.next=a,ki(r,t.memoizedState)||(jl=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,ka.lanes|=o,Yu|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ia(e){var t=La(),n=t.queue;if(null===n)throw Error(be(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);ki(o,t.memoizedState)||(jl=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Na(){}function Ua(e,t){var n=ka,r=La(),i=t(),o=!ki(r.memoizedState,i);if(o&&(r.memoizedState=i,jl=!0),r=r.queue,Ja(za.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==xa&&1&xa.memoizedState.tag){if(n.flags|=2048,qa(9,Va.bind(null,n,r,i,t),void 0,null),null===Bu)throw Error(be(349));30&wa||Fa(n,t,i)}return i}function Fa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ka.updateQueue)?(t={lastEffect:null,stores:null},ka.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Va(e,t,n,r){t.value=n,t.getSnapshot=r,Ba(t)&&Wa(e)}function za(e,t,n){return n(function(){Ba(t)&&Wa(e)})}function Ba(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ki(e,n)}catch(r){return!0}}function Wa(e){var t=Ys(e,1);null!==t&&mc(t,e,1,-1)}function Ha(e){var t=ja();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ma,lastRenderedState:e},t.queue=e,e=e.dispatch=ll.bind(null,ka,e),[t.memoizedState,e]}function qa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ka.updateQueue)?(t={lastEffect:null,stores:null},ka.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ka(){return La().memoizedState}function $a(e,t,n,r){var i=ja();ka.flags|=e,i.memoizedState=qa(1|t,n,void 0,void 0===r?null:r)}function Ga(e,t,n,r){var i=La();r=void 0===r?null:r;var o=void 0;if(null!==Sa){var s=Sa.memoizedState;if(o=s.destroy,null!==r&&Aa(r,s.deps))return void(i.memoizedState=qa(t,n,o,r))}ka.flags|=e,i.memoizedState=qa(1|t,n,o,r)}function Ya(e,t){return $a(8390656,8,e,t)}function Ja(e,t){return Ga(2048,8,e,t)}function Qa(e,t){return Ga(4,2,e,t)}function Xa(e,t){return Ga(4,4,e,t)}function Za(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function el(e,t,n){return n=null!=n?n.concat([e]):null,Ga(4,4,Za.bind(null,t,e),n)}function tl(){}function nl(e,t){var n=La();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Aa(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function rl(e,t){var n=La();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Aa(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function il(e,t,n){return 21&wa?(ki(n,t)||(n=On(),ka.lanes|=n,Yu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,jl=!0),e.memoizedState=n)}function ol(e,t){var n=Mn;Mn=0!==n&&4>n?n:4,e(!0);var r=ba.transition;ba.transition={};try{e(!1),t()}finally{Mn=n,ba.transition=r}}function sl(){return La().memoizedState}function al(e,t,n){var r=pc(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ul(e))cl(t,n);else if(null!==(n=Gs(e,t,n,r))){mc(n,e,r,fc()),dl(n,t,r)}}function ll(e,t,n){var r=pc(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ul(e))cl(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,ki(a,s)){var l=t.interleaved;return null===l?(i.next=i,$s(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(u){}null!==(n=Gs(e,t,i,r))&&(mc(n,e,r,i=fc()),dl(n,t,r))}}function ul(e){var t=e.alternate;return e===ka||null!==t&&t===ka}function cl(e,t){Ta=_a=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ln(e,n)}}var hl={readContext:qs,useCallback:Ca,useContext:Ca,useEffect:Ca,useImperativeHandle:Ca,useInsertionEffect:Ca,useLayoutEffect:Ca,useMemo:Ca,useReducer:Ca,useRef:Ca,useState:Ca,useDebugValue:Ca,useDeferredValue:Ca,useTransition:Ca,useMutableSource:Ca,useSyncExternalStore:Ca,useId:Ca,unstable_isNewReconciler:!1},fl={readContext:qs,useCallback:function(e,t){return ja().memoizedState=[e,void 0===t?null:t],e},useContext:qs,useEffect:Ya,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,$a(4194308,4,Za.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $a(4194308,4,e,t)},useInsertionEffect:function(e,t){return $a(4,2,e,t)},useMemo:function(e,t){var n=ja();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ja();return t=void 0!==n?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=al.bind(null,ka,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ja().memoizedState=e},useState:Ha,useDebugValue:tl,useDeferredValue:function(e){return ja().memoizedState=e},useTransition:function(){var e=Ha(!1),t=e[0];return e=ol.bind(null,e[1]),ja().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ka,i=ja();if(bs){if(void 0===n)throw Error(be(407));n=n()}else{if(n=t(),null===Bu)throw Error(be(349));30&wa||Fa(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ya(za.bind(null,r,o,e),[e]),r.flags|=2048,qa(9,Va.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=ja(),t=Bu.identifierPrefix;if(bs){var n=hs;t=":"+t+"R"+(n=(ds&~(1<<32-kn(ds)-1)).toString(32)+n),0<(n=Ea++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pl={readContext:qs,useCallback:nl,useContext:qs,useEffect:Ja,useImperativeHandle:el,useInsertionEffect:Qa,useLayoutEffect:Xa,useMemo:rl,useReducer:Da,useRef:Ka,useState:function(){return Da(Ma)},useDebugValue:tl,useDeferredValue:function(e){return il(La(),Sa.memoizedState,e)},useTransition:function(){return[Da(Ma)[0],La().memoizedState]},useMutableSource:Na,useSyncExternalStore:Ua,useId:sl,unstable_isNewReconciler:!1},ml={readContext:qs,useCallback:nl,useContext:qs,useEffect:Ja,useImperativeHandle:el,useInsertionEffect:Qa,useLayoutEffect:Xa,useMemo:rl,useReducer:Ia,useRef:Ka,useState:function(){return Ia(Ma)},useDebugValue:tl,useDeferredValue:function(e){var t=La();return null===Sa?t.memoizedState=e:il(t,Sa.memoizedState,e)},useTransition:function(){return[Ia(Ma)[0],La().memoizedState]},useMutableSource:Na,useSyncExternalStore:Ua,useId:sl,unstable_isNewReconciler:!1};function gl(e,t){if(e&&e.defaultProps){for(var n in t=Qe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function yl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Qe({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var vl={isMounted:function(e){return!!(e=e._reactInternals)&&nn(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fc(),i=pc(e),o=Zs(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=ea(e,o,i))&&(mc(t,e,i,r),ta(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fc(),i=pc(e),o=Zs(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=ea(e,o,i))&&(mc(t,e,i,r),ta(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fc(),r=pc(e),i=Zs(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=ea(e,i,r))&&(mc(t,e,r,n),ta(t,e,r))}};function bl(e,t,n,r,i,o,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!Si(n,r)||!Si(i,o))}function wl(e,t,n){var r=!1,i=Bo,o=t.contextType;return"object"==typeof o&&null!==o?o=qs(o):(i=$o(t)?qo:Wo.current,o=(r=null!=(r=t.contextTypes))?Ko(e,i):Bo),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=vl,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function kl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vl.enqueueReplaceState(t,t.state,null)}function Sl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Qs(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=qs(o):(o=$o(t)?qo:Wo.current,i.context=Ko(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(yl(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&vl.enqueueReplaceState(i,i.state,null),ra(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function xl(e,t){try{var n="",r=t;do{n+=tt(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function _l(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var Tl="function"==typeof WeakMap?WeakMap:Map;function El(e,t,n){(n=Zs(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rc||(rc=!0,ic=r)},n}function Pl(e,t,n){(n=Zs(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===oc?oc=new Set([this]):oc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Cl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Tl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Uc.bind(null,e,t,n),t.then(e,e))}function Al(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ol(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Zs(-1,1)).tag=2,ea(n,t,1))),n.lanes|=1),e)}var Rl=Me.ReactCurrentOwner,jl=!1;function Ll(e,t,n,r){t.child=null===e?Is(t,null,n,r):Ds(t,e.child,n,r)}function Ml(e,t,n,r,i){n=n.render;var o=t.ref;return Hs(t,i),r=Oa(e,t,n,r,o,i),n=Ra(),null===e||jl?(bs&&n&&ms(t),t.flags|=1,Ll(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ru(e,t,i))}function Dl(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||qc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=$c(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Il(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:Si)(s,r)&&e.ref===t.ref)return ru(e,t,i)}return t.flags|=1,(e=Kc(o,r)).ref=t.ref,e.return=t,t.child=e}function Il(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Si(o,r)&&e.ref===t.ref){if(jl=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,ru(e,t,i);131072&e.flags&&(jl=!0)}}return Fl(e,t,n,r,i)}function Nl(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,zo(Ku,qu),qu|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,zo(Ku,qu),qu|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},zo(Ku,qu),qu|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,zo(Ku,qu),qu|=r;return Ll(e,t,i,n),t.child}function Ul(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Fl(e,t,n,r,i){var o=$o(n)?qo:Wo.current;return o=Ko(t,o),Hs(t,i),n=Oa(e,t,n,r,o,i),r=Ra(),null===e||jl?(bs&&r&&ms(t),t.flags|=1,Ll(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ru(e,t,i))}function Vl(e,t,n,r,i){if($o(n)){var o=!0;Qo(t)}else o=!1;if(Hs(t,i),null===t.stateNode)nu(e,t),wl(t,n,r),Sl(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;"object"==typeof u&&null!==u?u=qs(u):u=Ko(t,u=$o(n)?qo:Wo.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==u)&&kl(t,s,r,u),Js=!1;var h=t.memoizedState;s.state=h,ra(t,r,s,i),l=t.memoizedState,a!==r||h!==l||Ho.current||Js?("function"==typeof c&&(yl(t,n,c,r),l=t.memoizedState),(a=Js||bl(t,n,a,r,h,l,u))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,Xs(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:gl(t.type,a),s.props=u,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=qs(l):l=Ko(t,l=$o(n)?qo:Wo.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&kl(t,s,r,l),Js=!1,h=t.memoizedState,s.state=h,ra(t,r,s,i);var p=t.memoizedState;a!==d||h!==p||Ho.current||Js?("function"==typeof f&&(yl(t,n,f,r),p=t.memoizedState),(u=Js||bl(t,n,u,r,h,p,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return zl(e,t,n,r,o,i)}function zl(e,t,n,r,i,o){Ul(e,t);var s=!!(128&t.flags);if(!r&&!s)return i&&Xo(t,n,!1),ru(e,t,o);r=t.stateNode,Rl.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=Ds(t,e.child,null,o),t.child=Ds(t,null,a,o)):Ll(e,t,a,o),t.memoizedState=r.state,i&&Xo(t,n,!0),t.child}function Bl(e){var t=e.stateNode;t.pendingContext?Yo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Yo(0,t.context,!1),ca(e,t.containerInfo)}function Wl(e,t,n,r,i){return Cs(),As(i),t.flags|=256,Ll(e,t,n,r),t.child}var Hl,ql,Kl,$l,Gl={dehydrated:null,treeContext:null,retryLane:0};function Yl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Jl(e,t,n){var r,i=t.pendingProps,o=pa.current,s=!1,a=!!(128&t.flags);if((r=a)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),zo(pa,1&o),null===e)return _s(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=i.children,e=i.fallback,s?(i=t.mode,s=t.child,a={mode:"hidden",children:a},1&i||null===s?s=Yc(a,i,0,null):(s.childLanes=0,s.pendingProps=a),e=Gc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Yl(n),t.memoizedState=Gl,e):Ql(t,a));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Xl(e,t,s,r=_l(Error(be(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Yc({mode:"visible",children:r.children},i,0,null),(o=Gc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&Ds(t,e.child,null,s),t.child.memoizedState=Yl(s),t.memoizedState=Gl,o);if(!(1&t.mode))return Xl(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var a=r.dgst;return r=a,Xl(e,t,s,r=_l(o=Error(be(419)),r,void 0))}if(a=0!==(s&e.childLanes),jl||a){if(null!==(r=Bu)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ys(e,i),mc(r,e,i,-1))}return Cc(),Xl(e,t,s,r=_l(Error(be(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Vc.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,vs=_o(i.nextSibling),ys=t,bs=!0,ws=null,null!==e&&(ls[us++]=ds,ls[us++]=hs,ls[us++]=cs,ds=e.id,hs=e.overflow,cs=t),t=Ql(t,r.children),t.flags|=4096,t)}(e,t,a,i,r,o,n);if(s){s=i.fallback,a=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&a||t.child===o?(i=Kc(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?s=Kc(r,s):(s=Gc(s,a,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,a=null===(a=e.child.memoizedState)?Yl(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Gl,i}return e=(s=e.child).sibling,i=Kc(s,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ql(e,t){return(t=Yc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Xl(e,t,n,r){return null!==r&&As(r),Ds(t,e.child,null,n),(e=Ql(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Zl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ws(e.return,t,n)}function eu(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function tu(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ll(e,t,r.children,n),2&(r=pa.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Zl(e,n,t);else if(19===e.tag)Zl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(zo(pa,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ma(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),eu(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ma(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}eu(t,!0,n,null,o);break;case"together":eu(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function nu(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ru(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Yu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(be(153));if(null!==t.child){for(n=Kc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Kc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function iu(e,t){if(!bs)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ou(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function su(e,t,n){var r=t.pendingProps;switch(gs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ou(t),null;case 1:case 17:return $o(t.type)&&Go(),ou(t),null;case 3:return r=t.stateNode,da(),Vo(Ho),Vo(Wo),ya(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Es(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ws&&(bc(ws),ws=null))),ql(e,t),ou(t),null;case 5:fa(t);var i=ua(la.current);if(n=t.type,null!==e&&null!=t.stateNode)Kl(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(be(166));return ou(t),null}if(e=ua(sa.current),Es(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Po]=t,r[Co]=o,e=!!(1&t.mode),n){case"dialog":Zi("cancel",r),Zi("close",r);break;case"iframe":case"object":case"embed":Zi("load",r);break;case"video":case"audio":for(i=0;i<Yi.length;i++)Zi(Yi[i],r);break;case"source":Zi("error",r);break;case"img":case"image":case"link":Zi("error",r),Zi("load",r);break;case"details":Zi("toggle",r);break;case"input":ct(r,o),Zi("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Zi("invalid",r);break;case"textarea":vt(r,o),Zi("invalid",r)}for(var s in jt(n,o),i=null,o)if(o.hasOwnProperty(s)){var a=o[s];"children"===s?"string"==typeof a?r.textContent!==a&&(!0!==o.suppressHydrationWarning&&fo(r.textContent,a,e),i=["children",a]):"number"==typeof a&&r.textContent!==""+a&&(!0!==o.suppressHydrationWarning&&fo(r.textContent,a,e),i=["children",""+a]):ke.hasOwnProperty(s)&&null!=a&&"onScroll"===s&&Zi("scroll",r)}switch(n){case"input":st(r),ft(r,o,!0);break;case"textarea":st(r),wt(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=po)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{s=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=kt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Po]=t,e[Co]=r,Hl(e,t,!1,!1),t.stateNode=e;e:{switch(s=Lt(n,r),n){case"dialog":Zi("cancel",e),Zi("close",e),i=r;break;case"iframe":case"object":case"embed":Zi("load",e),i=r;break;case"video":case"audio":for(i=0;i<Yi.length;i++)Zi(Yi[i],e);i=r;break;case"source":Zi("error",e),i=r;break;case"img":case"image":case"link":Zi("error",e),Zi("load",e),i=r;break;case"details":Zi("toggle",e),i=r;break;case"input":ct(e,r),i=ut(e,r),Zi("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Qe({},r,{value:void 0}),Zi("invalid",e);break;case"textarea":vt(e,r),i=yt(e,r),Zi("invalid",e)}for(o in jt(n,i),a=i)if(a.hasOwnProperty(o)){var l=a[o];"style"===o?Ot(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&Tt(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&Et(e,l):"number"==typeof l&&Et(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(ke.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Zi("scroll",e):null!=l&&Le(e,o,l,s))}switch(n){case"input":st(e),ft(e,r,!1);break;case"textarea":st(e),wt(e);break;case"option":null!=r.value&&e.setAttribute("value",""+it(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?gt(e,!!r.multiple,o,!1):null!=r.defaultValue&>(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=po)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ou(t),null;case 6:if(e&&null!=t.stateNode)$l(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(be(166));if(n=ua(la.current),ua(sa.current),Es(t)){if(r=t.stateNode,n=t.memoizedProps,r[Po]=t,(o=r.nodeValue!==n)&&null!==(e=ys))switch(e.tag){case 3:fo(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&fo(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Po]=t,t.stateNode=r}return ou(t),null;case 13:if(Vo(pa),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(bs&&null!==vs&&1&t.mode&&!(128&t.flags))Ps(),Cs(),t.flags|=98560,o=!1;else if(o=Es(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(be(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(be(317));o[Po]=t}else Cs(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;ou(t),o=!1}else null!==ws&&(bc(ws),ws=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&pa.current?0===$u&&($u=3):Cc())),null!==t.updateQueue&&(t.flags|=4),ou(t),null);case 4:return da(),ql(e,t),null===e&&no(t.stateNode.containerInfo),ou(t),null;case 10:return Bs(t.type._context),ou(t),null;case 19:if(Vo(pa),null===(o=t.memoizedState))return ou(t),null;if(r=!!(128&t.flags),null===(s=o.rendering))if(r)iu(o,!1);else{if(0!==$u||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(s=ma(e))){for(t.flags|=128,iu(o,!1),null!==(r=s.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(s=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return zo(pa,1&pa.current|2),t.child}e=e.sibling}null!==o.tail&&hn()>tc&&(t.flags|=128,r=!0,iu(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ma(s))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),iu(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!bs)return ou(t),null}else 2*hn()-o.renderingStartTime>tc&&1073741824!==n&&(t.flags|=128,r=!0,iu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=o.last)?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=hn(),t.sibling=null,n=pa.current,zo(pa,r?1&n|2:1&n),t):(ou(t),null);case 22:case 23:return _c(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&qu)&&(ou(t),6&t.subtreeFlags&&(t.flags|=8192)):ou(t),null;case 24:case 25:return null}throw Error(be(156,t.tag))}function au(e,t){switch(gs(t),t.tag){case 1:return $o(t.type)&&Go(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return da(),Vo(Ho),Vo(Wo),ya(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return fa(t),null;case 13:if(Vo(pa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(be(340));Cs()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Vo(pa),null;case 4:return da(),null;case 10:return Bs(t.type._context),null;case 22:case 23:return _c(),null;default:return null}}Hl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ql=function(){},Kl=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ua(sa.current);var o,s=null;switch(n){case"input":i=ut(e,i),r=ut(e,r),s=[];break;case"select":i=Qe({},i,{value:void 0}),r=Qe({},r,{value:void 0}),s=[];break;case"textarea":i=yt(e,i),r=yt(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=po)}for(u in jt(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(ke.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(null!=l||null!=a))if("style"===u)if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,a=a?a.__html:void 0,null!=l&&a!==l&&(s=s||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(s=s||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(ke.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Zi("scroll",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},$l=function(e,t,n,r){n!==r&&(t.flags|=4)};var lu=!1,uu=!1,cu="function"==typeof WeakSet?WeakSet:Set,du=null;function hu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Nc(e,t,r)}else n.current=null}function fu(e,t,n){try{n()}catch(r){Nc(e,t,r)}}var pu=!1;function mu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&fu(t,n,o)}i=i.next}while(i!==r)}}function gu(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 yu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function vu(e){var t=e.alternate;null!==t&&(e.alternate=null,vu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[Po],delete t[Co],delete t[Oo],delete t[Ro],delete t[jo])),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 bu(e){return 5===e.tag||3===e.tag||4===e.tag}function wu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||bu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ku(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=po));else if(4!==r&&null!==(e=e.child))for(ku(e,t,n),e=e.sibling;null!==e;)ku(e,t,n),e=e.sibling}function Su(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Su(e,t,n),e=e.sibling;null!==e;)Su(e,t,n),e=e.sibling}var xu=null,_u=!1;function Tu(e,t,n){for(n=n.child;null!==n;)Eu(e,t,n),n=n.sibling}function Eu(e,t,n){if(wn&&"function"==typeof wn.onCommitFiberUnmount)try{wn.onCommitFiberUnmount(bn,n)}catch(a){}switch(n.tag){case 5:uu||hu(n,t);case 6:var r=xu,i=_u;xu=null,Tu(e,t,n),_u=i,null!==(xu=r)&&(_u?(e=xu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):xu.removeChild(n.stateNode));break;case 18:null!==xu&&(_u?(e=xu,n=n.stateNode,8===e.nodeType?xo(e.parentNode,n):1===e.nodeType&&xo(e,n),rr(e)):xo(xu,n.stateNode));break;case 4:r=xu,i=_u,xu=n.stateNode.containerInfo,_u=!0,Tu(e,t,n),xu=r,_u=i;break;case 0:case 11:case 14:case 15:if(!uu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,void 0!==s&&(2&o||4&o)&&fu(n,t,s),i=i.next}while(i!==r)}Tu(e,t,n);break;case 1:if(!uu&&(hu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Nc(n,t,a)}Tu(e,t,n);break;case 21:Tu(e,t,n);break;case 22:1&n.mode?(uu=(r=uu)||null!==n.memoizedState,Tu(e,t,n),uu=r):Tu(e,t,n);break;default:Tu(e,t,n)}}function Pu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new cu),t.forEach(function(t){var r=zc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Cu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;null!==a;){switch(a.tag){case 5:xu=a.stateNode,_u=!1;break e;case 3:case 4:xu=a.stateNode.containerInfo,_u=!0;break e}a=a.return}if(null===xu)throw Error(be(160));Eu(o,s,i),xu=null,_u=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(u){Nc(i,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)Au(t,e),t=t.sibling}function Au(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Cu(t,e),Ou(e),4&r){try{mu(3,e,e.return),gu(3,e)}catch(m){Nc(e,e.return,m)}try{mu(5,e,e.return)}catch(m){Nc(e,e.return,m)}}break;case 1:Cu(t,e),Ou(e),512&r&&null!==n&&hu(n,n.return);break;case 5:if(Cu(t,e),Ou(e),512&r&&null!==n&&hu(n,n.return),32&e.flags){var i=e.stateNode;try{Et(i,"")}catch(m){Nc(e,e.return,m)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===a&&"radio"===o.type&&null!=o.name&&dt(i,o),Lt(a,s);var u=Lt(a,o);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];"style"===c?Ot(i,d):"dangerouslySetInnerHTML"===c?Tt(i,d):"children"===c?Et(i,d):Le(i,c,d,u)}switch(a){case"input":ht(i,o);break;case"textarea":bt(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;null!=f?gt(i,!!o.multiple,f,!1):h!==!!o.multiple&&(null!=o.defaultValue?gt(i,!!o.multiple,o.defaultValue,!0):gt(i,!!o.multiple,o.multiple?[]:"",!1))}i[Co]=o}catch(m){Nc(e,e.return,m)}}break;case 6:if(Cu(t,e),Ou(e),4&r){if(null===e.stateNode)throw Error(be(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Nc(e,e.return,m)}}break;case 3:if(Cu(t,e),Ou(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{rr(t.containerInfo)}catch(m){Nc(e,e.return,m)}break;case 4:default:Cu(t,e),Ou(e);break;case 13:Cu(t,e),Ou(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(ec=hn())),4&r&&Pu(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(uu=(u=uu)||c,Cu(t,e),uu=u):Cu(t,e),Ou(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(du=e,c=e.child;null!==c;){for(d=du=c;null!==du;){switch(f=(h=du).child,h.tag){case 0:case 11:case 14:case 15:mu(4,h,h.return);break;case 1:hu(h,h.return);var p=h.stateNode;if("function"==typeof p.componentWillUnmount){r=h,n=h.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Nc(r,n,m)}}break;case 5:hu(h,h.return);break;case 22:if(null!==h.memoizedState){Mu(d);continue}}null!==f?(f.return=h,du=f):Mu(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{i=d.stateNode,u?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(a=d.stateNode,s=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,a.style.display=At("display",s))}catch(m){Nc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Nc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Cu(t,e),Ou(e),4&r&&Pu(e);case 21:}}function Ou(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(bu(n)){var r=n;break e}n=n.return}throw Error(be(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(Et(i,""),r.flags&=-33),Su(e,wu(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;ku(e,wu(e),o);break;default:throw Error(be(161))}}catch(s){Nc(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Ru(e,t,n){du=e,ju(e)}function ju(e,t,n){for(var r=!!(1&e.mode);null!==du;){var i=du,o=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||lu;if(!s){var a=i.alternate,l=null!==a&&null!==a.memoizedState||uu;a=lu;var u=uu;if(lu=s,(uu=l)&&!u)for(du=i;null!==du;)l=(s=du).child,22===s.tag&&null!==s.memoizedState?Du(i):null!==l?(l.return=s,du=l):Du(i);for(;null!==o;)du=o,ju(o),o=o.sibling;du=i,lu=a,uu=u}Lu(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,du=o):Lu(e)}}function Lu(e){for(;null!==du;){var t=du;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:uu||gu(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!uu)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:gl(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&ia(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ia(t,s,n)}break;case 5:var a=t.stateNode;if(null===n&&4&t.flags){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&rr(d)}}}break;default:throw Error(be(163))}uu||512&t.flags&&yu(t)}catch(h){Nc(t,t.return,h)}}if(t===e){du=null;break}if(null!==(n=t.sibling)){n.return=t.return,du=n;break}du=t.return}}function Mu(e){for(;null!==du;){var t=du;if(t===e){du=null;break}var n=t.sibling;if(null!==n){n.return=t.return,du=n;break}du=t.return}}function Du(e){for(;null!==du;){var t=du;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{gu(4,t)}catch(l){Nc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Nc(t,i,l)}}var o=t.return;try{yu(t)}catch(l){Nc(t,o,l)}break;case 5:var s=t.return;try{yu(t)}catch(l){Nc(t,s,l)}}}catch(l){Nc(t,t.return,l)}if(t===e){du=null;break}var a=t.sibling;if(null!==a){a.return=t.return,du=a;break}du=t.return}}var Iu,Nu=Math.ceil,Uu=Me.ReactCurrentDispatcher,Fu=Me.ReactCurrentOwner,Vu=Me.ReactCurrentBatchConfig,zu=0,Bu=null,Wu=null,Hu=0,qu=0,Ku=Fo(0),$u=0,Gu=null,Yu=0,Ju=0,Qu=0,Xu=null,Zu=null,ec=0,tc=1/0,nc=null,rc=!1,ic=null,oc=null,sc=!1,ac=null,lc=0,uc=0,cc=null,dc=-1,hc=0;function fc(){return 6&zu?hn():-1!==dc?dc:dc=hn()}function pc(e){return 1&e.mode?2&zu&&0!==Hu?Hu&-Hu:null!==Os.transition?(0===hc&&(hc=On()),hc):0!==(e=Mn)?e:e=void 0===(e=window.event)?16:dr(e.type):1}function mc(e,t,n,r){if(50<uc)throw uc=0,cc=null,Error(be(185));jn(e,n,r),2&zu&&e===Bu||(e===Bu&&(!(2&zu)&&(Ju|=n),4===$u&&wc(e,Hu)),gc(e,r),1===n&&0===zu&&!(1&t.mode)&&(tc=hn()+500,es&&rs()))}function gc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-kn(o),a=1<<s,l=i[s];-1===l?0!==(a&n)&&0===(a&r)||(i[s]=Cn(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}(e,t);var r=Pn(e,e===Bu?Hu:0);if(0===r)null!==n&&un(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&un(n),1===t)0===e.tag?function(e){es=!0,ns(e)}(kc.bind(null,e)):ns(kc.bind(null,e)),ko(function(){!(6&zu)&&rs()}),n=null;else{switch(Dn(r)){case 1:n=pn;break;case 4:n=mn;break;case 16:default:n=gn;break;case 536870912:n=vn}n=Bc(n,yc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function yc(e,t){if(dc=-1,hc=0,6&zu)throw Error(be(327));var n=e.callbackNode;if(Dc()&&e.callbackNode!==n)return null;var r=Pn(e,e===Bu?Hu:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=Ac(e,r);else{t=r;var i=zu;zu|=2;var o=Pc();for(Bu===e&&Hu===t||(nc=null,tc=hn()+500,Tc(e,t));;)try{Rc();break}catch(a){Ec(e,a)}zs(),Uu.current=o,zu=i,null!==Wu?t=0:(Bu=null,Hu=0,t=$u)}if(0!==t){if(2===t&&(0!==(i=An(e))&&(r=i,t=vc(e,i))),1===t)throw n=Gu,Tc(e,0),wc(e,r),gc(e,hn()),n;if(6===t)wc(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!ki(o(),i))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=Ac(e,r),2===t&&(o=An(e),0!==o&&(r=o,t=vc(e,o))),1!==t)))throw n=Gu,Tc(e,0),wc(e,r),gc(e,hn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(be(345));case 2:case 5:Mc(e,Zu,nc);break;case 3:if(wc(e,r),(130023424&r)===r&&10<(t=ec+500-hn())){if(0!==Pn(e,0))break;if(((i=e.suspendedLanes)&r)!==r){fc(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vo(Mc.bind(null,e,Zu,nc),t);break}Mc(e,Zu,nc);break;case 4:if(wc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-kn(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=hn()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nu(r/1960))-r)){e.timeoutHandle=vo(Mc.bind(null,e,Zu,nc),r);break}Mc(e,Zu,nc);break;default:throw Error(be(329))}}}return gc(e,hn()),e.callbackNode===n?yc.bind(null,e):null}function vc(e,t){var n=Xu;return e.current.memoizedState.isDehydrated&&(Tc(e,t).flags|=256),2!==(e=Ac(e,t))&&(t=Zu,Zu=n,null!==t&&bc(t)),e}function bc(e){null===Zu?Zu=e:Zu.push.apply(Zu,e)}function wc(e,t){for(t&=~Qu,t&=~Ju,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-kn(t),r=1<<n;e[n]=-1,t&=~r}}function kc(e){if(6&zu)throw Error(be(327));Dc();var t=Pn(e,0);if(!(1&t))return gc(e,hn()),null;var n=Ac(e,t);if(0!==e.tag&&2===n){var r=An(e);0!==r&&(t=r,n=vc(e,r))}if(1===n)throw n=Gu,Tc(e,0),wc(e,t),gc(e,hn()),n;if(6===n)throw Error(be(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Mc(e,Zu,nc),gc(e,hn()),null}function Sc(e,t){var n=zu;zu|=1;try{return e(t)}finally{0===(zu=n)&&(tc=hn()+500,es&&rs())}}function xc(e){null!==ac&&0===ac.tag&&!(6&zu)&&Dc();var t=zu;zu|=1;var n=Vu.transition,r=Mn;try{if(Vu.transition=null,Mn=1,e)return e()}finally{Mn=r,Vu.transition=n,!(6&(zu=t))&&rs()}}function _c(){qu=Ku.current,Vo(Ku)}function Tc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,bo(n)),null!==Wu)for(n=Wu.return;null!==n;){var r=n;switch(gs(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Go();break;case 3:da(),Vo(Ho),Vo(Wo),ya();break;case 5:fa(r);break;case 4:da();break;case 13:case 19:Vo(pa);break;case 10:Bs(r.type._context);break;case 22:case 23:_c()}n=n.return}if(Bu=e,Wu=e=Kc(e.current,null),Hu=qu=t,$u=0,Gu=null,Qu=Ju=Yu=0,Zu=Xu=null,null!==Ks){for(t=0;t<Ks.length;t++)if(null!==(r=(n=Ks[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var s=o.next;o.next=i,r.next=s}n.pending=r}Ks=null}return e}function Ec(e,t){for(;;){var n=Wu;try{if(zs(),va.current=hl,_a){for(var r=ka.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}_a=!1}if(wa=0,xa=Sa=ka=null,Ta=!1,Ea=0,Fu.current=null,null===n||null===n.return){$u=1,Gu=t,Wu=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=Hu,a.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=a,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=Al(s);if(null!==f){f.flags&=-257,Ol(f,s,a,0,t),1&f.mode&&Cl(o,u,t),l=u;var p=(t=f).updateQueue;if(null===p){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}if(!(1&t)){Cl(o,u,t),Cc();break e}l=Error(be(426))}else if(bs&&1&a.mode){var g=Al(s);if(null!==g){!(65536&g.flags)&&(g.flags|=256),Ol(g,s,a,0,t),As(xl(l,a));break e}}o=l=xl(l,a),4!==$u&&($u=2),null===Xu?Xu=[o]:Xu.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,na(o,El(0,l,t));break e;case 1:a=l;var y=o.type,v=o.stateNode;if(!(128&o.flags||"function"!=typeof y.getDerivedStateFromError&&(null===v||"function"!=typeof v.componentDidCatch||null!==oc&&oc.has(v)))){o.flags|=65536,t&=-t,o.lanes|=t,na(o,Pl(o,a,t));break e}}o=o.return}while(null!==o)}Lc(n)}catch(b){t=b,Wu===n&&null!==n&&(Wu=n=n.return);continue}break}}function Pc(){var e=Uu.current;return Uu.current=hl,null===e?hl:e}function Cc(){0!==$u&&3!==$u&&2!==$u||($u=4),null===Bu||!(268435455&Yu)&&!(268435455&Ju)||wc(Bu,Hu)}function Ac(e,t){var n=zu;zu|=2;var r=Pc();for(Bu===e&&Hu===t||(nc=null,Tc(e,t));;)try{Oc();break}catch(i){Ec(e,i)}if(zs(),zu=n,Uu.current=r,null!==Wu)throw Error(be(261));return Bu=null,Hu=0,$u}function Oc(){for(;null!==Wu;)jc(Wu)}function Rc(){for(;null!==Wu&&!cn();)jc(Wu)}function jc(e){var t=Iu(e.alternate,e,qu);e.memoizedProps=e.pendingProps,null===t?Lc(e):Wu=t,Fu.current=null}function Lc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=au(n,t)))return n.flags&=32767,void(Wu=n);if(null===e)return $u=6,void(Wu=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=su(n,t,qu)))return void(Wu=n);if(null!==(t=t.sibling))return void(Wu=t);Wu=t=e}while(null!==t);0===$u&&($u=5)}function Mc(e,t,n){var r=Mn,i=Vu.transition;try{Vu.transition=null,Mn=1,function(e,t,n,r){do{Dc()}while(null!==ac);if(6&zu)throw Error(be(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(be(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(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<n;){var i=31-kn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Bu&&(Wu=Bu=null,Hu=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||sc||(sc=!0,Bc(gn,function(){return Dc(),null})),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Vu.transition,Vu.transition=null;var s=Mn;Mn=1;var a=zu;zu|=4,Fu.current=null,function(e,t){if(mo=or,Pi(e=Ei())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(w){n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(a=s+i),d!==o||0!==r&&3!==d.nodeType||(l=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(f=d.firstChild);)h=d,d=f;for(;;){if(d===e)break t;if(h===n&&++u===i&&(a=s),h===o&&++c===r&&(l=s),null!==(f=d.nextSibling))break;h=(d=h).parentNode}d=f}n=-1===a||-1===l?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(go={focusedElem:e,selectionRange:n},or=!1,du=t;null!==du;)if(e=(t=du).child,1028&t.subtreeFlags&&null!==e)e.return=t,du=e;else for(;null!==du;){t=du;try{var p=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==p){var m=p.memoizedProps,g=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:gl(t.type,m),g);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(be(163))}}catch(w){Nc(t,t.return,w)}if(null!==(e=t.sibling)){e.return=t.return,du=e;break}du=t.return}p=pu,pu=!1}(e,n),Au(n,e),Ci(go),or=!!mo,go=mo=null,e.current=n,Ru(n),dn(),zu=a,Mn=s,Vu.transition=o}else e.current=n;if(sc&&(sc=!1,ac=e,lc=i),o=e.pendingLanes,0===o&&(oc=null),function(e){if(wn&&"function"==typeof wn.onCommitFiberRoot)try{wn.onCommitFiberRoot(bn,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),gc(e,hn()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(rc)throw rc=!1,e=ic,ic=null,e;!!(1&lc)&&0!==e.tag&&Dc(),o=e.pendingLanes,1&o?e===cc?uc++:(uc=0,cc=e):uc=0,rs()}(e,t,n,r)}finally{Vu.transition=i,Mn=r}return null}function Dc(){if(null!==ac){var e=Dn(lc),t=Vu.transition,n=Mn;try{if(Vu.transition=null,Mn=16>e?16:e,null===ac)var r=!1;else{if(e=ac,ac=null,lc=0,6&zu)throw Error(be(331));var i=zu;for(zu|=4,du=e.current;null!==du;){var o=du,s=o.child;if(16&du.flags){var a=o.deletions;if(null!==a){for(var l=0;l<a.length;l++){var u=a[l];for(du=u;null!==du;){var c=du;switch(c.tag){case 0:case 11:case 15:mu(8,c,o)}var d=c.child;if(null!==d)d.return=c,du=d;else for(;null!==du;){var h=(c=du).sibling,f=c.return;if(vu(c),c===u){du=null;break}if(null!==h){h.return=f,du=h;break}du=f}}}var p=o.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}du=o}}if(2064&o.subtreeFlags&&null!==s)s.return=o,du=s;else e:for(;null!==du;){if(2048&(o=du).flags)switch(o.tag){case 0:case 11:case 15:mu(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,du=y;break e}du=o.return}}var v=e.current;for(du=v;null!==du;){var b=(s=du).child;if(2064&s.subtreeFlags&&null!==b)b.return=s,du=b;else e:for(s=v;null!==du;){if(2048&(a=du).flags)try{switch(a.tag){case 0:case 11:case 15:gu(9,a)}}catch(k){Nc(a,a.return,k)}if(a===s){du=null;break e}var w=a.sibling;if(null!==w){w.return=a.return,du=w;break e}du=a.return}}if(zu=i,rs(),wn&&"function"==typeof wn.onPostCommitFiberRoot)try{wn.onPostCommitFiberRoot(bn,e)}catch(k){}r=!0}return r}finally{Mn=n,Vu.transition=t}}return!1}function Ic(e,t,n){e=ea(e,t=El(0,t=xl(n,t),1),1),t=fc(),null!==e&&(jn(e,1,t),gc(e,t))}function Nc(e,t,n){if(3===e.tag)Ic(e,e,n);else for(;null!==t;){if(3===t.tag){Ic(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oc||!oc.has(r))){t=ea(t,e=Pl(t,e=xl(n,e),1),1),e=fc(),null!==t&&(jn(t,1,e),gc(t,e));break}}t=t.return}}function Uc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=fc(),e.pingedLanes|=e.suspendedLanes&n,Bu===e&&(Hu&n)===n&&(4===$u||3===$u&&(130023424&Hu)===Hu&&500>hn()-ec?Tc(e,0):Qu|=n),gc(e,t)}function Fc(e,t){0===t&&(1&e.mode?(t=Tn,!(130023424&(Tn<<=1))&&(Tn=4194304)):t=1);var n=fc();null!==(e=Ys(e,t))&&(jn(e,t,n),gc(e,n))}function Vc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Fc(e,n)}function zc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(be(314))}null!==r&&r.delete(t),Fc(e,n)}function Bc(e,t){return ln(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 Hc(e,t,n,r){return new Wc(e,t,n,r)}function qc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Kc(e,t){var n=e.alternate;return null===n?((n=Hc(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $c(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)qc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case Ne:return Gc(n.children,i,o,t);case Ue:s=8,i|=8;break;case Fe:return(e=Hc(12,n,t,2|i)).elementType=Fe,e.lanes=o,e;case We:return(e=Hc(13,n,t,i)).elementType=We,e.lanes=o,e;case He:return(e=Hc(19,n,t,i)).elementType=He,e.lanes=o,e;case $e:return Yc(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ve:s=10;break e;case ze:s=9;break e;case Be:s=11;break e;case qe:s=14;break e;case Ke:s=16,r=null;break e}throw Error(be(130,null==e?e:typeof e,""))}return(t=Hc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Gc(e,t,n,r){return(e=Hc(7,e,r,t)).lanes=n,e}function Yc(e,t,n,r){return(e=Hc(22,e,r,t)).elementType=$e,e.lanes=n,e.stateNode={isHidden:!1},e}function Jc(e,t,n){return(e=Hc(6,e,null,t)).lanes=n,e}function Qc(e,t,n){return(t=Hc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xc(e,t,n,r,i){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=Rn(0),this.expirationTimes=Rn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rn(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Zc(e,t,n,r,i,o,s,a,l){return e=new Xc(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Hc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qs(o),e}function ed(e){if(!e)return Bo;e:{if(nn(e=e._reactInternals)!==e||1!==e.tag)throw Error(be(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($o(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(be(171))}if(1===e.tag){var n=e.type;if($o(n))return Jo(e,n,t)}return t}function td(e,t,n,r,i,o,s,a,l){return(e=Zc(n,r,!0,e,0,o,0,a,l)).context=ed(null),n=e.current,(o=Zs(r=fc(),i=pc(n))).callback=null!=t?t:null,ea(n,o,i),e.current.lanes=i,jn(e,i,r),gc(e,r),e}function nd(e,t,n,r){var i=t.current,o=fc(),s=pc(i);return n=ed(n),null===t.context?t.context=n:t.pendingContext=n,(t=Zs(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=ea(i,t,s))&&(mc(e,i,s,o),ta(e,i,s)),s}function rd(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function id(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function od(e,t){id(e,t),(e=e.alternate)&&id(e,t)}Iu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ho.current)jl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return jl=!1,function(e,t,n){switch(t.tag){case 3:Bl(t),Cs();break;case 5:ha(t);break;case 1:$o(t.type)&&Qo(t);break;case 4:ca(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;zo(Ns,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(zo(pa,1&pa.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Jl(e,t,n):(zo(pa,1&pa.current),null!==(e=ru(e,t,n))?e.sibling:null);zo(pa,1&pa.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return tu(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),zo(pa,pa.current),r)break;return null;case 22:case 23:return t.lanes=0,Nl(e,t,n)}return ru(e,t,n)}(e,t,n);jl=!!(131072&e.flags)}else jl=!1,bs&&1048576&t.flags&&ps(t,as,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;nu(e,t),e=t.pendingProps;var i=Ko(t,Wo.current);Hs(t,n),i=Oa(null,t,r,e,i,n);var o=Ra();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$o(r)?(o=!0,Qo(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Qs(t),i.updater=vl,t.stateNode=i,i._reactInternals=t,Sl(t,r,e,n),t=zl(null,t,r,!0,o,n)):(t.tag=0,bs&&o&&ms(t),Ll(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(nu(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return qc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Be)return 11;if(e===qe)return 14}return 2}(r),e=gl(r,e),i){case 0:t=Fl(null,t,r,e,n);break e;case 1:t=Vl(null,t,r,e,n);break e;case 11:t=Ml(null,t,r,e,n);break e;case 14:t=Dl(null,t,r,gl(r.type,e),n);break e}throw Error(be(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Fl(e,t,r,i=t.elementType===r?i:gl(r,i),n);case 1:return r=t.type,i=t.pendingProps,Vl(e,t,r,i=t.elementType===r?i:gl(r,i),n);case 3:e:{if(Bl(t),null===e)throw Error(be(387));r=t.pendingProps,i=(o=t.memoizedState).element,Xs(e,t),ra(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Wl(e,t,r,n,i=xl(Error(be(423)),t));break e}if(r!==i){t=Wl(e,t,r,n,i=xl(Error(be(424)),t));break e}for(vs=_o(t.stateNode.containerInfo.firstChild),ys=t,bs=!0,ws=null,n=Is(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Cs(),r===i){t=ru(e,t,n);break e}Ll(e,t,r,n)}t=t.child}return t;case 5:return ha(t),null===e&&_s(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,yo(r,i)?s=null:null!==o&&yo(r,o)&&(t.flags|=32),Ul(e,t),Ll(e,t,s,n),t.child;case 6:return null===e&&_s(t),null;case 13:return Jl(e,t,n);case 4:return ca(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ds(t,null,r,n):Ll(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ml(e,t,r,i=t.elementType===r?i:gl(r,i),n);case 7:return Ll(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ll(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,zo(Ns,r._currentValue),r._currentValue=s,null!==o)if(ki(o.value,s)){if(o.children===i.children&&!Ho.current){t=ru(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var a=o.dependencies;if(null!==a){s=o.child;for(var l=a.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Zs(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ws(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(be(341));s.lanes|=n,null!==(a=s.alternate)&&(a.lanes|=n),Ws(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}Ll(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Hs(t,n),r=r(i=qs(i)),t.flags|=1,Ll(e,t,r,n),t.child;case 14:return i=gl(r=t.type,t.pendingProps),Dl(e,t,r,i=gl(r.type,i),n);case 15:return Il(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gl(r,i),nu(e,t),t.tag=1,$o(r)?(e=!0,Qo(t)):e=!1,Hs(t,n),wl(t,r,i),Sl(t,r,i,n),zl(null,t,r,!0,e,n);case 19:return tu(e,t,n);case 22:return Nl(e,t,n)}throw Error(be(156,t.tag))};var sd="function"==typeof reportError?reportError:function(e){};function ad(e){this._internalRoot=e}function ld(e){this._internalRoot=e}function ud(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function cd(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function dd(){}function hd(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if("function"==typeof i){var a=i;i=function(){var e=rd(s);a.call(e)}}nd(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=rd(s);o.call(e)}}var s=td(t,r,e,0,null,!1,0,"",dd);return e._reactRootContainer=s,e[Ao]=s.current,no(8===e.nodeType?e.parentNode:e),xc(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var a=r;r=function(){var e=rd(l);a.call(e)}}var l=Zc(e,0,!1,null,0,!1,0,"",dd);return e._reactRootContainer=l,e[Ao]=l.current,no(8===e.nodeType?e.parentNode:e),xc(function(){nd(t,l,n,r)}),l}(n,t,e,i,r);return rd(s)}ld.prototype.render=ad.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(be(409));nd(e,t,null,null)},ld.prototype.unmount=ad.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;xc(function(){nd(null,e,null,null)}),t[Ao]=null}},ld.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gn.length&&0!==t&&t<Gn[n].priority;n++);Gn.splice(n,0,e),0===n&&Xn(e)}},In=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=En(t.pendingLanes);0!==n&&(Ln(t,1|n),gc(t,hn()),!(6&zu)&&(tc=hn()+500,rs()))}break;case 13:xc(function(){var t=Ys(e,1);if(null!==t){var n=fc();mc(t,e,1,n)}}),od(e,1)}},Nn=function(e){if(13===e.tag){var t=Ys(e,134217728);if(null!==t)mc(t,e,134217728,fc());od(e,134217728)}},Un=function(e){if(13===e.tag){var t=pc(e),n=Ys(e,t);if(null!==n)mc(n,e,t,fc());od(e,t)}},Fn=function(){return Mn},Vn=function(e,t){var n=Mn;try{return Mn=e,t()}finally{Mn=n}},It=function(e,t,n){switch(t){case"input":if(ht(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Io(r);if(!i)throw Error(be(90));at(r),ht(r,i)}}}break;case"textarea":bt(e,n);break;case"select":null!=(t=n.value)&>(e,!!n.multiple,t,!1)}},Bt=Sc,Wt=xc;var fd={usingClientEntryPoint:!1,Events:[Mo,Do,Io,Vt,zt,Sc]},pd={findFiberByHostInstance:Lo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},md={bundleType:pd.bundleType,version:pd.version,rendererPackageName:pd.rendererPackageName,rendererConfig:pd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Me.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=sn(e))?null:e.stateNode},findFiberByHostInstance:pd.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var gd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gd.isDisabled&&gd.supportsFiber)try{bn=gd.inject(md),wn=gd}catch(_t){}}fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fd,fe.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ud(t))throw Error(be(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ie,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},fe.createRoot=function(e,t){if(!ud(e))throw Error(be(299));var n=!1,r="",i=sd;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Zc(e,1,!1,null,0,n,0,r,i),e[Ao]=t.current,no(8===e.nodeType?e.parentNode:e),new ad(t)},fe.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(be(188));throw e=Object.keys(e).join(","),Error(be(268,e))}return e=null===(e=sn(t))?null:e.stateNode},fe.flushSync=function(e){return xc(e)},fe.hydrate=function(e,t,n){if(!cd(t))throw Error(be(200));return hd(null,e,t,!0,n)},fe.hydrateRoot=function(e,t,n){if(!ud(e))throw Error(be(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=sd;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=td(t,null,e,1,null!=n?n:null,i,0,o,s),e[Ao]=t.current,no(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ld(t)},fe.render=function(e,t,n){if(!cd(t))throw Error(be(200));return hd(null,e,t,!1,n)},fe.unmountComponentAtNode=function(e){if(!cd(e))throw Error(be(40));return!!e._reactRootContainer&&(xc(function(){hd(null,null,e,!1,function(){e._reactRootContainer=null,e[Ao]=null})}),!0)},fe.unstable_batchedUpdates=Sc,fe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!cd(n))throw Error(be(200));if(null==e||void 0===e._reactInternals)throw Error(be(38));return hd(e,t,n,!1,r)},fe.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){}}(),he.exports=fe;var yd,vd=he.exports,bd=vd;yd=bd.createRoot,bd.hydrateRoot;var wd="undefined"!=typeof Element,kd="function"==typeof Map,Sd="function"==typeof Set,xd="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function _d(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,r,i,o;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(r=n;0!==r--;)if(!_d(e[r],t[r]))return!1;return!0}if(kd&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!_d(r.value[1],t.get(r.value[0])))return!1;return!0}if(Sd&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(xd&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(r=n;0!==r--;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(wd&&e instanceof Element)return!1;for(r=n;0!==r--;)if(("_owner"!==i[r]&&"__v"!==i[r]&&"__o"!==i[r]||!e.$$typeof)&&!_d(e[i[r]],t[i[r]]))return!1;return!0}return e!=e&&t!=t}var Td=function(e,t){try{return _d(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return!1;throw n}};const Ed=g(Td);var Pd=function(e,t,n,r,i,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,s,a],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}};const Cd=g(Pd);const Ad=g(function(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l<o.length;l++){var u=o[l];if(!a(u))return!1;var c=e[u],d=t[u];if(!1===(i=n?n.call(r,c,d,u):void 0)||void 0===i&&c!==d)return!1}return!0});var Od=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Od||{}),Rd={rel:["amphtml","canonical","alternate"]},jd={type:["application/ld+json"]},Ld={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},Md=Object.values(Od),Dd={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Id=Object.entries(Dd).reduce((e,[t,n])=>(e[n]=t,e),{}),Nd="data-rh",Ud="defaultTitle",Fd="defer",Vd="encodeSpecialCharacters",zd="onChangeClientState",Bd="titleTemplate",Wd="prioritizeSeoTags",Hd=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},qd=e=>{let t=Hd(e,"title");const n=Hd(e,Bd);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=Hd(e,Ud);return t||r||void 0},Kd=e=>Hd(e,zd)||(()=>{}),$d=(e,t)=>t.filter(t=>void 0!==t[e]).map(t=>t[e]).reduce((e,t)=>c(c({},e),t),{}),Gd=(e,t)=>t.filter(e=>void 0!==e.base).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){const r=Object.keys(n);for(let i=0;i<r.length;i+=1){const o=r[i].toLowerCase();if(-1!==e.indexOf(o)&&n[o])return t.concat(n)}}return t},[]),Yd=(e,t,n)=>{const r={};return n.filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&("Helmet: ".concat(e,' should be of type "Array". Instead found type "').concat(typeof t[e],'"'),console&&console.warn),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const i={};n.filter(e=>{let n;const o=Object.keys(e);for(let r=0;r<o.length;r+=1){const i=o[r],s=i.toLowerCase();-1===t.indexOf(s)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(n=s),-1===t.indexOf(i)||"innerHTML"!==i&&"cssText"!==i&&"itemprop"!==i||(n=i)}if(!n||!e[n])return!1;const s=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][s]&&(i[n][s]=!0,!0)}).reverse().forEach(t=>e.push(t));const o=Object.keys(i);for(let t=0;t<o.length;t+=1){const e=o[t],n=c(c({},r[e]),i[e]);r[e]=n}return e},[]).reverse()},Jd=(e,t)=>{if(Array.isArray(e)&&e.length)for(let n=0;n<e.length;n+=1){if(e[n][t])return!0}return!1},Qd=e=>Array.isArray(e)?e.join(""):e,Xd=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1})(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Zd=(e,t)=>d(c({},e),{[t]:void 0}),eh=["noscript","script","style"],th=(e,t=!0)=>!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),nh=e=>Object.keys(e).reduce((t,n)=>{const r=void 0!==e[n]?"".concat(n,'="').concat(e[n],'"'):"".concat(n);return t?"".concat(t," ").concat(r):r},""),rh=(e,t={})=>Object.keys(e).reduce((t,n)=>(t[Dd[n]||n]=e[n],t),t),ih=(e,t)=>t.map((t,n)=>{const r={key:n,[Nd]:!0};return Object.keys(t).forEach(e=>{const n=Dd[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;r.dangerouslySetInnerHTML={__html:e}}else r[n]=t[e]}),re.createElement(e,r)}),oh=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const r=rh(n,{key:t,[Nd]:!0});return[re.createElement("title",r,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,r)=>{const i=nh(n),o=Qd(t);return i?"<".concat(e," ").concat(Nd,'="true" ').concat(i,">").concat(th(o,r),"</").concat(e,">"):"<".concat(e," ").concat(Nd,'="true">').concat(th(o,r),"</").concat(e,">")})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>rh(t),toString:()=>nh(t)};default:return{toComponent:()=>ih(e,t),toString:()=>((e,t,n=!0)=>t.reduce((t,r)=>{const i=r,o=Object.keys(i).filter(e=>!("innerHTML"===e||"cssText"===e)).reduce((e,t)=>{const r=void 0===i[t]?t:"".concat(t,'="').concat(th(i[t],n),'"');return e?"".concat(e," ").concat(r):r},""),s=i.innerHTML||i.cssText||"",a=-1===eh.indexOf(e);return"".concat(t,"<").concat(e," ").concat(Nd,'="true" ').concat(o).concat(a?"/>":">".concat(s,"</").concat(e,">"))},""))(e,t,n)}}},sh=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:o,styleTags:s,title:a="",titleAttributes:l,prioritizeSeoTags:u}=e;let{linkTags:c,metaTags:d,scriptTags:h}=e,f={toComponent:()=>{},toString:()=>""};return u&&({priorityMethods:f,linkTags:c,metaTags:d,scriptTags:h}=(({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const i=Xd(e,Ld),o=Xd(t,Rd),s=Xd(n,jd);return{priorityMethods:{toComponent:()=>[...ih("meta",i.priority),...ih("link",o.priority),...ih("script",s.priority)],toString:()=>"".concat(oh("meta",i.priority,r)," ").concat(oh("link",o.priority,r)," ").concat(oh("script",s.priority,r))},metaTags:i.default,linkTags:o.default,scriptTags:s.default}})(e)),{priority:f,base:oh("base",t,r),bodyAttributes:oh("bodyAttributes",n,r),htmlAttributes:oh("htmlAttributes",i,r),link:oh("link",c,r),meta:oh("meta",d,r),noscript:oh("noscript",o,r),script:oh("script",h,r),style:oh("style",s,r),title:oh("title",{title:a,titleAttributes:l},r)}},ah=[],lh=!("undefined"==typeof window||!window.document||!window.document.createElement),uh=class{constructor(e,t){f(this,"instances",[]),f(this,"canUseDOM",lh),f(this,"context"),f(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?ah:this.instances,add:e=>{(this.canUseDOM?ah:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?ah:this.instances).indexOf(e);(this.canUseDOM?ah:this.instances).splice(t,1)}}}),this.context=e,this.canUseDOM=t||!1,t||(e.helmet=sh({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},ch=re.createContext({}),dh=(e=class extends ne.Component{constructor(t){super(t),f(this,"helmetData"),this.helmetData=new uh(this.props.context||{},e.canUseDOM)}render(){return re.createElement(ch.Provider,{value:this.helmetData.value},this.props.children)}},f(e,"canUseDOM",lh),e),hh=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll("".concat(e,"[").concat(Nd,"]")),i=[].slice.call(r),o=[];let s;return t&&t.length&&t.forEach(t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{const r=e,i=void 0===t[r]?"":t[r];n.setAttribute(e,i)}n.setAttribute(Nd,"true"),i.some((e,t)=>(s=t,n.isEqualNode(e)))?i.splice(s,1):o.push(n)}),i.forEach(e=>{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),o.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:o}},fh=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(Nd),i=r?r.split(","):[],o=[...i],s=Object.keys(t);for(const a of s){const e=t[a]||"";n.getAttribute(a)!==e&&n.setAttribute(a,e),-1===i.indexOf(a)&&i.push(a);const r=o.indexOf(a);-1!==r&&o.splice(r,1)}for(let a=o.length-1;a>=0;a-=1)n.removeAttribute(o[a]);i.length===o.length?n.removeAttribute(Nd):n.getAttribute(Nd)!==s.join(",")&&n.setAttribute(Nd,s.join(","))},ph=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:o,metaTags:s,noscriptTags:a,onChangeClientState:l,scriptTags:u,styleTags:c,title:d,titleAttributes:h}=e;fh("body",r),fh("html",i),((e,t)=>{void 0!==e&&document.title!==e&&(document.title=Qd(e)),fh("title",t)})(d,h);const f={baseTag:hh("base",n),linkTags:hh("link",o),metaTags:hh("meta",s),noscriptTags:hh("noscript",a),scriptTags:hh("script",u),styleTags:hh("style",c)},p={},m={};Object.keys(f).forEach(e=>{const{newTags:t,oldTags:n}=f[e];t.length&&(p[e]=t),n.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},mh=null,gh=e=>{mh&&cancelAnimationFrame(mh),e.defer?mh=requestAnimationFrame(()=>{ph(e,()=>{mh=null})}):(ph(e),mh=null)},yh=class extends ne.Component{constructor(){super(...arguments),f(this,"rendered",!1)}shouldComponentUpdate(e){return!Ad(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const r=(i=e.get().map(e=>{const t=c({},e.props);return delete t.context,t}),{baseTag:Gd(["href"],i),bodyAttributes:$d("bodyAttributes",i),defer:Hd(i,Fd),encode:Hd(i,Vd),htmlAttributes:$d("htmlAttributes",i),linkTags:Yd("link",["rel","href"],i),metaTags:Yd("meta",["name","charset","http-equiv","property","itemprop"],i),noscriptTags:Yd("noscript",["innerHTML"],i),onChangeClientState:Kd(i),scriptTags:Yd("script",["src","innerHTML"],i),styleTags:Yd("style",["cssText"],i),title:qd(i),titleAttributes:$d("titleAttributes",i),prioritizeSeoTags:Jd(i,Wd)});var i;dh.canUseDOM?gh(r):sh&&(n=sh(r)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},vh=(t=class extends ne.Component{shouldComponentUpdate(e){return!Ed(Zd(this.props,"helmetData"),Zd(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error("<".concat(e.type," /> elements are self-closing and can not contain children. Refer to our API for more information."))}}flattenArrayTypeChildren(e,t,n,r){return d(c({},t),{[e.type]:[...t[e.type]||[],c(c({},n),this.mapNestedChildrenToProps(e,r))]})}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return d(c({},t),{[e.type]:r,titleAttributes:c({},n)});case"body":return d(c({},t),{bodyAttributes:c({},n)});case"html":return d(c({},t),{htmlAttributes:c({},n)});default:return d(c({},t),{[e.type]:c({},n)})}}mapArrayTypeChildrenToProps(e,t){let n=c({},t);return Object.keys(e).forEach(t=>{n=d(c({},n),{[t]:e[t]})}),n}warnOnInvalidChildren(e,t){return Cd(Md.some(t=>e.type===t),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types ".concat(Md.join(", ")," are allowed. Helmet does not support rendering <").concat(e.type,"> elements. Refer to our API for more information.")),Cd(!t||"string"==typeof t||Array.isArray(t)&&!t.some(e=>"string"!=typeof e),"Helmet expects a string as a child of <".concat(e.type,">. Did you forget to wrap your children in braces? ( <").concat(e.type,">{``}</").concat(e.type,"> ) Refer to our API for more information.")),!0}mapChildrenToProps(e,t){let n={};return re.Children.forEach(e,e=>{if(!e||!e.props)return;const r=e.props,{children:i}=r,o=h(r,["children"]),s=Object.keys(o).reduce((e,t)=>(e[Id[t]||t]=o[t],e),{});let{type:a}=e;switch("symbol"==typeof a?a=a.toString():this.warnOnInvalidChildren(e,i),a){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,s,i);break;default:t=this.mapObjectTypeChildren(e,t,s,i)}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const e=this.props,{children:t}=e,n=h(e,["children"]);let r=c({},n),{helmetData:i}=n;if(t&&(r=this.mapChildrenToProps(t,r)),i&&!(i instanceof uh)){i=new uh(i.context,!0),delete r.helmetData}return i?re.createElement(yh,d(c({},r),{context:i.value})):re.createElement(ch.Consumer,null,e=>re.createElement(yh,d(c({},r),{context:e})))}},f(t,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),t);const bh={},wh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in bh)return;bh[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector('link[href="'.concat(e,'"]').concat(r)))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,n&&i.setAttribute("nonce",n),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error("Unable to preload CSS for ".concat(e))))}):void 0}))}function i(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&i(e.reason);return e().catch(i)})};var kh="popstate";function Sh(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a="POP",l=null,u=h();null==u&&(u=0,s.replaceState(d(c({},s.state),{idx:u}),""));function h(){return(s.state||{idx:null}).idx}function f(){a="POP";let e=h(),t=null==e?null:e-u;u=e,l&&l({action:a,location:y.location,delta:t})}function p(e,t){a="PUSH";let n=Eh(y.location,e,t);u=h()+1;let r=Th(n,u),c=y.createHref(n);try{s.pushState(r,"",c)}catch(d){if(d instanceof DOMException&&"DataCloneError"===d.name)throw d;i.location.assign(c)}o&&l&&l({action:a,location:y.location,delta:1})}function m(e,t){a="REPLACE";let n=Eh(y.location,e,t);u=h();let r=Th(n,u),i=y.createHref(n);s.replaceState(r,"",i),o&&l&&l({action:a,location:y.location,delta:0})}function g(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href);xh(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:Ph(e);r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r);return new URL(r,n)}(e)}let y={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(kh,f),l=e,()=>{i.removeEventListener(kh,f),l=null}},createHref:e=>t(i,e),createURL:g,encodeLocation(e){let t=g(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:m,go:e=>s.go(e)};return y}(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return Eh("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:Ph(t)},0,e)}function xh(e,t){if(!1===e||null==e)throw new Error(t)}function _h(e,t){if(!e)try{throw new Error(t)}catch(n){}}function Th(e,t){return{usr:e.state,key:e.key,idx:t}}function Eh(e,t,n=null,r){return d(c({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Ch(t):t),{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function Ph({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function Ch(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Ah(e,t,n="/"){return function(e,t,n,r){let i="string"==typeof t?Ch(t):t,o=Wh(i.pathname||"/",n);if(null==o)return null;let s=Oh(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(s);let a=null;for(let l=0;null==a&&l<s.length;++l){let e=Bh(o);a=Vh(s[l],e,r)}return a}(e,t,n,!1)}function Oh(e,t=[],n=[],r="",i=!1){let o=(e,o,s=i,a)=>{let l={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&s)return;xh(l.relativePath.startsWith(r),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(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=$h([r,l.relativePath]),c=n.concat(l);e.children&&e.children.length>0&&(xh(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(u,'".')),Oh(e.children,t,c,u,s)),(null!=e.path||e.index)&&t.push({path:u,score:Fh(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(""!==e.path&&(null==(n=e.path)?void 0:n.includes("?")))for(let r of Rh(e.path))o(e,t,!0,r);else o(e,t)}),t}function Rh(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let s=Rh(r.join("/")),a=[];return a.push(...s.map(e=>""===e?o:[o,e].join("/"))),i&&a.push(...s),a.map(t=>e.startsWith("/")&&""===t?"/":t)}var jh=/^:[\w-]+$/,Lh=3,Mh=2,Dh=1,Ih=10,Nh=-2,Uh=e=>"*"===e;function Fh(e,t){let n=e.split("/"),r=n.length;return n.some(Uh)&&(r+=Nh),t&&(r+=Mh),n.filter(e=>!Uh(e)).reduce((e,t)=>e+(jh.test(t)?Lh:""===t?Dh:Ih),r)}function Vh(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let e=r[a],l=a===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=zh({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},u),d=e.route;if(!c&&l&&n&&!r[r.length-1].route.index&&(c=zh({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(i,c.params),s.push({params:i,pathname:$h([o,c.pathname]),pathnameBase:Gh($h([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=$h([o,c.pathnameBase]))}return s}function zh(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){_h("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=a[r]||"";s=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=a[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:s,pattern:e}}function Bh(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return _h(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function Wh(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 Hh(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function qh(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Kh(e,t,n,r=!1){let i;"string"==typeof e?i=Ch(e):(i=c({},e),xh(!i.pathname||!i.pathname.includes("?"),Hh("?","pathname","search",i)),xh(!i.pathname||!i.pathname.includes("#"),Hh("#","pathname","hash",i)),xh(!i.search||!i.search.includes("#"),Hh("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(null==a)o=n;else{let e=t.length-1;if(!r&&a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t="/"){let{pathname:n,search:r="",hash:i=""}="string"==typeof e?Ch(e):e,o=n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t;return{pathname:o,search:Yh(r),hash:Jh(i)}}(i,o),u=a&&"/"!==a&&a.endsWith("/"),d=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!d||(l.pathname+="/"),l}var $h=e=>e.join("/").replace(/\/\/+/g,"/"),Gh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Yh=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Jh=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var Qh=["POST","PUT","PATCH","DELETE"];new Set(Qh);var Xh=["GET",...Qh];new Set(Xh);var Zh=ne.createContext(null);Zh.displayName="DataRouter";var ef=ne.createContext(null);ef.displayName="DataRouterState",ne.createContext(!1);var tf=ne.createContext({isTransitioning:!1});tf.displayName="ViewTransition",ne.createContext(new Map).displayName="Fetchers",ne.createContext(null).displayName="Await";var nf=ne.createContext(null);nf.displayName="Navigation";var rf=ne.createContext(null);rf.displayName="Location";var of=ne.createContext({outlet:null,matches:[],isDataRoute:!1});of.displayName="Route";var sf=ne.createContext(null);function af(){return null!=ne.useContext(rf)}function lf(){return xh(af(),"useLocation() may be used only in the context of a <Router> component."),ne.useContext(rf).location}sf.displayName="RouteError";var uf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function cf(e){ne.useContext(nf).static||ne.useLayoutEffect(e)}function df(){let{isDataRoute:e}=ne.useContext(of);return e?function(){let{router:e}=function(e){let t=ne.useContext(Zh);return xh(t,bf(e)),t}("useNavigate"),t=wf("useNavigate"),n=ne.useRef(!1);return cf(()=>{n.current=!0}),ne.useCallback((r,...i)=>p(this,[r,...i],function*(r,i={}){_h(n.current,uf),n.current&&("number"==typeof r?e.navigate(r):yield e.navigate(r,c({fromRouteId:t},i)))}),[e,t])}():function(){xh(af(),"useNavigate() may be used only in the context of a <Router> component.");let e=ne.useContext(Zh),{basename:t,navigator:n}=ne.useContext(nf),{matches:r}=ne.useContext(of),{pathname:i}=lf(),o=JSON.stringify(qh(r)),s=ne.useRef(!1);return cf(()=>{s.current=!0}),ne.useCallback((r,a={})=>{if(_h(s.current,uf),!s.current)return;if("number"==typeof r)return void n.go(r);let l=Kh(r,JSON.parse(o),i,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:$h([t,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)},[t,n,o,i,e])}()}function hf(){let{matches:e}=ne.useContext(of),t=e[e.length-1];return t?t.params:{}}function ff(e,{relative:t}={}){let{matches:n}=ne.useContext(of),{pathname:r}=lf(),i=JSON.stringify(qh(n));return ne.useMemo(()=>Kh(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function pf(e,t,n,r,i){var o;xh(af(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=ne.useContext(nf),{matches:a}=ne.useContext(of),l=a[a.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",f=l&&l.route;{let e=f&&f.path||"";Sf(d,!f||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let p,m=lf();if(t){let e="string"==typeof t?Ch(t):t;xh("/"===h||(null==(o=e.pathname)?void 0:o.startsWith(h)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),p=e}else p=m;let g=p.pathname||"/",y=g;if("/"!==h){let e=h.replace(/^\//,"").split("/");y="/"+g.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=Ah(e,{pathname:y});_h(f||null!=v,'No routes matched location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" ')),_h(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,'Matched leaf route at location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let b=function(e,t=[],n=null,r=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,o=null==n?void 0:n.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));xh(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(o).join(","))),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let e=i[l];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(a=l),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){s=!0,i=a>=0?i.slice(0,a+1):[i[0]];break}}}return i.reduceRight((e,l,u)=>{let c,d=!1,h=null,f=null;n&&(c=o&&l.route.id?o[l.route.id]:void 0,h=l.route.errorElement||gf,s&&(a<0&&0===u?(Sf("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):a===u&&(d=!0,f=l.route.hydrateFallbackElement||null)));let p=t.concat(i.slice(0,u+1)),m=()=>{let t;return t=c?h:d?f:l.route.Component?ne.createElement(l.route.Component,null):l.route.element?l.route.element:e,ne.createElement(vf,{match:l,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(l.route.ErrorBoundary||l.route.errorElement||0===u)?ne.createElement(yf,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0},unstable_onError:r}):m()},null)}(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:$h([h,s.encodeLocation?s.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:$h([h,s.encodeLocation?s.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r,i);return t&&b?ne.createElement(rf.Provider,{value:{location:c({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:"POP"}},b):b}function mf(){let e=function(){var e;let t=ne.useContext(sf),n=function(e){let t=ne.useContext(ef);return xh(t,bf(e)),t}("useRouteError"),r=wf("useRouteError");if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return s=ne.createElement(ne.Fragment,null,ne.createElement("p",null,"💿 Hey developer 👋"),ne.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",ne.createElement("code",{style:o},"ErrorBoundary")," or"," ",ne.createElement("code",{style:o},"errorElement")," prop on your route.")),ne.createElement(ne.Fragment,null,ne.createElement("h2",null,"Unexpected Application Error!"),ne.createElement("h3",{style:{fontStyle:"italic"}},t),n?ne.createElement("pre",{style:i},n):null,s)}ne.createContext(null);var gf=ne.createElement(mf,null),yf=class extends ne.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError&&this.props.unstable_onError(e,t)}render(){return void 0!==this.state.error?ne.createElement(of.Provider,{value:this.props.routeContext},ne.createElement(sf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function vf({routeContext:e,match:t,children:n}){let r=ne.useContext(Zh);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),ne.createElement(of.Provider,{value:e},n)}function bf(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function wf(e){let t=function(e){let t=ne.useContext(of);return xh(t,bf(e)),t}(e),n=t.matches[t.matches.length-1];return xh(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}var kf={};function Sf(e,t,n){t||kf[e]||(kf[e]=!0,_h(!1,n))}function xf({to:e,replace:t,state:n,relative:r}){xh(af(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=ne.useContext(nf);_h(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=ne.useContext(of),{pathname:s}=lf(),a=df(),l=Kh(e,qh(o),s,"path"===r),u=JSON.stringify(l);return ne.useEffect(()=>{a(JSON.parse(u),{replace:t,state:n,relative:r})},[a,u,r,t,n]),null}function _f(e){xh(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Tf({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){xh(!af(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=ne.useMemo(()=>({basename:s,navigator:i,static:o,future:{}}),[s,i,o]);"string"==typeof n&&(n=Ch(n));let{pathname:l="/",search:u="",hash:c="",state:d=null,key:h="default"}=n,f=ne.useMemo(()=>{let e=Wh(l,s);return null==e?null:{location:{pathname:e,search:u,hash:c,state:d,key:h},navigationType:r}},[s,l,u,c,d,h,r]);return _h(null!=f,'<Router basename="'.concat(s,'"> is not able to match the URL "').concat(l).concat(u).concat(c,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==f?null:ne.createElement(nf.Provider,{value:a},ne.createElement(rf.Provider,{children:t,value:f}))}function Ef({children:e,location:t}){return pf(Pf(e),t)}function Pf(e,t=[]){let n=[];return ne.Children.forEach(e,(e,r)=>{if(!ne.isValidElement(e))return;let i=[...t,r];if(e.type===ne.Fragment)return void n.push.apply(n,Pf(e.props.children,i));xh(e.type===_f,"[".concat("string"==typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),xh(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=Pf(e.props.children,i)),n.push(o)}),n}ne.memo(function({routes:e,future:t,state:n,unstable_onError:r}){return pf(e,void 0,n,r,t)});var Cf="get",Af="application/x-www-form-urlencoded";function Of(e){return null!=e&&"string"==typeof e.tagName}var Rf=null;var jf=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lf(e){return null==e||jf.has(e)?e:(_h(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Af,'"')),null)}function Mf(e,t){let n,r,i,o,s;if(Of(a=e)&&"form"===a.tagName.toLowerCase()){let s=e.getAttribute("action");r=s?Wh(s,t):null,n=e.getAttribute("method")||Cf,i=Lf(e.getAttribute("enctype"))||Af,o=new FormData(e)}else if(function(e){return Of(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Of(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let a=e.getAttribute("formaction")||s.getAttribute("action");if(r=a?Wh(a,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Cf,i=Lf(e.getAttribute("formenctype"))||Lf(s.getAttribute("enctype"))||Af,o=new FormData(s,e),!function(){if(null===Rf)try{new FormData(document.createElement("form"),0),Rf=!1}catch(e){Rf=!0}return Rf}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?"".concat(t,"."):"";o.append("".concat(e,"x"),"0"),o.append("".concat(e,"y"),"0")}else t&&o.append(t,r)}}else{if(Of(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Cf,r=null,i=Af,s=e}var a;return o&&"text/plain"===i&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}function Df(e,t){if(!1===e||null==e)throw new Error(t)}function If(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Nf(e,t,n){return p(this,null,function*(){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((yield Promise.all(e.map(e=>p(this,null,function*(){let r=t.routes[e.route.id];if(r){let e=yield function(e,t){return p(this,null,function*(){if(e.id in t)return t[e.id];try{let n=yield import(e.module);return t[e.id]=n,n}catch(n){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}})}(r,n);return e.links?e.links():[]}return[]})))).flat(1).filter(If).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?d(c({},e),{rel:"prefetch",as:"style"}):d(c({},e),{rel:"prefetch"})))})}function Uf(e,t,n,r,i,o){let s=(e,t)=>!n[t]||e.route.id!==n[t].route.id,a=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null==(r=n[t].route.path)?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>s(e,t)||a(e,t)):"data"===o?t.filter((t,o)=>{var l;let u=r.routes[t.route.id];if(!u||!u.hasLoader)return!1;if(s(t,o)||a(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=n[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Ff(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Vf(){let e=ne.useContext(Zh);return Df(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zf=ne.createContext(void 0);function Bf(){let e=ne.useContext(zf);return Df(e,"You must render this element inside a <HydratedRouter> element"),e}function Wf(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Hf(e){var t=e,{page:n}=t,r=h(t,["page"]);let{router:i}=Vf(),o=ne.useMemo(()=>Ah(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?ne.createElement(qf,c({page:n,matches:o},r)):null}function qf(e){var t=e,{page:n,matches:r}=t,i=h(t,["page","matches"]);let o=lf(),{manifest:s,routeModules:a}=Bf(),{basename:l}=Vf(),{loaderData:u,matches:d}=function(){let e=ne.useContext(ef);return Df(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),f=ne.useMemo(()=>Uf(n,r,d,s,o,"data"),[n,r,d,s,o]),p=ne.useMemo(()=>Uf(n,r,d,s,o,"assets"),[n,r,d,s,o]),m=ne.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let e=new Set,t=!1;if(r.forEach(n=>{var r;let i=s.routes[n.route.id];i&&i.hasLoader&&(!f.some(e=>e.route.id===n.route.id)&&n.route.id in u&&(null==(r=a[n.route.id])?void 0:r.shouldRevalidate)||i.hasClientLoader?t=!0:e.add(n.route.id))}),0===e.size)return[];let i=function(e,t,n){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname="_root.".concat(n):t&&"/"===Wh(r.pathname,t)?r.pathname="".concat(t.replace(/\/$/,""),"/_root.").concat(n):r.pathname="".concat(r.pathname.replace(/\/$/,""),".").concat(n),r}(n,l,"data");return t&&e.size>0&&i.searchParams.set("_routes",r.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[i.pathname+i.search]},[l,u,o,s,f,r,n,a]),g=ne.useMemo(()=>Ff(p,s),[p,s]),y=function(e){let{manifest:t,routeModules:n}=Bf(),[r,i]=ne.useState([]);return ne.useEffect(()=>{let r=!1;return Nf(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}(p);return ne.createElement(ne.Fragment,null,m.map(e=>ne.createElement("link",c({key:e,rel:"prefetch",as:"fetch",href:e},i))),g.map(e=>ne.createElement("link",c({key:e,rel:"modulepreload",href:e},i))),y.map(({key:e,link:t})=>ne.createElement("link",c({key:e,nonce:i.nonce},t))))}function Kf(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}zf.displayName="FrameworkContext";var $f="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{$f&&(window.__reactRouterVersion="7.8.2")}catch(qT){}function Gf({basename:e,children:t,window:n}){let r=ne.useRef();null==r.current&&(r.current=Sh({window:n,v5Compat:!0}));let i=r.current,[o,s]=ne.useState({action:i.action,location:i.location}),a=ne.useCallback(e=>{ne.startTransition(()=>s(e))},[s]);return ne.useLayoutEffect(()=>i.listen(a),[i,a]),ne.createElement(Tf,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Yf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jf=ne.forwardRef(function(e,t){var n=e,{onClick:r,discover:i="render",prefetch:o="none",relative:s,reloadDocument:a,replace:l,state:u,target:f,to:p,preventScrollReset:m,viewTransition:g}=n,y=h(n,["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"]);let v,{basename:b}=ne.useContext(nf),w="string"==typeof p&&Yf.test(p),k=!1;if("string"==typeof p&&w&&(v=p,$f))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),n=Wh(t.pathname,b);t.origin===e.origin&&null!=n?p=n+t.search+t.hash:k=!0}catch(qT){_h(!1,'<Link to="'.concat(p,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}let S=function(e,{relative:t}={}){xh(af(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=ne.useContext(nf),{hash:i,pathname:o,search:s}=ff(e,{relative:t}),a=o;return"/"!==n&&(a="/"===o?n:$h([n,o])),r.createHref({pathname:a,search:s,hash:i})}(p,{relative:s}),[x,_,T]=function(e,t){let n=ne.useContext(zf),[r,i]=ne.useState(!1),[o,s]=ne.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=ne.useRef(null);ne.useEffect(()=>{if("render"===e&&s(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}},[e]),ne.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let f=()=>{i(!0)},p=()=>{i(!1),s(!1)};return n?"intent"!==e?[o,h,{}]:[o,h,{onFocus:Wf(a,f),onBlur:Wf(l,p),onMouseEnter:Wf(u,f),onMouseLeave:Wf(c,p),onTouchStart:Wf(d,f)}]:[!1,h,{}]}(o,y),E=function(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:s}={}){let a=df(),l=lf(),u=ff(e,{relative:o});return ne.useCallback(c=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(c,t)){c.preventDefault();let t=void 0!==n?n:Ph(l)===Ph(u);a(e,{replace:t,state:r,preventScrollReset:i,relative:o,viewTransition:s})}},[l,a,u,n,r,t,e,i,o,s])}(p,{replace:l,state:u,target:f,preventScrollReset:m,relative:s,viewTransition:g});let P=ne.createElement("a",d(c(c({},y),T),{href:v||S,onClick:k||a?r:function(e){r&&r(e),e.defaultPrevented||E(e)},ref:Kf(t,_),target:f,"data-discover":w||"render"!==i?void 0:"true"}));return x&&!w?ne.createElement(ne.Fragment,null,P,ne.createElement(Hf,{page:S})):P});function Qf(e){let t=ne.useContext(Zh);return xh(t,function(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}(e)),t}Jf.displayName="Link",ne.forwardRef(function(e,t){var n=e,{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,viewTransition:u,children:f}=n,p=h(n,["aria-current","caseSensitive","className","end","style","to","viewTransition","children"]);let m=ff(l,{relative:p.relative}),g=lf(),y=ne.useContext(ef),{navigator:v,basename:b}=ne.useContext(nf),w=null!=y&&function(e,{relative:t}={}){let n=ne.useContext(tf);xh(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Qf("useViewTransitionState"),i=ff(e,{relative:t});if(!n.isTransitioning)return!1;let o=Wh(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Wh(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=zh(i.pathname,s)||null!=zh(i.pathname,o)}(m)&&!0===u,k=v.encodeLocation?v.encodeLocation(m).pathname:m.pathname,S=g.pathname,x=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;i||(S=S.toLowerCase(),x=x?x.toLowerCase():null,k=k.toLowerCase()),x&&b&&(x=Wh(x,b)||x);const _="/"!==k&&k.endsWith("/")?k.length-1:k.length;let T,E=S===k||!s&&S.startsWith(k)&&"/"===S.charAt(_),P=null!=x&&(x===k||!s&&x.startsWith(k)&&"/"===x.charAt(k.length)),C={isActive:E,isPending:P,isTransitioning:w},A=E?r:void 0;T="function"==typeof o?o(C):[o,E?"active":null,P?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let O="function"==typeof a?a(C):a;return ne.createElement(Jf,d(c({},p),{"aria-current":A,className:T,ref:t,style:O,to:l,viewTransition:u}),"function"==typeof f?f(C):f)}).displayName="NavLink",ne.forwardRef((e,t)=>{var n=e,{discover:r="render",fetcherKey:i,navigate:o,reloadDocument:s,replace:a,state:l,method:u=Cf,action:f,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:v}=n,b=h(n,["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"]);let w=function(){let{router:e}=Qf("useSubmit"),{basename:t}=ne.useContext(nf),n=wf("useRouteId");return ne.useCallback((r,...i)=>p(this,[r,...i],function*(r,i={}){let{action:o,method:s,encType:a,formData:l,body:u}=Mf(r,t);if(!1===i.navigate){let t=i.fetcherKey||Zf();yield e.fetch(t,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||a,flushSync:i.flushSync})}else yield e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||s,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})}),[e,t,n])}(),k=function(e,{relative:t}={}){let{basename:n}=ne.useContext(nf),r=ne.useContext(of);xh(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o=c({},ff(e||".",{relative:t})),s=lf();if(null==e){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?"?".concat(n):""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(o.pathname="/"===o.pathname?n:$h([n,o.pathname]));return Ph(o)}(f,{relative:g}),S="get"===u.toLowerCase()?"get":"post",x="string"==typeof f&&Yf.test(f);return ne.createElement("form",d(c({ref:t,method:S,action:k,onSubmit:s?m:e=>{if(m&&m(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null==t?void 0:t.getAttribute("formmethod"))||u;w(t||e.currentTarget,{fetcherKey:i,method:n,navigate:o,replace:a,state:l,relative:g,preventScrollReset:y,viewTransition:v})}},b),{"data-discover":x||"render"!==r?void 0:"true"}))}).displayName="Form";var Xf=0,Zf=()=>"__".concat(String(++Xf),"__");const ep=ne.createContext({});function tp(e){const t=ne.useRef(null);return null===t.current&&(t.current=e()),t.current}const np="undefined"!=typeof window,rp=np?ne.useLayoutEffect:ne.useEffect,ip=ne.createContext(null);function op(e,t){-1===e.indexOf(t)&&e.push(t)}function sp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ap=(e,t,n)=>n>t?t:n<e?e:n;const lp={},up=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function cp(e){return"object"==typeof e&&null!==e}const dp=e=>/^0[^.\s]+$/u.test(e);function hp(e){let t;return()=>(void 0===t&&(t=e()),t)}const fp=e=>e,pp=(e,t)=>n=>t(e(n)),mp=(...e)=>e.reduce(pp),gp=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class yp{constructor(){this.subscriptions=[]}add(e){return op(this.subscriptions,e),()=>sp(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vp=e=>1e3*e,bp=e=>e/1e3;function wp(e,t){return t?e*(1e3/t):0}const kp=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Sp(e,t,n,r){if(e===t&&n===r)return fp;const i=t=>function(e,t,n,r,i){let o,s,a=0;do{s=t+(n-t)/2,o=kp(s,r,i)-e,o>0?n=s:t=s}while(Math.abs(o)>1e-7&&++a<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:kp(i(e),t,r)}const xp=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_p=e=>t=>1-e(1-t),Tp=Sp(.33,1.53,.69,.99),Ep=_p(Tp),Pp=xp(Ep),Cp=e=>(e*=2)<1?.5*Ep(e):.5*(2-Math.pow(2,-10*(e-1))),Ap=e=>1-Math.sin(Math.acos(e)),Op=_p(Ap),Rp=xp(Ap),jp=Sp(.42,0,1,1),Lp=Sp(0,0,.58,1),Mp=Sp(.42,0,.58,1),Dp=e=>Array.isArray(e)&&"number"==typeof e[0],Ip={linear:fp,easeIn:jp,easeInOut:Mp,easeOut:Lp,circIn:Ap,circInOut:Rp,circOut:Op,backIn:Ep,backInOut:Pp,backOut:Tp,anticipate:Cp},Np=e=>{if(Dp(e)){e.length;const[t,n,r,i]=e;return Sp(t,n,r,i)}return"string"==typeof e?Ip[e]:e},Up=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fp(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=Up.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){o.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,i=!1,s=!1)=>{const a=s&&r?t:n;return i&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{s=e,r?i=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,i&&(i=!1,l.process(e)))}};return l}(o),e),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:h,render:f,postRender:p}=s,m=()=>{const o=lp.useManualTiming?i.timestamp:performance.now();n=!1,lp.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),d.process(i),h.process(i),f.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:Up.reduce((t,o)=>{const a=s[o];return t[o]=(t,o=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(m)),a.schedule(t,o,s)),t},{}),cancel:e=>{for(let t=0;t<Up.length;t++)s[Up[t]].cancel(e)},state:i,steps:s}}const{schedule:Vp,cancel:zp,state:Bp,steps:Wp}=Fp("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:fp,!0);let Hp;function qp(){Hp=void 0}const Kp={now:()=>(void 0===Hp&&Kp.set(Bp.isProcessing||lp.useManualTiming?Bp.timestamp:performance.now()),Hp),set:e=>{Hp=e,queueMicrotask(qp)}},$p=e=>t=>"string"==typeof t&&t.startsWith(e),Gp=$p("--"),Yp=$p("var(--"),Jp=e=>!!Yp(e)&&Qp.test(e.split("/*")[0].trim()),Qp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Xp={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Zp=d(c({},Xp),{transform:e=>ap(0,1,e)}),em=d(c({},Xp),{default:1}),tm=e=>Math.round(1e5*e)/1e5,nm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const rm=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,im=(e,t)=>n=>Boolean("string"==typeof n&&rm.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),om=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[i,o,s,a]=r.match(nm);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},sm=d(c({},Xp),{transform:e=>Math.round((e=>ap(0,255,e))(e))}),am={test:im("rgb","red"),parse:om("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sm.transform(e)+", "+sm.transform(t)+", "+sm.transform(n)+", "+tm(Zp.transform(r))+")"};const lm={test:im("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:am.transform},um=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),cm=um("deg"),dm=um("%"),hm=um("px"),fm=um("vh"),pm=um("vw"),mm=(()=>d(c({},dm),{parse:e=>dm.parse(e)/100,transform:e=>dm.transform(100*e)}))(),gm={test:im("hsl","hue"),parse:om("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+dm.transform(tm(t))+", "+dm.transform(tm(n))+", "+tm(Zp.transform(r))+")"},ym={test:e=>am.test(e)||lm.test(e)||gm.test(e),parse:e=>am.test(e)?am.parse(e):gm.test(e)?gm.parse(e):lm.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?am.transform(e):gm.transform(e),getAnimatableNone:e=>{const t=ym.parse(e);return t.alpha=0,ym.transform(t)}},vm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const bm="number",wm="color",km=/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 Sm(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(km,e=>(ym.test(e)?(r.color.push(o),i.push(wm),n.push(ym.parse(e))):e.startsWith("var(")?(r.var.push(o),i.push("var"),n.push(e)):(r.number.push(o),i.push(bm),n.push(parseFloat(e))),++o,"${}")).split("${}");return{values:n,split:s,indexes:r,types:i}}function xm(e){return Sm(e).values}function _m(e){const{split:t,types:n}=Sm(e),r=t.length;return e=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],void 0!==e[o]){const t=n[o];i+=t===bm?tm(e[o]):t===wm?ym.transform(e[o]):e[o]}return i}}const Tm=e=>"number"==typeof e?0:ym.test(e)?ym.getAnimatableNone(e):e;const Em={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(nm))?void 0:t.length)||0)+((null==(n=e.match(vm))?void 0:n.length)||0)>0},parse:xm,createTransformer:_m,getAnimatableNone:function(e){const t=xm(e);return _m(e)(t.map(Tm))}};function Pm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Cm(e,t){return n=>n>0?t:e}const Am=(e,t,n)=>e+(t-e)*n,Om=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Rm=[lm,am,gm];function jm(e){const t=(n=e,Rm.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===gm&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,o=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;i=Pm(a,r,e+1/3),o=Pm(a,r,e),s=Pm(a,r,e-1/3)}else i=o=s=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*s),alpha:r}}(r)),r}const Lm=(e,t)=>{const n=jm(e),r=jm(t);if(!n||!r)return Cm(e,t);const i=c({},n);return e=>(i.red=Om(n.red,r.red,e),i.green=Om(n.green,r.green,e),i.blue=Om(n.blue,r.blue,e),i.alpha=Am(n.alpha,r.alpha,e),am.transform(i))},Mm=new Set(["none","hidden"]);function Dm(e,t){return n=>Am(e,t,n)}function Im(e){return"number"==typeof e?Dm:"string"==typeof e?Jp(e)?Cm:ym.test(e)?Lm:Fm:Array.isArray(e)?Nm:"object"==typeof e?ym.test(e)?Lm:Um:Cm}function Nm(e,t){const n=[...e],r=n.length,i=e.map((e,n)=>Im(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Um(e,t){const n=c(c({},e),t),r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=Im(e[i])(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Fm=(e,t)=>{const n=Em.createTransformer(t),r=Sm(e),i=Sm(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Mm.has(e)&&!i.values.length||Mm.has(t)&&!r.values.length?function(e,t){return Mm.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):mp(Nm(function(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],l=null!=(n=e.values[a])?n:0;r[o]=l,i[s]++}return r}(r,i),i.values),n):Cm(e,t)};function Vm(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Am(e,t,n);return Im(e)(e,t)}const zm=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Vp.update(t,e),stop:()=>zp(t),now:()=>Bp.isProcessing?Bp.timestamp:Kp.now()}},Bm=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=Math.round(1e4*e(o/(i-1)))/1e4+", ";return"linear(".concat(r.substring(0,r.length-2),")")},Wm=2e4;function Hm(e){let t=0;let n=e.next(t);for(;!n.done&&t<Wm;)t+=50,n=e.next(t);return t>=Wm?1/0:t}function qm(e,t,n){const r=Math.max(t-5,0);return wp(n-e(r),t-r)}const Km=100,$m=10,Gm=1,Ym=0,Jm=800,Qm=.3,Xm=.3,Zm={granular:.01,default:2},eg={granular:.005,default:.5},tg=.01,ng=10,rg=.05,ig=1,og=.001;function sg({duration:e=Jm,bounce:t=Qm,velocity:n=Ym,mass:r=Gm}){let i,o,s=1-t;s=ap(rg,ig,s),e=ap(tg,ng,bp(e)),s<1?(i=t=>{const r=t*s,i=r*e,o=r-n,a=lg(t,s),l=Math.exp(-i);return og-o/a*l},o=t=>{const r=t*s*e,o=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=lg(Math.pow(t,2),s);return(-i(t)+og>0?-1:1)*((o-a)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let i=1;i<ag;i++)r-=e(r)/t(r);return r}(i,o,5/e);if(e=vp(e),isNaN(a))return{stiffness:Km,damping:$m,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}const ag=12;function lg(e,t){return e*Math.sqrt(1-t*t)}const ug=["duration","bounce"],cg=["stiffness","damping","mass"];function dg(e,t){return t.some(t=>void 0!==e[t])}function hg(e=Xm,t=Qm){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:h,duration:f,velocity:p,isResolvedFromDuration:m}=function(e){let t=c({velocity:Ym,stiffness:Km,damping:$m,mass:Gm,isResolvedFromDuration:!1},e);if(!dg(e,cg)&&dg(e,ug))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),i=r*r,o=2*ap(.05,1,1-(e.bounce||0))*Math.sqrt(i);t=d(c({},t),{mass:Gm,stiffness:i,damping:o})}else{const n=sg(e);t=d(c(c({},t),n),{mass:Gm}),t.isResolvedFromDuration=!0}return t}(d(c({},n),{velocity:-bp(n.velocity||0)})),g=p||0,y=u/(2*Math.sqrt(l*h)),v=s-o,b=bp(Math.sqrt(l/h)),w=Math.abs(v)<5;let k;if(r||(r=w?Zm.granular:Zm.default),i||(i=w?eg.granular:eg.default),y<1){const e=lg(b,y);k=t=>{const n=Math.exp(-y*b*t);return s-n*((g+y*b*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}}else if(1===y)k=e=>s-Math.exp(-b*e)*(v+(g+b*v)*e);else{const e=b*Math.sqrt(y*y-1);k=t=>{const n=Math.exp(-y*b*t),r=Math.min(e*t,300);return s-n*((g+y*b*v)*Math.sinh(r)+e*v*Math.cosh(r))/e}}const S={calculatedDuration:m&&f||null,next:e=>{const t=k(e);if(m)a.done=e>=f;else{let n=0===e?g:0;y<1&&(n=0===e?vp(g):qm(k,e,t));const o=Math.abs(n)<=r,l=Math.abs(s-t)<=i;a.done=o&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(Hm(S),Wm),t=Bm(t=>S.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return S}function fg({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],h={done:!1,value:d},f=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let p=n*t;const m=d+p,g=void 0===s?m:s(m);g!==m&&(p=g-d);const y=e=>-p*Math.exp(-e/r),v=e=>g+y(e),b=e=>{const t=y(e),n=v(e);h.done=Math.abs(t)<=u,h.value=h.done?g:n};let w,k;const S=e=>{var t;(t=h.value,void 0!==a&&t<a||void 0!==l&&t>l)&&(w=e,k=hg({keyframes:[h.value,f(h.value)],velocity:qm(v,e,h.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return k||void 0!==w||(t=!0,b(e),S(e)),void 0!==w&&e>=w?k.next(e-w):(!t&&b(e),h)}}}function pg(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(t.length,1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],i=n||lp.mix||Vm,o=e.length-1;for(let s=0;s<o;s++){let n=i(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||fp:t;n=mp(e,n)}r.push(n)}return r}(t,r,i),l=a.length,u=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const i=gp(e[r],e[r+1],n);return a[r](i)};return n?t=>u(ap(e[0],e[o-1],t)):u}function mg(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=gp(0,t,r);e.push(Am(n,1,i))}}(t,e.length-1),t}function gg({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Np):Np(r),o={done:!1,value:t[0]},s=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:mg(t),e),a=pg(s,t,{ease:Array.isArray(i)?i:(l=t,u=i,l.map(()=>u||Mp).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(o.value=a(t),o.done=t>=e,o)}}hg.applyToOptions=e=>{const t=function(e,t=100,n){const r=n(d(c({},e),{keyframes:[0,t]})),i=Math.min(Hm(r),Wm);return{type:"keyframes",ease:e=>r.next(i*e).value/t,duration:bp(i)}}(e,100,hg);return e.ease=t.ease,e.duration=vp(t.duration),e.type="keyframes",e};const yg=e=>null!==e;function vg(e,{repeat:t,repeatType:n="loop"},r,i=1){const o=e.filter(yg),s=i<0||t&&"loop"!==n&&t%2==1?0:o.length-1;return s&&void 0!==r?r:o[s]}const bg={decay:fg,inertia:fg,tween:gg,keyframes:gg,spring:hg};function wg(e){"string"==typeof e.type&&(e.type=bg[e.type])}class kg{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Sg=e=>e/100;class xg extends kg{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==Kp.now()&&this.tick(Kp.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;wg(e);const{type:t=gg,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:o=0}=e;let{keyframes:s}=e;const a=t||gg;a!==gg&&"number"!=typeof s[0]&&(this.mixKeyframes=mp(Sg,Vm(s[0],s[1])),s=[0,100]);const l=a(d(c({},e),{keyframes:s}));"mirror"===i&&(this.mirroredGenerator=a(d(c({},e),{keyframes:[...s].reverse(),velocity:-o}))),null===l.calculatedDuration&&(l.calculatedDuration=Hm(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:s,calculatedDuration:a}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:h,type:f,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let v=this.currentTime,b=n;if(c){const e=Math.min(this.currentTime,r)/s;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,h&&(n-=h/s)):"mirror"===d&&(b=o)),v=ap(0,1,n)*s}const w=y?{done:!1,value:u[0]}:b.next(v);i&&(w.value=i(w.value));let{done:k}=w;y||null===a||(k=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&k);return S&&f!==fg&&(w.value=vg(u,this.options,m,this.speed)),p&&p(w.value),S&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return bp(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+bp(e)}get time(){return bp(this.currentTime)}set time(e){var t;e=vp(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null==(t=this.driver)||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Kp.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=bp(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=zm,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=null!=r?r:i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Kp.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const _g=e=>180*e/Math.PI,Tg=e=>{const t=_g(Math.atan2(e[1],e[0]));return Pg(t)},Eg={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tg,rotateZ:Tg,skewX:e=>_g(Math.atan(e[1])),skewY:e=>_g(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pg=e=>((e%=360)<0&&(e+=360),e),Cg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ag=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Og={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Cg,scaleY:Ag,scale:e=>(Cg(e)+Ag(e))/2,rotateX:e=>Pg(_g(Math.atan2(e[6],e[5]))),rotateY:e=>Pg(_g(Math.atan2(-e[2],e[0]))),rotateZ:Tg,rotate:Tg,skewX:e=>_g(Math.atan(e[4])),skewY:e=>_g(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Rg(e){return e.includes("scale")?1:0}function jg(e,t){if(!e||"none"===e)return Rg(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Og,i=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Eg,i=t}if(!i)return Rg(t);const o=r[t],s=i[1].split(",").map(Lg);return"function"==typeof o?o(s):s[o]}function Lg(e){return parseFloat(e.trim())}const Mg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dg=(()=>new Set(Mg))(),Ig=e=>e===Xp||e===hm,Ng=new Set(["x","y","z"]),Ug=Mg.filter(e=>!Ng.has(e));const Fg={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:(e,{transform:t})=>jg(t,"x"),y:(e,{transform:t})=>jg(t,"y")};Fg.translateX=Fg.x,Fg.translateY=Fg.y;const Vg=new Set;let zg=!1,Bg=!1,Wg=!1;function Hg(){if(Bg){const e=Array.from(Vg).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return Ug.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Bg=!1,zg=!1,Vg.forEach(e=>e.complete(Wg)),Vg.clear()}function qg(){Vg.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bg=!0)})}class Kg{constructor(e,t,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Vg.add(this),zg||(zg=!0,Vp.read(qg),Vp.resolveKeyframes(Hg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const i=null==r?void 0:r.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){const r=n.readValue(t,o);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=o),r&&void 0===i&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)null!=e[t]||(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Vg.delete(this)}cancel(){"scheduled"===this.state&&(Vg.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const $g=hp(()=>void 0!==window.ScrollTimeline),Gg={};function Yg(e,t){const n=hp(e);return()=>{var e;return null!=(e=Gg[t])?e:n()}}const Jg=Yg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(qT){return!1}return!0},"linearEasing"),Qg=([e,t,n,r])=>"cubic-bezier(".concat(e,", ").concat(t,", ").concat(n,", ").concat(r,")"),Xg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qg([0,.65,.55,1]),circOut:Qg([.55,0,1,.45]),backIn:Qg([.31,.01,.66,-.59]),backOut:Qg([.33,1.53,.69,.99])};function Zg(e,t){return e?"function"==typeof e?Jg()?Bm(e,t):"ease-out":Dp(e)?Qg(e):Array.isArray(e)?e.map(e=>Zg(e,t)||Xg.easeOut):Xg[e]:void 0}function ey(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Zg(a,i);Array.isArray(d)&&(c.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===s?"alternate":"normal"};u&&(h.pseudoElement=u);return e.animate(c,h)}function ty(e){return"function"==typeof e&&"applyToOptions"in e}class ny extends kg{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:s,onComplete:a}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,e.type;const l=function(e){var t=e,{type:n}=t,r=h(t,["type"]);return ty(n)&&Jg()?n.applyToOptions(r):(null!=r.duration||(r.duration=300),null!=r.ease||(r.ease="easeOut"),r)}(e);this.animation=ey(t,n,r,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=vg(r,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}null==a||a(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(qT){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return bp(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+bp(e)}get time(){return bp(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=vp(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var n;return this.allowFlatten&&(null==(n=this.animation.effect)||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&$g()?(this.animation.timeline=e,fp):t(this)}}const ry={anticipate:Cp,backInOut:Pp,circInOut:Rp};function iy(e){"string"==typeof e.ease&&e.ease in ry&&(e.ease=ry[e.ease])}class oy extends ny{constructor(e){iy(e),wg(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){var t;const n=this.options,{motionValue:r,onUpdate:i,onComplete:o,element:s}=n,a=h(n,["motionValue","onUpdate","onComplete","element"]);if(!r)return;if(void 0!==e)return void r.set(e);const l=new xg(d(c({},a),{autoplay:!1})),u=vp(null!=(t=this.finishedTime)?t:this.time);r.setWithVelocity(l.sample(u-10).value,l.sample(u).value,10),l.stop()}}const sy=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Em.test(e)&&"0"!==e||e.startsWith("url(")));function ay(e){e.duration=0,e.type="keyframes"}const ly=new Set(["opacity","clipPath","filter","transform"]),uy=hp(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class cy extends kg{constructor(e){var t,n=e,{autoplay:r=!0,delay:i=0,type:o="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:l="loop",keyframes:u,name:d,motionValue:f,element:p}=n,m=h(n,["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"]);super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=Kp.now();const g=c({autoplay:r,delay:i,type:o,repeat:s,repeatDelay:a,repeatType:l,name:d,motionValue:f,element:p},m),y=(null==p?void 0:p.KeyframeResolver)||Kg;this.keyframeResolver=new y(u,(e,t,n)=>this.onKeyframesResolved(e,t,g,!n),d,f,p),null==(t=this.keyframeResolver)||t.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:i,type:o,velocity:s,delay:a,isHandoff:l,onUpdate:u}=n;this.resolvedAt=Kp.now(),function(e,t,n,r){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],s=sy(i,t),a=sy(o,t);return!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||ty(n))&&r)}(e,i,o,s)||(!lp.instantAnimations&&a||null==u||u(vg(e,n,t)),e[0]=e[e.length-1],ay(n),n.repeat=0);const h=r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,f=d(c({startTime:h,finalKeyframe:t},n),{keyframes:e}),p=!l&&function(e){var t;const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:a}=e;if(!((null==(t=null==n?void 0:n.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return uy()&&r&&ly.has(r)&&("transform"!==r||!u)&&!l&&!i&&"mirror"!==o&&0!==s&&"inertia"!==a}(f)?new oy(d(c({},f),{element:f.motionValue.owner.current})):new xg(f);p.finished.then(()=>this.notifyFinished()).catch(fp),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),Wg=!0,qg(),Hg(),Wg=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}const dy=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function hy(e,t,n=1){const[r,i]=function(e){const t=dy.exec(e);if(!t)return[,];const[,n,r,i]=t;return["--".concat(null!=n?n:r),i]}(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const e=o.trim();return up(e)?parseFloat(e):e}return Jp(i)?hy(i,t,n+1):i}function fy(e,t){var n,r;return null!=(r=null!=(n=null==e?void 0:e[t])?n:null==e?void 0:e.default)?r:e}const py=new Set(["width","height","top","left","right","bottom",...Mg]),my=e=>t=>t.test(e),gy=[Xp,hm,dm,cm,pm,fm,{test:e=>"auto"===e,parse:e=>e}],yy=e=>gy.find(my(e));function vy(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||dp(e))}const by=new Set(["brightness","contrast","saturate","opacity"]);function wy(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(nm)||[];if(!r)return e;const i=n.replace(r,"");let o=by.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const ky=/\b([a-z-]*)\(.*?\)/gu,Sy=d(c({},Em),{getAnimatableNone:e=>{const t=e.match(ky);return t?t.map(wy).join(" "):e}}),xy=d(c({},Xp),{transform:Math.round}),_y=d(c({borderWidth:hm,borderTopWidth:hm,borderRightWidth:hm,borderBottomWidth:hm,borderLeftWidth:hm,borderRadius:hm,radius:hm,borderTopLeftRadius:hm,borderTopRightRadius:hm,borderBottomRightRadius:hm,borderBottomLeftRadius:hm,width:hm,maxWidth:hm,height:hm,maxHeight:hm,top:hm,right:hm,bottom:hm,left:hm,padding:hm,paddingTop:hm,paddingRight:hm,paddingBottom:hm,paddingLeft:hm,margin:hm,marginTop:hm,marginRight:hm,marginBottom:hm,marginLeft:hm,backgroundPositionX:hm,backgroundPositionY:hm},{rotate:cm,rotateX:cm,rotateY:cm,rotateZ:cm,scale:em,scaleX:em,scaleY:em,scaleZ:em,skew:cm,skewX:cm,skewY:cm,distance:hm,translateX:hm,translateY:hm,translateZ:hm,x:hm,y:hm,z:hm,perspective:hm,transformPerspective:hm,opacity:Zp,originX:mm,originY:mm,originZ:hm}),{zIndex:xy,fillOpacity:Zp,strokeOpacity:Zp,numOctaves:xy}),Ty=d(c({},_y),{color:ym,backgroundColor:ym,outlineColor:ym,fill:ym,stroke:ym,borderColor:ym,borderTopColor:ym,borderRightColor:ym,borderBottomColor:ym,borderLeftColor:ym,filter:Sy,WebkitFilter:Sy}),Ey=e=>Ty[e];function Py(e,t){let n=Ey(e);return n!==Sy&&(n=Em),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Cy=new Set(["auto","none","0"]);class Ay extends Kg{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let a=0;a<e.length;a++){let n=e[a];if("string"==typeof n&&(n=n.trim(),Jp(n))){const r=hy(n,t.current);void 0!==r&&(e[a]=r),a===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!py.has(n)||2!==e.length)return;const[r,i]=e,o=yy(r),s=yy(i);if(o!==s)if(Ig(o)&&Ig(s))for(let a=0;a<e.length;a++){const t=e[a];"string"==typeof t&&(e[a]=parseFloat(t))}else Fg[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||vy(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,i=0;for(;i<e.length&&!r;){const t=e[i];"string"==typeof t&&!Cy.has(t)&&Sm(t).values.length&&(r=e[i]),i++}if(r&&n)for(const o of t)e[o]=Py(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Fg[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Fg[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Oy=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Ry(e){return cp(e)&&"offsetHeight"in e}class jy{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const n=Kp.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Kp.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new yp);const n=this.events[e].add(t);return"change"===e?()=>{n(),Vp.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Kp.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return wp(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ly(e,t){return new jy(e,t)}const{schedule:My}=Fp(queueMicrotask,!1),Dy={x:!1,y:!1};function Iy(){return Dy.x||Dy.y}function Ny(e,t){const n=function(e,t,n){var r;if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const i=null!=(r=null==n?void 0:n[e])?r:t.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}(e),r=new AbortController;return[n,d(c({passive:!0},t),{signal:r.signal}),()=>r.abort()]}function Uy(e){return!("touch"===e.pointerType||Iy())}const Fy=(e,t)=>!!t&&(e===t||Fy(e,t.parentElement)),Vy=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,zy=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const By=new WeakSet;function Wy(e){return t=>{"Enter"===t.key&&e(t)}}function Hy(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function qy(e){return Vy(e)&&!Iy()}function Ky(e,t,n={}){const[r,i,o]=Ny(e,n),s=e=>{const r=e.currentTarget;if(!qy(e))return;By.add(r);const o=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),By.has(r)&&By.delete(r),qy(e)&&"function"==typeof o&&o(e,{success:t})},a=e=>{s(e,r===window||r===document||n.useGlobalTarget||Fy(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,i),window.addEventListener("pointercancel",l,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,i),Ry(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wy(()=>{if(By.has(n))return;Hy(n,"down");const e=Wy(()=>{Hy(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Hy(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,i)),t=e,zy.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function $y(e){return cp(e)&&"ownerSVGElement"in e}const Gy=e=>Boolean(e&&e.getVelocity),Yy=[...gy,ym,Em],Jy=ne.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Qy(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Xy(...e){return ne.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Qy(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Qy(e[t],null)}}}}(...e),e)}class Zy extends ne.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=t.offsetParent,n=Ry(e)&&e.offsetWidth||0,r=this.props.sizeRef.current;r.height=t.offsetHeight||0,r.width=t.offsetWidth||0,r.top=t.offsetTop,r.left=t.offsetLeft,r.right=n-r.width-r.left}return null}componentDidUpdate(){}render(){return this.props.children}}function ev({children:e,isPresent:t,anchorX:n,root:r}){const i=ne.useId(),o=ne.useRef(null),s=ne.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ne.useContext(Jy),l=Xy(o,null==e?void 0:e.ref);return ne.useInsertionEffect(()=>{const{width:e,height:l,top:u,left:c,right:d}=s.current;if(t||!o.current||!e||!l)return;const h="left"===n?"left: ".concat(c):"right: ".concat(d);o.current.dataset.motionPopId=i;const f=document.createElement("style");a&&(f.nonce=a);const p=null!=r?r:document.head;return p.appendChild(f),f.sheet&&f.sheet.insertRule('\n [data-motion-pop-id="'.concat(i,'"] {\n position: absolute !important;\n width: ').concat(e,"px !important;\n height: ").concat(l,"px !important;\n ").concat(h,"px !important;\n top: ").concat(u,"px !important;\n }\n ")),()=>{p.contains(f)&&p.removeChild(f)}},[t]),de.jsx(Zy,{isPresent:t,childRef:o,sizeRef:s,children:ne.cloneElement(e,{ref:l})})}const tv=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const u=tp(nv),d=ne.useId();let h=!0,f=ne.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(const t of u.values())if(!t)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return o&&h&&(f=c({},f)),ne.useMemo(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),ne.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),"popLayout"===s&&(e=de.jsx(ev,{isPresent:n,anchorX:a,root:l,children:e})),de.jsx(ip.Provider,{value:f,children:e})};function nv(){return new Map}function rv(e=!0){const t=ne.useContext(ip);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=ne.useId();ne.useEffect(()=>{if(e)return i(o)},[e]);const s=ne.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}const iv=e=>e.key||"";function ov(e){const t=[];return ne.Children.forEach(e,e=>{ne.isValidElement(e)&&t.push(e)}),t}const sv=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[u,c]=rv(s),d=ne.useMemo(()=>ov(e),[e]),h=s&&!u?[]:d.map(iv),f=ne.useRef(!0),p=ne.useRef(d),m=tp(()=>new Map),[g,y]=ne.useState(d),[v,b]=ne.useState(d);rp(()=>{f.current=!1,p.current=d;for(let e=0;e<v.length;e++){const t=iv(v[e]);h.includes(t)?m.delete(t):!0!==m.get(t)&&m.set(t,!1)}},[v,h.length,h.join("-")]);const w=[];if(d!==g){let e=[...d];for(let t=0;t<v.length;t++){const n=v[t],r=iv(n);h.includes(r)||(e.splice(t,0,n),w.push(n))}return"wait"===o&&w.length&&(e=w),b(ov(e)),y(d),null}const{forceRender:k}=ne.useContext(ep);return de.jsx(de.Fragment,{children:v.map(e=>{const g=iv(e),y=!(s&&!u)&&(d===v||h.includes(g));return de.jsx(tv,{isPresent:y,initial:!(f.current&&!n)&&void 0,custom:t,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:y?void 0:()=>{if(!m.has(g))return;m.set(g,!0);let e=!0;m.forEach(t=>{t||(e=!1)}),e&&(null==k||k(),b(p.current),s&&(null==c||c()),r&&r())},anchorX:a,children:e},g)})})},av=ne.createContext({strict:!1}),lv={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"]},uv={};for(const KT in lv)uv[KT]={isEnabled:e=>lv[KT].some(t=>!!e[t])};const cv=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 dv(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||cv.has(e)}let hv=e=>!dv(e);try{"function"==typeof(fv=require("@emotion/is-prop-valid").default)&&(hv=e=>e.startsWith("on")?!dv(e):fv(e))}catch(qT){}var fv;const pv=ne.createContext({});function mv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function gv(e){return"string"==typeof e||Array.isArray(e)}const yv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],vv=["initial",...yv];function bv(e){return mv(e.animate)||vv.some(t=>gv(e[t]))}function wv(e){return Boolean(bv(e)||e.variants)}function kv(e){const{initial:t,animate:n}=function(e,t){if(bv(e)){const{initial:t,animate:n}=e;return{initial:!1===t||gv(t)?t:void 0,animate:gv(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,ne.useContext(pv));return ne.useMemo(()=>({initial:t,animate:n}),[Sv(t),Sv(n)])}function Sv(e){return Array.isArray(e)?e.join(" "):e}const xv={};function _v(e,{layout:t,layoutId:n}){return Dg.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!xv[e]||"opacity"===e)}const Tv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ev=Mg.length;function Pv(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let s=!1,a=!1;for(const l in t){const e=t[l];if(Dg.has(l))s=!0;else if(Gp(l))i[l]=e;else{const t=Oy(e,_y[l]);l.startsWith("origin")?(a=!0,o[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",i=!0;for(let o=0;o<Ev;o++){const s=Mg[o],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Oy(a,_y[s]);l||(i=!1,r+="".concat(Tv[s]||s,"(").concat(e,") ")),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;r.transformOrigin="".concat(e," ").concat(t," ").concat(n)}}const Cv=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Av(e,t,n){for(const r in t)Gy(t[r])||_v(r,n)||(e[r]=t[r])}function Ov(e,t){const n={};return Av(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return ne.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Pv(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function Rv(e,t){const n={},r=Ov(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const jv={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lv={offset:"strokeDashoffset",array:"strokeDasharray"};function Mv(e,t,n,r,i){var o,s,a=t,{attrX:l,attrY:u,attrScale:c,pathLength:d,pathSpacing:f=1,pathOffset:p=0}=a;if(Pv(e,h(a,["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"]),r),n)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:m,style:g}=e;m.transform&&(g.transform=m.transform,delete m.transform),(g.transform||m.transformOrigin)&&(g.transformOrigin=null!=(o=m.transformOrigin)?o:"50% 50%",delete m.transformOrigin),g.transform&&(g.transformBox=null!=(s=null==i?void 0:i.transformBox)?s:"fill-box",delete m.transformBox),void 0!==l&&(m.x=l),void 0!==u&&(m.y=u),void 0!==c&&(m.scale=c),void 0!==d&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?jv:Lv;e[o.offset]=hm.transform(-r);const s=hm.transform(t),a=hm.transform(n);e[o.array]="".concat(s," ").concat(a)}(m,d,f,p,!1)}const Dv=()=>d(c({},{style:{},transform:{},transformOrigin:{},vars:{}}),{attrs:{}}),Iv=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Nv(e,t,n,r){const i=ne.useMemo(()=>{const n=Dv();return Mv(n,t,Iv(r),e.transformTemplate,e.style),d(c({},n.attrs),{style:c({},n.style)})},[t]);if(e.style){const t={};Av(t,e.style,e),i.style=c(c({},t),i.style)}return i}const Uv=["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 Fv(e){return"string"==typeof e&&!e.includes("-")&&!!(Uv.indexOf(e)>-1||/[A-Z]/u.test(e))}function Vv(e,t,n,{latestValues:r},i,o=!1){const s=(Fv(e)?Nv:Rv)(t,r,i,e),a=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(hv(i)||!0===n&&dv(i)||!t&&!dv(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(t,"string"==typeof e,o),l=e!==ne.Fragment?d(c(c({},a),s),{ref:n}):{},{children:u}=t,h=ne.useMemo(()=>Gy(u)?u.get():u,[u]);return ne.createElement(e,d(c({},l),{children:h}))}function zv(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Bv(e,t,n,r){if("function"==typeof t){const[i,o]=zv(r);t=t(void 0!==n?n:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=zv(r);t=t(void 0!==n?n:e.custom,i,o)}return t}function Wv(e){return Gy(e)?e.get():e}function Hv(e,t,n,r){const i={},o=r(e,{});for(const h in o)i[h]=Wv(o[h]);let{initial:s,animate:a}=e;const l=bv(e),u=wv(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const d=c?a:s;if(d&&"boolean"!=typeof d&&!mv(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Bv(e,t[n]);if(r){const e=r,{transitionEnd:t,transition:n}=e,o=h(e,["transitionEnd","transition"]);for(const r in o){let e=o[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[r]=e)}for(const r in t)i[r]=t[r]}}}return i}const qv=e=>(t,n)=>{const r=ne.useContext(pv),i=ne.useContext(ip),o=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Hv(n,r,i,e),renderState:t()}}(e,t,r,i);return n?o():tp(o)};function Kv(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Gy(i[s])||t.style&&Gy(t.style[s])||_v(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(o[s]=i[s]);return o}const $v=qv({scrapeMotionValuesFromProps:Kv,createRenderState:Cv});function Gv(e,t,n){const r=Kv(e,t,n);for(const i in e)if(Gy(e[i])||Gy(t[i])){r[-1!==Mg.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]}return r}const Yv=qv({scrapeMotionValuesFromProps:Gv,createRenderState:Dv}),Jv=Symbol.for("motionComponentSymbol");function Qv(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Xv(e,t,n){return ne.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Qv(n)&&(n.current=r))},[t])}const Zv=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),eb="data-"+Zv("framerAppearId"),tb=ne.createContext({});function nb(e,t,n,r,i){var o,s;const{visualElement:a}=ne.useContext(pv),l=ne.useContext(av),u=ne.useContext(ip),c=ne.useContext(Jy).reducedMotion,d=ne.useRef(null);r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c}));const h=d.current,f=ne.useContext(tb);!h||h.projection||!i||"html"!==h.type&&"svg"!==h.type||function(e,t,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:rb(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:Boolean(s)||a&&Qv(a),visualElement:e,animationType:"string"==typeof o?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}(d.current,n,i,f);const p=ne.useRef(!1);ne.useInsertionEffect(()=>{h&&p.current&&h.update(n,u)});const m=n[eb],g=ne.useRef(Boolean(m)&&!(null==(o=window.MotionHandoffIsComplete)?void 0:o.call(window,m))&&(null==(s=window.MotionHasOptimisedAnimation)?void 0:s.call(window,m)));return rp(()=>{h&&(p.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),g.current&&h.animationState&&h.animationState.animateChanges())}),ne.useEffect(()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,m)}),g.current=!1),h.enteringChildren=void 0)}),h}function rb(e){if(e)return!1!==e.options.allowProjection?e.projection:rb(e.parent)}function ib(e,{forwardMotionProps:t=!1}={},n,r){var i,o;n&&function(e){for(const t in e)uv[t]=c(c({},uv[t]),e[t])}(n);const s=Fv(e)?Yv:$v;function a(n,i){let o;const a=d(c(c({},ne.useContext(Jy)),n),{layoutId:ob(n)}),{isStatic:l}=a,u=kv(n),h=s(n,l);if(!l&&np){ne.useContext(av).strict;const t=function(e){const{drag:t,layout:n}=uv;if(!t&&!n)return{};const r=c(c({},t),n);return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(a);o=t.MeasureLayout,u.visualElement=nb(e,h,a,r,t.ProjectionNode)}return de.jsxs(pv.Provider,{value:u,children:[o&&u.visualElement?de.jsx(o,c({visualElement:u.visualElement},a)):null,Vv(e,n,Xv(h,u.visualElement,i),h,l,t)]})}a.displayName="motion.".concat("string"==typeof e?e:"create(".concat(null!=(o=null!=(i=e.displayName)?i:e.name)?o:"",")"));const l=ne.forwardRef(a);return l[Jv]=e,l}function ob({layoutId:e}){const t=ne.useContext(ep).id;return t&&void 0!==e?t+"-"+e:e}function sb(e,t){if("undefined"==typeof Proxy)return ib;const n=new Map,r=(n,r)=>ib(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,o)=>"create"===o?r:(n.has(o)||n.set(o,ib(o,void 0,e,t)),n.get(o))})}function ab({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function lb(e){return void 0===e||1===e}function ub({scale:e,scaleX:t,scaleY:n}){return!lb(e)||!lb(t)||!lb(n)}function cb(e){return ub(e)||db(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function db(e){return hb(e.x)||hb(e.y)}function hb(e){return e&&"0%"!==e}function fb(e,t,n){return n+t*(e-n)}function pb(e,t,n,r,i){return void 0!==i&&(e=fb(e,i,r)),fb(e,n,r)+t}function mb(e,t=0,n=1,r,i){e.min=pb(e.min,t,n,r,i),e.max=pb(e.max,t,n,r,i)}function gb(e,{x:t,y:n}){mb(e.x,t.translate,t.scale,t.originPoint),mb(e.y,n.translate,n.scale,n.originPoint)}const yb=.999999999999,vb=1.0000000000001;function bb(e,t){e.min=e.min+t,e.max=e.max+t}function wb(e,t,n,r,i=.5){mb(e,t,n,Am(e.min,e.max,i),r)}function kb(e,t){wb(e.x,t.x,t.scaleX,t.scale,t.originX),wb(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sb(e,t){return ab(function(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}}(e.getBoundingClientRect(),t))}const xb=()=>({x:{min:0,max:0},y:{min:0,max:0}}),_b={current:null},Tb={current:!1};const Eb=new WeakMap;const Pb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Cb{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Kg,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 e=Kp.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Vp.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget=c({},a),this.initialValues=t.initial?c({},a):{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=bv(t),this.isVariantNode=wv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const u=this.scrapeMotionValuesFromProps(t,{},this),{willChange:d}=u,f=h(u,["willChange"]);for(const c in f){const e=f[c];void 0!==a[c]&&Gy(e)&&e.set(a[c])}}mount(e){var t;this.current=e,Eb.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),Tb.current||function(){if(Tb.current=!0,np)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>_b.current=e.matches;e.addEventListener("change",t),t()}else _b.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||_b.current),null==(t=this.parent)||t.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),zp(this.notifyUpdate),zp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),null!=this.enteringChildren||(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=Dg.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Vp.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in uv){const t=uv[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Pb.length;n++){const t=Pb[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Gy(i))e.addValue(r,i);else if(Gy(o))e.addValue(r,Ly(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(r);e.addValue(r,Ly(void 0!==t?t:i,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Ly(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!=(n=this.getBaseTargetFromProps(this.props,e))?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var i;return null!=r&&("string"==typeof r&&(up(r)||dp(r))?r=parseFloat(r):(i=r,!Yy.find(my(i))&&Em.test(t)&&(r=Py(e,t))),this.setBaseTarget(e,Gy(r)?r.get():r)),Gy(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const i=Bv(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);i&&(r=i[e])}if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||Gy(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new yp),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){My.render(this.render)}}class Ab extends Cb{constructor(){super(...arguments),this.KeyframeResolver=Ay}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Gy(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent="".concat(e))}))}}function Ob(e,{style:t,vars:n},r,i){const o=e.style;let s;for(s in t)o[s]=t[s];for(s in null==i||i.applyProjectionStyles(o,r),n)o.setProperty(s,n[s])}class Rb extends Ab{constructor(){super(...arguments),this.type="html",this.renderInstance=Ob}readValueFromInstance(e,t){var n,r;if(Dg.has(t))return(null==(n=this.projection)?void 0:n.isProjecting)?Rg(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jg(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),i=(Gp(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Sb(e,t)}build(e,t,n){Pv(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Kv(e,t,n)}}const jb=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"]);class Lb extends Ab{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xb}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Dg.has(t)){const e=Ey(t);return e&&e.default||0}return t=jb.has(t)?t:Zv(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Gv(e,t,n)}build(e,t,n){Mv(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Ob(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(jb.has(i)?i:Zv(i),t.attrs[i])}(e,t,0,r)}mount(e){this.isSVGTag=Iv(e.tagName),super.mount(e)}}const Mb=(e,t)=>Fv(e)?new Lb(t):new Rb(t,{allowProjection:e!==ne.Fragment});function Db(e,t,n){const r=e.getProps();return Bv(r,t,void 0!==n?n:r.custom,e)}const Ib=e=>Array.isArray(e);function Nb(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ly(n))}function Ub(e){return Ib(e)?e[e.length-1]||0:e}function Fb(e,t){const n=e.getValue("willChange");if(r=n,Boolean(Gy(r)&&r.add))return n.add(t);if(!n&&lp.WillChange){const n=new lp.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Vb(e){return e.props[eb]}const zb=e=>null!==e;const Bb={type:"spring",stiffness:500,damping:25,restSpeed:10},Wb={type:"keyframes",duration:.8},Hb={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qb=(e,{keyframes:t})=>t.length>2?Wb:Dg.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Bb:Hb;const Kb=(e,t,n,r={},i,o)=>s=>{const a=fy(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u-=vp(l);const f=d(c({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity()},a),{delay:-u,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i});(function(e){var t=e,{when:n,delay:r,delayChildren:i,staggerChildren:o,staggerDirection:s,repeat:a,repeatType:l,repeatDelay:u,from:c,elapsed:d}=t,f=h(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);return!!Object.keys(f).length})(a)||Object.assign(f,qb(e,f)),f.duration&&(f.duration=vp(f.duration)),f.repeatDelay&&(f.repeatDelay=vp(f.repeatDelay)),void 0!==f.from&&(f.keyframes[0]=f.from);let p=!1;if((!1===f.type||0===f.duration&&!f.repeatDelay)&&(ay(f),0===f.delay&&(p=!0)),(lp.instantAnimations||lp.skipAnimations)&&(p=!0,ay(f),f.delay=0),f.allowFlatten=!a.type&&!a.ease,p&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:n="loop"}){const r=e.filter(zb);return r[t&&"loop"!==n&&t%2==1?0:r.length-1]}(f.keyframes,a);if(void 0!==e)return void Vp.update(()=>{f.onUpdate(e),f.onComplete()})}return a.isSync?new xg(f):new cy(f)};function $b({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Gb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let s=t,{transition:a=e.getDefaultTransition(),transitionEnd:l}=s,u=h(s,["transition","transitionEnd"]);r&&(a=r);const d=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const h in u){const t=e.getValue(h,null!=(o=e.latestValues[h])?o:null),r=u[h];if(void 0===r||f&&$b(f,h))continue;const i=c({delay:n},fy(a||{},h)),s=t.get();if(void 0!==s&&!t.isAnimating&&!Array.isArray(r)&&r===s&&!i.velocity)continue;let l=!1;if(window.MotionHandoffAnimation){const t=Vb(e);if(t){const e=window.MotionHandoffAnimation(t,h,Vp);null!==e&&(i.startTime=e,l=!0)}}Fb(e,h),t.start(Kb(h,t,r,e.shouldReduceMotion&&py.has(h)?{type:!1}:i,e,l));const p=t.animation;p&&d.push(p)}return l&&Promise.all(d).then(()=>{Vp.update(()=>{l&&function(e,t){let n=Db(e,t)||{},{transitionEnd:r={},transition:i={}}=n,o=h(n,["transitionEnd","transition"]);o=c(c({},o),r);for(const s in o)Nb(e,s,Ub(o[s]))}(e,l)})}),d}function Yb(e,t,n,r=0,i=1){const o=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,a=(s-1)*r;return"function"==typeof n?n(o,s):1===i?o*r:a-o*r}function Jb(e,t,n={}){var r;const i=Db(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(Gb(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:a}=o;return function(e,t,n=0,r=0,i=0,o=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Jb(l,t,d(c({},s),{delay:n+("function"==typeof r?0:r)+Yb(e.variantChildren,l,r,i,o)})).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}(e,t,r,i,s,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then(()=>t())}return Promise.all([s(),a(n.delay)])}function Qb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Xb=vv.length;function Zb(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Zb(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Xb;n++){const r=vv[n],i=e.props[r];(gv(i)||!1===i)&&(t[r]=i)}return t}const ew=[...yv].reverse(),tw=yv.length;function nw(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map(t=>Jb(e,t,n));r=Promise.all(i)}else if("string"==typeof t)r=Jb(e,t,n);else{const i="function"==typeof t?Db(e,t,n.custom):t;r=Promise.all(Gb(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function rw(e){let t=nw(e),n=sw(),r=!0;const i=t=>(n,r)=>{var i;const o=Db(e,r,"exit"===t?null==(i=e.presenceContext)?void 0:i.custom:void 0);if(o){const e=o,{transition:t,transitionEnd:r}=e,i=h(e,["transition","transitionEnd"]);n=c(c(c({},n),i),r)}return n};function o(o){const{props:s}=e,a=Zb(e.parent)||{},l=[],u=new Set;let d={},h=1/0;for(let t=0;t<tw;t++){const f=ew[t],p=n[f],m=void 0!==s[f]?s[f]:a[f],g=gv(m),y=f===o?p.isActive:null;!1===y&&(h=t);let v=m===a[f]&&m!==s[f]&&g;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),p.protectedKeys=c({},d),!p.isActive&&null===y||!m&&!p.prevProp||mv(m)||"boolean"==typeof m)continue;const b=iw(p.prevProp,m);let w=b||f===o&&p.isActive&&!v&&g||t>h&&g,k=!1;const S=Array.isArray(m)?m:[m];let x=S.reduce(i(f),{});!1===y&&(x={});const{prevResolvedValues:_={}}=p,T=c(c({},_),x),E=t=>{w=!0,u.has(t)&&(k=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in T){const t=x[e],n=_[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ib(t)&&Ib(n)?!Qb(t,n):t!==n,r?null!=t?E(e):u.add(e):void 0!==t&&u.has(e)?E(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=x,p.isActive&&(d=c(c({},d),x)),r&&e.blockInitialAnimation&&(w=!1);const P=v&&b;w&&(!P||k)&&l.push(...S.map(t=>{const n={type:f};if("string"==typeof t&&r&&!P&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,i=Db(r,t);if(r.enteringChildren&&i){const{delayChildren:t}=i.transition||{};n.delay=Yb(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=Db(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=null!=r?r:null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null==(i=e.variantChildren)||i.forEach(e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)}),n[t].isActive=r;const s=o(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=sw()}}}function iw(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Qb(t,e)}function ow(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sw(){return{animate:ow(!0),whileInView:ow(),whileHover:ow(),whileTap:ow(),whileDrag:ow(),whileFocus:ow(),exit:ow()}}class aw{constructor(e){this.isMounted=!1,this.node=e}update(){}}let lw=0;const uw={animation:{Feature:class extends aw{constructor(e){super(e),e.animationState||(e.animationState=rw(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();mv(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends aw{constructor(){super(...arguments),this.id=lw++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function cw(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function dw(e){return{point:{x:e.pageX,y:e.pageY}}}function hw(e,t,n,r){return cw(e,t,(e=>t=>Vy(t)&&e(t,dw(t)))(n),r)}function fw(e){return e.max-e.min}function pw(e,t,n,r=.5){e.origin=r,e.originPoint=Am(t.min,t.max,e.origin),e.scale=fw(n)/fw(t),e.translate=Am(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function mw(e,t,n,r){pw(e.x,t.x,n.x,r?r.originX:void 0),pw(e.y,t.y,n.y,r?r.originY:void 0)}function gw(e,t,n){e.min=n.min+t.min,e.max=e.min+fw(t)}function yw(e,t,n){e.min=t.min-n.min,e.max=e.min+fw(t)}function vw(e,t,n){yw(e.x,t.x,n.x),yw(e.y,t.y,n.y)}function bw(e){return[e("x"),e("y")]}const ww=({current:e})=>e?e.ownerDocument.defaultView:null,kw=(e,t)=>Math.abs(e-t);class Sw{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Tw(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=kw(e.x,t.x),r=kw(e.y,t.y);return Math.sqrt(l(n,2)+l(r,2))}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=Bp;this.history.push(d(c({},r),{timestamp:i}));const{onStart:o,onMove:s}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=xw(t,this.transformPagePoint),Vp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Tw("pointercancel"===e.type?this.lastMoveEventInfo:xw(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,o),r&&r(e,o)},!Vy(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=r||window;const s=xw(dw(e),this.transformPagePoint),{point:a}=s,{timestamp:u}=Bp;this.history=[d(c({},a),{timestamp:u})];const{onSessionStart:h}=t;h&&h(e,Tw(s,this.history)),this.removeListeners=mp(hw(this.contextWindow,"pointermove",this.handlePointerMove),hw(this.contextWindow,"pointerup",this.handlePointerUp),hw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),zp(this.updatePoint)}}function xw(e,t){return t?{point:t(e.point)}:e}function _w(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tw({point:e},t){return{point:e,delta:_w(e,Pw(t)),offset:_w(e,Ew(t)),velocity:Cw(t,.1)}}function Ew(e){return e[0]}function Pw(e){return e[e.length-1]}function Cw(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Pw(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>vp(t)));)n--;if(!r)return{x:0,y:0};const o=bp(i.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Aw(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Ow(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Rw=.35;function jw(e,t,n){return{min:Lw(e,t),max:Lw(e,n)}}function Lw(e,t){return"number"==typeof e?e:e[t]||0}const Mw=new WeakMap;class Dw{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Sw(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(dw(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?Dy[o]?null:(Dy[o]=!0,()=>{Dy[o]=!1}):Dy.x||Dy.y?null:(Dy.x=Dy.y=!0,()=>{Dy.x=Dy.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bw(e=>{let t=this.getAxisMotionValue(e).get()||0;if(dm.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=fw(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&Vp.postRender(()=>i(e,t)),Fb(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>bw(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,distanceThreshold:n,contextWindow:ww(this.visualElement)})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;const{velocity:o}=r;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&Vp.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Iw(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Am(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Am(n,e,r.max):Math.min(e,n)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&Qv(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Aw(e.x,n,i),y:Aw(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Rw){return!1===e?e=0:!0===e&&(e=Rw),{x:jw(e,"left","right"),y:jw(e,"top","bottom")}}(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bw(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Qv(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Sb(e,n),{scroll:i}=t;return i&&(bb(r.x,i.offset.x),bb(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:Ow(e.x,t.x),y:Ow(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=ab(e))}return o}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=bw(s=>{if(!Iw(s,t,this.currentDirection))return;let l=a&&a[s]||{};o&&(l={min:0,max:0});const u=r?200:1e6,d=r?40:1e7,h=c(c({type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},i),l);return this.startAxisValueAnimation(s,h)});return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Fb(this.visualElement,e),n.start(Kb(e,n,0,t,this.visualElement,!1))}stopAnimation(){bw(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){bw(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t="_drag".concat(e.toUpperCase()),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){bw(t=>{const{drag:n}=this.getProps();if(!Iw(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[t];i.set(e[t]-Am(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qv(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};bw(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=fw(e),i=fw(t);return i>r?n=gp(t.min,t.max-r,e.min):r>i&&(n=gp(e.min,e.max-i,t.min)),ap(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),bw(t=>{if(!Iw(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];n.set(Am(i,o,r[t]))})}addListeners(){if(!this.visualElement.current)return;Mw.set(this.visualElement,this);const e=hw(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();Qv(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Vp.read(t);const i=cw(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(bw(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),r(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:o=Rw,dragMomentum:s=!0}=e;return d(c({},e),{drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:o,dragMomentum:s})}}function Iw(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Nw=e=>(t,n)=>{e&&Vp.postRender(()=>e(t,n))};const Uw={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Fw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Vw={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!hm.test(e))return e;e=parseFloat(e)}const n=Fw(e,t.target.x),r=Fw(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},zw={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Em.parse(e);if(i.length>5)return r;const o=Em.createTransformer(e),s="number"!=typeof i[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=Am(a,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=u),"number"==typeof i[3+s]&&(i[3+s]/=u),o(i)}};let Bw=!1;class Ww extends ne.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;!function(e){for(const t in e)xv[t]=e[t],Gp(t)&&(xv[t].isCSSVariable=!0)}(qw),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Bw&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions(d(c({},i.options),{onExitComplete:()=>this.safeToRemove()}))),Uw.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:o}=n;return o?(o.isPresent=i,Bw=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==i?o.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?o.promote():o.relegate()||Vp.postRender(()=>{const e=o.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),My.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Bw=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Hw(e){const[t,n]=rv(),r=ne.useContext(ep);return de.jsx(Ww,d(c({},e),{layoutGroup:r,switchLayoutGroup:ne.useContext(tb),isPresent:t,safeToRemove:n}))}const qw={borderRadius:d(c({},Vw),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Vw,borderTopRightRadius:Vw,borderBottomLeftRadius:Vw,borderBottomRightRadius:Vw,boxShadow:zw};const Kw=(e,t)=>e.depth-t.depth;class $w{constructor(){this.children=[],this.isDirty=!1}add(e){op(this.children,e),this.isDirty=!0}remove(e){sp(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Kw),this.isDirty=!1,this.children.forEach(e)}}const Gw=["TopLeft","TopRight","BottomLeft","BottomRight"],Yw=Gw.length,Jw=e=>"string"==typeof e?parseFloat(e):e,Qw=e=>"number"==typeof e||hm.test(e);function Xw(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Zw=tk(0,.5,Op),ek=tk(.5,.95,fp);function tk(e,t,n){return r=>r<e?0:r>t?1:n(gp(e,t,r))}function nk(e,t){e.min=t.min,e.max=t.max}function rk(e,t){nk(e.x,t.x),nk(e.y,t.y)}function ik(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ok(e,t,n,r,i){return e=fb(e-=t,1/n,r),void 0!==i&&(e=fb(e,1/i,r)),e}function sk(e,t,[n,r,i],o,s){!function(e,t=0,n=1,r=.5,i,o=e,s=e){dm.test(t)&&(t=parseFloat(t),t=Am(s.min,s.max,t/100)-s.min);if("number"!=typeof t)return;let a=Am(o.min,o.max,r);e===o&&(a-=t),e.min=ok(e.min,t,n,a,i),e.max=ok(e.max,t,n,a,i)}(e,t[n],t[r],t[i],t.scale,o,s)}const ak=["x","scaleX","originX"],lk=["y","scaleY","originY"];function uk(e,t,n,r){sk(e.x,t,ak,n?n.x:void 0,r?r.x:void 0),sk(e.y,t,lk,n?n.y:void 0,r?r.y:void 0)}function ck(e){return 0===e.translate&&1===e.scale}function dk(e){return ck(e.x)&&ck(e.y)}function hk(e,t){return e.min===t.min&&e.max===t.max}function fk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function pk(e,t){return fk(e.x,t.x)&&fk(e.y,t.y)}function mk(e){return fw(e.x)/fw(e.y)}function gk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class yk{constructor(){this.members=[]}add(e){op(this.members,e),e.scheduleRender()}remove(e){if(sp(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const vk=["","X","Y","Z"];let bk=0;function wk(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function kk(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Vp,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&kk(r)}function Sk({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=bk++,this.animationId=0,this.animationCommitId=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,this.nodes.forEach(Tk),this.nodes.forEach(jk),this.nodes.forEach(Lk),this.nodes.forEach(Ek)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new $w)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new yp),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=$y(t)&&!($y(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:i,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const i=()=>this.root.updateBlockedByResize=!1;Vp.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Kp.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(zp(r),e(o-t))};return Vp.setup(r,!0),()=>zp(r)}(i,250),Uw.hasAnimatedSinceResize&&(Uw.hasAnimatedSinceResize=!1,this.nodes.forEach(Rk)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&o&&(r||i)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||o.getDefaultTransition()||Fk,{onLayoutAnimationStart:s,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!pk(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t=d(c({},fy(i,"layout")),{onPlay:s,onComplete:a});(o.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||Rk(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),zp(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(Mk),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&kk(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ck);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ak);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ok),this.nodes.forEach(xk),this.nodes.forEach(_k)):this.nodes.forEach(Ak),this.clearAllSnapshots();const e=Kp.now();Bp.delta=ap(0,1e3/60,e-Bp.timestamp),Bp.timestamp=e,Bp.isProcessing=!0,Wp.update.process(Bp),Wp.preRender.process(Bp),Wp.render.process(Bp),Bp.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,My.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Pk),this.sharedNodes.forEach(Dk)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Vp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Vp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||fw(this.snapshot.measuredBox.x)||fw(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!dk(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||cb(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Bk((r=n).x),Bk(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(Hk))){const{scroll:e}=this.root;e&&(bb(n.x,e.offset.x),bb(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(rk(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&rk(n,e),bb(n.x,i.offset.x),bb(n.y,i.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};rk(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&kb(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),cb(e.latestValues)&&kb(n,e.latestValues)}return cb(this.latestValues)&&kb(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};rk(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!cb(e.latestValues))continue;ub(e.latestValues)&&e.updateSnapshot();const r=xb();rk(r,e.measurePageBox()),uk(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return cb(this.latestValues)&&uk(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options=d(c(c({},this.options),e),{crossfade:void 0===e.crossfade||e.crossfade})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Bp.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=Bp.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vw(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),rk(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var s,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,gw(s.x,a.x,l.x),gw(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):rk(this.target,this.layout.layoutBox),gb(this.target,this.targetDelta)):rk(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vw(this.relativeTargetOrigin,this.target,e.target),rk(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!ub(this.parent.latestValues)&&!db(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Bp.timestamp&&(r=!1),r)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;rk(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let o,s;t.x=t.y=1;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&kb(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,gb(e,s)),r&&cb(o.latestValues)&&kb(e,o.latestValues))}t.x<vb&&t.x>yb&&(t.x=1),t.y<vb&&t.y>yb&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(ik(this.prevProjectionDelta.x,this.projectionDelta.x),ik(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),mw(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&gk(this.projectionDelta.x,this.prevProjectionDelta.x)&&gk(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i=c({},this.latestValues),o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(Uk));let h;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,c,f,p;Ik(o.x,e.x,n),Ik(o.y,e.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vw(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,c=this.relativeTargetOrigin,f=s,p=n,Nk(l.x,c.x,f.x,p),Nk(l.y,c.y,f.y,p),h&&function(e,t){return hk(e.x,t.x)&&hk(e.y,t.y)}(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),rk(h,this.relativeTarget)),a&&(this.animationValues=i,function(e,t,n,r,i,o){var s,a,l,u;i?(e.opacity=Am(0,null!=(s=n.opacity)?s:1,Zw(r)),e.opacityExit=Am(null!=(a=t.opacity)?a:1,0,ek(r))):o&&(e.opacity=Am(null!=(l=t.opacity)?l:1,null!=(u=n.opacity)?u:1,r));for(let c=0;c<Yw;c++){const i="border".concat(Gw[c],"Radius");let o=Xw(t,i),s=Xw(n,i);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||Qw(o)===Qw(s)?(e[i]=Math.max(Am(Jw(o),Jw(s),r),0),(dm.test(s)||dm.test(o))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Am(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,d,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n,r;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(r=null==(n=this.resumingFrom)?void 0:n.currentAnimation)||r.stop(),this.pendingAnimation&&(zp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Vp.update(()=>{Uw.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ly(0)),this.currentAnimation=function(e,t,n){const r=Gy(e)?e:Ly(e);return r.start(Kb("",r,t,n)),r.animation}(this.motionValue,[0,1e3],d(c({},e),{velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Wk(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=fw(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=fw(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}rk(t,n),kb(t,i),mw(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new yk);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&wk("z",e,r,this.animationValues);for(let i=0;i<vk.length;i++)wk("rotate".concat(vk[i]),e,r,this.animationValues),wk("skew".concat(vk[i]),e,r,this.animationValues);e.render();for(const i in r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}applyProjectionStyles(e,t){var n,r;if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Wv(null==t?void 0:t.pointerEvents)||"",void(e.transform=i?i(this.latestValues,""):"none");const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Wv(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!cb(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1));e.visibility="";const s=o.animationValues||o.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((i||o||s)&&(r="translate3d(".concat(i,"px, ").concat(o,"px, ").concat(s,"px) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:s,skewY:a}=n;e&&(r="perspective(".concat(e,"px) ").concat(r)),t&&(r+="rotate(".concat(t,"deg) ")),i&&(r+="rotateX(".concat(i,"deg) ")),o&&(r+="rotateY(".concat(o,"deg) ")),s&&(r+="skewX(".concat(s,"deg) ")),a&&(r+="skewY(".concat(a,"deg) "))}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+="scale(".concat(a,", ").concat(l,")")),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(a=i(s,a)),e.transform=a;const{x:l,y:u}=this.projectionDelta;e.transformOrigin="".concat(100*l.origin,"% ").concat(100*u.origin,"% 0"),o.animationValues?e.opacity=o===this?null!=(r=null!=(n=s.opacity)?n:this.latestValues.opacity)?r:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:e.opacity=o===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const c in xv){if(void 0===s[c])continue;const{correct:t,applyTo:n,isCSSVariable:r}=xv[c],i="none"===a?s[c]:t(s[c],o);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=i}else r?this.options.visualElement.renderState.vars[c]=i:e[c]=i}this.options.layoutId&&(e.pointerEvents=o===this?Wv(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(Ck),this.root.sharedNodes.clear()}}}function xk(e){e.updateLayout()}function _k(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;"size"===i?bw(e=>{const r=o?n.measuredBox[e]:n.layoutBox[e],i=fw(r);r.min=t[e].min,r.max=r.min+i}):Wk(i,n.layoutBox,t)&&bw(r=>{const i=o?n.measuredBox[r]:n.layoutBox[r],s=fw(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};mw(s,t,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?mw(a,e.applyTransform(r,!0),n.measuredBox):mw(a,t,n.layoutBox);const l=!dk(s);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:o}=r;if(i&&o){const s={x:{min:0,max:0},y:{min:0,max:0}};vw(s,n.layoutBox,i.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};vw(a,t,o.layoutBox),pk(s,a)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Tk(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ek(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Pk(e){e.clearSnapshot()}function Ck(e){e.clearMeasurements()}function Ak(e){e.isLayoutDirty=!1}function Ok(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Rk(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function jk(e){e.resolveTargetDelta()}function Lk(e){e.calcProjection()}function Mk(e){e.resetSkewAndRotation()}function Dk(e){e.removeLeadSnapshot()}function Ik(e,t,n){e.translate=Am(t.translate,0,n),e.scale=Am(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Nk(e,t,n,r){e.min=Am(t.min,n.min,r),e.max=Am(t.max,n.max,r)}function Uk(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Fk={duration:.45,ease:[.4,0,.1,1]},Vk=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zk=Vk("applewebkit/")&&!Vk("chrome/")?Math.round:fp;function Bk(e){e.min=zk(e.min),e.max=zk(e.max)}function Wk(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=mk(t),i=mk(n),o=.2,!(Math.abs(r-i)<=o));var r,i,o}function Hk(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const qk=Sk({attachResizeListener:(e,t)=>cw(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Kk={current:void 0},$k=Sk({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kk.current){const e=new qk({});e.mount(window),e.setOptions({layoutScroll:!0}),Kk.current=e}return Kk.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Gk={pan:{Feature:class extends aw{constructor(){super(...arguments),this.removePointerDownListener=fp}onPointerDown(e){this.session=new Sw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ww(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Nw(e),onStart:Nw(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Vp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=hw(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends aw{constructor(e){super(e),this.removeGroupControls=fp,this.removeListeners=fp,this.controls=new Dw(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fp}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:$k,MeasureLayout:Hw}};function Yk(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const i=r["onHover"+n];i&&Vp.postRender(()=>i(t,dw(t)))}function Jk(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const i=r["onTap"+("End"===n?"":n)];i&&Vp.postRender(()=>i(t,dw(t)))}const Qk=new WeakMap,Xk=new WeakMap,Zk=e=>{const t=Qk.get(e.target);t&&t(e)},eS=e=>{e.forEach(Zk)};function tS(e,t,n){const r=function(e){var t=e,{root:n}=t,r=h(t,["root"]);const i=n||document;Xk.has(i)||Xk.set(i,{});const o=Xk.get(i),s=JSON.stringify(r);return o[s]||(o[s]=new IntersectionObserver(eS,c({root:n},r))),o[s]}(t);return Qk.set(e,n),r.observe(e),()=>{Qk.delete(e),r.unobserve(e)}}const nS={some:0,all:1};const rS={inView:{Feature:class extends aw{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,o={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:nS[r]};return tS(this.node.current,o,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends aw{mount(){const{current:e}=this.node;e&&(this.unmount=Ky(e,(e,t)=>(Jk(this.node,t,"Start"),(e,{success:t})=>Jk(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends aw{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(qT){e=!0}e&&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=mp(cw(this.node.current,"focus",()=>this.onFocus()),cw(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends aw{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,i,o]=Ny(e,n),s=e=>{if(!Uy(e))return;const{target:n}=e,r=t(n,e);if("function"!=typeof r||!n)return;const o=e=>{Uy(e)&&(r(e),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,i)};return r.forEach(e=>{e.addEventListener("pointerenter",s,i)}),o}(e,(e,t)=>(Yk(this.node,t,"Start"),e=>Yk(this.node,e,"End"))))}unmount(){}}}},iS={layout:{ProjectionNode:$k,MeasureLayout:Hw}},oS=sb(c(c(c(c({},uw),rS),Gk),iS),Mb);class sS extends Error{constructor(e,t="FunctionsError",n){super(e),this.name=t,this.context=n}}class aS extends sS{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class lS extends sS{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class uS extends sS{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var cS,dS;(dS=cS||(cS={})).Any="any",dS.ApNortheast1="ap-northeast-1",dS.ApNortheast2="ap-northeast-2",dS.ApSouth1="ap-south-1",dS.ApSoutheast1="ap-southeast-1",dS.ApSoutheast2="ap-southeast-2",dS.CaCentral1="ca-central-1",dS.EuCentral1="eu-central-1",dS.EuWest1="eu-west-1",dS.EuWest2="eu-west-2",dS.EuWest3="eu-west-3",dS.SaEast1="sa-east-1",dS.UsEast1="us-east-1",dS.UsWest1="us-west-1",dS.UsWest2="us-west-2";var hS=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};class fS{constructor(e,{headers:t={},customFetch:n,region:r=cS.Any}={}){this.url=e,this.headers=t,this.region=r,this.fetch=(e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>wh(()=>p(void 0,null,function*(){const{default:e}=yield Promise.resolve().then(()=>ES);return{default:e}}),[]).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)})(n)}setAuth(e){this.headers.Authorization="Bearer ".concat(e)}invoke(e,t={}){var n;return hS(this,void 0,void 0,function*(){try{const{headers:r,method:i,body:o}=t;let s={},{region:a}=t;a||(a=this.region);const l=new URL("".concat(this.url,"/").concat(e));let u;a&&"any"!==a&&(s["x-region"]=a,l.searchParams.set("forceFunctionRegion",a)),o&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&("undefined"!=typeof Blob&&o instanceof Blob||o instanceof ArrayBuffer?(s["Content-Type"]="application/octet-stream",u=o):"string"==typeof o?(s["Content-Type"]="text/plain",u=o):"undefined"!=typeof FormData&&o instanceof FormData?u=o:(s["Content-Type"]="application/json",u=JSON.stringify(o)));const c=yield this.fetch(l.toString(),{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},s),this.headers),r),body:u}).catch(e=>{throw new aS(e)}),d=c.headers.get("x-relay-error");if(d&&"true"===d)throw new lS(c);if(!c.ok)throw new uS(c);let h,f=(null!==(n=c.headers.get("Content-Type"))&&void 0!==n?n:"text/plain").split(";")[0].trim();return h="application/json"===f?yield c.json():"application/octet-stream"===f?yield c.blob():"text/event-stream"===f?c:"multipart/form-data"===f?yield c.formData():yield c.text(),{data:h,error:null,response:c}}catch(r){return{data:null,error:r,response:r instanceof uS||r instanceof lS?r.context:void 0}}})}}var pS={},mS={},gS={},yS={},vS={},bS={},wS=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();const kS=wS.fetch,SS=wS.fetch.bind(wS),xS=wS.Headers,_S=wS.Request,TS=wS.Response,ES=Object.freeze(Object.defineProperty({__proto__:null,Headers:xS,Request:_S,Response:TS,default:SS,fetch:kS},Symbol.toStringTag,{value:"Module"})),PS=y(ES);var CS={};Object.defineProperty(CS,"__esModule",{value:!0});let AS=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}};CS.default=AS;var OS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bS,"__esModule",{value:!0});const RS=OS(PS),jS=OS(CS);bS.default=class{constructor(e){var t,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!==(t=e.shouldThrowOnError)&&void 0!==t&&t,this.signal=e.signal,this.isMaybeSingle=null!==(n=e.isMaybeSingle)&&void 0!==n&&n,e.fetch?this.fetch=e.fetch:"undefined"==typeof fetch?this.fetch=RS.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json");let n=(0,this.fetch)(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(e=>p(this,null,function*(){var t,n,r,i;let o=null,s=null,a=null,l=e.status,u=e.statusText;if(e.ok){if("HEAD"!==this.method){const n=yield e.text();""===n||(s="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null===(t=this.headers.get("Accept"))||void 0===t?void 0:t.includes("application/vnd.pgrst.plan+text"))?n:JSON.parse(n))}const i=null===(n=this.headers.get("Prefer"))||void 0===n?void 0:n.match(/count=(exact|planned|estimated)/),c=null===(r=e.headers.get("content-range"))||void 0===r?void 0:r.split("/");i&&c&&c.length>1&&(a=parseInt(c[1])),this.isMaybeSingle&&"GET"===this.method&&Array.isArray(s)&&(s.length>1?(o={code:"PGRST116",details:"Results contain ".concat(s.length," rows, application/vnd.pgrst.object+json requires 1 row"),hint:null,message:"JSON object requested, multiple (or no) rows returned"},s=null,a=null,l=406,u="Not Acceptable"):s=1===s.length?s[0]:null)}else{const t=yield e.text();try{o=JSON.parse(t),Array.isArray(o)&&404===e.status&&(s=[],o=null,l=200,u="OK")}catch(c){404===e.status&&""===t?(l=204,u="No Content"):o={message:t}}if(o&&this.isMaybeSingle&&(null===(i=null==o?void 0:o.details)||void 0===i?void 0:i.includes("0 rows"))&&(o=null,l=200,u="OK"),o&&this.shouldThrowOnError)throw new jS.default(o)}return{error:o,data:s,count:a,status:l,statusText:u}}));return this.shouldThrowOnError||(n=n.catch(e=>{var t,n,r;return{error:{message:"".concat(null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"FetchError",": ").concat(null==e?void 0:e.message),details:"".concat(null!==(n=null==e?void 0:e.stack)&&void 0!==n?n:""),hint:"",code:"".concat(null!==(r=null==e?void 0:e.code)&&void 0!==r?r:"")},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}returns(){return this}overrideTypes(){return this}};var LS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vS,"__esModule",{value:!0});const MS=LS(bS);let DS=class extends MS.default{select(e){let t=!1;const n=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const o=i?"".concat(i,".order"):"order",s=this.url.searchParams.get(o);return this.url.searchParams.set(o,"".concat(s?"".concat(s,","):"").concat(e,".").concat(t?"asc":"desc").concat(void 0===n?"":n?".nullsfirst":".nullslast")),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=void 0===n?"limit":"".concat(n,".limit");return this.url.searchParams.set(r,"".concat(e)),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=void 0===r?"offset":"".concat(r,".offset"),o=void 0===r?"limit":"".concat(r,".limit");return this.url.searchParams.set(i,"".concat(e)),this.url.searchParams.set(o,"".concat(t-e+1)),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return"GET"===this.method?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:o="text"}={}){var s;const a=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=null!==(s=this.headers.get("Accept"))&&void 0!==s?s:"application/json";return this.headers.set("Accept","application/vnd.pgrst.plan+".concat(o,'; for="').concat(l,'"; options=').concat(a,";")),this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer","max-affected=".concat(e)),this}};vS.default=DS;var IS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yS,"__esModule",{value:!0});const NS=IS(vS);let US=class extends NS.default{eq(e,t){return this.url.searchParams.append(e,"eq.".concat(t)),this}neq(e,t){return this.url.searchParams.append(e,"neq.".concat(t)),this}gt(e,t){return this.url.searchParams.append(e,"gt.".concat(t)),this}gte(e,t){return this.url.searchParams.append(e,"gte.".concat(t)),this}lt(e,t){return this.url.searchParams.append(e,"lt.".concat(t)),this}lte(e,t){return this.url.searchParams.append(e,"lte.".concat(t)),this}like(e,t){return this.url.searchParams.append(e,"like.".concat(t)),this}likeAllOf(e,t){return this.url.searchParams.append(e,"like(all).{".concat(t.join(","),"}")),this}likeAnyOf(e,t){return this.url.searchParams.append(e,"like(any).{".concat(t.join(","),"}")),this}ilike(e,t){return this.url.searchParams.append(e,"ilike.".concat(t)),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,"ilike(all).{".concat(t.join(","),"}")),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,"ilike(any).{".concat(t.join(","),"}")),this}is(e,t){return this.url.searchParams.append(e,"is.".concat(t)),this}in(e,t){const n=Array.from(new Set(t)).map(e=>"string"==typeof e&&new RegExp("[,()]").test(e)?'"'.concat(e,'"'):"".concat(e)).join(",");return this.url.searchParams.append(e,"in.(".concat(n,")")),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cs.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cs.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cs.".concat(JSON.stringify(t))),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,"cd.".concat(t)):Array.isArray(t)?this.url.searchParams.append(e,"cd.{".concat(t.join(","),"}")):this.url.searchParams.append(e,"cd.".concat(JSON.stringify(t))),this}rangeGt(e,t){return this.url.searchParams.append(e,"sr.".concat(t)),this}rangeGte(e,t){return this.url.searchParams.append(e,"nxl.".concat(t)),this}rangeLt(e,t){return this.url.searchParams.append(e,"sl.".concat(t)),this}rangeLte(e,t){return this.url.searchParams.append(e,"nxr.".concat(t)),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,"adj.".concat(t)),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,"ov.".concat(t)):this.url.searchParams.append(e,"ov.{".concat(t.join(","),"}")),this}textSearch(e,t,{config:n,type:r}={}){let i="";"plain"===r?i="pl":"phrase"===r?i="ph":"websearch"===r&&(i="w");const o=void 0===n?"":"(".concat(n,")");return this.url.searchParams.append(e,"".concat(i,"fts").concat(o,".").concat(t)),this}match(e){return Object.entries(e).forEach(([e,t])=>{this.url.searchParams.append(e,"eq.".concat(t))}),this}not(e,t,n){return this.url.searchParams.append(e,"not.".concat(t,".").concat(n)),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?"".concat(n,".or"):"or";return this.url.searchParams.append(r,"(".concat(e,")")),this}filter(e,t,n){return this.url.searchParams.append(e,"".concat(t,".").concat(n)),this}};yS.default=US;var FS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gS,"__esModule",{value:!0});const VS=FS(yS);gS.default=class{constructor(e,{headers:t={},schema:n,fetch:r}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r}select(e,{head:t=!1,count:n}={}){const r=t?"HEAD":"GET";let i=!1;const o=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!i?"":('"'===e&&(i=!i),e)).join("");return this.url.searchParams.set("select",o),n&&this.headers.append("Prefer","count=".concat(n)),new VS.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;if(t&&this.headers.append("Prefer","count=".concat(t)),n||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>'"'.concat(e,'"'));this.url.searchParams.set("columns",e.join(","))}}return new VS.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(r=this.fetch)&&void 0!==r?r:fetch})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var o;if(this.headers.append("Prefer","resolution=".concat(n?"ignore":"merge","-duplicates")),void 0!==t&&this.url.searchParams.set("on_conflict",t),r&&this.headers.append("Prefer","count=".concat(r)),i||this.headers.append("Prefer","missing=default"),Array.isArray(e)){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){const e=[...new Set(t)].map(e=>'"'.concat(e,'"'));this.url.searchParams.set("columns",e.join(","))}}return new VS.default({method:"POST",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(o=this.fetch)&&void 0!==o?o:fetch})}update(e,{count:t}={}){var n;return t&&this.headers.append("Prefer","count=".concat(t)),new VS.default({method:"PATCH",url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:null!==(n=this.fetch)&&void 0!==n?n:fetch})}delete({count:e}={}){var t;return e&&this.headers.append("Prefer","count=".concat(e)),new VS.default({method:"DELETE",url:this.url,headers:this.headers,schema:this.schema,fetch:null!==(t=this.fetch)&&void 0!==t?t:fetch})}};var zS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mS,"__esModule",{value:!0});const BS=zS(gS),WS=zS(yS);mS.default=class e{constructor(e,{headers:t={},schema:n,fetch:r}={}){this.url=e,this.headers=new Headers(t),this.schemaName=n,this.fetch=r}from(e){const t=new URL("".concat(this.url,"/").concat(e));return new BS.default(t,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(e,t={},{head:n=!1,get:r=!1,count:i}={}){var o;let s;const a=new URL("".concat(this.url,"/rpc/").concat(e));let l;n||r?(s=n?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?"{".concat(t.join(","),"}"):"".concat(t)]).forEach(([e,t])=>{a.searchParams.append(e,t)})):(s="POST",l=t);const u=new Headers(this.headers);return i&&u.set("Prefer","count=".concat(i)),new WS.default({method:s,url:a,headers:u,schema:this.schemaName,body:l,fetch:null!==(o=this.fetch)&&void 0!==o?o:fetch})}};var HS=m&&m.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pS,"__esModule",{value:!0}),pS.PostgrestError=pS.PostgrestBuilder=pS.PostgrestTransformBuilder=pS.PostgrestFilterBuilder=pS.PostgrestQueryBuilder=pS.PostgrestClient=void 0;const qS=HS(mS);pS.PostgrestClient=qS.default;const KS=HS(gS);pS.PostgrestQueryBuilder=KS.default;const $S=HS(yS);pS.PostgrestFilterBuilder=$S.default;const GS=HS(vS);pS.PostgrestTransformBuilder=GS.default;const YS=HS(bS);pS.PostgrestBuilder=YS.default;const JS=HS(CS);pS.PostgrestError=JS.default;var QS=pS.default={PostgrestClient:qS.default,PostgrestQueryBuilder:KS.default,PostgrestFilterBuilder:$S.default,PostgrestTransformBuilder:GS.default,PostgrestBuilder:YS.default,PostgrestError:JS.default};const{PostgrestClient:XS,PostgrestQueryBuilder:ZS,PostgrestFilterBuilder:ex,PostgrestTransformBuilder:tx,PostgrestBuilder:nx,PostgrestError:rx}=QS;class ix{static detectEnvironment(){var e;if("undefined"!=typeof WebSocket)return{type:"native",constructor:WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocket)return{type:"native",constructor:globalThis.WebSocket};if("undefined"!=typeof global&&void 0!==global.WebSocket)return{type:"native",constructor:global.WebSocket};if("undefined"!=typeof globalThis&&void 0!==globalThis.WebSocketPair&&void 0===globalThis.WebSocket)return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if("undefined"!=typeof globalThis&&globalThis.EdgeRuntime||"undefined"!=typeof navigator&&(null===(e=navigator.userAgent)||void 0===e?void 0:e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};if("undefined"!=typeof process){const e=process.versions;if(e&&e.node){const t=e.node,n=parseInt(t.replace(/^v/,"").split(".")[0]);return n>=22?void 0!==globalThis.WebSocket?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:"Node.js ".concat(n," detected but native WebSocket not found."),workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:"Node.js ".concat(n," detected without native WebSocket support."),workaround:'For Node.js < 22, install "ws" package and provide it via the transport option:\nimport ws from "ws"\nnew RealtimeClient(url, { transport: ws })'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let t=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(t+="\n\nSuggested solution: ".concat(e.workaround)),new Error(t)}static createWebSocket(e,t){return new(this.getWebSocketConstructor())(e,t)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return"native"===e.type||"ws"===e.type}catch(e){return!1}}}const ox="realtime-js/".concat("2.15.5"),sx=1e4;var ax,lx,ux,cx,dx,hx,fx,px,mx,gx,yx;(lx=ax||(ax={}))[lx.connecting=0]="connecting",lx[lx.open=1]="open",lx[lx.closing=2]="closing",lx[lx.closed=3]="closed",(cx=ux||(ux={})).closed="closed",cx.errored="errored",cx.joined="joined",cx.joining="joining",cx.leaving="leaving",(hx=dx||(dx={})).close="phx_close",hx.error="phx_error",hx.join="phx_join",hx.reply="phx_reply",hx.leave="phx_leave",hx.access_token="access_token",(fx||(fx={})).websocket="websocket",(mx=px||(px={})).Connecting="connecting",mx.Open="open",mx.Closing="closing",mx.Closed="closed";class vx{constructor(){this.HEADER_LENGTH=1}decode(e,t){return e.constructor===ArrayBuffer?t(this._binaryDecode(e)):t("string"==typeof e?JSON.parse(e):{})}_binaryDecode(e){const t=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,t,n)}_decodeBroadcast(e,t,n){const r=t.getUint8(1),i=t.getUint8(2);let o=this.HEADER_LENGTH+2;const s=n.decode(e.slice(o,o+r));o+=r;const a=n.decode(e.slice(o,o+i));o+=i;return{ref:null,topic:s,event:a,payload:JSON.parse(n.decode(e.slice(o,e.byteLength)))}}}class bx{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=t}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}(yx=gx||(gx={})).abstime="abstime",yx.bool="bool",yx.date="date",yx.daterange="daterange",yx.float4="float4",yx.float8="float8",yx.int2="int2",yx.int4="int4",yx.int4range="int4range",yx.int8="int8",yx.int8range="int8range",yx.json="json",yx.jsonb="jsonb",yx.money="money",yx.numeric="numeric",yx.oid="oid",yx.reltime="reltime",yx.text="text",yx.time="time",yx.timestamp="timestamp",yx.timestamptz="timestamptz",yx.timetz="timetz",yx.tsrange="tsrange",yx.tstzrange="tstzrange";const wx=(e,t,n={})=>{var r;const i=null!==(r=n.skipTypes)&&void 0!==r?r:[];return Object.keys(t).reduce((n,r)=>(n[r]=kx(r,e,t,i),n),{})},kx=(e,t,n,r)=>{const i=t.find(t=>t.name===e),o=null==i?void 0:i.type,s=n[e];return o&&!r.includes(o)?Sx(o,s):xx(s)},Sx=(e,t)=>{if("_"===e.charAt(0)){const n=e.slice(1,e.length);return Px(t,n)}switch(e){case gx.bool:return _x(t);case gx.float4:case gx.float8:case gx.int2:case gx.int4:case gx.int8:case gx.numeric:case gx.oid:return Tx(t);case gx.json:case gx.jsonb:return Ex(t);case gx.timestamp:return Cx(t);case gx.abstime:case gx.date:case gx.daterange:case gx.int4range:case gx.int8range:case gx.money:case gx.reltime:case gx.text:case gx.time:case gx.timestamptz:case gx.timetz:case gx.tsrange:case gx.tstzrange:default:return xx(t)}},xx=e=>e,_x=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Tx=e=>{if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Ex=e=>{if("string"==typeof e)try{return JSON.parse(e)}catch(t){return e}return e},Px=(e,t)=>{if("string"!=typeof e)return e;const n=e.length-1,r=e[n];if("{"===e[0]&&"}"===r){let r;const o=e.slice(1,n);try{r=JSON.parse("["+o+"]")}catch(i){r=o?o.split(","):[]}return r.map(e=>Sx(t,e))}return e},Cx=e=>"string"==typeof e?e.replace(" ","T"):e,Ax=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"};class Ox{constructor(e,t,n={},r=1e4){this.channel=e,this.event=t,this.payload=n,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,t){var n;return this._hasReceived(e)&&t(null===(n=this.receivedResp)||void 0===n?void 0:n.response),this.recHooks.push({status:e,callback:t}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);this.channel._on(this.refEvent,{},e=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=e,this._matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,t){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:t})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:t}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Rx,jx,Lx,Mx,Dx,Ix,Nx,Ux;(jx=Rx||(Rx={})).SYNC="sync",jx.JOIN="join",jx.LEAVE="leave";class Fx{constructor(e,t){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(null==t?void 0:t.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Fx.syncState(this.state,e,t,n),this.pendingDiffs.forEach(e=>{this.state=Fx.syncDiff(this.state,e,t,n)}),this.pendingDiffs=[],r()}),this.channel._on(n.diff,{},e=>{const{onJoin:t,onLeave:n,onSync:r}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(e):(this.state=Fx.syncDiff(this.state,e,t,n),r())}),this.onJoin((e,t,n)=>{this.channel._trigger("presence",{event:"join",key:e,currentPresences:t,newPresences:n})}),this.onLeave((e,t,n)=>{this.channel._trigger("presence",{event:"leave",key:e,currentPresences:t,leftPresences:n})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,t,n,r){const i=this.cloneDeep(e),o=this.transformState(t),s={},a={};return this.map(i,(e,t)=>{o[e]||(a[e]=t)}),this.map(o,(e,t)=>{const n=i[e];if(n){const r=t.map(e=>e.presence_ref),i=n.map(e=>e.presence_ref),o=t.filter(e=>i.indexOf(e.presence_ref)<0),l=n.filter(e=>r.indexOf(e.presence_ref)<0);o.length>0&&(s[e]=o),l.length>0&&(a[e]=l)}else s[e]=t}),this.syncDiff(i,{joins:s,leaves:a},n,r)}static syncDiff(e,t,n,r){const{joins:i,leaves:o}={joins:this.transformState(t.joins),leaves:this.transformState(t.leaves)};return n||(n=()=>{}),r||(r=()=>{}),this.map(i,(t,r)=>{var i;const o=null!==(i=e[t])&&void 0!==i?i:[];if(e[t]=this.cloneDeep(r),o.length>0){const n=e[t].map(e=>e.presence_ref),r=o.filter(e=>n.indexOf(e.presence_ref)<0);e[t].unshift(...r)}n(t,o,r)}),this.map(o,(t,n)=>{let i=e[t];if(!i)return;const o=n.map(e=>e.presence_ref);i=i.filter(e=>o.indexOf(e.presence_ref)<0),e[t]=i,r(t,i,n),0===i.length&&delete e[t]}),e}static map(e,t){return Object.getOwnPropertyNames(e).map(n=>t(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((t,n)=>{const r=e[n];return t[n]="metas"in r?r.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e)):r,t},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}(Mx=Lx||(Lx={})).ALL="*",Mx.INSERT="INSERT",Mx.UPDATE="UPDATE",Mx.DELETE="DELETE",(Ix=Dx||(Dx={})).BROADCAST="broadcast",Ix.PRESENCE="presence",Ix.POSTGRES_CHANGES="postgres_changes",Ix.SYSTEM="system",(Ux=Nx||(Nx={})).SUBSCRIBED="SUBSCRIBED",Ux.TIMED_OUT="TIMED_OUT",Ux.CLOSED="CLOSED",Ux.CHANNEL_ERROR="CHANNEL_ERROR";class Vx{constructor(e,t={config:{}},n){this.topic=e,this.params=t,this.socket=n,this.bindings={},this.state=ux.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config),this.timeout=this.socket.timeout,this.joinPush=new Ox(this,dx.join,this.params,this.timeout),this.rejoinTimer=new bx(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=ux.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel","close ".concat(this.topic," ").concat(this._joinRef())),this.state=ux.closed,this.socket._remove(this)}),this._onError(e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel","error ".concat(this.topic),e),this.state=ux.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel","timeout ".concat(this.topic),this.joinPush.timeout),this.state=ux.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",e=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel","error ".concat(this.topic),e),this.state=ux.errored,this.rejoinTimer.scheduleTimeout())}),this._on(dx.reply,{},(e,t)=>{this._trigger(this._replyEventName(t),e)}),this.presence=new Fx(this),this.broadcastEndpointURL=Ax(this.socket.endPoint),this.private=this.params.config.private||!1}subscribe(e,t=this.timeout){var n,r,i;if(this.socket.isConnected()||this.socket.connect(),this.state==ux.closed){const{config:{broadcast:o,presence:s,private:a}}=this.params,l=null!==(r=null===(n=this.bindings.postgres_changes)||void 0===n?void 0:n.map(e=>e.filter))&&void 0!==r?r:[],u=!!this.bindings[Dx.PRESENCE]&&this.bindings[Dx.PRESENCE].length>0||!0===(null===(i=this.params.config.presence)||void 0===i?void 0:i.enabled),c={},d={broadcast:o,presence:Object.assign(Object.assign({},s),{enabled:u}),postgres_changes:l,private:a};this.socket.accessTokenValue&&(c.access_token=this.socket.accessTokenValue),this._onError(t=>null==e?void 0:e(Nx.CHANNEL_ERROR,t)),this._onClose(()=>null==e?void 0:e(Nx.CLOSED)),this.updateJoinPayload(Object.assign({config:d},c)),this.joinedOnce=!0,this._rejoin(t),this.joinPush.receive("ok",t=>p(this,[t],function*({postgres_changes:t}){var n;if(this.socket.setAuth(),void 0!==t){const r=this.bindings.postgres_changes,i=null!==(n=null==r?void 0:r.length)&&void 0!==n?n:0,o=[];for(let n=0;n<i;n++){const i=r[n],{filter:{event:s,schema:a,table:l,filter:u}}=i,c=t&&t[n];if(!c||c.event!==s||c.schema!==a||c.table!==l||c.filter!==u)return this.unsubscribe(),this.state=ux.errored,void(null==e||e(Nx.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes")));o.push(Object.assign(Object.assign({},i),{id:c.id}))}return this.bindings.postgres_changes=o,void(e&&e(Nx.SUBSCRIBED))}null==e||e(Nx.SUBSCRIBED)})).receive("error",t=>{this.state=ux.errored,null==e||e(Nx.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(t).join(", ")||"error")))}).receive("timeout",()=>{null==e||e(Nx.TIMED_OUT)})}return this}presenceState(){return this.presence.state}track(e){return p(this,arguments,function*(e,t={}){return yield this.send({type:"presence",event:"track",payload:e},t.timeout||this.timeout)})}untrack(){return p(this,arguments,function*(e={}){return yield this.send({type:"presence",event:"untrack"},e)})}on(e,t,n){return this.state===ux.joined&&e===Dx.PRESENCE&&(this.socket.log("channel","resubscribe to ".concat(this.topic," due to change in presence callbacks on joined channel")),this.unsubscribe().then(()=>this.subscribe())),this._on(e,t,n)}send(e){return p(this,arguments,function*(e,t={}){var n,r;if(this._canPush()||"broadcast"!==e.type)return new Promise(n=>{var r,i,o;const s=this._push(e.type,e,t.timeout||this.timeout);"broadcast"!==e.type||(null===(o=null===(i=null===(r=this.params)||void 0===r?void 0:r.config)||void 0===i?void 0:i.broadcast)||void 0===o?void 0:o.ack)||n("ok"),s.receive("ok",()=>n("ok")),s.receive("error",()=>n("error")),s.receive("timeout",()=>n("timed out"))});{const{event:o,payload:s}=e,a={method:"POST",headers:{Authorization:this.socket.accessTokenValue?"Bearer ".concat(this.socket.accessTokenValue):"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:s,private:this.private}]})};try{const e=yield this._fetchWithTimeout(this.broadcastEndpointURL,a,null!==(n=t.timeout)&&void 0!==n?n:this.timeout);return yield null===(r=e.body)||void 0===r?void 0:r.cancel(),e.ok?"ok":"error"}catch(i){return"AbortError"===i.name?"timed out":"error"}}})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=ux.leaving;const t=()=>{this.socket.log("channel","leave ".concat(this.topic)),this._trigger(dx.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(r=>{n=new Ox(this,dx.leave,{},e),n.receive("ok",()=>{t(),r("ok")}).receive("timeout",()=>{t(),r("timed out")}).receive("error",()=>{r("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{null==n||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=ux.closed,this.bindings={}}_fetchWithTimeout(e,t,n){return p(this,null,function*(){const r=new AbortController,i=setTimeout(()=>r.abort(),n),o=yield this.socket.fetch(e,Object.assign(Object.assign({},t),{signal:r.signal}));return clearTimeout(i),o})}_push(e,t,n=this.timeout){if(!this.joinedOnce)throw"tried to push '".concat(e,"' to '").concat(this.topic,"' before joining. Use channel.subscribe() before pushing events");let r=new Ox(this,e,t,n);return this._canPush()?r.send():this._addToPushBuffer(r),r}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>100){const e=this.pushBuffer.shift();e&&(e.destroy(),this.socket.log("channel","discarded push due to buffer overflow: ".concat(e.event),e.payload))}}_onMessage(e,t,n){return t}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,t,n){var r,i;const o=e.toLocaleLowerCase(),{close:s,error:a,leave:l,join:u}=dx;if(n&&[s,a,l,u].indexOf(o)>=0&&n!==this._joinRef())return;let c=this._onMessage(o,t,n);if(t&&!c)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?null===(r=this.bindings.postgres_changes)||void 0===r||r.filter(e=>{var t,n,r;return"*"===(null===(t=e.filter)||void 0===t?void 0:t.event)||(null===(r=null===(n=e.filter)||void 0===n?void 0:n.event)||void 0===r?void 0:r.toLocaleLowerCase())===o}).map(e=>e.callback(c,n)):null===(i=this.bindings[o])||void 0===i||i.filter(e=>{var n,r,i,s,a,l;if(["broadcast","presence","postgres_changes"].includes(o)){if("id"in e){const o=e.id,s=null===(n=e.filter)||void 0===n?void 0:n.event;return o&&(null===(r=t.ids)||void 0===r?void 0:r.includes(o))&&("*"===s||(null==s?void 0:s.toLocaleLowerCase())===(null===(i=t.data)||void 0===i?void 0:i.type.toLocaleLowerCase()))}{const n=null===(a=null===(s=null==e?void 0:e.filter)||void 0===s?void 0:s.event)||void 0===a?void 0:a.toLocaleLowerCase();return"*"===n||n===(null===(l=null==t?void 0:t.event)||void 0===l?void 0:l.toLocaleLowerCase())}}return e.type.toLocaleLowerCase()===o}).map(e=>{if("object"==typeof c&&"ids"in c){const e=c.data,{schema:t,table:n,commit_timestamp:r,type:i,errors:o}=e,s={schema:t,table:n,commit_timestamp:r,eventType:i,new:{},old:{},errors:o};c=Object.assign(Object.assign({},s),this._getPayloadRecords(e))}e.callback(c,n)})}_isClosed(){return this.state===ux.closed}_isJoined(){return this.state===ux.joined}_isJoining(){return this.state===ux.joining}_isLeaving(){return this.state===ux.leaving}_replyEventName(e){return"chan_reply_".concat(e)}_on(e,t,n){const r=e.toLocaleLowerCase(),i={type:r,filter:t,callback:n};return this.bindings[r]?this.bindings[r].push(i):this.bindings[r]=[i],this}_off(e,t){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(e=>{var r;return!((null===(r=e.type)||void 0===r?void 0:r.toLocaleLowerCase())===n&&Vx.isEqual(e.filter,t))})),this}static isEqual(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(dx.close,{},e)}_onError(e){this._on(dx.error,{},t=>e(t))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=ux.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const t={new:{},old:{}};return"INSERT"!==e.type&&"UPDATE"!==e.type||(t.new=wx(e.columns,e.record)),"UPDATE"!==e.type&&"DELETE"!==e.type||(t.old=wx(e.columns,e.old_record)),t}}const zx=()=>{},Bx=25e3,Wx=10,Hx=100,qx=[1e3,2e3,5e3,1e4];class Kx{constructor(e,t){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=sx,this.transport=null,this.heartbeatIntervalMs=Bx,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=zx,this.ref=0,this.reconnectTimer=null,this.logger=zx,this.conn=null,this.sendBuffer=[],this.serializer=new vx,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>wh(()=>p(this,null,function*(){const{default:e}=yield Promise.resolve().then(()=>ES);return{default:e}}),void 0).then(({default:t})=>t(...e)).catch(e=>{throw new Error("Failed to load @supabase/node-fetch: ".concat(e.message,". ")+"This is required for HTTP requests in Node.js environments without native fetch.")}):fetch),(...e)=>t(...e)},!(null===(n=null==t?void 0:t.params)||void 0===n?void 0:n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=t.params.apikey,this.endPoint="".concat(e,"/").concat(fx.websocket),this.httpEndpoint=Ax(e),this._initializeOptions(t),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(null==t?void 0:t.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||null!==this.conn&&this.isConnected())){if(this._setConnectionState("connecting"),this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=ix.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const t=e.message;if(t.includes("Node.js"))throw new Error("".concat(t,"\n\n")+'To use Realtime in Node.js, you need to provide a WebSocket implementation:\n\nOption 1: Use Node.js 22+ which has native WebSocket support\nOption 2: Install and provide the "ws" package:\n\n npm install ws\n\n import ws from "ws"\n const client = new RealtimeClient(url, {\n ...options,\n transport: ws\n })');throw new Error("WebSocket not available: ".concat(t))}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:"1.0.0"}))}disconnect(e,t){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},e?this.conn.close(e,null!=t?t:""):this.conn.close(),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}removeChannel(e){return p(this,null,function*(){const t=yield e.unsubscribe();return 0===this.channels.length&&this.disconnect(),t})}removeAllChannels(){return p(this,null,function*(){const e=yield Promise.all(this.channels.map(e=>e.unsubscribe()));return this.channels=[],this.disconnect(),e})}log(e,t,n){this.logger(e,t,n)}connectionState(){switch(this.conn&&this.conn.readyState){case ax.connecting:return px.Connecting;case ax.open:return px.Open;case ax.closing:return px.Closing;default:return px.Closed}}isConnected(){return this.connectionState()===px.Open}isConnecting(){return"connecting"===this._connectionState}isDisconnecting(){return"disconnecting"===this._connectionState}channel(e,t={config:{}}){const n="realtime:".concat(e),r=this.getChannels().find(e=>e.topic===n);if(r)return r;{const n=new Vx("realtime:".concat(e),t,this);return this.channels.push(n),n}}push(e){const{topic:t,event:n,payload:r,ref:i}=e,o=()=>{this.encode(e,e=>{var t;null===(t=this.conn)||void 0===t||t.send(e)})};this.log("push","".concat(t," ").concat(n," (").concat(i,")"),r),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e=null){return p(this,null,function*(){this._authPromise=this._performAuth(e);try{yield this._authPromise}finally{this._authPromise=null}})}sendHeartbeat(){return p(this,null,function*(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(qT){this.log("error","error in heartbeat callback",qT)}return this._wasManualDisconnect=!1,null===(e=this.conn)||void 0===e||e.close(1e3,"heartbeat timeout"),void setTimeout(()=>{var e;this.isConnected()||null===(e=this.reconnectTimer)||void 0===e||e.scheduleTimeout()},Hx)}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(qT){this.log("error","error in heartbeat callback",qT)}this._setAuthSafely("heartbeat")}else try{this.heartbeatCallback("disconnected")}catch(qT){this.log("error","error in heartbeat callback",qT)}})}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t._isJoined()||t._isJoining()));t&&(this.log("transport",'leaving duplicate topic "'.concat(e,'"')),t.unsubscribe())}_remove(e){this.channels=this.channels.filter(t=>t.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,e=>{if("phoenix"===e.topic&&"phx_reply"===e.event)try{this.heartbeatCallback("ok"===e.payload.status?"ok":"error")}catch(qT){this.log("error","error in heartbeat callback",qT)}e.ref&&e.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:t,event:n,payload:r,ref:i}=e,o=i?"(".concat(i,")"):"",s=r.status||"";this.log("receive","".concat(s," ").concat(t," ").concat(n," ").concat(o).trim(),r),this.channels.filter(e=>e._isMember(t)).forEach(e=>e._trigger(n,r,i)),this._triggerStateCallbacks("message",e)})}_clearTimer(e){var t;"heartbeat"===e&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):"reconnect"===e&&(null===(t=this.reconnectTimer)||void 0===t||t.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_teardownConnection(){this.conn&&(this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null),this._clearAllTimers(),this.channels.forEach(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport","connected to ".concat(this.endpointURL())),this.flushSendBuffer(),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker","starting worker for from ".concat(this.workerUrl)):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=e=>{this.log("worker","worker error",e.message),this.workerRef.terminate()},this.workerRef.onmessage=e=>{"keepAlive"===e.data.event&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){var t;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||null===(t=this.reconnectTimer)||void 0===t||t.scheduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport","".concat(e)),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(dx.error))}_appendParams(e,t){if(0===Object.keys(t).length)return e;const n=e.match(/\?/)?"&":"?",r=new URLSearchParams(t);return"".concat(e).concat(n).concat(r)}_workerObjectUrl(e){let t;if(e)t=e;else{const e=new Blob(['\n addEventListener("message", (e) => {\n if (e.data.event === "start") {\n setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);\n }\n });'],{type:"application/javascript"});t=URL.createObjectURL(e)}return t}_setConnectionState(e,t=!1){this._connectionState=e,"connecting"===e?this._wasManualDisconnect=!1:"disconnecting"===e&&(this._wasManualDisconnect=t)}_performAuth(e=null){return p(this,null,function*(){let t;t=e||(this.accessToken?yield this.accessToken():this.accessTokenValue),this.accessTokenValue!=t&&(this.accessTokenValue=t,this.channels.forEach(e=>{const n={access_token:t,version:ox};t&&e.updateJoinPayload(n),e.joinedOnce&&e._isJoined()&&e._push(dx.access_token,{access_token:t})}))})}_waitForAuthIfNeeded(){return p(this,null,function*(){this._authPromise&&(yield this._authPromise)})}_setAuthSafely(e="general"){this.setAuth().catch(t=>{this.log("error","error setting auth in ".concat(e),t)})}_triggerStateCallbacks(e,t){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(t)}catch(qT){this.log("error","error in ".concat(e," callback"),qT)}})}catch(qT){this.log("error","error triggering ".concat(e," callbacks"),qT)}}_setupReconnectionTimer(){this.reconnectTimer=new bx(()=>p(this,null,function*(){setTimeout(()=>p(this,null,function*(){yield this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}),Wx)}),this.reconnectAfterMs)}_initializeOptions(e){var t,n,r,i,o,s,a,l,u;if(this.transport=null!==(t=null==e?void 0:e.transport)&&void 0!==t?t:null,this.timeout=null!==(n=null==e?void 0:e.timeout)&&void 0!==n?n:sx,this.heartbeatIntervalMs=null!==(r=null==e?void 0:e.heartbeatIntervalMs)&&void 0!==r?r:Bx,this.worker=null!==(i=null==e?void 0:e.worker)&&void 0!==i&&i,this.accessToken=null!==(o=null==e?void 0:e.accessToken)&&void 0!==o?o:null,this.heartbeatCallback=null!==(s=null==e?void 0:e.heartbeatCallback)&&void 0!==s?s:zx,(null==e?void 0:e.params)&&(this.params=e.params),(null==e?void 0:e.logger)&&(this.logger=e.logger),((null==e?void 0:e.logLevel)||(null==e?void 0:e.log_level))&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=null!==(a=null==e?void 0:e.reconnectAfterMs)&&void 0!==a?a:e=>qx[e-1]||1e4,this.encode=null!==(l=null==e?void 0:e.encode)&&void 0!==l?l:(e,t)=>t(JSON.stringify(e)),this.decode=null!==(u=null==e?void 0:e.decode)&&void 0!==u?u:this.serializer.decode.bind(this.serializer),this.worker){if("undefined"!=typeof window&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=null==e?void 0:e.workerUrl}}}class $x extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Gx(e){return"object"==typeof e&&null!==e&&"__isStorageError"in e}class Yx extends $x{constructor(e,t,n){super(e),this.name="StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Jx extends $x{constructor(e,t){super(e),this.name="StorageUnknownError",this.originalError=t}}var Qx=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};const Xx=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>wh(()=>p(void 0,null,function*(){const{default:e}=yield Promise.resolve().then(()=>ES);return{default:e}}),void 0).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)},Zx=e=>{if(Array.isArray(e))return e.map(e=>Zx(e));if("function"==typeof e||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([e,n])=>{const r=e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace(/[-_]/g,""));t[r]=Zx(n)}),t};var e_=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};const t_=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),n_=(e,t,n)=>e_(void 0,void 0,void 0,function*(){const r=yield Qx(void 0,void 0,void 0,function*(){return"undefined"==typeof Response?(yield wh(()=>Promise.resolve().then(()=>ES),void 0)).Response:Response});e instanceof r&&!(null==n?void 0:n.noResolveJson)?e.json().then(n=>{const r=e.status||500,i=(null==n?void 0:n.statusCode)||r+"";t(new Yx(t_(n),r,i))}).catch(e=>{t(new Jx(t_(e),e))}):t(new Jx(t_(e),e))}),r_=(e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"!==e&&r?((e=>{if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)})(r)?(i.headers=Object.assign({"Content-Type":"application/json"},null==t?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,(null==t?void 0:t.duplex)&&(i.duplex=t.duplex),Object.assign(Object.assign({},i),n)):i};function i_(e,t,n,r,i,o){return e_(this,void 0,void 0,function*(){return new Promise((s,a)=>{e(n,r_(t,r,i,o)).then(e=>{if(!e.ok)throw e;return(null==r?void 0:r.noResolveJson)?e:e.json()}).then(e=>s(e)).catch(e=>n_(e,a,r))})})}function o_(e,t,n,r){return e_(this,void 0,void 0,function*(){return i_(e,"GET",t,n,r)})}function s_(e,t,n,r,i){return e_(this,void 0,void 0,function*(){return i_(e,"POST",t,r,i,n)})}function a_(e,t,n,r,i){return e_(this,void 0,void 0,function*(){return i_(e,"PUT",t,r,i,n)})}function l_(e,t,n,r,i){return e_(this,void 0,void 0,function*(){return i_(e,"DELETE",t,r,i,n)})}var u_=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};const c_={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},d_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class h_{constructor(e,t={},n,r){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.bucketId=n,this.fetch=Xx(r)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,t,n,r){return u_(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},d_),r);let s=Object.assign(Object.assign({},this.headers),"POST"===e&&{"x-upsert":String(o.upsert)});const a=o.metadata;"undefined"!=typeof Blob&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),a&&i.append("metadata",this.encodeMetadata(a)),i.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(i=n,i.append("cacheControl",o.cacheControl),a&&i.append("metadata",this.encodeMetadata(a))):(i=n,s["cache-control"]="max-age=".concat(o.cacheControl),s["content-type"]=o.contentType,a&&(s["x-metadata"]=this.toBase64(this.encodeMetadata(a)))),(null==r?void 0:r.headers)&&(s=Object.assign(Object.assign({},s),r.headers));const l=this._removeEmptyFolders(t),u=this._getFinalPath(l),c=yield("PUT"==e?a_:s_)(this.fetch,"".concat(this.url,"/object/").concat(u),i,Object.assign({headers:s},(null==o?void 0:o.duplex)?{duplex:o.duplex}:{}));return{data:{path:l,id:c.Id,fullPath:c.Key},error:null}}catch(i){if(this.shouldThrowOnError)throw i;if(Gx(i))return{data:null,error:i};throw i}})}upload(e,t,n){return u_(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,t,n)})}uploadToSignedUrl(e,t,n,r){return u_(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(e),o=this._getFinalPath(i),s=new URL(this.url+"/object/upload/sign/".concat(o));s.searchParams.set("token",t);try{let e;const t=Object.assign({upsert:d_.upsert},r),o=Object.assign(Object.assign({},this.headers),{"x-upsert":String(t.upsert)});"undefined"!=typeof Blob&&n instanceof Blob?(e=new FormData,e.append("cacheControl",t.cacheControl),e.append("",n)):"undefined"!=typeof FormData&&n instanceof FormData?(e=n,e.append("cacheControl",t.cacheControl)):(e=n,o["cache-control"]="max-age=".concat(t.cacheControl),o["content-type"]=t.contentType);return{data:{path:i,fullPath:(yield a_(this.fetch,s.toString(),e,{headers:o})).Key},error:null}}catch(a){if(this.shouldThrowOnError)throw a;if(Gx(a))return{data:null,error:a};throw a}})}createSignedUploadUrl(e,t){return u_(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const r=Object.assign({},this.headers);(null==t?void 0:t.upsert)&&(r["x-upsert"]="true");const i=yield s_(this.fetch,"".concat(this.url,"/object/upload/sign/").concat(n),{},{headers:r}),o=new URL(this.url+i.url),s=o.searchParams.get("token");if(!s)throw new $x("No token returned by API");return{data:{signedUrl:o.toString(),path:e,token:s},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n))return{data:null,error:n};throw n}})}update(e,t,n){return u_(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,t,n)})}move(e,t,n){return u_(this,void 0,void 0,function*(){try{return{data:yield s_(this.fetch,"".concat(this.url,"/object/move"),{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==n?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Gx(r))return{data:null,error:r};throw r}})}copy(e,t,n){return u_(this,void 0,void 0,function*(){try{return{data:{path:(yield s_(this.fetch,"".concat(this.url,"/object/copy"),{bucketId:this.bucketId,sourceKey:e,destinationKey:t,destinationBucket:null==n?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Gx(r))return{data:null,error:r};throw r}})}createSignedUrl(e,t,n){return u_(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),i=yield s_(this.fetch,"".concat(this.url,"/object/sign/").concat(r),Object.assign({expiresIn:t},(null==n?void 0:n.transform)?{transform:n.transform}:{}),{headers:this.headers});const o=(null==n?void 0:n.download)?"&download=".concat(!0===n.download?"":n.download):"";return i={signedUrl:encodeURI("".concat(this.url).concat(i.signedURL).concat(o))},{data:i,error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Gx(r))return{data:null,error:r};throw r}})}createSignedUrls(e,t,n){return u_(this,void 0,void 0,function*(){try{const r=yield s_(this.fetch,"".concat(this.url,"/object/sign/").concat(this.bucketId),{expiresIn:t,paths:e},{headers:this.headers}),i=(null==n?void 0:n.download)?"&download=".concat(!0===n.download?"":n.download):"";return{data:r.map(e=>Object.assign(Object.assign({},e),{signedUrl:e.signedURL?encodeURI("".concat(this.url).concat(e.signedURL).concat(i)):null})),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Gx(r))return{data:null,error:r};throw r}})}download(e,t){return u_(this,void 0,void 0,function*(){const n=void 0!==(null==t?void 0:t.transform)?"render/image/authenticated":"object",r=this.transformOptsToQueryString((null==t?void 0:t.transform)||{}),i=r?"?".concat(r):"";try{const t=this._getFinalPath(e),r=yield o_(this.fetch,"".concat(this.url,"/").concat(n,"/").concat(t).concat(i),{headers:this.headers,noResolveJson:!0});return{data:yield r.blob(),error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Gx(o))return{data:null,error:o};throw o}})}info(e){return u_(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{const e=yield o_(this.fetch,"".concat(this.url,"/object/info/").concat(t),{headers:this.headers});return{data:Zx(e),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n))return{data:null,error:n};throw n}})}exists(e){return u_(this,void 0,void 0,function*(){const t=this._getFinalPath(e);try{return yield function(e,t,n,r){return e_(this,void 0,void 0,function*(){return i_(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}(this.fetch,"".concat(this.url,"/object/").concat(t),{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n)&&n instanceof Jx){const e=n.originalError;if([400,404].includes(null==e?void 0:e.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=(null==t?void 0:t.download)?"download=".concat(!0===t.download?"":t.download):"";""!==i&&r.push(i);const o=void 0!==(null==t?void 0:t.transform)?"render/image":"object",s=this.transformOptsToQueryString((null==t?void 0:t.transform)||{});""!==s&&r.push(s);let a=r.join("&");return""!==a&&(a="?".concat(a)),{data:{publicUrl:encodeURI("".concat(this.url,"/").concat(o,"/public/").concat(n).concat(a))}}}remove(e){return u_(this,void 0,void 0,function*(){try{return{data:yield l_(this.fetch,"".concat(this.url,"/object/").concat(this.bucketId),{prefixes:e},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Gx(t))return{data:null,error:t};throw t}})}list(e,t,n){return u_(this,void 0,void 0,function*(){try{const r=Object.assign(Object.assign(Object.assign({},c_),t),{prefix:e||""});return{data:yield s_(this.fetch,"".concat(this.url,"/object/list/").concat(this.bucketId),r,{headers:this.headers},n),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Gx(r))return{data:null,error:r};throw r}})}listV2(e,t){return u_(this,void 0,void 0,function*(){try{const n=Object.assign({},e);return{data:yield s_(this.fetch,"".concat(this.url,"/object/list-v2/").concat(this.bucketId),n,{headers:this.headers},t),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return"undefined"!=typeof Buffer?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return"".concat(this.bucketId,"/").concat(e.replace(/^\/+/,""))}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push("width=".concat(e.width)),e.height&&t.push("height=".concat(e.height)),e.resize&&t.push("resize=".concat(e.resize)),e.format&&t.push("format=".concat(e.format)),e.quality&&t.push("quality=".concat(e.quality)),t.join("&")}}const f_={"X-Client-Info":"storage-js/".concat("2.12.1")};var p_=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};class m_{constructor(e,t={},n,r){this.shouldThrowOnError=!1;const i=new URL(e);if(null==r?void 0:r.useNewHostname){/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."))}this.url=i.href,this.headers=Object.assign(Object.assign({},f_),t),this.fetch=Xx(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(){return p_(this,void 0,void 0,function*(){try{return{data:yield o_(this.fetch,"".concat(this.url,"/bucket"),{headers:this.headers}),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Gx(e))return{data:null,error:e};throw e}})}getBucket(e){return p_(this,void 0,void 0,function*(){try{return{data:yield o_(this.fetch,"".concat(this.url,"/bucket/").concat(e),{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Gx(t))return{data:null,error:t};throw t}})}createBucket(e,t={public:!1}){return p_(this,void 0,void 0,function*(){try{return{data:yield s_(this.fetch,"".concat(this.url,"/bucket"),{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n))return{data:null,error:n};throw n}})}updateBucket(e,t){return p_(this,void 0,void 0,function*(){try{return{data:yield a_(this.fetch,"".concat(this.url,"/bucket/").concat(e),{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Gx(n))return{data:null,error:n};throw n}})}emptyBucket(e){return p_(this,void 0,void 0,function*(){try{return{data:yield s_(this.fetch,"".concat(this.url,"/bucket/").concat(e,"/empty"),{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Gx(t))return{data:null,error:t};throw t}})}deleteBucket(e){return p_(this,void 0,void 0,function*(){try{return{data:yield l_(this.fetch,"".concat(this.url,"/bucket/").concat(e),{},{headers:this.headers}),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(Gx(t))return{data:null,error:t};throw t}})}}class g_ extends m_{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new h_(this.url,this.headers,e,this.fetch)}}let y_="";y_="undefined"!=typeof Deno?"deno":"undefined"!=typeof document?"web":"undefined"!=typeof navigator&&"ReactNative"===navigator.product?"react-native":"node";const v_={headers:{"X-Client-Info":"supabase-js-".concat(y_,"/").concat("2.57.4")}},b_={schema:"public"},w_={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},k_={};var S_=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};const x_=(e,t,n)=>{const r=(e=>{let t;return t=e||("undefined"==typeof fetch?SS:fetch),(...e)=>t(...e)})(n),i="undefined"==typeof Headers?xS:Headers;return(n,o)=>S_(void 0,void 0,void 0,function*(){var s;const a=null!==(s=yield t())&&void 0!==s?s:e;let l=new i(null==o?void 0:o.headers);return l.has("apikey")||l.set("apikey",e),l.has("Authorization")||l.set("Authorization","Bearer ".concat(a)),r(n,Object.assign(Object.assign({},o),{headers:l}))})};var __=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};const T_="2.71.1",E_=3e4,P_=9e4,C_={"X-Client-Info":"gotrue-js/".concat(T_)},A_="X-Supabase-Api-Version",O_={timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"},R_=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i;class j_ extends Error{constructor(e,t,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=t,this.code=n}}function L_(e){return"object"==typeof e&&null!==e&&"__isAuthError"in e}class M_ extends j_{constructor(e,t,n){super(e,t,n),this.name="AuthApiError",this.status=t,this.code=n}}class D_ extends j_{constructor(e,t){super(e),this.name="AuthUnknownError",this.originalError=t}}class I_ extends j_{constructor(e,t,n,r){super(e,n,r),this.name=t,this.status=n}}class N_ extends I_{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class U_ extends I_{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class F_ extends I_{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class V_ extends I_{constructor(e,t=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class z_ extends I_{constructor(e,t=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=t}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class B_ extends I_{constructor(e,t){super(e,"AuthRetryableFetchError",t,void 0)}}function W_(e){return L_(e)&&"AuthRetryableFetchError"===e.name}class H_ extends I_{constructor(e,t,n){super(e,"AuthWeakPasswordError",t,"weak_password"),this.reasons=n}}class q_ extends I_{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const K_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),$_=" \t\n\r=".split(""),G_=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<$_.length;t+=1)e[$_[t].charCodeAt(0)]=-2;for(let t=0;t<K_.length;t+=1)e[K_[t].charCodeAt(0)]=t;return e})();function Y_(e,t,n){if(null!==e)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;n(K_[e]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const e=t.queue>>t.queuedBits-6&63;n(K_[e]),t.queuedBits-=6}}function J_(e,t,n){const r=G_[e];if(!(r>-1)){if(-2===r)return;throw new Error('Invalid Base64-URL character "'.concat(String.fromCharCode(e),'"'))}for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8}function Q_(e){const t=[],n=e=>{t.push(String.fromCodePoint(e))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},o=e=>{!function(e,t,n){if(0===t.utf8seq){if(e<=127)return void n(e);for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(2===t.utf8seq)t.codepoint=31&e;else if(3===t.utf8seq)t.codepoint=15&e;else{if(4!==t.utf8seq)throw new Error("Invalid UTF-8 sequence");t.codepoint=7&e}t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|63&e,t.utf8seq-=1,0===t.utf8seq&&n(t.codepoint)}}(e,r,n)};for(let s=0;s<e.length;s+=1)J_(e.charCodeAt(s),i,o);return t.join("")}function X_(e,t){if(!(e<=127)){if(e<=2047)return t(192|e>>6),void t(128|63&e);if(e<=65535)return t(224|e>>12),t(128|e>>6&63),void t(128|63&e);if(e<=1114111)return t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),void t(128|63&e);throw new Error("Unrecognized Unicode codepoint: ".concat(e.toString(16)))}t(e)}function Z_(e){const t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};for(let i=0;i<e.length;i+=1)J_(e.charCodeAt(i),n,r);return new Uint8Array(t)}function eT(e){const t=[];return function(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const t=1024*(r-55296)&65535;r=65536+(e.charCodeAt(n+1)-56320&65535|t),n+=1}X_(r,t)}}(e,e=>t.push(e)),new Uint8Array(t)}function tT(e){const t=[],n={queue:0,queuedBits:0},r=e=>{t.push(e)};return e.forEach(e=>Y_(e,n,r)),Y_(null,n,r),t.join("")}const nT=()=>"undefined"!=typeof window&&"undefined"!=typeof document,rT={tested:!1,writable:!1},iT=()=>{if(!nT())return!1;try{if("object"!=typeof globalThis.localStorage)return!1}catch(qT){return!1}if(rT.tested)return rT.writable;const e="lswt-".concat(Math.random()).concat(Math.random());try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),rT.tested=!0,rT.writable=!0}catch(qT){rT.tested=!0,rT.writable=!1}return rT.writable};const oT=e=>{let t;return t=e||("undefined"==typeof fetch?(...e)=>wh(()=>p(void 0,null,function*(){const{default:e}=yield Promise.resolve().then(()=>ES);return{default:e}}),void 0).then(({default:t})=>t(...e)):fetch),(...e)=>t(...e)},sT=(e,t,n)=>p(void 0,null,function*(){yield e.setItem(t,JSON.stringify(n))}),aT=(e,t)=>p(void 0,null,function*(){const n=yield e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch(r){return n}}),lT=(e,t)=>p(void 0,null,function*(){yield e.removeItem(t)});class uT{constructor(){this.promise=new uT.promiseConstructor((e,t)=>{this.resolve=e,this.reject=t})}}function cT(e){const t=e.split(".");if(3!==t.length)throw new q_("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!R_.test(t[n]))throw new q_("JWT not in base64url format");return{header:JSON.parse(Q_(t[0])),payload:JSON.parse(Q_(t[1])),signature:Z_(t[2]),raw:{header:t[0],payload:t[1]}}}function dT(e){return("0"+e.toString(16)).substr(-2)}function hT(e){return p(this,null,function*(){if(!("undefined"!=typeof crypto&&void 0!==crypto.subtle&&"undefined"!=typeof TextEncoder))return e;const t=yield function(e){return p(this,null,function*(){const t=(new TextEncoder).encode(e),n=yield crypto.subtle.digest("SHA-256",t),r=new Uint8Array(n);return Array.from(r).map(e=>String.fromCharCode(e)).join("")})}(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")})}function fT(e,t,n=!1){return p(this,null,function*(){const r=function(){const e=new Uint32Array(56);if("undefined"==typeof crypto){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",t=e.length;let n="";for(let r=0;r<56;r++)n+=e.charAt(Math.floor(Math.random()*t));return n}return crypto.getRandomValues(e),Array.from(e,dT).join("")}();let i=r;n&&(i+="/PASSWORD_RECOVERY"),yield sT(e,"".concat(t,"-code-verifier"),i);const o=yield hT(r);return[o,r===o?"plain":"s256"]})}uT.promiseConstructor=Promise;const pT=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;const mT=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function gT(e){if(!mT.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function yT(){return new Proxy({},{get:(e,t)=>{if("__isUserNotAvailableProxy"===t)return!0;if("symbol"==typeof t){const e=t.toString();if("Symbol(Symbol.toPrimitive)"===e||"Symbol(Symbol.toStringTag)"===e||"Symbol(util.inspect.custom)"===e)return}throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "'.concat(t,'" property of the session object is not supported. Please use getUser() instead.'))},set:(e,t)=>{throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "'.concat(t,'" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.'))},deleteProperty:(e,t)=>{throw new Error('@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "'.concat(t,'" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.'))}})}function vT(e){return JSON.parse(JSON.stringify(e))}const bT=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),wT=[502,503,504];function kT(e){return p(this,null,function*(){var t,n;if(!("object"==typeof(n=e)&&null!==n&&"status"in n&&"ok"in n&&"json"in n&&"function"==typeof n.json))throw new B_(bT(e),0);if(wT.includes(e.status))throw new B_(bT(e),e.status);let r,i;try{r=yield e.json()}catch(qT){throw new D_(bT(qT),qT)}const o=function(e){const t=e.headers.get(A_);if(!t)return null;if(!t.match(pT))return null;try{return new Date("".concat(t,"T00:00:00.0Z"))}catch(qT){return null}}(e);if(o&&o.getTime()>=O_.timestamp&&"object"==typeof r&&r&&"string"==typeof r.code?i=r.code:"object"==typeof r&&r&&"string"==typeof r.error_code&&(i=r.error_code),i){if("weak_password"===i)throw new H_(bT(r),e.status,(null===(t=r.weak_password)||void 0===t?void 0:t.reasons)||[]);if("session_not_found"===i)throw new N_}else if("object"==typeof r&&r&&"object"==typeof r.weak_password&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0))throw new H_(bT(r),e.status,r.weak_password.reasons);throw new M_(bT(r),e.status||500,i)})}function ST(e,t,n,r){return p(this,null,function*(){var i;const o=Object.assign({},null==r?void 0:r.headers);o[A_]||(o[A_]=O_.name),(null==r?void 0:r.jwt)&&(o.Authorization="Bearer ".concat(r.jwt));const s=null!==(i=null==r?void 0:r.query)&&void 0!==i?i:{};(null==r?void 0:r.redirectTo)&&(s.redirect_to=r.redirectTo);const a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=yield function(e,t,n,r,i,o){return p(this,null,function*(){const s=((e,t,n,r)=>{const i={method:e,headers:(null==t?void 0:t.headers)||{}};return"GET"===e?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},null==t?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))})(t,r,i,o);let a;try{a=yield e(n,Object.assign({},s))}catch(qT){throw new B_(bT(qT),0)}if(a.ok||(yield kT(a)),null==r?void 0:r.noResolveJson)return a;try{return yield a.json()}catch(qT){yield kT(qT)}})}(e,t,n+a,{headers:o,noResolveJson:null==r?void 0:r.noResolveJson},{},null==r?void 0:r.body);return(null==r?void 0:r.xform)?null==r?void 0:r.xform(l):{data:Object.assign({},l),error:null}})}function xT(e){var t;let n=null;var r;(function(e){return e.access_token&&e.refresh_token&&e.expires_in})(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=(r=e.expires_in,Math.round(Date.now()/1e3)+r)));return{data:{session:n,user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function _T(e){const t=xT(e);return!t.error&&e.weak_password&&"object"==typeof e.weak_password&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&"string"==typeof e.weak_password.message&&e.weak_password.reasons.reduce((e,t)=>e&&"string"==typeof t,!0)&&(t.data.weak_password=e.weak_password),t}function TT(e){var t;return{data:{user:null!==(t=e.user)&&void 0!==t?t:e},error:null}}function ET(e){return{data:e,error:null}}function PT(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=e,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]);return{data:{properties:{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o},user:Object.assign({},s)},error:null}}function CT(e){return e}const AT=["global","local","others"];class OT{constructor({url:e="",headers:t={},fetch:n}){this.url=e,this.headers=t,this.fetch=oT(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}signOut(e){return p(this,arguments,function*(e,t=AT[0]){if(AT.indexOf(t)<0)throw new Error("@supabase/auth-js: Parameter scope must be one of ".concat(AT.join(", ")));try{return yield ST(this.fetch,"POST","".concat(this.url,"/logout?scope=").concat(t),{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(L_(n))return{data:null,error:n};throw n}})}inviteUserByEmail(e){return p(this,arguments,function*(e,t={}){try{return yield ST(this.fetch,"POST","".concat(this.url,"/invite"),{body:{email:e,data:t.data},headers:this.headers,redirectTo:t.redirectTo,xform:TT})}catch(n){if(L_(n))return{data:{user:null},error:n};throw n}})}generateLink(e){return p(this,null,function*(){try{const{options:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["options"]),r=Object.assign(Object.assign({},n),t);return"newEmail"in n&&(r.new_email=null==n?void 0:n.newEmail,delete r.newEmail),yield ST(this.fetch,"POST","".concat(this.url,"/admin/generate_link"),{body:r,headers:this.headers,xform:PT,redirectTo:null==t?void 0:t.redirectTo})}catch(t){if(L_(t))return{data:{properties:null,user:null},error:t};throw t}})}createUser(e){return p(this,null,function*(){try{return yield ST(this.fetch,"POST","".concat(this.url,"/admin/users"),{body:e,headers:this.headers,xform:TT})}catch(t){if(L_(t))return{data:{user:null},error:t};throw t}})}listUsers(e){return p(this,null,function*(){var t,n,r,i,o,s,a;try{const l={nextPage:null,lastPage:0,total:0},u=yield ST(this.fetch,"GET","".concat(this.url,"/admin/users"),{headers:this.headers,noResolveJson:!0,query:{page:null!==(n=null===(t=null==e?void 0:e.page)||void 0===t?void 0:t.toString())&&void 0!==n?n:"",per_page:null!==(i=null===(r=null==e?void 0:e.perPage)||void 0===r?void 0:r.toString())&&void 0!==i?i:""},xform:CT});if(u.error)throw u.error;const c=yield u.json(),d=null!==(o=u.headers.get("x-total-count"))&&void 0!==o?o:0,h=null!==(a=null===(s=u.headers.get("link"))||void 0===s?void 0:s.split(","))&&void 0!==a?a:[];return h.length>0&&(h.forEach(e=>{const t=parseInt(e.split(";")[0].split("=")[1].substring(0,1)),n=JSON.parse(e.split(";")[1].split("=")[1]);l["".concat(n,"Page")]=t}),l.total=parseInt(d)),{data:Object.assign(Object.assign({},c),l),error:null}}catch(l){if(L_(l))return{data:{users:[]},error:l};throw l}})}getUserById(e){return p(this,null,function*(){gT(e);try{return yield ST(this.fetch,"GET","".concat(this.url,"/admin/users/").concat(e),{headers:this.headers,xform:TT})}catch(t){if(L_(t))return{data:{user:null},error:t};throw t}})}updateUserById(e,t){return p(this,null,function*(){gT(e);try{return yield ST(this.fetch,"PUT","".concat(this.url,"/admin/users/").concat(e),{body:t,headers:this.headers,xform:TT})}catch(n){if(L_(n))return{data:{user:null},error:n};throw n}})}deleteUser(e,t=!1){return p(this,null,function*(){gT(e);try{return yield ST(this.fetch,"DELETE","".concat(this.url,"/admin/users/").concat(e),{headers:this.headers,body:{should_soft_delete:t},xform:TT})}catch(n){if(L_(n))return{data:{user:null},error:n};throw n}})}_listFactors(e){return p(this,null,function*(){gT(e.userId);try{const{data:t,error:n}=yield ST(this.fetch,"GET","".concat(this.url,"/admin/users/").concat(e.userId,"/factors"),{headers:this.headers,xform:e=>({data:{factors:e},error:null})});return{data:t,error:n}}catch(t){if(L_(t))return{data:null,error:t};throw t}})}_deleteFactor(e){return p(this,null,function*(){gT(e.userId),gT(e.id);try{return{data:yield ST(this.fetch,"DELETE","".concat(this.url,"/admin/users/").concat(e.userId,"/factors/").concat(e.id),{headers:this.headers}),error:null}}catch(t){if(L_(t))return{data:null,error:t};throw t}})}}function RT(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const jT=!!(globalThis&&iT()&&globalThis.localStorage&&"true"===globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug"));class LT extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class MT extends LT{}function DT(e,t,n){return p(this,null,function*(){const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort()},t),yield Promise.resolve().then(()=>globalThis.navigator.locks.request(e,0===t?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},r=>p(this,null,function*(){if(!r){if(0===t)throw new MT('Acquiring an exclusive Navigator LockManager lock "'.concat(e,'" immediately failed'));if(jT)try{yield globalThis.navigator.locks.query()}catch(qT){}return yield n()}try{return yield n()}finally{}})))})}!function(){if("object"!=typeof globalThis)try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch(qT){"undefined"!=typeof self&&(self.globalThis=self)}}();const IT={url:"http://localhost:9999",storageKey:"supabase.auth.token",autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:C_,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};function NT(e,t,n){return p(this,null,function*(){return yield n()})}const UT={};class FT{constructor(e){var t,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=FT.nextInstanceID,FT.nextInstanceID+=1,this.instanceID>0&&nT();const r=Object.assign(Object.assign({},IT),e);if(this.logDebugMessages=!!r.debug,"function"==typeof r.debug&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new OT({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=oT(r.fetch),this.lock=r.lock||NT,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:nT()&&(null===(t=null===globalThis||void 0===globalThis?void 0:globalThis.navigator)||void 0===t?void 0:t.locks)?this.lock=DT:this.lock=NT,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?(r.storage?this.storage=r.storage:iT()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=RT(this.memoryStorage)),r.userStorage&&(this.userStorage=r.userStorage)):(this.memoryStorage={},this.storage=RT(this.memoryStorage)),nT()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(qT){}null===(n=this.broadcastChannel)||void 0===n||n.addEventListener("message",e=>p(this,null,function*(){this._debug("received broadcast notification from other tab or client",e),yield this._notifyAllSubscribers(e.data.event,e.data.session,!1)}))}this.initialize()}get jwks(){var e,t;return null!==(t=null===(e=UT[this.storageKey])||void 0===e?void 0:e.jwks)&&void 0!==t?t:{keys:[]}}set jwks(e){UT[this.storageKey]=Object.assign(Object.assign({},UT[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,t;return null!==(t=null===(e=UT[this.storageKey])||void 0===e?void 0:e.cachedAt)&&void 0!==t?t:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){UT[this.storageKey]=Object.assign(Object.assign({},UT[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger("GoTrueClient@".concat(this.instanceID," (").concat(T_,") ").concat((new Date).toISOString()),...e),this}initialize(){return p(this,null,function*(){return this.initializePromise||(this.initializePromise=(()=>p(this,null,function*(){return yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._initialize()}))}))()),yield this.initializePromise})}_initialize(){return p(this,null,function*(){var e;try{const t=function(e){const t={},n=new URL(e);if(n.hash&&"#"===n.hash[0])try{new URLSearchParams(n.hash.substring(1)).forEach((e,n)=>{t[n]=e})}catch(qT){}return n.searchParams.forEach((e,n)=>{t[n]=e}),t}(window.location.href);let n="none";if(this._isImplicitGrantCallback(t)?n="implicit":(yield this._isPKCECallback(t))&&(n="pkce"),nT()&&this.detectSessionInUrl&&"none"!==n){const{data:r,error:i}=yield this._getSessionFromURL(t,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),function(e){return L_(e)&&"AuthImplicitGrantRedirectError"===e.name}(i)){const t=null===(e=i.details)||void 0===e?void 0:e.code;if("identity_already_exists"===t||"identity_not_found"===t||"single_identity_not_deletable"===t)return{error:i}}return yield this._removeSession(),{error:i}}const{session:o,redirectType:s}=r;return this._debug("#_initialize()","detected session in URL",o,"redirect type",s),yield this._saveSession(o),setTimeout(()=>p(this,null,function*(){"recovery"===s?yield this._notifyAllSubscribers("PASSWORD_RECOVERY",o):yield this._notifyAllSubscribers("SIGNED_IN",o)}),0),{error:null}}return yield this._recoverAndRefresh(),{error:null}}catch(t){return L_(t)?{error:t}:{error:new D_("Unexpected error during initialization",t)}}finally{yield this._handleVisibilityChange(),this._debug("#_initialize()","end")}})}signInAnonymously(e){return p(this,null,function*(){var t,n,r;try{const i=yield ST(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,body:{data:null!==(n=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.data)&&void 0!==n?n:{},gotrue_meta_security:{captcha_token:null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken}},xform:xT}),{data:o,error:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(i){if(L_(i))return{data:{user:null,session:null},error:i};throw i}})}signUp(e){return p(this,null,function*(){var t,n,r;try{let i;if("email"in e){const{email:n,password:r,options:o}=e;let s=null,a=null;"pkce"===this.flowType&&([s,a]=yield fT(this.storage,this.storageKey)),i=yield ST(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,redirectTo:null==o?void 0:o.emailRedirectTo,body:{email:n,password:r,data:null!==(t=null==o?void 0:o.data)&&void 0!==t?t:{},gotrue_meta_security:{captcha_token:null==o?void 0:o.captchaToken},code_challenge:s,code_challenge_method:a},xform:xT})}else{if(!("phone"in e))throw new F_("You must provide either an email or phone number and a password");{const{phone:t,password:o,options:s}=e;i=yield ST(this.fetch,"POST","".concat(this.url,"/signup"),{headers:this.headers,body:{phone:t,password:o,data:null!==(n=null==s?void 0:s.data)&&void 0!==n?n:{},channel:null!==(r=null==s?void 0:s.channel)&&void 0!==r?r:"sms",gotrue_meta_security:{captcha_token:null==s?void 0:s.captchaToken}},xform:xT})}}const{data:o,error:s}=i;if(s||!o)return{data:{user:null,session:null},error:s};const a=o.session,l=o.user;return o.session&&(yield this._saveSession(o.session),yield this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(i){if(L_(i))return{data:{user:null,session:null},error:i};throw i}})}signInWithPassword(e){return p(this,null,function*(){try{let t;if("email"in e){const{email:n,password:r,options:i}=e;t=yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=password"),{headers:this.headers,body:{email:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:_T})}else{if(!("phone"in e))throw new F_("You must provide either an email or phone number and a password");{const{phone:n,password:r,options:i}=e;t=yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=password"),{headers:this.headers,body:{phone:n,password:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},xform:_T})}}const{data:n,error:r}=t;return r?{data:{user:null,session:null},error:r}:n&&n.session&&n.user?(n.session&&(yield this._saveSession(n.session),yield this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:r}):{data:{user:null,session:null},error:new U_}}catch(t){if(L_(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOAuth(e){return p(this,null,function*(){var t,n,r,i;return yield this._handleProviderSignIn(e.provider,{redirectTo:null===(t=e.options)||void 0===t?void 0:t.redirectTo,scopes:null===(n=e.options)||void 0===n?void 0:n.scopes,queryParams:null===(r=e.options)||void 0===r?void 0:r.queryParams,skipBrowserRedirect:null===(i=e.options)||void 0===i?void 0:i.skipBrowserRedirect})})}exchangeCodeForSession(e){return p(this,null,function*(){return yield this.initializePromise,this._acquireLock(-1,()=>p(this,null,function*(){return this._exchangeCodeForSession(e)}))})}signInWithWeb3(e){return p(this,null,function*(){const{chain:t}=e;if("solana"===t)return yield this.signInWithSolana(e);throw new Error('@supabase/auth-js: Unsupported chain "'.concat(t,'"'))})}signInWithSolana(e){return p(this,null,function*(){var t,n,r,i,o,s,a,l,u,c,d,h;let f,p;if("message"in e)f=e.message,p=e.signature;else{const{chain:d,wallet:h,statement:m,options:g}=e;let y;if(nT())if("object"==typeof h)y=h;else{const e=window;if(!("solana"in e)||"object"!=typeof e.solana||!("signIn"in e.solana&&"function"==typeof e.solana.signIn||"signMessage"in e.solana&&"function"==typeof e.solana.signMessage))throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.");y=e.solana}else{if("object"!=typeof h||!(null==g?void 0:g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=h}const v=new URL(null!==(t=null==g?void 0:g.url)&&void 0!==t?t:window.location.href);if("signIn"in y&&y.signIn){const e=yield y.signIn(Object.assign(Object.assign(Object.assign({issuedAt:(new Date).toISOString()},null==g?void 0:g.signInWithSolana),{version:"1",domain:v.host,uri:v.href}),m?{statement:m}:null));let t;if(Array.isArray(e)&&e[0]&&"object"==typeof e[0])t=e[0];else{if(!(e&&"object"==typeof e&&"signedMessage"in e&&"signature"in e))throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");t=e}if(!("signedMessage"in t&&"signature"in t&&("string"==typeof t.signedMessage||t.signedMessage instanceof Uint8Array)&&t.signature instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields");f="string"==typeof t.signedMessage?t.signedMessage:(new TextDecoder).decode(t.signedMessage),p=t.signature}else{if(!("signMessage"in y&&"function"==typeof y.signMessage&&"publicKey"in y&&"object"==typeof y&&y.publicKey&&"toBase58"in y.publicKey&&"function"==typeof y.publicKey.toBase58))throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");f=["".concat(v.host," wants you to sign in with your Solana account:"),y.publicKey.toBase58(),...m?["",m,""]:[""],"Version: 1","URI: ".concat(v.href),"Issued At: ".concat(null!==(r=null===(n=null==g?void 0:g.signInWithSolana)||void 0===n?void 0:n.issuedAt)&&void 0!==r?r:(new Date).toISOString()),...(null===(i=null==g?void 0:g.signInWithSolana)||void 0===i?void 0:i.notBefore)?["Not Before: ".concat(g.signInWithSolana.notBefore)]:[],...(null===(o=null==g?void 0:g.signInWithSolana)||void 0===o?void 0:o.expirationTime)?["Expiration Time: ".concat(g.signInWithSolana.expirationTime)]:[],...(null===(s=null==g?void 0:g.signInWithSolana)||void 0===s?void 0:s.chainId)?["Chain ID: ".concat(g.signInWithSolana.chainId)]:[],...(null===(a=null==g?void 0:g.signInWithSolana)||void 0===a?void 0:a.nonce)?["Nonce: ".concat(g.signInWithSolana.nonce)]:[],...(null===(l=null==g?void 0:g.signInWithSolana)||void 0===l?void 0:l.requestId)?["Request ID: ".concat(g.signInWithSolana.requestId)]:[],...(null===(c=null===(u=null==g?void 0:g.signInWithSolana)||void 0===u?void 0:u.resources)||void 0===c?void 0:c.length)?["Resources",...g.signInWithSolana.resources.map(e=>"- ".concat(e))]:[]].join("\n");const e=yield y.signMessage((new TextEncoder).encode(f),"utf8");if(!(e&&e instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");p=e}}try{const{data:t,error:n}=yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=web3"),{headers:this.headers,body:Object.assign({chain:"solana",message:f,signature:tT(p)},(null===(d=e.options)||void 0===d?void 0:d.captchaToken)?{gotrue_meta_security:{captcha_token:null===(h=e.options)||void 0===h?void 0:h.captchaToken}}:null),xform:xT});if(n)throw n;return t&&t.session&&t.user?(t.session&&(yield this._saveSession(t.session),yield this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign({},t),error:n}):{data:{user:null,session:null},error:new U_}}catch(m){if(L_(m))return{data:{user:null,session:null},error:m};throw m}})}_exchangeCodeForSession(e){return p(this,null,function*(){const t=yield aT(this.storage,"".concat(this.storageKey,"-code-verifier")),[n,r]=(null!=t?t:"").split("/");try{const{data:t,error:i}=yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=pkce"),{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:xT});if(yield lT(this.storage,"".concat(this.storageKey,"-code-verifier")),i)throw i;return t&&t.session&&t.user?(t.session&&(yield this._saveSession(t.session),yield this._notifyAllSubscribers("SIGNED_IN",t.session)),{data:Object.assign(Object.assign({},t),{redirectType:null!=r?r:null}),error:i}):{data:{user:null,session:null,redirectType:null},error:new U_}}catch(i){if(L_(i))return{data:{user:null,session:null,redirectType:null},error:i};throw i}})}signInWithIdToken(e){return p(this,null,function*(){try{const{options:t,provider:n,token:r,access_token:i,nonce:o}=e,s=yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=id_token"),{headers:this.headers,body:{provider:n,id_token:r,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:null==t?void 0:t.captchaToken}},xform:xT}),{data:a,error:l}=s;return l?{data:{user:null,session:null},error:l}:a&&a.session&&a.user?(a.session&&(yield this._saveSession(a.session),yield this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:a,error:l}):{data:{user:null,session:null},error:new U_}}catch(t){if(L_(t))return{data:{user:null,session:null},error:t};throw t}})}signInWithOtp(e){return p(this,null,function*(){var t,n,r,i,o;try{if("email"in e){const{email:r,options:i}=e;let o=null,s=null;"pkce"===this.flowType&&([o,s]=yield fT(this.storage,this.storageKey));const{error:a}=yield ST(this.fetch,"POST","".concat(this.url,"/otp"),{headers:this.headers,body:{email:r,data:null!==(t=null==i?void 0:i.data)&&void 0!==t?t:{},create_user:null===(n=null==i?void 0:i.shouldCreateUser)||void 0===n||n,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken},code_challenge:o,code_challenge_method:s},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:a}}if("phone"in e){const{phone:t,options:n}=e,{data:s,error:a}=yield ST(this.fetch,"POST","".concat(this.url,"/otp"),{headers:this.headers,body:{phone:t,data:null!==(r=null==n?void 0:n.data)&&void 0!==r?r:{},create_user:null===(i=null==n?void 0:n.shouldCreateUser)||void 0===i||i,gotrue_meta_security:{captcha_token:null==n?void 0:n.captchaToken},channel:null!==(o=null==n?void 0:n.channel)&&void 0!==o?o:"sms"}});return{data:{user:null,session:null,messageId:null==s?void 0:s.message_id},error:a}}throw new F_("You must provide either an email or phone number.")}catch(s){if(L_(s))return{data:{user:null,session:null},error:s};throw s}})}verifyOtp(e){return p(this,null,function*(){var t,n;try{let r,i;"options"in e&&(r=null===(t=e.options)||void 0===t?void 0:t.redirectTo,i=null===(n=e.options)||void 0===n?void 0:n.captchaToken);const{data:o,error:s}=yield ST(this.fetch,"POST","".concat(this.url,"/verify"),{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:r,xform:xT});if(s)throw s;if(!o)throw new Error("An error occurred on token verification.");const a=o.session,l=o.user;return(null==a?void 0:a.access_token)&&(yield this._saveSession(a),yield this._notifyAllSubscribers("recovery"==e.type?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:l,session:a},error:null}}catch(r){if(L_(r))return{data:{user:null,session:null},error:r};throw r}})}signInWithSSO(e){return p(this,null,function*(){var t,n,r;try{let i=null,o=null;return"pkce"===this.flowType&&([i,o]=yield fT(this.storage,this.storageKey)),yield ST(this.fetch,"POST","".concat(this.url,"/sso"),{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:null!==(n=null===(t=e.options)||void 0===t?void 0:t.redirectTo)&&void 0!==n?n:void 0}),(null===(r=null==e?void 0:e.options)||void 0===r?void 0:r.captchaToken)?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:i,code_challenge_method:o}),headers:this.headers,xform:ET})}catch(i){if(L_(i))return{data:null,error:i};throw i}})}reauthenticate(){return p(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._reauthenticate()}))})}_reauthenticate(){return p(this,null,function*(){try{return yield this._useSession(e=>p(this,null,function*(){const{data:{session:t},error:n}=e;if(n)throw n;if(!t)throw new N_;const{error:r}=yield ST(this.fetch,"GET","".concat(this.url,"/reauthenticate"),{headers:this.headers,jwt:t.access_token});return{data:{user:null,session:null},error:r}}))}catch(e){if(L_(e))return{data:{user:null,session:null},error:e};throw e}})}resend(e){return p(this,null,function*(){try{const t="".concat(this.url,"/resend");if("email"in e){const{email:n,type:r,options:i}=e,{error:o}=yield ST(this.fetch,"POST",t,{headers:this.headers,body:{email:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}},redirectTo:null==i?void 0:i.emailRedirectTo});return{data:{user:null,session:null},error:o}}if("phone"in e){const{phone:n,type:r,options:i}=e,{data:o,error:s}=yield ST(this.fetch,"POST",t,{headers:this.headers,body:{phone:n,type:r,gotrue_meta_security:{captcha_token:null==i?void 0:i.captchaToken}}});return{data:{user:null,session:null,messageId:null==o?void 0:o.message_id},error:s}}throw new F_("You must provide either an email or phone number and a type")}catch(t){if(L_(t))return{data:{user:null,session:null},error:t};throw t}})}getSession(){return p(this,null,function*(){yield this.initializePromise;return yield this._acquireLock(-1,()=>p(this,null,function*(){return this._useSession(e=>p(this,null,function*(){return e}))}))})}_acquireLock(e,t){return p(this,null,function*(){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const e=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),n=(()=>p(this,null,function*(){return yield e,yield t()}))();return this.pendingInLock.push((()=>p(this,null,function*(){try{yield n}catch(qT){}}))()),n}return yield this.lock("lock:".concat(this.storageKey),e,()=>p(this,null,function*(){this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const e=t();for(this.pendingInLock.push((()=>p(this,null,function*(){try{yield e}catch(qT){}}))()),yield e;this.pendingInLock.length;){const e=[...this.pendingInLock];yield Promise.all(e),this.pendingInLock.splice(0,e.length)}return yield e}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}}))}finally{this._debug("#_acquireLock","end")}})}_useSession(e){return p(this,null,function*(){this._debug("#_useSession","begin");try{const t=yield this.__loadSession();return yield e(t)}finally{this._debug("#_useSession","end")}})}__loadSession(){return p(this,null,function*(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",(new Error).stack);try{let e=null;const t=yield aT(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",t),null!==t&&(this._isValidSession(t)?e=t:(this._debug("#getSession()","session from storage is not valid"),yield this._removeSession())),!e)return{data:{session:null},error:null};const n=!!e.expires_at&&1e3*e.expires_at-Date.now()<P_;if(this._debug("#__loadSession()","session has".concat(n?"":" not"," expired"),"expires_at",e.expires_at),!n){if(this.userStorage){const t=yield aT(this.userStorage,this.storageKey+"-user");(null==t?void 0:t.user)?e.user=t.user:e.user=yT()}if(this.storage.isServer&&e.user){let t=this.suppressGetSessionWarning;e=new Proxy(e,{get:(e,n,r)=>(t||"user"!==n||(t=!0,this.suppressGetSessionWarning=!0),Reflect.get(e,n,r))})}return{data:{session:e},error:null}}const{session:r,error:i}=yield this._callRefreshToken(e.refresh_token);return i?{data:{session:null},error:i}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}})}getUser(e){return p(this,null,function*(){if(e)return yield this._getUser(e);yield this.initializePromise;return yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._getUser()}))})}_getUser(e){return p(this,null,function*(){try{return e?yield ST(this.fetch,"GET","".concat(this.url,"/user"),{headers:this.headers,jwt:e,xform:TT}):yield this._useSession(e=>p(this,null,function*(){var t,n,r;const{data:i,error:o}=e;if(o)throw o;return(null===(t=i.session)||void 0===t?void 0:t.access_token)||this.hasCustomAuthorizationHeader?yield ST(this.fetch,"GET","".concat(this.url,"/user"),{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0,xform:TT}):{data:{user:null},error:new N_}}))}catch(t){if(L_(t))return function(e){return L_(e)&&"AuthSessionMissingError"===e.name}(t)&&(yield this._removeSession(),yield lT(this.storage,"".concat(this.storageKey,"-code-verifier"))),{data:{user:null},error:t};throw t}})}updateUser(e){return p(this,arguments,function*(e,t={}){return yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._updateUser(e,t)}))})}_updateUser(e){return p(this,arguments,function*(e,t={}){try{return yield this._useSession(n=>p(this,null,function*(){const{data:r,error:i}=n;if(i)throw i;if(!r.session)throw new N_;const o=r.session;let s=null,a=null;"pkce"===this.flowType&&null!=e.email&&([s,a]=yield fT(this.storage,this.storageKey));const{data:l,error:u}=yield ST(this.fetch,"PUT","".concat(this.url,"/user"),{headers:this.headers,redirectTo:null==t?void 0:t.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:s,code_challenge_method:a}),jwt:o.access_token,xform:TT});if(u)throw u;return o.user=l.user,yield this._saveSession(o),yield this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}}))}catch(n){if(L_(n))return{data:{user:null},error:n};throw n}})}setSession(e){return p(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._setSession(e)}))})}_setSession(e){return p(this,null,function*(){try{if(!e.access_token||!e.refresh_token)throw new N_;const t=Date.now()/1e3;let n=t,r=!0,i=null;const{payload:o}=cT(e.access_token);if(o.exp&&(n=o.exp,r=n<=t),r){const{session:t,error:n}=yield this._callRefreshToken(e.refresh_token);if(n)return{data:{user:null,session:null},error:n};if(!t)return{data:{user:null,session:null},error:null};i=t}else{const{data:r,error:o}=yield this._getUser(e.access_token);if(o)throw o;i={access_token:e.access_token,refresh_token:e.refresh_token,user:r.user,token_type:"bearer",expires_in:n-t,expires_at:n},yield this._saveSession(i),yield this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(t){if(L_(t))return{data:{session:null,user:null},error:t};throw t}})}refreshSession(e){return p(this,null,function*(){return yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._refreshSession(e)}))})}_refreshSession(e){return p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n;if(!e){const{data:r,error:i}=t;if(i)throw i;e=null!==(n=r.session)&&void 0!==n?n:void 0}if(!(null==e?void 0:e.refresh_token))throw new N_;const{session:r,error:i}=yield this._callRefreshToken(e.refresh_token);return i?{data:{user:null,session:null},error:i}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}}))}catch(t){if(L_(t))return{data:{user:null,session:null},error:t};throw t}})}_getSessionFromURL(e,t){return p(this,null,function*(){try{if(!nT())throw new V_("No browser detected.");if(e.error||e.error_description||e.error_code)throw new V_(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(t){case"implicit":if("pkce"===this.flowType)throw new z_("Not a valid PKCE flow url.");break;case"pkce":if("implicit"===this.flowType)throw new V_("Not a valid implicit grant flow url.")}if("pkce"===t){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new z_("No code detected.");const{data:t,error:n}=yield this._exchangeCodeForSession(e.code);if(n)throw n;const r=new URL(window.location.href);return r.searchParams.delete("code"),window.history.replaceState(window.history.state,"",r.toString()),{data:{session:t.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:r,access_token:i,refresh_token:o,expires_in:s,expires_at:a,token_type:l}=e;if(!(i&&s&&o&&l))throw new V_("No session defined in URL");const u=Math.round(Date.now()/1e3),c=parseInt(s);let d=u+c;a&&(d=parseInt(a));const{data:h,error:f}=yield this._getUser(i);if(f)throw f;const p={provider_token:n,provider_refresh_token:r,access_token:i,expires_in:c,expires_at:d,refresh_token:o,token_type:l,user:h.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:p,redirectType:e.type},error:null}}catch(n){if(L_(n))return{data:{session:null,redirectType:null},error:n};throw n}})}_isImplicitGrantCallback(e){return Boolean(e.access_token||e.error_description)}_isPKCECallback(e){return p(this,null,function*(){const t=yield aT(this.storage,"".concat(this.storageKey,"-code-verifier"));return!(!e.code||!t)})}signOut(){return p(this,arguments,function*(e={scope:"global"}){return yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){return yield this._signOut(e)}))})}_signOut(){return p(this,arguments,function*({scope:e}={scope:"global"}){return yield this._useSession(t=>p(this,null,function*(){var n;const{data:r,error:i}=t;if(i)return{error:i};const o=null===(n=r.session)||void 0===n?void 0:n.access_token;if(o){const{error:t}=yield this.admin.signOut(o,e);if(t&&(!function(e){return L_(e)&&"AuthApiError"===e.name}(t)||404!==t.status&&401!==t.status&&403!==t.status))return{error:t}}return"others"!==e&&(yield this._removeSession(),yield lT(this.storage,"".concat(this.storageKey,"-code-verifier"))),{error:null}}))})}onAuthStateChange(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}),n={id:t,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",t),this.stateChangeEmitters.delete(t)}};return this._debug("#onAuthStateChange()","registered callback with id",t),this.stateChangeEmitters.set(t,n),(()=>{p(this,null,function*(){yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){this._emitInitialSession(t)}))})})(),{data:{subscription:n}}}_emitInitialSession(e){return p(this,null,function*(){return yield this._useSession(t=>p(this,null,function*(){var n,r;try{const{data:{session:r},error:i}=t;if(i)throw i;yield null===(n=this.stateChangeEmitters.get(e))||void 0===n?void 0:n.callback("INITIAL_SESSION",r),this._debug("INITIAL_SESSION","callback id",e,"session",r)}catch(i){yield null===(r=this.stateChangeEmitters.get(e))||void 0===r?void 0:r.callback("INITIAL_SESSION",null),this._debug("INITIAL_SESSION","callback id",e,"error",i)}}))})}resetPasswordForEmail(e){return p(this,arguments,function*(e,t={}){let n=null,r=null;"pkce"===this.flowType&&([n,r]=yield fT(this.storage,this.storageKey,!0));try{return yield ST(this.fetch,"POST","".concat(this.url,"/recover"),{body:{email:e,code_challenge:n,code_challenge_method:r,gotrue_meta_security:{captcha_token:t.captchaToken}},headers:this.headers,redirectTo:t.redirectTo})}catch(i){if(L_(i))return{data:null,error:i};throw i}})}getUserIdentities(){return p(this,null,function*(){var e;try{const{data:t,error:n}=yield this.getUser();if(n)throw n;return{data:{identities:null!==(e=t.user.identities)&&void 0!==e?e:[]},error:null}}catch(t){if(L_(t))return{data:null,error:t};throw t}})}linkIdentity(e){return p(this,null,function*(){var t;try{const{data:n,error:r}=yield this._useSession(t=>p(this,null,function*(){var n,r,i,o,s;const{data:a,error:l}=t;if(l)throw l;const u=yield this._getUrlForProvider("".concat(this.url,"/user/identities/authorize"),e.provider,{redirectTo:null===(n=e.options)||void 0===n?void 0:n.redirectTo,scopes:null===(r=e.options)||void 0===r?void 0:r.scopes,queryParams:null===(i=e.options)||void 0===i?void 0:i.queryParams,skipBrowserRedirect:!0});return yield ST(this.fetch,"GET",u,{headers:this.headers,jwt:null!==(s=null===(o=a.session)||void 0===o?void 0:o.access_token)&&void 0!==s?s:void 0})}));if(r)throw r;return nT()&&!(null===(t=e.options)||void 0===t?void 0:t.skipBrowserRedirect)&&window.location.assign(null==n?void 0:n.url),{data:{provider:e.provider,url:null==n?void 0:n.url},error:null}}catch(n){if(L_(n))return{data:{provider:e.provider,url:null},error:n};throw n}})}unlinkIdentity(e){return p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n,r;const{data:i,error:o}=t;if(o)throw o;return yield ST(this.fetch,"DELETE","".concat(this.url,"/user/identities/").concat(e.identity_id),{headers:this.headers,jwt:null!==(r=null===(n=i.session)||void 0===n?void 0:n.access_token)&&void 0!==r?r:void 0})}))}catch(t){if(L_(t))return{data:null,error:t};throw t}})}_refreshAccessToken(e){return p(this,null,function*(){const t="#_refreshAccessToken(".concat(e.substring(0,5),"...)");this._debug(t,"begin");try{const n=Date.now();return yield function(e,t){return new Promise((n,r)=>{(()=>{p(this,null,function*(){for(let i=0;i<1/0;i++)try{const r=yield e(i);if(!t(i,null,r))return void n(r)}catch(qT){if(!t(i,qT))return void r(qT)}})})()})}(n=>p(this,null,function*(){return n>0&&(yield function(e){return p(this,null,function*(){return yield new Promise(t=>{setTimeout(()=>t(null),e)})})}(200*Math.pow(2,n-1))),this._debug(t,"refreshing attempt",n),yield ST(this.fetch,"POST","".concat(this.url,"/token?grant_type=refresh_token"),{body:{refresh_token:e},headers:this.headers,xform:xT})}),(e,t)=>{const r=200*Math.pow(2,e);return t&&W_(t)&&Date.now()+r-n<E_})}catch(n){if(this._debug(t,"error",n),L_(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(t,"end")}})}_isValidSession(e){return"object"==typeof e&&null!==e&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}_handleProviderSignIn(e,t){return p(this,null,function*(){const n=yield this._getUrlForProvider("".concat(this.url,"/authorize"),e,{redirectTo:t.redirectTo,scopes:t.scopes,queryParams:t.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",t,"url",n),nT()&&!t.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}})}_recoverAndRefresh(){return p(this,null,function*(){var e,t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=yield aT(this.storage,this.storageKey);if(i&&this.userStorage){let t=yield aT(this.userStorage,this.storageKey+"-user");this.storage.isServer||!Object.is(this.storage,this.userStorage)||t||(t={user:i.user},yield sT(this.userStorage,this.storageKey+"-user",t)),i.user=null!==(e=null==t?void 0:t.user)&&void 0!==e?e:yT()}else if(i&&!i.user&&!i.user){const e=yield aT(this.storage,this.storageKey+"-user");e&&(null==e?void 0:e.user)?(i.user=e.user,yield lT(this.storage,this.storageKey+"-user"),yield sT(this.storage,this.storageKey,i)):i.user=yT()}if(this._debug(n,"session from storage",i),!this._isValidSession(i))return this._debug(n,"session is not valid"),void(null!==i&&(yield this._removeSession()));const o=1e3*(null!==(t=i.expires_at)&&void 0!==t?t:1/0)-Date.now()<P_;if(this._debug(n,"session has".concat(o?"":" not"," expired with margin of ").concat(P_,"s")),o){if(this.autoRefreshToken&&i.refresh_token){const{error:e}=yield this._callRefreshToken(i.refresh_token);e&&(W_(e)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",e),yield this._removeSession()))}}else if(i.user&&!0===i.user.__isUserNotAvailableProxy)try{const{data:e,error:t}=yield this._getUser(i.access_token);!t&&(null==e?void 0:e.user)?(i.user=e.user,yield this._saveSession(i),yield this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(r){this._debug(n,"error getting user data, skipping SIGNED_IN notification",r)}else yield this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){return void this._debug(n,"error",i)}finally{this._debug(n,"end")}})}_callRefreshToken(e){return p(this,null,function*(){var t,n;if(!e)throw new N_;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const r="#_callRefreshToken(".concat(e.substring(0,5),"...)");this._debug(r,"begin");try{this.refreshingDeferred=new uT;const{data:t,error:n}=yield this._refreshAccessToken(e);if(n)throw n;if(!t.session)throw new N_;yield this._saveSession(t.session),yield this._notifyAllSubscribers("TOKEN_REFRESHED",t.session);const r={session:t.session,error:null};return this.refreshingDeferred.resolve(r),r}catch(i){if(this._debug(r,"error",i),L_(i)){const e={session:null,error:i};return W_(i)||(yield this._removeSession()),null===(t=this.refreshingDeferred)||void 0===t||t.resolve(e),e}throw null===(n=this.refreshingDeferred)||void 0===n||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(r,"end")}})}_notifyAllSubscribers(e,t,n=!0){return p(this,null,function*(){const r="#_notifyAllSubscribers(".concat(e,")");this._debug(r,"begin",t,"broadcast = ".concat(n));try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:t});const r=[],i=Array.from(this.stateChangeEmitters.values()).map(n=>p(this,null,function*(){try{yield n.callback(e,t)}catch(qT){r.push(qT)}}));if(yield Promise.all(i),r.length>0){for(let e=0;e<r.length;e+=1);throw r[0]}}finally{this._debug(r,"end")}})}_saveSession(e){return p(this,null,function*(){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const t=Object.assign({},e),n=t.user&&!0===t.user.__isUserNotAvailableProxy;if(this.userStorage){!n&&t.user&&(yield sT(this.userStorage,this.storageKey+"-user",{user:t.user}));const e=Object.assign({},t);delete e.user;const r=vT(e);yield sT(this.storage,this.storageKey,r)}else{const e=vT(t);yield sT(this.storage,this.storageKey,e)}})}_removeSession(){return p(this,null,function*(){this._debug("#_removeSession()"),yield lT(this.storage,this.storageKey),yield lT(this.storage,this.storageKey+"-code-verifier"),yield lT(this.storage,this.storageKey+"-user"),this.userStorage&&(yield lT(this.userStorage,this.storageKey+"-user")),yield this._notifyAllSubscribers("SIGNED_OUT",null)})}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&nT()&&(null===window||void 0===window?void 0:window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(qT){}}_startAutoRefresh(){return p(this,null,function*(){yield this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),E_);this.autoRefreshTicker=e,e&&"object"==typeof e&&"function"==typeof e.unref?e.unref():"undefined"!=typeof Deno&&"function"==typeof Deno.unrefTimer&&Deno.unrefTimer(e),setTimeout(()=>p(this,null,function*(){yield this.initializePromise,yield this._autoRefreshTokenTick()}),0)})}_stopAutoRefresh(){return p(this,null,function*(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)})}startAutoRefresh(){return p(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._startAutoRefresh()})}stopAutoRefresh(){return p(this,null,function*(){this._removeVisibilityChangedCallback(),yield this._stopAutoRefresh()})}_autoRefreshTokenTick(){return p(this,null,function*(){this._debug("#_autoRefreshTokenTick()","begin");try{yield this._acquireLock(0,()=>p(this,null,function*(){try{const e=Date.now();try{return yield this._useSession(t=>p(this,null,function*(){const{data:{session:n}}=t;if(!n||!n.refresh_token||!n.expires_at)return void this._debug("#_autoRefreshTokenTick()","no session");const r=Math.floor((1e3*n.expires_at-e)/E_);this._debug("#_autoRefreshTokenTick()","access token expires in ".concat(r," ticks, a tick lasts ").concat(E_,"ms, refresh threshold is ").concat(3," ticks")),r<=3&&(yield this._callRefreshToken(n.refresh_token))}))}catch(qT){}}finally{this._debug("#_autoRefreshTokenTick()","end")}}))}catch(qT){if(!(qT.isAcquireTimeout||qT instanceof LT))throw qT;this._debug("auto refresh token tick lock not available")}})}_handleVisibilityChange(){return p(this,null,function*(){if(this._debug("#_handleVisibilityChange()"),!nT()||!(null===window||void 0===window?void 0:window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=()=>p(this,null,function*(){return yield this._onVisibilityChanged(!1)}),null===window||void 0===window||window.addEventListener("visibilitychange",this.visibilityChangedCallback),yield this._onVisibilityChanged(!0)}catch(e){}})}_onVisibilityChanged(e){return p(this,null,function*(){const t="#_onVisibilityChanged(".concat(e,")");this._debug(t,"visibilityState",document.visibilityState),"visible"===document.visibilityState?(this.autoRefreshToken&&this._startAutoRefresh(),e||(yield this.initializePromise,yield this._acquireLock(-1,()=>p(this,null,function*(){"visible"===document.visibilityState?yield this._recoverAndRefresh():this._debug(t,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting")})))):"hidden"===document.visibilityState&&this.autoRefreshToken&&this._stopAutoRefresh()})}_getUrlForProvider(e,t,n){return p(this,null,function*(){const r=["provider=".concat(encodeURIComponent(t))];if((null==n?void 0:n.redirectTo)&&r.push("redirect_to=".concat(encodeURIComponent(n.redirectTo))),(null==n?void 0:n.scopes)&&r.push("scopes=".concat(encodeURIComponent(n.scopes))),"pkce"===this.flowType){const[e,t]=yield fT(this.storage,this.storageKey),n=new URLSearchParams({code_challenge:"".concat(encodeURIComponent(e)),code_challenge_method:"".concat(encodeURIComponent(t))});r.push(n.toString())}if(null==n?void 0:n.queryParams){const e=new URLSearchParams(n.queryParams);r.push(e.toString())}return(null==n?void 0:n.skipBrowserRedirect)&&r.push("skip_http_redirect=".concat(n.skipBrowserRedirect)),"".concat(e,"?").concat(r.join("&"))})}_unenroll(e){return p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n;const{data:r,error:i}=t;return i?{data:null,error:i}:yield ST(this.fetch,"DELETE","".concat(this.url,"/factors/").concat(e.factorId),{headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(t){if(L_(t))return{data:null,error:t};throw t}})}_enroll(e){return p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n,r;const{data:i,error:o}=t;if(o)return{data:null,error:o};const s=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},"phone"===e.factorType?{phone:e.phone}:{issuer:e.issuer}),{data:a,error:l}=yield ST(this.fetch,"POST","".concat(this.url,"/factors"),{body:s,headers:this.headers,jwt:null===(n=null==i?void 0:i.session)||void 0===n?void 0:n.access_token});return l?{data:null,error:l}:("totp"===e.factorType&&(null===(r=null==a?void 0:a.totp)||void 0===r?void 0:r.qr_code)&&(a.totp.qr_code="data:image/svg+xml;utf-8,".concat(a.totp.qr_code)),{data:a,error:null})}))}catch(t){if(L_(t))return{data:null,error:t};throw t}})}_verify(e){return p(this,null,function*(){return this._acquireLock(-1,()=>p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n;const{data:r,error:i}=t;if(i)return{data:null,error:i};const{data:o,error:s}=yield ST(this.fetch,"POST","".concat(this.url,"/factors/").concat(e.factorId,"/verify"),{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token});return s?{data:null,error:s}:(yield this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),yield this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:s})}))}catch(t){if(L_(t))return{data:null,error:t};throw t}}))})}_challenge(e){return p(this,null,function*(){return this._acquireLock(-1,()=>p(this,null,function*(){try{return yield this._useSession(t=>p(this,null,function*(){var n;const{data:r,error:i}=t;return i?{data:null,error:i}:yield ST(this.fetch,"POST","".concat(this.url,"/factors/").concat(e.factorId,"/challenge"),{body:{channel:e.channel},headers:this.headers,jwt:null===(n=null==r?void 0:r.session)||void 0===n?void 0:n.access_token})}))}catch(t){if(L_(t))return{data:null,error:t};throw t}}))})}_challengeAndVerify(e){return p(this,null,function*(){const{data:t,error:n}=yield this._challenge({factorId:e.factorId});return n?{data:null,error:n}:yield this._verify({factorId:e.factorId,challengeId:t.id,code:e.code})})}_listFactors(){return p(this,null,function*(){const{data:{user:e},error:t}=yield this.getUser();if(t)return{data:null,error:t};const n=(null==e?void 0:e.factors)||[],r=n.filter(e=>"totp"===e.factor_type&&"verified"===e.status),i=n.filter(e=>"phone"===e.factor_type&&"verified"===e.status);return{data:{all:n,totp:r,phone:i},error:null}})}_getAuthenticatorAssuranceLevel(){return p(this,null,function*(){return this._acquireLock(-1,()=>p(this,null,function*(){return yield this._useSession(e=>p(this,null,function*(){var t,n;const{data:{session:r},error:i}=e;if(i)return{data:null,error:i};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=cT(r.access_token);let s=null;o.aal&&(s=o.aal);let a=s;(null!==(n=null===(t=r.user.factors)||void 0===t?void 0:t.filter(e=>"verified"===e.status))&&void 0!==n?n:[]).length>0&&(a="aal2");return{data:{currentLevel:s,nextLevel:a,currentAuthenticationMethods:o.amr||[]},error:null}}))}))})}fetchJwk(e){return p(this,arguments,function*(e,t={keys:[]}){let n=t.keys.find(t=>t.kid===e);if(n)return n;const r=Date.now();if(n=this.jwks.keys.find(t=>t.kid===e),n&&this.jwks_cached_at+6e5>r)return n;const{data:i,error:o}=yield ST(this.fetch,"GET","".concat(this.url,"/.well-known/jwks.json"),{headers:this.headers});if(o)throw o;return i.keys&&0!==i.keys.length?(this.jwks=i,this.jwks_cached_at=r,n=i.keys.find(t=>t.kid===e),n||null):null})}getClaims(e){return p(this,arguments,function*(e,t={}){try{let n=e;if(!n){const{data:e,error:t}=yield this.getSession();if(t||!e.session)return{data:null,error:t};n=e.session.access_token}const{header:r,payload:i,signature:o,raw:{header:s,payload:a}}=cT(n);(null==t?void 0:t.allowExpired)||function(e){if(!e)throw new Error("Missing exp claim");if(e<=Math.floor(Date.now()/1e3))throw new Error("JWT has expired")}(i.exp);const l=r.alg&&!r.alg.startsWith("HS")&&r.kid&&"crypto"in globalThis&&"subtle"in globalThis.crypto?yield this.fetchJwk(r.kid,(null==t?void 0:t.keys)?{keys:t.keys}:null==t?void 0:t.jwks):null;if(!l){const{error:e}=yield this.getUser(n);if(e)throw e;return{data:{claims:i,header:r,signature:o},error:null}}const u=function(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}(r.alg),c=yield crypto.subtle.importKey("jwk",l,u,!0,["verify"]);if(!(yield crypto.subtle.verify(u,c,o,eT("".concat(s,".").concat(a)))))throw new q_("Invalid JWT signature");return{data:{claims:i,header:r,signature:o},error:null}}catch(n){if(L_(n))return{data:null,error:n};throw n}})}}FT.nextInstanceID=0;const VT=FT;class zT extends VT{constructor(e){super(e)}}var BT=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{l(r.next(e))}catch(qT){o(qT)}}function a(e){try{l(r.throw(e))}catch(qT){o(qT)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}l((r=r.apply(e,t||[])).next())})};class WT{constructor(e,t,n){var r,i,o;this.supabaseUrl=e,this.supabaseKey=t;const s=function(e){const t=null==e?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL((n=t).endsWith("/")?n:n+"/")}catch(r){throw Error("Invalid supabaseUrl: Provided URL is malformed.")}var n}(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const a="sb-".concat(s.hostname.split(".")[0],"-auth-token"),l=function(e,t){var n,r;const{db:i,auth:o,realtime:s,global:a}=e,{db:l,auth:u,realtime:c,global:d}=t,h={db:Object.assign(Object.assign({},l),i),auth:Object.assign(Object.assign({},u),o),realtime:Object.assign(Object.assign({},c),s),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},null!==(n=null==d?void 0:d.headers)&&void 0!==n?n:{}),null!==(r=null==a?void 0:a.headers)&&void 0!==r?r:{})}),accessToken:()=>__(this,void 0,void 0,function*(){return""})};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}(null!=n?n:{},{db:b_,realtime:k_,auth:Object.assign(Object.assign({},w_),{storageKey:a}),global:v_});this.storageKey=null!==(r=l.auth.storageKey)&&void 0!==r?r:"",this.headers=null!==(i=l.global.headers)&&void 0!==i?i:{},l.accessToken?(this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(e,t)=>{throw new Error("@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.".concat(String(t)," is not possible"))}})):this.auth=this._initSupabaseAuthClient(null!==(o=l.auth)&&void 0!==o?o:{},this.headers,l.global.fetch),this.fetch=x_(t,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.rest=new XS(new URL("rest/v1",s).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch}),this.storage=new g_(this.storageUrl.href,this.headers,this.fetch,null==n?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new fS(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={}){return this.rest.rpc(e,t,n)}channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,t;return BT(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return null!==(t=null===(e=n.session)||void 0===e?void 0:e.access_token)&&void 0!==t?t:this.supabaseKey})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:o,flowType:s,lock:a,debug:l},u,c){const d={Authorization:"Bearer ".concat(this.supabaseKey),apikey:"".concat(this.supabaseKey)};return new zT({url:this.authUrl.href,headers:Object.assign(Object.assign({},d),u),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:s,lock:a,debug:l,fetch:c,hasCustomAuthorizationHeader:Object.keys(this.headers).some(e=>"authorization"===e.toLowerCase())})}_initRealtimeClient(e){return new Kx(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},null==e?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",null==t?void 0:t.access_token)})}_handleTokenChanged(e,t,n){"TOKEN_REFRESHED"!==e&&"SIGNED_IN"!==e||this.changedAccessToken===n?"SIGNED_OUT"===e&&(this.realtime.setAuth(),"STORAGE"==t&&this.auth.signOut(),this.changedAccessToken=void 0):this.changedAccessToken=n}}const HT=(e,t,n)=>new WT(e,t,n);!function(){if("undefined"!=typeof window)return!1;if("undefined"==typeof process)return!1;const e=process.version;if(null==e)return!1;const t=e.match(/^v(\d+)\./);!!t&&parseInt(t[1],10)}();export{sv as A,Gf as B,vh as H,Jf as L,xf as N,Ef as R,wh as _,hf as a,_f as b,HT as c,yd as d,dh as e,vd as f,df as g,de as j,oS as m,ne as r,lf as u};