var Ip=t=>{throw TypeError(t)};var hu=(t,n,r)=>n.has(t)||Ip("Cannot "+r);var T=(t,n,r)=>(hu(t,n,"read from private field"),r?r.call(t):n.get(t)),de=(t,n,r)=>n.has(t)?Ip("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),K=(t,n,r,o)=>(hu(t,n,"write to private field"),o?o.call(t,r):n.set(t,r),r),ke=(t,n,r)=>(hu(t,n,"access private method"),r);var La=(t,n,r,o)=>({set _(l){K(t,n,l,r)},get _(){return T(t,n,o)}});function Bv(t,n){for(var r=0;r<n.length;r++){const o=n[r];if(typeof o!="string"&&!Array.isArray(o)){for(const l in o)if(l!=="default"&&!(l in t)){const u=Object.getOwnPropertyDescriptor(o,l);u&&Object.defineProperty(t,l,u.get?u:{enumerable:!0,get:()=>o[l]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))o(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(l){if(l.ep)return;l.ep=!0;const u=r(l);fetch(l.href,u)}})();function Ax(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fu={exports:{}},Wi={},pu={exports:{}},Ne={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Bp;function Uv(){if(Bp)return Ne;Bp=1;var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function w(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,k={};function j(P,z,ge){this.props=P,this.context=z,this.refs=k,this.updater=ge||A}j.prototype.isReactComponent={},j.prototype.setState=function(P,z){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,z,"setState")},j.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function _(){}_.prototype=j.prototype;function I(P,z,ge){this.props=P,this.context=z,this.refs=k,this.updater=ge||A}var N=I.prototype=new _;N.constructor=I,D(N,j.prototype),N.isPureReactComponent=!0;var S=Array.isArray,B=Object.prototype.hasOwnProperty,H={current:null},Z={key:!0,ref:!0,__self:!0,__source:!0};function $(P,z,ge){var J,oe={},he=null,Ae=null;if(z!=null)for(J in z.ref!==void 0&&(Ae=z.ref),z.key!==void 0&&(he=""+z.key),z)B.call(z,J)&&!Z.hasOwnProperty(J)&&(oe[J]=z[J]);var be=arguments.length-2;if(be===1)oe.children=ge;else if(1<be){for(var me=Array(be),$e=0;$e<be;$e++)me[$e]=arguments[$e+2];oe.children=me}if(P&&P.defaultProps)for(J in be=P.defaultProps,be)oe[J]===void 0&&(oe[J]=be[J]);return{$$typeof:t,type:P,key:he,ref:Ae,props:oe,_owner:H.current}}function le(P,z){return{$$typeof:t,type:P.type,key:z,ref:P.ref,props:P.props,_owner:P._owner}}function ve(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function fe(P){var z={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ge){return z[ge]})}var Me=/\/+/g;function Ke(P,z){return typeof P=="object"&&P!==null&&P.key!=null?fe(""+P.key):z.toString(36)}function Oe(P,z,ge,J,oe){var he=typeof P;(he==="undefined"||he==="boolean")&&(P=null);var Ae=!1;if(P===null)Ae=!0;else switch(he){case"string":case"number":Ae=!0;break;case"object":switch(P.$$typeof){case t:case n:Ae=!0}}if(Ae)return Ae=P,oe=oe(Ae),P=J===""?"."+Ke(Ae,0):J,S(oe)?(ge="",P!=null&&(ge=P.replace(Me,"$&/")+"/"),Oe(oe,z,ge,"",function($e){return $e})):oe!=null&&(ve(oe)&&(oe=le(oe,ge+(!oe.key||Ae&&Ae.key===oe.key?"":(""+oe.key).replace(Me,"$&/")+"/")+P)),z.push(oe)),1;if(Ae=0,J=J===""?".":J+":",S(P))for(var be=0;be<P.length;be++){he=P[be];var me=J+Ke(he,be);Ae+=Oe(he,z,ge,me,oe)}else if(me=w(P),typeof me=="function")for(P=me.call(P),be=0;!(he=P.next()).done;)he=he.value,me=J+Ke(he,be++),Ae+=Oe(he,z,ge,me,oe);else if(he==="object")throw z=String(P),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return Ae}function ze(P,z,ge){if(P==null)return P;var J=[],oe=0;return Oe(P,J,"","",function(he){return z.call(ge,he,oe++)}),J}function De(P){if(P._status===-1){var z=P._result;z=z(),z.then(function(ge){(P._status===0||P._status===-1)&&(P._status=1,P._result=ge)},function(ge){(P._status===0||P._status===-1)&&(P._status=2,P._result=ge)}),P._status===-1&&(P._status=0,P._result=z)}if(P._status===1)return P._result.default;throw P._result}var Re={current:null},G={transition:null},ae={ReactCurrentDispatcher:Re,ReactCurrentBatchConfig:G,ReactCurrentOwner:H};function U(){throw Error("act(...) is not supported in production builds of React.")}return Ne.Children={map:ze,forEach:function(P,z,ge){ze(P,function(){z.apply(this,arguments)},ge)},count:function(P){var z=0;return ze(P,function(){z++}),z},toArray:function(P){return ze(P,function(z){return z})||[]},only:function(P){if(!ve(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Ne.Component=j,Ne.Fragment=r,Ne.Profiler=l,Ne.PureComponent=I,Ne.StrictMode=o,Ne.Suspense=m,Ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,Ne.act=U,Ne.cloneElement=function(P,z,ge){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var J=D({},P.props),oe=P.key,he=P.ref,Ae=P._owner;if(z!=null){if(z.ref!==void 0&&(he=z.ref,Ae=H.current),z.key!==void 0&&(oe=""+z.key),P.type&&P.type.defaultProps)var be=P.type.defaultProps;for(me in z)B.call(z,me)&&!Z.hasOwnProperty(me)&&(J[me]=z[me]===void 0&&be!==void 0?be[me]:z[me])}var me=arguments.length-2;if(me===1)J.children=ge;else if(1<me){be=Array(me);for(var $e=0;$e<me;$e++)be[$e]=arguments[$e+2];J.children=be}return{$$typeof:t,type:P.type,key:oe,ref:he,props:J,_owner:Ae}},Ne.createContext=function(P){return P={$$typeof:d,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:u,_context:P},P.Consumer=P},Ne.createElement=$,Ne.createFactory=function(P){var z=$.bind(null,P);return z.type=P,z},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(P){return{$$typeof:f,render:P}},Ne.isValidElement=ve,Ne.lazy=function(P){return{$$typeof:g,_payload:{_status:-1,_result:P},_init:De}},Ne.memo=function(P,z){return{$$typeof:x,type:P,compare:z===void 0?null:z}},Ne.startTransition=function(P){var z=G.transition;G.transition={};try{P()}finally{G.transition=z}},Ne.unstable_act=U,Ne.useCallback=function(P,z){return Re.current.useCallback(P,z)},Ne.useContext=function(P){return Re.current.useContext(P)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(P){return Re.current.useDeferredValue(P)},Ne.useEffect=function(P,z){return Re.current.useEffect(P,z)},Ne.useId=function(){return Re.current.useId()},Ne.useImperativeHandle=function(P,z,ge){return Re.current.useImperativeHandle(P,z,ge)},Ne.useInsertionEffect=function(P,z){return Re.current.useInsertionEffect(P,z)},Ne.useLayoutEffect=function(P,z){return Re.current.useLayoutEffect(P,z)},Ne.useMemo=function(P,z){return Re.current.useMemo(P,z)},Ne.useReducer=function(P,z,ge){return Re.current.useReducer(P,z,ge)},Ne.useRef=function(P){return Re.current.useRef(P)},Ne.useState=function(P){return Re.current.useState(P)},Ne.useSyncExternalStore=function(P,z,ge){return Re.current.useSyncExternalStore(P,z,ge)},Ne.useTransition=function(){return Re.current.useTransition()},Ne.version="18.3.1",Ne}var Up;function gd(){return Up||(Up=1,pu.exports=Uv()),pu.exports}/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zp;function zv(){if(zp)return Wi;zp=1;var t=gd(),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(f,m,x){var g,v={},w=null,A=null;x!==void 0&&(w=""+x),m.key!==void 0&&(w=""+m.key),m.ref!==void 0&&(A=m.ref);for(g in m)o.call(m,g)&&!u.hasOwnProperty(g)&&(v[g]=m[g]);if(f&&f.defaultProps)for(g in m=f.defaultProps,m)v[g]===void 0&&(v[g]=m[g]);return{$$typeof:n,type:f,key:w,ref:A,props:v,_owner:l.current}}return Wi.Fragment=r,Wi.jsx=d,Wi.jsxs=d,Wi}var $p;function $v(){return $p||($p=1,fu.exports=zv()),fu.exports}var i=$v(),b=gd();const Wv=Ax(b),yd=Bv({__proto__:null,default:Wv},[b]);var Fa={},mu={exports:{}},Mt={},xu={exports:{}},gu={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Wp;function qv(){return Wp||(Wp=1,(function(t){function n(G,ae){var U=G.length;G.push(ae);e:for(;0<U;){var P=U-1>>>1,z=G[P];if(0<l(z,ae))G[P]=ae,G[U]=z,U=P;else break e}}function r(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var ae=G[0],U=G.pop();if(U!==ae){G[0]=U;e:for(var P=0,z=G.length,ge=z>>>1;P<ge;){var J=2*(P+1)-1,oe=G[J],he=J+1,Ae=G[he];if(0>l(oe,U))he<z&&0>l(Ae,oe)?(G[P]=Ae,G[he]=U,P=he):(G[P]=oe,G[J]=U,P=J);else if(he<z&&0>l(Ae,U))G[P]=Ae,G[he]=U,P=he;else break e}}return ae}function l(G,ae){var U=G.sortIndex-ae.sortIndex;return U!==0?U:G.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var m=[],x=[],g=1,v=null,w=3,A=!1,D=!1,k=!1,j=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(G){for(var ae=r(x);ae!==null;){if(ae.callback===null)o(x);else if(ae.startTime<=G)o(x),ae.sortIndex=ae.expirationTime,n(m,ae);else break;ae=r(x)}}function S(G){if(k=!1,N(G),!D)if(r(m)!==null)D=!0,De(B);else{var ae=r(x);ae!==null&&Re(S,ae.startTime-G)}}function B(G,ae){D=!1,k&&(k=!1,_($),$=-1),A=!0;var U=w;try{for(N(ae),v=r(m);v!==null&&(!(v.expirationTime>ae)||G&&!fe());){var P=v.callback;if(typeof P=="function"){v.callback=null,w=v.priorityLevel;var z=P(v.expirationTime<=ae);ae=t.unstable_now(),typeof z=="function"?v.callback=z:v===r(m)&&o(m),N(ae)}else o(m);v=r(m)}if(v!==null)var ge=!0;else{var J=r(x);J!==null&&Re(S,J.startTime-ae),ge=!1}return ge}finally{v=null,w=U,A=!1}}var H=!1,Z=null,$=-1,le=5,ve=-1;function fe(){return!(t.unstable_now()-ve<le)}function Me(){if(Z!==null){var G=t.unstable_now();ve=G;var ae=!0;try{ae=Z(!0,G)}finally{ae?Ke():(H=!1,Z=null)}}else H=!1}var Ke;if(typeof I=="function")Ke=function(){I(Me)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,ze=Oe.port2;Oe.port1.onmessage=Me,Ke=function(){ze.postMessage(null)}}else Ke=function(){j(Me,0)};function De(G){Z=G,H||(H=!0,Ke())}function Re(G,ae){$=j(function(){G(t.unstable_now())},ae)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_continueExecution=function(){D||A||(D=!0,De(B))},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return w},t.unstable_getFirstCallbackNode=function(){return r(m)},t.unstable_next=function(G){switch(w){case 1:case 2:case 3:var ae=3;break;default:ae=w}var U=w;w=ae;try{return G()}finally{w=U}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(G,ae){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var U=w;w=G;try{return ae()}finally{w=U}},t.unstable_scheduleCallback=function(G,ae,U){var P=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?P+U:P):U=P,G){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=U+z,G={id:g++,callback:ae,priorityLevel:G,startTime:U,expirationTime:z,sortIndex:-1},U>P?(G.sortIndex=U,n(x,G),r(m)===null&&G===r(x)&&(k?(_($),$=-1):k=!0,Re(S,U-P))):(G.sortIndex=z,n(m,G),D||A||(D=!0,De(B))),G},t.unstable_shouldYield=fe,t.unstable_wrapCallback=function(G){var ae=w;return function(){var U=w;w=ae;try{return G.apply(this,arguments)}finally{w=U}}}})(gu)),gu}var qp;function Hv(){return qp||(qp=1,xu.exports=qv()),xu.exports}/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Hp;function Vv(){if(Hp)return Mt;Hp=1;var t=gd(),n=Hv();function r(e){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+e,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+e+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,l={};function u(e,s){d(e,s),d(e+"Capture",s)}function d(e,s){for(l[e]=s,e=0;e<s.length;e++)o.add(s[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,x=/^[: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]*$/,g={},v={};function w(e){return m.call(v,e)?!0:m.call(g,e)?!1:x.test(e)?v[e]=!0:(g[e]=!0,!1)}function A(e,s,a,c){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function D(e,s,a,c){if(s===null||typeof s>"u"||A(e,s,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function k(e,s,a,c,h,p,y){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=e,this.type=s,this.sanitizeURL=p,this.removeEmptyString=y}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){j[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var s=e[0];j[s]=new k(s,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){j[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){j[e]=new k(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){j[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){j[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){j[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){j[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){j[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function I(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var s=e.replace(_,I);j[s]=new k(s,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var s=e.replace(_,I);j[s]=new k(s,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var s=e.replace(_,I);j[s]=new k(s,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){j[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),j.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){j[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,s,a,c){var h=j.hasOwnProperty(s)?j[s]:null;(h!==null?h.type!==0:c||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(D(s,a,h,c)&&(a=null),c||h===null?w(s)&&(a===null?e.removeAttribute(s):e.setAttribute(s,""+a)):h.mustUseProperty?e[h.propertyName]=a===null?h.type===3?!1:"":a:(s=h.attributeName,c=h.attributeNamespace,a===null?e.removeAttribute(s):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,c?e.setAttributeNS(c,s,a):e.setAttribute(s,a))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),H=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),le=Symbol.for("react.profiler"),ve=Symbol.for("react.provider"),fe=Symbol.for("react.context"),Me=Symbol.for("react.forward_ref"),Ke=Symbol.for("react.suspense"),Oe=Symbol.for("react.suspense_list"),ze=Symbol.for("react.memo"),De=Symbol.for("react.lazy"),Re=Symbol.for("react.offscreen"),G=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=G&&e[G]||e["@@iterator"],typeof e=="function"?e:null)}var U=Object.assign,P;function z(e){if(P===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);P=s&&s[1]||""}return`
`+P+e}var ge=!1;function J(e,s){if(!e||ge)return"";ge=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(F){var c=F}Reflect.construct(e,[],s)}else{try{s.call()}catch(F){c=F}e.call(s.prototype)}else{try{throw Error()}catch(F){c=F}e()}}catch(F){if(F&&c&&typeof F.stack=="string"){for(var h=F.stack.split(`
`),p=c.stack.split(`
`),y=h.length-1,C=p.length-1;1<=y&&0<=C&&h[y]!==p[C];)C--;for(;1<=y&&0<=C;y--,C--)if(h[y]!==p[C]){if(y!==1||C!==1)do if(y--,C--,0>C||h[y]!==p[C]){var E=`
`+h[y].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),E}while(1<=y&&0<=C);break}}}finally{ge=!1,Error.prepareStackTrace=a}return(e=e?e.displayName||e.name:"")?z(e):""}function oe(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function he(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Z:return"Fragment";case H:return"Portal";case le:return"Profiler";case $:return"StrictMode";case Ke:return"Suspense";case Oe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fe:return(e.displayName||"Context")+".Consumer";case ve:return(e._context.displayName||"Context")+".Provider";case Me:var s=e.render;return e=e.displayName,e||(e=s.displayName||s.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ze:return s=e.displayName||null,s!==null?s:he(e.type)||"Memo";case De:s=e._payload,e=e._init;try{return he(e(s))}catch{}}return null}function Ae(e){var s=e.type;switch(e.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=s.render,e=e.displayName||e.name||"",s.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return he(s);case 8:return s===$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function me(e){var s=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function $e(e){var s=me(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,s),c=""+e[s];if(!e.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,p=a.set;return Object.defineProperty(e,s,{configurable:!0,get:function(){return h.call(this)},set:function(y){c=""+y,p.call(this,y)}}),Object.defineProperty(e,s,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(y){c=""+y},stopTracking:function(){e._valueTracker=null,delete e[s]}}}}function pe(e){e._valueTracker||(e._valueTracker=$e(e))}function lt(e){if(!e)return!1;var s=e._valueTracker;if(!s)return!0;var a=s.getValue(),c="";return e&&(c=me(e)?e.checked?"true":"false":e.value),e=c,e!==a?(s.setValue(e),!0):!1}function kt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,s){var a=s.checked;return U({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??e._wrapperState.initialChecked})}function ri(e,s){var a=s.defaultValue==null?"":s.defaultValue,c=s.checked!=null?s.checked:s.defaultChecked;a=be(s.value!=null?s.value:a),e._wrapperState={initialChecked:c,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Eo(e,s){s=s.checked,s!=null&&N(e,"checked",s,!1)}function En(e,s){Eo(e,s);var a=be(s.value),c=s.type;if(a!=null)c==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+a):e.value!==""+a&&(e.value=""+a);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}s.hasOwnProperty("value")?wl(e,s.type,a):s.hasOwnProperty("defaultValue")&&wl(e,s.type,be(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(e.defaultChecked=!!s.defaultChecked)}function Vd(e,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var c=s.type;if(!(c!=="submit"&&c!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+e._wrapperState.initialValue,a||s===e.value||(e.value=s),e.defaultValue=s}a=e.name,a!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,a!==""&&(e.name=a)}function wl(e,s,a){(s!=="number"||kt(e.ownerDocument)!==e)&&(a==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+a&&(e.defaultValue=""+a))}var si=Array.isArray;function hs(e,s,a,c){if(e=e.options,s){s={};for(var h=0;h<a.length;h++)s["$"+a[h]]=!0;for(a=0;a<e.length;a++)h=s.hasOwnProperty("$"+e[a].value),e[a].selected!==h&&(e[a].selected=h),h&&c&&(e[a].defaultSelected=!0)}else{for(a=""+be(a),s=null,h=0;h<e.length;h++){if(e[h].value===a){e[h].selected=!0,c&&(e[h].defaultSelected=!0);return}s!==null||e[h].disabled||(s=e[h])}s!==null&&(s.selected=!0)}}function jl(e,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return U({},s,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Qd(e,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(r(92));if(si(a)){if(1<a.length)throw Error(r(93));a=a[0]}s=a}s==null&&(s=""),a=s}e._wrapperState={initialValue:be(a)}}function Gd(e,s){var a=be(s.value),c=be(s.defaultValue);a!=null&&(a=""+a,a!==e.value&&(e.value=a),s.defaultValue==null&&e.defaultValue!==a&&(e.defaultValue=a)),c!=null&&(e.defaultValue=""+c)}function Yd(e){var s=e.textContent;s===e._wrapperState.initialValue&&s!==""&&s!==null&&(e.value=s)}function Kd(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 Nl(e,s){return e==null||e==="http://www.w3.org/1999/xhtml"?Kd(s):e==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ao,Jd=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,c,h){MSApp.execUnsafeLocalFunction(function(){return e(s,a,c,h)})}:e})(function(e,s){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=s;else{for(Ao=Ao||document.createElement("div"),Ao.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ao.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;s.firstChild;)e.appendChild(s.firstChild)}});function ii(e,s){if(s){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=s;return}}e.textContent=s}var oi={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},Wy=["Webkit","ms","Moz","O"];Object.keys(oi).forEach(function(e){Wy.forEach(function(s){s=s+e.charAt(0).toUpperCase()+e.substring(1),oi[s]=oi[e]})});function Xd(e,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||oi.hasOwnProperty(e)&&oi[e]?(""+s).trim():s+"px"}function Zd(e,s){e=e.style;for(var a in s)if(s.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=Xd(a,s[a],c);a==="float"&&(a="cssFloat"),c?e.setProperty(a,h):e[a]=h}}var qy=U({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 Cl(e,s){if(s){if(qy[e]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function kl(e,s){if(e.indexOf("-")===-1)return typeof s.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sl=null;function El(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Al=null,fs=null,ps=null;function eh(e){if(e=Ai(e)){if(typeof Al!="function")throw Error(r(280));var s=e.stateNode;s&&(s=Jo(s),Al(e.stateNode,e.type,s))}}function th(e){fs?ps?ps.push(e):ps=[e]:fs=e}function nh(){if(fs){var e=fs,s=ps;if(ps=fs=null,eh(e),s)for(e=0;e<s.length;e++)eh(s[e])}}function rh(e,s){return e(s)}function sh(){}var _l=!1;function ih(e,s,a){if(_l)return e(s,a);_l=!0;try{return rh(e,s,a)}finally{_l=!1,(fs!==null||ps!==null)&&(sh(),nh())}}function ai(e,s){var a=e.stateNode;if(a===null)return null;var c=Jo(a);if(c===null)return null;a=c[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,s,typeof a));return a}var Tl=!1;if(f)try{var li={};Object.defineProperty(li,"passive",{get:function(){Tl=!0}}),window.addEventListener("test",li,li),window.removeEventListener("test",li,li)}catch{Tl=!1}function Hy(e,s,a,c,h,p,y,C,E){var F=Array.prototype.slice.call(arguments,3);try{s.apply(a,F)}catch(q){this.onError(q)}}var ci=!1,_o=null,To=!1,Dl=null,Vy={onError:function(e){ci=!0,_o=e}};function Qy(e,s,a,c,h,p,y,C,E){ci=!1,_o=null,Hy.apply(Vy,arguments)}function Gy(e,s,a,c,h,p,y,C,E){if(Qy.apply(this,arguments),ci){if(ci){var F=_o;ci=!1,_o=null}else throw Error(r(198));To||(To=!0,Dl=F)}}function Ar(e){var s=e,a=e;if(e.alternate)for(;s.return;)s=s.return;else{e=s;do s=e,(s.flags&4098)!==0&&(a=s.return),e=s.return;while(e)}return s.tag===3?a:null}function oh(e){if(e.tag===13){var s=e.memoizedState;if(s===null&&(e=e.alternate,e!==null&&(s=e.memoizedState)),s!==null)return s.dehydrated}return null}function ah(e){if(Ar(e)!==e)throw Error(r(188))}function Yy(e){var s=e.alternate;if(!s){if(s=Ar(e),s===null)throw Error(r(188));return s!==e?null:e}for(var a=e,c=s;;){var h=a.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===a)return ah(h),e;if(p===c)return ah(h),s;p=p.sibling}throw Error(r(188))}if(a.return!==c.return)a=h,c=p;else{for(var y=!1,C=h.child;C;){if(C===a){y=!0,a=h,c=p;break}if(C===c){y=!0,c=h,a=p;break}C=C.sibling}if(!y){for(C=p.child;C;){if(C===a){y=!0,a=p,c=h;break}if(C===c){y=!0,c=p,a=h;break}C=C.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==c)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:s}function lh(e){return e=Yy(e),e!==null?ch(e):null}function ch(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var s=ch(e);if(s!==null)return s;e=e.sibling}return null}var uh=n.unstable_scheduleCallback,dh=n.unstable_cancelCallback,Ky=n.unstable_shouldYield,Jy=n.unstable_requestPaint,Ze=n.unstable_now,Xy=n.unstable_getCurrentPriorityLevel,Rl=n.unstable_ImmediatePriority,hh=n.unstable_UserBlockingPriority,Do=n.unstable_NormalPriority,Zy=n.unstable_LowPriority,fh=n.unstable_IdlePriority,Ro=null,xn=null;function e0(e){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(Ro,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:r0,t0=Math.log,n0=Math.LN2;function r0(e){return e>>>=0,e===0?32:31-(t0(e)/n0|0)|0}var Po=64,Oo=4194304;function ui(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Mo(e,s){var a=e.pendingLanes;if(a===0)return 0;var c=0,h=e.suspendedLanes,p=e.pingedLanes,y=a&268435455;if(y!==0){var C=y&~h;C!==0?c=ui(C):(p&=y,p!==0&&(c=ui(p)))}else y=a&~h,y!==0?c=ui(y):p!==0&&(c=ui(p));if(c===0)return 0;if(s!==0&&s!==c&&(s&h)===0&&(h=c&-c,p=s&-s,h>=p||h===16&&(p&4194240)!==0))return s;if((c&4)!==0&&(c|=a&16),s=e.entangledLanes,s!==0)for(e=e.entanglements,s&=c;0<s;)a=31-tn(s),h=1<<a,c|=e[a],s&=~h;return c}function s0(e,s){switch(e){case 1:case 2:case 4:return s+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 s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function i0(e,s){for(var a=e.suspendedLanes,c=e.pingedLanes,h=e.expirationTimes,p=e.pendingLanes;0<p;){var y=31-tn(p),C=1<<y,E=h[y];E===-1?((C&a)===0||(C&c)!==0)&&(h[y]=s0(C,s)):E<=s&&(e.expiredLanes|=C),p&=~C}}function Pl(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ph(){var e=Po;return Po<<=1,(Po&4194240)===0&&(Po=64),e}function Ol(e){for(var s=[],a=0;31>a;a++)s.push(e);return s}function di(e,s,a){e.pendingLanes|=s,s!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,s=31-tn(s),e[s]=a}function o0(e,s){var a=e.pendingLanes&~s;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=s,e.mutableReadLanes&=s,e.entangledLanes&=s,s=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0<a;){var h=31-tn(a),p=1<<h;s[h]=0,c[h]=-1,e[h]=-1,a&=~p}}function Ml(e,s){var a=e.entangledLanes|=s;for(e=e.entanglements;a;){var c=31-tn(a),h=1<<c;h&s|e[c]&s&&(e[c]|=s),a&=~h}}var Fe=0;function mh(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var xh,Ll,gh,yh,vh,Fl=!1,Lo=[],$n=null,Wn=null,qn=null,hi=new Map,fi=new Map,Hn=[],a0="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 bh(e,s){switch(e){case"focusin":case"focusout":$n=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":qn=null;break;case"pointerover":case"pointerout":hi.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":fi.delete(s.pointerId)}}function pi(e,s,a,c,h,p){return e===null||e.nativeEvent!==p?(e={blockedOn:s,domEventName:a,eventSystemFlags:c,nativeEvent:p,targetContainers:[h]},s!==null&&(s=Ai(s),s!==null&&Ll(s)),e):(e.eventSystemFlags|=c,s=e.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),e)}function l0(e,s,a,c,h){switch(s){case"focusin":return $n=pi($n,e,s,a,c,h),!0;case"dragenter":return Wn=pi(Wn,e,s,a,c,h),!0;case"mouseover":return qn=pi(qn,e,s,a,c,h),!0;case"pointerover":var p=h.pointerId;return hi.set(p,pi(hi.get(p)||null,e,s,a,c,h)),!0;case"gotpointercapture":return p=h.pointerId,fi.set(p,pi(fi.get(p)||null,e,s,a,c,h)),!0}return!1}function wh(e){var s=_r(e.target);if(s!==null){var a=Ar(s);if(a!==null){if(s=a.tag,s===13){if(s=oh(a),s!==null){e.blockedOn=s,vh(e.priority,function(){gh(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fo(e){if(e.blockedOn!==null)return!1;for(var s=e.targetContainers;0<s.length;){var a=Bl(e.domEventName,e.eventSystemFlags,s[0],e.nativeEvent);if(a===null){a=e.nativeEvent;var c=new a.constructor(a.type,a);Sl=c,a.target.dispatchEvent(c),Sl=null}else return s=Ai(a),s!==null&&Ll(s),e.blockedOn=a,!1;s.shift()}return!0}function jh(e,s,a){Fo(e)&&a.delete(s)}function c0(){Fl=!1,$n!==null&&Fo($n)&&($n=null),Wn!==null&&Fo(Wn)&&(Wn=null),qn!==null&&Fo(qn)&&(qn=null),hi.forEach(jh),fi.forEach(jh)}function mi(e,s){e.blockedOn===s&&(e.blockedOn=null,Fl||(Fl=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,c0)))}function xi(e){function s(h){return mi(h,e)}if(0<Lo.length){mi(Lo[0],e);for(var a=1;a<Lo.length;a++){var c=Lo[a];c.blockedOn===e&&(c.blockedOn=null)}}for($n!==null&&mi($n,e),Wn!==null&&mi(Wn,e),qn!==null&&mi(qn,e),hi.forEach(s),fi.forEach(s),a=0;a<Hn.length;a++)c=Hn[a],c.blockedOn===e&&(c.blockedOn=null);for(;0<Hn.length&&(a=Hn[0],a.blockedOn===null);)wh(a),a.blockedOn===null&&Hn.shift()}var ms=S.ReactCurrentBatchConfig,Io=!0;function u0(e,s,a,c){var h=Fe,p=ms.transition;ms.transition=null;try{Fe=1,Il(e,s,a,c)}finally{Fe=h,ms.transition=p}}function d0(e,s,a,c){var h=Fe,p=ms.transition;ms.transition=null;try{Fe=4,Il(e,s,a,c)}finally{Fe=h,ms.transition=p}}function Il(e,s,a,c){if(Io){var h=Bl(e,s,a,c);if(h===null)nc(e,s,c,Bo,a),bh(e,c);else if(l0(h,e,s,a,c))c.stopPropagation();else if(bh(e,c),s&4&&-1<a0.indexOf(e)){for(;h!==null;){var p=Ai(h);if(p!==null&&xh(p),p=Bl(e,s,a,c),p===null&&nc(e,s,c,Bo,a),p===h)break;h=p}h!==null&&c.stopPropagation()}else nc(e,s,c,null,a)}}var Bo=null;function Bl(e,s,a,c){if(Bo=null,e=El(c),e=_r(e),e!==null)if(s=Ar(e),s===null)e=null;else if(a=s.tag,a===13){if(e=oh(s),e!==null)return e;e=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;e=null}else s!==e&&(e=null);return Bo=e,null}function Nh(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(Xy()){case Rl:return 1;case hh:return 4;case Do:case Zy:return 16;case fh:return 536870912;default:return 16}default:return 16}}var Vn=null,Ul=null,Uo=null;function Ch(){if(Uo)return Uo;var e,s=Ul,a=s.length,c,h="value"in Vn?Vn.value:Vn.textContent,p=h.length;for(e=0;e<a&&s[e]===h[e];e++);var y=a-e;for(c=1;c<=y&&s[a-c]===h[p-c];c++);return Uo=h.slice(e,1<c?1-c:void 0)}function zo(e){var s=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&s===13&&(e=13)):e=s,e===10&&(e=13),32<=e||e===13?e:0}function $o(){return!0}function kh(){return!1}function zt(e){function s(a,c,h,p,y){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=p,this.target=y,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(a=e[C],this[C]=a?a(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?$o:kh,this.isPropagationStopped=kh,this}return U(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=$o)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=$o)},persist:function(){},isPersistent:$o}),s}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zl=zt(xs),gi=U({},xs,{view:0,detail:0}),h0=zt(gi),$l,Wl,yi,Wo=U({},gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Hl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yi&&(yi&&e.type==="mousemove"?($l=e.screenX-yi.screenX,Wl=e.screenY-yi.screenY):Wl=$l=0,yi=e),$l)},movementY:function(e){return"movementY"in e?e.movementY:Wl}}),Sh=zt(Wo),f0=U({},Wo,{dataTransfer:0}),p0=zt(f0),m0=U({},gi,{relatedTarget:0}),ql=zt(m0),x0=U({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),g0=zt(x0),y0=U({},xs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),v0=zt(y0),b0=U({},xs,{data:0}),Eh=zt(b0),w0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j0={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"},N0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C0(e){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(e):(e=N0[e])?!!s[e]:!1}function Hl(){return C0}var k0=U({},gi,{key:function(e){if(e.key){var s=w0[e.key]||e.key;if(s!=="Unidentified")return s}return e.type==="keypress"?(e=zo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Hl,charCode:function(e){return e.type==="keypress"?zo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),S0=zt(k0),E0=U({},Wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ah=zt(E0),A0=U({},gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Hl}),_0=zt(A0),T0=U({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),D0=zt(T0),R0=U({},Wo,{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}),P0=zt(R0),O0=[9,13,27,32],Vl=f&&"CompositionEvent"in window,vi=null;f&&"documentMode"in document&&(vi=document.documentMode);var M0=f&&"TextEvent"in window&&!vi,_h=f&&(!Vl||vi&&8<vi&&11>=vi),Th=" ",Dh=!1;function Rh(e,s){switch(e){case"keyup":return O0.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ph(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gs=!1;function L0(e,s){switch(e){case"compositionend":return Ph(s);case"keypress":return s.which!==32?null:(Dh=!0,Th);case"textInput":return e=s.data,e===Th&&Dh?null:e;default:return null}}function F0(e,s){if(gs)return e==="compositionend"||!Vl&&Rh(e,s)?(e=Ch(),Uo=Ul=Vn=null,gs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return _h&&s.locale!=="ko"?null:s.data;default:return null}}var I0={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 Oh(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s==="input"?!!I0[e.type]:s==="textarea"}function Mh(e,s,a,c){th(c),s=Go(s,"onChange"),0<s.length&&(a=new zl("onChange","change",null,a,c),e.push({event:a,listeners:s}))}var bi=null,wi=null;function B0(e){Zh(e,0)}function qo(e){var s=js(e);if(lt(s))return e}function U0(e,s){if(e==="change")return s}var Lh=!1;if(f){var Ql;if(f){var Gl="oninput"in document;if(!Gl){var Fh=document.createElement("div");Fh.setAttribute("oninput","return;"),Gl=typeof Fh.oninput=="function"}Ql=Gl}else Ql=!1;Lh=Ql&&(!document.documentMode||9<document.documentMode)}function Ih(){bi&&(bi.detachEvent("onpropertychange",Bh),wi=bi=null)}function Bh(e){if(e.propertyName==="value"&&qo(wi)){var s=[];Mh(s,wi,e,El(e)),ih(B0,s)}}function z0(e,s,a){e==="focusin"?(Ih(),bi=s,wi=a,bi.attachEvent("onpropertychange",Bh)):e==="focusout"&&Ih()}function $0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qo(wi)}function W0(e,s){if(e==="click")return qo(s)}function q0(e,s){if(e==="input"||e==="change")return qo(s)}function H0(e,s){return e===s&&(e!==0||1/e===1/s)||e!==e&&s!==s}var nn=typeof Object.is=="function"?Object.is:H0;function ji(e,s){if(nn(e,s))return!0;if(typeof e!="object"||e===null||typeof s!="object"||s===null)return!1;var a=Object.keys(e),c=Object.keys(s);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!m.call(s,h)||!nn(e[h],s[h]))return!1}return!0}function Uh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,s){var a=Uh(e);e=0;for(var c;a;){if(a.nodeType===3){if(c=e+a.textContent.length,e<=s&&c>=s)return{node:a,offset:s-e};e=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Uh(a)}}function $h(e,s){return e&&s?e===s?!0:e&&e.nodeType===3?!1:s&&s.nodeType===3?$h(e,s.parentNode):"contains"in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&16):!1:!1}function Wh(){for(var e=window,s=kt();s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)e=s.contentWindow;else break;s=kt(e.document)}return s}function Yl(e){var s=e&&e.nodeName&&e.nodeName.toLowerCase();return s&&(s==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||s==="textarea"||e.contentEditable==="true")}function V0(e){var s=Wh(),a=e.focusedElem,c=e.selectionRange;if(s!==a&&a&&a.ownerDocument&&$h(a.ownerDocument.documentElement,a)){if(c!==null&&Yl(a)){if(s=c.start,e=c.end,e===void 0&&(e=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(e,a.value.length);else if(e=(s=a.ownerDocument||document)&&s.defaultView||window,e.getSelection){e=e.getSelection();var h=a.textContent.length,p=Math.min(c.start,h);c=c.end===void 0?p:Math.min(c.end,h),!e.extend&&p>c&&(h=c,c=p,p=h),h=zh(a,p);var y=zh(a,c);h&&y&&(e.rangeCount!==1||e.anchorNode!==h.node||e.anchorOffset!==h.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(s=s.createRange(),s.setStart(h.node,h.offset),e.removeAllRanges(),p>c?(e.addRange(s),e.extend(y.node,y.offset)):(s.setEnd(y.node,y.offset),e.addRange(s)))}}for(s=[],e=a;e=e.parentNode;)e.nodeType===1&&s.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)e=s[a],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Q0=f&&"documentMode"in document&&11>=document.documentMode,ys=null,Kl=null,Ni=null,Jl=!1;function qh(e,s,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Jl||ys==null||ys!==kt(c)||(c=ys,"selectionStart"in c&&Yl(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ni&&ji(Ni,c)||(Ni=c,c=Go(Kl,"onSelect"),0<c.length&&(s=new zl("onSelect","select",null,s,a),e.push({event:s,listeners:c}),s.target=ys)))}function Ho(e,s){var a={};return a[e.toLowerCase()]=s.toLowerCase(),a["Webkit"+e]="webkit"+s,a["Moz"+e]="moz"+s,a}var vs={animationend:Ho("Animation","AnimationEnd"),animationiteration:Ho("Animation","AnimationIteration"),animationstart:Ho("Animation","AnimationStart"),transitionend:Ho("Transition","TransitionEnd")},Xl={},Hh={};f&&(Hh=document.createElement("div").style,"AnimationEvent"in window||(delete vs.animationend.animation,delete vs.animationiteration.animation,delete vs.animationstart.animation),"TransitionEvent"in window||delete vs.transitionend.transition);function Vo(e){if(Xl[e])return Xl[e];if(!vs[e])return e;var s=vs[e],a;for(a in s)if(s.hasOwnProperty(a)&&a in Hh)return Xl[e]=s[a];return e}var Vh=Vo("animationend"),Qh=Vo("animationiteration"),Gh=Vo("animationstart"),Yh=Vo("transitionend"),Kh=new Map,Jh="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 Qn(e,s){Kh.set(e,s),u(s,[e])}for(var Zl=0;Zl<Jh.length;Zl++){var ec=Jh[Zl],G0=ec.toLowerCase(),Y0=ec[0].toUpperCase()+ec.slice(1);Qn(G0,"on"+Y0)}Qn(Vh,"onAnimationEnd"),Qn(Qh,"onAnimationIteration"),Qn(Gh,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(Yh,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),K0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ci));function Xh(e,s,a){var c=e.type||"unknown-event";e.currentTarget=a,Gy(c,s,void 0,e),e.currentTarget=null}function Zh(e,s){s=(s&4)!==0;for(var a=0;a<e.length;a++){var c=e[a],h=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var y=c.length-1;0<=y;y--){var C=c[y],E=C.instance,F=C.currentTarget;if(C=C.listener,E!==p&&h.isPropagationStopped())break e;Xh(h,C,F),p=E}else for(y=0;y<c.length;y++){if(C=c[y],E=C.instance,F=C.currentTarget,C=C.listener,E!==p&&h.isPropagationStopped())break e;Xh(h,C,F),p=E}}}if(To)throw e=Dl,To=!1,Dl=null,e}function qe(e,s){var a=s[lc];a===void 0&&(a=s[lc]=new Set);var c=e+"__bubble";a.has(c)||(ef(s,e,2,!1),a.add(c))}function tc(e,s,a){var c=0;s&&(c|=4),ef(a,e,c,s)}var Qo="_reactListening"+Math.random().toString(36).slice(2);function ki(e){if(!e[Qo]){e[Qo]=!0,o.forEach(function(a){a!=="selectionchange"&&(K0.has(a)||tc(a,!1,e),tc(a,!0,e))});var s=e.nodeType===9?e:e.ownerDocument;s===null||s[Qo]||(s[Qo]=!0,tc("selectionchange",!1,s))}}function ef(e,s,a,c){switch(Nh(s)){case 1:var h=u0;break;case 4:h=d0;break;default:h=Il}a=h.bind(null,s,a,e),h=void 0,!Tl||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),c?h!==void 0?e.addEventListener(s,a,{capture:!0,passive:h}):e.addEventListener(s,a,!0):h!==void 0?e.addEventListener(s,a,{passive:h}):e.addEventListener(s,a,!1)}function nc(e,s,a,c,h){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var y=c.tag;if(y===3||y===4){var C=c.stateNode.containerInfo;if(C===h||C.nodeType===8&&C.parentNode===h)break;if(y===4)for(y=c.return;y!==null;){var E=y.tag;if((E===3||E===4)&&(E=y.stateNode.containerInfo,E===h||E.nodeType===8&&E.parentNode===h))return;y=y.return}for(;C!==null;){if(y=_r(C),y===null)return;if(E=y.tag,E===5||E===6){c=p=y;continue e}C=C.parentNode}}c=c.return}ih(function(){var F=p,q=El(a),V=[];e:{var W=Kh.get(e);if(W!==void 0){var Y=zl,ee=e;switch(e){case"keypress":if(zo(a)===0)break e;case"keydown":case"keyup":Y=S0;break;case"focusin":ee="focus",Y=ql;break;case"focusout":ee="blur",Y=ql;break;case"beforeblur":case"afterblur":Y=ql;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=p0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=_0;break;case Vh:case Qh:case Gh:Y=g0;break;case Yh:Y=D0;break;case"scroll":Y=h0;break;case"wheel":Y=P0;break;case"copy":case"cut":case"paste":Y=v0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ah}var se=(s&4)!==0,et=!se&&e==="scroll",M=se?W!==null?W+"Capture":null:W;se=[];for(var R=F,L;R!==null;){L=R;var Q=L.stateNode;if(L.tag===5&&Q!==null&&(L=Q,M!==null&&(Q=ai(R,M),Q!=null&&se.push(Si(R,Q,L)))),et)break;R=R.return}0<se.length&&(W=new Y(W,ee,null,a,q),V.push({event:W,listeners:se}))}}if((s&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",W&&a!==Sl&&(ee=a.relatedTarget||a.fromElement)&&(_r(ee)||ee[An]))break e;if((Y||W)&&(W=q.window===q?q:(W=q.ownerDocument)?W.defaultView||W.parentWindow:window,Y?(ee=a.relatedTarget||a.toElement,Y=F,ee=ee?_r(ee):null,ee!==null&&(et=Ar(ee),ee!==et||ee.tag!==5&&ee.tag!==6)&&(ee=null)):(Y=null,ee=F),Y!==ee)){if(se=Sh,Q="onMouseLeave",M="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(se=Ah,Q="onPointerLeave",M="onPointerEnter",R="pointer"),et=Y==null?W:js(Y),L=ee==null?W:js(ee),W=new se(Q,R+"leave",Y,a,q),W.target=et,W.relatedTarget=L,Q=null,_r(q)===F&&(se=new se(M,R+"enter",ee,a,q),se.target=L,se.relatedTarget=et,Q=se),et=Q,Y&&ee)t:{for(se=Y,M=ee,R=0,L=se;L;L=bs(L))R++;for(L=0,Q=M;Q;Q=bs(Q))L++;for(;0<R-L;)se=bs(se),R--;for(;0<L-R;)M=bs(M),L--;for(;R--;){if(se===M||M!==null&&se===M.alternate)break t;se=bs(se),M=bs(M)}se=null}else se=null;Y!==null&&tf(V,W,Y,se,!1),ee!==null&&et!==null&&tf(V,et,ee,se,!0)}}e:{if(W=F?js(F):window,Y=W.nodeName&&W.nodeName.toLowerCase(),Y==="select"||Y==="input"&&W.type==="file")var ie=U0;else if(Oh(W))if(Lh)ie=q0;else{ie=$0;var ce=z0}else(Y=W.nodeName)&&Y.toLowerCase()==="input"&&(W.type==="checkbox"||W.type==="radio")&&(ie=W0);if(ie&&(ie=ie(e,F))){Mh(V,ie,a,q);break e}ce&&ce(e,W,F),e==="focusout"&&(ce=W._wrapperState)&&ce.controlled&&W.type==="number"&&wl(W,"number",W.value)}switch(ce=F?js(F):window,e){case"focusin":(Oh(ce)||ce.contentEditable==="true")&&(ys=ce,Kl=F,Ni=null);break;case"focusout":Ni=Kl=ys=null;break;case"mousedown":Jl=!0;break;case"contextmenu":case"mouseup":case"dragend":Jl=!1,qh(V,a,q);break;case"selectionchange":if(Q0)break;case"keydown":case"keyup":qh(V,a,q)}var ue;if(Vl)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else gs?Rh(e,a)&&(xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(xe="onCompositionStart");xe&&(_h&&a.locale!=="ko"&&(gs||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&gs&&(ue=Ch()):(Vn=q,Ul="value"in Vn?Vn.value:Vn.textContent,gs=!0)),ce=Go(F,xe),0<ce.length&&(xe=new Eh(xe,e,null,a,q),V.push({event:xe,listeners:ce}),ue?xe.data=ue:(ue=Ph(a),ue!==null&&(xe.data=ue)))),(ue=M0?L0(e,a):F0(e,a))&&(F=Go(F,"onBeforeInput"),0<F.length&&(q=new Eh("onBeforeInput","beforeinput",null,a,q),V.push({event:q,listeners:F}),q.data=ue))}Zh(V,s)})}function Si(e,s,a){return{instance:e,listener:s,currentTarget:a}}function Go(e,s){for(var a=s+"Capture",c=[];e!==null;){var h=e,p=h.stateNode;h.tag===5&&p!==null&&(h=p,p=ai(e,a),p!=null&&c.unshift(Si(e,p,h)),p=ai(e,s),p!=null&&c.push(Si(e,p,h))),e=e.return}return c}function bs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function tf(e,s,a,c,h){for(var p=s._reactName,y=[];a!==null&&a!==c;){var C=a,E=C.alternate,F=C.stateNode;if(E!==null&&E===c)break;C.tag===5&&F!==null&&(C=F,h?(E=ai(a,p),E!=null&&y.unshift(Si(a,E,C))):h||(E=ai(a,p),E!=null&&y.push(Si(a,E,C)))),a=a.return}y.length!==0&&e.push({event:s,listeners:y})}var J0=/\r\n?/g,X0=/\u0000|\uFFFD/g;function nf(e){return(typeof e=="string"?e:""+e).replace(J0,`
`).replace(X0,"")}function Yo(e,s,a){if(s=nf(s),nf(e)!==s&&a)throw Error(r(425))}function Ko(){}var rc=null,sc=null;function ic(e,s){return e==="textarea"||e==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var oc=typeof setTimeout=="function"?setTimeout:void 0,Z0=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,ev=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(e){return rf.resolve(null).then(e).catch(tv)}:oc;function tv(e){setTimeout(function(){throw e})}function ac(e,s){var a=s,c=0;do{var h=a.nextSibling;if(e.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(c===0){e.removeChild(h),xi(s);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=h}while(a);xi(s)}function Gn(e){for(;e!=null;e=e.nextSibling){var s=e.nodeType;if(s===1||s===3)break;if(s===8){if(s=e.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return e}function sf(e){e=e.previousSibling;for(var s=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return e;s--}else a==="/$"&&s++}e=e.previousSibling}return null}var ws=Math.random().toString(36).slice(2),gn="__reactFiber$"+ws,Ei="__reactProps$"+ws,An="__reactContainer$"+ws,lc="__reactEvents$"+ws,nv="__reactListeners$"+ws,rv="__reactHandles$"+ws;function _r(e){var s=e[gn];if(s)return s;for(var a=e.parentNode;a;){if(s=a[An]||a[gn]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(e=sf(e);e!==null;){if(a=e[gn])return a;e=sf(e)}return s}e=a,a=e.parentNode}return null}function Ai(e){return e=e[gn]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function js(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Jo(e){return e[Ei]||null}var cc=[],Ns=-1;function Yn(e){return{current:e}}function He(e){0>Ns||(e.current=cc[Ns],cc[Ns]=null,Ns--)}function We(e,s){Ns++,cc[Ns]=e.current,e.current=s}var Kn={},vt=Yn(Kn),Tt=Yn(!1),Tr=Kn;function Cs(e,s){var a=e.type.contextTypes;if(!a)return Kn;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===s)return c.__reactInternalMemoizedMaskedChildContext;var h={},p;for(p in a)h[p]=s[p];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=h),h}function Dt(e){return e=e.childContextTypes,e!=null}function Xo(){He(Tt),He(vt)}function of(e,s,a){if(vt.current!==Kn)throw Error(r(168));We(vt,s),We(Tt,a)}function af(e,s,a){var c=e.stateNode;if(s=s.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in s))throw Error(r(108,Ae(e)||"Unknown",h));return U({},a,c)}function Zo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,Tr=vt.current,We(vt,e),We(Tt,Tt.current),!0}function lf(e,s,a){var c=e.stateNode;if(!c)throw Error(r(169));a?(e=af(e,s,Tr),c.__reactInternalMemoizedMergedChildContext=e,He(Tt),He(vt),We(vt,e)):He(Tt),We(Tt,a)}var _n=null,ea=!1,uc=!1;function cf(e){_n===null?_n=[e]:_n.push(e)}function sv(e){ea=!0,cf(e)}function Jn(){if(!uc&&_n!==null){uc=!0;var e=0,s=Fe;try{var a=_n;for(Fe=1;e<a.length;e++){var c=a[e];do c=c(!0);while(c!==null)}_n=null,ea=!1}catch(h){throw _n!==null&&(_n=_n.slice(e+1)),uh(Rl,Jn),h}finally{Fe=s,uc=!1}}return null}var ks=[],Ss=0,ta=null,na=0,Vt=[],Qt=0,Dr=null,Tn=1,Dn="";function Rr(e,s){ks[Ss++]=na,ks[Ss++]=ta,ta=e,na=s}function uf(e,s,a){Vt[Qt++]=Tn,Vt[Qt++]=Dn,Vt[Qt++]=Dr,Dr=e;var c=Tn;e=Dn;var h=32-tn(c)-1;c&=~(1<<h),a+=1;var p=32-tn(s)+h;if(30<p){var y=h-h%5;p=(c&(1<<y)-1).toString(32),c>>=y,h-=y,Tn=1<<32-tn(s)+h|a<<h|c,Dn=p+e}else Tn=1<<p|a<<h|c,Dn=e}function dc(e){e.return!==null&&(Rr(e,1),uf(e,1,0))}function hc(e){for(;e===ta;)ta=ks[--Ss],ks[Ss]=null,na=ks[--Ss],ks[Ss]=null;for(;e===Dr;)Dr=Vt[--Qt],Vt[Qt]=null,Dn=Vt[--Qt],Vt[Qt]=null,Tn=Vt[--Qt],Vt[Qt]=null}var $t=null,Wt=null,Qe=!1,rn=null;function df(e,s){var a=Jt(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=e,s=e.deletions,s===null?(e.deletions=[a],e.flags|=16):s.push(a)}function hf(e,s){switch(e.tag){case 5:var a=e.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(e.stateNode=s,$t=e,Wt=Gn(s.firstChild),!0):!1;case 6:return s=e.pendingProps===""||s.nodeType!==3?null:s,s!==null?(e.stateNode=s,$t=e,Wt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=Dr!==null?{id:Tn,overflow:Dn}:null,e.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=Jt(18,null,null,0),a.stateNode=s,a.return=e,e.child=a,$t=e,Wt=null,!0):!1;default:return!1}}function fc(e){return(e.mode&1)!==0&&(e.flags&128)===0}function pc(e){if(Qe){var s=Wt;if(s){var a=s;if(!hf(e,s)){if(fc(e))throw Error(r(418));s=Gn(a.nextSibling);var c=$t;s&&hf(e,s)?df(c,a):(e.flags=e.flags&-4097|2,Qe=!1,$t=e)}}else{if(fc(e))throw Error(r(418));e.flags=e.flags&-4097|2,Qe=!1,$t=e}}}function ff(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;$t=e}function ra(e){if(e!==$t)return!1;if(!Qe)return ff(e),Qe=!0,!1;var s;if((s=e.tag!==3)&&!(s=e.tag!==5)&&(s=e.type,s=s!=="head"&&s!=="body"&&!ic(e.type,e.memoizedProps)),s&&(s=Wt)){if(fc(e))throw pf(),Error(r(418));for(;s;)df(e,s),s=Gn(s.nextSibling)}if(ff(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,s=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"){if(s===0){Wt=Gn(e.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}e=e.nextSibling}Wt=null}}else Wt=$t?Gn(e.stateNode.nextSibling):null;return!0}function pf(){for(var e=Wt;e;)e=Gn(e.nextSibling)}function Es(){Wt=$t=null,Qe=!1}function mc(e){rn===null?rn=[e]:rn.push(e)}var iv=S.ReactCurrentBatchConfig;function _i(e,s,a){if(e=a.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(r(309));var c=a.stateNode}if(!c)throw Error(r(147,e));var h=c,p=""+e;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===p?s.ref:(s=function(y){var C=h.refs;y===null?delete C[p]:C[p]=y},s._stringRef=p,s)}if(typeof e!="string")throw Error(r(284));if(!a._owner)throw Error(r(290,e))}return e}function sa(e,s){throw e=Object.prototype.toString.call(s),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":e))}function mf(e){var s=e._init;return s(e._payload)}function xf(e){function s(M,R){if(e){var L=M.deletions;L===null?(M.deletions=[R],M.flags|=16):L.push(R)}}function a(M,R){if(!e)return null;for(;R!==null;)s(M,R),R=R.sibling;return null}function c(M,R){for(M=new Map;R!==null;)R.key!==null?M.set(R.key,R):M.set(R.index,R),R=R.sibling;return M}function h(M,R){return M=ir(M,R),M.index=0,M.sibling=null,M}function p(M,R,L){return M.index=L,e?(L=M.alternate,L!==null?(L=L.index,L<R?(M.flags|=2,R):L):(M.flags|=2,R)):(M.flags|=1048576,R)}function y(M){return e&&M.alternate===null&&(M.flags|=2),M}function C(M,R,L,Q){return R===null||R.tag!==6?(R=ou(L,M.mode,Q),R.return=M,R):(R=h(R,L),R.return=M,R)}function E(M,R,L,Q){var ie=L.type;return ie===Z?q(M,R,L.props.children,Q,L.key):R!==null&&(R.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===De&&mf(ie)===R.type)?(Q=h(R,L.props),Q.ref=_i(M,R,L),Q.return=M,Q):(Q=Aa(L.type,L.key,L.props,null,M.mode,Q),Q.ref=_i(M,R,L),Q.return=M,Q)}function F(M,R,L,Q){return R===null||R.tag!==4||R.stateNode.containerInfo!==L.containerInfo||R.stateNode.implementation!==L.implementation?(R=au(L,M.mode,Q),R.return=M,R):(R=h(R,L.children||[]),R.return=M,R)}function q(M,R,L,Q,ie){return R===null||R.tag!==7?(R=Ur(L,M.mode,Q,ie),R.return=M,R):(R=h(R,L),R.return=M,R)}function V(M,R,L){if(typeof R=="string"&&R!==""||typeof R=="number")return R=ou(""+R,M.mode,L),R.return=M,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case B:return L=Aa(R.type,R.key,R.props,null,M.mode,L),L.ref=_i(M,null,R),L.return=M,L;case H:return R=au(R,M.mode,L),R.return=M,R;case De:var Q=R._init;return V(M,Q(R._payload),L)}if(si(R)||ae(R))return R=Ur(R,M.mode,L,null),R.return=M,R;sa(M,R)}return null}function W(M,R,L,Q){var ie=R!==null?R.key:null;if(typeof L=="string"&&L!==""||typeof L=="number")return ie!==null?null:C(M,R,""+L,Q);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case B:return L.key===ie?E(M,R,L,Q):null;case H:return L.key===ie?F(M,R,L,Q):null;case De:return ie=L._init,W(M,R,ie(L._payload),Q)}if(si(L)||ae(L))return ie!==null?null:q(M,R,L,Q,null);sa(M,L)}return null}function Y(M,R,L,Q,ie){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return M=M.get(L)||null,C(R,M,""+Q,ie);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case B:return M=M.get(Q.key===null?L:Q.key)||null,E(R,M,Q,ie);case H:return M=M.get(Q.key===null?L:Q.key)||null,F(R,M,Q,ie);case De:var ce=Q._init;return Y(M,R,L,ce(Q._payload),ie)}if(si(Q)||ae(Q))return M=M.get(L)||null,q(R,M,Q,ie,null);sa(R,Q)}return null}function ee(M,R,L,Q){for(var ie=null,ce=null,ue=R,xe=R=0,dt=null;ue!==null&&xe<L.length;xe++){ue.index>xe?(dt=ue,ue=null):dt=ue.sibling;var Pe=W(M,ue,L[xe],Q);if(Pe===null){ue===null&&(ue=dt);break}e&&ue&&Pe.alternate===null&&s(M,ue),R=p(Pe,R,xe),ce===null?ie=Pe:ce.sibling=Pe,ce=Pe,ue=dt}if(xe===L.length)return a(M,ue),Qe&&Rr(M,xe),ie;if(ue===null){for(;xe<L.length;xe++)ue=V(M,L[xe],Q),ue!==null&&(R=p(ue,R,xe),ce===null?ie=ue:ce.sibling=ue,ce=ue);return Qe&&Rr(M,xe),ie}for(ue=c(M,ue);xe<L.length;xe++)dt=Y(ue,M,xe,L[xe],Q),dt!==null&&(e&&dt.alternate!==null&&ue.delete(dt.key===null?xe:dt.key),R=p(dt,R,xe),ce===null?ie=dt:ce.sibling=dt,ce=dt);return e&&ue.forEach(function(or){return s(M,or)}),Qe&&Rr(M,xe),ie}function se(M,R,L,Q){var ie=ae(L);if(typeof ie!="function")throw Error(r(150));if(L=ie.call(L),L==null)throw Error(r(151));for(var ce=ie=null,ue=R,xe=R=0,dt=null,Pe=L.next();ue!==null&&!Pe.done;xe++,Pe=L.next()){ue.index>xe?(dt=ue,ue=null):dt=ue.sibling;var or=W(M,ue,Pe.value,Q);if(or===null){ue===null&&(ue=dt);break}e&&ue&&or.alternate===null&&s(M,ue),R=p(or,R,xe),ce===null?ie=or:ce.sibling=or,ce=or,ue=dt}if(Pe.done)return a(M,ue),Qe&&Rr(M,xe),ie;if(ue===null){for(;!Pe.done;xe++,Pe=L.next())Pe=V(M,Pe.value,Q),Pe!==null&&(R=p(Pe,R,xe),ce===null?ie=Pe:ce.sibling=Pe,ce=Pe);return Qe&&Rr(M,xe),ie}for(ue=c(M,ue);!Pe.done;xe++,Pe=L.next())Pe=Y(ue,M,xe,Pe.value,Q),Pe!==null&&(e&&Pe.alternate!==null&&ue.delete(Pe.key===null?xe:Pe.key),R=p(Pe,R,xe),ce===null?ie=Pe:ce.sibling=Pe,ce=Pe);return e&&ue.forEach(function(Iv){return s(M,Iv)}),Qe&&Rr(M,xe),ie}function et(M,R,L,Q){if(typeof L=="object"&&L!==null&&L.type===Z&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case B:e:{for(var ie=L.key,ce=R;ce!==null;){if(ce.key===ie){if(ie=L.type,ie===Z){if(ce.tag===7){a(M,ce.sibling),R=h(ce,L.props.children),R.return=M,M=R;break e}}else if(ce.elementType===ie||typeof ie=="object"&&ie!==null&&ie.$$typeof===De&&mf(ie)===ce.type){a(M,ce.sibling),R=h(ce,L.props),R.ref=_i(M,ce,L),R.return=M,M=R;break e}a(M,ce);break}else s(M,ce);ce=ce.sibling}L.type===Z?(R=Ur(L.props.children,M.mode,Q,L.key),R.return=M,M=R):(Q=Aa(L.type,L.key,L.props,null,M.mode,Q),Q.ref=_i(M,R,L),Q.return=M,M=Q)}return y(M);case H:e:{for(ce=L.key;R!==null;){if(R.key===ce)if(R.tag===4&&R.stateNode.containerInfo===L.containerInfo&&R.stateNode.implementation===L.implementation){a(M,R.sibling),R=h(R,L.children||[]),R.return=M,M=R;break e}else{a(M,R);break}else s(M,R);R=R.sibling}R=au(L,M.mode,Q),R.return=M,M=R}return y(M);case De:return ce=L._init,et(M,R,ce(L._payload),Q)}if(si(L))return ee(M,R,L,Q);if(ae(L))return se(M,R,L,Q);sa(M,L)}return typeof L=="string"&&L!==""||typeof L=="number"?(L=""+L,R!==null&&R.tag===6?(a(M,R.sibling),R=h(R,L),R.return=M,M=R):(a(M,R),R=ou(L,M.mode,Q),R.return=M,M=R),y(M)):a(M,R)}return et}var As=xf(!0),gf=xf(!1),ia=Yn(null),oa=null,_s=null,xc=null;function gc(){xc=_s=oa=null}function yc(e){var s=ia.current;He(ia),e._currentValue=s}function vc(e,s,a){for(;e!==null;){var c=e.alternate;if((e.childLanes&s)!==s?(e.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),e===a)break;e=e.return}}function Ts(e,s){oa=e,xc=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&s)!==0&&(Rt=!0),e.firstContext=null)}function Gt(e){var s=e._currentValue;if(xc!==e)if(e={context:e,memoizedValue:s,next:null},_s===null){if(oa===null)throw Error(r(308));_s=e,oa.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return s}var Pr=null;function bc(e){Pr===null?Pr=[e]:Pr.push(e)}function yf(e,s,a,c){var h=s.interleaved;return h===null?(a.next=a,bc(s)):(a.next=h.next,h.next=a),s.interleaved=a,Rn(e,c)}function Rn(e,s){e.lanes|=s;var a=e.alternate;for(a!==null&&(a.lanes|=s),a=e,e=e.return;e!==null;)e.childLanes|=s,a=e.alternate,a!==null&&(a.childLanes|=s),a=e,e=e.return;return a.tag===3?a.stateNode:null}var Xn=!1;function wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function vf(e,s){e=e.updateQueue,s.updateQueue===e&&(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Pn(e,s){return{eventTime:e,lane:s,tag:0,payload:null,callback:null,next:null}}function Zn(e,s,a){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(Te&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,Rn(e,a)}return h=c.interleaved,h===null?(s.next=s,bc(c)):(s.next=h.next,h.next=s),c.interleaved=s,Rn(e,a)}function aa(e,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Ml(e,a)}}function bf(e,s){var a=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,p=null;if(a=a.firstBaseUpdate,a!==null){do{var y={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};p===null?h=p=y:p=p.next=y,a=a.next}while(a!==null);p===null?h=p=s:p=p.next=s}else h=p=s;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,effects:c.effects},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}function la(e,s,a,c){var h=e.updateQueue;Xn=!1;var p=h.firstBaseUpdate,y=h.lastBaseUpdate,C=h.shared.pending;if(C!==null){h.shared.pending=null;var E=C,F=E.next;E.next=null,y===null?p=F:y.next=F,y=E;var q=e.alternate;q!==null&&(q=q.updateQueue,C=q.lastBaseUpdate,C!==y&&(C===null?q.firstBaseUpdate=F:C.next=F,q.lastBaseUpdate=E))}if(p!==null){var V=h.baseState;y=0,q=F=E=null,C=p;do{var W=C.lane,Y=C.eventTime;if((c&W)===W){q!==null&&(q=q.next={eventTime:Y,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ee=e,se=C;switch(W=s,Y=a,se.tag){case 1:if(ee=se.payload,typeof ee=="function"){V=ee.call(Y,V,W);break e}V=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=se.payload,W=typeof ee=="function"?ee.call(Y,V,W):ee,W==null)break e;V=U({},V,W);break e;case 2:Xn=!0}}C.callback!==null&&C.lane!==0&&(e.flags|=64,W=h.effects,W===null?h.effects=[C]:W.push(C))}else Y={eventTime:Y,lane:W,tag:C.tag,payload:C.payload,callback:C.callback,next:null},q===null?(F=q=Y,E=V):q=q.next=Y,y|=W;if(C=C.next,C===null){if(C=h.shared.pending,C===null)break;W=C,C=W.next,W.next=null,h.lastBaseUpdate=W,h.shared.pending=null}}while(!0);if(q===null&&(E=V),h.baseState=E,h.firstBaseUpdate=F,h.lastBaseUpdate=q,s=h.shared.interleaved,s!==null){h=s;do y|=h.lane,h=h.next;while(h!==s)}else p===null&&(h.shared.lanes=0);Lr|=y,e.lanes=y,e.memoizedState=V}}function wf(e,s,a){if(e=s.effects,s.effects=null,e!==null)for(s=0;s<e.length;s++){var c=e[s],h=c.callback;if(h!==null){if(c.callback=null,c=a,typeof h!="function")throw Error(r(191,h));h.call(c)}}}var Ti={},yn=Yn(Ti),Di=Yn(Ti),Ri=Yn(Ti);function Or(e){if(e===Ti)throw Error(r(174));return e}function jc(e,s){switch(We(Ri,s),We(Di,e),We(yn,Ti),e=s.nodeType,e){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Nl(null,"");break;default:e=e===8?s.parentNode:s,s=e.namespaceURI||null,e=e.tagName,s=Nl(s,e)}He(yn),We(yn,s)}function Ds(){He(yn),He(Di),He(Ri)}function jf(e){Or(Ri.current);var s=Or(yn.current),a=Nl(s,e.type);s!==a&&(We(Di,e),We(yn,a))}function Nc(e){Di.current===e&&(He(yn),He(Di))}var Ge=Yn(0);function ca(e){for(var s=e;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break;for(;s.sibling===null;){if(s.return===null||s.return===e)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Cc=[];function kc(){for(var e=0;e<Cc.length;e++)Cc[e]._workInProgressVersionPrimary=null;Cc.length=0}var ua=S.ReactCurrentDispatcher,Sc=S.ReactCurrentBatchConfig,Mr=0,Ye=null,it=null,ct=null,da=!1,Pi=!1,Oi=0,ov=0;function bt(){throw Error(r(321))}function Ec(e,s){if(s===null)return!1;for(var a=0;a<s.length&&a<e.length;a++)if(!nn(e[a],s[a]))return!1;return!0}function Ac(e,s,a,c,h,p){if(Mr=p,Ye=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,ua.current=e===null||e.memoizedState===null?uv:dv,e=a(c,h),Pi){p=0;do{if(Pi=!1,Oi=0,25<=p)throw Error(r(301));p+=1,ct=it=null,s.updateQueue=null,ua.current=hv,e=a(c,h)}while(Pi)}if(ua.current=pa,s=it!==null&&it.next!==null,Mr=0,ct=it=Ye=null,da=!1,s)throw Error(r(300));return e}function _c(){var e=Oi!==0;return Oi=0,e}function vn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ye.memoizedState=ct=e:ct=ct.next=e,ct}function Yt(){if(it===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var s=ct===null?Ye.memoizedState:ct.next;if(s!==null)ct=s,it=e;else{if(e===null)throw Error(r(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},ct===null?Ye.memoizedState=ct=e:ct=ct.next=e}return ct}function Mi(e,s){return typeof s=="function"?s(e):s}function Tc(e){var s=Yt(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var c=it,h=c.baseQueue,p=a.pending;if(p!==null){if(h!==null){var y=h.next;h.next=p.next,p.next=y}c.baseQueue=h=p,a.pending=null}if(h!==null){p=h.next,c=c.baseState;var C=y=null,E=null,F=p;do{var q=F.lane;if((Mr&q)===q)E!==null&&(E=E.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),c=F.hasEagerState?F.eagerState:e(c,F.action);else{var V={lane:q,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};E===null?(C=E=V,y=c):E=E.next=V,Ye.lanes|=q,Lr|=q}F=F.next}while(F!==null&&F!==p);E===null?y=c:E.next=C,nn(c,s.memoizedState)||(Rt=!0),s.memoizedState=c,s.baseState=y,s.baseQueue=E,a.lastRenderedState=c}if(e=a.interleaved,e!==null){h=e;do p=h.lane,Ye.lanes|=p,Lr|=p,h=h.next;while(h!==e)}else h===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function Dc(e){var s=Yt(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var c=a.dispatch,h=a.pending,p=s.memoizedState;if(h!==null){a.pending=null;var y=h=h.next;do p=e(p,y.action),y=y.next;while(y!==h);nn(p,s.memoizedState)||(Rt=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),a.lastRenderedState=p}return[p,c]}function Nf(){}function Cf(e,s){var a=Ye,c=Yt(),h=s(),p=!nn(c.memoizedState,h);if(p&&(c.memoizedState=h,Rt=!0),c=c.queue,Rc(Ef.bind(null,a,c,e),[e]),c.getSnapshot!==s||p||ct!==null&&ct.memoizedState.tag&1){if(a.flags|=2048,Li(9,Sf.bind(null,a,c,h,s),void 0,null),ut===null)throw Error(r(349));(Mr&30)!==0||kf(a,s,h)}return h}function kf(e,s,a){e.flags|=16384,e={getSnapshot:s,value:a},s=Ye.updateQueue,s===null?(s={lastEffect:null,stores:null},Ye.updateQueue=s,s.stores=[e]):(a=s.stores,a===null?s.stores=[e]:a.push(e))}function Sf(e,s,a,c){s.value=a,s.getSnapshot=c,Af(s)&&_f(e)}function Ef(e,s,a){return a(function(){Af(s)&&_f(e)})}function Af(e){var s=e.getSnapshot;e=e.value;try{var a=s();return!nn(e,a)}catch{return!0}}function _f(e){var s=Rn(e,1);s!==null&&ln(s,e,1,-1)}function Tf(e){var s=vn();return typeof e=="function"&&(e=e()),s.memoizedState=s.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mi,lastRenderedState:e},s.queue=e,e=e.dispatch=cv.bind(null,Ye,e),[s.memoizedState,e]}function Li(e,s,a,c){return e={tag:e,create:s,destroy:a,deps:c,next:null},s=Ye.updateQueue,s===null?(s={lastEffect:null,stores:null},Ye.updateQueue=s,s.lastEffect=e.next=e):(a=s.lastEffect,a===null?s.lastEffect=e.next=e:(c=a.next,a.next=e,e.next=c,s.lastEffect=e)),e}function Df(){return Yt().memoizedState}function ha(e,s,a,c){var h=vn();Ye.flags|=e,h.memoizedState=Li(1|s,a,void 0,c===void 0?null:c)}function fa(e,s,a,c){var h=Yt();c=c===void 0?null:c;var p=void 0;if(it!==null){var y=it.memoizedState;if(p=y.destroy,c!==null&&Ec(c,y.deps)){h.memoizedState=Li(s,a,p,c);return}}Ye.flags|=e,h.memoizedState=Li(1|s,a,p,c)}function Rf(e,s){return ha(8390656,8,e,s)}function Rc(e,s){return fa(2048,8,e,s)}function Pf(e,s){return fa(4,2,e,s)}function Of(e,s){return fa(4,4,e,s)}function Mf(e,s){if(typeof s=="function")return e=e(),s(e),function(){s(null)};if(s!=null)return e=e(),s.current=e,function(){s.current=null}}function Lf(e,s,a){return a=a!=null?a.concat([e]):null,fa(4,4,Mf.bind(null,s,e),a)}function Pc(){}function Ff(e,s){var a=Yt();s=s===void 0?null:s;var c=a.memoizedState;return c!==null&&s!==null&&Ec(s,c[1])?c[0]:(a.memoizedState=[e,s],e)}function If(e,s){var a=Yt();s=s===void 0?null:s;var c=a.memoizedState;return c!==null&&s!==null&&Ec(s,c[1])?c[0]:(e=e(),a.memoizedState=[e,s],e)}function Bf(e,s,a){return(Mr&21)===0?(e.baseState&&(e.baseState=!1,Rt=!0),e.memoizedState=a):(nn(a,s)||(a=ph(),Ye.lanes|=a,Lr|=a,e.baseState=!0),s)}function av(e,s){var a=Fe;Fe=a!==0&&4>a?a:4,e(!0);var c=Sc.transition;Sc.transition={};try{e(!1),s()}finally{Fe=a,Sc.transition=c}}function Uf(){return Yt().memoizedState}function lv(e,s,a){var c=rr(e);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},zf(e))$f(s,a);else if(a=yf(e,s,a,c),a!==null){var h=Et();ln(a,e,c,h),Wf(a,s,c)}}function cv(e,s,a){var c=rr(e),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(zf(e))$f(s,h);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var y=s.lastRenderedState,C=p(y,a);if(h.hasEagerState=!0,h.eagerState=C,nn(C,y)){var E=s.interleaved;E===null?(h.next=h,bc(s)):(h.next=E.next,E.next=h),s.interleaved=h;return}}catch{}finally{}a=yf(e,s,h,c),a!==null&&(h=Et(),ln(a,e,c,h),Wf(a,s,c))}}function zf(e){var s=e.alternate;return e===Ye||s!==null&&s===Ye}function $f(e,s){Pi=da=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function Wf(e,s,a){if((a&4194240)!==0){var c=s.lanes;c&=e.pendingLanes,a|=c,s.lanes=a,Ml(e,a)}}var pa={readContext:Gt,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useInsertionEffect:bt,useLayoutEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useMutableSource:bt,useSyncExternalStore:bt,useId:bt,unstable_isNewReconciler:!1},uv={readContext:Gt,useCallback:function(e,s){return vn().memoizedState=[e,s===void 0?null:s],e},useContext:Gt,useEffect:Rf,useImperativeHandle:function(e,s,a){return a=a!=null?a.concat([e]):null,ha(4194308,4,Mf.bind(null,s,e),a)},useLayoutEffect:function(e,s){return ha(4194308,4,e,s)},useInsertionEffect:function(e,s){return ha(4,2,e,s)},useMemo:function(e,s){var a=vn();return s=s===void 0?null:s,e=e(),a.memoizedState=[e,s],e},useReducer:function(e,s,a){var c=vn();return s=a!==void 0?a(s):s,c.memoizedState=c.baseState=s,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},c.queue=e,e=e.dispatch=lv.bind(null,Ye,e),[c.memoizedState,e]},useRef:function(e){var s=vn();return e={current:e},s.memoizedState=e},useState:Tf,useDebugValue:Pc,useDeferredValue:function(e){return vn().memoizedState=e},useTransition:function(){var e=Tf(!1),s=e[0];return e=av.bind(null,e[1]),vn().memoizedState=e,[s,e]},useMutableSource:function(){},useSyncExternalStore:function(e,s,a){var c=Ye,h=vn();if(Qe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),ut===null)throw Error(r(349));(Mr&30)!==0||kf(c,s,a)}h.memoizedState=a;var p={value:a,getSnapshot:s};return h.queue=p,Rf(Ef.bind(null,c,p,e),[e]),c.flags|=2048,Li(9,Sf.bind(null,c,p,a,s),void 0,null),a},useId:function(){var e=vn(),s=ut.identifierPrefix;if(Qe){var a=Dn,c=Tn;a=(c&~(1<<32-tn(c)-1)).toString(32)+a,s=":"+s+"R"+a,a=Oi++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=ov++,s=":"+s+"r"+a.toString(32)+":";return e.memoizedState=s},unstable_isNewReconciler:!1},dv={readContext:Gt,useCallback:Ff,useContext:Gt,useEffect:Rc,useImperativeHandle:Lf,useInsertionEffect:Pf,useLayoutEffect:Of,useMemo:If,useReducer:Tc,useRef:Df,useState:function(){return Tc(Mi)},useDebugValue:Pc,useDeferredValue:function(e){var s=Yt();return Bf(s,it.memoizedState,e)},useTransition:function(){var e=Tc(Mi)[0],s=Yt().memoizedState;return[e,s]},useMutableSource:Nf,useSyncExternalStore:Cf,useId:Uf,unstable_isNewReconciler:!1},hv={readContext:Gt,useCallback:Ff,useContext:Gt,useEffect:Rc,useImperativeHandle:Lf,useInsertionEffect:Pf,useLayoutEffect:Of,useMemo:If,useReducer:Dc,useRef:Df,useState:function(){return Dc(Mi)},useDebugValue:Pc,useDeferredValue:function(e){var s=Yt();return it===null?s.memoizedState=e:Bf(s,it.memoizedState,e)},useTransition:function(){var e=Dc(Mi)[0],s=Yt().memoizedState;return[e,s]},useMutableSource:Nf,useSyncExternalStore:Cf,useId:Uf,unstable_isNewReconciler:!1};function sn(e,s){if(e&&e.defaultProps){s=U({},s),e=e.defaultProps;for(var a in e)s[a]===void 0&&(s[a]=e[a]);return s}return s}function Oc(e,s,a,c){s=e.memoizedState,a=a(c,s),a=a==null?s:U({},s,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var ma={isMounted:function(e){return(e=e._reactInternals)?Ar(e)===e:!1},enqueueSetState:function(e,s,a){e=e._reactInternals;var c=Et(),h=rr(e),p=Pn(c,h);p.payload=s,a!=null&&(p.callback=a),s=Zn(e,p,h),s!==null&&(ln(s,e,h,c),aa(s,e,h))},enqueueReplaceState:function(e,s,a){e=e._reactInternals;var c=Et(),h=rr(e),p=Pn(c,h);p.tag=1,p.payload=s,a!=null&&(p.callback=a),s=Zn(e,p,h),s!==null&&(ln(s,e,h,c),aa(s,e,h))},enqueueForceUpdate:function(e,s){e=e._reactInternals;var a=Et(),c=rr(e),h=Pn(a,c);h.tag=2,s!=null&&(h.callback=s),s=Zn(e,h,c),s!==null&&(ln(s,e,c,a),aa(s,e,c))}};function qf(e,s,a,c,h,p,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,p,y):s.prototype&&s.prototype.isPureReactComponent?!ji(a,c)||!ji(h,p):!0}function Hf(e,s,a){var c=!1,h=Kn,p=s.contextType;return typeof p=="object"&&p!==null?p=Gt(p):(h=Dt(s)?Tr:vt.current,c=s.contextTypes,p=(c=c!=null)?Cs(e,h):Kn),s=new s(a,p),e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ma,e.stateNode=s,s._reactInternals=e,c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=h,e.__reactInternalMemoizedMaskedChildContext=p),s}function Vf(e,s,a,c){e=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,c),s.state!==e&&ma.enqueueReplaceState(s,s.state,null)}function Mc(e,s,a,c){var h=e.stateNode;h.props=a,h.state=e.memoizedState,h.refs={},wc(e);var p=s.contextType;typeof p=="object"&&p!==null?h.context=Gt(p):(p=Dt(s)?Tr:vt.current,h.context=Cs(e,p)),h.state=e.memoizedState,p=s.getDerivedStateFromProps,typeof p=="function"&&(Oc(e,s,p,a),h.state=e.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(s=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),s!==h.state&&ma.enqueueReplaceState(h,h.state,null),la(e,a,h,c),h.state=e.memoizedState),typeof h.componentDidMount=="function"&&(e.flags|=4194308)}function Rs(e,s){try{var a="",c=s;do a+=oe(c),c=c.return;while(c);var h=a}catch(p){h=`
Error generating stack: `+p.message+`
`+p.stack}return{value:e,source:s,stack:h,digest:null}}function Lc(e,s,a){return{value:e,source:null,stack:a??null,digest:s??null}}function Fc(e,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var fv=typeof WeakMap=="function"?WeakMap:Map;function Qf(e,s,a){a=Pn(-1,a),a.tag=3,a.payload={element:null};var c=s.value;return a.callback=function(){ja||(ja=!0,Xc=c),Fc(e,s)},a}function Gf(e,s,a){a=Pn(-1,a),a.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var h=s.value;a.payload=function(){return c(h)},a.callback=function(){Fc(e,s)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(a.callback=function(){Fc(e,s),typeof c!="function"&&(tr===null?tr=new Set([this]):tr.add(this));var y=s.stack;this.componentDidCatch(s.value,{componentStack:y!==null?y:""})}),a}function Yf(e,s,a){var c=e.pingCache;if(c===null){c=e.pingCache=new fv;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(a)||(h.add(a),e=Ev.bind(null,e,s,a),s.then(e,e))}function Kf(e){do{var s;if((s=e.tag===13)&&(s=e.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return e;e=e.return}while(e!==null);return null}function Jf(e,s,a,c,h){return(e.mode&1)===0?(e===s?e.flags|=65536:(e.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=Pn(-1,1),s.tag=2,Zn(a,s,1))),a.lanes|=1),e):(e.flags|=65536,e.lanes=h,e)}var pv=S.ReactCurrentOwner,Rt=!1;function St(e,s,a,c){s.child=e===null?gf(s,null,a,c):As(s,e.child,a,c)}function Xf(e,s,a,c,h){a=a.render;var p=s.ref;return Ts(s,h),c=Ac(e,s,a,c,p,h),a=_c(),e!==null&&!Rt?(s.updateQueue=e.updateQueue,s.flags&=-2053,e.lanes&=~h,On(e,s,h)):(Qe&&a&&dc(s),s.flags|=1,St(e,s,c,h),s.child)}function Zf(e,s,a,c,h){if(e===null){var p=a.type;return typeof p=="function"&&!iu(p)&&p.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=p,ep(e,s,p,c,h)):(e=Aa(a.type,null,c,s,s.mode,h),e.ref=s.ref,e.return=s,s.child=e)}if(p=e.child,(e.lanes&h)===0){var y=p.memoizedProps;if(a=a.compare,a=a!==null?a:ji,a(y,c)&&e.ref===s.ref)return On(e,s,h)}return s.flags|=1,e=ir(p,c),e.ref=s.ref,e.return=s,s.child=e}function ep(e,s,a,c,h){if(e!==null){var p=e.memoizedProps;if(ji(p,c)&&e.ref===s.ref)if(Rt=!1,s.pendingProps=c=p,(e.lanes&h)!==0)(e.flags&131072)!==0&&(Rt=!0);else return s.lanes=e.lanes,On(e,s,h)}return Ic(e,s,a,c,h)}function tp(e,s,a){var c=s.pendingProps,h=c.children,p=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Os,qt),qt|=a;else{if((a&1073741824)===0)return e=p!==null?p.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:e,cachePool:null,transitions:null},s.updateQueue=null,We(Os,qt),qt|=e,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=p!==null?p.baseLanes:a,We(Os,qt),qt|=c}else p!==null?(c=p.baseLanes|a,s.memoizedState=null):c=a,We(Os,qt),qt|=c;return St(e,s,h,a),s.child}function np(e,s){var a=s.ref;(e===null&&a!==null||e!==null&&e.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function Ic(e,s,a,c,h){var p=Dt(a)?Tr:vt.current;return p=Cs(s,p),Ts(s,h),a=Ac(e,s,a,c,p,h),c=_c(),e!==null&&!Rt?(s.updateQueue=e.updateQueue,s.flags&=-2053,e.lanes&=~h,On(e,s,h)):(Qe&&c&&dc(s),s.flags|=1,St(e,s,a,h),s.child)}function rp(e,s,a,c,h){if(Dt(a)){var p=!0;Zo(s)}else p=!1;if(Ts(s,h),s.stateNode===null)ga(e,s),Hf(s,a,c),Mc(s,a,c,h),c=!0;else if(e===null){var y=s.stateNode,C=s.memoizedProps;y.props=C;var E=y.context,F=a.contextType;typeof F=="object"&&F!==null?F=Gt(F):(F=Dt(a)?Tr:vt.current,F=Cs(s,F));var q=a.getDerivedStateFromProps,V=typeof q=="function"||typeof y.getSnapshotBeforeUpdate=="function";V||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==c||E!==F)&&Vf(s,y,c,F),Xn=!1;var W=s.memoizedState;y.state=W,la(s,c,y,h),E=s.memoizedState,C!==c||W!==E||Tt.current||Xn?(typeof q=="function"&&(Oc(s,a,q,c),E=s.memoizedState),(C=Xn||qf(s,a,C,c,W,E,F))?(V||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(s.flags|=4194308)):(typeof y.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=E),y.props=c,y.state=E,y.context=F,c=C):(typeof y.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{y=s.stateNode,vf(e,s),C=s.memoizedProps,F=s.type===s.elementType?C:sn(s.type,C),y.props=F,V=s.pendingProps,W=y.context,E=a.contextType,typeof E=="object"&&E!==null?E=Gt(E):(E=Dt(a)?Tr:vt.current,E=Cs(s,E));var Y=a.getDerivedStateFromProps;(q=typeof Y=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(C!==V||W!==E)&&Vf(s,y,c,E),Xn=!1,W=s.memoizedState,y.state=W,la(s,c,y,h);var ee=s.memoizedState;C!==V||W!==ee||Tt.current||Xn?(typeof Y=="function"&&(Oc(s,a,Y,c),ee=s.memoizedState),(F=Xn||qf(s,a,F,c,W,ee,E)||!1)?(q||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,ee,E),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,ee,E)),typeof y.componentDidUpdate=="function"&&(s.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof y.componentDidUpdate!="function"||C===e.memoizedProps&&W===e.memoizedState||(s.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&W===e.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=ee),y.props=c,y.state=ee,y.context=E,c=F):(typeof y.componentDidUpdate!="function"||C===e.memoizedProps&&W===e.memoizedState||(s.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&W===e.memoizedState||(s.flags|=1024),c=!1)}return Bc(e,s,a,c,p,h)}function Bc(e,s,a,c,h,p){np(e,s);var y=(s.flags&128)!==0;if(!c&&!y)return h&&lf(s,a,!1),On(e,s,p);c=s.stateNode,pv.current=s;var C=y&&typeof a.getDerivedStateFromError!="function"?null:c.render();return s.flags|=1,e!==null&&y?(s.child=As(s,e.child,null,p),s.child=As(s,null,C,p)):St(e,s,C,p),s.memoizedState=c.state,h&&lf(s,a,!0),s.child}function sp(e){var s=e.stateNode;s.pendingContext?of(e,s.pendingContext,s.pendingContext!==s.context):s.context&&of(e,s.context,!1),jc(e,s.containerInfo)}function ip(e,s,a,c,h){return Es(),mc(h),s.flags|=256,St(e,s,a,c),s.child}var Uc={dehydrated:null,treeContext:null,retryLane:0};function zc(e){return{baseLanes:e,cachePool:null,transitions:null}}function op(e,s,a){var c=s.pendingProps,h=Ge.current,p=!1,y=(s.flags&128)!==0,C;if((C=y)||(C=e!==null&&e.memoizedState===null?!1:(h&2)!==0),C?(p=!0,s.flags&=-129):(e===null||e.memoizedState!==null)&&(h|=1),We(Ge,h&1),e===null)return pc(s),e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((s.mode&1)===0?s.lanes=1:e.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(y=c.children,e=c.fallback,p?(c=s.mode,p=s.child,y={mode:"hidden",children:y},(c&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=y):p=_a(y,c,0,null),e=Ur(e,c,a,null),p.return=s,e.return=s,p.sibling=e,s.child=p,s.child.memoizedState=zc(a),s.memoizedState=Uc,e):$c(s,y));if(h=e.memoizedState,h!==null&&(C=h.dehydrated,C!==null))return mv(e,s,y,c,C,h,a);if(p){p=c.fallback,y=s.mode,h=e.child,C=h.sibling;var E={mode:"hidden",children:c.children};return(y&1)===0&&s.child!==h?(c=s.child,c.childLanes=0,c.pendingProps=E,s.deletions=null):(c=ir(h,E),c.subtreeFlags=h.subtreeFlags&14680064),C!==null?p=ir(C,p):(p=Ur(p,y,a,null),p.flags|=2),p.return=s,c.return=s,c.sibling=p,s.child=c,c=p,p=s.child,y=e.child.memoizedState,y=y===null?zc(a):{baseLanes:y.baseLanes|a,cachePool:null,transitions:y.transitions},p.memoizedState=y,p.childLanes=e.childLanes&~a,s.memoizedState=Uc,c}return p=e.child,e=p.sibling,c=ir(p,{mode:"visible",children:c.children}),(s.mode&1)===0&&(c.lanes=a),c.return=s,c.sibling=null,e!==null&&(a=s.deletions,a===null?(s.deletions=[e],s.flags|=16):a.push(e)),s.child=c,s.memoizedState=null,c}function $c(e,s){return s=_a({mode:"visible",children:s},e.mode,0,null),s.return=e,e.child=s}function xa(e,s,a,c){return c!==null&&mc(c),As(s,e.child,null,a),e=$c(s,s.pendingProps.children),e.flags|=2,s.memoizedState=null,e}function mv(e,s,a,c,h,p,y){if(a)return s.flags&256?(s.flags&=-257,c=Lc(Error(r(422))),xa(e,s,y,c)):s.memoizedState!==null?(s.child=e.child,s.flags|=128,null):(p=c.fallback,h=s.mode,c=_a({mode:"visible",children:c.children},h,0,null),p=Ur(p,h,y,null),p.flags|=2,c.return=s,p.return=s,c.sibling=p,s.child=c,(s.mode&1)!==0&&As(s,e.child,null,y),s.child.memoizedState=zc(y),s.memoizedState=Uc,p);if((s.mode&1)===0)return xa(e,s,y,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var C=c.dgst;return c=C,p=Error(r(419)),c=Lc(p,c,void 0),xa(e,s,y,c)}if(C=(y&e.childLanes)!==0,Rt||C){if(c=ut,c!==null){switch(y&-y){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(c.suspendedLanes|y))!==0?0:h,h!==0&&h!==p.retryLane&&(p.retryLane=h,Rn(e,h),ln(c,e,h,-1))}return su(),c=Lc(Error(r(421))),xa(e,s,y,c)}return h.data==="$?"?(s.flags|=128,s.child=e.child,s=Av.bind(null,e),h._reactRetry=s,null):(e=p.treeContext,Wt=Gn(h.nextSibling),$t=s,Qe=!0,rn=null,e!==null&&(Vt[Qt++]=Tn,Vt[Qt++]=Dn,Vt[Qt++]=Dr,Tn=e.id,Dn=e.overflow,Dr=s),s=$c(s,c.children),s.flags|=4096,s)}function ap(e,s,a){e.lanes|=s;var c=e.alternate;c!==null&&(c.lanes|=s),vc(e.return,s,a)}function Wc(e,s,a,c,h){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(p.isBackwards=s,p.rendering=null,p.renderingStartTime=0,p.last=c,p.tail=a,p.tailMode=h)}function lp(e,s,a){var c=s.pendingProps,h=c.revealOrder,p=c.tail;if(St(e,s,c.children,a),c=Ge.current,(c&2)!==0)c=c&1|2,s.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=s.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ap(e,a,s);else if(e.tag===19)ap(e,a,s);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===s)break e;for(;e.sibling===null;){if(e.return===null||e.return===s)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}c&=1}if(We(Ge,c),(s.mode&1)===0)s.memoizedState=null;else switch(h){case"forwards":for(a=s.child,h=null;a!==null;)e=a.alternate,e!==null&&ca(e)===null&&(h=a),a=a.sibling;a=h,a===null?(h=s.child,s.child=null):(h=a.sibling,a.sibling=null),Wc(s,!1,h,a,p);break;case"backwards":for(a=null,h=s.child,s.child=null;h!==null;){if(e=h.alternate,e!==null&&ca(e)===null){s.child=h;break}e=h.sibling,h.sibling=a,a=h,h=e}Wc(s,!0,a,null,p);break;case"together":Wc(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ga(e,s){(s.mode&1)===0&&e!==null&&(e.alternate=null,s.alternate=null,s.flags|=2)}function On(e,s,a){if(e!==null&&(s.dependencies=e.dependencies),Lr|=s.lanes,(a&s.childLanes)===0)return null;if(e!==null&&s.child!==e.child)throw Error(r(153));if(s.child!==null){for(e=s.child,a=ir(e,e.pendingProps),s.child=a,a.return=s;e.sibling!==null;)e=e.sibling,a=a.sibling=ir(e,e.pendingProps),a.return=s;a.sibling=null}return s.child}function xv(e,s,a){switch(s.tag){case 3:sp(s),Es();break;case 5:jf(s);break;case 1:Dt(s.type)&&Zo(s);break;case 4:jc(s,s.stateNode.containerInfo);break;case 10:var c=s.type._context,h=s.memoizedProps.value;We(ia,c._currentValue),c._currentValue=h;break;case 13:if(c=s.memoizedState,c!==null)return c.dehydrated!==null?(We(Ge,Ge.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?op(e,s,a):(We(Ge,Ge.current&1),e=On(e,s,a),e!==null?e.sibling:null);We(Ge,Ge.current&1);break;case 19:if(c=(a&s.childLanes)!==0,(e.flags&128)!==0){if(c)return lp(e,s,a);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),We(Ge,Ge.current),c)break;return null;case 22:case 23:return s.lanes=0,tp(e,s,a)}return On(e,s,a)}var cp,qc,up,dp;cp=function(e,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)e.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},qc=function(){},up=function(e,s,a,c){var h=e.memoizedProps;if(h!==c){e=s.stateNode,Or(yn.current);var p=null;switch(a){case"input":h=Ut(e,h),c=Ut(e,c),p=[];break;case"select":h=U({},h,{value:void 0}),c=U({},c,{value:void 0}),p=[];break;case"textarea":h=jl(e,h),c=jl(e,c),p=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(e.onclick=Ko)}Cl(a,c);var y;a=null;for(F in h)if(!c.hasOwnProperty(F)&&h.hasOwnProperty(F)&&h[F]!=null)if(F==="style"){var C=h[F];for(y in C)C.hasOwnProperty(y)&&(a||(a={}),a[y]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(l.hasOwnProperty(F)?p||(p=[]):(p=p||[]).push(F,null));for(F in c){var E=c[F];if(C=h!=null?h[F]:void 0,c.hasOwnProperty(F)&&E!==C&&(E!=null||C!=null))if(F==="style")if(C){for(y in C)!C.hasOwnProperty(y)||E&&E.hasOwnProperty(y)||(a||(a={}),a[y]="");for(y in E)E.hasOwnProperty(y)&&C[y]!==E[y]&&(a||(a={}),a[y]=E[y])}else a||(p||(p=[]),p.push(F,a)),a=E;else F==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,C=C?C.__html:void 0,E!=null&&C!==E&&(p=p||[]).push(F,E)):F==="children"?typeof E!="string"&&typeof E!="number"||(p=p||[]).push(F,""+E):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(l.hasOwnProperty(F)?(E!=null&&F==="onScroll"&&qe("scroll",e),p||C===E||(p=[])):(p=p||[]).push(F,E))}a&&(p=p||[]).push("style",a);var F=p;(s.updateQueue=F)&&(s.flags|=4)}},dp=function(e,s,a,c){a!==c&&(s.flags|=4)};function Fi(e,s){if(!Qe)switch(e.tailMode){case"hidden":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?s||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function wt(e){var s=e.alternate!==null&&e.alternate.child===e.child,a=0,c=0;if(s)for(var h=e.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=e,h=h.sibling;else for(h=e.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=e,h=h.sibling;return e.subtreeFlags|=c,e.childLanes=a,s}function gv(e,s,a){var c=s.pendingProps;switch(hc(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(s),null;case 1:return Dt(s.type)&&Xo(),wt(s),null;case 3:return c=s.stateNode,Ds(),He(Tt),He(vt),kc(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(e===null||e.child===null)&&(ra(s)?s.flags|=4:e===null||e.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,rn!==null&&(tu(rn),rn=null))),qc(e,s),wt(s),null;case 5:Nc(s);var h=Or(Ri.current);if(a=s.type,e!==null&&s.stateNode!=null)up(e,s,a,c,h),e.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!c){if(s.stateNode===null)throw Error(r(166));return wt(s),null}if(e=Or(yn.current),ra(s)){c=s.stateNode,a=s.type;var p=s.memoizedProps;switch(c[gn]=s,c[Ei]=p,e=(s.mode&1)!==0,a){case"dialog":qe("cancel",c),qe("close",c);break;case"iframe":case"object":case"embed":qe("load",c);break;case"video":case"audio":for(h=0;h<Ci.length;h++)qe(Ci[h],c);break;case"source":qe("error",c);break;case"img":case"image":case"link":qe("error",c),qe("load",c);break;case"details":qe("toggle",c);break;case"input":ri(c,p),qe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!p.multiple},qe("invalid",c);break;case"textarea":Qd(c,p),qe("invalid",c)}Cl(a,p),h=null;for(var y in p)if(p.hasOwnProperty(y)){var C=p[y];y==="children"?typeof C=="string"?c.textContent!==C&&(p.suppressHydrationWarning!==!0&&Yo(c.textContent,C,e),h=["children",C]):typeof C=="number"&&c.textContent!==""+C&&(p.suppressHydrationWarning!==!0&&Yo(c.textContent,C,e),h=["children",""+C]):l.hasOwnProperty(y)&&C!=null&&y==="onScroll"&&qe("scroll",c)}switch(a){case"input":pe(c),Vd(c,p,!0);break;case"textarea":pe(c),Yd(c);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(c.onclick=Ko)}c=h,s.updateQueue=c,c!==null&&(s.flags|=4)}else{y=h.nodeType===9?h:h.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kd(a)),e==="http://www.w3.org/1999/xhtml"?a==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=y.createElement(a,{is:c.is}):(e=y.createElement(a),a==="select"&&(y=e,c.multiple?y.multiple=!0:c.size&&(y.size=c.size))):e=y.createElementNS(e,a),e[gn]=s,e[Ei]=c,cp(e,s,!1,!1),s.stateNode=e;e:{switch(y=kl(a,c),a){case"dialog":qe("cancel",e),qe("close",e),h=c;break;case"iframe":case"object":case"embed":qe("load",e),h=c;break;case"video":case"audio":for(h=0;h<Ci.length;h++)qe(Ci[h],e);h=c;break;case"source":qe("error",e),h=c;break;case"img":case"image":case"link":qe("error",e),qe("load",e),h=c;break;case"details":qe("toggle",e),h=c;break;case"input":ri(e,c),h=Ut(e,c),qe("invalid",e);break;case"option":h=c;break;case"select":e._wrapperState={wasMultiple:!!c.multiple},h=U({},c,{value:void 0}),qe("invalid",e);break;case"textarea":Qd(e,c),h=jl(e,c),qe("invalid",e);break;default:h=c}Cl(a,h),C=h;for(p in C)if(C.hasOwnProperty(p)){var E=C[p];p==="style"?Zd(e,E):p==="dangerouslySetInnerHTML"?(E=E?E.__html:void 0,E!=null&&Jd(e,E)):p==="children"?typeof E=="string"?(a!=="textarea"||E!=="")&&ii(e,E):typeof E=="number"&&ii(e,""+E):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(l.hasOwnProperty(p)?E!=null&&p==="onScroll"&&qe("scroll",e):E!=null&&N(e,p,E,y))}switch(a){case"input":pe(e),Vd(e,c,!1);break;case"textarea":pe(e),Yd(e);break;case"option":c.value!=null&&e.setAttribute("value",""+be(c.value));break;case"select":e.multiple=!!c.multiple,p=c.value,p!=null?hs(e,!!c.multiple,p,!1):c.defaultValue!=null&&hs(e,!!c.multiple,c.defaultValue,!0);break;default:typeof h.onClick=="function"&&(e.onclick=Ko)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return wt(s),null;case 6:if(e&&s.stateNode!=null)dp(e,s,e.memoizedProps,c);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(a=Or(Ri.current),Or(yn.current),ra(s)){if(c=s.stateNode,a=s.memoizedProps,c[gn]=s,(p=c.nodeValue!==a)&&(e=$t,e!==null))switch(e.tag){case 3:Yo(c.nodeValue,a,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Yo(c.nodeValue,a,(e.mode&1)!==0)}p&&(s.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[gn]=s,s.stateNode=c}return wt(s),null;case 13:if(He(Ge),c=s.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qe&&Wt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)pf(),Es(),s.flags|=98560,p=!1;else if(p=ra(s),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(r(318));if(p=s.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[gn]=s}else Es(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),p=!1}else rn!==null&&(tu(rn),rn=null),p=!0;if(!p)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(c=c!==null,c!==(e!==null&&e.memoizedState!==null)&&c&&(s.child.flags|=8192,(s.mode&1)!==0&&(e===null||(Ge.current&1)!==0?ot===0&&(ot=3):su())),s.updateQueue!==null&&(s.flags|=4),wt(s),null);case 4:return Ds(),qc(e,s),e===null&&ki(s.stateNode.containerInfo),wt(s),null;case 10:return yc(s.type._context),wt(s),null;case 17:return Dt(s.type)&&Xo(),wt(s),null;case 19:if(He(Ge),p=s.memoizedState,p===null)return wt(s),null;if(c=(s.flags&128)!==0,y=p.rendering,y===null)if(c)Fi(p,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=s.child;e!==null;){if(y=ca(e),y!==null){for(s.flags|=128,Fi(p,!1),c=y.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),s.subtreeFlags=0,c=a,a=s.child;a!==null;)p=a,e=c,p.flags&=14680066,y=p.alternate,y===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=y.childLanes,p.lanes=y.lanes,p.child=y.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=y.memoizedProps,p.memoizedState=y.memoizedState,p.updateQueue=y.updateQueue,p.type=y.type,e=y.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),a=a.sibling;return We(Ge,Ge.current&1|2),s.child}e=e.sibling}p.tail!==null&&Ze()>Ms&&(s.flags|=128,c=!0,Fi(p,!1),s.lanes=4194304)}else{if(!c)if(e=ca(y),e!==null){if(s.flags|=128,c=!0,a=e.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),Fi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!y.alternate&&!Qe)return wt(s),null}else 2*Ze()-p.renderingStartTime>Ms&&a!==1073741824&&(s.flags|=128,c=!0,Fi(p,!1),s.lanes=4194304);p.isBackwards?(y.sibling=s.child,s.child=y):(a=p.last,a!==null?a.sibling=y:s.child=y,p.last=y)}return p.tail!==null?(s=p.tail,p.rendering=s,p.tail=s.sibling,p.renderingStartTime=Ze(),s.sibling=null,a=Ge.current,We(Ge,c?a&1|2:a&1),s):(wt(s),null);case 22:case 23:return ru(),c=s.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(s.flags|=8192),c&&(s.mode&1)!==0?(qt&1073741824)!==0&&(wt(s),s.subtreeFlags&6&&(s.flags|=8192)):wt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function yv(e,s){switch(hc(s),s.tag){case 1:return Dt(s.type)&&Xo(),e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 3:return Ds(),He(Tt),He(vt),kc(),e=s.flags,(e&65536)!==0&&(e&128)===0?(s.flags=e&-65537|128,s):null;case 5:return Nc(s),null;case 13:if(He(Ge),e=s.memoizedState,e!==null&&e.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Es()}return e=s.flags,e&65536?(s.flags=e&-65537|128,s):null;case 19:return He(Ge),null;case 4:return Ds(),null;case 10:return yc(s.type._context),null;case 22:case 23:return ru(),null;case 24:return null;default:return null}}var ya=!1,jt=!1,vv=typeof WeakSet=="function"?WeakSet:Set,X=null;function Ps(e,s){var a=e.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Je(e,s,c)}else a.current=null}function Hc(e,s,a){try{a()}catch(c){Je(e,s,c)}}var hp=!1;function bv(e,s){if(rc=Io,e=Wh(),Yl(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{a.nodeType,p.nodeType}catch{a=null;break e}var y=0,C=-1,E=-1,F=0,q=0,V=e,W=null;t:for(;;){for(var Y;V!==a||h!==0&&V.nodeType!==3||(C=y+h),V!==p||c!==0&&V.nodeType!==3||(E=y+c),V.nodeType===3&&(y+=V.nodeValue.length),(Y=V.firstChild)!==null;)W=V,V=Y;for(;;){if(V===e)break t;if(W===a&&++F===h&&(C=y),W===p&&++q===c&&(E=y),(Y=V.nextSibling)!==null)break;V=W,W=V.parentNode}V=Y}a=C===-1||E===-1?null:{start:C,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(sc={focusedElem:e,selectionRange:a},Io=!1,X=s;X!==null;)if(s=X,e=s.child,(s.subtreeFlags&1028)!==0&&e!==null)e.return=s,X=e;else for(;X!==null;){s=X;try{var ee=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(ee!==null){var se=ee.memoizedProps,et=ee.memoizedState,M=s.stateNode,R=M.getSnapshotBeforeUpdate(s.elementType===s.type?se:sn(s.type,se),et);M.__reactInternalSnapshotBeforeUpdate=R}break;case 3:var L=s.stateNode.containerInfo;L.nodeType===1?L.textContent="":L.nodeType===9&&L.documentElement&&L.removeChild(L.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Q){Je(s,s.return,Q)}if(e=s.sibling,e!==null){e.return=s.return,X=e;break}X=s.return}return ee=hp,hp=!1,ee}function Ii(e,s,a){var c=s.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&e)===e){var p=h.destroy;h.destroy=void 0,p!==void 0&&Hc(s,a,p)}h=h.next}while(h!==c)}}function va(e,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&e)===e){var c=a.create;a.destroy=c()}a=a.next}while(a!==s)}}function Vc(e){var s=e.ref;if(s!==null){var a=e.stateNode;switch(e.tag){case 5:e=a;break;default:e=a}typeof s=="function"?s(e):s.current=e}}function fp(e){var s=e.alternate;s!==null&&(e.alternate=null,fp(s)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(s=e.stateNode,s!==null&&(delete s[gn],delete s[Ei],delete s[lc],delete s[nv],delete s[rv])),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 pp(e){return e.tag===5||e.tag===3||e.tag===4}function mp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(e,s):a.insertBefore(e,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(e,a)):(s=a,s.appendChild(e)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Ko));else if(c!==4&&(e=e.child,e!==null))for(Qc(e,s,a),e=e.sibling;e!==null;)Qc(e,s,a),e=e.sibling}function Gc(e,s,a){var c=e.tag;if(c===5||c===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(Gc(e,s,a),e=e.sibling;e!==null;)Gc(e,s,a),e=e.sibling}var pt=null,on=!1;function er(e,s,a){for(a=a.child;a!==null;)xp(e,s,a),a=a.sibling}function xp(e,s,a){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(Ro,a)}catch{}switch(a.tag){case 5:jt||Ps(a,s);case 6:var c=pt,h=on;pt=null,er(e,s,a),pt=c,on=h,pt!==null&&(on?(e=pt,a=a.stateNode,e.nodeType===8?e.parentNode.removeChild(a):e.removeChild(a)):pt.removeChild(a.stateNode));break;case 18:pt!==null&&(on?(e=pt,a=a.stateNode,e.nodeType===8?ac(e.parentNode,a):e.nodeType===1&&ac(e,a),xi(e)):ac(pt,a.stateNode));break;case 4:c=pt,h=on,pt=a.stateNode.containerInfo,on=!0,er(e,s,a),pt=c,on=h;break;case 0:case 11:case 14:case 15:if(!jt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var p=h,y=p.destroy;p=p.tag,y!==void 0&&((p&2)!==0||(p&4)!==0)&&Hc(a,s,y),h=h.next}while(h!==c)}er(e,s,a);break;case 1:if(!jt&&(Ps(a,s),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(C){Je(a,s,C)}er(e,s,a);break;case 21:er(e,s,a);break;case 22:a.mode&1?(jt=(c=jt)||a.memoizedState!==null,er(e,s,a),jt=c):er(e,s,a);break;default:er(e,s,a)}}function gp(e){var s=e.updateQueue;if(s!==null){e.updateQueue=null;var a=e.stateNode;a===null&&(a=e.stateNode=new vv),s.forEach(function(c){var h=_v.bind(null,e,c);a.has(c)||(a.add(c),c.then(h,h))})}}function an(e,s){var a=s.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];try{var p=e,y=s,C=y;e:for(;C!==null;){switch(C.tag){case 5:pt=C.stateNode,on=!1;break e;case 3:pt=C.stateNode.containerInfo,on=!0;break e;case 4:pt=C.stateNode.containerInfo,on=!0;break e}C=C.return}if(pt===null)throw Error(r(160));xp(p,y,h),pt=null,on=!1;var E=h.alternate;E!==null&&(E.return=null),h.return=null}catch(F){Je(h,s,F)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)yp(s,e),s=s.sibling}function yp(e,s){var a=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(an(s,e),bn(e),c&4){try{Ii(3,e,e.return),va(3,e)}catch(se){Je(e,e.return,se)}try{Ii(5,e,e.return)}catch(se){Je(e,e.return,se)}}break;case 1:an(s,e),bn(e),c&512&&a!==null&&Ps(a,a.return);break;case 5:if(an(s,e),bn(e),c&512&&a!==null&&Ps(a,a.return),e.flags&32){var h=e.stateNode;try{ii(h,"")}catch(se){Je(e,e.return,se)}}if(c&4&&(h=e.stateNode,h!=null)){var p=e.memoizedProps,y=a!==null?a.memoizedProps:p,C=e.type,E=e.updateQueue;if(e.updateQueue=null,E!==null)try{C==="input"&&p.type==="radio"&&p.name!=null&&Eo(h,p),kl(C,y);var F=kl(C,p);for(y=0;y<E.length;y+=2){var q=E[y],V=E[y+1];q==="style"?Zd(h,V):q==="dangerouslySetInnerHTML"?Jd(h,V):q==="children"?ii(h,V):N(h,q,V,F)}switch(C){case"input":En(h,p);break;case"textarea":Gd(h,p);break;case"select":var W=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!p.multiple;var Y=p.value;Y!=null?hs(h,!!p.multiple,Y,!1):W!==!!p.multiple&&(p.defaultValue!=null?hs(h,!!p.multiple,p.defaultValue,!0):hs(h,!!p.multiple,p.multiple?[]:"",!1))}h[Ei]=p}catch(se){Je(e,e.return,se)}}break;case 6:if(an(s,e),bn(e),c&4){if(e.stateNode===null)throw Error(r(162));h=e.stateNode,p=e.memoizedProps;try{h.nodeValue=p}catch(se){Je(e,e.return,se)}}break;case 3:if(an(s,e),bn(e),c&4&&a!==null&&a.memoizedState.isDehydrated)try{xi(s.containerInfo)}catch(se){Je(e,e.return,se)}break;case 4:an(s,e),bn(e);break;case 13:an(s,e),bn(e),h=e.child,h.flags&8192&&(p=h.memoizedState!==null,h.stateNode.isHidden=p,!p||h.alternate!==null&&h.alternate.memoizedState!==null||(Jc=Ze())),c&4&&gp(e);break;case 22:if(q=a!==null&&a.memoizedState!==null,e.mode&1?(jt=(F=jt)||q,an(s,e),jt=F):an(s,e),bn(e),c&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!q&&(e.mode&1)!==0)for(X=e,q=e.child;q!==null;){for(V=X=q;X!==null;){switch(W=X,Y=W.child,W.tag){case 0:case 11:case 14:case 15:Ii(4,W,W.return);break;case 1:Ps(W,W.return);var ee=W.stateNode;if(typeof ee.componentWillUnmount=="function"){c=W,a=W.return;try{s=c,ee.props=s.memoizedProps,ee.state=s.memoizedState,ee.componentWillUnmount()}catch(se){Je(c,a,se)}}break;case 5:Ps(W,W.return);break;case 22:if(W.memoizedState!==null){wp(V);continue}}Y!==null?(Y.return=W,X=Y):wp(V)}q=q.sibling}e:for(q=null,V=e;;){if(V.tag===5){if(q===null){q=V;try{h=V.stateNode,F?(p=h.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(C=V.stateNode,E=V.memoizedProps.style,y=E!=null&&E.hasOwnProperty("display")?E.display:null,C.style.display=Xd("display",y))}catch(se){Je(e,e.return,se)}}}else if(V.tag===6){if(q===null)try{V.stateNode.nodeValue=F?"":V.memoizedProps}catch(se){Je(e,e.return,se)}}else if((V.tag!==22&&V.tag!==23||V.memoizedState===null||V===e)&&V.child!==null){V.child.return=V,V=V.child;continue}if(V===e)break e;for(;V.sibling===null;){if(V.return===null||V.return===e)break e;q===V&&(q=null),V=V.return}q===V&&(q=null),V.sibling.return=V.return,V=V.sibling}}break;case 19:an(s,e),bn(e),c&4&&gp(e);break;case 21:break;default:an(s,e),bn(e)}}function bn(e){var s=e.flags;if(s&2){try{e:{for(var a=e.return;a!==null;){if(pp(a)){var c=a;break e}a=a.return}throw Error(r(160))}switch(c.tag){case 5:var h=c.stateNode;c.flags&32&&(ii(h,""),c.flags&=-33);var p=mp(e);Gc(e,p,h);break;case 3:case 4:var y=c.stateNode.containerInfo,C=mp(e);Qc(e,C,y);break;default:throw Error(r(161))}}catch(E){Je(e,e.return,E)}e.flags&=-3}s&4096&&(e.flags&=-4097)}function wv(e,s,a){X=e,vp(e)}function vp(e,s,a){for(var c=(e.mode&1)!==0;X!==null;){var h=X,p=h.child;if(h.tag===22&&c){var y=h.memoizedState!==null||ya;if(!y){var C=h.alternate,E=C!==null&&C.memoizedState!==null||jt;C=ya;var F=jt;if(ya=y,(jt=E)&&!F)for(X=h;X!==null;)y=X,E=y.child,y.tag===22&&y.memoizedState!==null?jp(h):E!==null?(E.return=y,X=E):jp(h);for(;p!==null;)X=p,vp(p),p=p.sibling;X=h,ya=C,jt=F}bp(e)}else(h.subtreeFlags&8772)!==0&&p!==null?(p.return=h,X=p):bp(e)}}function bp(e){for(;X!==null;){var s=X;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:jt||va(5,s);break;case 1:var c=s.stateNode;if(s.flags&4&&!jt)if(a===null)c.componentDidMount();else{var h=s.elementType===s.type?a.memoizedProps:sn(s.type,a.memoizedProps);c.componentDidUpdate(h,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var p=s.updateQueue;p!==null&&wf(s,p,c);break;case 3:var y=s.updateQueue;if(y!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}wf(s,y,a)}break;case 5:var C=s.stateNode;if(a===null&&s.flags&4){a=C;var E=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":E.autoFocus&&a.focus();break;case"img":E.src&&(a.src=E.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var F=s.alternate;if(F!==null){var q=F.memoizedState;if(q!==null){var V=q.dehydrated;V!==null&&xi(V)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}jt||s.flags&512&&Vc(s)}catch(W){Je(s,s.return,W)}}if(s===e){X=null;break}if(a=s.sibling,a!==null){a.return=s.return,X=a;break}X=s.return}}function wp(e){for(;X!==null;){var s=X;if(s===e){X=null;break}var a=s.sibling;if(a!==null){a.return=s.return,X=a;break}X=s.return}}function jp(e){for(;X!==null;){var s=X;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{va(4,s)}catch(E){Je(s,a,E)}break;case 1:var c=s.stateNode;if(typeof c.componentDidMount=="function"){var h=s.return;try{c.componentDidMount()}catch(E){Je(s,h,E)}}var p=s.return;try{Vc(s)}catch(E){Je(s,p,E)}break;case 5:var y=s.return;try{Vc(s)}catch(E){Je(s,y,E)}}}catch(E){Je(s,s.return,E)}if(s===e){X=null;break}var C=s.sibling;if(C!==null){C.return=s.return,X=C;break}X=s.return}}var jv=Math.ceil,ba=S.ReactCurrentDispatcher,Yc=S.ReactCurrentOwner,Kt=S.ReactCurrentBatchConfig,Te=0,ut=null,nt=null,mt=0,qt=0,Os=Yn(0),ot=0,Bi=null,Lr=0,wa=0,Kc=0,Ui=null,Pt=null,Jc=0,Ms=1/0,Mn=null,ja=!1,Xc=null,tr=null,Na=!1,nr=null,Ca=0,zi=0,Zc=null,ka=-1,Sa=0;function Et(){return(Te&6)!==0?Ze():ka!==-1?ka:ka=Ze()}function rr(e){return(e.mode&1)===0?1:(Te&2)!==0&&mt!==0?mt&-mt:iv.transition!==null?(Sa===0&&(Sa=ph()),Sa):(e=Fe,e!==0||(e=window.event,e=e===void 0?16:Nh(e.type)),e)}function ln(e,s,a,c){if(50<zi)throw zi=0,Zc=null,Error(r(185));di(e,a,c),((Te&2)===0||e!==ut)&&(e===ut&&((Te&2)===0&&(wa|=a),ot===4&&sr(e,mt)),Ot(e,c),a===1&&Te===0&&(s.mode&1)===0&&(Ms=Ze()+500,ea&&Jn()))}function Ot(e,s){var a=e.callbackNode;i0(e,s);var c=Mo(e,e===ut?mt:0);if(c===0)a!==null&&dh(a),e.callbackNode=null,e.callbackPriority=0;else if(s=c&-c,e.callbackPriority!==s){if(a!=null&&dh(a),s===1)e.tag===0?sv(Cp.bind(null,e)):cf(Cp.bind(null,e)),ev(function(){(Te&6)===0&&Jn()}),a=null;else{switch(mh(c)){case 1:a=Rl;break;case 4:a=hh;break;case 16:a=Do;break;case 536870912:a=fh;break;default:a=Do}a=Rp(a,Np.bind(null,e))}e.callbackPriority=s,e.callbackNode=a}}function Np(e,s){if(ka=-1,Sa=0,(Te&6)!==0)throw Error(r(327));var a=e.callbackNode;if(Ls()&&e.callbackNode!==a)return null;var c=Mo(e,e===ut?mt:0);if(c===0)return null;if((c&30)!==0||(c&e.expiredLanes)!==0||s)s=Ea(e,c);else{s=c;var h=Te;Te|=2;var p=Sp();(ut!==e||mt!==s)&&(Mn=null,Ms=Ze()+500,Ir(e,s));do try{kv();break}catch(C){kp(e,C)}while(!0);gc(),ba.current=p,Te=h,nt!==null?s=0:(ut=null,mt=0,s=ot)}if(s!==0){if(s===2&&(h=Pl(e),h!==0&&(c=h,s=eu(e,h))),s===1)throw a=Bi,Ir(e,0),sr(e,c),Ot(e,Ze()),a;if(s===6)sr(e,c);else{if(h=e.current.alternate,(c&30)===0&&!Nv(h)&&(s=Ea(e,c),s===2&&(p=Pl(e),p!==0&&(c=p,s=eu(e,p))),s===1))throw a=Bi,Ir(e,0),sr(e,c),Ot(e,Ze()),a;switch(e.finishedWork=h,e.finishedLanes=c,s){case 0:case 1:throw Error(r(345));case 2:Br(e,Pt,Mn);break;case 3:if(sr(e,c),(c&130023424)===c&&(s=Jc+500-Ze(),10<s)){if(Mo(e,0)!==0)break;if(h=e.suspendedLanes,(h&c)!==c){Et(),e.pingedLanes|=e.suspendedLanes&h;break}e.timeoutHandle=oc(Br.bind(null,e,Pt,Mn),s);break}Br(e,Pt,Mn);break;case 4:if(sr(e,c),(c&4194240)===c)break;for(s=e.eventTimes,h=-1;0<c;){var y=31-tn(c);p=1<<y,y=s[y],y>h&&(h=y),c&=~p}if(c=h,c=Ze()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*jv(c/1960))-c,10<c){e.timeoutHandle=oc(Br.bind(null,e,Pt,Mn),c);break}Br(e,Pt,Mn);break;case 5:Br(e,Pt,Mn);break;default:throw Error(r(329))}}}return Ot(e,Ze()),e.callbackNode===a?Np.bind(null,e):null}function eu(e,s){var a=Ui;return e.current.memoizedState.isDehydrated&&(Ir(e,s).flags|=256),e=Ea(e,s),e!==2&&(s=Pt,Pt=a,s!==null&&tu(s)),e}function tu(e){Pt===null?Pt=e:Pt.push.apply(Pt,e)}function Nv(e){for(var s=e;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var h=a[c],p=h.getSnapshot;h=h.value;try{if(!nn(p(),h))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===e)break;for(;s.sibling===null;){if(s.return===null||s.return===e)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function sr(e,s){for(s&=~Kc,s&=~wa,e.suspendedLanes|=s,e.pingedLanes&=~s,e=e.expirationTimes;0<s;){var a=31-tn(s),c=1<<a;e[a]=-1,s&=~c}}function Cp(e){if((Te&6)!==0)throw Error(r(327));Ls();var s=Mo(e,0);if((s&1)===0)return Ot(e,Ze()),null;var a=Ea(e,s);if(e.tag!==0&&a===2){var c=Pl(e);c!==0&&(s=c,a=eu(e,c))}if(a===1)throw a=Bi,Ir(e,0),sr(e,s),Ot(e,Ze()),a;if(a===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=s,Br(e,Pt,Mn),Ot(e,Ze()),null}function nu(e,s){var a=Te;Te|=1;try{return e(s)}finally{Te=a,Te===0&&(Ms=Ze()+500,ea&&Jn())}}function Fr(e){nr!==null&&nr.tag===0&&(Te&6)===0&&Ls();var s=Te;Te|=1;var a=Kt.transition,c=Fe;try{if(Kt.transition=null,Fe=1,e)return e()}finally{Fe=c,Kt.transition=a,Te=s,(Te&6)===0&&Jn()}}function ru(){qt=Os.current,He(Os)}function Ir(e,s){e.finishedWork=null,e.finishedLanes=0;var a=e.timeoutHandle;if(a!==-1&&(e.timeoutHandle=-1,Z0(a)),nt!==null)for(a=nt.return;a!==null;){var c=a;switch(hc(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Xo();break;case 3:Ds(),He(Tt),He(vt),kc();break;case 5:Nc(c);break;case 4:Ds();break;case 13:He(Ge);break;case 19:He(Ge);break;case 10:yc(c.type._context);break;case 22:case 23:ru()}a=a.return}if(ut=e,nt=e=ir(e.current,null),mt=qt=s,ot=0,Bi=null,Kc=wa=Lr=0,Pt=Ui=null,Pr!==null){for(s=0;s<Pr.length;s++)if(a=Pr[s],c=a.interleaved,c!==null){a.interleaved=null;var h=c.next,p=a.pending;if(p!==null){var y=p.next;p.next=h,c.next=y}a.pending=c}Pr=null}return e}function kp(e,s){do{var a=nt;try{if(gc(),ua.current=pa,da){for(var c=Ye.memoizedState;c!==null;){var h=c.queue;h!==null&&(h.pending=null),c=c.next}da=!1}if(Mr=0,ct=it=Ye=null,Pi=!1,Oi=0,Yc.current=null,a===null||a.return===null){ot=1,Bi=s,nt=null;break}e:{var p=e,y=a.return,C=a,E=s;if(s=mt,C.flags|=32768,E!==null&&typeof E=="object"&&typeof E.then=="function"){var F=E,q=C,V=q.tag;if((q.mode&1)===0&&(V===0||V===11||V===15)){var W=q.alternate;W?(q.updateQueue=W.updateQueue,q.memoizedState=W.memoizedState,q.lanes=W.lanes):(q.updateQueue=null,q.memoizedState=null)}var Y=Kf(y);if(Y!==null){Y.flags&=-257,Jf(Y,y,C,p,s),Y.mode&1&&Yf(p,F,s),s=Y,E=F;var ee=s.updateQueue;if(ee===null){var se=new Set;se.add(E),s.updateQueue=se}else ee.add(E);break e}else{if((s&1)===0){Yf(p,F,s),su();break e}E=Error(r(426))}}else if(Qe&&C.mode&1){var et=Kf(y);if(et!==null){(et.flags&65536)===0&&(et.flags|=256),Jf(et,y,C,p,s),mc(Rs(E,C));break e}}p=E=Rs(E,C),ot!==4&&(ot=2),Ui===null?Ui=[p]:Ui.push(p),p=y;do{switch(p.tag){case 3:p.flags|=65536,s&=-s,p.lanes|=s;var M=Qf(p,E,s);bf(p,M);break e;case 1:C=E;var R=p.type,L=p.stateNode;if((p.flags&128)===0&&(typeof R.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(tr===null||!tr.has(L)))){p.flags|=65536,s&=-s,p.lanes|=s;var Q=Gf(p,C,s);bf(p,Q);break e}}p=p.return}while(p!==null)}Ap(a)}catch(ie){s=ie,nt===a&&a!==null&&(nt=a=a.return);continue}break}while(!0)}function Sp(){var e=ba.current;return ba.current=pa,e===null?pa:e}function su(){(ot===0||ot===3||ot===2)&&(ot=4),ut===null||(Lr&268435455)===0&&(wa&268435455)===0||sr(ut,mt)}function Ea(e,s){var a=Te;Te|=2;var c=Sp();(ut!==e||mt!==s)&&(Mn=null,Ir(e,s));do try{Cv();break}catch(h){kp(e,h)}while(!0);if(gc(),Te=a,ba.current=c,nt!==null)throw Error(r(261));return ut=null,mt=0,ot}function Cv(){for(;nt!==null;)Ep(nt)}function kv(){for(;nt!==null&&!Ky();)Ep(nt)}function Ep(e){var s=Dp(e.alternate,e,qt);e.memoizedProps=e.pendingProps,s===null?Ap(e):nt=s,Yc.current=null}function Ap(e){var s=e;do{var a=s.alternate;if(e=s.return,(s.flags&32768)===0){if(a=gv(a,s,qt),a!==null){nt=a;return}}else{if(a=yv(a,s),a!==null){a.flags&=32767,nt=a;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ot=6,nt=null;return}}if(s=s.sibling,s!==null){nt=s;return}nt=s=e}while(s!==null);ot===0&&(ot=5)}function Br(e,s,a){var c=Fe,h=Kt.transition;try{Kt.transition=null,Fe=1,Sv(e,s,a,c)}finally{Kt.transition=h,Fe=c}return null}function Sv(e,s,a,c){do Ls();while(nr!==null);if((Te&6)!==0)throw Error(r(327));a=e.finishedWork;var h=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var p=a.lanes|a.childLanes;if(o0(e,p),e===ut&&(nt=ut=null,mt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Na||(Na=!0,Rp(Do,function(){return Ls(),null})),p=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||p){p=Kt.transition,Kt.transition=null;var y=Fe;Fe=1;var C=Te;Te|=4,Yc.current=null,bv(e,a),yp(a,e),V0(sc),Io=!!rc,sc=rc=null,e.current=a,wv(a),Jy(),Te=C,Fe=y,Kt.transition=p}else e.current=a;if(Na&&(Na=!1,nr=e,Ca=h),p=e.pendingLanes,p===0&&(tr=null),e0(a.stateNode),Ot(e,Ze()),s!==null)for(c=e.onRecoverableError,a=0;a<s.length;a++)h=s[a],c(h.value,{componentStack:h.stack,digest:h.digest});if(ja)throw ja=!1,e=Xc,Xc=null,e;return(Ca&1)!==0&&e.tag!==0&&Ls(),p=e.pendingLanes,(p&1)!==0?e===Zc?zi++:(zi=0,Zc=e):zi=0,Jn(),null}function Ls(){if(nr!==null){var e=mh(Ca),s=Kt.transition,a=Fe;try{if(Kt.transition=null,Fe=16>e?16:e,nr===null)var c=!1;else{if(e=nr,nr=null,Ca=0,(Te&6)!==0)throw Error(r(331));var h=Te;for(Te|=4,X=e.current;X!==null;){var p=X,y=p.child;if((X.flags&16)!==0){var C=p.deletions;if(C!==null){for(var E=0;E<C.length;E++){var F=C[E];for(X=F;X!==null;){var q=X;switch(q.tag){case 0:case 11:case 15:Ii(8,q,p)}var V=q.child;if(V!==null)V.return=q,X=V;else for(;X!==null;){q=X;var W=q.sibling,Y=q.return;if(fp(q),q===F){X=null;break}if(W!==null){W.return=Y,X=W;break}X=Y}}}var ee=p.alternate;if(ee!==null){var se=ee.child;if(se!==null){ee.child=null;do{var et=se.sibling;se.sibling=null,se=et}while(se!==null)}}X=p}}if((p.subtreeFlags&2064)!==0&&y!==null)y.return=p,X=y;else e:for(;X!==null;){if(p=X,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Ii(9,p,p.return)}var M=p.sibling;if(M!==null){M.return=p.return,X=M;break e}X=p.return}}var R=e.current;for(X=R;X!==null;){y=X;var L=y.child;if((y.subtreeFlags&2064)!==0&&L!==null)L.return=y,X=L;else e:for(y=R;X!==null;){if(C=X,(C.flags&2048)!==0)try{switch(C.tag){case 0:case 11:case 15:va(9,C)}}catch(ie){Je(C,C.return,ie)}if(C===y){X=null;break e}var Q=C.sibling;if(Q!==null){Q.return=C.return,X=Q;break e}X=C.return}}if(Te=h,Jn(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(Ro,e)}catch{}c=!0}return c}finally{Fe=a,Kt.transition=s}}return!1}function _p(e,s,a){s=Rs(a,s),s=Qf(e,s,1),e=Zn(e,s,1),s=Et(),e!==null&&(di(e,1,s),Ot(e,s))}function Je(e,s,a){if(e.tag===3)_p(e,e,a);else for(;s!==null;){if(s.tag===3){_p(s,e,a);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(tr===null||!tr.has(c))){e=Rs(a,e),e=Gf(s,e,1),s=Zn(s,e,1),e=Et(),s!==null&&(di(s,1,e),Ot(s,e));break}}s=s.return}}function Ev(e,s,a){var c=e.pingCache;c!==null&&c.delete(s),s=Et(),e.pingedLanes|=e.suspendedLanes&a,ut===e&&(mt&a)===a&&(ot===4||ot===3&&(mt&130023424)===mt&&500>Ze()-Jc?Ir(e,0):Kc|=a),Ot(e,s)}function Tp(e,s){s===0&&((e.mode&1)===0?s=1:(s=Oo,Oo<<=1,(Oo&130023424)===0&&(Oo=4194304)));var a=Et();e=Rn(e,s),e!==null&&(di(e,s,a),Ot(e,a))}function Av(e){var s=e.memoizedState,a=0;s!==null&&(a=s.retryLane),Tp(e,a)}function _v(e,s){var a=0;switch(e.tag){case 13:var c=e.stateNode,h=e.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(s),Tp(e,a)}var Dp;Dp=function(e,s,a){if(e!==null)if(e.memoizedProps!==s.pendingProps||Tt.current)Rt=!0;else{if((e.lanes&a)===0&&(s.flags&128)===0)return Rt=!1,xv(e,s,a);Rt=(e.flags&131072)!==0}else Rt=!1,Qe&&(s.flags&1048576)!==0&&uf(s,na,s.index);switch(s.lanes=0,s.tag){case 2:var c=s.type;ga(e,s),e=s.pendingProps;var h=Cs(s,vt.current);Ts(s,a),h=Ac(null,s,c,e,h,a);var p=_c();return s.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dt(c)?(p=!0,Zo(s)):p=!1,s.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,wc(s),h.updater=ma,s.stateNode=h,h._reactInternals=s,Mc(s,c,e,a),s=Bc(null,s,c,!0,p,a)):(s.tag=0,Qe&&p&&dc(s),St(null,s,h,a),s=s.child),s;case 16:c=s.elementType;e:{switch(ga(e,s),e=s.pendingProps,h=c._init,c=h(c._payload),s.type=c,h=s.tag=Dv(c),e=sn(c,e),h){case 0:s=Ic(null,s,c,e,a);break e;case 1:s=rp(null,s,c,e,a);break e;case 11:s=Xf(null,s,c,e,a);break e;case 14:s=Zf(null,s,c,sn(c.type,e),a);break e}throw Error(r(306,c,""))}return s;case 0:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:sn(c,h),Ic(e,s,c,h,a);case 1:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:sn(c,h),rp(e,s,c,h,a);case 3:e:{if(sp(s),e===null)throw Error(r(387));c=s.pendingProps,p=s.memoizedState,h=p.element,vf(e,s),la(s,c,null,a);var y=s.memoizedState;if(c=y.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){h=Rs(Error(r(423)),s),s=ip(e,s,c,a,h);break e}else if(c!==h){h=Rs(Error(r(424)),s),s=ip(e,s,c,a,h);break e}else for(Wt=Gn(s.stateNode.containerInfo.firstChild),$t=s,Qe=!0,rn=null,a=gf(s,null,c,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Es(),c===h){s=On(e,s,a);break e}St(e,s,c,a)}s=s.child}return s;case 5:return jf(s),e===null&&pc(s),c=s.type,h=s.pendingProps,p=e!==null?e.memoizedProps:null,y=h.children,ic(c,h)?y=null:p!==null&&ic(c,p)&&(s.flags|=32),np(e,s),St(e,s,y,a),s.child;case 6:return e===null&&pc(s),null;case 13:return op(e,s,a);case 4:return jc(s,s.stateNode.containerInfo),c=s.pendingProps,e===null?s.child=As(s,null,c,a):St(e,s,c,a),s.child;case 11:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:sn(c,h),Xf(e,s,c,h,a);case 7:return St(e,s,s.pendingProps,a),s.child;case 8:return St(e,s,s.pendingProps.children,a),s.child;case 12:return St(e,s,s.pendingProps.children,a),s.child;case 10:e:{if(c=s.type._context,h=s.pendingProps,p=s.memoizedProps,y=h.value,We(ia,c._currentValue),c._currentValue=y,p!==null)if(nn(p.value,y)){if(p.children===h.children&&!Tt.current){s=On(e,s,a);break e}}else for(p=s.child,p!==null&&(p.return=s);p!==null;){var C=p.dependencies;if(C!==null){y=p.child;for(var E=C.firstContext;E!==null;){if(E.context===c){if(p.tag===1){E=Pn(-1,a&-a),E.tag=2;var F=p.updateQueue;if(F!==null){F=F.shared;var q=F.pending;q===null?E.next=E:(E.next=q.next,q.next=E),F.pending=E}}p.lanes|=a,E=p.alternate,E!==null&&(E.lanes|=a),vc(p.return,a,s),C.lanes|=a;break}E=E.next}}else if(p.tag===10)y=p.type===s.type?null:p.child;else if(p.tag===18){if(y=p.return,y===null)throw Error(r(341));y.lanes|=a,C=y.alternate,C!==null&&(C.lanes|=a),vc(y,a,s),y=p.sibling}else y=p.child;if(y!==null)y.return=p;else for(y=p;y!==null;){if(y===s){y=null;break}if(p=y.sibling,p!==null){p.return=y.return,y=p;break}y=y.return}p=y}St(e,s,h.children,a),s=s.child}return s;case 9:return h=s.type,c=s.pendingProps.children,Ts(s,a),h=Gt(h),c=c(h),s.flags|=1,St(e,s,c,a),s.child;case 14:return c=s.type,h=sn(c,s.pendingProps),h=sn(c.type,h),Zf(e,s,c,h,a);case 15:return ep(e,s,s.type,s.pendingProps,a);case 17:return c=s.type,h=s.pendingProps,h=s.elementType===c?h:sn(c,h),ga(e,s),s.tag=1,Dt(c)?(e=!0,Zo(s)):e=!1,Ts(s,a),Hf(s,c,h),Mc(s,c,h,a),Bc(null,s,c,!0,e,a);case 19:return lp(e,s,a);case 22:return tp(e,s,a)}throw Error(r(156,s.tag))};function Rp(e,s){return uh(e,s)}function Tv(e,s,a,c){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,s,a,c){return new Tv(e,s,a,c)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dv(e){if(typeof e=="function")return iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Me)return 11;if(e===ze)return 14}return 2}function ir(e,s){var a=e.alternate;return a===null?(a=Jt(e.tag,s,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=s,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&14680064,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,s=e.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a}function Aa(e,s,a,c,h,p){var y=2;if(c=e,typeof e=="function")iu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case Z:return Ur(a.children,h,p,s);case $:y=8,h|=8;break;case le:return e=Jt(12,a,s,h|2),e.elementType=le,e.lanes=p,e;case Ke:return e=Jt(13,a,s,h),e.elementType=Ke,e.lanes=p,e;case Oe:return e=Jt(19,a,s,h),e.elementType=Oe,e.lanes=p,e;case Re:return _a(a,h,p,s);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ve:y=10;break e;case fe:y=9;break e;case Me:y=11;break e;case ze:y=14;break e;case De:y=16,c=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return s=Jt(y,a,s,h),s.elementType=e,s.type=c,s.lanes=p,s}function Ur(e,s,a,c){return e=Jt(7,e,c,s),e.lanes=a,e}function _a(e,s,a,c){return e=Jt(22,e,c,s),e.elementType=Re,e.lanes=a,e.stateNode={isHidden:!1},e}function ou(e,s,a){return e=Jt(6,e,null,s),e.lanes=a,e}function au(e,s,a){return s=Jt(4,e.children!==null?e.children:[],e.key,s),s.lanes=a,s.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},s}function Rv(e,s,a,c,h){this.tag=s,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=Ol(0),this.expirationTimes=Ol(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function lu(e,s,a,c,h,p,y,C,E){return e=new Rv(e,s,a,C,E),s===1?(s=1,p===!0&&(s|=8)):s=0,p=Jt(3,null,null,s),e.current=p,p.stateNode=e,p.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},wc(p),e}function Pv(e,s,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:H,key:c==null?null:""+c,children:e,containerInfo:s,implementation:a}}function Pp(e){if(!e)return Kn;e=e._reactInternals;e:{if(Ar(e)!==e||e.tag!==1)throw Error(r(170));var s=e;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Dt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(e.tag===1){var a=e.type;if(Dt(a))return af(e,a,s)}return s}function Op(e,s,a,c,h,p,y,C,E){return e=lu(a,c,!0,e,h,p,y,C,E),e.context=Pp(null),a=e.current,c=Et(),h=rr(a),p=Pn(c,h),p.callback=s??null,Zn(a,p,h),e.current.lanes=h,di(e,h,c),Ot(e,c),e}function Ta(e,s,a,c){var h=s.current,p=Et(),y=rr(h);return a=Pp(a),s.context===null?s.context=a:s.pendingContext=a,s=Pn(p,y),s.payload={element:e},c=c===void 0?null:c,c!==null&&(s.callback=c),e=Zn(h,s,y),e!==null&&(ln(e,h,y,p),aa(e,h,y)),y}function Da(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Mp(e,s){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<s?a:s}}function cu(e,s){Mp(e,s),(e=e.alternate)&&Mp(e,s)}function Ov(){return null}var Lp=typeof reportError=="function"?reportError:function(e){console.error(e)};function uu(e){this._internalRoot=e}Ra.prototype.render=uu.prototype.render=function(e){var s=this._internalRoot;if(s===null)throw Error(r(409));Ta(e,s,null,null)},Ra.prototype.unmount=uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var s=e.containerInfo;Fr(function(){Ta(null,e,null,null)}),s[An]=null}};function Ra(e){this._internalRoot=e}Ra.prototype.unstable_scheduleHydration=function(e){if(e){var s=yh();e={blockedOn:null,target:e,priority:s};for(var a=0;a<Hn.length&&s!==0&&s<Hn[a].priority;a++);Hn.splice(a,0,e),a===0&&wh(e)}};function du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fp(){}function Mv(e,s,a,c,h){if(h){if(typeof c=="function"){var p=c;c=function(){var F=Da(y);p.call(F)}}var y=Op(s,c,e,0,null,!1,!1,"",Fp);return e._reactRootContainer=y,e[An]=y.current,ki(e.nodeType===8?e.parentNode:e),Fr(),y}for(;h=e.lastChild;)e.removeChild(h);if(typeof c=="function"){var C=c;c=function(){var F=Da(E);C.call(F)}}var E=lu(e,0,!1,null,null,!1,!1,"",Fp);return e._reactRootContainer=E,e[An]=E.current,ki(e.nodeType===8?e.parentNode:e),Fr(function(){Ta(s,E,a,c)}),E}function Oa(e,s,a,c,h){var p=a._reactRootContainer;if(p){var y=p;if(typeof h=="function"){var C=h;h=function(){var E=Da(y);C.call(E)}}Ta(s,y,e,h)}else y=Mv(a,s,e,h,c);return Da(y)}xh=function(e){switch(e.tag){case 3:var s=e.stateNode;if(s.current.memoizedState.isDehydrated){var a=ui(s.pendingLanes);a!==0&&(Ml(s,a|1),Ot(s,Ze()),(Te&6)===0&&(Ms=Ze()+500,Jn()))}break;case 13:Fr(function(){var c=Rn(e,1);if(c!==null){var h=Et();ln(c,e,1,h)}}),cu(e,1)}},Ll=function(e){if(e.tag===13){var s=Rn(e,134217728);if(s!==null){var a=Et();ln(s,e,134217728,a)}cu(e,134217728)}},gh=function(e){if(e.tag===13){var s=rr(e),a=Rn(e,s);if(a!==null){var c=Et();ln(a,e,s,c)}cu(e,s)}},yh=function(){return Fe},vh=function(e,s){var a=Fe;try{return Fe=e,s()}finally{Fe=a}},Al=function(e,s,a){switch(s){case"input":if(En(e,a),s=a.name,a.type==="radio"&&s!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var c=a[s];if(c!==e&&c.form===e.form){var h=Jo(c);if(!h)throw Error(r(90));lt(c),En(c,h)}}}break;case"textarea":Gd(e,a);break;case"select":s=a.value,s!=null&&hs(e,!!a.multiple,s,!1)}},rh=nu,sh=Fr;var Lv={usingClientEntryPoint:!1,Events:[Ai,js,Jo,th,nh,nu]},$i={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Fv={bundleType:$i.bundleType,version:$i.version,rendererPackageName:$i.rendererPackageName,rendererConfig:$i.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=lh(e),e===null?null:e.stateNode},findFiberByHostInstance:$i.findFiberByHostInstance||Ov,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ma=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ma.isDisabled&&Ma.supportsFiber)try{Ro=Ma.inject(Fv),xn=Ma}catch{}}return Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lv,Mt.createPortal=function(e,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!du(s))throw Error(r(200));return Pv(e,s,null,a)},Mt.createRoot=function(e,s){if(!du(e))throw Error(r(299));var a=!1,c="",h=Lp;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onRecoverableError!==void 0&&(h=s.onRecoverableError)),s=lu(e,1,!1,null,null,a,!1,c,h),e[An]=s.current,ki(e.nodeType===8?e.parentNode:e),new uu(s)},Mt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var s=e._reactInternals;if(s===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=lh(s),e=e===null?null:e.stateNode,e},Mt.flushSync=function(e){return Fr(e)},Mt.hydrate=function(e,s,a){if(!Pa(s))throw Error(r(200));return Oa(null,e,s,!0,a)},Mt.hydrateRoot=function(e,s,a){if(!du(e))throw Error(r(405));var c=a!=null&&a.hydratedSources||null,h=!1,p="",y=Lp;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),s=Op(s,null,e,1,a??null,h,!1,p,y),e[An]=s.current,ki(e),c)for(e=0;e<c.length;e++)a=c[e],h=a._getVersion,h=h(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,h]:s.mutableSourceEagerHydrationData.push(a,h);return new Ra(s)},Mt.render=function(e,s,a){if(!Pa(s))throw Error(r(200));return Oa(null,e,s,!1,a)},Mt.unmountComponentAtNode=function(e){if(!Pa(e))throw Error(r(40));return e._reactRootContainer?(Fr(function(){Oa(null,null,e,!1,function(){e._reactRootContainer=null,e[An]=null})}),!0):!1},Mt.unstable_batchedUpdates=nu,Mt.unstable_renderSubtreeIntoContainer=function(e,s,a,c){if(!Pa(a))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Oa(e,s,a,!1,c)},Mt.version="18.3.1-next-f1338f8080-20240426",Mt}var Vp;function _x(){if(Vp)return mu.exports;Vp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),mu.exports=Vv(),mu.exports}var Qp;function Qv(){if(Qp)return Fa;Qp=1;var t=_x();return Fa.createRoot=t.createRoot,Fa.hydrateRoot=t.hydrateRoot,Fa}var Gv=Qv();const Yv=Ax(Gv),Kv=20,Jv=1e6,Un={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let yu=0;function Xv(){return yu=(yu+1)%Number.MAX_VALUE,yu.toString()}const vu=new Map,Gp=t=>{if(vu.has(t))return;const n=setTimeout(()=>{vu.delete(t),no({type:Un.REMOVE_TOAST,toastId:t})},Jv);vu.set(t,n)},Zv=(t,n)=>{switch(n.type){case Un.ADD_TOAST:return{...t,toasts:[n.toast,...t.toasts].slice(0,Kv)};case Un.UPDATE_TOAST:return{...t,toasts:t.toasts.map(r=>r.id===n.toast.id?{...r,...n.toast}:r)};case Un.DISMISS_TOAST:{const{toastId:r}=n;return r?Gp(r):t.toasts.forEach(o=>{Gp(o.id)}),{...t,toasts:t.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case Un.REMOVE_TOAST:return n.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==n.toastId)}}},Va=[];let Qa={toasts:[]};function no(t){Qa=Zv(Qa,t),Va.forEach(n=>{n(Qa)})}function eb({...t}){const n=Xv(),r=l=>no({type:Un.UPDATE_TOAST,toast:{...l,id:n}}),o=()=>no({type:Un.DISMISS_TOAST,toastId:n});return no({type:Un.ADD_TOAST,toast:{...t,id:n,open:!0,onOpenChange:l=>{l||o()}}}),{id:n,dismiss:o,update:r}}function tb(){const[t,n]=b.useState(Qa);return b.useEffect(()=>(Va.push(n),()=>{const r=Va.indexOf(n);r>-1&&Va.splice(r,1)}),[t]),{...t,toast:eb,dismiss:r=>no({type:Un.DISMISS_TOAST,toastId:r})}}function Tx(t){var n,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(n=0;n<l;n++)t[n]&&(r=Tx(t[n]))&&(o&&(o+=" "),o+=r)}else for(r in t)t[r]&&(o&&(o+=" "),o+=r);return o}function Dx(){for(var t,n,r=0,o="",l=arguments.length;r<l;r++)(t=arguments[r])&&(n=Tx(t))&&(o&&(o+=" "),o+=n);return o}const Yp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Kp=Dx,vd=(t,n)=>r=>{var o;if((n==null?void 0:n.variants)==null)return Kp(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:l,defaultVariants:u}=n,d=Object.keys(l).map(x=>{const g=r==null?void 0:r[x],v=u==null?void 0:u[x];if(g===null)return null;const w=Yp(g)||Yp(v);return l[x][w]}),f=r&&Object.entries(r).reduce((x,g)=>{let[v,w]=g;return w===void 0||(x[v]=w),x},{}),m=n==null||(o=n.compoundVariants)===null||o===void 0?void 0:o.reduce((x,g)=>{let{class:v,className:w,...A}=g;return Object.entries(A).every(D=>{let[k,j]=D;return Array.isArray(j)?j.includes({...u,...f}[k]):{...u,...f}[k]===j})?[...x,v,w]:x},[]);return Kp(t,d,m,r==null?void 0:r.class,r==null?void 0:r.className)};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nb=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rx=(...t)=>t.filter((n,r,o)=>!!n&&n.trim()!==""&&o.indexOf(n)===r).join(" ").trim();/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var rb={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sb=b.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:l="",children:u,iconNode:d,...f},m)=>b.createElement("svg",{ref:m,...rb,width:n,height:n,stroke:t,strokeWidth:o?Number(r)*24/Number(n):r,className:Rx("lucide",l),...f},[...d.map(([x,g])=>b.createElement(x,g)),...Array.isArray(u)?u:[u]]));/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ce=(t,n)=>{const r=b.forwardRef(({className:o,...l},u)=>b.createElement(sb,{ref:u,iconNode:n,className:Rx(`lucide-${nb(t)}`,o),...l}));return r.displayName=`${t}`,r};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ib=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ob=Ce("ArrowRight",ib);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ab=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],bd=Ce("BookOpen",ab);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lb=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],kr=Ce("CalendarDays",lb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cb=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Px=Ce("Camera",cb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ub=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ox=Ce("Check",ub);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const db=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ia=Ce("ChevronDown",db);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],mo=Ce("ChevronLeft",hb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ns=Ce("ChevronRight",fb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pb=[["path",{d:"M10 9h4",key:"u4k05v"}],["path",{d:"M12 7v5",key:"ma6bk"}],["path",{d:"M14 22v-4a2 2 0 0 0-4 0v4",key:"1pdhuj"}],["path",{d:"M18 22V5.618a1 1 0 0 0-.553-.894l-4.553-2.277a2 2 0 0 0-1.788 0L6.553 4.724A1 1 0 0 0 6 5.618V22",key:"1rkokr"}],["path",{d:"m18 7 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.618a1 1 0 0 1 .553-.894L6 7",key:"1w6esw"}]],mb=Ce("Church",pb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Zs=Ce("CircleCheckBig",xb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Mx=Ce("CircleX",gb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],ls=Ce("Clock",yb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vb=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Lx=Ce("Download",vb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bb=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],br=Ce("ExternalLink",bb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wb=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],jb=Ce("Eye",wb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nb=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],rs=Ce("Facebook",Nb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],kb=Ce("Grid3x3",Cb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sb=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],Cr=Ce("Heart",Sb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Eb=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Ab=Ce("House",Eb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _b=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Tb=Ce("Image",_b);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Db=[["path",{d:"M18 22H4a2 2 0 0 1-2-2V6",key:"pblm9e"}],["path",{d:"m22 13-1.296-1.296a2.41 2.41 0 0 0-3.408 0L11 18",key:"nf6bnh"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["rect",{width:"16",height:"16",x:"6",y:"2",rx:"2",key:"12espp"}]],Fx=Ce("Images",Db);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rb=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pb=Ce("Info",Rb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ob=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Ix=Ce("List",Ob);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mb=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],Lb=Ce("LogIn",Mb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fb=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Ht=Ce("Mail",Fb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ib=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],kn=Ce("MapPin",Ib);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bb=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],Bx=Ce("Menu",Bb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ub=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],nl=Ce("Newspaper",Ub);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zb=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],xo=Ce("Phone",zb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $b=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ux=Ce("RefreshCw",$b);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Jp=Ce("RotateCcw",Wb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qb=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],zx=Ce("Send",qb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hb=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Wr=Ce("Trash2",Hb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fu=Ce("TriangleAlert",Vb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qb=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],$x=Ce("Upload",Qb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],dl=Ce("Users",Gb);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cs=Ce("X",Yb),Kb=(t,n)=>{const r=new Array(t.length+n.length);for(let o=0;o<t.length;o++)r[o]=t[o];for(let o=0;o<n.length;o++)r[t.length+o]=n[o];return r},Jb=(t,n)=>({classGroupId:t,validator:n}),Wx=(t=new Map,n=null,r)=>({nextPart:t,validators:n,classGroupId:r}),rl="-",Xp=[],Xb="arbitrary..",Zb=t=>{const n=tw(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ew(d);const f=d.split(rl),m=f[0]===""&&f.length>1?1:0;return qx(f,m,n)},getConflictingClassGroupIds:(d,f)=>{if(f){const m=o[d],x=r[d];return m?x?Kb(x,m):m:x||Xp}return r[d]||Xp}}},qx=(t,n,r)=>{if(t.length-n===0)return r.classGroupId;const l=t[n],u=r.nextPart.get(l);if(u){const x=qx(t,n+1,u);if(x)return x}const d=r.validators;if(d===null)return;const f=n===0?t.join(rl):t.slice(n).join(rl),m=d.length;for(let x=0;x<m;x++){const g=d[x];if(g.validator(f))return g.classGroupId}},ew=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),r=n.indexOf(":"),o=n.slice(0,r);return o?Xb+o:void 0})(),tw=t=>{const{theme:n,classGroups:r}=t;return nw(r,n)},nw=(t,n)=>{const r=Wx();for(const o in t){const l=t[o];wd(l,r,o,n)}return r},wd=(t,n,r,o)=>{const l=t.length;for(let u=0;u<l;u++){const d=t[u];rw(d,n,r,o)}},rw=(t,n,r,o)=>{if(typeof t=="string"){sw(t,n,r);return}if(typeof t=="function"){iw(t,n,r,o);return}ow(t,n,r,o)},sw=(t,n,r)=>{const o=t===""?n:Hx(n,t);o.classGroupId=r},iw=(t,n,r,o)=>{if(aw(t)){wd(t(o),n,r,o);return}n.validators===null&&(n.validators=[]),n.validators.push(Jb(r,t))},ow=(t,n,r,o)=>{const l=Object.entries(t),u=l.length;for(let d=0;d<u;d++){const[f,m]=l[d];wd(m,Hx(n,f),r,o)}},Hx=(t,n)=>{let r=t;const o=n.split(rl),l=o.length;for(let u=0;u<l;u++){const d=o[u];let f=r.nextPart.get(d);f||(f=Wx(),r.nextPart.set(d,f)),r=f}return r},aw=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,lw=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),o=Object.create(null);const l=(u,d)=>{r[u]=d,n++,n>t&&(n=0,o=r,r=Object.create(null))};return{get(u){let d=r[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return l(u,d),d},set(u,d){u in r?r[u]=d:l(u,d)}}},Iu="!",Zp=":",cw=[],em=(t,n,r,o,l)=>({modifiers:t,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:o,isExternal:l}),uw=t=>{const{prefix:n,experimentalParseClassName:r}=t;let o=l=>{const u=[];let d=0,f=0,m=0,x;const g=l.length;for(let k=0;k<g;k++){const j=l[k];if(d===0&&f===0){if(j===Zp){u.push(l.slice(m,k)),m=k+1;continue}if(j==="/"){x=k;continue}}j==="["?d++:j==="]"?d--:j==="("?f++:j===")"&&f--}const v=u.length===0?l:l.slice(m);let w=v,A=!1;v.endsWith(Iu)?(w=v.slice(0,-1),A=!0):v.startsWith(Iu)&&(w=v.slice(1),A=!0);const D=x&&x>m?x-m:void 0;return em(u,A,w,D)};if(n){const l=n+Zp,u=o;o=d=>d.startsWith(l)?u(d.slice(l.length)):em(cw,!1,d,void 0,!0)}if(r){const l=o;o=u=>r({className:u,parseClassName:l})}return o},dw=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((r,o)=>{n.set(r,1e6+o)}),r=>{const o=[];let l=[];for(let u=0;u<r.length;u++){const d=r[u],f=d[0]==="[",m=n.has(d);f||m?(l.length>0&&(l.sort(),o.push(...l),l=[]),o.push(d)):l.push(d)}return l.length>0&&(l.sort(),o.push(...l)),o}},hw=t=>({cache:lw(t.cacheSize),parseClassName:uw(t),sortModifiers:dw(t),...Zb(t)}),fw=/\s+/,pw=(t,n)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:l,sortModifiers:u}=n,d=[],f=t.trim().split(fw);let m="";for(let x=f.length-1;x>=0;x-=1){const g=f[x],{isExternal:v,modifiers:w,hasImportantModifier:A,baseClassName:D,maybePostfixModifierPosition:k}=r(g);if(v){m=g+(m.length>0?" "+m:m);continue}let j=!!k,_=o(j?D.substring(0,k):D);if(!_){if(!j){m=g+(m.length>0?" "+m:m);continue}if(_=o(D),!_){m=g+(m.length>0?" "+m:m);continue}j=!1}const I=w.length===0?"":w.length===1?w[0]:u(w).join(":"),N=A?I+Iu:I,S=N+_;if(d.indexOf(S)>-1)continue;d.push(S);const B=l(_,j);for(let H=0;H<B.length;++H){const Z=B[H];d.push(N+Z)}m=g+(m.length>0?" "+m:m)}return m},mw=(...t)=>{let n=0,r,o,l="";for(;n<t.length;)(r=t[n++])&&(o=Vx(r))&&(l&&(l+=" "),l+=o);return l},Vx=t=>{if(typeof t=="string")return t;let n,r="";for(let o=0;o<t.length;o++)t[o]&&(n=Vx(t[o]))&&(r&&(r+=" "),r+=n);return r},xw=(t,...n)=>{let r,o,l,u;const d=m=>{const x=n.reduce((g,v)=>v(g),t());return r=hw(x),o=r.cache.get,l=r.cache.set,u=f,f(m)},f=m=>{const x=o(m);if(x)return x;const g=pw(m,r);return l(m,g),g};return u=d,(...m)=>u(mw(...m))},gw=[],at=t=>{const n=r=>r[t]||gw;return n.isThemeGetter=!0,n},Qx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bw=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ww=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ar=t=>yw.test(t),we=t=>!!t&&!Number.isNaN(Number(t)),lr=t=>!!t&&Number.isInteger(Number(t)),bu=t=>t.endsWith("%")&&we(t.slice(0,-1)),Ln=t=>vw.test(t),Yx=()=>!0,Cw=t=>bw.test(t)&&!ww.test(t),jd=()=>!1,kw=t=>jw.test(t),Sw=t=>Nw.test(t),Ew=t=>!te(t)&&!ne(t),Aw=t=>Sr(t,Xx,jd),te=t=>Qx.test(t),zr=t=>Sr(t,Zx,Cw),tm=t=>Sr(t,Lw,we),_w=t=>Sr(t,tg,Yx),Tw=t=>Sr(t,eg,jd),nm=t=>Sr(t,Kx,jd),Dw=t=>Sr(t,Jx,Sw),Ba=t=>Sr(t,ng,kw),ne=t=>Gx.test(t),qi=t=>us(t,Zx),Rw=t=>us(t,eg),rm=t=>us(t,Kx),Pw=t=>us(t,Xx),Ow=t=>us(t,Jx),Ua=t=>us(t,ng,!0),Mw=t=>us(t,tg,!0),Sr=(t,n,r)=>{const o=Qx.exec(t);return o?o[1]?n(o[1]):r(o[2]):!1},us=(t,n,r=!1)=>{const o=Gx.exec(t);return o?o[1]?n(o[1]):r:!1},Kx=t=>t==="position"||t==="percentage",Jx=t=>t==="image"||t==="url",Xx=t=>t==="length"||t==="size"||t==="bg-size",Zx=t=>t==="length",Lw=t=>t==="number",eg=t=>t==="family-name",tg=t=>t==="number"||t==="weight",ng=t=>t==="shadow",Fw=()=>{const t=at("color"),n=at("font"),r=at("text"),o=at("font-weight"),l=at("tracking"),u=at("leading"),d=at("breakpoint"),f=at("container"),m=at("spacing"),x=at("radius"),g=at("shadow"),v=at("inset-shadow"),w=at("text-shadow"),A=at("drop-shadow"),D=at("blur"),k=at("perspective"),j=at("aspect"),_=at("ease"),I=at("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...S(),ne,te],H=()=>["auto","hidden","clip","visible","scroll"],Z=()=>["auto","contain","none"],$=()=>[ne,te,m],le=()=>[ar,"full","auto",...$()],ve=()=>[lr,"none","subgrid",ne,te],fe=()=>["auto",{span:["full",lr,ne,te]},lr,ne,te],Me=()=>[lr,"auto",ne,te],Ke=()=>["auto","min","max","fr",ne,te],Oe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ze=()=>["start","end","center","stretch","center-safe","end-safe"],De=()=>["auto",...$()],Re=()=>[ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],G=()=>[ar,"screen","full","dvw","lvw","svw","min","max","fit",...$()],ae=()=>[ar,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],U=()=>[t,ne,te],P=()=>[...S(),rm,nm,{position:[ne,te]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ge=()=>["auto","cover","contain",Pw,Aw,{size:[ne,te]}],J=()=>[bu,qi,zr],oe=()=>["","none","full",x,ne,te],he=()=>["",we,qi,zr],Ae=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[we,bu,rm,nm],$e=()=>["","none",D,ne,te],pe=()=>["none",we,ne,te],lt=()=>["none",we,ne,te],kt=()=>[we,ne,te],Ut=()=>[ar,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ln],breakpoint:[Ln],color:[Yx],container:[Ln],"drop-shadow":[Ln],ease:["in","out","in-out"],font:[Ew],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ln],shadow:[Ln],spacing:["px",we],text:[Ln],"text-shadow":[Ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ar,te,ne,j]}],container:["container"],columns:[{columns:[we,te,ne,f]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:B()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:Z()}],"overscroll-x":[{"overscroll-x":Z()}],"overscroll-y":[{"overscroll-y":Z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{"inset-s":le(),start:le()}],end:[{"inset-e":le(),end:le()}],"inset-bs":[{"inset-bs":le()}],"inset-be":[{"inset-be":le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[lr,"auto",ne,te]}],basis:[{basis:[ar,"full","auto",f,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,ar,"auto","initial","none",te]}],grow:[{grow:["",we,ne,te]}],shrink:[{shrink:["",we,ne,te]}],order:[{order:[lr,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":ve()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":Me()}],"col-end":[{"col-end":Me()}],"grid-rows":[{"grid-rows":ve()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":Me()}],"row-end":[{"row-end":Me()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ke()}],"auto-rows":[{"auto-rows":Ke()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...Oe(),"normal"]}],"justify-items":[{"justify-items":[...ze(),"normal"]}],"justify-self":[{"justify-self":["auto",...ze()]}],"align-content":[{content:["normal",...Oe()]}],"align-items":[{items:[...ze(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ze(),{baseline:["","last"]}]}],"place-content":[{"place-content":Oe()}],"place-items":[{"place-items":[...ze(),"baseline"]}],"place-self":[{"place-self":["auto",...ze()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:De()}],mx:[{mx:De()}],my:[{my:De()}],ms:[{ms:De()}],me:[{me:De()}],mbs:[{mbs:De()}],mbe:[{mbe:De()}],mt:[{mt:De()}],mr:[{mr:De()}],mb:[{mb:De()}],ml:[{ml:De()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:Re()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[f,"screen",...Re()]}],"min-w":[{"min-w":[f,"screen","none",...Re()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[d]},...Re()]}],h:[{h:["screen","lh",...Re()]}],"min-h":[{"min-h":["screen","lh","none",...Re()]}],"max-h":[{"max-h":["screen","lh",...Re()]}],"font-size":[{text:["base",r,qi,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,Mw,_w]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bu,te]}],"font-family":[{font:[Rw,Tw,n]}],"font-features":[{"font-features":[te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,ne,te]}],"line-clamp":[{"line-clamp":[we,"none",ne,tm]}],leading:[{leading:[u,...$()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",ne,zr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[we,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ge()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},lr,ne,te],radial:["",ne,te],conic:[lr,ne,te]},Ow,Dw]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ae(),"hidden","none"]}],"divide-style":[{divide:[...Ae(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...Ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[we,ne,te]}],"outline-w":[{outline:["",we,qi,zr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",g,Ua,Ba]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,Ua,Ba]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[we,zr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",w,Ua,Ba]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[we,ne,te]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ge()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:$e()}],brightness:[{brightness:[we,ne,te]}],contrast:[{contrast:[we,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",A,Ua,Ba]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",we,ne,te]}],"hue-rotate":[{"hue-rotate":[we,ne,te]}],invert:[{invert:["",we,ne,te]}],saturate:[{saturate:[we,ne,te]}],sepia:[{sepia:["",we,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":$e()}],"backdrop-brightness":[{"backdrop-brightness":[we,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[we,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",we,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[we,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[we,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",we,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",ne,te]}],ease:[{ease:["linear","initial",_,ne,te]}],delay:[{delay:[we,ne,te]}],animate:[{animate:["none",I,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ne,te]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:kt()}],"skew-x":[{"skew-x":kt()}],"skew-y":[{"skew-y":kt()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,te]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[we,qi,zr,tm]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Iw=xw(Fw);function hn(...t){return Iw(Dx(t))}const rg=b.forwardRef(({...t},n)=>i.jsx("div",{ref:n,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...t}));rg.displayName="ToastProvider";const sg=b.forwardRef(({...t},n)=>i.jsx("div",{ref:n,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...t}));sg.displayName="ToastViewport";const Bw=vd("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),ig=b.forwardRef(({className:t,variant:n,...r},o)=>i.jsx("div",{ref:o,className:hn(Bw({variant:n}),t),...r}));ig.displayName="Toast";const Uw=b.forwardRef(({className:t,...n},r)=>i.jsx("div",{ref:r,className:hn("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...n}));Uw.displayName="ToastAction";const og=b.forwardRef(({className:t,...n},r)=>i.jsx("button",{ref:r,className:hn("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...n,children:i.jsx(cs,{className:"h-4 w-4"})}));og.displayName="ToastClose";const ag=b.forwardRef(({className:t,...n},r)=>i.jsx("div",{ref:r,className:hn("text-sm font-semibold",t),...n}));ag.displayName="ToastTitle";const lg=b.forwardRef(({className:t,...n},r)=>i.jsx("div",{ref:r,className:hn("text-sm opacity-90",t),...n}));lg.displayName="ToastDescription";function zw(){const{toasts:t}=tb();return i.jsxs(rg,{children:[t.map(function({id:n,title:r,description:o,action:l,...u}){return i.jsxs(ig,{...u,children:[i.jsxs("div",{className:"grid gap-1",children:[r&&i.jsx(ag,{children:r}),o&&i.jsx(lg,{children:o})]}),l,i.jsx(og,{})]},n)}),i.jsx(sg,{})]})}var go=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},$w={setTimeout:(t,n)=>setTimeout(t,n),clearTimeout:t=>clearTimeout(t),setInterval:(t,n)=>setInterval(t,n),clearInterval:t=>clearInterval(t)},dr,xd,yx,Ww=(yx=class{constructor(){de(this,dr,$w);de(this,xd,!1)}setTimeoutProvider(t){K(this,dr,t)}setTimeout(t,n){return T(this,dr).setTimeout(t,n)}clearTimeout(t){T(this,dr).clearTimeout(t)}setInterval(t,n){return T(this,dr).setInterval(t,n)}clearInterval(t){T(this,dr).clearInterval(t)}},dr=new WeakMap,xd=new WeakMap,yx),qr=new Ww;function qw(t){setTimeout(t,0)}var ss=typeof window>"u"||"Deno"in globalThis;function It(){}function Hw(t,n){return typeof t=="function"?t(n):t}function Bu(t){return typeof t=="number"&&t>=0&&t!==1/0}function cg(t,n){return Math.max(t+(n||0)-Date.now(),0)}function wr(t,n){return typeof t=="function"?t(n):t}function Zt(t,n){return typeof t=="function"?t(n):t}function sm(t,n){const{type:r="all",exact:o,fetchStatus:l,predicate:u,queryKey:d,stale:f}=t;if(d){if(o){if(n.queryHash!==Nd(d,n.options))return!1}else if(!io(n.queryKey,d))return!1}if(r!=="all"){const m=n.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||l&&l!==n.state.fetchStatus||u&&!u(n))}function im(t,n){const{exact:r,status:o,predicate:l,mutationKey:u}=t;if(u){if(!n.options.mutationKey)return!1;if(r){if(so(n.options.mutationKey)!==so(u))return!1}else if(!io(n.options.mutationKey,u))return!1}return!(o&&n.state.status!==o||l&&!l(n))}function Nd(t,n){return((n==null?void 0:n.queryKeyHashFn)||so)(t)}function so(t){return JSON.stringify(t,(n,r)=>zu(r)?Object.keys(r).sort().reduce((o,l)=>(o[l]=r[l],o),{}):r)}function io(t,n){return t===n?!0:typeof t!=typeof n?!1:t&&n&&typeof t=="object"&&typeof n=="object"?Object.keys(n).every(r=>io(t[r],n[r])):!1}var Vw=Object.prototype.hasOwnProperty;function ug(t,n,r=0){if(t===n)return t;if(r>500)return n;const o=om(t)&&om(n);if(!o&&!(zu(t)&&zu(n)))return n;const u=(o?t:Object.keys(t)).length,d=o?n:Object.keys(n),f=d.length,m=o?new Array(f):{};let x=0;for(let g=0;g<f;g++){const v=o?g:d[g],w=t[v],A=n[v];if(w===A){m[v]=w,(o?g<u:Vw.call(t,v))&&x++;continue}if(w===null||A===null||typeof w!="object"||typeof A!="object"){m[v]=A;continue}const D=ug(w,A,r+1);m[v]=D,D===w&&x++}return u===f&&x===u?t:m}function Uu(t,n){if(!n||Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}function om(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zu(t){if(!am(t))return!1;const n=t.constructor;if(n===void 0)return!0;const r=n.prototype;return!(!am(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function am(t){return Object.prototype.toString.call(t)==="[object Object]"}function Qw(t){return new Promise(n=>{qr.setTimeout(n,t)})}function $u(t,n,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,n):r.structuralSharing!==!1?ug(t,n):n}function Gw(t,n,r=0){const o=[...t,n];return r&&o.length>r?o.slice(1):o}function Yw(t,n,r=0){const o=[n,...t];return r&&o.length>r?o.slice(0,-1):o}var Cd=Symbol();function dg(t,n){return!t.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!t.queryFn||t.queryFn===Cd?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function hg(t,n){return typeof t=="function"?t(...n):!!t}function Kw(t,n,r){let o=!1,l;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(l??(l=n()),o||(o=!0,l.aborted?r():l.addEventListener("abort",r,{once:!0})),l)}),t}var Vr,hr,Us,vx,Jw=(vx=class extends go{constructor(){super();de(this,Vr);de(this,hr);de(this,Us);K(this,Us,n=>{if(!ss&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){T(this,hr)||this.setEventListener(T(this,Us))}onUnsubscribe(){var n;this.hasListeners()||((n=T(this,hr))==null||n.call(this),K(this,hr,void 0))}setEventListener(n){var r;K(this,Us,n),(r=T(this,hr))==null||r.call(this),K(this,hr,n(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(n){T(this,Vr)!==n&&(K(this,Vr,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){var n;return typeof T(this,Vr)=="boolean"?T(this,Vr):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Vr=new WeakMap,hr=new WeakMap,Us=new WeakMap,vx),kd=new Jw;function Wu(){let t,n;const r=new Promise((l,u)=>{t=l,n=u});r.status="pending",r.catch(()=>{});function o(l){Object.assign(r,l),delete r.resolve,delete r.reject}return r.resolve=l=>{o({status:"fulfilled",value:l}),t(l)},r.reject=l=>{o({status:"rejected",reason:l}),n(l)},r}var Xw=qw;function Zw(){let t=[],n=0,r=f=>{f()},o=f=>{f()},l=Xw;const u=f=>{n?t.push(f):l(()=>{r(f)})},d=()=>{const f=t;t=[],f.length&&l(()=>{o(()=>{f.forEach(m=>{r(m)})})})};return{batch:f=>{let m;n++;try{m=f()}finally{n--,n||d()}return m},batchCalls:f=>(...m)=>{u(()=>{f(...m)})},schedule:u,setNotifyFunction:f=>{r=f},setBatchNotifyFunction:f=>{o=f},setScheduler:f=>{l=f}}}var gt=Zw(),zs,fr,$s,bx,e1=(bx=class extends go{constructor(){super();de(this,zs,!0);de(this,fr);de(this,$s);K(this,$s,n=>{if(!ss&&window.addEventListener){const r=()=>n(!0),o=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){T(this,fr)||this.setEventListener(T(this,$s))}onUnsubscribe(){var n;this.hasListeners()||((n=T(this,fr))==null||n.call(this),K(this,fr,void 0))}setEventListener(n){var r;K(this,$s,n),(r=T(this,fr))==null||r.call(this),K(this,fr,n(this.setOnline.bind(this)))}setOnline(n){T(this,zs)!==n&&(K(this,zs,n),this.listeners.forEach(o=>{o(n)}))}isOnline(){return T(this,zs)}},zs=new WeakMap,fr=new WeakMap,$s=new WeakMap,bx),sl=new e1;function t1(t){return Math.min(1e3*2**t,3e4)}function fg(t){return(t??"online")==="online"?sl.isOnline():!0}var qu=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function pg(t){let n=!1,r=0,o;const l=Wu(),u=()=>l.status!=="pending",d=k=>{var j;if(!u()){const _=new qu(k);w(_),(j=t.onCancel)==null||j.call(t,_)}},f=()=>{n=!0},m=()=>{n=!1},x=()=>kd.isFocused()&&(t.networkMode==="always"||sl.isOnline())&&t.canRun(),g=()=>fg(t.networkMode)&&t.canRun(),v=k=>{u()||(o==null||o(),l.resolve(k))},w=k=>{u()||(o==null||o(),l.reject(k))},A=()=>new Promise(k=>{var j;o=_=>{(u()||x())&&k(_)},(j=t.onPause)==null||j.call(t)}).then(()=>{var k;o=void 0,u()||(k=t.onContinue)==null||k.call(t)}),D=()=>{if(u())return;let k;const j=r===0?t.initialPromise:void 0;try{k=j??t.fn()}catch(_){k=Promise.reject(_)}Promise.resolve(k).then(v).catch(_=>{var H;if(u())return;const I=t.retry??(ss?0:3),N=t.retryDelay??t1,S=typeof N=="function"?N(r,_):N,B=I===!0||typeof I=="number"&&r<I||typeof I=="function"&&I(r,_);if(n||!B){w(_);return}r++,(H=t.onFail)==null||H.call(t,r,_),Qw(S).then(()=>x()?void 0:A()).then(()=>{n?w(_):D()})})};return{promise:l,status:()=>l.status,cancel:d,continue:()=>(o==null||o(),l),cancelRetry:f,continueRetry:m,canStart:g,start:()=>(g()?D():A().then(D),l)}}var Qr,wx,mg=(wx=class{constructor(){de(this,Qr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Bu(this.gcTime)&&K(this,Qr,qr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ss?1/0:300*1e3))}clearGcTimeout(){T(this,Qr)&&(qr.clearTimeout(T(this,Qr)),K(this,Qr,void 0))}},Qr=new WeakMap,wx),Gr,Ws,Xt,Yr,ht,co,Kr,cn,Fn,jx,n1=(jx=class extends mg{constructor(n){super();de(this,cn);de(this,Gr);de(this,Ws);de(this,Xt);de(this,Yr);de(this,ht);de(this,co);de(this,Kr);K(this,Kr,!1),K(this,co,n.defaultOptions),this.setOptions(n.options),this.observers=[],K(this,Yr,n.client),K(this,Xt,T(this,Yr).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,K(this,Gr,cm(this.options)),this.state=n.state??T(this,Gr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=T(this,ht))==null?void 0:n.promise}setOptions(n){if(this.options={...T(this,co),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=cm(this.options);r.data!==void 0&&(this.setState(lm(r.data,r.dataUpdatedAt)),K(this,Gr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Xt).remove(this)}setData(n,r){const o=$u(this.state.data,n,this.options);return ke(this,cn,Fn).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(n,r){ke(this,cn,Fn).call(this,{type:"setState",state:n,setStateOptions:r})}cancel(n){var o,l;const r=(o=T(this,ht))==null?void 0:o.promise;return(l=T(this,ht))==null||l.cancel(n),r?r.then(It).catch(It):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(T(this,Gr))}isActive(){return this.observers.some(n=>Zt(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>wr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!cg(this.state.dataUpdatedAt,n)}onFocus(){var r;const n=this.observers.find(o=>o.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(r=T(this,ht))==null||r.continue()}onOnline(){var r;const n=this.observers.find(o=>o.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(r=T(this,ht))==null||r.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),T(this,Xt).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(T(this,ht)&&(T(this,Kr)?T(this,ht).cancel({revert:!0}):T(this,ht).cancelRetry()),this.scheduleGc()),T(this,Xt).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ke(this,cn,Fn).call(this,{type:"invalidate"})}async fetch(n,r){var m,x,g,v,w,A,D,k,j,_,I,N;if(this.state.fetchStatus!=="idle"&&((m=T(this,ht))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(T(this,ht))return T(this,ht).continueRetry(),T(this,ht).promise}if(n&&this.setOptions(n),!this.options.queryFn){const S=this.observers.find(B=>B.options.queryFn);S&&this.setOptions(S.options)}const o=new AbortController,l=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(K(this,Kr,!0),o.signal)})},u=()=>{const S=dg(this.options,r),H=(()=>{const Z={client:T(this,Yr),queryKey:this.queryKey,meta:this.meta};return l(Z),Z})();return K(this,Kr,!1),this.options.persister?this.options.persister(S,H,this):S(H)},f=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:T(this,Yr),state:this.state,fetchFn:u};return l(S),S})();(x=this.options.behavior)==null||x.onFetch(f,this),K(this,Ws,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=f.fetchOptions)==null?void 0:g.meta))&&ke(this,cn,Fn).call(this,{type:"fetch",meta:(v=f.fetchOptions)==null?void 0:v.meta}),K(this,ht,pg({initialPromise:r==null?void 0:r.initialPromise,fn:f.fetchFn,onCancel:S=>{S instanceof qu&&S.revert&&this.setState({...T(this,Ws),fetchStatus:"idle"}),o.abort()},onFail:(S,B)=>{ke(this,cn,Fn).call(this,{type:"failed",failureCount:S,error:B})},onPause:()=>{ke(this,cn,Fn).call(this,{type:"pause"})},onContinue:()=>{ke(this,cn,Fn).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const S=await T(this,ht).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(A=(w=T(this,Xt).config).onSuccess)==null||A.call(w,S,this),(k=(D=T(this,Xt).config).onSettled)==null||k.call(D,S,this.state.error,this),S}catch(S){if(S instanceof qu){if(S.silent)return T(this,ht).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw ke(this,cn,Fn).call(this,{type:"error",error:S}),(_=(j=T(this,Xt).config).onError)==null||_.call(j,S,this),(N=(I=T(this,Xt).config).onSettled)==null||N.call(I,this.state.data,S,this),S}finally{this.scheduleGc()}}},Gr=new WeakMap,Ws=new WeakMap,Xt=new WeakMap,Yr=new WeakMap,ht=new WeakMap,co=new WeakMap,Kr=new WeakMap,cn=new WeakSet,Fn=function(n){const r=o=>{switch(n.type){case"failed":return{...o,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...xg(o.data,this.options),fetchMeta:n.meta??null};case"success":const l={...o,...lm(n.data,n.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,Ws,n.manual?l:void 0),l;case"error":const u=n.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...n.state}}};this.state=r(this.state),gt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),T(this,Xt).notify({query:this,type:"updated",action:n})})},jx);function xg(t,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fg(n.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function lm(t,n){return{data:t,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cm(t){const n=typeof t.initialData=="function"?t.initialData():t.initialData,r=n!==void 0,o=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ft,Se,uo,At,Jr,qs,In,pr,ho,Hs,Vs,Xr,Zr,mr,Qs,Le,Ji,Hu,Vu,Qu,Gu,Yu,Ku,Ju,gg,Nx,r1=(Nx=class extends go{constructor(n,r){super();de(this,Le);de(this,Ft);de(this,Se);de(this,uo);de(this,At);de(this,Jr);de(this,qs);de(this,In);de(this,pr);de(this,ho);de(this,Hs);de(this,Vs);de(this,Xr);de(this,Zr);de(this,mr);de(this,Qs,new Set);this.options=r,K(this,Ft,n),K(this,pr,null),K(this,In,Wu()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Se).addObserver(this),um(T(this,Se),this.options)?ke(this,Le,Ji).call(this):this.updateResult(),ke(this,Le,Gu).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xu(T(this,Se),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xu(T(this,Se),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ke(this,Le,Yu).call(this),ke(this,Le,Ku).call(this),T(this,Se).removeObserver(this)}setOptions(n){const r=this.options,o=T(this,Se);if(this.options=T(this,Ft).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Zt(this.options.enabled,T(this,Se))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ke(this,Le,Ju).call(this),T(this,Se).setOptions(this.options),r._defaulted&&!Uu(this.options,r)&&T(this,Ft).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Se),observer:this});const l=this.hasListeners();l&&dm(T(this,Se),o,this.options,r)&&ke(this,Le,Ji).call(this),this.updateResult(),l&&(T(this,Se)!==o||Zt(this.options.enabled,T(this,Se))!==Zt(r.enabled,T(this,Se))||wr(this.options.staleTime,T(this,Se))!==wr(r.staleTime,T(this,Se)))&&ke(this,Le,Hu).call(this);const u=ke(this,Le,Vu).call(this);l&&(T(this,Se)!==o||Zt(this.options.enabled,T(this,Se))!==Zt(r.enabled,T(this,Se))||u!==T(this,mr))&&ke(this,Le,Qu).call(this,u)}getOptimisticResult(n){const r=T(this,Ft).getQueryCache().build(T(this,Ft),n),o=this.createResult(r,n);return i1(this,o)&&(K(this,At,o),K(this,qs,this.options),K(this,Jr,T(this,Se).state)),o}getCurrentResult(){return T(this,At)}trackResult(n,r){return new Proxy(n,{get:(o,l)=>(this.trackProp(l),r==null||r(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&T(this,In).status==="pending"&&T(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,l))})}trackProp(n){T(this,Qs).add(n)}getCurrentQuery(){return T(this,Se)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=T(this,Ft).defaultQueryOptions(n),o=T(this,Ft).getQueryCache().build(T(this,Ft),r);return o.fetch().then(()=>this.createResult(o,r))}fetch(n){return ke(this,Le,Ji).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,At)))}createResult(n,r){var le;const o=T(this,Se),l=this.options,u=T(this,At),d=T(this,Jr),f=T(this,qs),x=n!==o?n.state:T(this,uo),{state:g}=n;let v={...g},w=!1,A;if(r._optimisticResults){const ve=this.hasListeners(),fe=!ve&&um(n,r),Me=ve&&dm(n,o,r,l);(fe||Me)&&(v={...v,...xg(g.data,n.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:D,errorUpdatedAt:k,status:j}=v;A=v.data;let _=!1;if(r.placeholderData!==void 0&&A===void 0&&j==="pending"){let ve;u!=null&&u.isPlaceholderData&&r.placeholderData===(f==null?void 0:f.placeholderData)?(ve=u.data,_=!0):ve=typeof r.placeholderData=="function"?r.placeholderData((le=T(this,Vs))==null?void 0:le.state.data,T(this,Vs)):r.placeholderData,ve!==void 0&&(j="success",A=$u(u==null?void 0:u.data,ve,r),w=!0)}if(r.select&&A!==void 0&&!_)if(u&&A===(d==null?void 0:d.data)&&r.select===T(this,ho))A=T(this,Hs);else try{K(this,ho,r.select),A=r.select(A),A=$u(u==null?void 0:u.data,A,r),K(this,Hs,A),K(this,pr,null)}catch(ve){K(this,pr,ve)}T(this,pr)&&(D=T(this,pr),A=T(this,Hs),k=Date.now(),j="error");const I=v.fetchStatus==="fetching",N=j==="pending",S=j==="error",B=N&&I,H=A!==void 0,$={status:j,fetchStatus:v.fetchStatus,isPending:N,isSuccess:j==="success",isError:S,isInitialLoading:B,isLoading:B,data:A,dataUpdatedAt:v.dataUpdatedAt,error:D,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>x.dataUpdateCount||v.errorUpdateCount>x.errorUpdateCount,isFetching:I,isRefetching:I&&!N,isLoadingError:S&&!H,isPaused:v.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:S&&H,isStale:Sd(n,r),refetch:this.refetch,promise:T(this,In),isEnabled:Zt(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const ve=$.data!==void 0,fe=$.status==="error"&&!ve,Me=ze=>{fe?ze.reject($.error):ve&&ze.resolve($.data)},Ke=()=>{const ze=K(this,In,$.promise=Wu());Me(ze)},Oe=T(this,In);switch(Oe.status){case"pending":n.queryHash===o.queryHash&&Me(Oe);break;case"fulfilled":(fe||$.data!==Oe.value)&&Ke();break;case"rejected":(!fe||$.error!==Oe.reason)&&Ke();break}}return $}updateResult(){const n=T(this,At),r=this.createResult(T(this,Se),this.options);if(K(this,Jr,T(this,Se).state),K(this,qs,this.options),T(this,Jr).data!==void 0&&K(this,Vs,T(this,Se)),Uu(r,n))return;K(this,At,r);const o=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!T(this,Qs).size)return!0;const d=new Set(u??T(this,Qs));return this.options.throwOnError&&d.add("error"),Object.keys(T(this,At)).some(f=>{const m=f;return T(this,At)[m]!==n[m]&&d.has(m)})};ke(this,Le,gg).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ke(this,Le,Gu).call(this)}},Ft=new WeakMap,Se=new WeakMap,uo=new WeakMap,At=new WeakMap,Jr=new WeakMap,qs=new WeakMap,In=new WeakMap,pr=new WeakMap,ho=new WeakMap,Hs=new WeakMap,Vs=new WeakMap,Xr=new WeakMap,Zr=new WeakMap,mr=new WeakMap,Qs=new WeakMap,Le=new WeakSet,Ji=function(n){ke(this,Le,Ju).call(this);let r=T(this,Se).fetch(this.options,n);return n!=null&&n.throwOnError||(r=r.catch(It)),r},Hu=function(){ke(this,Le,Yu).call(this);const n=wr(this.options.staleTime,T(this,Se));if(ss||T(this,At).isStale||!Bu(n))return;const o=cg(T(this,At).dataUpdatedAt,n)+1;K(this,Xr,qr.setTimeout(()=>{T(this,At).isStale||this.updateResult()},o))},Vu=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Se)):this.options.refetchInterval)??!1},Qu=function(n){ke(this,Le,Ku).call(this),K(this,mr,n),!(ss||Zt(this.options.enabled,T(this,Se))===!1||!Bu(T(this,mr))||T(this,mr)===0)&&K(this,Zr,qr.setInterval(()=>{(this.options.refetchIntervalInBackground||kd.isFocused())&&ke(this,Le,Ji).call(this)},T(this,mr)))},Gu=function(){ke(this,Le,Hu).call(this),ke(this,Le,Qu).call(this,ke(this,Le,Vu).call(this))},Yu=function(){T(this,Xr)&&(qr.clearTimeout(T(this,Xr)),K(this,Xr,void 0))},Ku=function(){T(this,Zr)&&(qr.clearInterval(T(this,Zr)),K(this,Zr,void 0))},Ju=function(){const n=T(this,Ft).getQueryCache().build(T(this,Ft),this.options);if(n===T(this,Se))return;const r=T(this,Se);K(this,Se,n),K(this,uo,n.state),this.hasListeners()&&(r==null||r.removeObserver(this),n.addObserver(this))},gg=function(n){gt.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(T(this,At))}),T(this,Ft).getQueryCache().notify({query:T(this,Se),type:"observerResultsUpdated"})})},Nx);function s1(t,n){return Zt(n.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&n.retryOnMount===!1)}function um(t,n){return s1(t,n)||t.state.data!==void 0&&Xu(t,n,n.refetchOnMount)}function Xu(t,n,r){if(Zt(n.enabled,t)!==!1&&wr(n.staleTime,t)!=="static"){const o=typeof r=="function"?r(t):r;return o==="always"||o!==!1&&Sd(t,n)}return!1}function dm(t,n,r,o){return(t!==n||Zt(o.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Sd(t,r)}function Sd(t,n){return Zt(n.enabled,t)!==!1&&t.isStaleByTime(wr(n.staleTime,t))}function i1(t,n){return!Uu(t.getCurrentResult(),n)}function hm(t){return{onFetch:(n,r)=>{var g,v,w,A,D;const o=n.options,l=(w=(v=(g=n.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:w.direction,u=((A=n.state.data)==null?void 0:A.pages)||[],d=((D=n.state.data)==null?void 0:D.pageParams)||[];let f={pages:[],pageParams:[]},m=0;const x=async()=>{let k=!1;const j=N=>{Kw(N,()=>n.signal,()=>k=!0)},_=dg(n.options,n.fetchOptions),I=async(N,S,B)=>{if(k)return Promise.reject();if(S==null&&N.pages.length)return Promise.resolve(N);const Z=(()=>{const fe={client:n.client,queryKey:n.queryKey,pageParam:S,direction:B?"backward":"forward",meta:n.options.meta};return j(fe),fe})(),$=await _(Z),{maxPages:le}=n.options,ve=B?Yw:Gw;return{pages:ve(N.pages,$,le),pageParams:ve(N.pageParams,S,le)}};if(l&&u.length){const N=l==="backward",S=N?o1:fm,B={pages:u,pageParams:d},H=S(o,B);f=await I(B,H,N)}else{const N=t??u.length;do{const S=m===0?d[0]??o.initialPageParam:fm(o,f);if(m>0&&S==null)break;f=await I(f,S),m++}while(m<N)}return f};n.options.persister?n.fetchFn=()=>{var k,j;return(j=(k=n.options).persister)==null?void 0:j.call(k,x,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},r)}:n.fetchFn=x}}}function fm(t,{pages:n,pageParams:r}){const o=n.length-1;return n.length>0?t.getNextPageParam(n[o],n,r[o],r):void 0}function o1(t,{pages:n,pageParams:r}){var o;return n.length>0?(o=t.getPreviousPageParam)==null?void 0:o.call(t,n[0],n,r[0],r):void 0}var fo,wn,Nt,es,jn,ur,Cx,a1=(Cx=class extends mg{constructor(n){super();de(this,jn);de(this,fo);de(this,wn);de(this,Nt);de(this,es);K(this,fo,n.client),this.mutationId=n.mutationId,K(this,Nt,n.mutationCache),K(this,wn,[]),this.state=n.state||l1(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){T(this,wn).includes(n)||(T(this,wn).push(n),this.clearGcTimeout(),T(this,Nt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){K(this,wn,T(this,wn).filter(r=>r!==n)),this.scheduleGc(),T(this,Nt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){T(this,wn).length||(this.state.status==="pending"?this.scheduleGc():T(this,Nt).remove(this))}continue(){var n;return((n=T(this,es))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var d,f,m,x,g,v,w,A,D,k,j,_,I,N,S,B,H,Z;const r=()=>{ke(this,jn,ur).call(this,{type:"continue"})},o={client:T(this,fo),meta:this.options.meta,mutationKey:this.options.mutationKey};K(this,es,pg({fn:()=>this.options.mutationFn?this.options.mutationFn(n,o):Promise.reject(new Error("No mutationFn found")),onFail:($,le)=>{ke(this,jn,ur).call(this,{type:"failed",failureCount:$,error:le})},onPause:()=>{ke(this,jn,ur).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,Nt).canRun(this)}));const l=this.state.status==="pending",u=!T(this,es).canStart();try{if(l)r();else{ke(this,jn,ur).call(this,{type:"pending",variables:n,isPaused:u}),T(this,Nt).config.onMutate&&await T(this,Nt).config.onMutate(n,this,o);const le=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,n,o));le!==this.state.context&&ke(this,jn,ur).call(this,{type:"pending",context:le,variables:n,isPaused:u})}const $=await T(this,es).start();return await((x=(m=T(this,Nt).config).onSuccess)==null?void 0:x.call(m,$,n,this.state.context,this,o)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,$,n,this.state.context,o)),await((A=(w=T(this,Nt).config).onSettled)==null?void 0:A.call(w,$,null,this.state.variables,this.state.context,this,o)),await((k=(D=this.options).onSettled)==null?void 0:k.call(D,$,null,n,this.state.context,o)),ke(this,jn,ur).call(this,{type:"success",data:$}),$}catch($){try{await((_=(j=T(this,Nt).config).onError)==null?void 0:_.call(j,$,n,this.state.context,this,o))}catch(le){Promise.reject(le)}try{await((N=(I=this.options).onError)==null?void 0:N.call(I,$,n,this.state.context,o))}catch(le){Promise.reject(le)}try{await((B=(S=T(this,Nt).config).onSettled)==null?void 0:B.call(S,void 0,$,this.state.variables,this.state.context,this,o))}catch(le){Promise.reject(le)}try{await((Z=(H=this.options).onSettled)==null?void 0:Z.call(H,void 0,$,n,this.state.context,o))}catch(le){Promise.reject(le)}throw ke(this,jn,ur).call(this,{type:"error",error:$}),$}finally{T(this,Nt).runNext(this)}}},fo=new WeakMap,wn=new WeakMap,Nt=new WeakMap,es=new WeakMap,jn=new WeakSet,ur=function(n){const r=o=>{switch(n.type){case"failed":return{...o,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...o,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:n.error,failureCount:o.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),gt.batch(()=>{T(this,wn).forEach(o=>{o.onMutationUpdate(n)}),T(this,Nt).notify({mutation:this,type:"updated",action:n})})},Cx);function l1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Bn,un,po,kx,c1=(kx=class extends go{constructor(n={}){super();de(this,Bn);de(this,un);de(this,po);this.config=n,K(this,Bn,new Set),K(this,un,new Map),K(this,po,0)}build(n,r,o){const l=new a1({client:n,mutationCache:this,mutationId:++La(this,po)._,options:n.defaultMutationOptions(r),state:o});return this.add(l),l}add(n){T(this,Bn).add(n);const r=za(n);if(typeof r=="string"){const o=T(this,un).get(r);o?o.push(n):T(this,un).set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(T(this,Bn).delete(n)){const r=za(n);if(typeof r=="string"){const o=T(this,un).get(r);if(o)if(o.length>1){const l=o.indexOf(n);l!==-1&&o.splice(l,1)}else o[0]===n&&T(this,un).delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=za(n);if(typeof r=="string"){const o=T(this,un).get(r),l=o==null?void 0:o.find(u=>u.state.status==="pending");return!l||l===n}else return!0}runNext(n){var o;const r=za(n);if(typeof r=="string"){const l=(o=T(this,un).get(r))==null?void 0:o.find(u=>u!==n&&u.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){gt.batch(()=>{T(this,Bn).forEach(n=>{this.notify({type:"removed",mutation:n})}),T(this,Bn).clear(),T(this,un).clear()})}getAll(){return Array.from(T(this,Bn))}find(n){const r={exact:!0,...n};return this.getAll().find(o=>im(r,o))}findAll(n={}){return this.getAll().filter(r=>im(n,r))}notify(n){gt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return gt.batch(()=>Promise.all(n.map(r=>r.continue().catch(It))))}},Bn=new WeakMap,un=new WeakMap,po=new WeakMap,kx);function za(t){var n;return(n=t.options.scope)==null?void 0:n.id}var Nn,Sx,u1=(Sx=class extends go{constructor(n={}){super();de(this,Nn);this.config=n,K(this,Nn,new Map)}build(n,r,o){const l=r.queryKey,u=r.queryHash??Nd(l,r);let d=this.get(u);return d||(d=new n1({client:n,queryKey:l,queryHash:u,options:n.defaultQueryOptions(r),state:o,defaultOptions:n.getQueryDefaults(l)}),this.add(d)),d}add(n){T(this,Nn).has(n.queryHash)||(T(this,Nn).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=T(this,Nn).get(n.queryHash);r&&(n.destroy(),r===n&&T(this,Nn).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){gt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return T(this,Nn).get(n)}getAll(){return[...T(this,Nn).values()]}find(n){const r={exact:!0,...n};return this.getAll().find(o=>sm(r,o))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(o=>sm(n,o)):r}notify(n){gt.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){gt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){gt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Nn=new WeakMap,Sx),Xe,xr,gr,Gs,Ys,yr,Ks,Js,Ex,d1=(Ex=class{constructor(t={}){de(this,Xe);de(this,xr);de(this,gr);de(this,Gs);de(this,Ys);de(this,yr);de(this,Ks);de(this,Js);K(this,Xe,t.queryCache||new u1),K(this,xr,t.mutationCache||new c1),K(this,gr,t.defaultOptions||{}),K(this,Gs,new Map),K(this,Ys,new Map),K(this,yr,0)}mount(){La(this,yr)._++,T(this,yr)===1&&(K(this,Ks,kd.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,Xe).onFocus())})),K(this,Js,sl.subscribe(async t=>{t&&(await this.resumePausedMutations(),T(this,Xe).onOnline())})))}unmount(){var t,n;La(this,yr)._--,T(this,yr)===0&&((t=T(this,Ks))==null||t.call(this),K(this,Ks,void 0),(n=T(this,Js))==null||n.call(this),K(this,Js,void 0))}isFetching(t){return T(this,Xe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return T(this,xr).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=T(this,Xe).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=T(this,Xe).build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(wr(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(t){return T(this,Xe).findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.defaultQueryOptions({queryKey:t}),l=T(this,Xe).get(o.queryHash),u=l==null?void 0:l.state.data,d=Hw(n,u);if(d!==void 0)return T(this,Xe).build(this,o).setData(d,{...r,manual:!0})}setQueriesData(t,n,r){return gt.batch(()=>T(this,Xe).findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=T(this,Xe).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=T(this,Xe);gt.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=T(this,Xe);return gt.batch(()=>(r.findAll(t).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...t},n)))}cancelQueries(t,n={}){const r={revert:!0,...n},o=gt.batch(()=>T(this,Xe).findAll(t).map(l=>l.cancel(r)));return Promise.all(o).then(It).catch(It)}invalidateQueries(t,n={}){return gt.batch(()=>(T(this,Xe).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},n)))}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=gt.batch(()=>T(this,Xe).findAll(t).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let u=l.fetch(void 0,r);return r.throwOnError||(u=u.catch(It)),l.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(It)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=T(this,Xe).build(this,n);return r.isStaleByTime(wr(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(It).catch(It)}fetchInfiniteQuery(t){return t.behavior=hm(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(It).catch(It)}ensureInfiniteQueryData(t){return t.behavior=hm(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return sl.isOnline()?T(this,xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,Xe)}getMutationCache(){return T(this,xr)}getDefaultOptions(){return T(this,gr)}setDefaultOptions(t){K(this,gr,t)}setQueryDefaults(t,n){T(this,Gs).set(so(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...T(this,Gs).values()],r={};return n.forEach(o=>{io(t,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(t,n){T(this,Ys).set(so(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...T(this,Ys).values()],r={};return n.forEach(o=>{io(t,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...T(this,gr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=Nd(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Cd&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...T(this,gr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){T(this,Xe).clear(),T(this,xr).clear()}},Xe=new WeakMap,xr=new WeakMap,gr=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,yr=new WeakMap,Ks=new WeakMap,Js=new WeakMap,Ex),yg=b.createContext(void 0),h1=t=>{const n=b.useContext(yg);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},f1=({client:t,children:n})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),i.jsx(yg.Provider,{value:t,children:n})),vg=b.createContext(!1),p1=()=>b.useContext(vg);vg.Provider;function m1(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var x1=b.createContext(m1()),g1=()=>b.useContext(x1),y1=(t,n,r)=>{const o=r!=null&&r.state.error&&typeof t.throwOnError=="function"?hg(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||o)&&(n.isReset()||(t.retryOnMount=!1))},v1=t=>{b.useEffect(()=>{t.clearReset()},[t])},b1=({result:t,errorResetBoundary:n,throwOnError:r,query:o,suspense:l})=>t.isError&&!n.isReset()&&!t.isFetching&&o&&(l&&t.data===void 0||hg(r,[t.error,o])),w1=t=>{if(t.suspense){const r=l=>l==="static"?l:Math.max(l??1e3,1e3),o=t.staleTime;t.staleTime=typeof o=="function"?(...l)=>r(o(...l)):r(o),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},j1=(t,n)=>t.isLoading&&t.isFetching&&!n,N1=(t,n)=>(t==null?void 0:t.suspense)&&n.isPending,pm=(t,n,r)=>n.fetchOptimistic(t).catch(()=>{r.clearReset()});function C1(t,n,r){var w,A,D,k;const o=p1(),l=g1(),u=h1(),d=u.defaultQueryOptions(t);(A=(w=u.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||A.call(w,d);const f=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",w1(d),y1(d,l,f),v1(l);const m=!u.getQueryCache().get(d.queryHash),[x]=b.useState(()=>new n(u,d)),g=x.getOptimisticResult(d),v=!o&&t.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(j=>{const _=v?x.subscribe(gt.batchCalls(j)):It;return x.updateResult(),_},[x,v]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),b.useEffect(()=>{x.setOptions(d)},[d,x]),N1(d,g))throw pm(d,x,l);if(b1({result:g,errorResetBoundary:l,throwOnError:d.throwOnError,query:f,suspense:d.suspense}))throw g.error;if((k=(D=u.getDefaultOptions().queries)==null?void 0:D._experimental_afterQuery)==null||k.call(D,d,g),d.experimental_prefetchInRender&&!ss&&j1(g,o)){const j=m?pm(d,x,l):f==null?void 0:f.promise;j==null||j.catch(It).finally(()=>{x.updateResult()})}return d.notifyOnChangeProps?g:x.trackResult(g)}function k1(t,n){return C1(t,r1)}const S1=new d1({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});_x();/**
 * @remix-run/router v1.23.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function oo(){return oo=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},oo.apply(this,arguments)}var vr;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(vr||(vr={}));const mm="popstate";function E1(t){t===void 0&&(t={});function n(o,l){let{pathname:u,search:d,hash:f}=o.location;return Zu("",{pathname:u,search:d,hash:f},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function r(o,l){return typeof l=="string"?l:il(l)}return _1(n,r,null,t)}function st(t,n){if(t===!1||t===null||typeof t>"u")throw new Error(n)}function Ed(t,n){if(!t){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function A1(){return Math.random().toString(36).substr(2,8)}function xm(t,n){return{usr:t.state,key:t.key,idx:n}}function Zu(t,n,r,o){return r===void 0&&(r=null),oo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof n=="string"?ei(n):n,{state:r,key:n&&n.key||o||A1()})}function il(t){let{pathname:n="/",search:r="",hash:o=""}=t;return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function ei(t){let n={};if(t){let r=t.indexOf("#");r>=0&&(n.hash=t.substr(r),t=t.substr(0,r));let o=t.indexOf("?");o>=0&&(n.search=t.substr(o),t=t.substr(0,o)),t&&(n.pathname=t)}return n}function _1(t,n,r,o){o===void 0&&(o={});let{window:l=document.defaultView,v5Compat:u=!1}=o,d=l.history,f=vr.Pop,m=null,x=g();x==null&&(x=0,d.replaceState(oo({},d.state,{idx:x}),""));function g(){return(d.state||{idx:null}).idx}function v(){f=vr.Pop;let j=g(),_=j==null?null:j-x;x=j,m&&m({action:f,location:k.location,delta:_})}function w(j,_){f=vr.Push;let I=Zu(k.location,j,_);x=g()+1;let N=xm(I,x),S=k.createHref(I);try{d.pushState(N,"",S)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;l.location.assign(S)}u&&m&&m({action:f,location:k.location,delta:1})}function A(j,_){f=vr.Replace;let I=Zu(k.location,j,_);x=g();let N=xm(I,x),S=k.createHref(I);d.replaceState(N,"",S),u&&m&&m({action:f,location:k.location,delta:0})}function D(j){let _=l.location.origin!=="null"?l.location.origin:l.location.href,I=typeof j=="string"?j:il(j);return I=I.replace(/ $/,"%20"),st(_,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,_)}let k={get action(){return f},get location(){return t(l,d)},listen(j){if(m)throw new Error("A history only accepts one active listener");return l.addEventListener(mm,v),m=j,()=>{l.removeEventListener(mm,v),m=null}},createHref(j){return n(l,j)},createURL:D,encodeLocation(j){let _=D(j);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:w,replace:A,go(j){return d.go(j)}};return k}var gm;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(gm||(gm={}));function T1(t,n,r){return r===void 0&&(r="/"),D1(t,n,r)}function D1(t,n,r,o){let l=typeof n=="string"?ei(n):n,u=Ad(l.pathname||"/",r);if(u==null)return null;let d=bg(t);R1(d);let f=null;for(let m=0;f==null&&m<d.length;++m){let x=q1(u);f=z1(d[m],x)}return f}function bg(t,n,r,o){n===void 0&&(n=[]),r===void 0&&(r=[]),o===void 0&&(o="");let l=(u,d,f)=>{let m={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};m.relativePath.startsWith("/")&&(st(m.relativePath.startsWith(o),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(o.length));let x=jr([o,m.relativePath]),g=r.concat(m);u.children&&u.children.length>0&&(st(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+x+'".')),bg(u.children,n,g,x)),!(u.path==null&&!u.index)&&n.push({path:x,score:B1(x,u.index),routesMeta:g})};return t.forEach((u,d)=>{var f;if(u.path===""||!((f=u.path)!=null&&f.includes("?")))l(u,d);else for(let m of wg(u.path))l(u,d,m)}),n}function wg(t){let n=t.split("/");if(n.length===0)return[];let[r,...o]=n,l=r.endsWith("?"),u=r.replace(/\?$/,"");if(o.length===0)return l?[u,""]:[u];let d=wg(o.join("/")),f=[];return f.push(...d.map(m=>m===""?u:[u,m].join("/"))),l&&f.push(...d),f.map(m=>t.startsWith("/")&&m===""?"/":m)}function R1(t){t.sort((n,r)=>n.score!==r.score?r.score-n.score:U1(n.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const P1=/^:[\w-]+$/,O1=3,M1=2,L1=1,F1=10,I1=-2,ym=t=>t==="*";function B1(t,n){let r=t.split("/"),o=r.length;return r.some(ym)&&(o+=I1),n&&(o+=M1),r.filter(l=>!ym(l)).reduce((l,u)=>l+(P1.test(u)?O1:u===""?L1:F1),o)}function U1(t,n){return t.length===n.length&&t.slice(0,-1).every((o,l)=>o===n[l])?t[t.length-1]-n[n.length-1]:0}function z1(t,n,r){let{routesMeta:o}=t,l={},u="/",d=[];for(let f=0;f<o.length;++f){let m=o[f],x=f===o.length-1,g=u==="/"?n:n.slice(u.length)||"/",v=$1({path:m.relativePath,caseSensitive:m.caseSensitive,end:x},g),w=m.route;if(!v)return null;Object.assign(l,v.params),d.push({params:l,pathname:jr([u,v.pathname]),pathnameBase:Y1(jr([u,v.pathnameBase])),route:w}),v.pathnameBase!=="/"&&(u=jr([u,v.pathnameBase]))}return d}function $1(t,n){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,o]=W1(t.path,t.caseSensitive,t.end),l=n.match(r);if(!l)return null;let u=l[0],d=u.replace(/(.)\/+$/,"$1"),f=l.slice(1);return{params:o.reduce((x,g,v)=>{let{paramName:w,isOptional:A}=g;if(w==="*"){let k=f[v]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const D=f[v];return A&&!D?x[w]=void 0:x[w]=(D||"").replace(/%2F/g,"/"),x},{}),pathname:u,pathnameBase:d,pattern:t}}function W1(t,n,r){n===void 0&&(n=!1),r===void 0&&(r=!0),Ed(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let o=[],l="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m)=>(o.push({paramName:f,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(o.push({paramName:"*"}),l+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?l+="\\/*$":t!==""&&t!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,n?void 0:"i"),o]}function q1(t){try{return t.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Ed(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),t}}function Ad(t,n){if(n==="/")return t;if(!t.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,o=t.charAt(r);return o&&o!=="/"?null:t.slice(r)||"/"}const H1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V1=t=>H1.test(t);function Q1(t,n){n===void 0&&(n="/");let{pathname:r,search:o="",hash:l=""}=typeof t=="string"?ei(t):t,u;if(r)if(V1(r))u=r;else{if(r.includes("//")){let d=r;r=r.replace(/\/\/+/g,"/"),Ed(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+r))}r.startsWith("/")?u=vm(r.substring(1),"/"):u=vm(r,n)}else u=n;return{pathname:u,search:K1(o),hash:J1(l)}}function vm(t,n){let r=n.replace(/\/+$/,"").split("/");return t.split("/").forEach(l=>{l===".."?r.length>1&&r.pop():l!=="."&&r.push(l)}),r.length>1?r.join("/"):"/"}function wu(t,n,r,o){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(o)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function G1(t){return t.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function jg(t,n){let r=G1(t);return n?r.map((o,l)=>l===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function Ng(t,n,r,o){o===void 0&&(o=!1);let l;typeof t=="string"?l=ei(t):(l=oo({},t),st(!l.pathname||!l.pathname.includes("?"),wu("?","pathname","search",l)),st(!l.pathname||!l.pathname.includes("#"),wu("#","pathname","hash",l)),st(!l.search||!l.search.includes("#"),wu("#","search","hash",l)));let u=t===""||l.pathname==="",d=u?"/":l.pathname,f;if(d==null)f=r;else{let v=n.length-1;if(!o&&d.startsWith("..")){let w=d.split("/");for(;w[0]==="..";)w.shift(),v-=1;l.pathname=w.join("/")}f=v>=0?n[v]:"/"}let m=Q1(l,f),x=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(x||g)&&(m.pathname+="/"),m}const jr=t=>t.join("/").replace(/\/\/+/g,"/"),Y1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),K1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,J1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function X1(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Cg=["post","put","patch","delete"];new Set(Cg);const Z1=["get",...Cg];new Set(Z1);/**
 * React Router v6.30.3
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function ao(){return ao=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ao.apply(this,arguments)}const _d=b.createContext(null),ej=b.createContext(null),ds=b.createContext(null),yo=b.createContext(null),zn=b.createContext({outlet:null,matches:[],isDataRoute:!1}),kg=b.createContext(null);function tj(t,n){let{relative:r}=n===void 0?{}:n;vo()||st(!1);let{basename:o,navigator:l}=b.useContext(ds),{hash:u,pathname:d,search:f}=Eg(t,{relative:r}),m=d;return o!=="/"&&(m=d==="/"?o:jr([o,d])),l.createHref({pathname:m,search:f,hash:u})}function vo(){return b.useContext(yo)!=null}function Er(){return vo()||st(!1),b.useContext(yo).location}function nj(){return b.useContext(yo).navigationType}function Sg(t){b.useContext(ds).static||b.useLayoutEffect(t)}function bo(){let{isDataRoute:t}=b.useContext(zn);return t?yj():rj()}function rj(){vo()||st(!1);let t=b.useContext(_d),{basename:n,future:r,navigator:o}=b.useContext(ds),{matches:l}=b.useContext(zn),{pathname:u}=Er(),d=JSON.stringify(jg(l,r.v7_relativeSplatPath)),f=b.useRef(!1);return Sg(()=>{f.current=!0}),b.useCallback(function(x,g){if(g===void 0&&(g={}),!f.current)return;if(typeof x=="number"){o.go(x);return}let v=Ng(x,JSON.parse(d),u,g.relative==="path");t==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:jr([n,v.pathname])),(g.replace?o.replace:o.push)(v,g.state,g)},[n,o,d,u,t])}const sj=b.createContext(null);function ij(t){let n=b.useContext(zn).outlet;return n&&b.createElement(sj.Provider,{value:t},n)}function oj(){let{matches:t}=b.useContext(zn),n=t[t.length-1];return n?n.params:{}}function Eg(t,n){let{relative:r}=n===void 0?{}:n,{future:o}=b.useContext(ds),{matches:l}=b.useContext(zn),{pathname:u}=Er(),d=JSON.stringify(jg(l,o.v7_relativeSplatPath));return b.useMemo(()=>Ng(t,JSON.parse(d),u,r==="path"),[t,d,u,r])}function aj(t,n){return lj(t,n)}function lj(t,n,r,o){vo()||st(!1);let{navigator:l}=b.useContext(ds),{matches:u}=b.useContext(zn),d=u[u.length-1],f=d?d.params:{};d&&d.pathname;let m=d?d.pathnameBase:"/";d&&d.route;let x=Er(),g;if(n){var v;let j=typeof n=="string"?ei(n):n;m==="/"||(v=j.pathname)!=null&&v.startsWith(m)||st(!1),g=j}else g=x;let w=g.pathname||"/",A=w;if(m!=="/"){let j=m.replace(/^\//,"").split("/");A="/"+w.replace(/^\//,"").split("/").slice(j.length).join("/")}let D=T1(t,{pathname:A}),k=fj(D&&D.map(j=>Object.assign({},j,{params:Object.assign({},f,j.params),pathname:jr([m,l.encodeLocation?l.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?m:jr([m,l.encodeLocation?l.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),u,r,o);return n&&k?b.createElement(yo.Provider,{value:{location:ao({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:vr.Pop}},k):k}function cj(){let t=gj(),n=X1(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},n),r?b.createElement("pre",{style:l},r):null,null)}const uj=b.createElement(cj,null);class dj extends b.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){console.error("React Router caught the following error during render",n,r)}render(){return this.state.error!==void 0?b.createElement(zn.Provider,{value:this.props.routeContext},b.createElement(kg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hj(t){let{routeContext:n,match:r,children:o}=t,l=b.useContext(_d);return l&&l.static&&l.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(zn.Provider,{value:n},o)}function fj(t,n,r,o){var l;if(n===void 0&&(n=[]),r===void 0&&(r=null),o===void 0&&(o=null),t==null){var u;if(!r)return null;if(r.errors)t=r.matches;else if((u=o)!=null&&u.v7_partialHydration&&n.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let d=t,f=(l=r)==null?void 0:l.errors;if(f!=null){let g=d.findIndex(v=>v.route.id&&(f==null?void 0:f[v.route.id])!==void 0);g>=0||st(!1),d=d.slice(0,Math.min(d.length,g+1))}let m=!1,x=-1;if(r&&o&&o.v7_partialHydration)for(let g=0;g<d.length;g++){let v=d[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(x=g),v.route.id){let{loaderData:w,errors:A}=r,D=v.route.loader&&w[v.route.id]===void 0&&(!A||A[v.route.id]===void 0);if(v.route.lazy||D){m=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}return d.reduceRight((g,v,w)=>{let A,D=!1,k=null,j=null;r&&(A=f&&v.route.id?f[v.route.id]:void 0,k=v.route.errorElement||uj,m&&(x<0&&w===0?(vj("route-fallback"),D=!0,j=null):x===w&&(D=!0,j=v.route.hydrateFallbackElement||null)));let _=n.concat(d.slice(0,w+1)),I=()=>{let N;return A?N=k:D?N=j:v.route.Component?N=b.createElement(v.route.Component,null):v.route.element?N=v.route.element:N=g,b.createElement(hj,{match:v,routeContext:{outlet:g,matches:_,isDataRoute:r!=null},children:N})};return r&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?b.createElement(dj,{location:r.location,revalidation:r.revalidation,component:k,error:A,children:I(),routeContext:{outlet:null,matches:_,isDataRoute:!0}}):I()},null)}var Ag=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(Ag||{}),_g=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(_g||{});function pj(t){let n=b.useContext(_d);return n||st(!1),n}function mj(t){let n=b.useContext(ej);return n||st(!1),n}function xj(t){let n=b.useContext(zn);return n||st(!1),n}function Tg(t){let n=xj(),r=n.matches[n.matches.length-1];return r.route.id||st(!1),r.route.id}function gj(){var t;let n=b.useContext(kg),r=mj(),o=Tg();return n!==void 0?n:(t=r.errors)==null?void 0:t[o]}function yj(){let{router:t}=pj(Ag.UseNavigateStable),n=Tg(_g.UseNavigateStable),r=b.useRef(!1);return Sg(()=>{r.current=!0}),b.useCallback(function(l,u){u===void 0&&(u={}),r.current&&(typeof l=="number"?t.navigate(l):t.navigate(l,ao({fromRouteId:n},u)))},[t,n])}const bm={};function vj(t,n,r){bm[t]||(bm[t]=!0)}function bj(t,n){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ed(t){return ij(t.context)}function _e(t){st(!1)}function wj(t){let{basename:n="/",children:r=null,location:o,navigationType:l=vr.Pop,navigator:u,static:d=!1,future:f}=t;vo()&&st(!1);let m=n.replace(/^\/*/,"/"),x=b.useMemo(()=>({basename:m,navigator:u,static:d,future:ao({v7_relativeSplatPath:!1},f)}),[m,f,u,d]);typeof o=="string"&&(o=ei(o));let{pathname:g="/",search:v="",hash:w="",state:A=null,key:D="default"}=o,k=b.useMemo(()=>{let j=Ad(g,m);return j==null?null:{location:{pathname:j,search:v,hash:w,state:A,key:D},navigationType:l}},[m,g,v,w,A,D,l]);return k==null?null:b.createElement(ds.Provider,{value:x},b.createElement(yo.Provider,{children:r,value:k}))}function Dg(t){let{children:n,location:r}=t;return aj(td(n),r)}new Promise(()=>{});function td(t,n){n===void 0&&(n=[]);let r=[];return b.Children.forEach(t,(o,l)=>{if(!b.isValidElement(o))return;let u=[...n,l];if(o.type===b.Fragment){r.push.apply(r,td(o.props.children,u));return}o.type!==_e&&st(!1),!o.props.index||!o.props.children||st(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=td(o.props.children,u)),r.push(d)}),r}/**
 * React Router DOM v6.30.3
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function nd(){return nd=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},nd.apply(this,arguments)}function jj(t,n){if(t==null)return{};var r={},o=Object.keys(t),l,u;for(u=0;u<o.length;u++)l=o[u],!(n.indexOf(l)>=0)&&(r[l]=t[l]);return r}function Nj(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Cj(t,n){return t.button===0&&(!n||n==="_self")&&!Nj(t)}const kj=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Sj="6";try{window.__reactRouterVersion=Sj}catch{}const Ej="startTransition",wm=yd[Ej];function Aj(t){let{basename:n,children:r,future:o,window:l}=t,u=b.useRef();u.current==null&&(u.current=E1({window:l,v5Compat:!0}));let d=u.current,[f,m]=b.useState({action:d.action,location:d.location}),{v7_startTransition:x}=o||{},g=b.useCallback(v=>{x&&wm?wm(()=>m(v)):m(v)},[m,x]);return b.useLayoutEffect(()=>d.listen(g),[d,g]),b.useEffect(()=>bj(o),[o]),b.createElement(wj,{basename:n,children:r,location:f.location,navigationType:f.action,navigator:d,future:o})}const _j=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tj=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ve=b.forwardRef(function(n,r){let{onClick:o,relative:l,reloadDocument:u,replace:d,state:f,target:m,to:x,preventScrollReset:g,viewTransition:v}=n,w=jj(n,kj),{basename:A}=b.useContext(ds),D,k=!1;if(typeof x=="string"&&Tj.test(x)&&(D=x,_j))try{let N=new URL(window.location.href),S=x.startsWith("//")?new URL(N.protocol+x):new URL(x),B=Ad(S.pathname,A);S.origin===N.origin&&B!=null?x=B+S.search+S.hash:k=!0}catch{}let j=tj(x,{relative:l}),_=Dj(x,{replace:d,state:f,target:m,preventScrollReset:g,relative:l,viewTransition:v});function I(N){o&&o(N),N.defaultPrevented||_(N)}return b.createElement("a",nd({},w,{href:D||j,onClick:k||u?o:I,ref:r,target:m}))});var jm;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(jm||(jm={}));var Nm;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Nm||(Nm={}));function Dj(t,n){let{target:r,replace:o,state:l,preventScrollReset:u,relative:d,viewTransition:f}=n===void 0?{}:n,m=bo(),x=Er(),g=Eg(t,{relative:d});return b.useCallback(v=>{if(Cj(v,r)){v.preventDefault();let w=o!==void 0?o:il(x)===il(g);m(t,{replace:w,state:l,preventScrollReset:u,relative:d,viewTransition:f})}},[x,m,g,o,l,r,t,u,d,f])}function Rg(t,n){return function(){return t.apply(n,arguments)}}const{toString:Rj}=Object.prototype,{getPrototypeOf:hl}=Object,{iterator:fl,toStringTag:Pg}=Symbol,pl=(t=>n=>{const r=Rj.call(n);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),pn=t=>(t=t.toLowerCase(),n=>pl(n)===t),ml=t=>n=>typeof n===t,{isArray:is}=Array,Xs=ml("undefined");function ti(t){return t!==null&&!Xs(t)&&t.constructor!==null&&!Xs(t.constructor)&&Bt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Og=pn("ArrayBuffer");function Pj(t){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(t):n=t&&t.buffer&&Og(t.buffer),n}const Oj=ml("string"),Bt=ml("function"),Mg=ml("number"),wo=t=>t!==null&&typeof t=="object",Mj=t=>t===!0||t===!1,Ga=t=>{if(pl(t)!=="object")return!1;const n=hl(t);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Pg in t)&&!(fl in t)},Lj=t=>{if(!wo(t)||ti(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Fj=pn("Date"),Ij=pn("File"),Bj=t=>!!(t&&typeof t.uri<"u"),Uj=t=>t&&typeof t.getParts<"u",zj=pn("Blob"),$j=pn("FileList"),Wj=t=>wo(t)&&Bt(t.pipe);function qj(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Cm=qj(),km=typeof Cm.FormData<"u"?Cm.FormData:void 0,Hj=t=>{if(!t)return!1;if(km&&t instanceof km)return!0;const n=hl(t);if(!n||n===Object.prototype||!Bt(t.append))return!1;const r=pl(t);return r==="formdata"||r==="object"&&Bt(t.toString)&&t.toString()==="[object FormData]"},Vj=pn("URLSearchParams"),[Qj,Gj,Yj,Kj]=["ReadableStream","Request","Response","Headers"].map(pn),Jj=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(t,n,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let o,l;if(typeof t!="object"&&(t=[t]),is(t))for(o=0,l=t.length;o<l;o++)n.call(null,t[o],o,t);else{if(ti(t))return;const u=r?Object.getOwnPropertyNames(t):Object.keys(t),d=u.length;let f;for(o=0;o<d;o++)f=u[o],n.call(null,t[f],f,t)}}function Lg(t,n){if(ti(t))return null;n=n.toLowerCase();const r=Object.keys(t);let o=r.length,l;for(;o-- >0;)if(l=r[o],n===l.toLowerCase())return l;return null}const Hr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fg=t=>!Xs(t)&&t!==Hr;function rd(...t){const{caseless:n,skipUndefined:r}=Fg(this)&&this||{},o={},l=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const f=n&&typeof d=="string"&&Lg(o,d)||d,m=sd(o,f)?o[f]:void 0;Ga(m)&&Ga(u)?o[f]=rd(m,u):Ga(u)?o[f]=rd({},u):is(u)?o[f]=u.slice():(!r||!Xs(u))&&(o[f]=u)};for(let u=0,d=t.length;u<d;u++){const f=t[u];if(!f||ti(f)||(jo(f,l),typeof f!="object"||is(f)))continue;const m=Object.getOwnPropertySymbols(f);for(let x=0;x<m.length;x++){const g=m[x];cN.call(f,g)&&l(f[g],g)}}return o}const Xj=(t,n,r,{allOwnKeys:o}={})=>(jo(n,(l,u)=>{r&&Bt(l)?Object.defineProperty(t,u,{__proto__:null,value:Rg(l,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,u,{__proto__:null,value:l,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),t),Zj=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),eN=(t,n,r,o)=>{t.prototype=Object.create(n.prototype,o),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:n.prototype}),r&&Object.assign(t.prototype,r)},tN=(t,n,r,o)=>{let l,u,d;const f={};if(n=n||{},t==null)return n;do{for(l=Object.getOwnPropertyNames(t),u=l.length;u-- >0;)d=l[u],(!o||o(d,t,n))&&!f[d]&&(n[d]=t[d],f[d]=!0);t=r!==!1&&hl(t)}while(t&&(!r||r(t,n))&&t!==Object.prototype);return n},nN=(t,n,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=n.length;const o=t.indexOf(n,r);return o!==-1&&o===r},rN=t=>{if(!t)return null;if(is(t))return t;let n=t.length;if(!Mg(n))return null;const r=new Array(n);for(;n-- >0;)r[n]=t[n];return r},sN=(t=>n=>t&&n instanceof t)(typeof Uint8Array<"u"&&hl(Uint8Array)),iN=(t,n)=>{const o=(t&&t[fl]).call(t);let l;for(;(l=o.next())&&!l.done;){const u=l.value;n.call(t,u[0],u[1])}},oN=(t,n)=>{let r;const o=[];for(;(r=t.exec(n))!==null;)o.push(r);return o},aN=pn("HTMLFormElement"),lN=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,l){return o.toUpperCase()+l}),sd=(({hasOwnProperty:t})=>(n,r)=>t.call(n,r))(Object.prototype),{propertyIsEnumerable:cN}=Object.prototype,uN=pn("RegExp"),Ig=(t,n)=>{const r=Object.getOwnPropertyDescriptors(t),o={};jo(r,(l,u)=>{let d;(d=n(l,u,t))!==!1&&(o[u]=d||l)}),Object.defineProperties(t,o)},dN=t=>{Ig(t,(n,r)=>{if(Bt(t)&&["arguments","caller","callee"].includes(r))return!1;const o=t[r];if(Bt(o)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},hN=(t,n)=>{const r={},o=l=>{l.forEach(u=>{r[u]=!0})};return is(t)?o(t):o(String(t).split(n)),r},fN=()=>{},pN=(t,n)=>t!=null&&Number.isFinite(t=+t)?t:n;function mN(t){return!!(t&&Bt(t.append)&&t[Pg]==="FormData"&&t[fl])}const xN=t=>{const n=new WeakSet,r=o=>{if(wo(o)){if(n.has(o))return;if(ti(o))return o;if(!("toJSON"in o)){n.add(o);const l=is(o)?[]:{};return jo(o,(u,d)=>{const f=r(u);!Xs(f)&&(l[d]=f)}),n.delete(o),l}}return o};return r(t)},gN=pn("AsyncFunction"),yN=t=>t&&(wo(t)||Bt(t))&&Bt(t.then)&&Bt(t.catch),Bg=((t,n)=>t?setImmediate:n?((r,o)=>(Hr.addEventListener("message",({source:l,data:u})=>{l===Hr&&u===r&&o.length&&o.shift()()},!1),l=>{o.push(l),Hr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Bt(Hr.postMessage)),vN=typeof queueMicrotask<"u"?queueMicrotask.bind(Hr):typeof process<"u"&&process.nextTick||Bg,bN=t=>t!=null&&Bt(t[fl]),O={isArray:is,isArrayBuffer:Og,isBuffer:ti,isFormData:Hj,isArrayBufferView:Pj,isString:Oj,isNumber:Mg,isBoolean:Mj,isObject:wo,isPlainObject:Ga,isEmptyObject:Lj,isReadableStream:Qj,isRequest:Gj,isResponse:Yj,isHeaders:Kj,isUndefined:Xs,isDate:Fj,isFile:Ij,isReactNativeBlob:Bj,isReactNative:Uj,isBlob:zj,isRegExp:uN,isFunction:Bt,isStream:Wj,isURLSearchParams:Vj,isTypedArray:sN,isFileList:$j,forEach:jo,merge:rd,extend:Xj,trim:Jj,stripBOM:Zj,inherits:eN,toFlatObject:tN,kindOf:pl,kindOfTest:pn,endsWith:nN,toArray:rN,forEachEntry:iN,matchAll:oN,isHTMLForm:aN,hasOwnProperty:sd,hasOwnProp:sd,reduceDescriptors:Ig,freezeMethods:dN,toObjectSet:hN,toCamelCase:lN,noop:fN,toFiniteNumber:pN,findKey:Lg,global:Hr,isContextDefined:Fg,isSpecCompliantForm:mN,toJSONObject:xN,isAsyncFn:gN,isThenable:yN,setImmediate:Bg,asap:vN,isIterable:bN},wN=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),jN=t=>{const n={};let r,o,l;return t&&t.split(`
`).forEach(function(d){l=d.indexOf(":"),r=d.substring(0,l).trim().toLowerCase(),o=d.substring(l+1).trim(),!(!r||n[r]&&wN[r])&&(r==="set-cookie"?n[r]?n[r].push(o):n[r]=[o]:n[r]=n[r]?n[r]+", "+o:o)}),n};function NN(t){let n=0,r=t.length;for(;n<r;){const o=t.charCodeAt(n);if(o!==9&&o!==32)break;n+=1}for(;r>n;){const o=t.charCodeAt(r-1);if(o!==9&&o!==32)break;r-=1}return n===0&&r===t.length?t:t.slice(n,r)}const CN=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),kN=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Td(t,n){return O.isArray(t)?t.map(r=>Td(r,n)):NN(String(t).replace(n,""))}const SN=t=>Td(t,CN),EN=t=>Td(t,kN);function Ug(t){const n=Object.create(null);return O.forEach(t.toJSON(),(r,o)=>{n[o]=EN(r)}),n}const Sm=Symbol("internals");function Hi(t){return t&&String(t).trim().toLowerCase()}function Ya(t){return t===!1||t==null?t:O.isArray(t)?t.map(Ya):SN(String(t))}function AN(t){const n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(t);)n[o[1]]=o[2];return n}const _N=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ju(t,n,r,o,l){if(O.isFunction(o))return o.call(this,n,r);if(l&&(n=r),!!O.isString(n)){if(O.isString(o))return n.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(n)}}function TN(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,r,o)=>r.toUpperCase()+o)}function DN(t,n){const r=O.toCamelCase(" "+n);["get","set","has"].forEach(o=>{Object.defineProperty(t,o+r,{__proto__:null,value:function(l,u,d){return this[o].call(this,n,l,u,d)},configurable:!0})})}let _t=class{constructor(n){n&&this.set(n)}set(n,r,o){const l=this;function u(f,m,x){const g=Hi(m);if(!g)return;const v=O.findKey(l,g);(!v||l[v]===void 0||x===!0||x===void 0&&l[v]!==!1)&&(l[v||m]=Ya(f))}const d=(f,m)=>O.forEach(f,(x,g)=>u(x,g,m));if(O.isPlainObject(n)||n instanceof this.constructor)d(n,r);else if(O.isString(n)&&(n=n.trim())&&!_N(n))d(jN(n),r);else if(O.isObject(n)&&O.isIterable(n)){let f={},m,x;for(const g of n){if(!O.isArray(g))throw new TypeError("Object iterator must return a key-value pair");f[x=g[0]]=(m=f[x])?O.isArray(m)?[...m,g[1]]:[m,g[1]]:g[1]}d(f,r)}else n!=null&&u(r,n,o);return this}get(n,r){if(n=Hi(n),n){const o=O.findKey(this,n);if(o){const l=this[o];if(!r)return l;if(r===!0)return AN(l);if(O.isFunction(r))return r.call(this,l,o);if(O.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,r){if(n=Hi(n),n){const o=O.findKey(this,n);return!!(o&&this[o]!==void 0&&(!r||ju(this,this[o],o,r)))}return!1}delete(n,r){const o=this;let l=!1;function u(d){if(d=Hi(d),d){const f=O.findKey(o,d);f&&(!r||ju(o,o[f],f,r))&&(delete o[f],l=!0)}}return O.isArray(n)?n.forEach(u):u(n),l}clear(n){const r=Object.keys(this);let o=r.length,l=!1;for(;o--;){const u=r[o];(!n||ju(this,this[u],u,n,!0))&&(delete this[u],l=!0)}return l}normalize(n){const r=this,o={};return O.forEach(this,(l,u)=>{const d=O.findKey(o,u);if(d){r[d]=Ya(l),delete r[u];return}const f=n?TN(u):String(u).trim();f!==u&&delete r[u],r[f]=Ya(l),o[f]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const r=Object.create(null);return O.forEach(this,(o,l)=>{o!=null&&o!==!1&&(r[l]=n&&O.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,r])=>n+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...r){const o=new this(n);return r.forEach(l=>o.set(l)),o}static accessor(n){const o=(this[Sm]=this[Sm]={accessors:{}}).accessors,l=this.prototype;function u(d){const f=Hi(d);o[f]||(DN(l,d),o[f]=!0)}return O.isArray(n)?n.forEach(u):u(n),this}};_t.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(_t.prototype,({value:t},n)=>{let r=n[0].toUpperCase()+n.slice(1);return{get:()=>t,set(o){this[r]=o}}});O.freezeMethods(_t);const RN="[REDACTED ****]";function PN(t){if(O.hasOwnProp(t,"toJSON"))return!0;let n=Object.getPrototypeOf(t);for(;n&&n!==Object.prototype;){if(O.hasOwnProp(n,"toJSON"))return!0;n=Object.getPrototypeOf(n)}return!1}function ON(t,n){const r=new Set(n.map(u=>String(u).toLowerCase())),o=[],l=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof _t&&(u=u.toJSON()),o.push(u);let d;if(O.isArray(u))d=[],u.forEach((f,m)=>{const x=l(f);O.isUndefined(x)||(d[m]=x)});else{if(!O.isPlainObject(u)&&PN(u))return o.pop(),u;d=Object.create(null);for(const[f,m]of Object.entries(u)){const x=r.has(f.toLowerCase())?RN:l(m);O.isUndefined(x)||(d[f]=x)}}return o.pop(),d};return l(t)}let re=class zg extends Error{static from(n,r,o,l,u,d){const f=new zg(n.message,r||n.code,o,l,u);return f.cause=n,f.name=n.name,n.status!=null&&f.status==null&&(f.status=n.status),d&&Object.assign(f,d),f}constructor(n,r,o,l,u){super(n),Object.defineProperty(this,"message",{__proto__:null,value:n,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),o&&(this.config=o),l&&(this.request=l),u&&(this.response=u,this.status=u.status)}toJSON(){const n=this.config,r=n&&O.hasOwnProp(n,"redact")?n.redact:void 0,o=O.isArray(r)&&r.length>0?ON(n,r):O.toJSONObject(n);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const MN=null;function id(t){return O.isPlainObject(t)||O.isArray(t)}function $g(t){return O.endsWith(t,"[]")?t.slice(0,-2):t}function Nu(t,n,r){return t?t.concat(n).map(function(l,u){return l=$g(l),!r&&u?"["+l+"]":l}).join(r?".":""):n}function LN(t){return O.isArray(t)&&!t.some(id)}const FN=O.toFlatObject(O,{},null,function(n){return/^is[A-Z]/.test(n)});function xl(t,n,r){if(!O.isObject(t))throw new TypeError("target must be an object");n=n||new FormData,r=O.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,_){return!O.isUndefined(_[j])});const o=r.metaTokens,l=r.visitor||v,u=r.dots,d=r.indexes,f=r.Blob||typeof Blob<"u"&&Blob,m=r.maxDepth===void 0?100:r.maxDepth,x=f&&O.isSpecCompliantForm(n);if(!O.isFunction(l))throw new TypeError("visitor must be a function");function g(k){if(k===null)return"";if(O.isDate(k))return k.toISOString();if(O.isBoolean(k))return k.toString();if(!x&&O.isBlob(k))throw new re("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(k)||O.isTypedArray(k)?x&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function v(k,j,_){let I=k;if(O.isReactNative(n)&&O.isReactNativeBlob(k))return n.append(Nu(_,j,u),g(k)),!1;if(k&&!_&&typeof k=="object"){if(O.endsWith(j,"{}"))j=o?j:j.slice(0,-2),k=JSON.stringify(k);else if(O.isArray(k)&&LN(k)||(O.isFileList(k)||O.endsWith(j,"[]"))&&(I=O.toArray(k)))return j=$g(j),I.forEach(function(S,B){!(O.isUndefined(S)||S===null)&&n.append(d===!0?Nu([j],B,u):d===null?j:j+"[]",g(S))}),!1}return id(k)?!0:(n.append(Nu(_,j,u),g(k)),!1)}const w=[],A=Object.assign(FN,{defaultVisitor:v,convertValue:g,isVisitable:id});function D(k,j,_=0){if(!O.isUndefined(k)){if(_>m)throw new re("Object is too deeply nested ("+_+" levels). Max depth: "+m,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(w.indexOf(k)!==-1)throw new Error("Circular reference detected in "+j.join("."));w.push(k),O.forEach(k,function(N,S){(!(O.isUndefined(N)||N===null)&&l.call(n,N,O.isString(S)?S.trim():S,j,A))===!0&&D(N,j?j.concat(S):[S],_+1)}),w.pop()}}if(!O.isObject(t))throw new TypeError("data must be an object");return D(t),n}function Em(t){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(o){return n[o]})}function Dd(t,n){this._pairs=[],t&&xl(t,this,n)}const Wg=Dd.prototype;Wg.append=function(n,r){this._pairs.push([n,r])};Wg.toString=function(n){const r=n?function(o){return n.call(this,o,Em)}:Em;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function IN(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qg(t,n,r){if(!n)return t;const o=r&&r.encode||IN,l=O.isFunction(r)?{serialize:r}:r,u=l&&l.serialize;let d;if(u?d=u(n,l):d=O.isURLSearchParams(n)?n.toString():new Dd(n,l).toString(o),d){const f=t.indexOf("#");f!==-1&&(t=t.slice(0,f)),t+=(t.indexOf("?")===-1?"?":"&")+d}return t}class Am{constructor(){this.handlers=[]}use(n,r,o){return this.handlers.push({fulfilled:n,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){O.forEach(this.handlers,function(o){o!==null&&n(o)})}}const Rd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},BN=typeof URLSearchParams<"u"?URLSearchParams:Dd,UN=typeof FormData<"u"?FormData:null,zN=typeof Blob<"u"?Blob:null,$N={isBrowser:!0,classes:{URLSearchParams:BN,FormData:UN,Blob:zN},protocols:["http","https","file","blob","url","data"]},Pd=typeof window<"u"&&typeof document<"u",od=typeof navigator=="object"&&navigator||void 0,WN=Pd&&(!od||["ReactNative","NativeScript","NS"].indexOf(od.product)<0),qN=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",HN=Pd&&window.location.href||"http://localhost",VN=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pd,hasStandardBrowserEnv:WN,hasStandardBrowserWebWorkerEnv:qN,navigator:od,origin:HN},Symbol.toStringTag,{value:"Module"})),yt={...VN,...$N};function QN(t,n){return xl(t,new yt.classes.URLSearchParams,{visitor:function(r,o,l,u){return yt.isNode&&O.isBuffer(r)?(this.append(o,r.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...n})}function GN(t){return O.matchAll(/\w+|\[(\w*)]/g,t).map(n=>n[0]==="[]"?"":n[1]||n[0])}function YN(t){const n={},r=Object.keys(t);let o;const l=r.length;let u;for(o=0;o<l;o++)u=r[o],n[u]=t[u];return n}function Hg(t){function n(r,o,l,u){let d=r[u++];if(d==="__proto__")return!0;const f=Number.isFinite(+d),m=u>=r.length;return d=!d&&O.isArray(l)?l.length:d,m?(O.hasOwnProp(l,d)?l[d]=O.isArray(l[d])?l[d].concat(o):[l[d],o]:l[d]=o,!f):((!O.hasOwnProp(l,d)||!O.isObject(l[d]))&&(l[d]=[]),n(r,o,l[d],u)&&O.isArray(l[d])&&(l[d]=YN(l[d])),!f)}if(O.isFormData(t)&&O.isFunction(t.entries)){const r={};return O.forEachEntry(t,(o,l)=>{n(GN(o),l,r,0)}),r}return null}const Fs=(t,n)=>t!=null&&O.hasOwnProp(t,n)?t[n]:void 0;function KN(t,n,r){if(O.isString(t))try{return(n||JSON.parse)(t),O.trim(t)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(t)}const No={transitional:Rd,adapter:["xhr","http","fetch"],transformRequest:[function(n,r){const o=r.getContentType()||"",l=o.indexOf("application/json")>-1,u=O.isObject(n);if(u&&O.isHTMLForm(n)&&(n=new FormData(n)),O.isFormData(n))return l?JSON.stringify(Hg(n)):n;if(O.isArrayBuffer(n)||O.isBuffer(n)||O.isStream(n)||O.isFile(n)||O.isBlob(n)||O.isReadableStream(n))return n;if(O.isArrayBufferView(n))return n.buffer;if(O.isURLSearchParams(n))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let f;if(u){const m=Fs(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return QN(n,m).toString();if((f=O.isFileList(n))||o.indexOf("multipart/form-data")>-1){const x=Fs(this,"env"),g=x&&x.FormData;return xl(f?{"files[]":n}:n,g&&new g,m)}}return u||l?(r.setContentType("application/json",!1),KN(n)):n}],transformResponse:[function(n){const r=Fs(this,"transitional")||No.transitional,o=r&&r.forcedJSONParsing,l=Fs(this,"responseType"),u=l==="json";if(O.isResponse(n)||O.isReadableStream(n))return n;if(n&&O.isString(n)&&(o&&!l||u)){const f=!(r&&r.silentJSONParsing)&&u;try{return JSON.parse(n,Fs(this,"parseReviver"))}catch(m){if(f)throw m.name==="SyntaxError"?re.from(m,re.ERR_BAD_RESPONSE,this,null,Fs(this,"response")):m}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yt.classes.FormData,Blob:yt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],t=>{No.headers[t]={}});function Cu(t,n){const r=this||No,o=n||r,l=_t.from(o.headers);let u=o.data;return O.forEach(t,function(f){u=f.call(r,u,l.normalize(),n?n.status:void 0)}),l.normalize(),u}function Vg(t){return!!(t&&t.__CANCEL__)}let Co=class extends re{constructor(n,r,o){super(n??"canceled",re.ERR_CANCELED,r,o),this.name="CanceledError",this.__CANCEL__=!0}};function Qg(t,n,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?t(r):n(new re("Request failed with status code "+r.status,r.status>=400&&r.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,r.config,r.request,r))}function JN(t){const n=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return n&&n[1]||""}function XN(t,n){t=t||10;const r=new Array(t),o=new Array(t);let l=0,u=0,d;return n=n!==void 0?n:1e3,function(m){const x=Date.now(),g=o[u];d||(d=x),r[l]=m,o[l]=x;let v=u,w=0;for(;v!==l;)w+=r[v++],v=v%t;if(l=(l+1)%t,l===u&&(u=(u+1)%t),x-d<n)return;const A=g&&x-g;return A?Math.round(w*1e3/A):void 0}}function ZN(t,n){let r=0,o=1e3/n,l,u;const d=(x,g=Date.now())=>{r=g,l=null,u&&(clearTimeout(u),u=null),t(...x)};return[(...x)=>{const g=Date.now(),v=g-r;v>=o?d(x,g):(l=x,u||(u=setTimeout(()=>{u=null,d(l)},o-v)))},()=>l&&d(l)]}const ol=(t,n,r=3)=>{let o=0;const l=XN(50,250);return ZN(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,f=u.lengthComputable?u.total:void 0,m=f!=null?Math.min(d,f):d,x=Math.max(0,m-o),g=l(x);o=Math.max(o,m);const v={loaded:m,total:f,progress:f?m/f:void 0,bytes:x,rate:g||void 0,estimated:g&&f?(f-m)/g:void 0,event:u,lengthComputable:f!=null,[n?"download":"upload"]:!0};t(v)},r)},_m=(t,n)=>{const r=t!=null;return[o=>n[0]({lengthComputable:r,total:t,loaded:o}),n[1]]},Tm=t=>(...n)=>O.asap(()=>t(...n)),e2=yt.hasStandardBrowserEnv?((t,n)=>r=>(r=new URL(r,yt.origin),t.protocol===r.protocol&&t.host===r.host&&(n||t.port===r.port)))(new URL(yt.origin),yt.navigator&&/(msie|trident)/i.test(yt.navigator.userAgent)):()=>!0,t2=yt.hasStandardBrowserEnv?{write(t,n,r,o,l,u,d){if(typeof document>"u")return;const f=[`${t}=${encodeURIComponent(n)}`];O.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),O.isString(o)&&f.push(`path=${o}`),O.isString(l)&&f.push(`domain=${l}`),u===!0&&f.push("secure"),O.isString(d)&&f.push(`SameSite=${d}`),document.cookie=f.join("; ")},read(t){if(typeof document>"u")return null;const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const o=n[r].replace(/^\s+/,""),l=o.indexOf("=");if(l!==-1&&o.slice(0,l)===t)return decodeURIComponent(o.slice(l+1))}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function n2(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function r2(t,n){return n?t.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):t}function Gg(t,n,r){let o=!n2(n);return t&&(o||r===!1)?r2(t,n):n}const Dm=t=>t instanceof _t?{...t}:t;function os(t,n){n=n||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(x,g,v,w){return O.isPlainObject(x)&&O.isPlainObject(g)?O.merge.call({caseless:w},x,g):O.isPlainObject(g)?O.merge({},g):O.isArray(g)?g.slice():g}function l(x,g,v,w){if(O.isUndefined(g)){if(!O.isUndefined(x))return o(void 0,x,v,w)}else return o(x,g,v,w)}function u(x,g){if(!O.isUndefined(g))return o(void 0,g)}function d(x,g){if(O.isUndefined(g)){if(!O.isUndefined(x))return o(void 0,x)}else return o(void 0,g)}function f(x,g,v){if(O.hasOwnProp(n,v))return o(x,g);if(O.hasOwnProp(t,v))return o(void 0,x)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:f,headers:(x,g,v)=>l(Dm(x),Dm(g),v,!0)};return O.forEach(Object.keys({...t,...n}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const v=O.hasOwnProp(m,g)?m[g]:l,w=O.hasOwnProp(t,g)?t[g]:void 0,A=O.hasOwnProp(n,g)?n[g]:void 0,D=v(w,A,g);O.isUndefined(D)&&v!==f||(r[g]=D)}),r}const s2=["content-type","content-length"];function i2(t,n,r){if(r!=="content-only"){t.set(n);return}Object.entries(n).forEach(([o,l])=>{s2.includes(o.toLowerCase())&&t.set(o,l)})}const o2=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,r)=>String.fromCharCode(parseInt(r,16)));function Yg(t){const n=os({},t),r=w=>O.hasOwnProp(n,w)?n[w]:void 0,o=r("data");let l=r("withXSRFToken");const u=r("xsrfHeaderName"),d=r("xsrfCookieName");let f=r("headers");const m=r("auth"),x=r("baseURL"),g=r("allowAbsoluteUrls"),v=r("url");if(n.headers=f=_t.from(f),n.url=qg(Gg(x,v,g),r("params"),r("paramsSerializer")),m&&f.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?o2(m.password):""))),O.isFormData(o)&&(yt.hasStandardBrowserEnv||yt.hasStandardBrowserWebWorkerEnv||O.isReactNative(o)?f.setContentType(void 0):O.isFunction(o.getHeaders)&&i2(f,o.getHeaders(),r("formDataHeaderPolicy"))),yt.hasStandardBrowserEnv&&(O.isFunction(l)&&(l=l(n)),l===!0||l==null&&e2(n.url))){const A=u&&d&&t2.read(d);A&&f.set(u,A)}return n}const a2=typeof XMLHttpRequest<"u",l2=a2&&function(t){return new Promise(function(r,o){const l=Yg(t);let u=l.data;const d=_t.from(l.headers).normalize();let{responseType:f,onUploadProgress:m,onDownloadProgress:x}=l,g,v,w,A,D;function k(){A&&A(),D&&D(),l.cancelToken&&l.cancelToken.unsubscribe(g),l.signal&&l.signal.removeEventListener("abort",g)}let j=new XMLHttpRequest;j.open(l.method.toUpperCase(),l.url,!0),j.timeout=l.timeout;function _(){if(!j)return;const N=_t.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),B={data:!f||f==="text"||f==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:N,config:t,request:j};Qg(function(Z){r(Z),k()},function(Z){o(Z),k()},B),j=null}"onloadend"in j?j.onloadend=_:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.startsWith("file:"))||setTimeout(_)},j.onabort=function(){j&&(o(new re("Request aborted",re.ECONNABORTED,t,j)),k(),j=null)},j.onerror=function(S){const B=S&&S.message?S.message:"Network Error",H=new re(B,re.ERR_NETWORK,t,j);H.event=S||null,o(H),k(),j=null},j.ontimeout=function(){let S=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const B=l.transitional||Rd;l.timeoutErrorMessage&&(S=l.timeoutErrorMessage),o(new re(S,B.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,t,j)),k(),j=null},u===void 0&&d.setContentType(null),"setRequestHeader"in j&&O.forEach(Ug(d),function(S,B){j.setRequestHeader(B,S)}),O.isUndefined(l.withCredentials)||(j.withCredentials=!!l.withCredentials),f&&f!=="json"&&(j.responseType=l.responseType),x&&([w,D]=ol(x,!0),j.addEventListener("progress",w)),m&&j.upload&&([v,A]=ol(m),j.upload.addEventListener("progress",v),j.upload.addEventListener("loadend",A)),(l.cancelToken||l.signal)&&(g=N=>{j&&(o(!N||N.type?new Co(null,t,j):N),j.abort(),k(),j=null)},l.cancelToken&&l.cancelToken.subscribe(g),l.signal&&(l.signal.aborted?g():l.signal.addEventListener("abort",g)));const I=JN(l.url);if(I&&!yt.protocols.includes(I)){o(new re("Unsupported protocol "+I+":",re.ERR_BAD_REQUEST,t));return}j.send(u||null)})},c2=(t,n)=>{if(t=t?t.filter(Boolean):[],!n&&!t.length)return;const r=new AbortController;let o=!1;const l=function(m){if(!o){o=!0,d();const x=m instanceof Error?m:this.reason;r.abort(x instanceof re?x:new Co(x instanceof Error?x.message:x))}};let u=n&&setTimeout(()=>{u=null,l(new re(`timeout of ${n}ms exceeded`,re.ETIMEDOUT))},n);const d=()=>{t&&(u&&clearTimeout(u),u=null,t.forEach(m=>{m.unsubscribe?m.unsubscribe(l):m.removeEventListener("abort",l)}),t=null)};t.forEach(m=>m.addEventListener("abort",l));const{signal:f}=r;return f.unsubscribe=()=>O.asap(d),f},u2=function*(t,n){let r=t.byteLength;if(r<n){yield t;return}let o=0,l;for(;o<r;)l=o+n,yield t.slice(o,l),o=l},d2=async function*(t,n){for await(const r of h2(t))yield*u2(r,n)},h2=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const n=t.getReader();try{for(;;){const{done:r,value:o}=await n.read();if(r)break;yield o}}finally{await n.cancel()}},Rm=(t,n,r,o)=>{const l=d2(t,n);let u=0,d,f=m=>{d||(d=!0,o&&o(m))};return new ReadableStream({async pull(m){try{const{done:x,value:g}=await l.next();if(x){f(),m.close();return}let v=g.byteLength;if(r){let w=u+=v;r(w)}m.enqueue(new Uint8Array(g))}catch(x){throw f(x),x}},cancel(m){return f(m),l.return()}},{highWaterMark:2})};function f2(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;const n=t.indexOf(",");if(n<0)return 0;const r=t.slice(5,n),o=t.slice(n+1);if(/;base64/i.test(r)){let d=o.length;const f=o.length;for(let A=0;A<f;A++)if(o.charCodeAt(A)===37&&A+2<f){const D=o.charCodeAt(A+1),k=o.charCodeAt(A+2);(D>=48&&D<=57||D>=65&&D<=70||D>=97&&D<=102)&&(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102)&&(d-=2,A+=2)}let m=0,x=f-1;const g=A=>A>=2&&o.charCodeAt(A-2)===37&&o.charCodeAt(A-1)===51&&(o.charCodeAt(A)===68||o.charCodeAt(A)===100);x>=0&&(o.charCodeAt(x)===61?(m++,x--):g(x)&&(m++,x-=3)),m===1&&x>=0&&(o.charCodeAt(x)===61||g(x))&&m++;const w=Math.floor(d/4)*3-(m||0);return w>0?w:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(o,"utf8");let u=0;for(let d=0,f=o.length;d<f;d++){const m=o.charCodeAt(d);if(m<128)u+=1;else if(m<2048)u+=2;else if(m>=55296&&m<=56319&&d+1<f){const x=o.charCodeAt(d+1);x>=56320&&x<=57343?(u+=4,d++):u+=3}else u+=3}return u}const Od="1.17.0",Pm=64*1024,{isFunction:$a}=O,p2=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(n,r)=>String.fromCharCode(parseInt(r,16))),Om=t=>{if(!O.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},Mm=(t,...n)=>{try{return!!t(...n)}catch{return!1}},m2=t=>{const n=t.indexOf("://");let r=t;return n!==-1&&(r=r.slice(n+3)),r.includes("@")||r.includes(":")},x2=t=>{const n=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:r,TextEncoder:o}=n;t=O.merge.call({skipUndefined:!0},{Request:n.Request,Response:n.Response},t);const{fetch:l,Request:u,Response:d}=t,f=l?$a(l):typeof fetch=="function",m=$a(u),x=$a(d);if(!f)return!1;const g=f&&$a(r),v=f&&(typeof o=="function"?(_=>I=>_.encode(I))(new o):async _=>new Uint8Array(await new u(_).arrayBuffer())),w=m&&g&&Mm(()=>{let _=!1;const I=new u(yt.origin,{body:new r,method:"POST",get duplex(){return _=!0,"half"}}),N=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),_&&!N}),A=x&&g&&Mm(()=>O.isReadableStream(new d("").body)),D={stream:A&&(_=>_.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!D[_]&&(D[_]=(I,N)=>{let S=I&&I[_];if(S)return S.call(I);throw new re(`Response type '${_}' is not supported`,re.ERR_NOT_SUPPORT,N)})});const k=async _=>{if(_==null)return 0;if(O.isBlob(_))return _.size;if(O.isSpecCompliantForm(_))return(await new u(yt.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(O.isArrayBufferView(_)||O.isArrayBuffer(_))return _.byteLength;if(O.isURLSearchParams(_)&&(_=_+""),O.isString(_))return(await v(_)).byteLength},j=async(_,I)=>{const N=O.toFiniteNumber(_.getContentLength());return N??k(I)};return async _=>{let{url:I,method:N,data:S,signal:B,cancelToken:H,timeout:Z,onDownloadProgress:$,onUploadProgress:le,responseType:ve,headers:fe,withCredentials:Me="same-origin",fetchOptions:Ke,maxContentLength:Oe,maxBodyLength:ze}=Yg(_);const De=O.isNumber(Oe)&&Oe>-1,Re=O.isNumber(ze)&&ze>-1,G=J=>O.hasOwnProp(_,J)?_[J]:void 0;let ae=l||fetch;ve=ve?(ve+"").toLowerCase():"text";let U=c2([B,H&&H.toAbortSignal()],Z),P=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ge;try{let J;const oe=G("auth");if(oe){const pe=oe.username||"",lt=oe.password||"";J={username:pe,password:lt}}if(m2(I)){const pe=new URL(I,yt.origin);if(!J&&(pe.username||pe.password)){const lt=Om(pe.username),kt=Om(pe.password);J={username:lt,password:kt}}(pe.username||pe.password)&&(pe.username="",pe.password="",I=pe.href)}if(J&&(fe.delete("authorization"),fe.set("Authorization","Basic "+btoa(p2((J.username||"")+":"+(J.password||""))))),De&&typeof I=="string"&&I.startsWith("data:")&&f2(I)>Oe)throw new re("maxContentLength size of "+Oe+" exceeded",re.ERR_BAD_RESPONSE,_,P);if(Re&&N!=="get"&&N!=="head"){const pe=await j(fe,S);if(typeof pe=="number"&&isFinite(pe)&&pe>ze)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,_,P)}if(le&&w&&N!=="get"&&N!=="head"&&(ge=await j(fe,S))!==0){let pe=new u(I,{method:"POST",body:S,duplex:"half"}),lt;if(O.isFormData(S)&&(lt=pe.headers.get("content-type"))&&fe.setContentType(lt),pe.body){const[kt,Ut]=_m(ge,ol(Tm(le)));S=Rm(pe.body,Pm,kt,Ut)}}O.isString(Me)||(Me=Me?"include":"omit");const he=m&&"credentials"in u.prototype;if(O.isFormData(S)){const pe=fe.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&fe.delete("content-type")}fe.set("User-Agent","axios/"+Od,!1);const Ae={...Ke,signal:U,method:N.toUpperCase(),headers:Ug(fe.normalize()),body:S,duplex:"half",credentials:he?Me:void 0};P=m&&new u(I,Ae);let be=await(m?ae(P,Ke):ae(I,Ae));if(De){const pe=O.toFiniteNumber(be.headers.get("content-length"));if(pe!=null&&pe>Oe)throw new re("maxContentLength size of "+Oe+" exceeded",re.ERR_BAD_RESPONSE,_,P)}const me=A&&(ve==="stream"||ve==="response");if(A&&be.body&&($||De||me&&z)){const pe={};["status","statusText","headers"].forEach(En=>{pe[En]=be[En]});const lt=O.toFiniteNumber(be.headers.get("content-length")),[kt,Ut]=$&&_m(lt,ol(Tm($),!0))||[];let ri=0;const Eo=En=>{if(De&&(ri=En,ri>Oe))throw new re("maxContentLength size of "+Oe+" exceeded",re.ERR_BAD_RESPONSE,_,P);kt&&kt(En)};be=new d(Rm(be.body,Pm,Eo,()=>{Ut&&Ut(),z&&z()}),pe)}ve=ve||"text";let $e=await D[O.findKey(D,ve)||"text"](be,_);if(De&&!A&&!me){let pe;if($e!=null&&(typeof $e.byteLength=="number"?pe=$e.byteLength:typeof $e.size=="number"?pe=$e.size:typeof $e=="string"&&(pe=typeof o=="function"?new o().encode($e).byteLength:$e.length)),typeof pe=="number"&&pe>Oe)throw new re("maxContentLength size of "+Oe+" exceeded",re.ERR_BAD_RESPONSE,_,P)}return!me&&z&&z(),await new Promise((pe,lt)=>{Qg(pe,lt,{data:$e,headers:_t.from(be.headers),status:be.status,statusText:be.statusText,config:_,request:P})})}catch(J){if(z&&z(),U&&U.aborted&&U.reason instanceof re){const oe=U.reason;throw oe.config=_,P&&(oe.request=P),J!==oe&&(oe.cause=J),oe}throw J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,_,P,J&&J.response),{cause:J.cause||J}):re.from(J,J&&J.code,_,P,J&&J.response)}}},g2=new Map,Kg=t=>{let n=t&&t.env||{};const{fetch:r,Request:o,Response:l}=n,u=[o,l,r];let d=u.length,f=d,m,x,g=g2;for(;f--;)m=u[f],x=g.get(m),x===void 0&&g.set(m,x=f?new Map:x2(n)),g=x;return x};Kg();const Md={http:MN,xhr:l2,fetch:{get:Kg}};O.forEach(Md,(t,n)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:n})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:n})}});const Lm=t=>`- ${t}`,y2=t=>O.isFunction(t)||t===null||t===!1;function v2(t,n){t=O.isArray(t)?t:[t];const{length:r}=t;let o,l;const u={};for(let d=0;d<r;d++){o=t[d];let f;if(l=o,!y2(o)&&(l=Md[(f=String(o)).toLowerCase()],l===void 0))throw new re(`Unknown adapter '${f}'`);if(l&&(O.isFunction(l)||(l=l.get(n))))break;u[f||"#"+d]=l}if(!l){const d=Object.entries(u).map(([m,x])=>`adapter ${m} `+(x===!1?"is not supported by the environment":"is not available in the build"));let f=r?d.length>1?`since :
`+d.map(Lm).join(`
`):" "+Lm(d[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return l}const Jg={getAdapter:v2,adapters:Md};function ku(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Co(null,t)}function Fm(t){return ku(t),t.headers=_t.from(t.headers),t.data=Cu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Jg.getAdapter(t.adapter||No.adapter,t)(t).then(function(o){ku(t),t.response=o;try{o.data=Cu.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=_t.from(o.headers),o},function(o){if(!Vg(o)&&(ku(t),o&&o.response)){t.response=o.response;try{o.response.data=Cu.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=_t.from(o.response.headers)}return Promise.reject(o)})}const gl={};["object","boolean","number","function","string","symbol"].forEach((t,n)=>{gl[t]=function(o){return typeof o===t||"a"+(n<1?"n ":" ")+t}});const Im={};gl.transitional=function(n,r,o){function l(u,d){return"[Axios v"+Od+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,f)=>{if(n===!1)throw new re(l(d," has been removed"+(r?" in "+r:"")),re.ERR_DEPRECATED);return r&&!Im[d]&&(Im[d]=!0,console.warn(l(d," has been deprecated since v"+r+" and will be removed in the near future"))),n?n(u,d,f):!0}};gl.spelling=function(n){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${n}`),!0)};function b2(t,n,r){if(typeof t!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let l=o.length;for(;l-- >0;){const u=o[l],d=Object.prototype.hasOwnProperty.call(n,u)?n[u]:void 0;if(d){const f=t[u],m=f===void 0||d(f,u,t);if(m!==!0)throw new re("option "+u+" must be "+m,re.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new re("Unknown option "+u,re.ERR_BAD_OPTION)}}const Ka={assertOptions:b2,validators:gl},Lt=Ka.validators;let ts=class{constructor(n){this.defaults=n||{},this.interceptors={request:new Am,response:new Am}}async request(n,r){try{return await this._request(n,r)}catch(o){if(o instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const u=(()=>{if(!l.stack)return"";const d=l.stack.indexOf(`
`);return d===-1?"":l.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(`
`),f=d===-1?-1:u.indexOf(`
`,d+1),m=f===-1?"":u.slice(f+1);String(o.stack).endsWith(m)||(o.stack+=`
`+u)}}catch{}}throw o}}_request(n,r){typeof n=="string"?(r=r||{},r.url=n):r=n||{},r=os(this.defaults,r);const{transitional:o,paramsSerializer:l,headers:u}=r;o!==void 0&&Ka.assertOptions(o,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean),legacyInterceptorReqResOrdering:Lt.transitional(Lt.boolean),advertiseZstdAcceptEncoding:Lt.transitional(Lt.boolean)},!1),l!=null&&(O.isFunction(l)?r.paramsSerializer={serialize:l}:Ka.assertOptions(l,{encode:Lt.function,serialize:Lt.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ka.assertOptions(r,{baseUrl:Lt.spelling("baseURL"),withXsrfToken:Lt.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[r.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],D=>{delete u[D]}),r.headers=_t.concat(d,u);const f=[];let m=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(r)===!1)return;m=m&&k.synchronous;const j=r.transitional||Rd;j&&j.legacyInterceptorReqResOrdering?f.unshift(k.fulfilled,k.rejected):f.push(k.fulfilled,k.rejected)});const x=[];this.interceptors.response.forEach(function(k){x.push(k.fulfilled,k.rejected)});let g,v=0,w;if(!m){const D=[Fm.bind(this),void 0];for(D.unshift(...f),D.push(...x),w=D.length,g=Promise.resolve(r);v<w;)g=g.then(D[v++],D[v++]);return g}w=f.length;let A=r;for(;v<w;){const D=f[v++],k=f[v++];try{A=D(A)}catch(j){k.call(this,j);break}}try{g=Fm.call(this,A)}catch(D){return Promise.reject(D)}for(v=0,w=x.length;v<w;)g=g.then(x[v++],x[v++]);return g}getUri(n){n=os(this.defaults,n);const r=Gg(n.baseURL,n.url,n.allowAbsoluteUrls);return qg(r,n.params,n.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(n){ts.prototype[n]=function(r,o){return this.request(os(o||{},{method:n,url:r,data:(o||{}).data}))}});O.forEach(["post","put","patch","query"],function(n){function r(o){return function(u,d,f){return this.request(os(f||{},{method:n,headers:o?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}ts.prototype[n]=r(),n!=="query"&&(ts.prototype[n+"Form"]=r(!0))});let w2=class Xg{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(u){r=u});const o=this;this.promise.then(l=>{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](l);o._listeners=null}),this.promise.then=l=>{let u;const d=new Promise(f=>{o.subscribe(f),u=f}).then(l);return d.cancel=function(){o.unsubscribe(u)},d},n(function(u,d,f){o.reason||(o.reason=new Co(u,d,f),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const r=this._listeners.indexOf(n);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const n=new AbortController,r=o=>{n.abort(o)};return this.subscribe(r),n.signal.unsubscribe=()=>this.unsubscribe(r),n.signal}static source(){let n;return{token:new Xg(function(l){n=l}),cancel:n}}};function j2(t){return function(r){return t.apply(null,r)}}function N2(t){return O.isObject(t)&&t.isAxiosError===!0}const ad={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ad).forEach(([t,n])=>{ad[n]=t});function Zg(t){const n=new ts(t),r=Rg(ts.prototype.request,n);return O.extend(r,ts.prototype,n,{allOwnKeys:!0}),O.extend(r,n,null,{allOwnKeys:!0}),r.create=function(l){return Zg(os(t,l))},r}const tt=Zg(No);tt.Axios=ts;tt.CanceledError=Co;tt.CancelToken=w2;tt.isCancel=Vg;tt.VERSION=Od;tt.toFormData=xl;tt.AxiosError=re;tt.Cancel=tt.CanceledError;tt.all=function(n){return Promise.all(n)};tt.spread=j2;tt.isAxiosError=N2;tt.mergeConfig=os;tt.AxiosHeaders=_t;tt.formToJSON=t=>Hg(O.isHTMLForm(t)?new FormData(t):t);tt.getAdapter=Jg.getAdapter;tt.HttpStatusCode=ad;tt.default=tt;const{Axios:ZS,AxiosError:eE,CanceledError:tE,isCancel:nE,CancelToken:rE,VERSION:sE,all:iE,Cancel:oE,isAxiosError:aE,spread:lE,toFormData:cE,AxiosHeaders:uE,HttpStatusCode:dE,formToJSON:hE,getAdapter:fE,mergeConfig:pE,create:mE}=tt,C2=typeof window>"u",Bm=!C2&&window.self!==window.top,Su=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),xt=[];for(let t=0;t<256;++t)xt.push((t+256).toString(16).slice(1));function k2(t,n=0){return(xt[t[n+0]]+xt[t[n+1]]+xt[t[n+2]]+xt[t[n+3]]+"-"+xt[t[n+4]]+xt[t[n+5]]+"-"+xt[t[n+6]]+xt[t[n+7]]+"-"+xt[t[n+8]]+xt[t[n+9]]+"-"+xt[t[n+10]]+xt[t[n+11]]+xt[t[n+12]]+xt[t[n+13]]+xt[t[n+14]]+xt[t[n+15]]).toLowerCase()}let Eu;const S2=new Uint8Array(16);function E2(){if(!Eu){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Eu=crypto.getRandomValues.bind(crypto)}return Eu(S2)}const A2=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Um={randomUUID:A2};function _2(t,n,r){var l;t=t||{};const o=t.random??((l=t.rng)==null?void 0:l.call(t))??E2();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,k2(o)}function T2(t,n,r){return Um.randomUUID&&!t?Um.randomUUID():_2(t)}const Vi=typeof window<"u"?window:{base44SharedInstances:{}};function D2(t,n){return Vi.base44SharedInstances||(Vi.base44SharedInstances={}),Vi.base44SharedInstances[t]||(Vi.base44SharedInstances[t]={instance:n()}),Vi.base44SharedInstances[t].instance}const R2="__user_heartbeat_event__",P2="__initialization_event__",O2="__session_duration_event__",zm="analytics-enable",$m="base44_analytics_session_id",M2={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},L2="analytics",Ue=D2(L2,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...M2,...q2()}})),F2=({axiosClient:t,serverUrl:n,appId:r,userAuthModule:o})=>{var l;const{maxQueueSize:u,throttleTime:d,batchSize:f}=Ue.config;if(!(!((l=Ue.config)===null||l===void 0)&&l.enabled))return{track:()=>{},cleanup:()=>{}};let m;const x=`${n}/api/apps/${r}/analytics/track/batch`,g=async N=>{await t.request({method:"POST",url:`/apps/${r}/analytics/track/batch`,data:{events:N}})},v=N=>{try{const S=JSON.stringify({events:N}),B=new Blob([S],{type:"application/json"});return typeof navigator>"u"||S.length>6e4||!navigator.sendBeacon(x,B)}catch{return!1}},w=async(N,S={})=>{if(N.length===0)return;const B=await W2(o),H=N.map($2(B));try{(!S.isBeacon||!v(H))&&await g(H)}catch{}},A=()=>{qm(w,{throttleTime:d,batchSize:f})},D=N=>{if(Ue.requestsQueue.length>=u)return;const S=z2();Ue.requestsQueue.push({...N,...S}),A()},k=()=>{qm(w,{throttleTime:d,batchSize:f}),m=Hm(D),B2()},j=()=>{Wm(),m==null||m(),U2(D);const N=Ue.requestsQueue.splice(0);w(N,{isBeacon:!0})},_=()=>{typeof window>"u"||(document.visibilityState==="hidden"?j():document.visibilityState==="visible"&&k())},I=()=>{Wm(),m==null||m(),typeof window<"u"&&window.removeEventListener("visibilitychange",_)};return A(),m=Hm(D),I2(D),typeof window<"u"&&window.addEventListener("visibilitychange",_),{track:D,cleanup:I}};function Wm(){Ue.isProcessing=!1}async function qm(t,n){if(Ue.isProcessing)return;Ue.isProcessing=!0;const{throttleTime:r=1e3,batchSize:o=30}=n??{};for(;Ue.isProcessing&&Ue.requestsQueue.length>0;){const l=Ue.requestsQueue.splice(0,o);l.length&&await t(l),await new Promise(u=>setTimeout(u,r))}Ue.isProcessing=!1}function Hm(t){var n;if(Ue.isHeartBeatProcessing||((n=Ue.config.heartBeatInterval)!==null&&n!==void 0?n:0)<10)return()=>{};Ue.isHeartBeatProcessing=!0;const r=setInterval(()=>{t({eventName:R2})},Ue.config.heartBeatInterval);return()=>{clearInterval(r),Ue.isHeartBeatProcessing=!1}}function I2(t){typeof window>"u"||Ue.wasInitializationTracked||(Ue.wasInitializationTracked=!0,t({eventName:P2,properties:{referrer:document==null?void 0:document.referrer}}))}function B2(){typeof window>"u"||Ue.sessionStartTime!==null||(Ue.sessionStartTime=new Date().toISOString())}function U2(t){if(typeof window>"u"||Ue.sessionStartTime===null)return;const n=new Date().getTime()-new Date(Ue.sessionStartTime).getTime();Ue.sessionStartTime=null,t({eventName:O2,properties:{sessionDuration:n}})}function z2(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function $2(t){return n=>({event_name:n.eventName,properties:n.properties,timestamp:n.timestamp,page_url:n.pageUrl,...t})}let Au=null;async function W2(t){if(!Ue.sessionContext){if(!Au){const n=Ld();Au=t.me().then(r=>({user_id:r.id,session_id:n})).catch(()=>({user_id:null,session_id:n}))}Ue.sessionContext=await Au}return Ue.sessionContext}function q2(){if(typeof window>"u")return;const n=new URLSearchParams(window.location.search).get(zm);if(n==null||!n.length)return;const r=new URLSearchParams(window.location.search);r.delete(zm);const o=window.location.pathname+(r.toString()?"?"+r.toString():"");return window.history.replaceState({},"",o),{enabled:n==="true"}}function Ld(){if(typeof window>"u")return Su();try{const t=localStorage.getItem($m);if(!t){const n=Su();return localStorage.setItem($m,n),n}return t}catch{return Su()}}class H2 extends Error{constructor(n,r,o,l,u){super(n),this.name="Base44Error",this.status=r,this.code=o,this.data=l,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Xi({baseURL:t,headers:n={},token:r,interceptResponses:o=!0,onError:l}){const u=tt.create({baseURL:t,headers:{"Content-Type":"application/json",Accept:"application/json",...n}});return r&&(u.defaults.headers.common.Authorization=`Bearer ${r}`),u.interceptors.request.use(d=>{typeof window<"u"&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",Ld()));const f=T2();if(d.requestId=f,Bm)try{window.parent.postMessage({type:"api-request-start",requestId:f,data:{url:t+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var f;const m=(f=d.config)===null||f===void 0?void 0:f.requestId;try{Bm&&m&&window.parent.postMessage({type:"api-request-end",requestId:m,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var f,m,x,g,v,w,A,D;const k=((m=(f=d.response)===null||f===void 0?void 0:f.data)===null||m===void 0?void 0:m.message)||((g=(x=d.response)===null||x===void 0?void 0:x.data)===null||g===void 0?void 0:g.detail)||d.message,j=new H2(k,(v=d.response)===null||v===void 0?void 0:v.status,(A=(w=d.response)===null||w===void 0?void 0:w.data)===null||A===void 0?void 0:A.code,(D=d.response)===null||D===void 0?void 0:D.data,d);return l==null||l(j),Promise.reject(j)}),u}function Vm(t){const{axios:n,appId:r,getSocket:o}=t;return new Proxy({},{get(l,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return Q2(n,r,u,o)}})}function V2(t){var n;try{const r=JSON.parse(t);return{type:r.type,data:r.data,id:r.id||((n=r.data)===null||n===void 0?void 0:n.id),timestamp:r.timestamp||new Date().toISOString()}}catch(r){return console.warn("[Base44 SDK] Failed to parse realtime message:",r),null}}function Q2(t,n,r,o){const l=`/apps/${n}/entities/${r}`;return{async list(u,d,f,m){const x={};return u&&(x.sort=u),d&&(x.limit=d),f&&(x.skip=f),m&&(x.fields=Array.isArray(m)?m.join(","):m),t.get(l,{params:x})},async filter(u,d,f,m,x){const g={q:JSON.stringify(u)};return d&&(g.sort=d),f&&(g.limit=f),m&&(g.skip=m),x&&(g.fields=Array.isArray(x)?x.join(","):x),t.get(l,{params:g})},async get(u){return t.get(`${l}/${u}`)},async create(u){return t.post(l,u)},async update(u,d){return t.put(`${l}/${u}`,d)},async delete(u){return t.delete(`${l}/${u}`)},async deleteMany(u){return t.delete(l,{data:u})},async bulkCreate(u){return t.post(`${l}/bulk`,u)},async updateMany(u,d){return t.patch(`${l}/update-many`,{query:u,data:d})},async bulkUpdate(u){return t.put(`${l}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),t.post(`${l}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${n}:${r}`;return o().subscribeToRoom(d,{update_model:x=>{var g;const v=V2(x.data);if(v){v.type!=="delete"&&(!((g=v.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${r}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${r}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(w){console.error("[Base44 SDK] Subscription callback error:",w)}}}})}}}function G2(t,n){return{async call(r,o,l){if(!(r!=null&&r.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...f}=l??{},m={...f,...u&&{path_params:u},...d&&{query_params:d}};return await t.post(`/apps/${n}/integrations/custom/${r}/${o}`,m)}}}function Qm(t,n){const r=G2(t,n);return new Proxy({},{get(o,l){if(!(typeof l!="string"||l==="then"||l.startsWith("_")))return l==="custom"?r:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async f=>{if(typeof f=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${f}`);let m,x;return f instanceof FormData||f&&Object.values(f).some(g=>g instanceof File)?(m=new FormData,Object.keys(f).forEach(g=>{f[g]instanceof File?m.append(g,f[g],f[g].name):typeof f[g]=="object"&&f[g]!==null?m.append(g,JSON.stringify(f[g])):m.append(g,f[g])}),x="multipart/form-data"):(m=f,x="application/json"),l==="Core"?t.post(`/apps/${n}/integration-endpoints/Core/${d}`,m||f,{headers:{"Content-Type":x}}):t.post(`/apps/${n}/integration-endpoints/installable/${l}/integration-endpoints/${d}`,m||f,{headers:{"Content-Type":x}})}}})}})}function Y2(){return typeof window>"u"?!1:window!==window.parent}function K2(t,n,r){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),f=window.open(t,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!f)return;const m=()=>{window.removeEventListener("message",x),clearInterval(g),f.closed||f.close()},x=v=>{var w;if(v.origin!==r||v.source!==f||!(!((w=v.data)===null||w===void 0)&&w.access_token))return;m();const A=new URL(n),{access_token:D,is_new_user:k}=v.data;A.searchParams.set("access_token",D),k!=null&&A.searchParams.set("is_new_user",String(k)),window.location.href=A.toString()},g=setInterval(()=>{f.closed&&m()},500);window.addEventListener("message",x)}function J2(t,n,r,o){return{async me(){return t.get(`/apps/${r}/entities/User/me`)},async updateMe(l){return t.put(`/apps/${r}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=l?new URL(l,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(l,u="/"){const d=new URL(u,window.location.origin).toString(),f=`app_id=${r}&from_url=${encodeURIComponent(d)}`;let m;l==="sso"?m=`/apps/${r}/auth/sso/login`:m=`/apps/auth${l==="google"?"":`/${l}`}/login`;const x=`${o.appBaseUrl}/api${m}?${f}`;if(Y2()){const g=`${x}&popup_origin=${encodeURIComponent(window.location.origin)}`;return K2(g,d,window.location.origin)}window.location.href=x},logout(l){if(delete t.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(f){console.error("Failed to remove token from localStorage:",f)}const u=l||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(l,u=!0){if(l&&(t.defaults.headers.common.Authorization=`Bearer ${l}`,n.defaults.headers.common.Authorization=`Bearer ${l}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(l,u,d){var f;try{const m=await t.post(`/apps/${r}/auth/login`,{email:l,password:u,...d&&{turnstile_token:d}}),{access_token:x,user:g}=m;return x&&this.setToken(x),{access_token:x,user:g}}catch(m){throw((f=m.response)===null||f===void 0?void 0:f.status)===401&&await this.logout(),m}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,u){return t.post(`/apps/${r}/users/invite-user`,{user_email:l,role:u})},register(l){return t.post(`/apps/${r}/auth/register`,l)},verifyOtp({email:l,otpCode:u}){return t.post(`/apps/${r}/auth/verify-otp`,{email:l,otp_code:u})},resendOtp(l){return t.post(`/apps/${r}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return t.post(`/apps/${r}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:u}){return t.post(`/apps/${r}/auth/reset-password`,{reset_token:l,new_password:u})},changePassword({userId:l,currentPassword:u,newPassword:d}){return t.post(`/apps/${r}/auth/change-password`,{user_id:l,current_password:u,new_password:d})}}}function X2(t,n){return{async getAccessToken(r){const o=`/apps/${n}/auth/sso/accesstoken/${r}`;return t.get(o)}}}function Z2(t,n){return{async getAccessToken(r){if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");return(await t.get(`/apps/${n}/external-auth/tokens/${r}`)).access_token},async getConnection(r){var o;if(!r||typeof r!="string")throw new Error("Integration type is required and must be a string");const u=await t.get(`/apps/${n}/external-auth/tokens/${r}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(r){var o;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const u=await t.get(`/apps/${n}/external-auth/tokens/connectors/${r}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.get(`/apps/${n}/app-user-auth/connectors/${r}/token`)).access_token},async getCurrentAppUserConnection(r){var o;if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");const u=await t.get(`/apps/${n}/app-user-auth/connectors/${r}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function e4(t,n){return{async connectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");return(await t.post(`/apps/${n}/app-user-auth/connectors/${r}/initiate`)).redirect_url},async disconnectAppUser(r){if(!r||typeof r!="string")throw new Error("Connector ID is required and must be a string");await t.delete(`/apps/${n}/app-user-auth/connectors/${r}`)}}}function lo(t={}){const{storageKey:n="base44_access_token",paramName:r="access_token",saveToStorage:o=!0,removeFromUrl:l=!0}=t;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(r),u){if(o&&t4(u,{storageKey:n}),l){d.delete(r);const f=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(n),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function t4(t,n){const{storageKey:r="base44_access_token"}=n;if(typeof window>"u"||!window.localStorage||!t)return!1;try{return window.localStorage.setItem(r,t),window.localStorage.setItem("token",t),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Gm(t,n,r){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,l=u=>{const d=new Headers;if(r!=null&&r.getAuthHeaders){const f=r.getAuthHeaders();Object.entries(f).forEach(([m,x])=>{x!=null&&d.set(m,String(x))})}return u&&new Headers(u).forEach((f,m)=>{d.set(m,f)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let f,m;return d instanceof FormData||d&&Object.values(d).some(x=>x instanceof File)?(f=new FormData,Object.keys(d).forEach(x=>{d[x]instanceof File?f.append(x,d[x],d[x].name):typeof d[x]=="object"&&d[x]!==null?f.append(x,JSON.stringify(d[x])):f.append(x,d[x])}),m="multipart/form-data"):(f=d,m="application/json"),t.post(`/apps/${n}/functions/${u}`,f||d,{headers:{"Content-Type":m}})},async fetch(u,d={}){const m=`/functions${u.startsWith("/")?u:`/${u}`}`,x=l(d.headers),g={...d,headers:x};return await fetch(o(r==null?void 0:r.baseURL,m),g)}}}function Ym({axios:t,getSocket:n,appId:r,serverUrl:o,token:l}){const u=`/apps/${r}/agents`,d={},f=()=>t.get(`${u}/conversations`),m=k=>t.get(`${u}/conversations/${k}`);return{getConversations:f,getConversation:m,listConversations:k=>t.get(`${u}/conversations`,{params:k}),createConversation:k=>t.post(`${u}/conversations`,k),addMessage:async(k,j)=>t.post(`${u}/conversations/v2/${k.id}/messages`,j),subscribeToConversation:(k,j)=>{const _=`/agent-conversations/${k}`,I=n(),N=m(k).then(S=>(d[k]=S,S));return I.subscribeToRoom(_,{connect:()=>{},update_model:async({data:S})=>{const B=JSON.parse(S);if(B._message){await N;const H=B._message,Z=d[k];if(Z){const $=Z.messages||[],le=$.findIndex(fe=>fe.id===H.id),ve=le!==-1?$.map((fe,Me)=>Me===le?H:fe):[...$,H];d[k]={...Z,messages:ve},j==null||j(d[k])}}}})},getWhatsAppConnectURL:k=>{const j=`${o}/api/apps/${r}/agents/${encodeURIComponent(k)}/whatsapp`,_=l??lo();return _?`${j}?token=${_}`:j},getTelegramConnectURL:k=>{const j=`${o}/api/apps/${r}/agents/${encodeURIComponent(k)}/telegram`,_=l??lo();return _?`${j}?token=${_}`:j}}}function Km(t,n){const r=`/app-logs/${n}`;return{async logUserInApp(o){await t.post(`${r}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await t.get(r,{params:o})},async getStats(o={}){return await t.get(`${r}/stats`,{params:o})}}}function n4(t,n){return{async inviteUser(r,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await t.post(`/apps/${n}/runtime/users/invite-user`,{user_email:r,role:o})}}}const Sn=Object.create(null);Sn.open="0";Sn.close="1";Sn.ping="2";Sn.pong="3";Sn.message="4";Sn.upgrade="5";Sn.noop="6";const Ja=Object.create(null);Object.keys(Sn).forEach(t=>{Ja[Sn[t]]=t});const ld={type:"error",data:"parser error"},ey=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ty=typeof ArrayBuffer=="function",ny=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Fd=({type:t,data:n},r,o)=>ey&&n instanceof Blob?r?o(n):Jm(n,o):ty&&(n instanceof ArrayBuffer||ny(n))?r?o(n):Jm(new Blob([n]),o):o(Sn[t]+(n||"")),Jm=(t,n)=>{const r=new FileReader;return r.onload=function(){const o=r.result.split(",")[1];n("b"+(o||""))},r.readAsDataURL(t)};function Xm(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let _u;function r4(t,n){if(ey&&t.data instanceof Blob)return t.data.arrayBuffer().then(Xm).then(n);if(ty&&(t.data instanceof ArrayBuffer||ny(t.data)))return n(Xm(t.data));Fd(t,!1,r=>{_u||(_u=new TextEncoder),n(_u.encode(r))})}const Zm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Zm.length;t++)Zi[Zm.charCodeAt(t)]=t;const s4=t=>{let n=t.length*.75,r=t.length,o,l=0,u,d,f,m;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);const x=new ArrayBuffer(n),g=new Uint8Array(x);for(o=0;o<r;o+=4)u=Zi[t.charCodeAt(o)],d=Zi[t.charCodeAt(o+1)],f=Zi[t.charCodeAt(o+2)],m=Zi[t.charCodeAt(o+3)],g[l++]=u<<2|d>>4,g[l++]=(d&15)<<4|f>>2,g[l++]=(f&3)<<6|m&63;return x},i4=typeof ArrayBuffer=="function",Id=(t,n)=>{if(typeof t!="string")return{type:"message",data:ry(t,n)};const r=t.charAt(0);return r==="b"?{type:"message",data:o4(t.substring(1),n)}:Ja[r]?t.length>1?{type:Ja[r],data:t.substring(1)}:{type:Ja[r]}:ld},o4=(t,n)=>{if(i4){const r=s4(t);return ry(r,n)}else return{base64:!0,data:t}},ry=(t,n)=>{switch(n){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},sy="",a4=(t,n)=>{const r=t.length,o=new Array(r);let l=0;t.forEach((u,d)=>{Fd(u,!1,f=>{o[d]=f,++l===r&&n(o.join(sy))})})},l4=(t,n)=>{const r=t.split(sy),o=[];for(let l=0;l<r.length;l++){const u=Id(r[l],n);if(o.push(u),u.type==="error")break}return o};function c4(){return new TransformStream({transform(t,n){r4(t,r=>{const o=r.length;let l;if(o<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,o);else if(o<65536){l=new Uint8Array(3);const u=new DataView(l.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{l=new Uint8Array(9);const u=new DataView(l.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(l[0]|=128),n.enqueue(l),n.enqueue(r)})}})}let Tu;function Wa(t){return t.reduce((n,r)=>n+r.length,0)}function qa(t,n){if(t[0].length===n)return t.shift();const r=new Uint8Array(n);let o=0;for(let l=0;l<n;l++)r[l]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),r}function u4(t,n){Tu||(Tu=new TextDecoder);const r=[];let o=0,l=-1,u=!1;return new TransformStream({transform(d,f){for(r.push(d);;){if(o===0){if(Wa(r)<1)break;const m=qa(r,1);u=(m[0]&128)===128,l=m[0]&127,l<126?o=3:l===126?o=1:o=2}else if(o===1){if(Wa(r)<2)break;const m=qa(r,2);l=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),o=3}else if(o===2){if(Wa(r)<8)break;const m=qa(r,8),x=new DataView(m.buffer,m.byteOffset,m.length),g=x.getUint32(0);if(g>Math.pow(2,21)-1){f.enqueue(ld);break}l=g*Math.pow(2,32)+x.getUint32(4),o=3}else{if(Wa(r)<l)break;const m=qa(r,l);f.enqueue(Id(u?m:Tu.decode(m),n)),o=0}if(l===0||l>t){f.enqueue(ld);break}}}})}const iy=4;function rt(t){if(t)return d4(t)}function d4(t){for(var n in rt.prototype)t[n]=rt.prototype[n];return t}rt.prototype.on=rt.prototype.addEventListener=function(t,n){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(n),this};rt.prototype.once=function(t,n){function r(){this.off(t,r),n.apply(this,arguments)}return r.fn=n,this.on(t,r),this};rt.prototype.off=rt.prototype.removeListener=rt.prototype.removeAllListeners=rt.prototype.removeEventListener=function(t,n){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,l=0;l<r.length;l++)if(o=r[l],o===n||o.fn===n){r.splice(l,1);break}return r.length===0&&delete this._callbacks["$"+t],this};rt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var n=new Array(arguments.length-1),r=this._callbacks["$"+t],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,l=r.length;o<l;++o)r[o].apply(this,n)}return this};rt.prototype.emitReserved=rt.prototype.emit;rt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};rt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const yl=typeof Promise=="function"&&typeof Promise.resolve=="function"?n=>Promise.resolve().then(n):(n,r)=>r(n,0),en=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),h4="arraybuffer";function oy(t,...n){return n.reduce((r,o)=>(t.hasOwnProperty(o)&&(r[o]=t[o]),r),{})}const f4=en.setTimeout,p4=en.clearTimeout;function vl(t,n){n.useNativeTimers?(t.setTimeoutFn=f4.bind(en),t.clearTimeoutFn=p4.bind(en)):(t.setTimeoutFn=en.setTimeout.bind(en),t.clearTimeoutFn=en.clearTimeout.bind(en))}const m4=1.33;function x4(t){return typeof t=="string"?g4(t):Math.ceil((t.byteLength||t.size)*m4)}function g4(t){let n=0,r=0;for(let o=0,l=t.length;o<l;o++)n=t.charCodeAt(o),n<128?r+=1:n<2048?r+=2:n<55296||n>=57344?r+=3:(o++,r+=4);return r}function ay(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function y4(t){let n="";for(let r in t)t.hasOwnProperty(r)&&(n.length&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return n}function v4(t){let n={},r=t.split("&");for(let o=0,l=r.length;o<l;o++){let u=r[o].split("=");n[decodeURIComponent(u[0])]=decodeURIComponent(u[1])}return n}class b4 extends Error{constructor(n,r,o){super(n),this.description=r,this.context=o,this.type="TransportError"}}class Bd extends rt{constructor(n){super(),this.writable=!1,vl(this,n),this.opts=n,this.query=n.query,this.socket=n.socket,this.supportsBinary=!n.forceBase64}onError(n,r,o){return super.emitReserved("error",new b4(n,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(n){this.readyState==="open"&&this.write(n)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(n){const r=Id(n,this.socket.binaryType);this.onPacket(r)}onPacket(n){super.emitReserved("packet",n)}onClose(n){this.readyState="closed",super.emitReserved("close",n)}pause(n){}createUri(n,r={}){return n+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const n=this.opts.hostname;return n.indexOf(":")===-1?n:"["+n+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(n){const r=y4(n);return r.length?"?"+r:""}}class w4 extends Bd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(n){this.readyState="pausing";const r=()=>{this.readyState="paused",n()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(n){const r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};l4(n,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const n=()=>{this.write([{type:"close"}])};this.readyState==="open"?n():this.once("open",n)}write(n){this.writable=!1,a4(n,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const n=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=ay()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(n,r)}}let ly=!1;try{ly=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const j4=ly;function N4(){}class C4 extends w4{constructor(n){if(super(n),typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&n.hostname!==location.hostname||o!==n.port}}doWrite(n,r){const o=this.request({method:"POST",data:n});o.on("success",r),o.on("error",(l,u)=>{this.onError("xhr post error",l,u)})}doPoll(){const n=this.request();n.on("data",this.onData.bind(this)),n.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=n}}class Cn extends rt{constructor(n,r,o){super(),this.createRequest=n,vl(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var n;const r=oy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&o.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(n=this._opts.cookieJar)===null||n===void 0||n.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var l;o.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=Cn.requestsCount++,Cn.requests[this._index]=this)}_onError(n){this.emitReserved("error",n,this._xhr),this._cleanup(!0)}_cleanup(n){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=N4,n)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Cn.requests[this._index],this._xhr=null}}_onLoad(){const n=this._xhr.responseText;n!==null&&(this.emitReserved("data",n),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Cn.requestsCount=0;Cn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ex);else if(typeof addEventListener=="function"){const t="onpagehide"in en?"pagehide":"unload";addEventListener(t,ex,!1)}}function ex(){for(let t in Cn.requests)Cn.requests.hasOwnProperty(t)&&Cn.requests[t].abort()}const k4=(function(){const t=cy({xdomain:!1});return t&&t.responseType!==null})();class S4 extends C4{constructor(n){super(n);const r=n&&n.forceBase64;this.supportsBinary=k4&&!r}request(n={}){return Object.assign(n,{xd:this.xd},this.opts),new Cn(cy,this.uri(),n)}}function cy(t){const n=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!n||j4))return new XMLHttpRequest}catch{}if(!n)try{return new en[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const uy=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class E4 extends Bd{get name(){return"websocket"}doOpen(){const n=this.uri(),r=this.opts.protocols,o=uy?{}:oy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(n,r,o)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=n=>this.onClose({description:"websocket connection closed",context:n}),this.ws.onmessage=n=>this.onData(n.data),this.ws.onerror=n=>this.onError("websocket error",n)}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const o=n[r],l=r===n.length-1;Fd(o,this.supportsBinary,u=>{try{this.doWrite(o,u)}catch{}l&&yl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const n=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=ay()),this.supportsBinary||(r.b64=1),this.createUri(n,r)}}const Du=en.WebSocket||en.MozWebSocket;class A4 extends E4{createSocket(n,r,o){return uy?new Du(n,r,o):r?new Du(n,r):new Du(n)}doWrite(n,r){this.ws.send(r)}}class _4 extends Bd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(n){return this.emitReserved("error",n)}this._transport.closed.then(()=>{this.onClose()}).catch(n=>{this.onError("webtransport error",n)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(n=>{const r=u4(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=n.readable.pipeThrough(r).getReader(),l=c4();l.readable.pipeTo(n.writable),this._writer=l.writable.getWriter();const u=()=>{o.read().then(({done:f,value:m})=>{f||(this.onPacket(m),u())}).catch(f=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(n){this.writable=!1;for(let r=0;r<n.length;r++){const o=n[r],l=r===n.length-1;this._writer.write(o).then(()=>{l&&yl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var n;(n=this._transport)===null||n===void 0||n.close()}}const T4={websocket:A4,webtransport:_4,polling:S4},D4=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,R4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function cd(t){if(t.length>8e3)throw"URI too long";const n=t,r=t.indexOf("["),o=t.indexOf("]");r!=-1&&o!=-1&&(t=t.substring(0,r)+t.substring(r,o).replace(/:/g,";")+t.substring(o,t.length));let l=D4.exec(t||""),u={},d=14;for(;d--;)u[R4[d]]=l[d]||"";return r!=-1&&o!=-1&&(u.source=n,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=P4(u,u.path),u.queryKey=O4(u,u.query),u}function P4(t,n){const r=/\/{2,9}/g,o=n.replace(r,"/").split("/");return(n.slice(0,1)=="/"||n.length===0)&&o.splice(0,1),n.slice(-1)=="/"&&o.splice(o.length-1,1),o}function O4(t,n){const r={};return n.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,l,u){l&&(r[l]=u)}),r}const ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xa=[];ud&&addEventListener("offline",()=>{Xa.forEach(t=>t())},!1);class Nr extends rt{constructor(n,r){if(super(),this.binaryType=h4,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,n&&typeof n=="object"&&(r=n,n=null),n){const o=cd(n);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=cd(r.host).host);vl(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{const l=o.prototype.name;this.transports.push(l),this._transportsByName[l]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=v4(this.opts.query)),ud&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Xa.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(n){const r=Object.assign({},this.opts.query);r.EIO=iy,r.transport=n,this.id&&(r.sid=this.id);const o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[n]);return new this._transportsByName[n](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const n=this.opts.rememberUpgrade&&Nr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(n);r.open(),this.setTransport(r)}setTransport(n){this.transport&&this.transport.removeAllListeners(),this.transport=n,n.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Nr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",n),this.emitReserved("heartbeat"),n.type){case"open":this.onHandshake(JSON.parse(n.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=n.data,this._onError(r);break;case"message":this.emitReserved("data",n.data),this.emitReserved("message",n.data);break}}onHandshake(n){this.emitReserved("handshake",n),this.id=n.sid,this.transport.query.sid=n.sid,this._pingInterval=n.pingInterval,this._pingTimeout=n.pingTimeout,this._maxPayload=n.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const n=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+n,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},n),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const n=this._getWritablePackets();this.transport.send(n),this._prevBufferLen=n.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){const l=this.writeBuffer[o].data;if(l&&(r+=x4(l)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const n=Date.now()>this._pingTimeoutTime;return n&&(this._pingTimeoutTime=0,yl(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),n}write(n,r,o){return this._sendPacket("message",n,r,o),this}send(n,r,o){return this._sendPacket("message",n,r,o),this}_sendPacket(n,r,o,l){if(typeof r=="function"&&(l=r,r=void 0),typeof o=="function"&&(l=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:n,data:r,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),l&&this.once("flush",l),this.flush()}close(){const n=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),n()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():n()}):this.upgrading?o():n()),this}_onError(n){if(Nr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",n),this._onClose("transport error",n)}_onClose(n,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Xa.indexOf(this._offlineEventListener);o!==-1&&Xa.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",n,r),this.writeBuffer=[],this._prevBufferLen=0}}}Nr.protocol=iy;class M4 extends Nr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let n=0;n<this._upgrades.length;n++)this._probe(this._upgrades[n])}_probe(n){let r=this.createTransport(n),o=!1;Nr.priorWebsocketSuccess=!1;const l=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Nr.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(g(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function u(){o||(o=!0,g(),r.close(),r=null)}const d=v=>{const w=new Error("probe error: "+v);w.transport=r.name,u(),this.emitReserved("upgradeError",w)};function f(){d("transport closed")}function m(){d("socket closed")}function x(v){r&&v.name!==r.name&&u()}const g=()=>{r.removeListener("open",l),r.removeListener("error",d),r.removeListener("close",f),this.off("close",m),this.off("upgrading",x)};r.once("open",l),r.once("error",d),r.once("close",f),this.once("close",m),this.once("upgrading",x),this._upgrades.indexOf("webtransport")!==-1&&n!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(n){this._upgrades=this._filterUpgrades(n.upgrades),super.onHandshake(n)}_filterUpgrades(n){const r=[];for(let o=0;o<n.length;o++)~this.transports.indexOf(n[o])&&r.push(n[o]);return r}}let L4=class extends M4{constructor(n,r={}){const o=typeof n=="object"?n:r;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(l=>T4[l]).filter(l=>!!l)),super(n,o)}};function F4(t,n="",r){let o=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),o=cd(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+n,o.href=o.protocol+"://"+u+(r&&r.port===o.port?"":":"+o.port),o}const I4=typeof ArrayBuffer=="function",B4=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,dy=Object.prototype.toString,U4=typeof Blob=="function"||typeof Blob<"u"&&dy.call(Blob)==="[object BlobConstructor]",z4=typeof File=="function"||typeof File<"u"&&dy.call(File)==="[object FileConstructor]";function Ud(t){return I4&&(t instanceof ArrayBuffer||B4(t))||U4&&t instanceof Blob||z4&&t instanceof File}function Za(t,n){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,o=t.length;r<o;r++)if(Za(t[r]))return!0;return!1}if(Ud(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Za(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Za(t[r]))return!0;return!1}function $4(t){const n=[],r=t.data,o=t;return o.data=dd(r,n),o.attachments=n.length,{packet:o,buffers:n}}function dd(t,n){if(!t)return t;if(Ud(t)){const r={_placeholder:!0,num:n.length};return n.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let o=0;o<t.length;o++)r[o]=dd(t[o],n);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=dd(t[o],n));return r}return t}function W4(t,n){return t.data=hd(t.data,n),delete t.attachments,t}function hd(t,n){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<n.length)return n[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=hd(t[r],n);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=hd(t[r],n));return t}const q4=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ee;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Ee||(Ee={}));class H4{constructor(n){this.replacer=n}encode(n){return(n.type===Ee.EVENT||n.type===Ee.ACK)&&Za(n)?this.encodeAsBinary({type:n.type===Ee.EVENT?Ee.BINARY_EVENT:Ee.BINARY_ACK,nsp:n.nsp,data:n.data,id:n.id}):[this.encodeAsString(n)]}encodeAsString(n){let r=""+n.type;return(n.type===Ee.BINARY_EVENT||n.type===Ee.BINARY_ACK)&&(r+=n.attachments+"-"),n.nsp&&n.nsp!=="/"&&(r+=n.nsp+","),n.id!=null&&(r+=n.id),n.data!=null&&(r+=JSON.stringify(n.data,this.replacer)),r}encodeAsBinary(n){const r=$4(n),o=this.encodeAsString(r.packet),l=r.buffers;return l.unshift(o),l}}class zd extends rt{constructor(n){super(),this.reviver=n}add(n){let r;if(typeof n=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(n);const o=r.type===Ee.BINARY_EVENT;o||r.type===Ee.BINARY_ACK?(r.type=o?Ee.EVENT:Ee.ACK,this.reconstructor=new V4(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ud(n)||n.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(n),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+n)}decodeString(n){let r=0;const o={type:Number(n.charAt(0))};if(Ee[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ee.BINARY_EVENT||o.type===Ee.BINARY_ACK){const u=r+1;for(;n.charAt(++r)!=="-"&&r!=n.length;);const d=n.substring(u,r);if(d!=Number(d)||n.charAt(r)!=="-")throw new Error("Illegal attachments");o.attachments=Number(d)}if(n.charAt(r+1)==="/"){const u=r+1;for(;++r&&!(n.charAt(r)===","||r===n.length););o.nsp=n.substring(u,r)}else o.nsp="/";const l=n.charAt(r+1);if(l!==""&&Number(l)==l){const u=r+1;for(;++r;){const d=n.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===n.length)break}o.id=Number(n.substring(u,r+1))}if(n.charAt(++r)){const u=this.tryParse(n.substr(r));if(zd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(n){try{return JSON.parse(n,this.reviver)}catch{return!1}}static isPayloadValid(n,r){switch(n){case Ee.CONNECT:return tx(r);case Ee.DISCONNECT:return r===void 0;case Ee.CONNECT_ERROR:return typeof r=="string"||tx(r);case Ee.EVENT:case Ee.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&q4.indexOf(r[0])===-1);case Ee.ACK:case Ee.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class V4{constructor(n){this.packet=n,this.buffers=[],this.reconPack=n}takeBinaryData(n){if(this.buffers.push(n),this.buffers.length===this.reconPack.attachments){const r=W4(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function tx(t){return Object.prototype.toString.call(t)==="[object Object]"}const Q4=Object.freeze(Object.defineProperty({__proto__:null,Decoder:zd,Encoder:H4,get PacketType(){return Ee}},Symbol.toStringTag,{value:"Module"}));function dn(t,n,r){return t.on(n,r),function(){t.off(n,r)}}const G4=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class hy extends rt{constructor(n,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=n,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const n=this.io;this.subs=[dn(n,"open",this.onopen.bind(this)),dn(n,"packet",this.onpacket.bind(this)),dn(n,"error",this.onerror.bind(this)),dn(n,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...n){return n.unshift("message"),this.emit.apply(this,n),this}emit(n,...r){var o,l,u;if(G4.hasOwnProperty(n))throw new Error('"'+n.toString()+'" is a reserved event name');if(r.unshift(n),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ee.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const g=this.ids++,v=r.pop();this._registerAckCallback(g,v),d.id=g}const f=(l=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||l===void 0?void 0:l.writable,m=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!f||(m?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(n,r){var o;const l=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(l===void 0){this.acks[n]=r;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[n];for(let f=0;f<this.sendBuffer.length;f++)this.sendBuffer[f].id===n&&this.sendBuffer.splice(f,1);r.call(this,new Error("operation has timed out"))},l),d=(...f)=>{this.io.clearTimeoutFn(u),r.apply(this,f)};d.withError=!0,this.acks[n]=d}emitWithAck(n,...r){return new Promise((o,l)=>{const u=(d,f)=>d?l(d):o(f);u.withError=!0,r.push(u),this.emit(n,...r)})}_addToQueue(n){let r;typeof n[n.length-1]=="function"&&(r=n.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:n,flags:Object.assign({fromQueue:!0},this.flags)};n.push((l,...u)=>(this._queue[0],l!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(l)):(this._queue.shift(),r&&r(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(n=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!n||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(n){n.nsp=this.nsp,this.io._packet(n)}onopen(){typeof this.auth=="function"?this.auth(n=>{this._sendConnectPacket(n)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(n){this.packet({type:Ee.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},n):n})}onerror(n){this.connected||this.emitReserved("connect_error",n)}onclose(n,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",n,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(n=>{if(!this.sendBuffer.some(o=>String(o.id)===n)){const o=this.acks[n];delete this.acks[n],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(n){if(n.nsp===this.nsp)switch(n.type){case Ee.CONNECT:n.data&&n.data.sid?this.onconnect(n.data.sid,n.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ee.EVENT:case Ee.BINARY_EVENT:this.onevent(n);break;case Ee.ACK:case Ee.BINARY_ACK:this.onack(n);break;case Ee.DISCONNECT:this.ondisconnect();break;case Ee.CONNECT_ERROR:this.destroy();const o=new Error(n.data.message);o.data=n.data.data,this.emitReserved("connect_error",o);break}}onevent(n){const r=n.data||[];n.id!=null&&r.push(this.ack(n.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(n){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const o of r)o.apply(this,n)}super.emit.apply(this,n),this._pid&&n.length&&typeof n[n.length-1]=="string"&&(this._lastOffset=n[n.length-1])}ack(n){const r=this;let o=!1;return function(...l){o||(o=!0,r.packet({type:Ee.ACK,id:n,data:l}))}}onack(n){const r=this.acks[n.id];typeof r=="function"&&(delete this.acks[n.id],r.withError&&n.data.unshift(null),r.apply(this,n.data))}onconnect(n,r){this.id=n,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(n=>this.emitEvent(n)),this.receiveBuffer=[],this.sendBuffer.forEach(n=>{this.notifyOutgoingListeners(n),this.packet(n)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(n=>n()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ee.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(n){return this.flags.compress=n,this}get volatile(){return this.flags.volatile=!0,this}timeout(n){return this.flags.timeout=n,this}onAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(n),this}prependAny(n){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(n),this}offAny(n){if(!this._anyListeners)return this;if(n){const r=this._anyListeners;for(let o=0;o<r.length;o++)if(n===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(n),this}prependAnyOutgoing(n){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(n),this}offAnyOutgoing(n){if(!this._anyOutgoingListeners)return this;if(n){const r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(n===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(n){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const o of r)o.apply(this,n.data)}}}function ni(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}ni.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var n=Math.random(),r=Math.floor(n*this.jitter*t);t=(Math.floor(n*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};ni.prototype.reset=function(){this.attempts=0};ni.prototype.setMin=function(t){this.ms=t};ni.prototype.setMax=function(t){this.max=t};ni.prototype.setJitter=function(t){this.jitter=t};class fd extends rt{constructor(n,r){var o;super(),this.nsps={},this.subs=[],n&&typeof n=="object"&&(r=n,n=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,vl(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new ni({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=n;const l=r.parser||Q4;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(n){return arguments.length?(this._reconnection=!!n,n||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(n){return n===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=n,this)}reconnectionDelay(n){var r;return n===void 0?this._reconnectionDelay:(this._reconnectionDelay=n,(r=this.backoff)===null||r===void 0||r.setMin(n),this)}randomizationFactor(n){var r;return n===void 0?this._randomizationFactor:(this._randomizationFactor=n,(r=this.backoff)===null||r===void 0||r.setJitter(n),this)}reconnectionDelayMax(n){var r;return n===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=n,(r=this.backoff)===null||r===void 0||r.setMax(n),this)}timeout(n){return arguments.length?(this._timeout=n,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(n){if(~this._readyState.indexOf("open"))return this;this.engine=new L4(this.uri,this.opts);const r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const l=dn(r,"open",function(){o.onopen(),n&&n()}),u=f=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",f),n?n(f):this.maybeReconnectOnOpen()},d=dn(r,"error",u);if(this._timeout!==!1){const f=this._timeout,m=this.setTimeoutFn(()=>{l(),u(new Error("timeout")),r.close()},f);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(l),this.subs.push(d),this}connect(n){return this.open(n)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const n=this.engine;this.subs.push(dn(n,"ping",this.onping.bind(this)),dn(n,"data",this.ondata.bind(this)),dn(n,"error",this.onerror.bind(this)),dn(n,"close",this.onclose.bind(this)),dn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(n){try{this.decoder.add(n)}catch(r){this.onclose("parse error",r)}}ondecoded(n){yl(()=>{this.emitReserved("packet",n)},this.setTimeoutFn)}onerror(n){this.emitReserved("error",n)}socket(n,r){let o=this.nsps[n];return o?this._autoConnect&&!o.active&&o.connect():(o=new hy(this,n,r),this.nsps[n]=o),o}_destroy(n){const r=Object.keys(this.nsps);for(const o of r)if(this.nsps[o].active)return;this._close()}_packet(n){const r=this.encoder.encode(n);for(let o=0;o<r.length;o++)this.engine.write(r[o],n.options)}cleanup(){this.subs.forEach(n=>n()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(n,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",n,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const n=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{n.skipReconnect||(this.emitReserved("reconnect_attempt",n.backoff.attempts),!n.skipReconnect&&n.open(l=>{l?(n._reconnecting=!1,n.reconnect(),this.emitReserved("reconnect_error",l)):n.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const n=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",n)}}const Qi={};function el(t,n){typeof t=="object"&&(n=t,t=void 0),n=n||{};const r=F4(t,n.path||"/socket.io"),o=r.source,l=r.id,u=r.path,d=Qi[l]&&u in Qi[l].nsps,f=n.forceNew||n["force new connection"]||n.multiplex===!1||d;let m;return f?m=new fd(o,n):(Qi[l]||(Qi[l]=new fd(o,n)),m=Qi[l]),r.query&&!n.query&&(n.query=r.queryKey),m.socket(r.path,n)}Object.assign(el,{Manager:fd,Socket:hy,io:el,connect:el});const Y4=250;function nx(t,n){var r;const o=(r=t.token)!==null&&r!==void 0?r:lo(),l={app_id:t.appId,token:o};o||(l.anonymous_id=Ld());const u=el(t.serverUrl,{path:t.mountPath,transports:t.transports,query:l});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=n.connect)===null||d===void 0?void 0:d.call(n)}),u.on("update_model",async d=>{var f;return(f=n.update_model)===null||f===void 0?void 0:f.call(n,d)}),u.on("error",async d=>{var f;return(f=n.error)===null||f===void 0?void 0:f.call(n,d)}),u.on("connect_error",async d=>{var f;return console.error("connect_error",d),(f=n.error)===null||f===void 0?void 0:f.call(n,d)}),u}function K4({config:t}){let n={...t};const r={},o={},l={connect:async()=>{const _=[];Object.keys(r).forEach(I=>{const N=w(I);N.length!==0&&(x(I),N.forEach(({connect:S})=>{const B=async()=>S==null?void 0:S();_.push(B())}))}),await Promise.all(_)},update_model:async _=>{const N=w(_.room).map(S=>{var B;return(B=S.update_model)===null||B===void 0?void 0:B.call(S,_)});await Promise.all(N)},error:async _=>{console.error("error",_);const I=Object.values(r).flat().map(N=>{var S;return(S=N.error)===null||S===void 0?void 0:S.call(N,_)});await Promise.all(I)}};let u=nx(t,l);function d(){f()}function f(){D(),u&&u.disconnect()}function m(_){d(),n={...n,..._},u=nx(n,l)}function x(_){u.emit("join",_)}function g(_){u.emit("leave",_)}async function v(_,I){var N;const S=JSON.stringify(I);return(N=l.update_model)===null||N===void 0?void 0:N.call(l,{room:_,data:S})}function w(_){var I;return(I=r[_])!==null&&I!==void 0?I:[]}function A(_){const I=o[_];I&&(clearTimeout(I),delete o[_])}function D(){Object.keys(o).forEach(_=>{var I,N;clearTimeout(o[_]),delete o[_],((N=(I=r[_])===null||I===void 0?void 0:I.length)!==null&&N!==void 0?N:0)===0&&delete r[_]})}function k(_){A(_),o[_]=setTimeout(()=>{var I,N;delete o[_],!(((N=(I=r[_])===null||I===void 0?void 0:I.length)!==null&&N!==void 0?N:0)>0)&&(g(_),delete r[_])},Y4)}return{socket:u,subscribeToRoom:(_,I)=>{r[_]?A(_):(x(_),r[_]=[]),r[_].push(I);let N=!1;return()=>{var S,B;N||(N=!0,r[_]=(B=(S=r[_])===null||S===void 0?void 0:S.filter(H=>H!==I))!==null&&B!==void 0?B:[],r[_].length===0&&k(_))}},updateConfig:m,updateModel:v,disconnect:f}}function J4(t){var n,r;const{serverUrl:o="https://base44.app",appId:l,token:u,serviceToken:d,requiresAuth:f=!1,appBaseUrl:m,options:x,functionsVersion:g,headers:v}=t,w=typeof m=="string"?m:"",A={serverUrl:o,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:l,token:u};let D=null;const k=()=>(D||(D=K4({config:A})),D),j={...v,"X-App-Id":String(l)},_=g?{...j,"Base44-Functions-Version":g}:j,I=Xi({baseURL:`${o}/api`,headers:j,token:u,onError:x==null?void 0:x.onError}),N=Xi({baseURL:`${o}/api`,headers:_,token:u,interceptResponses:!1,onError:x==null?void 0:x.onError}),S={...j,...u?{"on-behalf-of":`Bearer ${u}`}:{}},B=Xi({baseURL:`${o}/api`,headers:S,token:d,onError:x==null?void 0:x.onError}),H=Xi({baseURL:`${o}/api`,headers:_,token:d,interceptResponses:!1}),Z=J2(I,N,l,{appBaseUrl:w});if(typeof window<"u"){const fe=u||lo();fe&&Z.setToken(fe)}const $={entities:Vm({axios:I,appId:l,getSocket:k}),integrations:Qm(I,l),connectors:e4(I,l),auth:Z,functions:Gm(N,l,{getAuthHeaders:()=>{const fe={},Me=u||lo();return Me&&(fe.Authorization=`Bearer ${Me}`),fe},baseURL:(n=N.defaults)===null||n===void 0?void 0:n.baseURL}),agents:Ym({axios:I,getSocket:k,appId:l,serverUrl:o,token:u}),appLogs:Km(I,l),users:n4(I,l),analytics:F2({axiosClient:I,serverUrl:o,appId:l,userAuthModule:Z}),cleanup:()=>{$.analytics.cleanup(),D&&D.disconnect()}},le={entities:Vm({axios:B,appId:l,getSocket:k}),integrations:Qm(B,l),sso:X2(B,l),connectors:Z2(B,l),functions:Gm(H,l,{getAuthHeaders:()=>{const fe={};return d&&(fe.Authorization=`Bearer ${d}`),fe},baseURL:(r=H.defaults)===null||r===void 0?void 0:r.baseURL}),agents:Ym({axios:B,getSocket:k,appId:l,serverUrl:o,token:u}),appLogs:Km(B,l),cleanup:()=>{D&&D.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await $.auth.isAuthenticated()||$.auth.redirectToLogin(window.location.href)}catch(fe){console.error("Authentication check failed:",fe),$.auth.redirectToLogin(window.location.href)}},0),{...$,setToken(fe){$.auth.setToken(fe),D&&D.updateConfig({token:fe}),A.token=fe},getConfig(){return{serverUrl:o,appId:l,requiresAuth:f}},get asServiceRole(){if(!d)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return le}}}const fy=typeof window>"u",X4=fy?{localStorage:new Map}:window,ro=X4.localStorage,Z4=t=>t.replace(/([A-Z])/g,"_$1").toLowerCase(),Is=(t,{defaultValue:n=void 0,removeFromUrl:r=!1}={})=>{if(fy)return n;const o=`base44_${Z4(t)}`,l=new URLSearchParams(window.location.search),u=l.get(t);if(r){l.delete(t);const f=`${window.location.pathname}${l.toString()?`?${l.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,f)}if(u)return ro.setItem(o,u),u;if(n)return ro.setItem(o,n),n;const d=ro.getItem(o);return d||null},eC=()=>(Is("clear_access_token")==="true"&&(ro.removeItem("base44_access_token"),ro.removeItem("token")),{appId:Is("app_id",{defaultValue:"6a300cf3f58cd640804a7e0c"}),token:Is("access_token",{removeFromUrl:!0}),fromUrl:Is("from_url",{defaultValue:window.location.href}),functionsVersion:Is("functions_version",{defaultValue:"prod"}),appBaseUrl:Is("app_base_url",{defaultValue:void 0})}),eo={...eC()},{appId:tC,token:nC,functionsVersion:rC,appBaseUrl:sC}=eo,ye=J4({appId:tC,token:nC,functionsVersion:rC,serverUrl:"",requiresAuth:!1,appBaseUrl:sC});function iC({}){var l;const n=Er().pathname.substring(1),{data:r,isFetched:o}=k1({queryKey:["user"],queryFn:async()=>{try{return{user:await ye.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return i.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:i.jsx("div",{className:"max-w-md w-full",children:i.jsxs("div",{className:"text-center space-y-6",children:[i.jsxs("div",{className:"space-y-2",children:[i.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),i.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),i.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",i.jsxs("span",{className:"font-medium text-slate-700",children:['"',n,'"']})," could not be found in this application."]})]}),o&&r.isAuthenticated&&((l=r.user)==null?void 0:l.role)==="admin"&&i.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:i.jsxs("div",{className:"flex items-start space-x-3",children:[i.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:i.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),i.jsxs("div",{className:"text-left space-y-1",children:[i.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),i.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),i.jsx("div",{className:"pt-6",children:i.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[i.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const py=b.createContext(),oC=({children:t})=>{const[n,r]=b.useState(null),[o,l]=b.useState(!1),[u,d]=b.useState(!0),[f,m]=b.useState(!0),[x,g]=b.useState(null),[v,w]=b.useState(!1),[A,D]=b.useState(null);b.useEffect(()=>{k()},[]);const k=async()=>{var N,S;try{m(!0),g(null);const B=Xi({baseURL:"/api/apps/public",headers:{"X-App-Id":eo.appId},token:eo.token,interceptResponses:!0});try{const H=await B.get(`/prod/public-settings/by-id/${eo.appId}`);D(H),eo.token?await j():(d(!1),l(!1),w(!0)),m(!1)}catch(H){if(console.error("App state check failed:",H),H.status===403&&((S=(N=H.data)==null?void 0:N.extra_data)!=null&&S.reason)){const Z=H.data.extra_data.reason;g(Z==="auth_required"?{type:"auth_required",message:"Authentication required"}:Z==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:Z,message:H.message})}else g({type:"unknown",message:H.message||"Failed to load app"});m(!1),d(!1)}}catch(B){console.error("Unexpected error:",B),g({type:"unknown",message:B.message||"An unexpected error occurred"}),m(!1),d(!1)}},j=async()=>{try{d(!0);const N=await ye.auth.me();r(N),l(!0),d(!1),w(!0)}catch(N){console.error("User auth check failed:",N),d(!1),l(!1),w(!0),(N.status===401||N.status===403)&&g({type:"auth_required",message:"Authentication required"})}},_=(N=!0)=>{r(null),l(!1),N?ye.auth.logout(window.location.href):ye.auth.logout()},I=()=>{ye.auth.redirectToLogin(window.location.href)};return i.jsx(py.Provider,{value:{user:n,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:f,authError:x,appPublicSettings:A,authChecked:v,logout:_,navigateToLogin:I,checkUserAuth:j,checkAppState:k},children:t})},aC=()=>{const t=b.useContext(py);if(!t)throw new Error("useAuth must be used within an AuthProvider");return t},lC=()=>i.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:i.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:i.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),i.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),i.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),i.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[i.jsx("p",{children:"If you believe this is an error, you can:"}),i.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[i.jsx("li",{children:"Verify you are logged in with the correct account"}),i.jsx("li",{children:"Contact the app administrator for access"}),i.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),Ru=[{label:"What to Expect on Sunday",path:"/about/sunday-worship"},{label:"Our Beliefs",path:"/about/beliefs"}],Pu=[{label:"Parish Calendar",path:"/parish-calendar"},{label:"Ministry Schedule",path:"/ministry-schedule"},{label:"Newsletters",path:"/newsletter"},{label:"Leadership",path:"/about/leadership"},{label:"Sacraments & Services",path:"/about/sacraments"}];function cC(){const[t,n]=b.useState(!1),[r,o]=b.useState(!1),[l,u]=b.useState(!1),[d,f]=b.useState(!1),[m,x]=b.useState(!1),[g,v]=b.useState(!1),w=Er(),A=b.useRef(null),D=b.useRef(null);b.useEffect(()=>{const N=()=>n(window.scrollY>80);return window.addEventListener("scroll",N),()=>window.removeEventListener("scroll",N)},[]),b.useEffect(()=>{o(!1),u(!1),f(!1),x(!1),v(!1)},[w]),b.useEffect(()=>{const N=S=>{A.current&&!A.current.contains(S.target)&&u(!1),D.current&&!D.current.contains(S.target)&&f(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const k=Ru.some(N=>w.pathname===N.path),j=Pu.some(N=>w.pathname===N.path),_=({id:N,links:S})=>i.jsx("div",{id:N,role:"menu",className:"absolute top-full left-1/2 -translate-x-1/2 mt-2 w-60 bg-[#141F33] border-t-2 border-[#C4973A] shadow-2xl py-2 z-50",children:S.map(B=>i.jsx(Ve,{to:B.path,role:"menuitem",className:`block px-6 py-3 font-body text-sm tracking-[0.15em] uppercase transition-colors ${w.pathname===B.path?"text-[#C4973A] bg-white/5":"text-white/75 hover:text-[#C4973A] hover:bg-white/5"}`,children:B.label},B.path))}),I=t||r?"bg-[#141F33] shadow-xl":"bg-gradient-to-b from-black/50 to-transparent backdrop-blur-sm";return i.jsxs("nav",{"aria-label":"Main navigation",className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${I}`,children:[i.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-16",children:i.jsxs("div",{className:"flex items-center justify-between h-20",children:[i.jsxs(Ve,{to:"/",className:"flex items-center gap-4 shrink-0 group",children:[i.jsx("img",{src:"https://media.base44.com/images/public/6a2e0d7bafe9f340cc321b12/b414945ec_TEC_Shield.png",alt:"Episcopal Shield",className:"w-9 h-auto opacity-90 group-hover:opacity-100 transition-opacity"}),i.jsxs("div",{className:"hidden sm:block",children:[i.jsx("div",{className:"font-heading font-500 text-white text-sm tracking-[0.15em] uppercase leading-none",children:"St. Timothy's"}),i.jsx("div",{className:"font-body text-[9px] tracking-[0.25em] text-[#C4973A]/80 uppercase leading-none mt-1",children:"Episcopal Church"})]})]}),i.jsxs("div",{className:"hidden lg:flex items-center gap-10",children:[i.jsxs("div",{className:"relative",ref:A,children:[i.jsxs("button",{onClick:()=>{u(!l),f(!1)},"aria-expanded":l,"aria-haspopup":"menu","aria-controls":"new-to-menu",className:`flex items-center gap-1.5 font-body text-sm tracking-[0.15em] uppercase transition-colors duration-200 whitespace-nowrap ${k?"text-[#C4973A]":"text-white/80 hover:text-[#C4973A]"}`,children:["New to St. Timothy's?",i.jsx(Ia,{className:`w-3 h-3 transition-transform duration-200 ${l?"rotate-180":""}`,"aria-hidden":"true"})]}),l&&i.jsx(_,{id:"new-to-menu",links:Ru})]}),i.jsxs("div",{className:"relative",ref:D,children:[i.jsxs("button",{onClick:()=>{f(!d),u(!1)},"aria-expanded":d,"aria-haspopup":"menu","aria-controls":"parish-menu",className:`flex items-center gap-1.5 font-body text-sm tracking-[0.15em] uppercase transition-colors duration-200 whitespace-nowrap ${j?"text-[#C4973A]":"text-white/80 hover:text-[#C4973A]"}`,children:["Parish Information",i.jsx(Ia,{className:`w-3 h-3 transition-transform duration-200 ${d?"rotate-180":""}`,"aria-hidden":"true"})]}),d&&i.jsx(_,{id:"parish-menu",links:Pu})]}),i.jsx(Ve,{to:"/connect",className:`font-body text-sm tracking-[0.15em] uppercase transition-colors duration-200 ${w.pathname==="/connect"?"text-[#C4973A]":"text-white/80 hover:text-[#C4973A]"}`,children:"Connect"}),i.jsx(Ve,{to:"/give",className:"font-body text-sm tracking-[0.15em] uppercase bg-[#C4973A] hover:bg-[#D4AA5A] text-white px-5 py-2.5 transition-colors duration-200",children:"Give"})]}),i.jsx("button",{className:"lg:hidden text-white p-2 -mr-2",onClick:()=>o(!r),"aria-label":r?"Close menu":"Open menu","aria-expanded":r,children:r?i.jsx(cs,{className:"w-5 h-5"}):i.jsx(Bx,{className:"w-5 h-5"})})]})}),r&&i.jsx("div",{className:"lg:hidden bg-[#141F33] border-t border-white/10",children:i.jsxs("div",{className:"px-6 py-6 flex flex-col gap-0.5",children:[i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>x(!m),"aria-expanded":m,"aria-controls":"mobile-new-to-menu",className:`w-full flex items-center justify-between font-body text-sm tracking-[0.18em] uppercase py-3.5 border-b border-white/8 transition-colors ${k?"text-[#C4973A]":"text-white/80"}`,children:["New to St. Timothy's?",i.jsx(Ia,{className:`w-3.5 h-3.5 transition-transform ${m?"rotate-180":""}`,"aria-hidden":"true"})]}),m&&i.jsx("div",{id:"mobile-new-to-menu",className:"ml-4 mt-1 mb-2 flex flex-col gap-0.5 border-l-2 border-[#C4973A]/30 pl-4",children:Ru.map(N=>i.jsx(Ve,{to:N.path,className:`font-body text-sm tracking-[0.15em] uppercase py-2 transition-colors ${w.pathname===N.path?"text-[#C4973A]":"text-white/60 hover:text-[#C4973A]"}`,children:N.label},N.path))})]}),i.jsxs("div",{children:[i.jsxs("button",{onClick:()=>v(!g),"aria-expanded":g,"aria-controls":"mobile-parish-menu",className:`w-full flex items-center justify-between font-body text-sm tracking-[0.18em] uppercase py-3.5 border-b border-white/8 transition-colors ${j?"text-[#C4973A]":"text-white/80"}`,children:["Parish Information",i.jsx(Ia,{className:`w-3.5 h-3.5 transition-transform ${g?"rotate-180":""}`,"aria-hidden":"true"})]}),g&&i.jsx("div",{id:"mobile-parish-menu",className:"ml-4 mt-1 mb-2 flex flex-col gap-0.5 border-l-2 border-[#C4973A]/30 pl-4",children:Pu.map(N=>i.jsx(Ve,{to:N.path,className:`font-body text-sm tracking-[0.15em] uppercase py-2 transition-colors ${w.pathname===N.path?"text-[#C4973A]":"text-white/60 hover:text-[#C4973A]"}`,children:N.label},N.path))})]}),i.jsx(Ve,{to:"/connect",className:`font-body text-sm tracking-[0.18em] uppercase py-3.5 border-b border-white/8 transition-colors ${w.pathname==="/connect"?"text-[#C4973A]":"text-white/80 hover:text-[#C4973A]"}`,children:"Connect"}),i.jsx(Ve,{to:"/give",className:"font-body text-sm tracking-[0.18em] uppercase py-3.5 text-[#C4973A] font-600 hover:text-[#D4AA5A] transition-colors",children:"Give ›"})]})})]})}function uC(){return i.jsxs("footer",{style:{backgroundColor:"var(--navy-deep)"},className:"text-white",children:[i.jsx("div",{className:"h-px bg-gradient-to-r from-transparent via-[#C4973A] to-transparent"}),i.jsxs("div",{className:"max-w-7xl mx-auto px-6 lg:px-16 py-20",children:[i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12 mb-16",children:[i.jsxs("div",{className:"lg:col-span-1",children:[i.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[i.jsx("img",{src:"https://media.base44.com/images/public/6a2e0d7bafe9f340cc321b12/b414945ec_TEC_Shield.png",alt:"Episcopal Shield",className:"w-10 h-auto opacity-80 shrink-0"}),i.jsxs("div",{children:[i.jsx("div",{className:"font-heading font-500 text-white text-base tracking-[0.1em] uppercase leading-none",children:"St. Timothy's"}),i.jsx("div",{className:"font-body text-[9px] tracking-[0.25em] text-[#C4973A]/70 uppercase mt-1.5",children:"Episcopal Church"})]})]}),i.jsx("p",{className:"font-body text-white/85 text-sm leading-relaxed",children:"Open to all, sharing in the grace we have received. A faith community in Southaven, Mississippi."}),i.jsxs("div",{className:"mt-6 flex gap-3",children:[i.jsx("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer","aria-label":"St. Timothy's on Facebook (opens in new tab)",className:"w-9 h-9 flex items-center justify-center border border-white/30 hover:border-[#C4973A] hover:text-[#C4973A] text-white/75 transition-colors duration-200 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#C4973A]",children:i.jsx(rs,{className:"w-4 h-4","aria-hidden":"true"})}),i.jsx("a",{href:"mailto:info@sttimothysms.org","aria-label":"Email us at info@sttimothysms.org",className:"w-9 h-9 flex items-center justify-center border border-white/30 hover:border-[#C4973A] hover:text-[#C4973A] text-white/75 transition-colors duration-200",children:i.jsx(Ht,{className:"w-4 h-4","aria-hidden":"true"})})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-body font-600 text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-6",children:"Contact"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(kn,{className:"w-3.5 h-3.5 text-[#C4973A]/60 mt-0.5 shrink-0","aria-hidden":"true"}),i.jsxs("a",{href:"https://maps.google.com/?q=8245+Getwell+Road,+Southaven,+MS+38672",target:"_blank",rel:"noopener noreferrer","aria-label":"8245 Getwell Road, Southaven, MS 38672 — opens in Google Maps",className:"font-body text-white/85 text-sm leading-relaxed hover:text-[#C4973A] transition-colors",children:["8245 Getwell Road",i.jsx("br",{}),"Southaven, MS 38672"]})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(xo,{className:"w-3.5 h-3.5 text-[#C4973A]/60 shrink-0","aria-hidden":"true"}),i.jsx("a",{href:"tel:6623933100",className:"font-body text-white/85 text-sm hover:text-[#C4973A] transition-colors",children:"(662) 393-3100"})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(Ht,{className:"w-3.5 h-3.5 text-[#C4973A]/60 shrink-0","aria-hidden":"true"}),i.jsx("a",{href:"mailto:info@sttimothysms.org",className:"font-body text-white/85 text-sm hover:text-[#C4973A] transition-colors",children:"info@sttimothysms.org"})]}),i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(ls,{className:"w-3.5 h-3.5 text-[#C4973A]/60 mt-0.5 shrink-0","aria-hidden":"true"}),i.jsx("span",{className:"font-body text-white/85 text-sm",children:"Tues – Thur: 9:00 am – 2:00 pm"})]})]})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-body font-600 text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-6",children:"Quick Links"}),i.jsx("div",{className:"flex flex-col gap-2.5",children:[{label:"What to Expect on Sunday",path:"/about/sunday-worship"},{label:"Our Beliefs",path:"/about/beliefs"},{label:"Leadership",path:"/about/leadership"},{label:"Parish Calendar",path:"/parish-calendar"},{label:"Ministry Schedule",path:"/ministry-schedule"},{label:"Connect With Us",path:"/connect"},{label:"Give",path:"/give"}].map(t=>i.jsx(Ve,{to:t.path,className:"font-body text-white/85 text-sm hover:text-[#C4973A] transition-colors leading-none",children:t.label},t.path))})]}),i.jsxs("div",{children:[i.jsx("h4",{className:"font-body font-600 text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-6",children:"Stay Connected"}),i.jsxs("div",{className:"flex flex-col gap-3",children:[i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white/80 hover:text-white px-4 py-3 text-sm font-body tracking-[0.15em] uppercase transition-all duration-300 border border-white/10 hover:border-[#C4973A]",children:[i.jsx(rs,{className:"w-3.5 h-3.5","aria-hidden":"true"}),"Watch on Facebook",i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]}),i.jsxs("a",{href:"http://eepurl.com/gwU9_r",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 border border-white/30 hover:border-[#C4973A] text-white/75 hover:text-[#C4973A] px-4 py-3 text-sm font-body tracking-[0.15em] uppercase transition-all duration-300",children:[i.jsx(Ht,{className:"w-3.5 h-3.5","aria-hidden":"true"}),"Join Mailing List",i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]})]})]})]}),i.jsx("div",{className:"border-t border-white/10 pt-12 pb-8",children:i.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-body font-600 text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-3",children:"An Inclusive Community"}),i.jsx("p",{className:"font-body text-white/85 text-sm leading-relaxed max-w-2xl",children:`St. Timothy's Episcopal Church is committed to the full inclusion of all people in the life of the Church. All are welcome here — regardless of race, ethnicity, gender identity, sexual orientation, age, or background. "Whoever you are, wherever you are on your journey, welcome home."`})]}),i.jsx("div",{className:"shrink-0",children:i.jsx("img",{src:"https://media.base44.com/images/public/6a2e0d7bafe9f340cc321b12/35557fb1d_TEC_Pride_Horizontal_Logotype_KO_Type.png",alt:"The Episcopal Church — Pride",className:"h-14 w-auto object-contain opacity-70"})})]})}),i.jsxs("div",{className:"border-t border-white/8 pt-6 flex flex-col sm:flex-row items-center justify-between gap-3",children:[i.jsxs("p",{className:"font-body text-white/70 text-xs",children:["© ",new Date().getFullYear()," St. Timothy's Episcopal Church · Southaven, MS"]}),i.jsx("p",{className:"font-body text-white/70 text-xs",children:"Made with love for our community"})]})]})]})}function dC(){const[t,n]=b.useState(0);return b.useEffect(()=>{const r=()=>{const o=window.scrollY,l=document.documentElement.scrollHeight-window.innerHeight,u=l>0?o/l*100:0;n(u)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]),i.jsx("div",{className:"scroll-progress",style:{width:`${t}%`}})}function hC(){const[t,n]=b.useState(!1);return i.jsxs(i.Fragment,{children:[!t&&i.jsxs("button",{onClick:()=>n(!0),className:"lg:hidden fixed bottom-6 right-5 z-50 bg-[#7A1B1B] text-white px-4 py-3 rounded-full shadow-2xl flex items-center gap-2 font-heading font-700 text-xs tracking-widest uppercase",children:[i.jsx(ls,{className:"w-4 h-4"}),"Service Times"]}),t&&i.jsxs("div",{className:"lg:hidden fixed bottom-0 left-0 right-0 z-50 bg-[#2C2C2C] text-white rounded-t-2xl shadow-2xl p-6 pb-8",children:[i.jsxs("div",{className:"flex items-center justify-between mb-5",children:[i.jsx("h3",{className:"font-heading font-800 text-sm tracking-widest uppercase text-[#B58E3F]",children:"Worship Schedule"}),i.jsx("button",{onClick:()=>n(!1),"aria-label":"Close service times",className:"text-white/60 hover:text-white",children:i.jsx(cs,{className:"w-5 h-5","aria-hidden":"true"})})]}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-700 text-xs tracking-widest uppercase text-white/50 mb-1",children:"Sunday"}),i.jsx("p",{className:"font-body text-white text-base",children:"9:30 AM — Holy Eucharist: Rite Two"})]}),i.jsxs("div",{className:"border-t border-white/10 pt-4",children:[i.jsx("p",{className:"font-heading font-700 text-xs tracking-widest uppercase text-white/50 mb-1",children:"Wednesday"}),i.jsx("p",{className:"font-body text-white text-base",children:"9:00 AM — Morning Prayer"}),i.jsx("p",{className:"font-body text-white text-base mt-1",children:"6:00 PM — Evening Service"}),i.jsx("p",{className:"font-body text-white/60 text-sm mt-1",children:"In the Mary Chapel"})]})]})]})]})}const fC=t=>{const n=t.slice(1);try{return decodeURIComponent(n)}catch{return n}};function pC(){const{pathname:t,hash:n}=Er(),r=nj();return b.useEffect(()=>{if(r!=="POP"){if(n){const o=fC(n),l=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(l)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[t,n,r]),null}function mC(){return i.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:"var(--parchment)"},children:[i.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-[9999] focus:bg-[#1E2D4A] focus:text-white focus:px-4 focus:py-2 focus:font-body focus:text-sm focus:font-600",children:"Skip to main content"}),i.jsx(pC,{}),i.jsx(dC,{}),i.jsx(cC,{}),i.jsx("main",{id:"main-content",className:"flex-1",children:i.jsx(ed,{})}),i.jsx(uC,{}),i.jsx(hC,{})]})}function mn(t,n){b.useEffect(()=>{const r=t?`${t} | St. Timothy's Episcopal Church`:"St. Timothy's Episcopal Church | Southaven, MS";document.title=r;let o=document.querySelector('meta[name="description"]');o&&n&&o.setAttribute("content",n)},[t,n])}function xC(){return i.jsxs("section",{className:"relative min-h-screen flex items-end overflow-hidden","aria-label":"Welcome to St. Timothy's Episcopal Church",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url('https://static.wixstatic.com/media/434741_0aef910a0fac44419817d020b25b35ac~mv2.png/v1/fit/w_1920,h_964,q_90/434741_0aef910a0fac44419817d020b25b35ac~mv2.png')"}}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#141F33]/95 via-[#141F33]/75 to-transparent"}),i.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-[#141F33]/60 via-transparent to-[#141F33]/20"}),i.jsx("div",{className:"absolute left-16 top-0 bottom-0 w-px bg-gradient-to-b from-transparent via-[#C4973A]/30 to-transparent hidden lg:block"}),i.jsx("div",{className:"relative z-10 w-full max-w-7xl mx-auto px-6 lg:px-16 pb-24 pt-40",children:i.jsxs("div",{className:"max-w-2xl",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[i.jsx("div",{className:"w-8 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[11px] tracking-[0.35em] uppercase text-[#C4973A] font-medium",children:"Southaven, Mississippi"})]}),i.jsxs("h1",{className:"font-prayer-book font-500 text-white leading-[0.92] mb-6",children:[i.jsx("span",{className:"block text-[clamp(3.5rem,8vw,7rem)] tracking-tight",children:"St. Timothy's"}),i.jsx("span",{className:"block text-[clamp(1.5rem,3.5vw,3rem)] tracking-[0.05em] font-400 text-white/95 mt-2",children:"Episcopal Church"})]}),i.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[i.jsx("div",{className:"w-12 h-px bg-[#C4973A]"}),i.jsx("svg",{viewBox:"0 0 20 20",className:"w-4 h-4 text-[#C4973A] fill-current opacity-70","aria-hidden":"true",children:i.jsx("path",{d:"M10 2v7H3v2h7v7h2v-7h7v-2h-7V2z"})}),i.jsx("div",{className:"flex-1 h-px bg-[#C4973A]/30"})]}),i.jsx("p",{className:"font-heading font-400 italic text-white/95 text-[clamp(1.1rem,2.5vw,1.5rem)] leading-relaxed mb-10 max-w-lg",children:"Open to all, sharing in the grace we have received"}),i.jsxs("div",{className:"flex flex-wrap gap-4",children:[i.jsxs(Ve,{to:"/about/sunday-worship",className:"group inline-flex items-center gap-3 bg-[#C4973A] hover:bg-[#D4AA5A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-all duration-300",children:["Plan Your Visit",i.jsx("svg",{className:"w-4 h-4 transition-transform duration-300 group-hover:translate-x-1",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:i.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})]}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 border border-white/40 hover:border-[#C4973A] text-white/95 hover:text-[#C4973A] font-body font-500 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-all duration-300",children:["Watch Live",i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]})]})]})}),i.jsxs("div",{className:"absolute bottom-8 right-8 lg:right-16 z-10 hidden sm:flex flex-col items-center gap-2",children:[i.jsx("span",{className:"font-body text-[10px] tracking-[0.3em] uppercase text-white/30 rotate-90 mb-6",children:"Scroll"}),i.jsx("div",{className:"w-px h-12 bg-gradient-to-b from-white/40 to-transparent"})]})]})}function gC(){return i.jsx("section",{className:"relative z-20 bg-[#1E2D4A]",children:i.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-16",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-white/10",children:[i.jsxs("div",{className:"px-8 py-10 text-center",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] mb-4",children:"Sunday Worship"}),i.jsxs("div",{className:"space-y-1 mb-3",children:[i.jsxs("p",{className:"font-heading font-300 text-white text-4xl",children:["9:30 ",i.jsx("span",{className:"text-2xl",children:"AM"})]}),i.jsx("p",{className:"font-body text-white/85 text-sm",children:"Holy Eucharist: Rite II"})]}),i.jsx("div",{className:"w-8 h-px bg-[#C4973A]/40 mx-auto my-3"}),i.jsx("p",{className:"font-body text-white/80 text-xs italic",children:"Summer Schedule — Fall schedule resumes in September"})]}),i.jsxs("div",{className:"px-8 py-10 text-center",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] mb-4",children:"Wednesday"}),i.jsxs("div",{className:"space-y-4",children:[i.jsxs("div",{children:[i.jsxs("p",{className:"font-heading font-300 text-white text-3xl",children:["9:00 ",i.jsx("span",{className:"text-xl",children:"AM"})]}),i.jsx("p",{className:"font-body text-white/85 text-sm mt-0.5",children:"Morning Prayer · Mary Chapel"})]}),i.jsx("div",{className:"w-4 h-px bg-white/20 mx-auto"}),i.jsxs("div",{children:[i.jsxs("p",{className:"font-heading font-300 text-white text-3xl",children:["6:00 ",i.jsx("span",{className:"text-xl",children:"PM"})]}),i.jsx("p",{className:"font-body text-white/85 text-sm mt-0.5",children:"Evening Service · Mary Chapel"})]})]})]}),i.jsxs("div",{className:"px-8 py-10 text-center flex flex-col items-center justify-center",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] mb-4",children:"Can't Be Here?"}),i.jsx("p",{className:"font-body text-white/85 text-sm leading-relaxed mb-6 max-w-xs",children:"Join us online from wherever you are. Services stream live every Sunday morning."}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-2 border border-[#C4973A] hover:bg-[#C4973A] text-[#C4973A] hover:text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-6 py-3 rounded-lg shadow-md hover:shadow-lg transition-all duration-300",children:["Watch on Facebook",i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]})]})]})})})}function yC(){return i.jsx("section",{className:"py-32 px-6 lg:px-16 bg-parchment",children:i.jsx("div",{className:"max-w-7xl mx-auto",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-20 items-center",children:[i.jsxs("div",{className:"relative order-2 lg:order-1",children:[i.jsxs("div",{className:"relative",children:[i.jsx("img",{src:"https://static.wixstatic.com/media/434741_f5721b20f5034284acf28c0c1391298a~mv2.jpg/v1/fit/w_1920,h_964,q_90/434741_f5721b20f5034284acf28c0c1391298a~mv2.jpg",alt:"St. Timothy's Episcopal Church exterior",className:"w-full h-80 lg:h-[420px] object-cover object-center"}),i.jsx("div",{className:"absolute -bottom-4 -right-4 w-32 h-32 border border-[#C4973A]/40 pointer-events-none"})]}),i.jsx("div",{className:"absolute -bottom-8 -left-4 lg:-left-8 w-48 lg:w-56 shadow-2xl border-4 border-[#F7F3EC]",children:i.jsx("img",{src:"https://static.wixstatic.com/media/434741_5341f08c52e44eb38d14ae3cf68f441f~mv2.jpg/v1/fill/w_653,h_906/434741_5341f08c52e44eb38d14ae3cf68f441f~mv2.jpg",alt:"Cross at St. Timothy's",className:"w-full h-36 lg:h-44 object-cover object-center"})}),i.jsx("div",{className:"absolute -top-4 -left-4 w-20 h-20 bg-[#1E2D4A] opacity-10 pointer-events-none"})]}),i.jsxs("div",{className:"order-1 lg:order-2 pl-0 lg:pl-8",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] font-medium",children:"Our Foundation"})]}),i.jsxs("h2",{className:"font-heading font-300 text-[#1E2D4A] leading-tight mb-6",style:{fontSize:"clamp(2.5rem, 4vw, 3.75rem)"},children:["Whoever You Are,",i.jsx("br",{}),i.jsx("em",{className:"font-400 text-[#7A1B1B]",children:"Welcome Home."})]}),i.jsxs("div",{className:"flex items-center gap-4 mb-8",children:[i.jsx("div",{className:"w-10 h-px bg-[#C4973A]"}),i.jsx("svg",{viewBox:"0 0 16 16",className:"w-3 h-3 fill-[#C4973A] opacity-60","aria-hidden":"true",children:i.jsx("path",{d:"M7 0h2v7h7v2H9v7H7V9H0V7h7z"})})]}),i.jsxs("div",{className:"space-y-7",children:[i.jsxs("div",{children:[i.jsx("h3",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#1E2D4A] mb-2",children:"Our Mission"}),i.jsx("p",{className:"font-body text-[#1F1F1F]/80 text-base leading-loose",children:"St. Timothy's is a faith community open to all. We are on a journey of spiritual growth, seeking to do what Jesus taught us: to welcome, love, offer hope, and serve all people, sharing in the grace we have received in Christ."})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#1E2D4A] mb-2",children:"Our Vision"}),i.jsx("p",{className:"font-heading font-400 italic text-[#1F1F1F]/80 text-xl leading-relaxed",children:'"Open to all, sharing in the grace we have received."'})]}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#1E2D4A] mb-2",children:"Our Beliefs"}),i.jsx("p",{className:"font-body text-[#1F1F1F]/80 text-base leading-loose",children:"Our beliefs are rooted in the worship of the Episcopal Church, as found in the Book of Common Prayer, and outlined in the Catechism."})]})]}),i.jsx("div",{className:"mt-10",children:i.jsxs(Ve,{to:"/about/beliefs",className:"group inline-flex items-center gap-3 text-[#1E2D4A] font-body font-500 text-sm tracking-[0.2em] uppercase border-b border-[#C4973A] pb-0.5 hover:text-[#C4973A] transition-colors duration-200",children:["Explore Our Beliefs",i.jsx("svg",{className:"w-4 h-4 transition-transform duration-300 group-hover:translate-x-1",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24","aria-hidden":"true",children:i.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})]})})]})]})})})}function vC(){return i.jsxs("section",{className:"relative overflow-hidden",style:{backgroundColor:"var(--navy)"},"aria-label":"A message to seekers and newcomers",children:[i.jsx("div",{className:"absolute inset-0 opacity-20",style:{backgroundImage:"radial-gradient(ellipse at 50% 50%, #C4973A22 0%, transparent 70%)"}}),i.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/4 opacity-[0.04] pointer-events-none","aria-hidden":"true",children:i.jsxs("svg",{viewBox:"0 0 300 300",className:"w-[400px] h-[400px]",fill:"white",children:[i.jsx("rect",{x:"130",y:"20",width:"40",height:"260"}),i.jsx("rect",{x:"30",y:"100",width:"240",height:"40"})]})}),i.jsxs("div",{className:"relative z-10 max-w-5xl mx-auto px-6 lg:px-16 py-28 lg:py-36",children:[i.jsxs("div",{className:"flex items-center justify-center gap-4 mb-12",children:[i.jsx("div",{className:"flex-1 h-px max-w-24 bg-gradient-to-r from-transparent to-[#C4973A]/40"}),i.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5 fill-[#C4973A] opacity-80","aria-hidden":"true",children:i.jsx("path",{d:"M11 0h2v11h11v2H13v11h-2V13H0v-2h11z"})}),i.jsx("div",{className:"flex-1 h-px max-w-24 bg-gradient-to-l from-transparent to-[#C4973A]/40"})]}),i.jsxs("div",{className:"text-center",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] mb-6",children:"A Message to Seekers"}),i.jsx("blockquote",{className:"font-heading font-300 italic text-white/95 leading-relaxed mb-12",style:{fontSize:"clamp(1.5rem, 3.5vw, 2.75rem)"},children:`"Whether you're traveling, exploring faith, or just not ready to walk through the doors yet — you are welcome to worship with us from wherever you are."`}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsx(Ve,{to:"/about/beliefs",className:"inline-flex items-center justify-center gap-2 border border-[#C4973A] text-[#C4973A] hover:bg-[#C4973A] hover:text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-8 py-4 rounded-lg shadow-md hover:shadow-lg transition-all duration-300",children:"Learn About Us"}),i.jsx(Ve,{to:"/connect",className:"inline-flex items-center justify-center gap-2 bg-white text-[#1E2D4A] hover:bg-[#C4973A] hover:text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-8 py-4 rounded-lg shadow-md hover:shadow-lg transition-all duration-300",children:"Get In Touch"})]})]}),i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-12",children:[i.jsx("div",{className:"flex-1 h-px max-w-24 bg-gradient-to-r from-transparent to-[#C4973A]/40"}),i.jsx("div",{className:"w-1.5 h-1.5 bg-[#C4973A] opacity-60 rotate-45"}),i.jsx("div",{className:"flex-1 h-px max-w-24 bg-gradient-to-l from-transparent to-[#C4973A]/40"})]})]})]})}function bC(){const[t,n]=b.useState(null);return b.useEffect(()=>{ye.entities.NewsletterIssue.list("-date_label",1).then(r=>n(r[0]||null))},[]),i.jsx("section",{className:"py-28 px-6 lg:px-16 bg-parchment","aria-label":"Stay connected — Facebook and newsletter",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-16 gap-6",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] font-medium",children:"Stay Connected"})]}),i.jsx("h2",{className:"font-heading font-300 text-[#1E2D4A] leading-none",style:{fontSize:"clamp(2rem, 4vw, 3rem)"},children:"From Our Community"})]}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-[#1E2D4A] font-body font-500 text-sm tracking-[0.2em] uppercase hover:text-[#C4973A] transition-colors border-b border-transparent hover:border-[#C4973A] pb-0.5",children:[i.jsx(rs,{className:"w-3.5 h-3.5","aria-hidden":"true"}),"Follow on Facebook",i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]})]}),i.jsxs("div",{className:"flex flex-col lg:flex-row gap-10 items-start",children:[i.jsx("div",{className:"w-full lg:w-auto flex justify-center lg:justify-start shrink-0",children:i.jsx("div",{className:"shadow-lg overflow-hidden",style:{maxWidth:"100%"},children:i.jsx("iframe",{src:"https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fsttimothysouthaven&tabs=timeline&width=500&height=600&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId",width:"500",height:"600",style:{border:"none",overflow:"hidden",maxWidth:"100%"},scrolling:"no",frameBorder:"0",allowFullScreen:!0,allow:"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share",title:"St. Timothy's Facebook Page"})})}),i.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[i.jsxs("div",{className:"bg-white border-l-2 border-[#1E2D4A] p-8 hover:border-[#C4973A] transition-colors duration-300 group",children:[i.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[i.jsx("div",{className:"w-10 h-10 bg-[#1E2D4A] group-hover:bg-[#C4973A] flex items-center justify-center shrink-0 transition-colors duration-300",children:i.jsx(rs,{className:"w-4 h-4 text-white"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading font-500 text-[#1E2D4A] text-xl mb-0.5",children:"Livestream Worship"}),i.jsx("p",{className:"font-body text-[10px] tracking-[0.2em] uppercase text-[#C4973A]",children:"Every Sunday · 9:30 AM"})]})]}),i.jsx("p",{className:"font-body text-[#1F1F1F]/65 text-sm leading-loose mb-6",children:"Can't be with us in person? Watch our Sunday services live on Facebook every week."}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"group/btn inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-6 py-3 transition-all duration-300",children:["Watch Live",i.jsx(br,{className:"w-3 h-3","aria-hidden":"true"}),i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]})]}),i.jsxs("div",{className:"bg-white border-l-2 border-[#EDE7DA] hover:border-[#C4973A] p-8 transition-colors duration-300 group",children:[i.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[i.jsx("div",{className:"w-10 h-10 bg-[#EDE7DA] group-hover:bg-[#C4973A] flex items-center justify-center shrink-0 transition-colors duration-300",children:i.jsx(Ht,{className:"w-4 h-4 text-[#1E2D4A] group-hover:text-white transition-colors duration-300"})}),i.jsxs("div",{children:[i.jsx("h3",{className:"font-heading font-500 text-[#1E2D4A] text-xl mb-0.5",children:"Parish News & Announcements"}),i.jsx("p",{className:"font-body text-[10px] tracking-[0.2em] uppercase text-[#C4973A]",children:"Weekly Newsletter"})]})]}),i.jsx("p",{className:"font-body text-[#1F1F1F]/65 text-sm leading-loose mb-6",children:"Subscribe to our mailing list for upcoming events, announcements, and parish news delivered straight to your inbox."}),i.jsxs("div",{className:"flex flex-wrap gap-3",children:[i.jsxs("a",{href:"http://eepurl.com/gwU9_r",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 border border-[#1E2D4A] hover:bg-[#1E2D4A] text-[#1E2D4A] hover:text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-6 py-3 transition-all duration-300",children:["Join Our Mailing List",i.jsx(br,{className:"w-3 h-3","aria-hidden":"true"}),i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]}),t&&i.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-[#C4973A] hover:bg-[#D4AA5A] text-white font-body font-500 text-sm tracking-[0.2em] uppercase px-6 py-3 transition-all duration-300",children:["Latest Issue",i.jsx(br,{className:"w-3 h-3","aria-hidden":"true"}),i.jsx("span",{className:"sr-only",children:"(opens in new tab)"})]}),i.jsx(Ve,{to:"/newsletter",className:"inline-flex items-center gap-2 border border-[#C4973A]/50 hover:border-[#C4973A] text-[#C4973A] font-body font-500 text-sm tracking-[0.2em] uppercase px-6 py-3 transition-all duration-300",children:"View Archive →"})]})]})]})]})]})})}function ft(t){const n=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&n==="[object Date]"?new t.constructor(+t):typeof t=="number"||n==="[object Number]"||typeof t=="string"||n==="[object String]"?new Date(t):new Date(NaN)}function fn(t,n){return t instanceof Date?new t.constructor(n):new Date(n)}function $d(t,n){const r=ft(t);return isNaN(n)?fn(t,NaN):(r.setDate(r.getDate()+n),r)}function al(t,n){const r=ft(t);if(isNaN(n))return fn(t,NaN);if(!n)return r;const o=r.getDate(),l=fn(t,r.getTime());l.setMonth(r.getMonth()+n+1,0);const u=l.getDate();return o>=u?l:(r.setFullYear(l.getFullYear(),l.getMonth(),o),r)}const my=6048e5,wC=864e5,xy=6e4,gy=36e5;let jC={};function ko(){return jC}function as(t,n){var f,m,x,g;const r=ko(),o=(n==null?void 0:n.weekStartsOn)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??r.weekStartsOn??((g=(x=r.locale)==null?void 0:x.options)==null?void 0:g.weekStartsOn)??0,l=ft(t),u=l.getDay(),d=(u<o?7:0)+u-o;return l.setDate(l.getDate()-d),l.setHours(0,0,0,0),l}function ll(t){return as(t,{weekStartsOn:1})}function yy(t){const n=ft(t),r=n.getFullYear(),o=fn(t,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const l=ll(o),u=fn(t,0);u.setFullYear(r,0,4),u.setHours(0,0,0,0);const d=ll(u);return n.getTime()>=l.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function cl(t){const n=ft(t);return n.setHours(0,0,0,0),n}function rx(t){const n=ft(t),r=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return r.setUTCFullYear(n.getFullYear()),+t-+r}function NC(t,n){const r=cl(t),o=cl(n),l=+r-rx(r),u=+o-rx(o);return Math.round((l-u)/wC)}function CC(t){const n=yy(t),r=fn(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ll(r)}function vy(t){return fn(t,Date.now())}function Wd(t,n){const r=cl(t),o=cl(n);return+r==+o}function kC(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function SC(t){if(!kC(t)&&typeof t!="number")return!1;const n=ft(t);return!isNaN(Number(n))}function by(t){const n=ft(t),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function wy(t){const n=ft(t);return n.setDate(1),n.setHours(0,0,0,0),n}function EC(t){const n=ft(t),r=fn(t,0);return r.setFullYear(n.getFullYear(),0,1),r.setHours(0,0,0,0),r}function jy(t,n){var f,m;const r=ko(),o=r.weekStartsOn??((m=(f=r.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,l=ft(t),u=l.getDay(),d=(u<o?-7:0)+6-(u-o);return l.setDate(l.getDate()+d),l.setHours(23,59,59,999),l}const AC={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_C=(t,n,r)=>{let o;const l=AC[t];return typeof l=="string"?o=l:n===1?o=l.one:o=l.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function Ou(t){return(n={})=>{const r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const TC={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},DC={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},RC={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},PC={date:Ou({formats:TC,defaultWidth:"full"}),time:Ou({formats:DC,defaultWidth:"full"}),dateTime:Ou({formats:RC,defaultWidth:"full"})},OC={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},MC=(t,n,r,o)=>OC[t];function Gi(t){return(n,r)=>{const o=r!=null&&r.context?String(r.context):"standalone";let l;if(o==="formatting"&&t.formattingValues){const d=t.defaultFormattingWidth||t.defaultWidth,f=r!=null&&r.width?String(r.width):d;l=t.formattingValues[f]||t.formattingValues[d]}else{const d=t.defaultWidth,f=r!=null&&r.width?String(r.width):t.defaultWidth;l=t.values[f]||t.values[d]}const u=t.argumentCallback?t.argumentCallback(n):n;return l[u]}}const LC={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},FC={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},IC={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},BC={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},UC={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zC={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$C=(t,n)=>{const r=Number(t),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},WC={ordinalNumber:$C,era:Gi({values:LC,defaultWidth:"wide"}),quarter:Gi({values:FC,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Gi({values:IC,defaultWidth:"wide"}),day:Gi({values:BC,defaultWidth:"wide"}),dayPeriod:Gi({values:UC,defaultWidth:"wide",formattingValues:zC,defaultFormattingWidth:"wide"})};function Yi(t){return(n,r={})=>{const o=r.width,l=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],u=n.match(l);if(!u)return null;const d=u[0],f=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(f)?HC(f,v=>v.test(d)):qC(f,v=>v.test(d));let x;x=t.valueCallback?t.valueCallback(m):m,x=r.valueCallback?r.valueCallback(x):x;const g=n.slice(d.length);return{value:x,rest:g}}}function qC(t,n){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n(t[r]))return r}function HC(t,n){for(let r=0;r<t.length;r++)if(n(t[r]))return r}function VC(t){return(n,r={})=>{const o=n.match(t.matchPattern);if(!o)return null;const l=o[0],u=n.match(t.parsePattern);if(!u)return null;let d=t.valueCallback?t.valueCallback(u[0]):u[0];d=r.valueCallback?r.valueCallback(d):d;const f=n.slice(l.length);return{value:d,rest:f}}}const QC=/^(\d+)(th|st|nd|rd)?/i,GC=/\d+/i,YC={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},KC={any:[/^b/i,/^(a|c)/i]},JC={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},XC={any:[/1/i,/2/i,/3/i,/4/i]},ZC={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ek={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},tk={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},nk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},rk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},sk={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ik={ordinalNumber:VC({matchPattern:QC,parsePattern:GC,valueCallback:t=>parseInt(t,10)}),era:Yi({matchPatterns:YC,defaultMatchWidth:"wide",parsePatterns:KC,defaultParseWidth:"any"}),quarter:Yi({matchPatterns:JC,defaultMatchWidth:"wide",parsePatterns:XC,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Yi({matchPatterns:ZC,defaultMatchWidth:"wide",parsePatterns:ek,defaultParseWidth:"any"}),day:Yi({matchPatterns:tk,defaultMatchWidth:"wide",parsePatterns:nk,defaultParseWidth:"any"}),dayPeriod:Yi({matchPatterns:rk,defaultMatchWidth:"any",parsePatterns:sk,defaultParseWidth:"any"})},ok={code:"en-US",formatDistance:_C,formatLong:PC,formatRelative:MC,localize:WC,match:ik,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ak(t){const n=ft(t);return NC(n,EC(n))+1}function lk(t){const n=ft(t),r=+ll(n)-+CC(n);return Math.round(r/my)+1}function Ny(t,n){var g,v,w,A;const r=ft(t),o=r.getFullYear(),l=ko(),u=(n==null?void 0:n.firstWeekContainsDate)??((v=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??l.firstWeekContainsDate??((A=(w=l.locale)==null?void 0:w.options)==null?void 0:A.firstWeekContainsDate)??1,d=fn(t,0);d.setFullYear(o+1,0,u),d.setHours(0,0,0,0);const f=as(d,n),m=fn(t,0);m.setFullYear(o,0,u),m.setHours(0,0,0,0);const x=as(m,n);return r.getTime()>=f.getTime()?o+1:r.getTime()>=x.getTime()?o:o-1}function ck(t,n){var f,m,x,g;const r=ko(),o=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??r.firstWeekContainsDate??((g=(x=r.locale)==null?void 0:x.options)==null?void 0:g.firstWeekContainsDate)??1,l=Ny(t,n),u=fn(t,0);return u.setFullYear(l,0,o),u.setHours(0,0,0,0),as(u,n)}function uk(t,n){const r=ft(t),o=+as(r,n)-+ck(r,n);return Math.round(o/my)+1}function Ie(t,n){const r=t<0?"-":"",o=Math.abs(t).toString().padStart(n,"0");return r+o}const cr={y(t,n){const r=t.getFullYear(),o=r>0?r:1-r;return Ie(n==="yy"?o%100:o,n.length)},M(t,n){const r=t.getMonth();return n==="M"?String(r+1):Ie(r+1,2)},d(t,n){return Ie(t.getDate(),n.length)},a(t,n){const r=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,n){return Ie(t.getHours()%12||12,n.length)},H(t,n){return Ie(t.getHours(),n.length)},m(t,n){return Ie(t.getMinutes(),n.length)},s(t,n){return Ie(t.getSeconds(),n.length)},S(t,n){const r=n.length,o=t.getMilliseconds(),l=Math.trunc(o*Math.pow(10,r-3));return Ie(l,n.length)}},Bs={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sx={G:function(t,n,r){const o=t.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){const o=t.getFullYear(),l=o>0?o:1-o;return r.ordinalNumber(l,{unit:"year"})}return cr.y(t,n)},Y:function(t,n,r,o){const l=Ny(t,o),u=l>0?l:1-l;if(n==="YY"){const d=u%100;return Ie(d,2)}return n==="Yo"?r.ordinalNumber(u,{unit:"year"}):Ie(u,n.length)},R:function(t,n){const r=yy(t);return Ie(r,n.length)},u:function(t,n){const r=t.getFullYear();return Ie(r,n.length)},Q:function(t,n,r){const o=Math.ceil((t.getMonth()+1)/3);switch(n){case"Q":return String(o);case"QQ":return Ie(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,n,r){const o=Math.ceil((t.getMonth()+1)/3);switch(n){case"q":return String(o);case"qq":return Ie(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,n,r){const o=t.getMonth();switch(n){case"M":case"MM":return cr.M(t,n);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(t,n,r){const o=t.getMonth();switch(n){case"L":return String(o+1);case"LL":return Ie(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(t,n,r,o){const l=uk(t,o);return n==="wo"?r.ordinalNumber(l,{unit:"week"}):Ie(l,n.length)},I:function(t,n,r){const o=lk(t);return n==="Io"?r.ordinalNumber(o,{unit:"week"}):Ie(o,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):cr.d(t,n)},D:function(t,n,r){const o=ak(t);return n==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ie(o,n.length)},E:function(t,n,r){const o=t.getDay();switch(n){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(t,n,r,o){const l=t.getDay(),u=(l-o.weekStartsOn+8)%7||7;switch(n){case"e":return String(u);case"ee":return Ie(u,2);case"eo":return r.ordinalNumber(u,{unit:"day"});case"eee":return r.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(l,{width:"short",context:"formatting"});case"eeee":default:return r.day(l,{width:"wide",context:"formatting"})}},c:function(t,n,r,o){const l=t.getDay(),u=(l-o.weekStartsOn+8)%7||7;switch(n){case"c":return String(u);case"cc":return Ie(u,n.length);case"co":return r.ordinalNumber(u,{unit:"day"});case"ccc":return r.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(l,{width:"narrow",context:"standalone"});case"cccccc":return r.day(l,{width:"short",context:"standalone"});case"cccc":default:return r.day(l,{width:"wide",context:"standalone"})}},i:function(t,n,r){const o=t.getDay(),l=o===0?7:o;switch(n){case"i":return String(l);case"ii":return Ie(l,n.length);case"io":return r.ordinalNumber(l,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(t,n,r){const l=t.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(t,n,r){const o=t.getHours();let l;switch(o===12?l=Bs.noon:o===0?l=Bs.midnight:l=o/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(t,n,r){const o=t.getHours();let l;switch(o>=17?l=Bs.evening:o>=12?l=Bs.afternoon:o>=4?l=Bs.morning:l=Bs.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){let o=t.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return cr.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):cr.H(t,n)},K:function(t,n,r){const o=t.getHours()%12;return n==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ie(o,n.length)},k:function(t,n,r){let o=t.getHours();return o===0&&(o=24),n==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ie(o,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):cr.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):cr.s(t,n)},S:function(t,n){return cr.S(t,n)},X:function(t,n,r){const o=t.getTimezoneOffset();if(o===0)return"Z";switch(n){case"X":return ox(o);case"XXXX":case"XX":return $r(o);case"XXXXX":case"XXX":default:return $r(o,":")}},x:function(t,n,r){const o=t.getTimezoneOffset();switch(n){case"x":return ox(o);case"xxxx":case"xx":return $r(o);case"xxxxx":case"xxx":default:return $r(o,":")}},O:function(t,n,r){const o=t.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+ix(o,":");case"OOOO":default:return"GMT"+$r(o,":")}},z:function(t,n,r){const o=t.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+ix(o,":");case"zzzz":default:return"GMT"+$r(o,":")}},t:function(t,n,r){const o=Math.trunc(t.getTime()/1e3);return Ie(o,n.length)},T:function(t,n,r){const o=t.getTime();return Ie(o,n.length)}};function ix(t,n=""){const r=t>0?"-":"+",o=Math.abs(t),l=Math.trunc(o/60),u=o%60;return u===0?r+String(l):r+String(l)+n+Ie(u,2)}function ox(t,n){return t%60===0?(t>0?"-":"+")+Ie(Math.abs(t)/60,2):$r(t,n)}function $r(t,n=""){const r=t>0?"-":"+",o=Math.abs(t),l=Ie(Math.trunc(o/60),2),u=Ie(o%60,2);return r+l+n+u}const ax=(t,n)=>{switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Cy=(t,n)=>{switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},dk=(t,n)=>{const r=t.match(/(P+)(p+)?/)||[],o=r[1],l=r[2];if(!l)return ax(t,n);let u;switch(o){case"P":u=n.dateTime({width:"short"});break;case"PP":u=n.dateTime({width:"medium"});break;case"PPP":u=n.dateTime({width:"long"});break;case"PPPP":default:u=n.dateTime({width:"full"});break}return u.replace("{{date}}",ax(o,n)).replace("{{time}}",Cy(l,n))},hk={p:Cy,P:dk},fk=/^D+$/,pk=/^Y+$/,mk=["D","DD","YY","YYYY"];function xk(t){return fk.test(t)}function gk(t){return pk.test(t)}function yk(t,n,r){const o=vk(t,n,r);if(console.warn(o),mk.includes(t))throw new RangeError(o)}function vk(t,n,r){const o=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${n}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const bk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jk=/^'([^]*?)'?$/,Nk=/''/g,Ck=/[a-zA-Z]/;function je(t,n,r){var g,v,w,A;const o=ko(),l=o.locale??ok,u=o.firstWeekContainsDate??((v=(g=o.locale)==null?void 0:g.options)==null?void 0:v.firstWeekContainsDate)??1,d=o.weekStartsOn??((A=(w=o.locale)==null?void 0:w.options)==null?void 0:A.weekStartsOn)??0,f=ft(t);if(!SC(f))throw new RangeError("Invalid time value");let m=n.match(wk).map(D=>{const k=D[0];if(k==="p"||k==="P"){const j=hk[k];return j(D,l.formatLong)}return D}).join("").match(bk).map(D=>{if(D==="''")return{isToken:!1,value:"'"};const k=D[0];if(k==="'")return{isToken:!1,value:kk(D)};if(sx[k])return{isToken:!0,value:D};if(k.match(Ck))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:D}});l.localize.preprocessor&&(m=l.localize.preprocessor(f,m));const x={firstWeekContainsDate:u,weekStartsOn:d,locale:l};return m.map(D=>{if(!D.isToken)return D.value;const k=D.value;(gk(k)||xk(k))&&yk(k,n,String(t));const j=sx[k[0]];return j(f,k,l.localize,x)}).join("")}function kk(t){const n=t.match(jk);return n?n[1].replace(Nk,"'"):t}function ky(t,n){const r=ft(t),o=ft(n);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function So(t){return Wd(t,vy(t))}function qd(t){return Wd(t,$d(vy(t),1))}function Be(t,n){const o=_k(t);let l;if(o.date){const m=Tk(o.date,2);l=Dk(m.restDateString,m.year)}if(!l||isNaN(l.getTime()))return new Date(NaN);const u=l.getTime();let d=0,f;if(o.time&&(d=Rk(o.time),isNaN(d)))return new Date(NaN);if(o.timezone){if(f=Pk(o.timezone),isNaN(f))return new Date(NaN)}else{const m=new Date(u+d),x=new Date(0);return x.setFullYear(m.getUTCFullYear(),m.getUTCMonth(),m.getUTCDate()),x.setHours(m.getUTCHours(),m.getUTCMinutes(),m.getUTCSeconds(),m.getUTCMilliseconds()),x}return new Date(u+d+f)}const Ha={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Sk=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Ek=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Ak=/^([+-])(\d{2})(?::?(\d{2}))?$/;function _k(t){const n={},r=t.split(Ha.dateTimeDelimiter);let o;if(r.length>2)return n;if(/:/.test(r[0])?o=r[0]:(n.date=r[0],o=r[1],Ha.timeZoneDelimiter.test(n.date)&&(n.date=t.split(Ha.timeZoneDelimiter)[0],o=t.substr(n.date.length,t.length))),o){const l=Ha.timezone.exec(o);l?(n.time=o.replace(l[1],""),n.timezone=l[1]):n.time=o}return n}function Tk(t,n){const r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+n)+"})|(\\d{2}|[+-]\\d{"+(2+n)+"})$)"),o=t.match(r);if(!o)return{year:NaN,restDateString:""};const l=o[1]?parseInt(o[1]):null,u=o[2]?parseInt(o[2]):null;return{year:u===null?l:u*100,restDateString:t.slice((o[1]||o[2]).length)}}function Dk(t,n){if(n===null)return new Date(NaN);const r=t.match(Sk);if(!r)return new Date(NaN);const o=!!r[4],l=Ki(r[1]),u=Ki(r[2])-1,d=Ki(r[3]),f=Ki(r[4]),m=Ki(r[5])-1;if(o)return Ik(n,f,m)?Ok(n,f,m):new Date(NaN);{const x=new Date(0);return!Lk(n,u,d)||!Fk(n,l)?new Date(NaN):(x.setUTCFullYear(n,u,Math.max(l,d)),x)}}function Ki(t){return t?parseInt(t):1}function Rk(t){const n=t.match(Ek);if(!n)return NaN;const r=Mu(n[1]),o=Mu(n[2]),l=Mu(n[3]);return Bk(r,o,l)?r*gy+o*xy+l*1e3:NaN}function Mu(t){return t&&parseFloat(t.replace(",","."))||0}function Pk(t){if(t==="Z")return 0;const n=t.match(Ak);if(!n)return 0;const r=n[1]==="+"?-1:1,o=parseInt(n[2]),l=n[3]&&parseInt(n[3])||0;return Uk(o,l)?r*(o*gy+l*xy):NaN}function Ok(t,n,r){const o=new Date(0);o.setUTCFullYear(t,0,4);const l=o.getUTCDay()||7,u=(n-1)*7+r+1-l;return o.setUTCDate(o.getUTCDate()+u),o}const Mk=[31,null,31,30,31,30,31,31,30,31,30,31];function Sy(t){return t%400===0||t%4===0&&t%100!==0}function Lk(t,n,r){return n>=0&&n<=11&&r>=1&&r<=(Mk[n]||(Sy(t)?29:28))}function Fk(t,n){return n>=1&&n<=(Sy(t)?366:365)}function Ik(t,n,r){return n>=1&&n<=53&&r>=0&&r<=6}function Bk(t,n,r){return t===24?n===0&&r===0:r>=0&&r<60&&n>=0&&n<60&&t>=0&&t<25}function Uk(t,n){return n>=0&&n<=59}function pd(t,n){return al(t,-1)}function zk(t){const n=Be(t);return So(n)?"Today":qd(n)?"Tomorrow":je(n,"EEEE")}function $k(t){const n={};for(const r of t){const o=r.start_datetime.slice(0,10);n[o]||(n[o]=[]),n[o].push(r)}return Object.entries(n).sort(([r],[o])=>r.localeCompare(o))}function Wk(){const[t,n]=b.useState([]),[r,o]=b.useState(!0);b.useEffect(()=>{const u=new Date,d=`${u.getFullYear()}-${String(u.getMonth()+1).padStart(2,"0")}-${String(u.getDate()).padStart(2,"0")}`,f=new Date(u.getFullYear(),u.getMonth(),u.getDate()+7),m=`${f.getFullYear()}-${String(f.getMonth()+1).padStart(2,"0")}-${String(f.getDate()).padStart(2,"0")}`;ye.entities.CalendarEvent.list("start_datetime",200).then(x=>{const v=[...x.filter(w=>{const A=w.start_datetime.slice(0,10);return A>=d&&A<=m})].sort((w,A)=>w.start_datetime.localeCompare(A.start_datetime));n(v)}).finally(()=>o(!1))},[]);const l=$k(t);return i.jsx("section",{className:"py-28 px-6 lg:px-16 bg-white","aria-label":"Upcoming events",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-6 mb-16",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A] font-medium",children:"Coming Up"})]}),i.jsx("h2",{className:"font-heading font-300 text-[#1E2D4A] leading-none",style:{fontSize:"clamp(2rem, 4vw, 3rem)"},children:"Upcoming Events"})]}),i.jsxs(Ve,{to:"/parish-calendar",className:"group inline-flex items-center gap-2 font-body font-500 text-xs tracking-[0.2em] uppercase text-[#1E2D4A] hover:text-[#C4973A] transition-colors shrink-0 border-b border-transparent hover:border-[#C4973A] pb-0.5",children:["Full Calendar",i.jsx(ns,{className:"w-3.5 h-3.5 transition-transform duration-200 group-hover:translate-x-0.5"})]})]}),r&&i.jsx("div",{className:"flex items-center justify-center py-20",role:"status","aria-label":"Loading upcoming events",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}),!r&&t.length===0&&i.jsxs("div",{className:"text-center py-20",children:[i.jsx(kr,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-4"}),i.jsx("p",{className:"font-heading font-400 italic text-[#1F1F1F]/60 text-lg",children:"No upcoming events at this time."})]}),!r&&l.length>0&&i.jsx("div",{className:"space-y-12 sm:border-l sm:border-[#C4973A]/25 sm:pl-8",children:l.map(([u,d],f)=>i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[140px_1fr] gap-0",children:[i.jsxs("div",{className:"sm:pt-0 sm:pr-8 sm:text-right mb-4 sm:mb-0",children:[i.jsx("p",{className:"font-heading font-600 text-base text-[#1E2D4A] tracking-wide",children:zk(u)}),i.jsx("p",{className:"font-body text-sm text-[#1F1F1F]/60 mt-0.5",children:je(Be(u),"MMM d")})]}),i.jsx("div",{className:"space-y-4 border-l border-[#C4973A]/25 pl-8",children:d.map(m=>i.jsxs("div",{className:"group relative",children:[i.jsx("div",{className:"absolute -left-[37px] top-1.5 w-2 h-2 rounded-full bg-[#C4973A] ring-4 ring-white"}),i.jsx("h3",{className:"font-heading font-500 text-[#1E2D4A] text-lg group-hover:text-[#C4973A] transition-colors leading-tight",children:m.title}),i.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-1.5",children:[!m.is_all_day&&m.start_datetime&&i.jsxs("span",{className:"font-body text-xs text-[#C4973A] font-medium",children:[je(Be(m.start_datetime),"h:mm a"),m.end_datetime&&` – ${je(Be(m.end_datetime),"h:mm a")}`]}),m.is_all_day&&i.jsx("span",{className:"font-body text-xs text-[#C4973A] font-medium",children:"All day"}),m.location&&i.jsxs("span",{className:"flex items-center gap-1 font-body text-xs text-[#1F1F1F]/60",children:[i.jsx(kn,{className:"w-3 h-3","aria-hidden":"true"}),m.location]})]}),m.description&&i.jsx("p",{className:"font-body text-sm text-[#1F1F1F]/75 mt-1.5 leading-relaxed line-clamp-2",children:m.description})]},m.id))})]},u))})]})})}function qk(){return mn(null,"St. Timothy's Episcopal Church in Southaven, Mississippi. Join us for Sunday worship. All are welcome — wherever you are on your journey of faith."),i.jsxs(i.Fragment,{children:[i.jsx(xC,{}),i.jsx(gC,{}),i.jsx(yC,{}),i.jsx(Wk,{}),i.jsx(vC,{}),i.jsx(bC,{})]})}function Hk({events:t}){const[n,r]=b.useState(new Date),[o,l]=b.useState(null),u=wy(n),d=by(n),f=as(u),m=jy(d),x=[];let g=f;for(;g<=m;){const w=[];for(let A=0;A<7;A++)w.push(g),g=$d(g,1);x.push(w)}function v(w){return t.filter(A=>A.start_datetime.slice(0,10)===je(w,"yyyy-MM-dd"))}return i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-6",children:[i.jsx("button",{onClick:()=>r(pd(n)),"aria-label":`Go to ${je(pd(n),"MMMM yyyy")}`,className:"p-2 hover:bg-[#1E2D4A]/10 text-[#1E2D4A] transition-colors",children:i.jsx(mo,{className:"w-5 h-5","aria-hidden":"true"})}),i.jsx("h2",{className:"font-heading font-500 text-xl sm:text-2xl text-[#1E2D4A]","aria-live":"polite",children:je(n,"MMMM yyyy")}),i.jsx("button",{onClick:()=>r(al(n,1)),"aria-label":`Go to ${je(al(n,1),"MMMM yyyy")}`,className:"p-2 hover:bg-[#1E2D4A]/10 text-[#1E2D4A] transition-colors",children:i.jsx(ns,{className:"w-5 h-5","aria-hidden":"true"})})]}),i.jsx("div",{className:"grid grid-cols-7 mb-1",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(w=>i.jsx("div",{className:"text-center font-body font-600 text-[10px] tracking-widest uppercase text-[#1E2D4A]/40 py-2",children:w},w))}),i.jsx("div",{className:"border border-[#1E2D4A]/12",children:x.map((w,A)=>i.jsx("div",{className:"grid grid-cols-7 border-b border-[#1E2D4A]/12 last:border-b-0",children:w.map((D,k)=>{const j=v(D),_=ky(D,n),I=So(D);return i.jsxs("div",{className:`min-h-[90px] sm:min-h-[110px] p-1.5 border-r border-[#1E2D4A]/12 last:border-r-0 ${_?"bg-white":"bg-[#1E2D4A]/[0.02]"}`,children:[i.jsx("div",{className:`w-7 h-7 flex items-center justify-center text-xs font-body font-600 mb-1
                    ${I?"bg-[#1E2D4A] text-white rounded-full":_?"text-[#1E2D4A]":"text-[#1E2D4A]/25"}`,"aria-label":I?`${je(D,"d")}, today`:void 0,children:je(D,"d")}),i.jsxs("div",{className:"space-y-0.5",children:[j.slice(0,3).map(N=>i.jsx("button",{onClick:()=>l(N),"aria-label":N.is_all_day?N.title:`${je(Be(N.start_datetime),"h:mm a")} – ${N.title}`,className:"w-full text-left truncate text-[10px] sm:text-xs font-body font-600 bg-[#1E2D4A] text-white px-1.5 py-0.5 hover:bg-[#C4973A] transition-colors leading-tight",children:i.jsx("span",{"aria-hidden":"true",children:N.is_all_day?N.title:`${je(Be(N.start_datetime),"h:mma")} ${N.title}`})},N.id)),j.length>3&&i.jsxs("button",{onClick:()=>l(j[3]),className:"w-full text-left text-[10px] font-body font-600 text-[#C4973A] px-1.5",children:["+",j.length-3," more"]})]})]},k)})},A))}),o&&i.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"event-modal-title",className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70",onClick:()=>l(null),onKeyDown:w=>w.key==="Escape"&&l(null),children:i.jsxs("div",{className:"bg-white max-w-lg w-full p-8 relative shadow-xl",onClick:w=>w.stopPropagation(),children:[i.jsx("button",{onClick:()=>l(null),"aria-label":"Close event details",className:"absolute top-4 right-4 text-[#1E2D4A]/40 hover:text-[#1E2D4A] transition-colors",children:i.jsx(cs,{className:"w-5 h-5","aria-hidden":"true"})}),i.jsxs("div",{className:"flex items-start gap-5 mb-6",children:[i.jsxs("div",{className:"text-center shrink-0 bg-[#1E2D4A] text-white px-4 py-3 min-w-[60px]",children:[i.jsx("p",{className:"font-heading font-300 text-3xl leading-none",children:je(Be(o.start_datetime.slice(0,10)),"d")}),i.jsx("p",{className:"font-body font-600 text-[9px] tracking-widest uppercase mt-1 opacity-80",children:je(Be(o.start_datetime.slice(0,10)),"MMM")})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{id:"event-modal-title",className:"font-heading font-500 text-lg text-[#1E2D4A] leading-tight",children:o.title}),i.jsxs("div",{className:"mt-2 space-y-1",children:[!o.is_all_day&&i.jsxs("div",{className:"flex items-center gap-2 text-[#C4973A]",children:[i.jsx(ls,{className:"w-3.5 h-3.5 shrink-0"}),i.jsxs("span",{className:"font-body text-sm",children:[je(Be(o.start_datetime),"h:mm a"),o.end_datetime&&` – ${je(Be(o.end_datetime),"h:mm a")}`]})]}),o.is_all_day&&i.jsxs("div",{className:"flex items-center gap-2 text-[#C4973A]",children:[i.jsx(kr,{className:"w-3.5 h-3.5 shrink-0"}),i.jsx("span",{className:"font-body text-sm",children:"All day"})]}),o.location&&i.jsxs("div",{className:"flex items-center gap-2 text-[#1E2D4A]/75",children:[i.jsx(kn,{className:"w-3.5 h-3.5 shrink-0"}),i.jsx("span",{className:"font-body text-sm",children:o.location})]})]})]})]}),o.description&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-full h-px bg-[#1E2D4A]/10 mb-5"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/75 leading-relaxed text-sm",children:o.description})]}),o.location&&i.jsxs("a",{href:`https://maps.google.com/?q=${encodeURIComponent(o.location)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 mt-6 text-[#1E2D4A] font-body font-600 text-xs tracking-widest uppercase hover:text-[#C4973A] transition-colors",children:[i.jsx(br,{className:"w-4 h-4"}),"Get Directions"]})]})})]})}function Vk({events:t}){const[n,r]=b.useState(null),[o,l]=b.useState(1),u=15,d=Math.ceil(t.length/u),f=(o-1)*u,m=t.slice(f,f+u);return i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"space-y-2",children:m.map(x=>i.jsxs("button",{onClick:()=>r(x),className:"w-full text-left p-3 border border-[#1E2D4A]/10 hover:bg-[#1E2D4A]/5 transition-colors flex items-center gap-4",children:[i.jsxs("div",{className:"text-center shrink-0 bg-[#1E2D4A] text-white px-3 py-2 min-w-[50px]",children:[i.jsx("p",{className:"font-body font-600 text-[9px] tracking-widest uppercase",children:je(Be(x.start_datetime.slice(0,10)),"MMM")}),i.jsx("p",{className:"font-heading font-300 text-2xl leading-none mt-0.5",children:je(Be(x.start_datetime.slice(0,10)),"d")})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-body font-600 text-sm text-[#1E2D4A]",children:x.title}),i.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[#1E2D4A]/75 text-xs flex-wrap",children:[!x.is_all_day&&i.jsx("span",{children:je(Be(x.start_datetime),"MMM d, h:mm a")}),x.is_all_day&&i.jsxs("span",{children:[je(Be(x.start_datetime),"MMM d")," (all day)"]}),x.location&&i.jsxs("div",{className:"flex items-center gap-1",children:[i.jsx(kn,{className:"w-3 h-3 shrink-0"}),i.jsx("span",{children:x.location})]})]}),x.description&&i.jsx("p",{className:"text-[#1E2D4A]/70 text-xs mt-2 line-clamp-2",children:x.description})]}),i.jsx("div",{className:"shrink-0 text-[#1E2D4A] font-300 text-lg",children:"→"})]},x.id))}),d>1&&i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-8",children:[i.jsxs("button",{onClick:()=>l(x=>Math.max(x-1,1)),disabled:o===1,"aria-label":"Previous page",className:"px-4 py-2 border border-[#1E2D4A]/20 text-[#1E2D4A] font-body text-sm hover:bg-[#1E2D4A]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:[i.jsx("span",{"aria-hidden":"true",children:"←"})," Previous"]}),i.jsxs("span",{className:"font-body text-sm text-[#1E2D4A]/75","aria-live":"polite","aria-atomic":"true",children:["Page ",o," of ",d]}),i.jsxs("button",{onClick:()=>l(x=>Math.min(x+1,d)),disabled:o===d,"aria-label":"Next page",className:"px-4 py-2 border border-[#1E2D4A]/20 text-[#1E2D4A] font-body text-sm hover:bg-[#1E2D4A]/10 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:["Next ",i.jsx("span",{"aria-hidden":"true",children:"→"})]})]}),n&&i.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"event-modal-title",className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/70",onClick:()=>r(null),onKeyDown:x=>x.key==="Escape"&&r(null),children:i.jsxs("div",{className:"bg-white max-w-lg w-full p-8 relative shadow-xl",onClick:x=>x.stopPropagation(),children:[i.jsx("button",{onClick:()=>r(null),"aria-label":"Close event details",className:"absolute top-4 right-4 text-[#1E2D4A]/40 hover:text-[#1E2D4A] transition-colors",children:i.jsx(cs,{className:"w-5 h-5","aria-hidden":"true"})}),i.jsxs("div",{className:"flex items-start gap-5 mb-6",children:[i.jsxs("div",{className:"text-center shrink-0 bg-[#1E2D4A] text-white px-4 py-3 min-w-[60px]",children:[i.jsx("p",{className:"font-heading font-300 text-3xl leading-none",children:je(Be(n.start_datetime.slice(0,10)),"d")}),i.jsx("p",{className:"font-body font-600 text-[9px] tracking-widest uppercase mt-1 opacity-80",children:je(Be(n.start_datetime.slice(0,10)),"MMM")})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("h3",{id:"event-modal-title",className:"font-heading font-500 text-lg text-[#1E2D4A] leading-tight",children:n.title}),i.jsxs("div",{className:"mt-2 space-y-1",children:[!n.is_all_day&&i.jsxs("div",{className:"flex items-center gap-2 text-[#C4973A]",children:[i.jsx(ls,{className:"w-3.5 h-3.5 shrink-0"}),i.jsxs("span",{className:"font-body text-sm",children:[je(Be(n.start_datetime),"h:mm a"),n.end_datetime&&` – ${je(Be(n.end_datetime),"h:mm a")}`]})]}),n.is_all_day&&i.jsxs("div",{className:"flex items-center gap-2 text-[#C4973A]",children:[i.jsx(kr,{className:"w-3.5 h-3.5 shrink-0"}),i.jsx("span",{className:"font-body text-sm",children:"All day"})]}),n.location&&i.jsxs("div",{className:"flex items-center gap-2 text-[#1E2D4A]/75",children:[i.jsx(kn,{className:"w-3.5 h-3.5 shrink-0"}),i.jsx("span",{className:"font-body text-sm",children:n.location})]})]})]})]}),n.description&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-full h-px bg-[#1E2D4A]/10 mb-5"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/75 leading-relaxed text-sm",children:n.description})]}),n.location&&i.jsxs("a",{href:`https://maps.google.com/?q=${encodeURIComponent(n.location)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 mt-6 text-[#1E2D4A] font-body font-600 text-xs tracking-widest uppercase hover:text-[#C4973A] transition-colors",children:[i.jsx(br,{className:"w-4 h-4"}),"Get Directions"]})]})})]})}function Qk(){mn("Parish Calendar","View upcoming events and activities at St. Timothy's Episcopal Church in Southaven, MS.");const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState("grid");return b.useEffect(()=>{ye.entities.CalendarEvent.list("start_datetime",200).then(n).finally(()=>o(!1))},[]),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?w=1600&q=80')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Community Life"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Parish Calendar"})]})]}),i.jsx("section",{className:"py-16 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-6xl mx-auto",children:[i.jsxs("div",{className:"mb-10 flex items-start justify-between gap-6",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Full Schedule"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"Parish Calendar"})]}),i.jsxs("div",{className:"flex gap-2 shrink-0",children:[i.jsx("button",{onClick:()=>u("grid"),"aria-label":"Grid view","aria-pressed":l==="grid",className:`p-2.5 transition-colors ${l==="grid"?"bg-[#1E2D4A] text-white":"border border-[#1E2D4A]/20 text-[#1E2D4A] hover:bg-[#1E2D4A]/10"}`,children:i.jsx(kb,{className:"w-4 h-4","aria-hidden":"true"})}),i.jsx("button",{onClick:()=>u("list"),"aria-label":"List view","aria-pressed":l==="list",className:`p-2.5 transition-colors ${l==="list"?"bg-[#1E2D4A] text-white":"border border-[#1E2D4A]/20 text-[#1E2D4A] hover:bg-[#1E2D4A]/10"}`,children:i.jsx(Ix,{className:"w-4 h-4","aria-hidden":"true"})})]})]}),r?i.jsx("div",{className:"flex items-center justify-center py-24",role:"status","aria-label":"Loading parish calendar",children:i.jsx("div",{className:"w-7 h-7 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}):t.length===0?i.jsxs("div",{className:"text-center py-24",children:[i.jsx(kr,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-4"}),i.jsx("p",{className:"font-heading font-400 italic text-[#1E2D4A]/40 text-lg",children:"No events found. Check back soon."})]}):l==="grid"?i.jsx(Hk,{events:t}):i.jsx(Vk,{events:t})]})})]})}function Gk(t,n,{checkForDefaultPrevented:r=!0}={}){return function(l){if(t==null||t(l),r===!1||!l.defaultPrevented)return n==null?void 0:n(l)}}function lx(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function Hd(...t){return n=>{let r=!1;const o=t.map(l=>{const u=lx(l,n);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let l=0;l<o.length;l++){const u=o[l];typeof u=="function"?u():lx(t[l],null)}}}}function Ey(...t){return b.useCallback(Hd(...t),t)}function Yk(t,n=[]){let r=[];function o(u,d){const f=b.createContext(d),m=r.length;r=[...r,d];const x=v=>{var _;const{scope:w,children:A,...D}=v,k=((_=w==null?void 0:w[t])==null?void 0:_[m])||f,j=b.useMemo(()=>D,Object.values(D));return i.jsx(k.Provider,{value:j,children:A})};x.displayName=u+"Provider";function g(v,w){var k;const A=((k=w==null?void 0:w[t])==null?void 0:k[m])||f,D=b.useContext(A);if(D)return D;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[x,g]}const l=()=>{const u=r.map(d=>b.createContext(d));return function(f){const m=(f==null?void 0:f[t])||u;return b.useMemo(()=>({[`__scope${t}`]:{...f,[t]:m}}),[f,m])}};return l.scopeName=t,[o,Kk(l,...n)]}function Kk(...t){const n=t[0];if(t.length===1)return n;const r=()=>{const o=t.map(l=>({useScope:l(),scopeName:l.scopeName}));return function(u){const d=o.reduce((f,{useScope:m,scopeName:x})=>{const v=m(u)[`__scope${x}`];return{...f,...v}},{});return b.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return r.scopeName=n.scopeName,r}var Ay=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Jk=yd[" useInsertionEffect ".trim().toString()]||Ay;function Xk({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[l,u,d]=Zk({defaultProp:n,onChange:r}),f=t!==void 0,m=f?t:l;{const g=b.useRef(t!==void 0);b.useEffect(()=>{const v=g.current;v!==f&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,o])}const x=b.useCallback(g=>{var v;if(f){const w=e3(g)?g(t):g;w!==t&&((v=d.current)==null||v.call(d,w))}else u(g)},[f,t,u,d]);return[m,x]}function Zk({defaultProp:t,onChange:n}){const[r,o]=b.useState(t),l=b.useRef(r),u=b.useRef(n);return Jk(()=>{u.current=n},[n]),b.useEffect(()=>{var d;l.current!==r&&((d=u.current)==null||d.call(u,r),l.current=r)},[r,l]),[r,o,u]}function e3(t){return typeof t=="function"}function t3(t){const n=b.useRef({value:t,previous:t});return b.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}function n3(t){const[n,r]=b.useState(void 0);return Ay(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const u=l[0];let d,f;if("borderBoxSize"in u){const m=u.borderBoxSize,x=Array.isArray(m)?m[0]:m;d=x.inlineSize,f=x.blockSize}else d=t.offsetWidth,f=t.offsetHeight;r({width:d,height:f})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else r(void 0)},[t]),n}function r3(t){const n=s3(t),r=b.forwardRef((o,l)=>{const{children:u,...d}=o,f=b.Children.toArray(u),m=f.find(o3);if(m){const x=m.props.children,g=f.map(v=>v===m?b.Children.count(x)>1?b.Children.only(null):b.isValidElement(x)?x.props.children:null:v);return i.jsx(n,{...d,ref:l,children:b.isValidElement(x)?b.cloneElement(x,void 0,g):null})}return i.jsx(n,{...d,ref:l,children:u})});return r.displayName=`${t}.Slot`,r}function s3(t){const n=b.forwardRef((r,o)=>{const{children:l,...u}=r;if(b.isValidElement(l)){const d=l3(l),f=a3(u,l.props);return l.type!==b.Fragment&&(f.ref=o?Hd(o,d):d),b.cloneElement(l,f)}return b.Children.count(l)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var i3=Symbol("radix.slottable");function o3(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===i3}function a3(t,n){const r={...n};for(const o in n){const l=t[o],u=n[o];/^on[A-Z]/.test(o)?l&&u?r[o]=(...f)=>{const m=u(...f);return l(...f),m}:l&&(r[o]=l):o==="style"?r[o]={...l,...u}:o==="className"&&(r[o]=[l,u].filter(Boolean).join(" "))}return{...t,...r}}function l3(t){var o,l;let n=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var c3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_y=c3.reduce((t,n)=>{const r=r3(`Primitive.${n}`),o=b.forwardRef((l,u)=>{const{asChild:d,...f}=l,m=d?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(m,{...f,ref:u})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{}),bl="Switch",[u3]=Yk(bl),[d3,h3]=u3(bl),Ty=b.forwardRef((t,n)=>{const{__scopeSwitch:r,name:o,checked:l,defaultChecked:u,required:d,disabled:f,value:m="on",onCheckedChange:x,form:g,...v}=t,[w,A]=b.useState(null),D=Ey(n,N=>A(N)),k=b.useRef(!1),j=w?g||!!w.closest("form"):!0,[_,I]=Xk({prop:l,defaultProp:u??!1,onChange:x,caller:bl});return i.jsxs(d3,{scope:r,checked:_,disabled:f,children:[i.jsx(_y.button,{type:"button",role:"switch","aria-checked":_,"aria-required":d,"data-state":Oy(_),"data-disabled":f?"":void 0,disabled:f,value:m,...v,ref:D,onClick:Gk(t.onClick,N=>{I(S=>!S),j&&(k.current=N.isPropagationStopped(),k.current||N.stopPropagation())})}),j&&i.jsx(Py,{control:w,bubbles:!k.current,name:o,value:m,checked:_,required:d,disabled:f,form:g,style:{transform:"translateX(-100%)"}})]})});Ty.displayName=bl;var Dy="SwitchThumb",Ry=b.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,l=h3(Dy,r);return i.jsx(_y.span,{"data-state":Oy(l.checked),"data-disabled":l.disabled?"":void 0,...o,ref:n})});Ry.displayName=Dy;var f3="SwitchBubbleInput",Py=b.forwardRef(({__scopeSwitch:t,control:n,checked:r,bubbles:o=!0,...l},u)=>{const d=b.useRef(null),f=Ey(d,u),m=t3(r),x=n3(n);return b.useEffect(()=>{const g=d.current;if(!g)return;const v=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(v,"checked").set;if(m!==r&&A){const D=new Event("click",{bubbles:o});A.call(g,r),g.dispatchEvent(D)}},[m,r,o]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:f,style:{...l.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Py.displayName=f3;function Oy(t){return t?"checked":"unchecked"}var My=Ty,p3=Ry;const Ly=b.forwardRef(({className:t,...n},r)=>i.jsx(My,{className:hn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...n,ref:r,children:i.jsx(p3,{className:hn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));Ly.displayName=My.displayName;function m3(){const[t,n]=b.useState({name:"",email:"",phone:"",message:""}),[r,o]=b.useState(""),[l]=b.useState(()=>Date.now()),[u,d]=b.useState(!1),[f,m]=b.useState(!1),x=async w=>{if(w.preventDefault(),!r&&!(Date.now()-l<3e3)){d(!0);try{await ye.entities.ContactSubmission.create({form_type:"contact",name:t.name,email:t.email,phone:t.phone,message:t.message})}catch{}await ye.functions.invoke("sendContactEmail",{form_type:"contact",name:t.name,email:t.email,phone:t.phone,message:t.message}),d(!1),m(!0)}};if(f)return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[i.jsx(Zs,{className:"w-14 h-14 text-[#C4973A] mb-5"}),i.jsx("h3",{className:"font-heading font-500 text-2xl text-[#1E2D4A] mb-3",children:"Message Received"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 max-w-sm",children:"Thank you for reaching out. A member of our team will be in touch with you soon."}),i.jsx("button",{onClick:()=>{m(!1),n({name:"",email:"",phone:"",message:""})},className:"mt-6 text-[#1E2D4A] font-body font-600 text-xs tracking-[0.2em] uppercase hover:text-[#C4973A] transition-colors border-b border-[#C4973A] pb-0.5",children:"Send Another Message"})]});const g="w-full border border-[#1E2D4A]/20 bg-white px-4 py-3 font-body text-[#1E2D4A] placeholder-[#1E2D4A]/35 focus:outline-none focus:border-[#1E2D4A] transition-colors text-sm",v="block font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#1E2D4A]/80 mb-2";return i.jsxs("form",{onSubmit:x,className:"space-y-5",children:[i.jsx("input",{type:"text",name:"website",value:r,onChange:w=>o(w.target.value),tabIndex:-1,"aria-hidden":"true",style:{position:"absolute",left:"-9999px",opacity:0,height:0},autoComplete:"off"}),i.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"contact-name",className:v,children:"Full Name *"}),i.jsx("input",{id:"contact-name",required:!0,type:"text",value:t.name,onChange:w=>n({...t,name:w.target.value}),placeholder:"Your name",className:g})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"contact-email",className:v,children:"Email Address *"}),i.jsx("input",{id:"contact-email",required:!0,type:"email",value:t.email,onChange:w=>n({...t,email:w.target.value}),placeholder:"your@email.com",className:g})]})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"contact-phone",className:v,children:"Phone (Optional)"}),i.jsx("input",{id:"contact-phone",type:"tel",value:t.phone,onChange:w=>n({...t,phone:w.target.value}),placeholder:"(662) 000-0000",className:g})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"contact-message",className:v,children:"Message *"}),i.jsx("textarea",{id:"contact-message",required:!0,rows:5,value:t.message,onChange:w=>n({...t,message:w.target.value}),placeholder:"How can we help you?",className:`${g} resize-none`})]}),i.jsx("button",{type:"submit",disabled:u,className:"flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300 disabled:opacity-60",children:u?"Sending…":i.jsxs(i.Fragment,{children:[i.jsx(zx,{className:"w-4 h-4"})," Send My Message"]})})]})}function x3(){const[t,n]=b.useState({name:"",message:"",is_public:!1}),[r,o]=b.useState(""),[l]=b.useState(()=>Date.now()),[u,d]=b.useState(!1),[f,m]=b.useState(!1),x=async w=>{if(w.preventDefault(),!r&&!(Date.now()-l<3e3)){d(!0);try{await ye.entities.ContactSubmission.create({form_type:"prayer_request",name:t.name||"Anonymous",message:t.message,is_public:t.is_public})}catch{}await ye.functions.invoke("sendContactEmail",{form_type:"prayer_request",name:t.name||"Anonymous",message:t.message,is_public:t.is_public}),d(!1),m(!0)}};if(f)return i.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[i.jsx(Cr,{className:"w-14 h-14 text-[#C4973A] mb-5"}),i.jsx("h3",{className:"font-heading font-500 text-2xl text-[#1E2D4A] mb-3",children:"Prayer Received"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 max-w-sm",children:"Your prayer has been shared with our clergy. You are held in our hearts."}),i.jsx("button",{onClick:()=>{m(!1),n({name:"",message:"",is_public:!1})},className:"mt-6 text-[#1E2D4A] font-body font-600 text-xs tracking-[0.2em] uppercase hover:text-[#C4973A] transition-colors border-b border-[#C4973A] pb-0.5",children:"Submit Another Request"})]});const g="w-full border border-[#1E2D4A]/20 bg-white px-4 py-3 font-body text-[#1E2D4A] placeholder-[#1E2D4A]/35 focus:outline-none focus:border-[#1E2D4A] transition-colors text-sm",v="block font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#1E2D4A]/80 mb-2";return i.jsxs("form",{onSubmit:x,className:"space-y-5",children:[i.jsx("input",{type:"text",name:"website",value:r,onChange:w=>o(w.target.value),tabIndex:-1,"aria-hidden":"true",style:{position:"absolute",left:"-9999px",opacity:0,height:0},autoComplete:"off"}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"prayer-name",className:v,children:"Your Name (Optional)"}),i.jsx("input",{id:"prayer-name",type:"text",value:t.name,onChange:w=>n({...t,name:w.target.value}),placeholder:"Or leave anonymous",className:g})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"prayer-message",className:v,children:"Your Prayer Request *"}),i.jsx("textarea",{id:"prayer-message",required:!0,rows:6,value:t.message,onChange:w=>n({...t,message:w.target.value}),placeholder:"Share what is on your heart…",className:`${g} resize-none`})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(Ly,{id:"prayer-public",checked:t.is_public,onCheckedChange:w=>n({...t,is_public:w}),"aria-label":"Share prayer request with the congregation",className:"data-[state=checked]:bg-[#1E2D4A] data-[state=unchecked]:bg-[#1E2D4A]/20"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-600 text-sm text-[#1E2D4A]",children:t.is_public?"Share with the congregation":"Keep this prayer private"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 text-xs",children:t.is_public?"Your request may be shared in services":"Only clergy will see this request"})]})]}),i.jsx("button",{type:"submit",disabled:u,className:"flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300 disabled:opacity-60",children:u?"Sharing…":i.jsxs(i.Fragment,{children:[i.jsx(Cr,{className:"w-4 h-4"})," Share This Prayer"]})})]})}function g3(){mn("Connect","Contact St. Timothy's Episcopal Church in Southaven, MS. Send a message, submit a prayer request, or find our location and office hours.");const[t,n]=b.useState("contact");return i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://static.wixstatic.com/media/434741_0aef910a0fac44419817d020b25b35ac~mv2.png/v1/fit/w_1920,h_964,q_90/434741_0aef910a0fac44419817d020b25b35ac~mv2.png')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Reach Out"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Connect"})]})]}),i.jsx("section",{className:"py-20 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-5 gap-12",children:[i.jsxs("div",{className:"lg:col-span-2",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"We're Here"})]}),i.jsxs("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A] mb-8 leading-tight",children:["Reach Out",i.jsx("br",{}),"to Our",i.jsx("br",{}),"Community"]}),i.jsx("div",{className:"space-y-5",children:[{Icon:xo,label:"Phone",content:i.jsx("a",{href:"tel:6623933100",className:"font-body text-[#1E2D4A]/80 hover:text-[#C4973A] transition-colors text-sm",children:"(662) 393-3100"})},{Icon:kn,label:"Address",content:i.jsxs("a",{href:"https://maps.google.com/?q=8245+Getwell+Road,+Southaven,+MS+38672",target:"_blank",rel:"noopener noreferrer",className:"font-body text-[#1E2D4A]/80 hover:text-[#C4973A] transition-colors leading-relaxed text-sm",children:["8245 Getwell Road",i.jsx("br",{}),"Southaven, MS 38672"]})},{Icon:rs,label:"Facebook",content:i.jsx("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"font-body text-[#1E2D4A]/80 hover:text-[#C4973A] transition-colors text-sm",children:"St Timothy's Episcopal Church"})}].map(({Icon:r,label:o,content:l})=>i.jsxs("div",{className:"flex items-start gap-3",children:[i.jsx(r,{className:"w-4 h-4 text-[#C4973A] mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.2em] uppercase text-[#1E2D4A] mb-1",children:o}),l]})]},o))}),i.jsxs("div",{className:"mt-10 bg-[#1E2D4A] p-6",children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#C4973A] mb-3",children:"Office Hours"}),i.jsxs("div",{className:"space-y-1 font-body text-white/70 text-sm",children:[i.jsx("p",{children:"Tuesday – Thursday"}),i.jsx("p",{className:"text-white font-600",children:"9:00 am – 2:00 pm"})]})]})]}),i.jsxs("div",{className:"lg:col-span-3 bg-white p-8 sm:p-10 shadow-sm",children:[i.jsx("div",{role:"tablist","aria-label":"Contact options",className:"flex mb-8 border-b border-[#1E2D4A]/10",children:[{id:"contact",label:"General Inquiry",icon:zx},{id:"prayer",label:"Prayer Request",icon:Cr}].map(({id:r,label:o,icon:l})=>i.jsxs("button",{role:"tab","aria-selected":t===r,"aria-controls":`tab-panel-${r}`,id:`tab-${r}`,onClick:()=>n(r),className:`flex items-center gap-2 pb-4 mr-8 font-body font-600 text-xs tracking-[0.2em] uppercase transition-colors border-b-2 ${t===r?"text-[#1E2D4A] border-[#C4973A]":"text-[#1E2D4A]/35 border-transparent hover:text-[#1E2D4A]"}`,children:[i.jsx(l,{className:"w-4 h-4","aria-hidden":"true"}),o]},r))}),i.jsx("div",{id:"tab-panel-contact",role:"tabpanel","aria-labelledby":"tab-contact",hidden:t!=="contact",children:i.jsx(m3,{})}),i.jsx("div",{id:"tab-panel-prayer",role:"tabpanel","aria-labelledby":"tab-prayer",hidden:t!=="prayer",children:i.jsx(x3,{})})]})]})}),i.jsx("section",{className:"h-96 w-full",children:i.jsx("iframe",{title:"St. Timothy's Episcopal Church location",src:"https://maps.google.com/maps?q=8245+Getwell+Road,+Southaven,+MS+38672&output=embed",width:"100%",height:"100%",style:{border:0,display:"block"},allowFullScreen:"",loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})})]})}const y3=[{icon:mb,title:"Worship & Sacraments",description:"Your gifts sustain our sanctuary, our music, and the sacred services that anchor our community week after week."},{icon:dl,title:"Community Outreach",description:"We serve our neighbors in Southaven and beyond — from local food ministries to global mission partnerships."},{icon:Cr,title:"Pastoral Care",description:"Clergy and lay ministers are equipped to walk alongside every member through grief, celebration, and the full journey of life."}];function v3(){return mn("Give","Support the mission of St. Timothy's Episcopal Church in Southaven, MS through online giving, in-person offerings, or planned gifts."),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://images.unsplash.com/photo-1532629345422-7515f3d16bb6?w=1600&q=80')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Generosity"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Give"})]})]}),i.jsx("section",{className:"py-24 px-6 text-center",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-5 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Stewardship"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-4xl sm:text-5xl text-[#1E2D4A] mb-6 leading-tight",children:"Support Our Mission"}),i.jsx("div",{className:"w-12 h-px bg-[#C4973A] mx-auto mb-8"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/75 text-lg leading-relaxed mb-4",children:"Your generosity is the heartbeat of St. Timothy's. Every gift — large or small — helps us open our doors wider, serve our neighbors more deeply, and grow as a community of faith."}),i.jsx("p",{className:"font-heading font-400 italic text-[#1E2D4A]/80 text-xl leading-relaxed mb-12",children:'"Each of you should give what you have decided in your heart to give, not reluctantly or under compulsion, for God loves a cheerful giver." — 2 Corinthians 9:7'}),i.jsxs("a",{href:"https://secure.myvanco.com/L-ZB1Q/home",target:"_blank",rel:"noopener noreferrer",className:"group inline-flex items-center gap-3 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.15em] uppercase px-12 py-5 transition-colors duration-300 shadow-lg",children:[i.jsx(Cr,{className:"w-5 h-5"}),"Give Online Now",i.jsx(ob,{className:"w-5 h-5 group-hover:translate-x-1 transition-transform"})]}),i.jsx("p",{className:"font-body text-[#1E2D4A]/40 text-sm mt-4",children:"Secure giving powered by our online platform"})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-white",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-14",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Impact"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"How Your Gift Serves"})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-6",children:y3.map(t=>i.jsxs("div",{className:"p-8 border border-[#1E2D4A]/10 hover:border-[#C4973A] transition-colors group",children:[i.jsx(t.icon,{className:"w-7 h-7 text-[#C4973A] mb-5"}),i.jsx("h3",{className:"font-body font-600 text-sm tracking-[0.2em] uppercase text-[#1E2D4A] mb-3",children:t.title}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 text-sm leading-relaxed",children:t.description})]},t.title))})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"max-w-4xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"More Ways"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"Other Ways to Give"})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[{method:"In Person",detail:"Offering plates are passed during every Sunday and Wednesday service. You are always welcome to give in the manner that feels right for you."},{method:"By Mail",detail:"Checks made payable to St. Timothy's Episcopal Church may be mailed to 8245 Getwell Road, Southaven, MS 38672."},{method:"Planned Giving",detail:"Consider a legacy gift to St. Timothy's through your estate plan. Contact the church office to learn more about planned giving opportunities."}].map(t=>i.jsxs("div",{className:"border-l-2 border-[#C4973A] pl-6",children:[i.jsx("h3",{className:"font-body font-600 text-sm tracking-[0.2em] uppercase text-[#1E2D4A] mb-3",children:t.method}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 text-sm leading-relaxed",children:t.detail})]},t.method))})]})}),i.jsx("section",{className:"py-20 px-6 bg-[#1E2D4A] text-center",children:i.jsxs("div",{className:"max-w-2xl mx-auto",children:[i.jsxs("svg",{viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-10 h-10 mx-auto mb-6 opacity-40",children:[i.jsx("rect",{x:"17",y:"4",width:"6",height:"32",fill:"#C4973A"}),i.jsx("rect",{x:"8",y:"12",width:"24",height:"6",fill:"#C4973A"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl text-white mb-4",children:"Questions About Giving?"}),i.jsx("p",{className:"font-body text-white/65 mb-8",children:"Our church office is happy to answer any questions about stewardship, pledging, or other ways to support St. Timothy's."}),i.jsx("a",{href:"tel:6623933100",className:"inline-flex items-center gap-2 border border-[#C4973A] text-[#C4973A] hover:bg-[#C4973A] hover:text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:"Call Us: (662) 393-3100"})]})})]})}const b3="https://static.wixstatic.com/media/0130b0_4415e28d282e4c95b804e8bb28ff1c39~mv2.jpg/v1/fill/w_980,h_275,al_l,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/0130b0_4415e28d282e4c95b804e8bb28ff1c39~mv2.jpg",w3="https://static.wixstatic.com/media/434741_0aef910a0fac44419817d020b25b35ac~mv2.png/v1/fit/w_1920,h_964,q_90/434741_0aef910a0fac44419817d020b25b35ac~mv2.png",j3="https://static.wixstatic.com/media/0130b0_32be5a018c82499aa9ac319013887884~mv2.png/v1/fill/w_323,h_487,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/0130b0_32be5a018c82499aa9ac319013887884~mv2.png",N3="https://static.wixstatic.com/media/434741_d279412b673345c39c6b4e320b1442a9~mv2.jpg/v1/fill/w_472,h_600,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/434741_d279412b673345c39c6b4e320b1442a9~mv2.jpg",C3="https://static.wixstatic.com/media/1ef5834e68214aa6a18823ce92a9e76c.jpg/v1/fill/w_472,h_315,al_c,q_80,usm_0.66_1.00_0.01,enc_avif,quality_auto/Children%20Praying%20Together.jpg",k3=[{label:"Sunday Services",detail:`Sept – May: 8:30 AM & 10:30 AM
June – Aug: 9:30 AM`},{label:"Service Length",detail:`45 min (Rite I)
~1 hour (Rite II)`},{label:"What to Wear",detail:"No dress code — come as you are"},{label:"Children",detail:`Always welcome
Nursery & Sunday School available`},{label:"Communion",detail:`All baptized Christians welcome
Others may receive a blessing`},{label:"Watch Online",detail:"Livestreamed every Sunday on Facebook"}],S3=[{number:"01",title:"GATHER",short:"We come together in prayer, song, and worship",body:"We begin with praise to God."},{number:"02",title:"SCRIPTURE",short:"We listen to readings from the Bible and a sermon",body:"We hear several readings from the Bible (including a passage from one of the Gospels). A sermon expounds on the scriptures we've heard."},{number:"03",title:"PRAYER",short:"We pray together for one another and for the world",body:"Together we confess what we believe by saying one of the ancient creeds of the church. Then together we offer prayers for the church and for the world."},{number:"04",title:"COMMUNION",short:"Bread and wine are shared as we receive Holy Communion",body:`Bread and wine are offered, and the priest leads us in a prayer of thanksgiving over these gifts, that they may become for us the Body and Blood of Christ.

In the Episcopal Church, all baptized Christians, regardless of age or denomination, are welcome to receive Holy Communion. If you are not baptized or do not wish to receive Communion, you are invited to come forward to receive a blessing at the altar during the administration of Communion.`},{number:"05",title:"SENT FORTH",short:"We are sent into the world to live out our faith",body:"Having received anew the strengthening grace of God in the Sacrament, we are dismissed and sent out into the world in peace, 'to love and serve the Lord.'"}],E3=[{q:"Do I need to be Episcopalian to attend?",a:"Absolutely not. We welcome people of all backgrounds, traditions, and those with no church background at all. Whoever you are, you are welcome here."},{q:"Can my children come to worship with me?",a:"Yes! Children are a vital part of our congregation. Children's Chapel is offered on the first Sunday of each month during the service. Other Sundays, children are welcome to remain in the service with their families."},{q:"What is the Book of Common Prayer?",a:"The Book of Common Prayer (BCP) is the liturgical book of the Episcopal Church, containing the prayers, rites, and services used in worship. The current version was adopted in 1979. You'll find copies in every pew."},{q:"What is Holy Eucharist: Rite Two?",a:`"Rite Two" is the contemporary-language version of the Eucharistic service. It is the standard Sunday service at St. Timothy's and lasts approximately one hour.`},{q:"I can't make it in person — can I worship online?",a:"Yes! We livestream Sunday worship on Facebook every week. Find us at facebook.com/sttimothysouthaven."}];function A3(){return mn("What to Expect on Sunday","Planning your first visit to St. Timothy's Episcopal Church? Learn about our Sunday worship services, what to wear, children's programs, and more."),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("img",{src:b3,alt:"St. Timothy's Episcopal Church, Southaven, MS",className:"absolute inset-0 w-full h-full object-cover object-center",onError:t=>{t.target.src=w3}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Plan Your Visit"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsxs("h1",{className:"font-heading font-300 text-4xl sm:text-5xl md:text-6xl text-white leading-tight",children:["What to Expect",i.jsx("br",{}),"on Sunday"]}),i.jsx("div",{className:"w-14 h-px bg-[#C4973A] mx-auto mt-6"}),i.jsx("p",{className:"font-heading font-400 italic text-white/80 text-lg mt-5 max-w-xl",children:"Whether it's your first time or you're returning after years away — you are welcome here."})]})]}),i.jsxs("section",{style:{backgroundColor:"var(--parchment-dark)"},children:[i.jsx("div",{className:"bg-[#C4973A] text-center py-3 px-6",children:i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-white",children:"Summer Schedule in Effect · One Service at 9:30 AM · Normal schedule resumes in September"})}),i.jsxs("div",{className:"max-w-6xl mx-auto px-6 lg:px-16 py-14",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-10 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body font-600 text-[10px] tracking-[0.35em] uppercase text-[#1E2D4A]",children:"At a Glance"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:k3.map(t=>i.jsxs("div",{className:"bg-white border border-[#1E2D4A]/10 p-6",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A] mb-4"}),i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#C4973A] mb-2",children:t.label}),i.jsx("p",{className:"font-heading font-300 text-[#1E2D4A] text-lg leading-snug whitespace-pre-line",children:t.detail})]},t.label))})]})]}),i.jsx("section",{className:"py-24 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"The Order of Service"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A] mb-6",children:"What to Expect on Sunday"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 leading-relaxed max-w-3xl mx-auto",children:"On most Sundays, our service is the liturgy of the Holy Eucharist. This liturgy, as contained in The Book of Common Prayer (1979 edition), broadly follows a pattern of Christian worship that has developed since the time of the early church."})]}),i.jsx("div",{className:"space-y-0 divide-y divide-[#1E2D4A]/10",children:S3.map((t,n)=>i.jsxs("div",{className:"py-10 grid grid-cols-1 sm:grid-cols-[80px_1fr] gap-0 items-start",children:[i.jsx("div",{className:"mb-3 sm:mb-0",children:i.jsx("span",{className:"font-heading font-300 text-5xl text-[#C4973A] leading-none",children:t.number})}),i.jsxs("div",{className:"sm:border-l sm:border-[#1E2D4A]/10 sm:pl-10",children:[i.jsx("p",{className:"font-body font-600 text-xs tracking-[0.2em] uppercase text-[#1E2D4A] mb-2",children:t.title}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/75 text-base mb-4 leading-snug",children:t.short}),i.jsx("p",{className:"font-body text-[#1E2D4A]/70 leading-relaxed text-sm whitespace-pre-line",children:t.body})]})]},t.number))})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-[#1E2D4A]",children:i.jsxs("div",{className:"max-w-6xl mx-auto grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"What Worship is Like"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-white mb-8 leading-tight",children:"Sunday worship is at the center of our community life."}),i.jsx("p",{className:"font-body text-white/85 leading-relaxed mb-10",children:"Like the earliest Christians, we gather on the first day of the week, the Day of the Resurrection, to worship God together."}),i.jsx("div",{className:"space-y-8",children:[{label:"Liturgical",body:"Prayers are written and follow set and ancient forms."},{label:"Sacramental",body:"Focused on receiving God's grace through outward and visible signs, especially the Holy Communion."},{label:"Participatory",body:"We worship in community, and everyone has their part to play. The service is provided in a printed booklet, directing the congregation how to respond."}].map(t=>i.jsxs("div",{className:"border-l-2 border-[#C4973A] pl-5",children:[i.jsx("h3",{className:"font-body font-600 text-xs tracking-[0.2em] uppercase text-white mb-2",children:t.label}),i.jsx("p",{className:"font-body text-white/85 leading-relaxed text-sm",children:t.body})]},t.label))})]}),i.jsx("div",{children:i.jsx("img",{src:N3,alt:"St. Timothy's congregation in worship",className:"w-full object-contain"})})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"max-w-4xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Full Schedule"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"Sunday Worship Services"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[i.jsxs("div",{className:"bg-white border border-[#1E2D4A]/10 p-8",children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#C4973A] mb-4",children:"September through May"}),i.jsxs("div",{className:"space-y-5",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-300 text-2xl text-[#1E2D4A]",children:"8:30 AM"}),i.jsx("p",{className:"font-body font-600 text-[#1E2D4A] text-sm mt-0.5",children:"Holy Eucharist: Rite I"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/75 text-sm leading-relaxed mt-1",children:"A reverent 'said service' (no music), using the time-worn 'traditional language' of the Prayer Book. About 45 minutes."})]}),i.jsxs("div",{className:"border-t border-[#1E2D4A]/10 pt-5",children:[i.jsx("p",{className:"font-heading font-300 text-2xl text-[#1E2D4A]",children:"10:30 AM"}),i.jsx("p",{className:"font-body font-600 text-[#1E2D4A] text-sm mt-0.5",children:"Holy Eucharist: Rite II"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/75 text-sm leading-relaxed mt-1",children:"A service with congregational hymn singing and contemporary language. About one hour."})]})]})]}),i.jsxs("div",{className:"bg-[#1E2D4A] p-8",children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#C4973A] mb-4",children:"June through August"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-300 text-2xl text-white",children:"9:30 AM"}),i.jsx("p",{className:"font-body font-600 text-white text-sm mt-0.5",children:"Holy Eucharist: Rite II"}),i.jsx("p",{className:"font-body text-white/85 text-sm leading-relaxed mt-2",children:"One combined service during the summer months."})]}),i.jsxs("div",{className:"mt-8 border-t border-white/20 pt-6",children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.25em] uppercase text-[#C4973A] mb-3",children:"Wednesday"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-300 text-xl text-white",children:"9:00 AM"}),i.jsx("p",{className:"font-body text-white/85 text-sm",children:"Morning Prayer"})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading font-300 text-xl text-white",children:"6:00 PM"}),i.jsx("p",{className:"font-body text-white/85 text-sm",children:"Evening Service · Mary Chapel"})]})]})]})]})]})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-white",children:i.jsx("div",{className:"max-w-5xl mx-auto",children:i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 items-start",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Accessibility"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl text-[#1E2D4A] mb-6",children:"Finding Your Way In"}),i.jsx("div",{className:"w-10 h-px bg-[#C4973A] mb-8"}),i.jsxs("div",{className:"space-y-4 font-body text-[#1E2D4A]/70 leading-relaxed text-sm",children:[i.jsx("p",{children:"Enter through the front doors — these are the red double doors under the bell tower. An usher will greet you with a service booklet and assist you as needed. You may sit anywhere in the church."}),i.jsx("p",{children:"Disability parking is available. There are no steps into the church. Let the usher know if you would like Communion brought to you at your seat."})]})]}),i.jsx("div",{className:"flex justify-center md:justify-start",children:i.jsx("img",{src:j3,alt:"Entrance map showing accessible route",className:"max-w-full object-contain",style:{maxHeight:"487px"}})})]})})}),i.jsxs("section",{className:"py-20 px-6 lg:px-16",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 md:grid-cols-2 gap-12",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"What to Wear"})]}),i.jsx("h2",{className:"font-heading font-300 text-2xl text-[#1E2D4A] mb-6",children:"Come As You Are"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/70 leading-relaxed text-sm",children:"There is no dress code at St. Timothy's. You will see some people dressed in their 'Sunday best' and others dressed more casually. Please wear whatever you feel comfortable with, and know that you will be welcomed."})]}),i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Children & Childcare"})]}),i.jsx("h2",{className:"font-heading font-300 text-2xl text-[#1E2D4A] mb-6",children:"Children Are Welcome"}),i.jsxs("div",{className:"space-y-3 font-body text-[#1E2D4A]/70 leading-relaxed text-sm",children:[i.jsx("p",{children:"During the program year, Children's Sunday School is offered weekly from 9:30–10:15."}),i.jsx("p",{children:"Childcare is offered in our nursery during the 10:30 service (program year) and during the 9:30 service (summer schedule). Children are always welcome throughout the service."}),i.jsx("p",{children:"A Children's Chapel service is offered during part of the 10:30 service on the first Sunday of each month."})]})]})]}),i.jsx("div",{className:"max-w-5xl mx-auto mt-10",children:i.jsx("img",{src:C3,alt:"Children praying together at St. Timothy's",className:"w-full object-contain",style:{maxHeight:"360px",objectPosition:"center"}})})]}),i.jsx("section",{className:"py-16 px-6 bg-[#1E2D4A]",children:i.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-5 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Can't Be There?"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl text-white mb-5",children:"Join Us Online"}),i.jsx("p",{className:"font-body text-white/85 leading-relaxed mb-8",children:"Whether you're traveling, exploring faith, or just not ready to walk through the doors yet — you are welcome to worship with us from wherever you are."}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-3 bg-[#C4973A] hover:bg-white hover:text-[#1E2D4A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:[i.jsx(rs,{className:"w-4 h-4"}),"Watch Live on Facebook"]})]})}),i.jsx("section",{className:"py-24 px-6 lg:px-16 bg-white",children:i.jsxs("div",{className:"max-w-3xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-14",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Questions"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"Frequently Asked"})]}),i.jsx("div",{className:"divide-y divide-[#1E2D4A]/10",children:E3.map((t,n)=>i.jsxs("div",{className:"py-7",children:[i.jsx("h3",{className:"font-body font-600 text-sm tracking-wide text-[#1E2D4A] mb-3",children:t.q}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 leading-relaxed text-sm",children:t.a})]},n))}),i.jsxs("div",{className:"mt-12 text-center",children:[i.jsx("p",{className:"font-body text-[#1E2D4A]/75 mb-6",children:"Still have questions? We'd love to hear from you."}),i.jsx(Ve,{to:"/connect",className:"inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:"Get In Touch"})]})]})})]})}const _3="https://static.wixstatic.com/media/bc7440_2ba64958053c4c62a7e086969b19ff61~mv2.png",T3="https://static.wixstatic.com/media/434741_5341f08c52e44eb38d14ae3cf68f441f~mv2.jpg";function D3(){return mn("Our Beliefs","Learn what Episcopalians believe — Scripture, Tradition, and Reason. St. Timothy's is part of the Episcopal Church and the Anglican Communion in Southaven, MS."),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("img",{src:_3,alt:"Open Bible",className:"absolute inset-0 w-full h-full object-cover object-center"}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Our Faith"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-4xl sm:text-5xl md:text-6xl text-white",children:"Our Beliefs"})]})]}),i.jsx("section",{className:"py-24 px-6 lg:px-16",children:i.jsx("div",{className:"max-w-6xl mx-auto",children:i.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-start",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Episcopalians Believe"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A] mb-2 leading-tight",children:"God Is Love."}),i.jsx("h2",{className:"font-heading font-400 italic text-3xl sm:text-4xl text-[#1E2D4A] mb-8 leading-tight",children:"No Exceptions."}),i.jsx("div",{className:"w-10 h-px bg-[#C4973A] mb-8"}),i.jsxs("div",{className:"space-y-5 font-body text-[#1E2D4A]/75 leading-relaxed text-base",children:[i.jsx("p",{children:"Episcopalians believe in a loving, liberating, and life-giving God: Father, Son, and Holy Spirit. Much of our ministry and life of faith is lived out in the local worshipping community, but we are united with siblings in Christ throughout the world, and we are part of a tradition deeply rooted in history yet striving to live faithfully in the world today."}),i.jsxs("p",{children:["As part of the global ",i.jsx("a",{href:"https://www.anglicancommunion.org",target:"_blank",rel:"noopener noreferrer",className:"text-[#1E2D4A] underline underline-offset-2 hover:text-[#C4973A] transition-colors",children:"Anglican Communion"}),", the ",i.jsx("a",{href:"https://www.episcopalchurch.org",target:"_blank",rel:"noopener noreferrer",className:"text-[#1E2D4A] underline underline-offset-2 hover:text-[#C4973A] transition-colors",children:"Episcopal Church"})," descends from the Church of England, maintaining a heritage that is both catholic and reformed."]}),i.jsxs("p",{children:["'Episcopal' comes from the New Testament Greek word for 'Bishop.' St. Timothy's is part of the ",i.jsx("a",{href:"https://www.dioms.org",target:"_blank",rel:"noopener noreferrer",className:"text-[#1E2D4A] underline underline-offset-2 hover:text-[#C4973A] transition-colors",children:"Diocese of Mississippi"}),"."]})]})]}),i.jsx("div",{children:i.jsx("img",{src:T3,alt:"Wooden cross at St. Timothy's",className:"w-full h-auto"})})]})})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-[#1E2D4A]",children:i.jsxs("div",{className:"max-w-6xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-14",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"The Way We Follow"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-white",children:"Scripture, Tradition & Reason"})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-0 border border-white/10",children:[{label:"Scripture",body:"The Old and New Testaments contain all things necessary to salvation and are the Word of God. We read Scripture through the lens of the whole of Christian tradition and the wisdom of the ages."},{label:"Tradition",body:"The Episcopal Church maintains the historic creeds, the apostolic ministry of bishops, priests, and deacons, and the sacraments as channels of God's grace connecting us to 2,000 years of Christian faith."},{label:"Reason",body:"God gave us minds to use. The Episcopal Church honors intellectual inquiry, honest doubt, and dialogue as part of a living, growing faith. You are not asked to leave your mind at the door."}].map((t,n)=>i.jsxs("div",{className:`p-8 ${n<2?"border-b md:border-b-0 md:border-r border-white/10":""}`,children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A] mb-5"}),i.jsx("h3",{className:"font-heading font-500 text-lg text-white mb-4",children:t.label}),i.jsx("p",{className:"font-body text-white/65 leading-relaxed text-sm",children:t.body})]},t.label))})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-[#EDE7DA]",children:i.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-6 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Full Inclusion"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("blockquote",{className:"font-heading font-300 italic text-[#1E2D4A] text-xl sm:text-2xl md:text-3xl leading-relaxed mb-10",children:`"The Episcopal Church has a legacy of inclusion, aspiring to tell and exemplify God's love for every human being. Women and men serve as bishops, priests, and deacons. Leadership is a gift from God, and can be expressed by all people."`}),i.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[i.jsx("a",{href:"https://www.episcopalchurch.org",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:"Learn More: The Episcopal Church"}),i.jsx("a",{href:"https://www.dioms.org",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center gap-2 border border-[#1E2D4A] text-[#1E2D4A] hover:bg-[#1E2D4A] hover:text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:"Diocese of Mississippi"})]})]})})]})}const R3="https://static.wixstatic.com/media/434741_5cbf736ea82c4692a38feb74087d15c1~mv2.jpg/v1/crop/x_0,y_32,w_1170,h_1495/fill/w_500,h_500,al_c,q_85/434741_5cbf736ea82c4692a38feb74087d15c1~mv2.jpg",P3="https://static.wixstatic.com/media/bc7440_935e8dfa22814e3d9ea8d7f4a890c5b7~mv2.png/v1/fill/w_500,h_500,al_c,q_85/bc7440_935e8dfa22814e3d9ea8d7f4a890c5b7~mv2.png",O3="https://static.wixstatic.com/media/bc7440_59ac65bc2cb149e0a0cbdf0bdaee1e5c~mv2.png/v1/fill/w_800,h_600,al_c,q_85/bc7440_59ac65bc2cb149e0a0cbdf0bdaee1e5c~mv2.png",M3="https://static.wixstatic.com/media/bc7440_a369b9ef403d490485f7636adc81679b~mv2.png/v1/fill/w_980,h_231,al_c,q_85/bc7440_a369b9ef403d490485f7636adc81679b~mv2.png",cx={backRow:["Laurie Harwell","Henry Gordon (treasurer)","Melanie Jolly","Danielle Kirk","Adrienne Moore (senior warden)","Karen Johnston","Fr. Clay Calhoun (rector)","Kelly Romito"],frontRow:["Sarah Irby","Cody Barthol (junior warden)","Katie Ligon (clerk)"]};function L3(){return mn("Leadership","Meet the clergy, staff, and vestry of St. Timothy's Episcopal Church in Southaven, Mississippi."),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("img",{src:M3,alt:"St. Timothy's church leadership banner",className:"absolute inset-0 w-full h-full object-cover object-center"}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Our People"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Leadership"})]})]}),i.jsx("section",{className:"py-24 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-16",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Clergy & Staff"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A]",children:"Meet Our Team"})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 mb-16",children:[{photo:R3,name:"The Rev. Clay Calhoun",title:"Rector",email:"rector@sttimothysms.org"},{photo:P3,name:"Debbie Wisdom",title:"Bookkeeper",email:"bookkeeper@sttimothysms.org"}].map(t=>i.jsxs("div",{className:"flex flex-col items-center text-center",children:[i.jsx("div",{className:"w-72 h-72 overflow-hidden mb-6",children:i.jsx("img",{src:t.photo,alt:t.name,className:"w-full h-full object-cover object-top"})}),i.jsx("h3",{className:"font-heading font-500 text-xl text-[#1E2D4A] mb-1",children:t.name}),i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#C4973A] mb-4",children:t.title}),i.jsx("div",{className:"w-8 h-px bg-[#C4973A] mb-4"}),i.jsxs("a",{href:`mailto:${t.email}`,className:"inline-flex items-center gap-2 font-body text-[#1E2D4A]/80 hover:text-[#C4973A] transition-colors text-sm",children:[i.jsx(Ht,{className:"w-4 h-4"}),t.email]})]},t.name))})]})}),i.jsx("section",{className:"py-20 px-6 lg:px-16 bg-white",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsxs("div",{className:"text-center mb-12",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"2026"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A] mb-5",children:"Vestry"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 leading-relaxed max-w-2xl mx-auto",children:"Your Vestry stands as the body that represents you. Please feel free to contact any of them for information or needs. They are elected by you and are open to suggestions, criticisms, and praise."})]}),i.jsx("div",{className:"mb-10 flex justify-center",children:i.jsx("img",{src:O3,alt:"Vestry 2026",className:"w-full max-w-2xl object-cover"})}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 max-w-2xl mx-auto",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#C4973A] mb-4",children:"Back Row"}),i.jsx("ul",{className:"space-y-2",children:cx.backRow.map(t=>i.jsx("li",{className:"font-body text-[#1E2D4A]/75 text-sm",children:t},t))})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-600 text-[10px] tracking-[0.3em] uppercase text-[#C4973A] mb-4",children:"Front Row"}),i.jsx("ul",{className:"space-y-2",children:cx.frontRow.map(t=>i.jsx("li",{className:"font-body text-[#1E2D4A]/75 text-sm",children:t},t))})]})]})]})}),i.jsx("section",{className:"py-16 px-6 lg:px-16",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[i.jsx("h2",{className:"font-heading font-300 text-2xl text-[#1E2D4A] mb-4",children:"Questions or Suggestions?"}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 mb-7",children:"The vestry and staff are here to serve you. Don't hesitate to reach out."}),i.jsxs(Ve,{to:"/connect",className:"inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:["Contact Us ",i.jsx(ns,{className:"w-4 h-4"})]})]})})]})}const ux=[{key:"time",label:"Time"},{key:"lector",label:"Lector"},{key:"lem",label:"LEM / I"},{key:"crucifer",label:"Crucifer"},{key:"gospelBook",label:"Gospel Book"},{key:"torches",label:"Torches"},{key:"ushers",label:"Ushers"},{key:"streaming",label:"Streaming"},{key:"vestry",label:"Vestry on Duty"}];function dx(t){if(!t)return 0;const n=t.replace(/^(\d{1,2})\/(\d{1,2})\/(\d{2})$/,(o,l,u,d)=>`${l}/${u}/20${d}`),r=new Date(n);return isNaN(r.getTime())?0:r.getTime()}function F3(t){return t.time?!1:["lector","lem","crucifer","gospelBook","torches","ushers","streaming","vestry"].every(r=>!t[r]||t[r]==="**"||t[r]==="***")}function I3(t){const n={};for(const r of t){if(F3(r))continue;const o=r.date;n[o]||(n[o]=[]),n[o].push(r)}return Object.entries(n).sort(([r],[o])=>dx(r)-dx(o)).map(([r,o])=>[r,o.sort((l,u)=>{const d=l.time||"",f=u.time||"",m=x=>{const[g,v]=x.split(":").map(Number);return isNaN(g)?9999:g*60+(v||0)};return m(d)-m(f)})])}function B3(t){const n=(t||"").replace(/^(\d{1,2})\/(\d{1,2})\/(\d{2})$/,(o,l,u,d)=>`${l}/${u}/20${d}`),r=new Date(n);return isNaN(r.getTime())?t:r.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}function U3({value:t}){return!t||t==="**"||t==="***"?i.jsx("span",{className:"text-[#1E2D4A]/25 italic text-xs",children:"—"}):i.jsx("span",{children:t})}function z3(){mn("Ministry Schedule","View the lay ministry schedule for Sunday services at St. Timothy's Episcopal Church — lectors, ushers, chalice bearers, and more.");const[t,n]=b.useState([]),[r,o]=b.useState("Ministry Schedule"),[l,u]=b.useState(!0),[d,f]=b.useState(null);b.useEffect(()=>{ye.entities.MinistryEntry.list("date",500).then(x=>{n(x),x.length>0&&o(x[0].schedule_title||"Ministry Schedule")}).catch(x=>f(x.message)).finally(()=>u(!1))},[]);const m=I3(t);return i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://static.wixstatic.com/media/434741_0aef910a0fac44419817d020b25b35ac~mv2.png/v1/fit/w_1920,h_964,q_90/434741_0aef910a0fac44419817d020b25b35ac~mv2.png')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Serving Together"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Ministry Schedule"})]})]}),i.jsx("section",{className:"py-12 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-7xl mx-auto",children:[i.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 mb-10",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"For Our Parish"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl text-[#1E2D4A]",children:r}),i.jsx("p",{className:"font-body text-[#1E2D4A]/80 text-sm mt-3",children:"Ministry assignments for ushers, readers, chalice bearers, and other Sunday roles."})]}),i.jsx("div",{className:"shrink-0",children:i.jsx(Ve,{to:"/connect",className:"inline-flex items-center gap-1 border border-[#1E2D4A] text-[#1E2D4A] hover:bg-[#1E2D4A] hover:text-white font-body font-600 text-xs tracking-[0.2em] uppercase px-4 py-2.5 transition-colors duration-300",children:"Contact Office"})})]}),l&&i.jsx("div",{className:"flex items-center justify-center py-24",children:i.jsx("div",{className:"w-7 h-7 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin"})}),d&&i.jsx("div",{className:"text-center py-16",children:i.jsx("p",{className:"font-body text-[#1E2D4A]/80",children:"Failed to load schedule. Please try again later."})}),!l&&!d&&m.length>0&&i.jsx("div",{className:"space-y-10",children:m.map(([x,g])=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-4 mb-3",children:[i.jsx("div",{className:"bg-[#1E2D4A] text-white px-5 py-2",children:i.jsx("p",{className:"font-body font-600 text-sm uppercase tracking-widest",children:B3(x)})}),i.jsx("div",{className:"flex-1 h-px bg-[#1E2D4A]/10"})]}),i.jsx("div",{className:"overflow-x-auto border border-[#1E2D4A]/10 shadow-sm",children:i.jsxs("table",{className:"w-full text-sm min-w-[1000px] table-fixed",children:[i.jsx("thead",{children:i.jsx("tr",{className:"bg-[#1E2D4A]",children:ux.map(v=>i.jsx("th",{className:`px-3 py-3 text-left font-body font-600 text-[10px] tracking-[0.2em] uppercase text-[#C4973A] ${v.key==="time"?"w-[6%] whitespace-nowrap":v.key==="lector"||v.key==="lem"||v.key==="crucifer"?"w-[10%]":v.key==="gospelBook"||v.key==="torches"?"w-[11%]":v.key==="ushers"?"w-[13%]":v.key==="streaming"?"w-[10%]":v.key==="vestry"?"w-[14%]":"w-[10%]"}`,children:v.label},v.key))})}),i.jsx("tbody",{children:g.map((v,w)=>i.jsx("tr",{className:`border-t border-[#1E2D4A]/8 ${w%2===0?"bg-white":"bg-[#F7F3EC]"}`,children:ux.map(A=>i.jsx("td",{className:`px-3 py-3 font-body text-[#1E2D4A]/80 align-top text-sm ${A.key==="time"?"font-600 text-xs tracking-wide text-[#C4973A] whitespace-nowrap":""}`,children:i.jsx(U3,{value:v[A.key]})},A.key))},w))})]})})]},x))}),!l&&!d&&m.length===0&&i.jsx("div",{className:"text-center py-16",children:i.jsx("p",{className:"font-heading font-400 italic text-[#1E2D4A]/40 text-lg",children:"No schedule data available at this time."})})]})})]})}const $3=[{id:"baptism",title:"Baptism",quote:`"Holy Baptism is full initiation by water and the Holy Spirit into Christ's Body the Church. The bond which God establishes in Baptism is indissoluble."`,quoteSource:"The Book of Common Prayer, p. 298",body:["Baptism is the joyful way in which God lovingly adopts us as daughters and sons and makes us members of the household of God. Baptisms at St. Timothy's may be celebrated throughout the year (outside of Lent), but are especially appropriate on certain days, such as the feasts of Easter, Pentecost, and All Saints.","The liturgy for Holy Baptism begins on page 299 of the Book of Common Prayer."],formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/ba43a37e0_BaptismalInformationForm.pdf",formLabel:"Download Baptismal Information Form",cta:"If you are interested in baptism, for yourself or your child, please contact the church office."},{id:"eucharist",title:"Holy Eucharist",quote:'"The Holy Eucharist is the sacrament commanded by Christ for the continual remembrance of his life, death, and resurrection, until his coming again."',quoteSource:"The Book of Common Prayer, p. 859",body:["The Holy Eucharist (also known as Holy Communion, the Lord's Supper, and the Mass) is our principal act of Christian worship. In the Episcopal Church, all baptized Christians are welcome to receive Holy Communion. Communicants are invited forward to the altar to receive the Sacrament (you may stand or kneel)."],cta:null},{id:"confirmation",title:"Confirmation",quote:'"Confirmation is the rite in which we express a mature commitment to Christ, and receive strength from the Holy Spirit through prayer and the laying on of hands by a bishop."',quoteSource:"The Book of Common Prayer, p. 860",body:["Confirmation (both for adults and for youth) involves a process of preparation and instruction in the Christian faith and the Episcopal Church, leading up to the Bishop's visit. Adults who have been previously confirmed in a different denomination may choose to be received into the Episcopal Church at the Bishop's hands."],cta:"If you are interested in Confirmation (or Reception), please contact the Rector."},{id:"reconciliation",title:"Reconciliation of a Penitent",quote:'"Reconciliation of a Penitent, or Penance, is the rite in which those who repent of their sins may confess them to God in the presence of a priest, and receive the assurance of pardon and the grace of absolution."',quoteSource:"The Book of Common Prayer, p. 861",body:["Information about this sacramental rite, and its forms for use, may be found beginning on page 446 of the Book of Common Prayer. At St. Timothy's, the opportunity for confession is offered regularly during the season of Lent; confessions may also be scheduled with the priest at any time."],cta:null},{id:"matrimony",title:"Holy Matrimony",quote:'"… to have and to hold from this day forward, for better for worse, for richer for poorer, in sickness and in health, until we are parted by death. This is my solemn vow."',quoteSource:"The Book of Common Prayer, p. 427",body:["In the Episcopal Church, Christian marriage is understood to be a lifelong union of two persons, in heart, body, and mind, intended by God for their mutual joy and help.","At St. Timothy's, all weddings are according to the Celebration and Blessing of a Marriage, as contained in the Book of Common Prayer. The canons of the church require that at least one of the parties be baptized, that the couple undergo pre-marital instruction, and that various other conditions are met."],formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/a92c2991d_StTimothysWeddingPolicyPacket.pdf",formLabel:"Download Wedding Policy Packet",cta:"If you are interested in being married at St. Timothy's, please contact the Rector to schedule an initial meeting."},{id:"burial",title:"Christian Burial",quote:'"The liturgy of the dead is an Easter liturgy. It finds all its meaning in the resurrection. Because Jesus was raised from the dead, we, too, shall be raised."',quoteSource:"The Book of Common Prayer, p. 507",body:["Commending people back to God at life's end is one of the great privileges and responsibilities of the church. The burial of the dead is part of the regular life of the Christian community: all members of the body of Christ should rightly expect to be reverently cared for at death by the faithful.","St. Timothy's encourages all her members to plan and make arrangements for their burial in advance. The Burial Planning form should be filled out in consultation with the Rector, with a copy kept on file in the parish office."],formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/873378bae_StTimothysburialplanningsheet.pdf",formLabel:"Download Burial Planning Form",cta:null}];function W3(){return mn("Sacraments & Services","Explore the sacraments and rites of St. Timothy's Episcopal Church — Baptism, Eucharist, Confirmation, Matrimony, and more."),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://images.unsplash.com/photo-1438032005730-c779502df39b?w=1600&q=80')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Our Faith & Practice"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Sacraments & Services"}),i.jsx("div",{className:"w-14 h-px bg-[#C4973A] mx-auto mt-6"}),i.jsx("p",{className:"font-heading font-400 italic text-white/75 text-lg mt-5 max-w-2xl",children:"The sacraments are outward and visible signs of inward and spiritual grace."})]})]}),i.jsx("section",{className:"py-16 px-6 lg:px-16",children:i.jsx("div",{className:"max-w-3xl mx-auto text-center",children:i.jsx("p",{className:"font-body text-[#1E2D4A]/70 leading-relaxed text-lg",children:"At St. Timothy's, the sacramental life of the Church is central to our worship and our identity as Episcopalians. Below you will find an overview of the sacraments and rites we celebrate, drawn from the Book of Common Prayer."})})}),i.jsx("section",{className:"pb-24 px-6 lg:px-16",children:i.jsx("div",{className:"max-w-4xl mx-auto space-y-0 divide-y divide-[#1E2D4A]/10",children:$3.map((t,n)=>i.jsx("div",{id:t.id,className:"py-16",children:i.jsxs("div",{className:"flex items-start gap-6",children:[i.jsx("span",{className:"font-heading font-300 text-5xl text-[#C4973A]/40 leading-none shrink-0 hidden sm:block",children:String(n+1).padStart(2,"0")}),i.jsxs("div",{className:"flex-1",children:[i.jsx("h2",{className:"font-heading font-400 text-2xl sm:text-3xl text-[#1E2D4A] mb-6",children:t.title}),i.jsxs("blockquote",{className:"border-l-2 border-[#C4973A] pl-6 mb-8",children:[i.jsx("p",{className:"font-heading font-400 italic text-[#1E2D4A]/75 leading-relaxed text-base mb-2",children:t.quote}),i.jsxs("cite",{className:"font-body font-600 text-[10px] tracking-[0.2em] uppercase text-[#C4973A] not-italic",children:["~ ",t.quoteSource]})]}),i.jsx("div",{className:"space-y-4",children:t.body.map((r,o)=>i.jsx("p",{className:"font-body text-[#1E2D4A]/70 leading-relaxed text-sm",children:r},o))}),t.formUrl&&i.jsxs("div",{className:"mt-6 flex flex-col sm:flex-row sm:items-center gap-3",children:[i.jsxs("a",{href:t.formUrl,target:"_blank",rel:"noopener noreferrer",download:!0,className:"inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-xs tracking-[0.2em] uppercase px-6 py-3 transition-colors duration-300",children:[i.jsx(Lx,{className:"w-4 h-4"}),t.formLabel]}),i.jsxs("p",{className:"font-body text-[#1E2D4A]/50 text-xs italic",children:["Complete and return to ",i.jsx("a",{href:"mailto:rector@sttimothysms.org",className:"text-[#C4973A] hover:underline",children:"rector@sttimothysms.org"})]})]}),t.cta&&i.jsx("div",{className:"mt-6 bg-[#1E2D4A]/5 border-l-2 border-[#1E2D4A]/30 pl-5 py-3",children:i.jsx("p",{className:"font-body text-[#1E2D4A]/70 leading-relaxed text-sm italic",children:t.cta})})]})]})},t.id))})}),i.jsx("section",{className:"py-16 px-6 bg-[#1E2D4A]",children:i.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Questions?"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h2",{className:"font-heading font-300 text-2xl text-white mb-5",children:"We'd Love to Hear From You"}),i.jsx("p",{className:"font-body text-white/65 mb-8 leading-relaxed",children:"For questions about any of our sacraments or services, please don't hesitate to reach out to the church office or the Rector."}),i.jsx(Ve,{to:"/connect",className:"inline-flex items-center gap-2 bg-[#C4973A] hover:bg-white hover:text-[#1E2D4A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-8 py-4 transition-colors duration-300",children:"Contact Us"})]})})]})}function q3(){mn("Parish Newsletter","Read past issues of the St. Timothy's Episcopal Church newsletter and subscribe to stay connected with our community in Southaven, MS.");const[t,n]=b.useState([]),[r,o]=b.useState(!0);return b.useEffect(()=>{ye.entities.NewsletterIssue.list("-date_label",20).then(n).finally(()=>o(!1))},[]),i.jsxs("div",{style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("section",{className:"relative h-96 sm:h-80 overflow-hidden",children:[i.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://static.wixstatic.com/media/434741_0aef910a0fac44419817d020b25b35ac~mv2.png/v1/fit/w_1920,h_964,q_90/434741_0aef910a0fac44419817d020b25b35ac~mv2.png')"}}),i.jsx("div",{className:"absolute inset-0 bg-[#1E2D4A]/75"}),i.jsxs("div",{className:"relative z-10 h-full flex flex-col items-center justify-center text-center px-6 pt-16 sm:pt-0",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4 justify-center",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Stay Connected"}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"})]}),i.jsx("h1",{className:"font-heading font-300 text-5xl sm:text-6xl text-white",children:"Parish Newsletter"})]})]}),i.jsx("section",{className:"py-20 px-6 lg:px-16",children:i.jsxs("div",{className:"max-w-5xl mx-auto",children:[i.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[i.jsx("div",{className:"w-6 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[10px] tracking-[0.35em] uppercase text-[#C4973A]",children:"Past Issues"})]}),i.jsx("h2",{className:"font-heading font-300 text-3xl sm:text-4xl text-[#1E2D4A] mb-6",children:"Newsletter Archive"}),r&&i.jsx("div",{className:"flex items-center justify-center py-16",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin"})}),!r&&t.length>0&&i.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-10",children:t.map(l=>i.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"group bg-white border border-[#1E2D4A]/10 hover:border-[#C4973A] p-6 flex flex-col gap-3 transition-all duration-200 hover:shadow-md",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsx("span",{className:"font-body text-[10px] tracking-[0.3em] uppercase text-[#C4973A] font-medium",children:l.date_label}),i.jsx(br,{className:"w-3.5 h-3.5 text-[#1E2D4A]/20 group-hover:text-[#C4973A] transition-colors shrink-0 mt-0.5"})]}),i.jsx("div",{className:"w-8 h-px bg-[#C4973A]/40 group-hover:bg-[#C4973A] transition-colors"}),i.jsx("p",{className:"font-heading text-[#1E2D4A] text-lg leading-snug group-hover:text-[#C4973A] transition-colors",children:l.title}),i.jsx("span",{className:"mt-auto font-body text-xs tracking-[0.15em] uppercase text-[#1E2D4A]/40 group-hover:text-[#C4973A] transition-colors",children:"Read Issue →"})]},l.id))}),!r&&t.length===0&&i.jsx("p",{className:"font-body text-[#1F1F1F]/65 text-sm leading-loose mb-10",children:"Past issues will appear here. Check back soon."}),i.jsxs("div",{className:"bg-white border-l-4 border-[#C4973A] p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6",children:[i.jsxs("div",{className:"flex items-start gap-4",children:[i.jsx(Ht,{className:"w-5 h-5 text-[#C4973A] mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-600 text-[#1E2D4A] text-sm mb-1",children:"Never miss an issue"}),i.jsx("p",{className:"font-body text-[#1F1F1F]/65 text-sm",children:"Join our mailing list to receive future newsletters directly in your inbox."})]})]}),i.jsxs("a",{href:"http://eepurl.com/gwU9_r",target:"_blank",rel:"noopener noreferrer",className:"shrink-0 inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-600 text-sm tracking-[0.2em] uppercase px-6 py-3 transition-colors duration-300",children:["Subscribe",i.jsx(br,{className:"w-3 h-3"})]})]})]})})]})}function Lu({label:t,result:n}){if(!n)return null;if(n.success){const r=n.count!==void 0?` (${n.count} items)`:"";return i.jsxs("div",{className:"flex items-center gap-3 py-2.5 border-b border-[#1E2D4A]/8 last:border-0",children:[i.jsx(Zs,{className:"w-4 h-4 text-green-600 shrink-0"}),i.jsx("span",{className:"font-body text-sm text-[#1E2D4A]/80 flex-1",children:t}),i.jsxs("span",{className:"font-body text-xs text-green-600",children:["OK",r]})]})}return i.jsxs("div",{className:"flex items-start gap-3 py-2.5 border-b border-[#1E2D4A]/8 last:border-0",children:[i.jsx(Mx,{className:"w-4 h-4 text-red-500 shrink-0 mt-0.5"}),i.jsx("span",{className:"font-body text-sm text-[#1E2D4A]/80 flex-1",children:t}),i.jsx("span",{className:"font-body text-xs text-red-500 text-right max-w-[160px] leading-tight",children:n.error})]})}function H3(){const{token:t}=oj(),[n,r]=b.useState("loading"),[o,l]=b.useState(""),[u,d]=b.useState(null);b.useEffect(()=>{async function m(){try{const g=(await ye.functions.invoke("manualRefresh",{token:t})).data;g.cooldown?(r("cooldown"),l(g.message)):g.success&&g.allSuccess?(r("success"),d(g.results)):g.success&&!g.allSuccess?(r("partial"),d(g.results)):(r("error"),l(g.error||"An unexpected error occurred."))}catch(x){r("error"),l(x.message||"Could not reach the server.")}}m()},[t]);const f={loading:{icon:i.jsx(Ux,{className:"w-12 h-12 text-[#C4973A] animate-spin"}),heading:"Refreshing website data…",color:"text-[#1E2D4A]"},success:{icon:i.jsx(Zs,{className:"w-12 h-12 text-green-600"}),heading:"Refresh Complete",color:"text-green-700"},partial:{icon:i.jsx(Fu,{className:"w-12 h-12 text-amber-500"}),heading:"Partially Refreshed",color:"text-amber-600"},cooldown:{icon:i.jsx(ls,{className:"w-12 h-12 text-[#C4973A]"}),heading:"Recently Refreshed",color:"text-[#C4973A]"},error:{icon:i.jsx(Mx,{className:"w-12 h-12 text-red-600"}),heading:"Something went wrong",color:"text-red-700"}}[n];return i.jsx("div",{className:"min-h-screen flex items-center justify-center px-6",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"bg-white border border-[#1E2D4A]/10 p-12 max-w-md w-full text-center shadow-sm",children:[i.jsx("div",{className:"flex justify-center mb-8",children:i.jsxs("svg",{width:"32",height:"40",viewBox:"0 0 32 40",fill:"none",children:[i.jsx("rect",{x:"13",y:"0",width:"6",height:"40",fill:"#1E2D4A",opacity:"0.15"}),i.jsx("rect",{x:"0",y:"12",width:"32",height:"6",fill:"#1E2D4A",opacity:"0.15"})]})}),i.jsx("div",{className:"flex justify-center mb-5",children:f.icon}),i.jsx("h1",{className:`font-heading font-300 text-2xl mb-3 ${f.color}`,children:f.heading}),o&&i.jsx("p",{className:"font-body text-[#1E2D4A]/70 text-sm leading-relaxed",children:o}),u&&i.jsxs("div",{className:"mt-6 text-left border border-[#1E2D4A]/10 px-4 py-1",children:[i.jsx(Lu,{label:"Calendar Events",result:u.calendar}),i.jsx(Lu,{label:"Newsletters",result:u.newsletters}),i.jsx(Lu,{label:"Ministry Schedule",result:u.ministry})]}),i.jsx("div",{className:"mt-8 pt-6 border-t border-[#1E2D4A]/10",children:i.jsx("p",{className:"font-body text-[10px] tracking-[0.2em] uppercase text-[#1E2D4A]/30",children:"St. Timothy's Episcopal Church"})})]})})}function Fy({stream:t}){return t!=null&&t.length?i.jsxs("div",{className:"bcp-liturgy max-w-2xl mx-auto px-6 py-10 pb-24",children:[t.map((n,r)=>{switch(n.type){case"section-break":return i.jsx("div",{className:"bcp-section-break"},r);case"rubric":return i.jsx("p",{className:"bcp-rubric",children:n.text},r);case"officiant":return i.jsx("p",{className:"bcp-officiant",children:n.text},r);case"people":return i.jsx("p",{className:"bcp-people",children:n.text},r);case"versicle":{const o=n.role==="People"||n.role==="R."||n.role==="Answer";return i.jsxs("p",{className:`bcp-versicle-inline ${o?"bcp-people":"bcp-officiant"}`,children:[i.jsx("span",{className:"bcp-role-inline",children:n.role}),n.text]},r)}case"verse":return i.jsx("p",{className:"bcp-verse",children:n.text},r);case"verse-plain":return i.jsx("p",{className:"bcp-verse-plain",children:n.text},r);case"lesson":return i.jsx("p",{className:"bcp-lesson",children:n.text},r);case"ref":return i.jsx("p",{className:"bcp-ref",children:n.text},r);case"heading":return i.jsxs("div",{className:"bcp-heading",children:[i.jsx("span",{className:`bcp-heading-title${n.title==="The Lesson"?" bcp-heading-title--bold":""}`,children:n.title}),n.sub&&i.jsx("span",{className:"bcp-heading-sub",children:n.sub})]},r);default:return null}}),i.jsx("style",{children:`
        .bcp-liturgy {
          font-family: var(--font-prayer-book);
          color: #1E2D4A;
        }
        .bcp-section-break {
          height: 1.75rem;
        }
        .bcp-rubric {
          font-family: var(--font-prayer-book);
          font-style: italic;
          color: #8B1C1C;
          font-size: 0.9rem;
          line-height: 1.65;
          margin-top: 0.6rem;
          margin-bottom: 0.25rem;
        }
        .bcp-officiant {
          font-family: var(--font-prayer-book);
          font-weight: 400;
          color: #1E2D4A;
          font-size: 1.05rem;
          line-height: 1.85;
          margin-top: 0.15rem;
        }
        .bcp-people {
          font-family: var(--font-prayer-book);
          font-weight: 700;
          color: #1E2D4A;
          font-size: 1.05rem;
          line-height: 1.85;
          margin-top: 0.15rem;
        }
        .bcp-versicle-inline {
          margin-top: 0.25rem;
          display: flex;
          align-items: baseline;
          gap: 0.5rem;
        }
        .bcp-role-inline {
          font-family: var(--font-body);
          font-size: 0.6rem;
          font-weight: 700;
          letter-spacing: 0.15em;
          text-transform: uppercase;
          color: #8B1C1C;
          white-space: nowrap;
          flex-shrink: 0;
          padding-top: 0.1rem;
        }
        .bcp-verse {
          font-family: var(--font-prayer-book);
          font-weight: 700;
          color: #1E2D4A;
          font-size: 1.05rem;
          line-height: 1.9;
          white-space: pre-line;
          margin-top: 0.4rem;
        }
        .bcp-verse-plain {
          font-family: var(--font-prayer-book);
          font-weight: 400;
          color: #1E2D4A;
          font-size: 1.05rem;
          line-height: 1.9;
          white-space: pre-line;
          margin-top: 0.4rem;
        }
        .bcp-heading-title--bold {
          font-weight: 700;
        }
        .bcp-lesson {
          font-family: var(--font-prayer-book);
          font-weight: 400;
          color: #1E2D4A;
          font-size: 1rem;
          line-height: 1.9;
          margin-top: 0.4rem;
        }
        .bcp-ref {
          font-family: var(--font-body);
          font-size: 0.7rem;
          letter-spacing: 0.08em;
          color: #8B8375;
          margin-top: 0.35rem;
          margin-bottom: 0.35rem;
        }
        .bcp-heading {
          margin-top: 0.5rem;
          margin-bottom: 0.25rem;
          display: flex;
          align-items: baseline;
          flex-wrap: wrap;
          gap: 0.6rem;
        }
        .bcp-heading-title {
          font-family: var(--font-heading);
          font-size: 1.05rem;
          font-weight: 500;
          color: #1E2D4A;
          letter-spacing: 0.01em;
        }
        .bcp-heading-sub {
          font-family: var(--font-prayer-book);
          font-style: italic;
          font-size: 0.85rem;
          color: #8B1C1C;
        }
      `})]}):null}function V3({meta:t}){const n=(t==null?void 0:t.session)==="morning"?"Morning Prayer":"Evening Prayer",r=(t==null?void 0:t.session)==="morning"?"☀":"☽";return i.jsxs("div",{className:"text-center pt-10 pb-8 px-6 border-b",style:{borderColor:"var(--gold)",backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase mb-2",style:{color:"var(--gold)"},children:"Daily Office"}),i.jsxs("div",{className:"flex items-center justify-center gap-3 mb-1",children:[i.jsx("span",{className:"text-xl",style:{color:"var(--gold)"},children:r}),i.jsx("h1",{className:"font-heading text-4xl font-light text-white",children:n}),i.jsx("span",{className:"text-xl",style:{color:"var(--gold)"},children:r})]}),i.jsx("p",{className:"font-heading italic text-white/60 text-base mt-1",children:t==null?void 0:t.date_label}),i.jsxs("div",{className:"flex items-center justify-center gap-4 mt-4",children:[i.jsx("div",{className:"h-px w-16",style:{backgroundColor:"var(--gold)",opacity:.4}}),i.jsx("span",{className:"font-body text-[9px] tracking-[0.4em] uppercase",style:{color:"var(--gold)",opacity:.7},children:"The Book of Common Prayer"}),i.jsx("div",{className:"h-px w-16",style:{backgroundColor:"var(--gold)",opacity:.4}})]})]})}function Q3(){mn("Daily Office","Pray the Daily Office with St. Timothy's Episcopal Church — morning and evening prayer with psalms and scripture readings for today.");const[t,n]=b.useState(null),[r,o]=b.useState(!0),[l,u]=b.useState(null);return b.useEffect(()=>{ye.functions.invoke("getDailyOffice",{}).then(d=>n(d.data)).catch(d=>u(d.message)).finally(()=>o(!1))},[]),r?i.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"text-center space-y-3",children:[i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin mx-auto"}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/50 text-sm",children:"Preparing the Office…"})]})}):l?i.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--parchment)"},children:i.jsx("p",{className:"font-body text-[#7A1B1B] text-sm",children:l})}):i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsx("div",{className:"pt-16",style:{backgroundColor:"var(--navy)"},children:i.jsx(V3,{meta:t==null?void 0:t.meta})}),i.jsx(Fy,{stream:t==null?void 0:t.stream})]})}var G3=Symbol.for("react.lazy"),ul=yd[" use ".trim().toString()];function Y3(t){return typeof t=="object"&&t!==null&&"then"in t}function Iy(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===G3&&"_payload"in t&&Y3(t._payload)}function By(t){const n=J3(t),r=b.forwardRef((o,l)=>{let{children:u,...d}=o;Iy(u)&&typeof ul=="function"&&(u=ul(u._payload));const f=b.Children.toArray(u),m=f.find(Z3);if(m){const x=m.props.children,g=f.map(v=>v===m?b.Children.count(x)>1?b.Children.only(null):b.isValidElement(x)?x.props.children:null:v);return i.jsx(n,{...d,ref:l,children:b.isValidElement(x)?b.cloneElement(x,void 0,g):null})}return i.jsx(n,{...d,ref:l,children:u})});return r.displayName=`${t}.Slot`,r}var K3=By("Slot");function J3(t){const n=b.forwardRef((r,o)=>{let{children:l,...u}=r;if(Iy(l)&&typeof ul=="function"&&(l=ul(l._payload)),b.isValidElement(l)){const d=tS(l),f=eS(u,l.props);return l.type!==b.Fragment&&(f.ref=o?Hd(o,d):d),b.cloneElement(l,f)}return b.Children.count(l)>1?b.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var X3=Symbol("radix.slottable");function Z3(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===X3}function eS(t,n){const r={...n};for(const o in n){const l=t[o],u=n[o];/^on[A-Z]/.test(o)?l&&u?r[o]=(...f)=>{const m=u(...f);return l(...f),m}:l&&(r[o]=l):o==="style"?r[o]={...l,...u}:o==="className"&&(r[o]=[l,u].filter(Boolean).join(" "))}return{...t,...r}}function tS(t){var o,l;let n=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?t.ref:(n=(l=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:l.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const nS=vd("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ct=b.forwardRef(({className:t,variant:n,size:r,asChild:o=!1,...l},u)=>{const d=o?K3:"button";return i.jsx(d,{className:hn(nS({variant:n,size:r,className:t})),ref:u,...l})});Ct.displayName="Button";const hx={new:"bg-blue-100 text-blue-800",read:"bg-yellow-100 text-yellow-800",responded:"bg-green-100 text-green-800"};function rS(){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState("all"),[d,f]=b.useState(null),[m,x]=b.useState(new Set),g=()=>{ye.entities.ContactSubmission.list("-created_date",100).then(n).finally(()=>o(!1))};b.useEffect(()=>{g()},[]);const v=async(N,S)=>{await ye.entities.ContactSubmission.update(N,{status:S}),n(B=>B.map(H=>H.id===N?{...H,status:S}:H))},w=async N=>{await ye.entities.ContactSubmission.delete(N),n(S=>S.filter(B=>B.id!==N)),x(S=>{const B=new Set(S);return B.delete(N),B}),d===N&&f(null)},A=async()=>{await Promise.all([...m].map(N=>ye.entities.ContactSubmission.delete(N))),n(N=>N.filter(S=>!m.has(S.id))),x(new Set)},D=N=>{x(S=>{const B=new Set(S);return B.has(N)?B.delete(N):B.add(N),B})},k=t.filter(N=>!(N.form_type==="prayer_request"&&!N.is_public)),j=l==="all"?k:k.filter(N=>l==="prayer"?N.form_type==="prayer_request":N.form_type==="contact"),_=j.length>0&&m.size===j.length,I=()=>{x(_?new Set:new Set(j.map(N=>N.id)))};return r?i.jsx("div",{className:"text-center py-12 text-[#8B8375] font-body text-sm",children:"Loading…"}):i.jsxs("div",{children:[i.jsxs("div",{className:"flex gap-3 mb-4 flex-wrap",children:[["all","contact","prayer"].map(N=>i.jsx("button",{onClick:()=>{u(N),x(new Set)},className:`font-body text-xs px-4 py-1.5 rounded-full border transition-colors ${l===N?"bg-[#1E2D4A] text-white border-[#1E2D4A]":"bg-white text-[#8B8375] border-[#C4973A]/30 hover:border-[#1E2D4A]"}`,children:N==="all"?"All":N==="contact"?"Contact":"Prayer Requests"},N)),i.jsxs("span",{className:"ml-auto font-body text-xs text-[#8B8375] self-center",children:[j.filter(N=>N.status==="new").length," new"]})]}),j.length>0&&i.jsxs("div",{className:"flex items-center gap-3 mb-4 py-2 px-3 bg-[#F7F3EC] rounded-lg border border-[#C4973A]/20",children:[i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:_,onChange:I,className:"w-4 h-4 accent-[#1E2D4A]"}),i.jsx("span",{className:"font-body text-xs text-[#1E2D4A]",children:m.size>0?`${m.size} selected`:"Select all"})]}),m.size>0&&i.jsxs(Ct,{size:"sm",className:"ml-auto h-7 text-xs bg-red-600 hover:bg-red-700",onClick:A,children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Delete ",m.size]})]}),j.length===0&&i.jsx("p",{className:"text-center py-12 text-[#8B8375] font-body text-sm",children:"No submissions yet."}),i.jsx("div",{className:"space-y-3",children:j.map(N=>{const S=m.has(N.id);return i.jsxs("div",{className:`bg-white rounded-lg border overflow-hidden transition-colors ${S?"border-[#1E2D4A] ring-2 ring-[#1E2D4A]/20":"border-[#C4973A]/15"}`,children:[i.jsxs("div",{className:"flex items-start gap-3 p-4",children:[i.jsx("input",{type:"checkbox",checked:S,onChange:()=>D(N.id),className:"w-4 h-4 accent-[#1E2D4A] mt-1 shrink-0"}),i.jsxs("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>f(d===N.id?null:N.id),children:[i.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[i.jsx("span",{className:"font-body font-medium text-sm text-[#1E2D4A]",children:N.name||"Anonymous"}),i.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded-full font-medium ${hx[N.status]||hx.new}`,children:N.status||"new"}),i.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-[#EDE7DA] text-[#8B8375]",children:N.form_type==="prayer_request"?"Prayer":"Contact"}),N.is_public&&i.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-purple-100 text-purple-700",children:"Public"})]}),i.jsx("p",{className:"font-body text-xs text-[#8B8375] truncate",children:N.message})]}),i.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[i.jsx("span",{className:"font-body text-[10px] text-[#8B8375]",children:new Date(N.created_date).toLocaleDateString("en-US",{month:"short",day:"numeric"})}),i.jsx("button",{onClick:()=>w(N.id),className:"text-[#8B8375] hover:text-red-600 transition-colors p-1",children:i.jsx(Wr,{className:"w-3.5 h-3.5"})})]})]}),d===N.id&&i.jsxs("div",{className:"border-t border-[#C4973A]/10 p-4 bg-[#F7F3EC]/40",children:[i.jsx("p",{className:"font-body text-sm text-[#1F1F1F] mb-4 leading-relaxed",children:N.message}),i.jsxs("div",{className:"flex flex-wrap gap-3 text-xs text-[#8B8375] mb-4",children:[N.email&&i.jsxs("a",{href:`mailto:${N.email}`,className:"flex items-center gap-1 hover:text-[#1E2D4A]",children:[i.jsx(Ht,{className:"w-3 h-3"})," ",N.email]}),N.phone&&i.jsxs("a",{href:`tel:${N.phone}`,className:"flex items-center gap-1 hover:text-[#1E2D4A]",children:[i.jsx(xo,{className:"w-3 h-3"})," ",N.phone]})]}),i.jsxs("div",{className:"flex gap-2 flex-wrap",children:[N.status!=="read"&&i.jsxs(Ct,{size:"sm",variant:"outline",className:"text-xs h-7",onClick:()=>v(N.id,"read"),children:[i.jsx(jb,{className:"w-3 h-3 mr-1"})," Mark Read"]}),N.status!=="responded"&&i.jsxs(Ct,{size:"sm",variant:"outline",className:"text-xs h-7 border-green-300 text-green-700 hover:bg-green-50",onClick:()=>v(N.id,"responded"),children:[i.jsx(Ox,{className:"w-3 h-3 mr-1"})," Mark Responded"]}),N.email&&i.jsx("a",{href:`mailto:${N.email}?subject=Re: Your message to St. Timothy's`,children:i.jsxs(Ct,{size:"sm",className:"text-xs h-7 bg-[#1E2D4A] hover:bg-[#141F33]",children:[i.jsx(Ht,{className:"w-3 h-3 mr-1"})," Reply by Email"]})})]})]})]},N.id)})})]})}const sS=["pending","approved","rejected","expired","trash"],iS={pending:"bg-yellow-100 text-yellow-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",expired:"bg-purple-100 text-purple-700",trash:"bg-gray-100 text-gray-500"},oS=t=>{if(t.expires_at)return new Date(t.expires_at);const n=new Date(t.created_date);return n.setMonth(n.getMonth()+12),n};function aS(){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState("pending"),[d,f]=b.useState(new Set);b.useEffect(()=>{ye.entities.ParishPhoto.list("-created_date",500).then(n).finally(()=>o(!1))},[]);const m=async(S,B)=>{await ye.entities.ParishPhoto.update(S,B),n(H=>H.map(Z=>Z.id===S?{...Z,...B}:Z))},x=async S=>{await m(S,{status:"trash",trashed_at:new Date().toISOString()}),f(B=>{const H=new Set(B);return H.delete(S),H})},g=async S=>{const B=new Date;B.setMonth(B.getMonth()+12),await m(S,{status:"approved",trashed_at:"",expires_at:B.toISOString()})},v=async S=>{const B=new Date;B.setMonth(B.getMonth()+12),await m(S,{status:"approved",expires_at:B.toISOString()})},w=async S=>{await ye.entities.ParishPhoto.delete(S),n(B=>B.filter(H=>H.id!==S)),f(B=>{const H=new Set(B);return H.delete(S),H})},A=async()=>{const S=[...d],B=new Date().toISOString();await Promise.all(S.map(H=>ye.entities.ParishPhoto.update(H,{status:"trash",trashed_at:B}))),n(H=>H.map(Z=>S.includes(Z.id)?{...Z,status:"trash",trashed_at:B}:Z)),f(new Set)},D=async()=>{const S=[...d];await Promise.all(S.map(B=>ye.entities.ParishPhoto.delete(B))),n(B=>B.filter(H=>!S.includes(H.id))),f(new Set)},k=S=>f(B=>{const H=new Set(B);return H.has(S)?H.delete(S):H.add(S),H}),j=t.filter(S=>S.status===l),_=j.length>0&&d.size===j.length,I=()=>f(_?new Set:new Set(j.map(S=>S.id))),N={pending:0,approved:0,rejected:0,expired:0,trash:0};return t.forEach(S=>{N[S.status]!==void 0&&N[S.status]++}),r?i.jsx("div",{className:"text-center py-12 text-[#8B8375] font-body text-sm",children:"Loading…"}):i.jsxs("div",{children:[i.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:sS.map(S=>i.jsxs("button",{onClick:()=>{u(S),f(new Set)},className:`font-body text-xs px-4 py-1.5 rounded-full border transition-colors ${l===S?"bg-[#1E2D4A] text-white border-[#1E2D4A]":"bg-white text-[#8B8375] border-[#C4973A]/30 hover:border-[#1E2D4A]"}`,children:[S.charAt(0).toUpperCase()+S.slice(1),N[S]>0&&i.jsx("span",{className:`ml-1.5 text-white text-[9px] px-1.5 py-0.5 rounded-full ${S==="trash"?"bg-gray-500":"bg-[#C4973A]"}`,children:N[S]})]},S))}),l==="expired"&&i.jsxs("div",{className:"mb-4 p-3 bg-purple-50 border border-purple-200 rounded-lg flex gap-2",children:[i.jsx(Fu,{className:"w-4 h-4 text-purple-600 shrink-0 mt-0.5"}),i.jsx("p",{className:"font-body text-xs text-purple-800",children:"These photos were previously published but have passed their 12-month window. They are permanently deleted after 60 days here. Republish to give a photo a fresh 12 months, or move it to trash."})]}),l==="trash"&&i.jsxs("div",{className:"mb-4 p-3 bg-amber-50 border border-amber-200 rounded-lg flex gap-2",children:[i.jsx(Fu,{className:"w-4 h-4 text-amber-600 shrink-0 mt-0.5"}),i.jsx("p",{className:"font-body text-xs text-amber-800",children:"Photos in trash are permanently deleted 30 days after being moved here. Restore a photo to give it a fresh 12 months."})]}),j.length>0&&i.jsxs("div",{className:"flex items-center gap-3 mb-4 py-2 px-3 bg-[#F7F3EC] rounded-lg border border-[#C4973A]/20",children:[i.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[i.jsx("input",{type:"checkbox",checked:_,onChange:I,className:"w-4 h-4 accent-[#1E2D4A]"}),i.jsx("span",{className:"font-body text-xs text-[#1E2D4A]",children:d.size>0?`${d.size} selected`:"Select all"})]}),d.size>0&&l!=="trash"&&i.jsxs(Ct,{size:"sm",className:"ml-auto h-7 text-xs bg-red-600 hover:bg-red-700",onClick:A,children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Move ",d.size," to Trash"]}),d.size>0&&l==="trash"&&i.jsxs(Ct,{size:"sm",className:"ml-auto h-7 text-xs bg-red-800 hover:bg-red-900",onClick:D,children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Delete ",d.size," Forever"]})]}),j.length===0&&i.jsx("p",{className:"text-center py-12 text-[#8B8375] font-body text-sm italic",children:"No photos in this category."}),i.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:j.map(S=>{const B=d.has(S.id),H=oS(S),Z=Math.ceil((H-new Date)/(1e3*60*60*24)),$=l!=="trash"&&Z<=60;let le=null;if(l==="trash"&&S.trashed_at){const ve=new Date(S.trashed_at);ve.setDate(ve.getDate()+30),le=Math.ceil((ve-new Date)/(1e3*60*60*24))}return i.jsxs("div",{className:`bg-white rounded-lg border overflow-hidden ${B?"border-[#1E2D4A] ring-2 ring-[#1E2D4A]/20":"border-[#C4973A]/15"}`,children:[i.jsxs("div",{className:"aspect-square bg-[#EDE7DA] relative",children:[i.jsx("img",{src:S.photo_url,alt:S.caption||"Parish photo",className:"w-full h-full object-cover"}),i.jsx("span",{className:`absolute top-2 right-2 text-[10px] px-2 py-0.5 rounded-full font-medium ${iS[S.status]}`,children:S.status.charAt(0).toUpperCase()+S.status.slice(1)}),i.jsx("label",{className:"absolute top-2 left-2 cursor-pointer",children:i.jsx("input",{type:"checkbox",checked:B,onChange:()=>k(S.id),className:"w-4 h-4 accent-[#1E2D4A]"})})]}),i.jsxs("div",{className:"p-3",children:[i.jsx("p",{className:"font-body text-xs font-medium text-[#1E2D4A] mb-0.5",children:S.submitter_name}),S.caption&&i.jsx("p",{className:"font-body text-[11px] text-[#8B8375] mb-1 line-clamp-2",children:S.caption}),i.jsx("p",{className:"font-body text-[10px] text-[#8B8375] mb-1",children:new Date(S.created_date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),l!=="trash"&&i.jsxs("p",{className:`font-body text-[10px] mb-3 ${$?"text-amber-600 font-medium":"text-[#8B8375]"}`,children:["Expires: ",H.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),$&&` · ${Z}d left`]}),l==="trash"&&le!==null&&i.jsxs("p",{className:`font-body text-[10px] mb-3 font-medium ${le<=7?"text-red-600":"text-amber-600"}`,children:["Permanent deletion in ",le," day",le!==1?"s":""]}),l==="expired"?i.jsxs("div",{className:"space-y-1",children:[i.jsxs(Ct,{size:"sm",className:"w-full h-7 text-xs bg-[#1E2D4A] hover:bg-[#141F33]",onClick:()=>v(S.id),children:[i.jsx(Jp,{className:"w-3 h-3 mr-1"})," Republish (fresh 12 months)"]}),i.jsxs(Ct,{size:"sm",variant:"outline",className:"w-full h-7 text-xs border-gray-200 text-gray-500 hover:bg-red-50 hover:text-red-600 hover:border-red-200",onClick:()=>x(S.id),children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Move to Trash"]})]}):l==="trash"?i.jsxs("div",{className:"space-y-1",children:[i.jsxs(Ct,{size:"sm",className:"w-full h-7 text-xs bg-[#1E2D4A] hover:bg-[#141F33]",onClick:()=>g(S.id),children:[i.jsx(Jp,{className:"w-3 h-3 mr-1"})," Restore (reset 12 months)"]}),i.jsxs(Ct,{size:"sm",variant:"outline",className:"w-full h-7 text-xs border-red-200 text-red-600 hover:bg-red-50",onClick:()=>w(S.id),children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Delete Forever"]})]}):i.jsxs("div",{className:"space-y-1",children:[S.status!=="approved"&&i.jsxs(Ct,{size:"sm",className:"w-full h-7 text-xs bg-green-600 hover:bg-green-700",onClick:()=>m(S.id,{status:"approved"}),children:[i.jsx(Ox,{className:"w-3 h-3 mr-1"})," Approve"]}),S.status!=="rejected"&&i.jsxs(Ct,{size:"sm",variant:"outline",className:"w-full h-7 text-xs border-orange-200 text-orange-600 hover:bg-orange-50",onClick:()=>m(S.id,{status:"rejected"}),children:[i.jsx(cs,{className:"w-3 h-3 mr-1"})," Reject"]}),i.jsxs(Ct,{size:"sm",variant:"outline",className:"w-full h-7 text-xs border-gray-200 text-gray-500 hover:bg-red-50 hover:text-red-600 hover:border-red-200",onClick:()=>x(S.id),children:[i.jsx(Wr,{className:"w-3 h-3 mr-1"})," Move to Trash"]})]})]})]},S.id)})})]})}function lS(){const[t,n]=b.useState(null),[r,o]=b.useState(!0),[l,u]=b.useState("submissions"),[d,f]=b.useState(!1),[m,x]=b.useState(null);bo();const g=async()=>{f(!0),x(null);try{await ye.functions.invoke("manualRefresh",{}),x("Refreshed successfully")}catch{x("Refresh failed")}finally{f(!1),setTimeout(()=>x(null),3e3)}};return b.useEffect(()=>{ye.auth.me().then(async v=>{if(v){try{const w=await ye.functions.invoke("enforceDomainAndRole",{});if(w.data.status==="deleted"){ye.auth.logout("/login");return}w.data.status==="promoted"&&(v.role="admin")}catch(w){console.error("Domain enforcement failed",w)}v.role==="admin"&&n(v)}o(!1)}).catch(()=>o(!1))},[]),r?i.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--parchment)"},role:"status","aria-label":"Loading",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}):t?i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{style:{backgroundColor:"var(--navy)"},className:"px-6 py-5 flex items-center justify-between",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase",style:{color:"var(--gold)"},children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading text-2xl font-light text-white",children:"Admin Panel"})]}),i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[m&&i.jsx("span",{className:"font-body text-xs text-white/60",children:m}),i.jsxs("button",{onClick:g,disabled:d,className:"font-body text-xs text-white/70 hover:text-white transition-colors flex items-center gap-1.5 disabled:opacity-50",children:[i.jsx(Ux,{className:`w-3.5 h-3.5 ${d?"animate-spin":""}`}),"Refresh Data"]})]}),i.jsx("button",{onClick:()=>ye.auth.logout("/"),className:"font-body text-xs text-white/50 hover:text-white/80 transition-colors",children:"Sign out"})]})]}),i.jsx("div",{style:{backgroundColor:"var(--parchment-dark)"},className:"border-b border-[#C4973A]/20 px-6",children:i.jsx("div",{role:"tablist","aria-label":"Admin sections",className:"flex gap-6",children:[{key:"submissions",label:"Contact & Prayer Requests"},{key:"photos",label:"Photo Submissions"}].map(v=>i.jsx("button",{role:"tab","aria-selected":l===v.key,"aria-controls":`admin-panel-${v.key}`,id:`admin-tab-${v.key}`,onClick:()=>u(v.key),className:`font-body text-sm py-3 border-b-2 transition-colors ${l===v.key?"border-[#C4973A] text-[#1E2D4A] font-medium":"border-transparent text-[#8B8375] hover:text-[#1E2D4A]"}`,children:v.label},v.key))})}),i.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-8",children:[i.jsx("div",{id:"admin-panel-submissions",role:"tabpanel","aria-labelledby":"admin-tab-submissions",hidden:l!=="submissions",children:i.jsx(rS,{})}),i.jsx("div",{id:"admin-panel-photos",role:"tabpanel","aria-labelledby":"admin-tab-photos",hidden:l!=="photos",children:i.jsx(aS,{})})]})]}):i.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"text-center space-y-4",children:[i.jsx("p",{className:"font-heading text-2xl text-[#1E2D4A]",children:"Admin Access Required"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"You must be signed in with an admin account."}),i.jsx("button",{onClick:()=>ye.auth.logout("/login"),className:"font-body text-sm px-6 py-2 rounded bg-[#1E2D4A] text-white hover:bg-[#141F33] transition-colors",children:"Sign in with a different account"})]})})}const md=b.forwardRef(({className:t,type:n,...r},o)=>i.jsx("input",{type:n,className:hn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:o,...r}));md.displayName="Input";var cS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uS=cS.reduce((t,n)=>{const r=By(`Primitive.${n}`),o=b.forwardRef((l,u)=>{const{asChild:d,...f}=l,m=d?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(m,{...f,ref:u})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{}),dS="Label",Uy=b.forwardRef((t,n)=>i.jsx(uS.label,{...t,ref:n,onMouseDown:r=>{var l;r.target.closest("button, input, select, textarea")||((l=t.onMouseDown)==null||l.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Uy.displayName=dS;var zy=Uy;const hS=vd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),to=b.forwardRef(({className:t,...n},r)=>i.jsx(zy,{ref:r,className:hn(hS(),t),...n}));to.displayName=zy.displayName;const $y=b.forwardRef(({className:t,...n},r)=>i.jsx("textarea",{className:hn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));$y.displayName="Textarea";function fS(){const[t,n]=b.useState({submitter_name:"",submitter_email:"",caption:""}),[r,o]=b.useState(null),[l,u]=b.useState(null),[d,f]=b.useState(!1),[m,x]=b.useState(!1),g=w=>{const A=w.target.files[0];A&&(o(A),u(URL.createObjectURL(A)))},v=async w=>{if(w.preventDefault(),!r)return;f(!0);const{file_url:A}=await ye.integrations.Core.UploadFile({file:r});await ye.functions.invoke("submitParishPhoto",{photo_url:A,...t}),x(!0),f(!1)};return m?i.jsx("div",{className:"min-h-screen flex items-center justify-center px-4",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"text-center max-w-sm",children:[i.jsx(Zs,{className:"w-12 h-12 mx-auto mb-4",style:{color:"var(--gold)"}}),i.jsx("h2",{className:"font-heading text-2xl text-[#1E2D4A] mb-2",children:"Thank you!"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"Your photo has been submitted and will appear on our site after review."}),i.jsx("button",{onClick:()=>{x(!1),n({submitter_name:"",submitter_email:"",caption:""}),o(null),u(null)},className:"mt-6 font-body text-xs text-[#C4973A] hover:underline",children:"Submit another photo"})]})}):i.jsx("div",{className:"min-h-screen py-16 px-4",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"max-w-lg mx-auto",children:[i.jsxs("div",{className:"text-center mb-10",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.35em] uppercase mb-2",style:{color:"var(--gold)"},children:"Community"}),i.jsx("h1",{className:"font-heading text-4xl font-light text-[#1E2D4A]",children:"Share a Photo"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375] mt-2",children:"Submit a photo from parish life to be featured on our website."})]}),i.jsxs("form",{onSubmit:v,className:"space-y-5 bg-white rounded-xl p-8 border border-[#C4973A]/15",children:[i.jsxs("div",{children:[i.jsx(to,{htmlFor:"photo-upload",className:"font-body text-xs font-medium text-[#1E2D4A] mb-2 block",children:"Photo *"}),i.jsxs("label",{htmlFor:"photo-upload",className:`flex flex-col items-center justify-center w-full h-48 border-2 border-dashed rounded-lg cursor-pointer transition-colors ${l?"border-[#C4973A]/40":"border-[#C4973A]/20 hover:border-[#C4973A]/40"}`,children:[l?i.jsx("img",{src:l,alt:"Selected photo preview",className:"w-full h-full object-cover rounded-lg"}):i.jsxs("div",{className:"text-center p-4",children:[i.jsx(Tb,{className:"w-8 h-8 mx-auto mb-2 text-[#C4973A]/50","aria-hidden":"true"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"Click to upload a photo"}),i.jsx("p",{className:"font-body text-[10px] text-[#8B8375]/60 mt-1",children:"JPG, PNG up to 10MB"})]}),i.jsx("input",{id:"photo-upload",type:"file",accept:"image/*",capture:"environment",onChange:g,className:"hidden",required:!0,"aria-required":"true"})]})]}),i.jsxs("div",{children:[i.jsx(to,{htmlFor:"name",className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Your Name *"}),i.jsx(md,{id:"name",className:"mt-1 h-10 font-body text-sm",value:t.submitter_name,onChange:w=>n(A=>({...A,submitter_name:w.target.value})),required:!0})]}),i.jsxs("div",{children:[i.jsx(to,{htmlFor:"email",className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Email"}),i.jsx(md,{id:"email",type:"email",className:"mt-1 h-10 font-body text-sm",value:t.submitter_email,onChange:w=>n(A=>({...A,submitter_email:w.target.value}))})]}),i.jsxs("div",{children:[i.jsx(to,{htmlFor:"caption",className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Caption"}),i.jsx($y,{id:"caption",className:"mt-1 font-body text-sm resize-none",rows:3,placeholder:"Describe the occasion or moment…",value:t.caption,onChange:w=>n(A=>({...A,caption:w.target.value}))})]}),i.jsx(Ct,{type:"submit",disabled:d||!r,className:"w-full h-11 font-body text-sm",style:{backgroundColor:"var(--navy)"},children:d?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin mr-2",role:"status","aria-label":"Uploading photo"})," Uploading…"]}):i.jsxs(i.Fragment,{children:[i.jsx($x,{className:"w-4 h-4 mr-2"})," Submit Photo"]})})]})]})})}function pS({icon:t,title:n,subtitle:r,footer:o,children:l}){return i.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:i.jsxs("div",{className:"w-full max-w-md",children:[i.jsxs("div",{className:"text-center mb-10",children:[i.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-primary mb-4",children:i.jsx(t,{className:"w-7 h-7 text-primary-foreground","aria-hidden":"true"})}),i.jsx("h1",{className:"text-3xl font-bold tracking-tight text-foreground",children:n}),r&&i.jsx("p",{className:"text-muted-foreground mt-2",children:r})]}),i.jsx("div",{className:"bg-card rounded-2xl shadow-sm border border-border p-8",children:l}),o&&i.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:o})]})})}function mS(){const t=async()=>{try{await ye.auth.logout()}catch{}ye.auth.loginWithProvider("microsoft","/parish-admin-sttimothy")};return i.jsx(pS,{icon:Lb,title:"Welcome back",subtitle:"Sign in with your St. Timothy's Microsoft account",children:i.jsxs(Ct,{className:"w-full h-12 text-sm font-medium",onClick:t,children:[i.jsxs("svg",{className:"w-5 h-5 mr-2",viewBox:"0 0 21 21",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{x:"1",y:"1",width:"9",height:"9",fill:"#f25022"}),i.jsx("rect",{x:"11",y:"1",width:"9",height:"9",fill:"#7fba00"}),i.jsx("rect",{x:"1",y:"11",width:"9",height:"9",fill:"#00a4ef"}),i.jsx("rect",{x:"11",y:"11",width:"9",height:"9",fill:"#ffb900"})]}),"Continue with Microsoft"]})})}const tl=[{label:"Home",path:"/app",icon:Ab},{label:"Parish Calendar",path:"/app/calendar",icon:kr},{label:"Daily Office",path:"/app/daily-office",icon:bd},{label:"Newsletter",path:"/app/newsletter",icon:nl},{label:"Ministry Schedule",path:"/app/ministry",icon:dl},{label:"Connect",path:"/app/connect",icon:Ht},{label:"Give",path:"/app/give",icon:Cr},{label:"About",path:"/app/about",icon:Pb},{label:"Parish Gallery",path:"/app/gallery",icon:Fx},{label:"Share a Photo",path:"/app/photo",icon:Px}],xS=tl.map(t=>t.path);function gS(){const[t,n]=b.useState(!1),[r,o]=b.useState(window.innerWidth>=768),l=Er(),u=bo();b.useState(()=>{const m=()=>o(window.innerWidth>=768);return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]);const d=xS.includes(l.pathname);l.pathname,tl.find(m=>m.path===l.pathname);const f=()=>{l.pathname.startsWith("/app/")&&!d&&["/app/sunday","/app/beliefs","/app/leadership","/app/sacraments"].includes(l.pathname)?u("/app/about"):u("/app")};return r?i.jsxs("div",{className:"min-h-screen flex",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("aside",{className:"fixed left-0 top-0 bottom-0 w-72 flex flex-col z-40 overflow-y-auto",style:{backgroundColor:"var(--navy-deep)"},children:[i.jsx("div",{className:"px-5 py-6 border-b border-white/10",children:i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-white text-xl font-300",children:"St. Timothy's"}),i.jsx("p",{className:"font-body text-[#C4973A] text-[10px] tracking-[0.25em] uppercase mt-0.5",children:"Episcopal Church"})]})}),i.jsx("nav",{"aria-label":"Main navigation",className:"flex-1 py-4 overflow-y-auto",children:tl.map(({label:m,path:x,icon:g})=>{const v=l.pathname===x;return i.jsxs(Ve,{to:x,"aria-current":v?"page":void 0,className:`flex items-center gap-4 px-6 py-3.5 transition-colors ${v?"text-[#C4973A] bg-white/5 border-r-2 border-[#C4973A]":"text-white/65 hover:text-white hover:bg-white/5"}`,children:[i.jsx(g,{strokeWidth:v?2:1.5,style:{width:"1.125rem",height:"1.125rem",flexShrink:0}}),i.jsx("span",{className:"font-body text-sm tracking-[0.05em]",children:m})]},x)})}),i.jsxs("div",{className:"px-6 py-5 border-t border-white/10",children:[i.jsx("p",{className:"font-body text-[10px] text-white/30 tracking-wide",children:"Southaven, Mississippi"}),i.jsx("p",{className:"font-body text-[10px] text-white/30 mt-0.5",children:"Open to all"})]})]}),i.jsx("main",{className:"flex-1 ml-72",children:i.jsx(ed,{})})]}):i.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("header",{className:"fixed top-0 left-0 right-0 z-50 h-14 flex items-center px-4 gap-3",style:{backgroundColor:"var(--navy)"},children:[d?i.jsx("div",{className:"w-9 shrink-0"}):i.jsx("button",{onClick:f,className:"w-9 h-9 flex items-center justify-center rounded-full text-white/70 hover:text-white active:bg-white/10 transition-colors shrink-0","aria-label":"Go back",children:i.jsx(mo,{className:"w-5 h-5"})}),i.jsxs("div",{className:"flex-1 flex items-center gap-2 min-w-0",children:[i.jsx("img",{src:"https://media.base44.com/images/public/6a2e0d7bafe9f340cc321b12/b414945ec_TEC_Shield.png",alt:"Episcopal Shield",className:"w-6 h-auto opacity-80 shrink-0"}),i.jsx("span",{className:"font-heading text-white text-lg font-300 truncate",children:"St. Timothy's"})]}),i.jsx("button",{onClick:()=>n(!0),className:"w-9 h-9 flex items-center justify-center rounded-full text-white/70 hover:text-white active:bg-white/10 transition-colors shrink-0","aria-label":"Open menu",children:i.jsx(Bx,{className:"w-5 h-5"})})]}),t&&i.jsx("div",{className:"fixed inset-0 z-50 bg-black/40",onClick:()=>n(!1)}),i.jsxs("div",{className:`fixed top-0 right-0 bottom-0 z-50 w-72 flex flex-col transition-transform duration-300 ease-in-out ${t?"translate-x-0":"translate-x-full"}`,style:{backgroundColor:"var(--navy-deep)"},children:[i.jsxs("div",{className:"flex items-center justify-between px-5 py-5 border-b border-white/10",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-white text-xl font-300",children:"St. Timothy's"}),i.jsx("p",{className:"font-body text-[#C4973A] text-[10px] tracking-[0.25em] uppercase mt-0.5",children:"Episcopal Church"})]}),i.jsx("button",{onClick:()=>n(!1),"aria-label":"Close menu",className:"text-white/50 hover:text-white transition-colors",children:i.jsx(cs,{className:"w-5 h-5","aria-hidden":"true"})})]}),i.jsx("nav",{"aria-label":"Main navigation",className:"flex-1 py-4 overflow-y-auto",children:tl.map(({label:m,path:x,icon:g})=>{const v=l.pathname===x;return i.jsxs(Ve,{to:x,onClick:()=>n(!1),"aria-current":v?"page":void 0,className:`flex items-center gap-4 px-6 py-3.5 transition-colors ${v?"text-[#C4973A] bg-white/5":"text-white/65 hover:text-white hover:bg-white/5"}`,children:[i.jsx(g,{strokeWidth:v?2:1.5,style:{width:"1.125rem",height:"1.125rem",flexShrink:0}}),i.jsx("span",{className:"font-body text-sm tracking-[0.05em]",children:m}),v&&i.jsx("div",{className:"ml-auto w-1 h-1 rounded-full bg-[#C4973A]"})]},x)})}),i.jsxs("div",{className:"px-6 py-5 border-t border-white/10",children:[i.jsx("p",{className:"font-body text-[10px] text-white/30 tracking-wide",children:"Southaven, Mississippi"}),i.jsx("p",{className:"font-body text-[10px] text-white/30 mt-0.5",children:"Open to all"})]})]}),i.jsx("div",{className:"flex-1 pt-14",children:i.jsx(ed,{})})]})}const yS=[{label:"Parish Calendar",path:"/app/calendar",icon:kr,color:"bg-[#1E2D4A]"},{label:"Daily Office",path:"/app/daily-office",icon:bd,color:"bg-[#7A1B1B]"},{label:"Newsletter",path:"/app/newsletter",icon:nl,color:"bg-[#2D4A1E]"},{label:"Ministry Schedule",path:"/app/ministry",icon:dl,color:"bg-[#4A2D1E]"},{label:"Connect",path:"/app/connect",icon:Ht,color:"bg-[#1E3A4A]"},{label:"Give",path:"/app/give",icon:Cr,color:"bg-[#C4973A]"}];function vS(t){const n=Be(t);return So(n)?"Today":qd(n)?"Tomorrow":je(n,"EEE, MMM d")}function bS(){const[t,n]=b.useState([]);return b.useEffect(()=>{const r=new Date,o=`${r.getFullYear()}-${String(r.getMonth()+1).padStart(2,"0")}-${String(r.getDate()).padStart(2,"0")}`,l=new Date(r.getFullYear(),r.getMonth(),r.getDate()+7),u=`${l.getFullYear()}-${String(l.getMonth()+1).padStart(2,"0")}-${String(l.getDate()).padStart(2,"0")}`;ye.entities.CalendarEvent.list("start_datetime",200).then(d=>{const f=d.filter(m=>{const x=m.start_datetime.slice(0,10);return x>=o&&x<=u}).sort((m,x)=>m.start_datetime.localeCompare(x.start_datetime)).slice(0,4);n(f)})},[]),i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"relative px-5 pt-6 pb-10 overflow-hidden",style:{backgroundColor:"var(--navy)"},children:[i.jsx("div",{className:"absolute right-4 top-4 opacity-[0.06]",children:i.jsx("svg",{viewBox:"0 0 80 80",className:"w-32 h-32 fill-white",children:i.jsx("path",{d:"M35 0h10v35h35v10H45v35H35V45H0V35h35z"})})}),i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-1",children:"Welcome"}),i.jsx("h1",{className:"font-heading font-300 text-white leading-tight text-3xl",children:"Good to see you."}),i.jsx("p",{className:"font-heading italic text-white/60 text-base mt-1",children:"Southaven, Mississippi"}),i.jsxs("div",{className:"mt-5 inline-flex items-center gap-2 bg-white/10 rounded-full px-4 py-2",children:[i.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-xs text-white/80",children:"Sunday 9:30 AM · Holy Eucharist: Rite II"})]})]}),i.jsx("div",{className:"px-4 -mt-5 max-w-5xl mx-auto w-full",children:i.jsx("div",{className:"bg-white rounded-2xl shadow-sm border border-[#C4973A]/10 p-4",children:i.jsx("div",{className:"grid grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-3",children:yS.map(({label:r,path:o,icon:l,color:u})=>i.jsxs(Ve,{to:o,className:"flex flex-col items-center gap-2 py-3 rounded-xl active:scale-95 transition-transform",children:[i.jsx("div",{className:`${u} w-12 h-12 rounded-xl flex items-center justify-center shadow-sm`,children:i.jsx(l,{className:"w-5 h-5 text-white",strokeWidth:1.5})}),i.jsx("span",{className:"font-body text-[10px] text-center text-[#1E2D4A] leading-tight tracking-wide",children:r})]},o))})})}),i.jsx("div",{className:"px-4 mt-4 max-w-5xl mx-auto w-full",children:i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer","aria-label":"Watch Sunday service live on Facebook",className:"flex items-center justify-between bg-[#1E2D4A] rounded-2xl px-5 py-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-0.5",children:"Live Stream"}),i.jsx("p",{className:"font-heading text-white text-lg font-300",children:"Watch Sunday Service"})]}),i.jsx(br,{className:"w-5 h-5 text-white/40","aria-hidden":"true"})]})}),t.length>0&&i.jsx("div",{className:"px-4 mt-4 mb-2 max-w-5xl mx-auto w-full",children:i.jsxs("div",{className:"bg-white rounded-2xl border border-[#C4973A]/10 overflow-hidden",children:[i.jsxs("div",{className:"px-4 py-3 border-b border-[#C4973A]/10 flex items-center justify-between",children:[i.jsx("p",{className:"font-body text-[10px] tracking-[0.3em] uppercase text-[#C4973A] font-medium",children:"This Week"}),i.jsxs(Ve,{to:"/app/calendar",className:"font-body text-[10px] text-[#1E2D4A]/50 flex items-center gap-0.5",children:["See all ",i.jsx(ns,{className:"w-3 h-3"})]})]}),i.jsx("div",{className:"divide-y divide-[#C4973A]/8",children:t.map(r=>i.jsxs("div",{className:"px-4 py-3 flex items-center gap-3",children:[i.jsxs("div",{className:"w-10 text-center shrink-0",children:[i.jsx("p",{className:"font-heading text-[#C4973A] text-lg leading-none",children:je(Be(r.start_datetime.slice(0,10)),"d")}),i.jsx("p",{className:"font-body text-[9px] uppercase text-[#1E2D4A]/40 tracking-wide",children:je(Be(r.start_datetime.slice(0,10)),"MMM")})]}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-heading text-[#1E2D4A] text-base font-500 truncate",children:r.title}),i.jsxs("p",{className:"font-body text-xs text-[#1E2D4A]/50",children:[vS(r.start_datetime.slice(0,10)),!r.is_all_day&&` · ${je(Be(r.start_datetime),"h:mm a")}`]})]})]},r.id))})]})}),i.jsx("div",{className:"px-4 mt-4 mb-6 max-w-5xl mx-auto w-full",children:i.jsxs("div",{className:"rounded-2xl bg-[#EDE7DA] px-5 py-5",children:[i.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[i.jsx("div",{className:"w-4 h-px bg-[#C4973A]"}),i.jsx("span",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A]",children:"Our Vision"})]}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A] text-lg leading-snug",children:'"Open to all, sharing in the grace we have received."'}),i.jsxs(Ve,{to:"/app/about",className:"mt-3 inline-flex items-center gap-1 font-body text-xs text-[#1E2D4A]/60 border-b border-[#C4973A]/40 pb-px",children:["About St. Timothy's ",i.jsx(ns,{className:"w-3 h-3"})]})]})})]})}function wS(t){const n=Be(t);return So(n)?"Today":qd(n)?"Tomorrow":je(n,"EEEE, MMMM d")}function jS(t){const n={};for(const r of t){const o=r.start_datetime.slice(0,10);n[o]||(n[o]=[]),n[o].push(r)}return Object.entries(n).sort(([r],[o])=>r.localeCompare(o))}function fx({events:t}){const n=jS(t);return t.length===0?i.jsxs("div",{className:"text-center py-16",children:[i.jsx(kr,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-3"}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/50",children:"No upcoming events."})]}):i.jsx("div",{className:"space-y-5",children:n.map(([r,o])=>i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[i.jsx("p",{className:"font-heading text-sm text-[#1E2D4A] font-500",children:wS(r)}),i.jsx("div",{className:"flex-1 h-px bg-[#C4973A]/20"})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:o.map(l=>i.jsxs("div",{className:"bg-white rounded-xl px-4 py-3 border border-[#C4973A]/10",children:[i.jsx("h3",{className:"font-heading text-[#1E2D4A] text-base font-500",children:l.title}),i.jsxs("div",{className:"flex flex-wrap gap-x-3 mt-1",children:[!l.is_all_day&&i.jsxs("span",{className:"font-body text-xs text-[#C4973A]",children:[je(Be(l.start_datetime),"h:mm a"),l.end_datetime&&` – ${je(Be(l.end_datetime),"h:mm a")}`]}),l.is_all_day&&i.jsx("span",{className:"font-body text-xs text-[#C4973A]",children:"All day"}),l.location&&i.jsxs("span",{className:"flex items-center gap-1 font-body text-xs text-[#1E2D4A]/50",children:[i.jsx(kn,{className:"w-3 h-3"}),l.location]})]}),l.description&&i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/60 mt-1.5 leading-relaxed line-clamp-2",children:l.description})]},l.id))})]},r))})}function NS({events:t}){const[n,r]=b.useState(new Date),[o,l]=b.useState(null),u=wy(n),d=by(n),f=as(u),m=jy(d),x=[];let g=f;for(;g<=m;){const D=[];for(let k=0;k<7;k++)D.push(g),g=$d(g,1);x.push(D)}const v={};for(const D of t){const k=D.start_datetime.slice(0,10);v[k]||(v[k]=[]),v[k].push(D)}const w=o?je(o,"yyyy-MM-dd"):null,A=w?v[w]||[]:[];return i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between mb-5",children:[i.jsx("button",{onClick:()=>r(D=>pd(D)),className:"p-2 rounded-lg hover:bg-[#C4973A]/10 text-[#1E2D4A]",children:i.jsx(mo,{className:"w-5 h-5"})}),i.jsx("h2",{className:"font-heading text-2xl text-[#1E2D4A]",children:je(n,"MMMM yyyy")}),i.jsx("button",{onClick:()=>r(D=>al(D,1)),className:"p-2 rounded-lg hover:bg-[#C4973A]/10 text-[#1E2D4A]",children:i.jsx(ns,{className:"w-5 h-5"})})]}),i.jsx("div",{className:"grid grid-cols-7 border-b border-[#C4973A]/15",children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(D=>i.jsx("div",{className:"text-center font-body text-xs tracking-widest uppercase text-[#8B8375] py-2",children:D},D))}),i.jsx("div",{className:"border border-t-0 border-[#C4973A]/15 rounded-b-xl overflow-hidden",children:x.map((D,k)=>i.jsx("div",{className:"grid grid-cols-7",style:{minHeight:"5.5rem"},children:D.map((j,_)=>{const I=je(j,"yyyy-MM-dd"),N=ky(j,n),S=!!v[I],B=o&&Wd(j,o),H=So(j);return i.jsxs("div",{onClick:()=>N&&S&&l(B?null:j),className:["p-2 border-b border-r border-[#C4973A]/10",_===6?"border-r-0":"",k===x.length-1?"border-b-0":"",N?B?"bg-[#1E2D4A]":"bg-white":"bg-[#F7F3EC]/60",N&&S?"cursor-pointer":""].join(" "),children:[i.jsx("div",{className:"flex justify-center mb-1",children:i.jsx("span",{className:["font-body text-sm w-7 h-7 flex items-center justify-center rounded-full",N?B?"text-white font-600":H?"bg-[#C4973A] text-white font-600":"text-[#1E2D4A]":"text-[#1E2D4A]/25"].join(" "),children:je(j,"d")})}),N&&S&&i.jsxs("div",{className:"space-y-0.5",children:[v[I].slice(0,3).map((Z,$)=>i.jsx("div",{className:["text-[10px] font-body truncate px-1.5 py-0.5 rounded",B?"bg-white/20 text-white":"bg-[#1E2D4A]/8 text-[#1E2D4A]"].join(" "),style:B?{}:{backgroundColor:"rgba(30,45,74,0.07)"},children:Z.is_all_day?Z.title:`${je(Be(Z.start_datetime),"h:mma")} ${Z.title}`},$)),v[I].length>3&&i.jsxs("div",{className:`text-[9px] font-body px-1.5 ${B?"text-white/60":"text-[#8B8375]"}`,children:["+",v[I].length-3," more"]})]})]},_)})},k))}),o&&A.length>0&&i.jsxs("div",{className:"mt-6 border-t border-[#C4973A]/20 pt-5",children:[i.jsx("p",{className:"font-heading text-lg text-[#1E2D4A] mb-3",children:je(o,"EEEE, MMMM d")}),i.jsx("div",{className:"space-y-2",children:A.map(D=>i.jsxs("div",{className:"bg-white rounded-xl px-5 py-3.5 border border-[#C4973A]/10",children:[i.jsx("h3",{className:"font-heading text-[#1E2D4A] text-base",children:D.title}),i.jsxs("div",{className:"flex flex-wrap gap-x-4 mt-1",children:[!D.is_all_day&&i.jsxs("span",{className:"font-body text-xs text-[#C4973A]",children:[je(Be(D.start_datetime),"h:mm a"),D.end_datetime&&` – ${je(Be(D.end_datetime),"h:mm a")}`]}),D.is_all_day&&i.jsx("span",{className:"font-body text-xs text-[#C4973A]",children:"All day"}),D.location&&i.jsxs("span",{className:"flex items-center gap-1 font-body text-xs text-[#1E2D4A]/50",children:[i.jsx(kn,{className:"w-3 h-3"}),D.location]})]}),D.description&&i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/60 mt-2 leading-relaxed",children:D.description})]},D.id))})]})]})}function CS(){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState("calendar");return b.useEffect(()=>{ye.entities.CalendarEvent.list("start_datetime",200).then(d=>{const f=[...d].sort((m,x)=>m.start_datetime.localeCompare(x.start_datetime));n(f)}).finally(()=>o(!1))},[]),i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5 flex items-end justify-between",style:{backgroundColor:"var(--navy)"},children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Parish Calendar"})]}),i.jsxs("div",{className:"hidden md:flex items-center gap-1 bg-white/10 rounded-lg p-1",children:[i.jsx("button",{onClick:()=>u("calendar"),className:`p-1.5 rounded-md transition-colors ${l==="calendar"?"bg-white text-[#1E2D4A]":"text-white/70"}`,title:"Calendar view",children:i.jsx(kr,{className:"w-4 h-4"})}),i.jsx("button",{onClick:()=>u("agenda"),className:`p-1.5 rounded-md transition-colors ${l==="agenda"?"bg-white text-[#1E2D4A]":"text-white/70"}`,title:"Agenda view",children:i.jsx(Ix,{className:"w-4 h-4"})})]})]}),i.jsxs("div",{className:"px-4 md:px-8 py-5 max-w-6xl mx-auto",children:[r&&i.jsx("div",{className:"flex justify-center py-16",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin"})}),!r&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"md:hidden",children:i.jsx(fx,{events:t})}),i.jsx("div",{className:"hidden md:block",children:l==="calendar"?i.jsx(NS,{events:t}):i.jsx(fx,{events:t})})]})]})]})}function kS(){const[t,n]=b.useState(null),[r,o]=b.useState(null),[l,u]=b.useState(!0),[d,f]=b.useState(null);b.useEffect(()=>{ye.functions.invoke("getDailyOffice",{}).then(g=>{n(g.data.meta),o(g.data.stream)}).catch(g=>f(g.message)).finally(()=>u(!1))},[]);const m=(t==null?void 0:t.session)==="morning"?"Morning Prayer":"Evening Prayer",x=(t==null?void 0:t.session)==="morning"?"☀":"☽";return i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"text-center pt-6 pb-6 px-5 border-b",style:{borderColor:"var(--gold)",backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase mb-2 text-[#C4973A]",children:"Daily Office"}),i.jsxs("div",{className:"flex items-center justify-center gap-2 mb-1",children:[i.jsx("span",{className:"text-lg text-[#C4973A]",children:x}),i.jsx("h1",{className:"font-heading text-2xl font-300 text-white",children:m}),i.jsx("span",{className:"text-lg text-[#C4973A]",children:x})]}),i.jsx("p",{className:"font-heading italic text-white/60 text-sm mt-1",children:(t==null?void 0:t.date_label)||"Daily Office"}),i.jsxs("div",{className:"flex items-center justify-center gap-3 mt-4",children:[i.jsx("div",{className:"h-px w-12 bg-[#C4973A]/40"}),i.jsx("span",{className:"font-body text-[8px] tracking-[0.4em] uppercase text-[#C4973A]/70",children:"The Book of Common Prayer"}),i.jsx("div",{className:"h-px w-12 bg-[#C4973A]/40"})]})]}),l&&i.jsx("div",{className:"flex justify-center py-20",role:"status","aria-label":"Loading Daily Office",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}),d&&i.jsxs("div",{className:"text-center py-20 px-6",children:[i.jsx(bd,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-3"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"Could not load today's office."})]}),r&&i.jsx(Fy,{stream:r})]})}function SS(){const[t,n]=b.useState("contact"),[r,o]=b.useState({name:"",email:"",message:""}),[l,u]=b.useState(!1),[d,f]=b.useState(!1),[m,x]=b.useState(!1),g=async v=>{v.preventDefault(),x(!0),await ye.entities.ContactSubmission.create({form_type:t,name:r.name,email:r.email,message:r.message,is_public:t==="prayer_request"?l:!1}),await ye.functions.invoke("sendContactEmail",{form_type:t,...r}),f(!0),x(!1)};return d?i.jsx("div",{className:"min-h-screen flex items-center justify-center px-6",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"text-center",children:[i.jsx(Zs,{className:"w-12 h-12 mx-auto mb-4 text-[#C4973A]"}),i.jsx("h2",{className:"font-heading text-2xl text-[#1E2D4A] mb-2",children:"Thank you"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"We'll be in touch soon."}),i.jsx("button",{onClick:()=>{f(!1),o({name:"",email:"",message:""}),u(!1)},className:"mt-6 font-body text-xs text-[#C4973A]",children:"Send another message"})]})}):i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Connect With Us"})]}),i.jsxs("div",{className:"px-4 py-4 space-y-3 max-w-5xl mx-auto w-full",children:[i.jsxs("div",{className:"bg-white rounded-xl px-4 py-3 border border-[#C4973A]/10 flex items-start gap-3",children:[i.jsx(kn,{className:"w-4 h-4 text-[#C4973A] mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Address"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"8245 Getwell Road, Southaven, MS 38672"})]})]}),i.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[i.jsxs("a",{href:"tel:+16623933100",className:"bg-white rounded-xl px-4 py-3 border border-[#C4973A]/10 flex items-center gap-2",children:[i.jsx(xo,{className:"w-4 h-4 text-[#C4973A] shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Phone"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"(662) 393-3100"})]})]}),i.jsxs("a",{href:"mailto:info@sttimothysms.org?subject=St.%20Timothy's%20Inquiry",className:"bg-white rounded-xl px-4 py-3 border border-[#C4973A]/10 flex items-center gap-2",children:[i.jsx(Ht,{className:"w-4 h-4 text-[#C4973A] shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Email"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375] break-all",children:"info@sttimothysms.org"})]})]})]}),i.jsxs("div",{className:"bg-white rounded-xl px-4 py-3 border border-[#C4973A]/10 flex items-start gap-3",children:[i.jsx(ls,{className:"w-4 h-4 text-[#C4973A] mt-0.5 shrink-0"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-xs font-medium text-[#1E2D4A]",children:"Office Hours"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"Tues – Thur · 9:00 AM – 2:00 PM"})]})]}),i.jsxs("div",{className:"bg-white rounded-2xl border border-[#C4973A]/10 overflow-hidden",children:[i.jsx("div",{role:"tablist","aria-label":"Message type",className:"flex border-b border-[#C4973A]/10",children:["contact","prayer_request"].map(v=>i.jsx("button",{role:"tab","aria-selected":t===v,onClick:()=>n(v),className:`flex-1 py-3 font-body text-xs tracking-wide transition-colors ${t===v?"text-[#1E2D4A] border-b-2 border-[#C4973A] font-medium":"text-[#8B8375]"}`,children:v==="contact"?"Contact Us":"Prayer Request"},v))}),i.jsxs("form",{onSubmit:g,className:"p-4 space-y-3",children:[i.jsxs("div",{children:[i.jsx("label",{htmlFor:"connect-name",className:"sr-only",children:"Your name"}),i.jsx("input",{id:"connect-name",className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-[#F7F3EC] placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50",placeholder:"Your name",value:r.name,onChange:v=>o(w=>({...w,name:v.target.value})),required:!0,"aria-required":"true"})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"connect-email",className:"sr-only",children:"Email address"}),i.jsx("input",{id:"connect-email",type:"email",className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-[#F7F3EC] placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50",placeholder:"Email address",value:r.email,onChange:v=>o(w=>({...w,email:v.target.value}))})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"connect-message",className:"sr-only",children:t==="contact"?"Your message":"Prayer request"}),i.jsx("textarea",{id:"connect-message",rows:4,className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-[#F7F3EC] placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50 resize-none",placeholder:t==="contact"?"How can we help?":"Share your prayer request…",value:r.message,onChange:v=>o(w=>({...w,message:v.target.value})),required:!0,"aria-required":"true"})]}),t==="prayer_request"&&i.jsxs("button",{type:"button",onClick:()=>u(v=>!v),className:`w-full flex items-center justify-between px-3 py-2.5 rounded-xl border transition-colors font-body text-sm ${l?"border-[#C4973A]/50 bg-[#C4973A]/8 text-[#1E2D4A]":"border-[#C4973A]/20 bg-[#F7F3EC] text-[#8B8375]"}`,style:l?{backgroundColor:"rgba(196,151,58,0.08)"}:{},children:[i.jsx("span",{children:l?"Shared with the parish":"Keep this request private"}),i.jsx("span",{className:`w-8 h-4 rounded-full relative transition-colors ${l?"bg-[#C4973A]":"bg-[#1E2D4A]/20"}`,children:i.jsx("span",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white shadow transition-all ${l?"left-4":"left-0.5"}`})})]}),i.jsx("button",{type:"submit",disabled:m,className:"w-full bg-[#1E2D4A] text-white font-body text-sm tracking-[0.15em] uppercase py-3 rounded-xl disabled:opacity-50 active:bg-[#141F33] transition-colors",children:m?"Sending…":"Send"})]})]})]})]})}function ES(){const t=bo();return i.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#C4973A]/20",style:{backgroundColor:"var(--navy)"},children:[i.jsx("button",{onClick:()=>t("/app"),"aria-label":"Back to home",className:"text-white/70 hover:text-white transition-colors",children:i.jsx(mo,{className:"w-5 h-5","aria-hidden":"true"})}),i.jsx("div",{className:"flex-1",children:i.jsx("p",{className:"font-heading text-white text-base",children:"Stewardship & Giving"})})]}),i.jsxs("div",{className:"flex-1 px-4 py-5 space-y-4 overflow-y-auto max-w-5xl mx-auto w-full",children:[i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/15 p-5 text-center",children:[i.jsx("div",{className:"w-10 h-10 bg-[#C4973A]/10 rounded-full flex items-center justify-center mx-auto mb-2",children:i.jsx(Cr,{className:"w-4 h-4 text-[#C4973A]"})}),i.jsx("h2",{className:"font-heading text-[#1E2D4A] text-lg mb-2",children:"Give Online"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375] leading-relaxed mb-4",children:"Your generosity supports our worship, community outreach, and pastoral care for all."}),i.jsx("a",{href:"https://secure.myvanco.com/L-ZB1Q/home",target:"_blank",rel:"noopener noreferrer","aria-label":"Give online via Vanco",className:"w-full block text-center bg-[#C4973A] text-white font-body text-xs tracking-[0.15em] uppercase px-6 py-3 rounded-lg",children:"Give Now"})]}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/15 p-5 space-y-3",children:[i.jsx("h3",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium",children:"Other Ways to Give"}),[{title:"In Person",desc:"Offering plates are passed during Sunday services."},{title:"By Mail",desc:"Make checks payable to St. Timothy's Episcopal Church and mail to 8245 Getwell Road, Southaven, MS 38672"},{title:"Planned Giving",desc:"Consider a legacy gift — contact the parish office for details."}].map(({title:r,desc:o})=>i.jsxs("div",{className:"flex gap-3",children:[i.jsx("div",{className:"w-1 rounded-full bg-[#C4973A]/40 shrink-0 mt-1"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body text-sm font-medium text-[#1E2D4A]",children:r}),i.jsx("p",{className:"font-body text-xs text-[#8B8375] leading-relaxed mt-0.5",children:o})]})]},r))]}),i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/15 p-5 space-y-2.5",children:[i.jsx("h3",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium",children:"Parish Office"}),i.jsxs("a",{href:"https://maps.apple.com/?address=8245+Getwell+Road,+Southaven,+MS+38672",target:"_blank",rel:"noopener noreferrer","aria-label":"8245 Getwell Road, Southaven, MS 38672 — open in Maps",className:"flex items-start gap-3",children:[i.jsx(kn,{className:"w-4 h-4 text-[#C4973A] mt-0.5 shrink-0","aria-hidden":"true"}),i.jsxs("p",{className:"font-body text-sm text-[#1E2D4A]",children:["8245 Getwell Road",i.jsx("br",{}),"Southaven, MS 38672"]})]}),i.jsxs("a",{href:"tel:+16623933100","aria-label":"Call (662) 393-3100",className:"flex items-center gap-3",children:[i.jsx(xo,{className:"w-4 h-4 text-[#C4973A] shrink-0","aria-hidden":"true"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]",children:"(662) 393-3100"})]}),i.jsxs("a",{href:"mailto:info@sttimothysms.org","aria-label":"Email info@sttimothysms.org",className:"flex items-center gap-3",children:[i.jsx(Ht,{className:"w-4 h-4 text-[#C4973A] shrink-0","aria-hidden":"true"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]",children:"info@sttimothysms.org"})]}),i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx(ls,{className:"w-4 h-4 text-[#C4973A] shrink-0","aria-hidden":"true"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]",children:"Tues – Thur · 9:00 AM – 2:00 PM"})]})]})]})]})]})}function px(){const t=window.innerWidth;return Math.max(.6,Math.min(1,t/960*.95))}function AS(){bo();const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState(null),[d,f]=b.useState(px());return b.useEffect(()=>{ye.entities.NewsletterIssue.list("",100).then(m=>{const x=[...m].sort((g,v)=>{const[w,A,D]=g.date_label.split("/").map(Number),[k,j,_]=v.date_label.split("/").map(Number),I=new Date(D,w-1,A);return new Date(_,k-1,j)-I});n(x)}).finally(()=>o(!1))},[]),b.useEffect(()=>{function m(){f(px())}return window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),l?i.jsxs("div",{className:"min-h-screen flex flex-col",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#C4973A]/20 shrink-0",style:{backgroundColor:"var(--navy)"},children:[i.jsx("button",{onClick:()=>u(null),"aria-label":"Back to newsletters",className:"text-white hover:text-[#C4973A] transition-colors p-1 -ml-1",children:i.jsx(mo,{className:"w-6 h-6","aria-hidden":"true"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-heading text-white text-sm truncate",children:l.title}),i.jsx("p",{className:"font-body text-[#C4973A] text-[10px]",children:l.date_label})]})]}),i.jsx("div",{className:"flex-1 overflow-auto w-full",children:i.jsx("iframe",{src:l.url,title:l.title,className:"w-full border-0 block",style:{minHeight:"200vh",overflowX:"hidden",zoom:d,transformOrigin:"top left"},sandbox:"allow-scripts allow-same-origin allow-popups allow-forms"})})]}):i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Newsletter"})]}),i.jsxs("div",{className:"px-4 py-4 max-w-5xl mx-auto",children:[r&&i.jsx("div",{className:"flex justify-center py-16",role:"status","aria-label":"Loading newsletters",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:t.map(m=>i.jsxs("button",{onClick:()=>u(m),className:"flex items-center gap-3 bg-white rounded-xl px-4 py-3.5 border border-[#C4973A]/10 active:bg-[#F7F3EC] transition-colors text-left",children:[i.jsx("div",{className:"w-9 h-9 bg-[#1E2D4A]/5 rounded-lg flex items-center justify-center shrink-0",children:i.jsx(nl,{className:"w-4 h-4 text-[#C4973A]"})}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"font-heading text-[#1E2D4A] text-base truncate",children:m.title}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:m.date_label})]}),i.jsx("span",{className:"font-body text-[10px] text-[#C4973A] tracking-wide shrink-0",children:"Read →"})]},m.id))}),!r&&t.length===0&&i.jsxs("div",{className:"text-center py-16",children:[i.jsx(nl,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-3"}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/50",children:"No newsletters yet."})]})]})]})}const _S=["lector","lem","crucifer","gospelBook","torches","ushers","streaming","vestry"],TS={lector:"Lector",lem:"LEM",crucifer:"Crucifer",gospelBook:"Gospel Book",torches:"Torches",ushers:"Ushers",streaming:"Streaming",vestry:"Vestry"};function mx(t){if(!t)return 0;const n=t.replace(/^(\d{1,2})\/(\d{1,2})\/(\d{2})$/,(o,l,u,d)=>`${l}/${u}/20${d}`),r=new Date(n);return isNaN(r.getTime())?0:r.getTime()}function DS(t){return t.time?!1:["lector","lem","crucifer","gospelBook","torches","ushers","streaming","vestry"].every(r=>!t[r]||t[r]==="**"||t[r]==="***")}function xx(t){const n={};for(const r of t){if(DS(r))continue;const o=r.date;n[o]||(n[o]=[]),n[o].push(r)}return Object.entries(n).sort(([r],[o])=>mx(r)-mx(o)).map(([r,o])=>[r,o.sort((l,u)=>{const d=l.time||"",f=u.time||"",m=x=>{const[g,v]=x.split(":").map(Number);return isNaN(g)?9999:g*60+(v||0)};return m(d)-m(f)})])}function RS(){const[t,n]=b.useState([]),[r,o]=b.useState(!0);return b.useEffect(()=>{ye.entities.MinistryEntry.list("date",1e3).then(n).finally(()=>o(!1))},[]),i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Ministry Schedule"})]}),i.jsxs("div",{className:"px-4 py-4 max-w-5xl mx-auto w-full",children:[r&&i.jsx("div",{className:"flex justify-center py-16",role:"status","aria-label":"Loading ministry schedule",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}),i.jsx("div",{className:"space-y-4",children:xx(t).map(([l,u])=>i.jsxs("div",{children:[i.jsx("div",{className:"px-4 py-2 mb-3",style:{backgroundColor:"var(--navy)"},children:i.jsx("p",{className:"font-heading text-white text-base",children:l})}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:u.map((d,f)=>i.jsxs("div",{className:"bg-white rounded-lg border border-[#C4973A]/10 overflow-hidden",children:[d.time&&i.jsx("div",{className:"px-4 py-2 font-body text-sm font-600 text-[#C4973A] border-b border-[#C4973A]/8",children:d.time}),i.jsx("div",{className:"divide-y divide-[#C4973A]/8",children:_S.map(m=>d[m]&&d[m]!=="**"&&d[m]!=="***"?i.jsxs("div",{className:"flex items-center justify-between px-4 py-2",children:[i.jsx("span",{className:"font-body text-xs text-[#8B8375] tracking-wide",children:TS[m]}),i.jsx("span",{className:"font-body text-sm text-[#1E2D4A]",children:d[m]})]},m):null)})]},f))})]},l))}),!r&&xx(t).length===0&&i.jsxs("div",{className:"text-center py-16",children:[i.jsx(dl,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-3"}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/50",children:"No upcoming schedule."})]})]})]})}const PS=[{title:"Sunday Worship",subtitle:"What to expect on a Sunday morning",path:"/app/sunday"},{title:"Our Beliefs",subtitle:"The Episcopal faith and tradition",path:"/app/beliefs"},{title:"Leadership",subtitle:"Clergy, staff, and vestry",path:"/app/leadership"},{title:"Sacraments & Services",subtitle:"Baptism, Eucharist, marriage and more",path:"/app/sacraments"}];function OS(){return i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"About"})]}),i.jsxs("div",{className:"px-4 py-5 space-y-4 max-w-5xl mx-auto w-full",children:[i.jsxs("div",{className:"bg-gradient-to-br from-[#1E2D4A] to-[#2a3d5a] rounded-2xl px-6 py-7 text-center mb-2",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] mb-3 font-medium",children:"Our Mission"}),i.jsx("p",{className:"font-body text-sm md:text-base text-white/90 leading-relaxed",children:"St. Timothy's is a faith community open to all — on a journey of spiritual growth, seeking to welcome, love, offer hope, and serve all people."})]}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2.5",children:PS.map(({title:t,subtitle:n,path:r})=>i.jsxs(Ve,{to:r,className:"flex items-center gap-4 bg-white rounded-xl border border-[#C4973A]/10 px-5 py-4 active:bg-[#F7F3EC] hover:border-[#C4973A]/30 transition-all group",children:[i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"font-heading text-[#1E2D4A] text-base font-500",children:t}),i.jsx("p",{className:"font-body text-xs text-[#8B8375] mt-1",children:n})]}),i.jsx(ns,{className:"w-5 h-5 text-[#C4973A]/40 group-hover:text-[#C4973A] transition-colors shrink-0"})]},r))})]})]})}function MS(){const[t,n]=b.useState({submitter_name:"",submitter_email:"",caption:""}),[r,o]=b.useState(null),[l,u]=b.useState(null),[d,f]=b.useState(!1),[m,x]=b.useState(!1),g=w=>{const A=w.target.files[0];A&&(o(A),u(URL.createObjectURL(A)))},v=async w=>{if(w.preventDefault(),!r)return;f(!0);const{file_url:A}=await ye.integrations.Core.UploadFile({file:r});await ye.functions.invoke("submitParishPhoto",{photo_url:A,...t}),x(!0),f(!1)};return m?i.jsx("div",{className:"min-h-screen flex items-center justify-center px-6",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"text-center",children:[i.jsx(Zs,{className:"w-12 h-12 mx-auto mb-4 text-[#C4973A]"}),i.jsx("h2",{className:"font-heading text-2xl text-[#1E2D4A] mb-2",children:"Thank you!"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375] leading-relaxed",children:"Your photo has been submitted and will appear after review."}),i.jsx("button",{onClick:()=>{x(!1),n({submitter_name:"",submitter_email:"",caption:""}),o(null),u(null)},className:"mt-6 font-body text-xs text-[#C4973A]",children:"Submit another photo"})]})}):i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"Community"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Share a Photo"})]}),i.jsxs("div",{className:"px-4 py-5 max-w-2xl mx-auto",children:[i.jsx("p",{className:"font-body text-sm text-[#8B8375] mb-5 leading-relaxed",children:"Share a moment from parish life. Submitted photos are reviewed before appearing on the website."}),i.jsxs("form",{onSubmit:v,className:"space-y-4",children:[i.jsxs("label",{htmlFor:"app-photo-upload",className:`block relative w-full rounded-2xl overflow-hidden border-2 border-dashed cursor-pointer transition-colors ${l?"border-[#C4973A]/40":"border-[#C4973A]/20 hover:border-[#C4973A]/40"}`,style:{minHeight:"10rem"},children:[l?i.jsx("img",{src:l,alt:"Selected photo preview",className:"w-full h-52 object-cover"}):i.jsxs("div",{className:"flex flex-col items-center justify-center py-10 text-center px-4",children:[i.jsx(Px,{className:"w-8 h-8 text-[#C4973A]/50 mb-2","aria-hidden":"true"}),i.jsx("p",{className:"font-body text-sm text-[#8B8375]",children:"Tap to choose or take a photo"}),i.jsx("p",{className:"font-body text-[10px] text-[#8B8375]/60 mt-1",children:"JPG or PNG up to 10 MB"})]}),i.jsx("input",{id:"app-photo-upload",type:"file",accept:"image/*",onChange:g,className:"hidden",required:!0,"aria-required":"true","aria-label":"Choose a photo to submit"}),l&&i.jsx("div",{className:"absolute bottom-2 right-2 bg-black/40 rounded-full px-3 py-1",children:i.jsx("span",{className:"font-body text-[10px] text-white",children:"Tap to change"})})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"app-photo-name",className:"font-body text-xs font-medium text-[#1E2D4A] mb-1.5 block",children:"Your Name *"}),i.jsx("input",{id:"app-photo-name",className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-white placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50",placeholder:"Full name",value:t.submitter_name,onChange:w=>n(A=>({...A,submitter_name:w.target.value})),required:!0,"aria-required":"true"})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"app-photo-email",className:"font-body text-xs font-medium text-[#1E2D4A] mb-1.5 block",children:"Email (optional)"}),i.jsx("input",{id:"app-photo-email",type:"email",className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-white placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50",placeholder:"your@email.com",value:t.submitter_email,onChange:w=>n(A=>({...A,submitter_email:w.target.value}))})]}),i.jsxs("div",{children:[i.jsx("label",{htmlFor:"app-photo-caption",className:"font-body text-xs font-medium text-[#1E2D4A] mb-1.5 block",children:"Caption (optional)"}),i.jsx("textarea",{id:"app-photo-caption",rows:3,className:"w-full border border-[#C4973A]/20 rounded-xl px-3 py-2.5 font-body text-sm text-[#1E2D4A] bg-white placeholder-[#8B8375]/60 focus:outline-none focus:border-[#C4973A]/50 resize-none",placeholder:"Describe the occasion or moment…",value:t.caption,onChange:w=>n(A=>({...A,caption:w.target.value}))})]}),i.jsx("button",{type:"submit",disabled:d||!r,className:"w-full flex items-center justify-center gap-2 bg-[#1E2D4A] text-white font-body text-sm tracking-[0.15em] uppercase py-3.5 rounded-xl disabled:opacity-50 active:bg-[#141F33] transition-colors",children:d?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin",role:"status","aria-label":"Uploading photo"})," Uploading…"]}):i.jsxs(i.Fragment,{children:[i.jsx($x,{className:"w-4 h-4","aria-hidden":"true"})," Submit Photo"]})})]})]})]})}function LS(){const[t,n]=b.useState([]),[r,o]=b.useState(!0),[l,u]=b.useState(null);b.useEffect(()=>{ye.entities.ParishPhoto.filter({status:"approved"},"-created_date",500).then(n).finally(()=>o(!1))},[]);const d=f=>{f.target===f.currentTarget&&u(null)};return i.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:[i.jsxs("div",{className:"px-5 pt-6 pb-5",style:{backgroundColor:"var(--navy)"},children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.35em] uppercase text-[#C4973A] mb-0.5",children:"St. Timothy's"}),i.jsx("h1",{className:"font-heading font-300 text-white text-2xl",children:"Parish Gallery"}),i.jsx("p",{className:"font-body text-white/40 text-[11px] mt-1",children:"Photos from our community"})]}),r&&i.jsx("div",{className:"flex justify-center py-20",role:"status","aria-label":"Loading parish gallery",children:i.jsx("div",{className:"w-6 h-6 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin","aria-hidden":"true"})}),!r&&t.length===0&&i.jsxs("div",{className:"text-center py-20 px-6",children:[i.jsx(Fx,{className:"w-10 h-10 text-[#C4973A]/30 mx-auto mb-3"}),i.jsx("p",{className:"font-heading italic text-[#1E2D4A]/50",children:"No photos yet."})]}),!r&&t.length>0&&i.jsx(FS,{photos:t,onSelect:u}),l&&i.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":l.caption||"Parish photo",className:"fixed inset-0 z-50 bg-black/90 flex flex-col items-center justify-center p-4",onClick:d,children:[i.jsx("button",{onClick:()=>u(null),className:"absolute top-4 right-4 text-white/60 hover:text-white text-2xl font-light leading-none","aria-label":"Close photo",children:"✕"}),i.jsx("img",{src:l.photo_url,alt:l.caption||"Parish photo",className:"max-w-full max-h-[80vh] object-contain rounded-lg shadow-2xl"}),i.jsxs("div",{className:"mt-3 text-center",children:[l.caption&&i.jsx("p",{className:"font-heading italic text-white/90 text-base",children:l.caption}),i.jsx("p",{className:"font-body text-white/40 text-xs mt-1",children:l.submitter_name})]})]})]})}function FS({photos:t,onSelect:n}){const r=o=>{const l=[1,1,2,1,2,1,1,1,2,1,1,2];return l[o%l.length]};return i.jsxs("div",{className:"p-3 md:p-4",children:[i.jsx("div",{className:"block md:hidden",children:i.jsx("div",{className:"columns-2 gap-2",children:t.map(o=>i.jsx("button",{className:"break-inside-avoid mb-2 rounded-lg overflow-hidden cursor-pointer w-full text-left",onClick:()=>n(o),"aria-label":o.caption?`View photo: ${o.caption}`:`View photo by ${o.submitter_name}`,children:i.jsx("img",{src:o.photo_url,alt:o.caption||`Photo by ${o.submitter_name}`,className:"w-full object-cover block",loading:"lazy"})},o.id))})}),i.jsx("div",{className:"hidden md:block",children:i.jsx("div",{className:"grid grid-cols-3 gap-3 auto-rows-[160px]",children:t.map((o,l)=>{const u=r(l),d=l%5===0?"row-span-2":"row-span-1";return i.jsxs("button",{className:`overflow-hidden rounded-xl cursor-pointer group relative ${u===2?"col-span-2":"col-span-1"} ${d}`,onClick:()=>n(o),"aria-label":o.caption?`View photo: ${o.caption}`:`View photo by ${o.submitter_name}`,children:[i.jsx("img",{src:o.photo_url,alt:o.caption||`Photo by ${o.submitter_name}`,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-105",loading:"lazy"}),(o.caption||o.submitter_name)&&i.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-end p-3",children:[o.caption&&i.jsx("p",{className:"font-heading italic text-white text-sm leading-tight",children:o.caption}),i.jsx("p",{className:"font-body text-white/60 text-[10px] mt-0.5",children:o.submitter_name})]})]},o.id)})})})]})}const IS=[{label:"Sunday Services",detail:`Sept – May: 8:30 AM & 10:30 AM
June – Aug: 9:30 AM`},{label:"Service Length",detail:`45 min (Rite I)
~1 hour (Rite II)`},{label:"Children",detail:`Always welcome
Nursery & Sunday School available`},{label:"Communion",detail:`All baptized Christians welcome
Others may receive a blessing`}],BS=[{number:"01",title:"GATHER",body:"We begin with praise to God."},{number:"02",title:"SCRIPTURE",body:"We hear several readings from the Bible (including a Gospel passage). A sermon expounds on the scriptures we've heard."},{number:"03",title:"PRAYER",body:"Together we confess what we believe by saying one of the ancient creeds. Then together we offer prayers for the church and world."},{number:"04",title:"COMMUNION",body:"In the Episcopal Church, all baptized Christians are welcome to receive Holy Communion. If not baptized, you are invited to receive a blessing."},{number:"05",title:"SENT FORTH",body:"We are dismissed and sent out into the world in peace, 'to love and serve the Lord.'"}],US=[{q:"Do I need to be Episcopalian?",a:"Absolutely not. We welcome people of all backgrounds. Whoever you are, you are welcome here."},{q:"Can children come?",a:"Yes! Children are always welcome. We offer Sunday School and Children's Chapel on the first Sunday of each month."},{q:"What is Holy Eucharist?",a:"It is our principal act of Christian worship. All baptized Christians are welcome to receive Holy Communion."},{q:"Can I watch online?",a:"Yes! We livestream Sunday worship on Facebook every week at facebook.com/sttimothysouthaven."}];function zS(){return i.jsx("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"px-4 py-5 space-y-6 max-w-5xl mx-auto",style:{overflowX:"hidden"},children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"At a Glance"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:IS.map(t=>i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-4",children:[i.jsx("p",{className:"font-body font-medium text-xs text-[#C4973A] tracking-wide mb-1.5",children:t.label}),i.jsx("p",{className:"font-heading text-base text-[#1E2D4A] leading-relaxed whitespace-pre-line",children:t.detail})]},t.label))})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"Order of Service"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:BS.map(t=>i.jsx("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-3.5",children:i.jsxs("div",{className:"flex gap-3",children:[i.jsx("span",{className:"font-heading text-2xl text-[#C4973A]/40 leading-none flex-shrink-0",children:t.number}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-xs tracking-[0.2em] uppercase text-[#1E2D4A]",children:t.title}),i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/75 leading-relaxed mt-1",children:t.body})]})]})},t.number))})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"Full Schedule"}),i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-4 space-y-4",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-[10px] text-[#C4973A] tracking-wide mb-2",children:"September – May"}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-lg text-[#1E2D4A]",children:"8:30 AM"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"Holy Eucharist: Rite I (45 min)"})]}),i.jsxs("div",{className:"border-t border-[#C4973A]/10 pt-3",children:[i.jsx("p",{className:"font-heading text-lg text-[#1E2D4A]",children:"10:30 AM"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"Holy Eucharist: Rite II (1 hour)"})]})]})]}),i.jsxs("div",{className:"border-t border-[#C4973A]/10 pt-4",children:[i.jsx("p",{className:"font-body font-medium text-[10px] text-[#C4973A] tracking-wide mb-2",children:"June – August"}),i.jsxs("div",{children:[i.jsx("p",{className:"font-heading text-lg text-[#1E2D4A]",children:"9:30 AM"}),i.jsx("p",{className:"font-body text-xs text-[#8B8375]",children:"Holy Eucharist: Rite II (combined service)"})]})]})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"The Service"}),i.jsxs("div",{className:"bg-[#EDE7DA] rounded-xl p-4 space-y-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-xs text-[#C4973A] tracking-wide mb-1",children:"Liturgical"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75",children:"Prayers are written and follow set ancient forms."})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-xs text-[#C4973A] tracking-wide mb-1",children:"Sacramental"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75",children:"Focused on receiving God's grace through Holy Communion."})]}),i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-xs text-[#C4973A] tracking-wide mb-1",children:"Participatory"}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75",children:"Everyone has their part to play. The service is in a printed booklet."})]})]})]}),i.jsxs("div",{className:"bg-[#1E2D4A] rounded-xl p-5 text-center",children:[i.jsx("p",{className:"font-heading text-lg text-white mb-2",children:"Join Us Online"}),i.jsx("p",{className:"font-body text-xs text-white/75 mb-4 leading-relaxed",children:"Can't be there in person? Watch live on Facebook."}),i.jsxs("a",{href:"https://www.facebook.com/sttimothysouthaven",target:"_blank",rel:"noopener noreferrer","aria-label":"Watch Sunday service on Facebook",className:"inline-flex items-center justify-center gap-2 bg-[#C4973A] hover:bg-white hover:text-[#1E2D4A] text-white font-body font-medium text-xs tracking-[0.2em] uppercase px-6 py-3 rounded-lg transition-colors w-full",children:[i.jsx(rs,{className:"w-4 h-4","aria-hidden":"true"}),"Watch on Facebook"]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"Questions?"}),i.jsx("div",{className:"space-y-2",children:US.map((t,n)=>i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-3.5",children:[i.jsx("p",{className:"font-body font-medium text-xs text-[#1E2D4A] mb-1.5",children:t.q}),i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/75 leading-relaxed",children:t.a})]},n))})]})]})})}function $S(){return i.jsx("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"px-4 py-5 space-y-6 max-w-5xl mx-auto",children:[i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-5",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium mb-2",children:"Episcopalians Believe"}),i.jsx("h2",{className:"font-heading text-2xl md:text-3xl text-[#1E2D4A] leading-tight mb-1",children:"God Is Love."}),i.jsx("h3",{className:"font-heading italic text-xl md:text-2xl text-[#1E2D4A] mb-4",children:"No Exceptions."}),i.jsx("div",{className:"w-6 h-px bg-[#C4973A] mb-4"}),i.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75 leading-relaxed",children:"Episcopalians believe in a loving, liberating, and life-giving God. We are part of the global Anglican Communion and descend from the Church of England."}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75 leading-relaxed",children:"'Episcopal' comes from the Greek word for 'Bishop.' St. Timothy's is part of the Diocese of Mississippi."})]})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"How We Follow"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[{label:"Scripture",body:"The Old and New Testaments contain all things necessary to salvation and are the Word of God."},{label:"Tradition",body:"The Episcopal Church maintains the historic creeds, apostolic ministry, and sacraments as channels of God's grace."},{label:"Reason",body:"God gave us minds to use. Intellectual inquiry, honest doubt, and dialogue are part of living faith."}].map(t=>i.jsxs("div",{className:"bg-[#1E2D4A] rounded-xl p-4",children:[i.jsx("p",{className:"font-heading text-white font-medium text-sm mb-1.5",children:t.label}),i.jsx("p",{className:"font-body text-xs text-white/75 leading-relaxed",children:t.body})]},t.label))})]}),i.jsxs("div",{className:"bg-[#EDE7DA] rounded-xl p-5",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium mb-3",children:"Full Inclusion"}),i.jsx("p",{className:"font-heading italic text-base text-[#1E2D4A] leading-relaxed mb-4",children:'"The Episcopal Church has a legacy of inclusion. Women and men serve as bishops, priests, and deacons. Leadership is a gift from God and can be expressed by all people."'}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("a",{href:"https://www.episcopalchurch.org",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about The Episcopal Church",className:"block w-full text-center bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-medium text-xs tracking-[0.15em] uppercase px-4 py-3 rounded-lg transition-colors",children:"Learn More: The Episcopal Church"}),i.jsx("a",{href:"https://www.dioms.org",target:"_blank",rel:"noopener noreferrer","aria-label":"Learn more about the Diocese of Mississippi",className:"block w-full text-center border border-[#1E2D4A] text-[#1E2D4A] hover:bg-[#1E2D4A] hover:text-white font-body font-medium text-xs tracking-[0.15em] uppercase px-4 py-3 rounded-lg transition-colors",children:"Diocese of Mississippi"})]})]})]})})}const WS=[{name:"The Rev. Clay Calhoun",title:"Rector",email:"rector@sttimothysms.org"},{name:"Debbie Wisdom",title:"Bookkeeper",email:"bookkeeper@sttimothysms.org"}],gx={backRow:["Laurie Harwell","Henry Gordon (treasurer)","Melanie Jolly","Danielle Kirk","Adrienne Moore (senior warden)","Karen Johnston","Fr. Clay Calhoun (rector)","Kelly Romito"],frontRow:["Sarah Irby","Cody Barthol (junior warden)","Katie Ligon (clerk)"]};function qS(){return i.jsx("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"px-4 py-5 space-y-6 max-w-5xl mx-auto",children:[i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"Clergy & Staff"}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:WS.map(t=>i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-4",children:[i.jsx("p",{className:"font-heading text-base text-[#1E2D4A] mb-0.5",children:t.name}),i.jsx("p",{className:"font-body text-[10px] tracking-[0.2em] uppercase text-[#C4973A] font-medium mb-3",children:t.title}),i.jsxs("a",{href:`mailto:${t.email}`,"aria-label":`Email ${t.name} at ${t.email}`,className:"inline-flex items-center gap-2 font-body text-xs text-[#1E2D4A] hover:text-[#C4973A] transition-colors",children:[i.jsx(Ht,{className:"w-3.5 h-3.5","aria-hidden":"true"}),t.email]})]},t.name))})]}),i.jsxs("div",{className:"space-y-3",children:[i.jsx("p",{className:"font-body text-[9px] tracking-[0.3em] uppercase text-[#C4973A] font-medium px-0.5",children:"Vestry 2026"}),i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-4 space-y-4",children:[i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/75 leading-relaxed",children:"Your Vestry represents you. Please feel free to contact any of them for information or needs."}),i.jsxs("div",{className:"space-y-3",children:[i.jsxs("div",{children:[i.jsx("p",{className:"font-body font-medium text-[10px] text-[#C4973A] tracking-wide mb-2",children:"Back Row"}),i.jsx("ul",{className:"space-y-1",children:gx.backRow.map(t=>i.jsx("li",{className:"font-body text-xs text-[#1E2D4A]/75",children:t},t))})]}),i.jsxs("div",{className:"border-t border-[#C4973A]/10 pt-3",children:[i.jsx("p",{className:"font-body font-medium text-[10px] text-[#C4973A] tracking-wide mb-2",children:"Front Row"}),i.jsx("ul",{className:"space-y-1",children:gx.frontRow.map(t=>i.jsx("li",{className:"font-body text-xs text-[#1E2D4A]/75",children:t},t))})]})]})]})]})]})})}const HS=[{id:"baptism",title:"Baptism",body:"Baptism is the joyful way in which God lovingly adopts us as daughters and sons and makes us members of the household of God. Baptisms at St. Timothy's may be celebrated throughout the year.",cta:"If you are interested in baptism, please contact the church office.",formLabel:"Baptismal Information Form",formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/ba43a37e0_BaptismalInformationForm.pdf"},{id:"eucharist",title:"Holy Eucharist",body:"The Holy Eucharist (also known as Holy Communion) is our principal act of Christian worship. In the Episcopal Church, all baptized Christians are welcome to receive Holy Communion."},{id:"confirmation",title:"Confirmation",body:"Confirmation is the rite in which we express a mature commitment to Christ and receive strength from the Holy Spirit. Adults who have been previously confirmed in a different denomination may be received into the Episcopal Church.",cta:"If you are interested in Confirmation, please contact the Rector."},{id:"matrimony",title:"Holy Matrimony",body:"In the Episcopal Church, Christian marriage is understood to be a lifelong union intended by God for mutual joy and help. All weddings are according to the Celebration and Blessing of a Marriage in the Book of Common Prayer.",cta:"If you are interested in being married at St. Timothy's, please contact the Rector.",formLabel:"Wedding Policy Packet",formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/a92c2991d_StTimothysWeddingPolicyPacket.pdf"},{id:"burial",title:"Christian Burial",body:"The burial of the dead is part of the regular life of the Christian community. St. Timothy's encourages all members to plan and make arrangements for their burial in advance.",formLabel:"Burial Planning Form",formUrl:"https://media.base44.com/files/public/6a2e0d7bafe9f340cc321b12/873378bae_StTimothysburialplanningsheet.pdf"}];function VS(){return i.jsx("div",{className:"min-h-screen",style:{backgroundColor:"var(--parchment)"},children:i.jsxs("div",{className:"px-4 py-5 space-y-3 max-w-5xl mx-auto",children:[i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/75 leading-relaxed mb-4 px-0.5",children:"The sacraments are outward and visible signs of inward and spiritual grace. At St. Timothy's, the sacramental life is central to our worship."}),i.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:HS.map(t=>i.jsxs("div",{className:"bg-white rounded-xl border border-[#C4973A]/10 p-4 flex flex-col",children:[i.jsx("h2",{className:"font-heading text-lg text-[#1E2D4A] mb-2.5",children:t.title}),i.jsx("p",{className:"font-body text-sm text-[#1E2D4A]/75 leading-relaxed mb-3 flex-grow",children:t.body}),i.jsxs("div",{className:"space-y-2",children:[t.formUrl&&i.jsxs("a",{href:t.formUrl,target:"_blank",rel:"noopener noreferrer",download:!0,"aria-label":`Download ${t.formLabel} (PDF)`,className:"inline-flex items-center gap-2 bg-[#1E2D4A] hover:bg-[#C4973A] text-white font-body font-medium text-xs tracking-[0.15em] uppercase px-3.5 py-2 rounded-lg transition-colors w-full justify-center",children:[i.jsx(Lx,{className:"w-3.5 h-3.5","aria-hidden":"true"}),t.formLabel]}),t.cta&&i.jsx("p",{className:"font-body text-xs text-[#1E2D4A]/70 italic bg-[#1E2D4A]/5 border-l-2 border-[#1E2D4A]/30 pl-3 py-2",children:t.cta})]})]},t.id))})]})})}const QS=()=>{const{isLoadingAuth:t,isLoadingPublicSettings:n,authError:r,navigateToLogin:o}=aC();if(n||t)return i.jsx("div",{className:"fixed inset-0 flex items-center justify-center",style:{backgroundColor:"#F7F3EC"},children:i.jsx("div",{className:"w-7 h-7 border-2 border-[#C4973A]/30 border-t-[#1E2D4A] rounded-full animate-spin"})});if(r){if(r.type==="user_not_registered")return i.jsx(lC,{});if(r.type==="auth_required")return o(),null}return i.jsxs(Dg,{children:[i.jsxs(_e,{element:i.jsx(mC,{}),children:[i.jsx(_e,{path:"/",element:i.jsx(qk,{})}),i.jsx(_e,{path:"/parish-calendar",element:i.jsx(Qk,{})}),i.jsx(_e,{path:"/connect",element:i.jsx(g3,{})}),i.jsx(_e,{path:"/give",element:i.jsx(v3,{})}),i.jsx(_e,{path:"/about/sunday-worship",element:i.jsx(A3,{})}),i.jsx(_e,{path:"/about/beliefs",element:i.jsx(D3,{})}),i.jsx(_e,{path:"/about/leadership",element:i.jsx(L3,{})}),i.jsx(_e,{path:"/ministry-schedule",element:i.jsx(z3,{})}),i.jsx(_e,{path:"/about/sacraments",element:i.jsx(W3,{})}),i.jsx(_e,{path:"/newsletter",element:i.jsx(q3,{})}),i.jsx(_e,{path:"/daily-office",element:i.jsx(Q3,{})}),i.jsx(_e,{path:"/share-a-photo",element:i.jsx(fS,{})})]}),i.jsx(_e,{path:"/refresh/:token",element:i.jsx(H3,{})}),i.jsx(_e,{path:"/parish-admin-sttimothy",element:i.jsx(lS,{})}),i.jsxs(_e,{element:i.jsx(gS,{}),children:[i.jsx(_e,{path:"/app",element:i.jsx(bS,{})}),i.jsx(_e,{path:"/app/calendar",element:i.jsx(CS,{})}),i.jsx(_e,{path:"/app/daily-office",element:i.jsx(kS,{})}),i.jsx(_e,{path:"/app/connect",element:i.jsx(SS,{})}),i.jsx(_e,{path:"/app/give",element:i.jsx(ES,{})}),i.jsx(_e,{path:"/app/newsletter",element:i.jsx(AS,{})}),i.jsx(_e,{path:"/app/ministry",element:i.jsx(RS,{})}),i.jsx(_e,{path:"/app/about",element:i.jsx(OS,{})}),i.jsx(_e,{path:"/app/photo",element:i.jsx(MS,{})}),i.jsx(_e,{path:"/app/gallery",element:i.jsx(LS,{})}),i.jsx(_e,{path:"/app/sunday",element:i.jsx(zS,{})}),i.jsx(_e,{path:"/app/beliefs",element:i.jsx($S,{})}),i.jsx(_e,{path:"/app/leadership",element:i.jsx(qS,{})}),i.jsx(_e,{path:"/app/sacraments",element:i.jsx(VS,{})})]}),i.jsx(_e,{path:"*",element:i.jsx(iC,{})})]})};function GS(){return i.jsx(oC,{children:i.jsxs(f1,{client:S1,children:[i.jsx(Aj,{children:i.jsxs(Dg,{children:[i.jsx(_e,{path:"/login",element:i.jsx(mS,{})}),i.jsx(_e,{path:"/*",element:i.jsx(QS,{})})]})}),i.jsx(zw,{})]})})}Yv.createRoot(document.getElementById("root")).render(i.jsx(GS,{}));
