Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cyfuse /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
CyFuseLogo-CXVBZQBc.png
12.77
KB
-rw-r--r--
about-bg-D9HtyJao.png
237.75
KB
-rw-r--r--
events-home-bg-DHtziSsv.png
168.16
KB
-rw-r--r--
hero-DJBfKnwj.mp4
3.8
MB
-rw-r--r--
index-BbXLiC98.css
74.32
KB
-rw-r--r--
index-CC0kSpOi.js
886.42
KB
-rw-r--r--
project-home-bg-BksAXBck.png
175.83
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index-CC0kSpOi.js
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function tm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bC={exports:{}},nm={},SC={exports:{}},je={};/** * @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 Kh=Symbol.for("react.element"),NM=Symbol.for("react.portal"),VM=Symbol.for("react.fragment"),LM=Symbol.for("react.strict_mode"),OM=Symbol.for("react.profiler"),FM=Symbol.for("react.provider"),jM=Symbol.for("react.context"),$M=Symbol.for("react.forward_ref"),zM=Symbol.for("react.suspense"),BM=Symbol.for("react.memo"),UM=Symbol.for("react.lazy"),xx=Symbol.iterator;function HM(t){return t===null||typeof t!="object"?null:(t=xx&&t[xx]||t["@@iterator"],typeof t=="function"?t:null)}var CC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},PC=Object.assign,AC={};function yu(t,e,n){this.props=t,this.context=e,this.refs=AC,this.updater=n||CC}yu.prototype.isReactComponent={};yu.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};yu.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function RC(){}RC.prototype=yu.prototype;function Kv(t,e,n){this.props=t,this.context=e,this.refs=AC,this.updater=n||CC}var Gv=Kv.prototype=new RC;Gv.constructor=Kv;PC(Gv,yu.prototype);Gv.isPureReactComponent=!0;var Tx=Array.isArray,IC=Object.prototype.hasOwnProperty,Yv={current:null},kC={key:!0,ref:!0,__self:!0,__source:!0};function DC(t,e,n){var r,i={},s=null,o=null;if(e!=null)for(r in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)IC.call(e,r)&&!kC.hasOwnProperty(r)&&(i[r]=e[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(t&&t.defaultProps)for(r in a=t.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Kh,type:t,key:s,ref:o,props:i,_owner:Yv.current}}function WM(t,e){return{$$typeof:Kh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Qv(t){return typeof t=="object"&&t!==null&&t.$$typeof===Kh}function qM(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var Ex=/\/+/g;function tg(t,e){return typeof t=="object"&&t!==null&&t.key!=null?qM(""+t.key):e.toString(36)}function yd(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Kh:case NM:o=!0}}if(o)return o=t,i=i(o),t=r===""?"."+tg(o,0):r,Tx(i)?(n="",t!=null&&(n=t.replace(Ex,"$&/")+"/"),yd(i,e,n,"",function(u){return u})):i!=null&&(Qv(i)&&(i=WM(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Ex,"$&/")+"/")+t)),e.push(i)),1;if(o=0,r=r===""?".":r+":",Tx(t))for(var a=0;a<t.length;a++){s=t[a];var l=r+tg(s,a);o+=yd(s,e,n,l,i)}else if(l=HM(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=r+tg(s,a++),o+=yd(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function xf(t,e,n){if(t==null)return t;var r=[],i=0;return yd(t,r,"","",function(s){return e.call(n,s,i++)}),r}function KM(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var gr={current:null},vd={transition:null},GM={ReactCurrentDispatcher:gr,ReactCurrentBatchConfig:vd,ReactCurrentOwner:Yv};function MC(){throw Error("act(...) is not supported in production builds of React.")}je.Children={map:xf,forEach:function(t,e,n){xf(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return xf(t,function(){e++}),e},toArray:function(t){return xf(t,function(e){return e})||[]},only:function(t){if(!Qv(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};je.Component=yu;je.Fragment=VM;je.Profiler=OM;je.PureComponent=Kv;je.StrictMode=LM;je.Suspense=zM;je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=GM;je.act=MC;je.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=PC({},t.props),i=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=Yv.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)IC.call(e,l)&&!kC.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Kh,type:t.type,key:i,ref:s,props:r,_owner:o}};je.createContext=function(t){return t={$$typeof:jM,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:FM,_context:t},t.Consumer=t};je.createElement=DC;je.createFactory=function(t){var e=DC.bind(null,t);return e.type=t,e};je.createRef=function(){return{current:null}};je.forwardRef=function(t){return{$$typeof:$M,render:t}};je.isValidElement=Qv;je.lazy=function(t){return{$$typeof:UM,_payload:{_status:-1,_result:t},_init:KM}};je.memo=function(t,e){return{$$typeof:BM,type:t,compare:e===void 0?null:e}};je.startTransition=function(t){var e=vd.transition;vd.transition={};try{t()}finally{vd.transition=e}};je.unstable_act=MC;je.useCallback=function(t,e){return gr.current.useCallback(t,e)};je.useContext=function(t){return gr.current.useContext(t)};je.useDebugValue=function(){};je.useDeferredValue=function(t){return gr.current.useDeferredValue(t)};je.useEffect=function(t,e){return gr.current.useEffect(t,e)};je.useId=function(){return gr.current.useId()};je.useImperativeHandle=function(t,e,n){return gr.current.useImperativeHandle(t,e,n)};je.useInsertionEffect=function(t,e){return gr.current.useInsertionEffect(t,e)};je.useLayoutEffect=function(t,e){return gr.current.useLayoutEffect(t,e)};je.useMemo=function(t,e){return gr.current.useMemo(t,e)};je.useReducer=function(t,e,n){return gr.current.useReducer(t,e,n)};je.useRef=function(t){return gr.current.useRef(t)};je.useState=function(t){return gr.current.useState(t)};je.useSyncExternalStore=function(t,e,n){return gr.current.useSyncExternalStore(t,e,n)};je.useTransition=function(){return gr.current.useTransition()};je.version="18.3.1";SC.exports=je;var N=SC.exports;const th=tm(N);/** * @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 YM=N,QM=Symbol.for("react.element"),XM=Symbol.for("react.fragment"),JM=Object.prototype.hasOwnProperty,ZM=YM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,eN={key:!0,ref:!0,__self:!0,__source:!0};function NC(t,e,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(r in e)JM.call(e,r)&&!eN.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:QM,type:t,key:s,ref:o,props:i,_owner:ZM.current}}nm.Fragment=XM;nm.jsx=NC;nm.jsxs=NC;bC.exports=nm;var I=bC.exports,VC={exports:{}},ii={},LC={exports:{}},OC={};/** * @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. */(function(t){function e(B,Q){var L=B.length;B.push(Q);e:for(;0<L;){var O=L-1>>>1,H=B[O];if(0<i(H,Q))B[O]=Q,B[L]=H,L=O;else break e}}function n(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var Q=B[0],L=B.pop();if(L!==Q){B[0]=L;e:for(var O=0,H=B.length,se=H>>>1;O<se;){var ue=2*(O+1)-1,he=B[ue],be=ue+1,we=B[be];if(0>i(he,L))be<H&&0>i(we,he)?(B[O]=we,B[be]=L,O=be):(B[O]=he,B[ue]=L,O=ue);else if(be<H&&0>i(we,L))B[O]=we,B[be]=L,O=be;else break e}}return Q}function i(B,Q){var L=B.sortIndex-Q.sortIndex;return L!==0?L:B.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],h=1,f=null,d=3,p=!1,v=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(B){for(var Q=n(u);Q!==null;){if(Q.callback===null)r(u);else if(Q.startTime<=B)r(u),Q.sortIndex=Q.expirationTime,e(l,Q);else break;Q=n(u)}}function k(B){if(y=!1,T(B),!v)if(n(l)!==null)v=!0,ee(P);else{var Q=n(u);Q!==null&&J(k,Q.startTime-B)}}function P(B,Q){v=!1,y&&(y=!1,_(m),m=-1),p=!0;var L=d;try{for(T(Q),f=n(l);f!==null&&(!(f.expirationTime>Q)||B&&!D());){var O=f.callback;if(typeof O=="function"){f.callback=null,d=f.priorityLevel;var H=O(f.expirationTime<=Q);Q=t.unstable_now(),typeof H=="function"?f.callback=H:f===n(l)&&r(l),T(Q)}else r(l);f=n(l)}if(f!==null)var se=!0;else{var ue=n(u);ue!==null&&J(k,ue.startTime-Q),se=!1}return se}finally{f=null,d=L,p=!1}}var V=!1,S=null,m=-1,E=5,A=-1;function D(){return!(t.unstable_now()-A<E)}function R(){if(S!==null){var B=t.unstable_now();A=B;var Q=!0;try{Q=S(!0,B)}finally{Q?b():(V=!1,S=null)}}else V=!1}var b;if(typeof w=="function")b=function(){w(R)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,z=q.port2;q.port1.onmessage=R,b=function(){z.postMessage(null)}}else b=function(){C(R,0)};function ee(B){S=B,V||(V=!0,b())}function J(B,Q){m=C(function(){B(t.unstable_now())},Q)}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(B){B.callback=null},t.unstable_continueExecution=function(){v||p||(v=!0,ee(P))},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(B){switch(d){case 1:case 2:case 3:var Q=3;break;default:Q=d}var L=d;d=Q;try{return B()}finally{d=L}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(B,Q){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var L=d;d=B;try{return Q()}finally{d=L}},t.unstable_scheduleCallback=function(B,Q,L){var O=t.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?O+L:O):L=O,B){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=L+H,B={id:h++,callback:Q,priorityLevel:B,startTime:L,expirationTime:H,sortIndex:-1},L>O?(B.sortIndex=L,e(u,B),n(l)===null&&B===n(u)&&(y?(_(m),m=-1):y=!0,J(k,L-O))):(B.sortIndex=H,e(l,B),v||p||(v=!0,ee(P))),B},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(B){var Q=d;return function(){var L=d;d=Q;try{return B.apply(this,arguments)}finally{d=L}}}})(OC);LC.exports=OC;var tN=LC.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 nN=N,ti=tN;function oe(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var FC=new Set,nh={};function Oa(t,e){ql(t,e),ql(t+"Capture",e)}function ql(t,e){for(nh[t]=e,t=0;t<e.length;t++)FC.add(e[t])}var Cs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xy=Object.prototype.hasOwnProperty,rN=/^[: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]*$/,bx={},Sx={};function iN(t){return xy.call(Sx,t)?!0:xy.call(bx,t)?!1:rN.test(t)?Sx[t]=!0:(bx[t]=!0,!1)}function sN(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function oN(t,e,n,r){if(e===null||typeof e>"u"||sN(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function yr(t,e,n,r,i,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kn[t]=new yr(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kn[e]=new yr(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kn[t]=new yr(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kn[t]=new yr(t,2,!1,t,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(t){kn[t]=new yr(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kn[t]=new yr(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kn[t]=new yr(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kn[t]=new yr(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kn[t]=new yr(t,5,!1,t.toLowerCase(),null,!1,!1)});var Xv=/[\-:]([a-z])/g;function Jv(t){return t[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(t){var e=t.replace(Xv,Jv);kn[e]=new yr(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Xv,Jv);kn[e]=new yr(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Xv,Jv);kn[e]=new yr(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kn[t]=new yr(t,1,!1,t.toLowerCase(),null,!1,!1)});kn.xlinkHref=new yr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kn[t]=new yr(t,1,!1,t.toLowerCase(),null,!0,!0)});function Zv(t,e,n,r){var i=kn.hasOwnProperty(e)?kn[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(oN(e,n,i,r)&&(n=null),r||i===null?iN(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var Ls=nN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Tf=Symbol.for("react.element"),al=Symbol.for("react.portal"),ll=Symbol.for("react.fragment"),e_=Symbol.for("react.strict_mode"),Ty=Symbol.for("react.profiler"),jC=Symbol.for("react.provider"),$C=Symbol.for("react.context"),t_=Symbol.for("react.forward_ref"),Ey=Symbol.for("react.suspense"),by=Symbol.for("react.suspense_list"),n_=Symbol.for("react.memo"),Gs=Symbol.for("react.lazy"),zC=Symbol.for("react.offscreen"),Cx=Symbol.iterator;function ju(t){return t===null||typeof t!="object"?null:(t=Cx&&t[Cx]||t["@@iterator"],typeof t=="function"?t:null)}var Mt=Object.assign,ng;function ac(t){if(ng===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ng=e&&e[1]||""}return` `+ng+t}var rg=!1;function ig(t,e){if(!t||rg)return"";rg=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(` `),s=r.stack.split(` `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=` `+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{rg=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ac(t):""}function aN(t){switch(t.tag){case 5:return ac(t.type);case 16:return ac("Lazy");case 13:return ac("Suspense");case 19:return ac("SuspenseList");case 0:case 2:case 15:return t=ig(t.type,!1),t;case 11:return t=ig(t.type.render,!1),t;case 1:return t=ig(t.type,!0),t;default:return""}}function Sy(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ll:return"Fragment";case al:return"Portal";case Ty:return"Profiler";case e_:return"StrictMode";case Ey:return"Suspense";case by:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case $C:return(t.displayName||"Context")+".Consumer";case jC:return(t._context.displayName||"Context")+".Provider";case t_:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case n_:return e=t.displayName||null,e!==null?e:Sy(t.type)||"Memo";case Gs:e=t._payload,t=t._init;try{return Sy(t(e))}catch{}}return null}function lN(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sy(e);case 8:return e===e_?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function To(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function BC(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function uN(t){var e=BC(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ef(t){t._valueTracker||(t._valueTracker=uN(t))}function UC(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=BC(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Xd(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Cy(t,e){var n=e.checked;return Mt({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function Px(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=To(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function HC(t,e){e=e.checked,e!=null&&Zv(t,"checked",e,!1)}function Py(t,e){HC(t,e);var n=To(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Ay(t,e.type,n):e.hasOwnProperty("defaultValue")&&Ay(t,e.type,To(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Ax(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Ay(t,e,n){(e!=="number"||Xd(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var lc=Array.isArray;function Rl(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+To(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ry(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(oe(91));return Mt({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Rx(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(oe(92));if(lc(n)){if(1<n.length)throw Error(oe(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:To(n)}}function WC(t,e){var n=To(e.value),r=To(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function Ix(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function qC(t){switch(t){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 Iy(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?qC(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var bf,KC=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(bf=bf||document.createElement("div"),bf.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=bf.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function rh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var bc={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},cN=["Webkit","ms","Moz","O"];Object.keys(bc).forEach(function(t){cN.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bc[e]=bc[t]})});function GC(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||bc.hasOwnProperty(t)&&bc[t]?(""+e).trim():e+"px"}function YC(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=GC(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var hN=Mt({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 ky(t,e){if(e){if(hN[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(oe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(oe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(oe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(oe(62))}}function Dy(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 My=null;function r_(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ny=null,Il=null,kl=null;function kx(t){if(t=Qh(t)){if(typeof Ny!="function")throw Error(oe(280));var e=t.stateNode;e&&(e=am(e),Ny(t.stateNode,t.type,e))}}function QC(t){Il?kl?kl.push(t):kl=[t]:Il=t}function XC(){if(Il){var t=Il,e=kl;if(kl=Il=null,kx(t),e)for(t=0;t<e.length;t++)kx(e[t])}}function JC(t,e){return t(e)}function ZC(){}var sg=!1;function eP(t,e,n){if(sg)return t(e,n);sg=!0;try{return JC(t,e,n)}finally{sg=!1,(Il!==null||kl!==null)&&(ZC(),XC())}}function ih(t,e){var n=t.stateNode;if(n===null)return null;var r=am(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(oe(231,e,typeof n));return n}var Vy=!1;if(Cs)try{var $u={};Object.defineProperty($u,"passive",{get:function(){Vy=!0}}),window.addEventListener("test",$u,$u),window.removeEventListener("test",$u,$u)}catch{Vy=!1}function fN(t,e,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(h){this.onError(h)}}var Sc=!1,Jd=null,Zd=!1,Ly=null,dN={onError:function(t){Sc=!0,Jd=t}};function pN(t,e,n,r,i,s,o,a,l){Sc=!1,Jd=null,fN.apply(dN,arguments)}function mN(t,e,n,r,i,s,o,a,l){if(pN.apply(this,arguments),Sc){if(Sc){var u=Jd;Sc=!1,Jd=null}else throw Error(oe(198));Zd||(Zd=!0,Ly=u)}}function Fa(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function tP(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Dx(t){if(Fa(t)!==t)throw Error(oe(188))}function gN(t){var e=t.alternate;if(!e){if(e=Fa(t),e===null)throw Error(oe(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Dx(i),t;if(s===r)return Dx(i),e;s=s.sibling}throw Error(oe(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(oe(189))}}if(n.alternate!==r)throw Error(oe(190))}if(n.tag!==3)throw Error(oe(188));return n.stateNode.current===n?t:e}function nP(t){return t=gN(t),t!==null?rP(t):null}function rP(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=rP(t);if(e!==null)return e;t=t.sibling}return null}var iP=ti.unstable_scheduleCallback,Mx=ti.unstable_cancelCallback,yN=ti.unstable_shouldYield,vN=ti.unstable_requestPaint,Ut=ti.unstable_now,_N=ti.unstable_getCurrentPriorityLevel,i_=ti.unstable_ImmediatePriority,sP=ti.unstable_UserBlockingPriority,ep=ti.unstable_NormalPriority,wN=ti.unstable_LowPriority,oP=ti.unstable_IdlePriority,rm=null,ns=null;function xN(t){if(ns&&typeof ns.onCommitFiberRoot=="function")try{ns.onCommitFiberRoot(rm,t,void 0,(t.current.flags&128)===128)}catch{}}var Vi=Math.clz32?Math.clz32:bN,TN=Math.log,EN=Math.LN2;function bN(t){return t>>>=0,t===0?32:31-(TN(t)/EN|0)|0}var Sf=64,Cf=4194304;function uc(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function tp(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=uc(a):(s&=o,s!==0&&(r=uc(s)))}else o=n&~i,o!==0?r=uc(o):s!==0&&(r=uc(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-Vi(e),i=1<<n,r|=t[n],e&=~i;return r}function SN(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 CN(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-Vi(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=SN(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function Oy(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function aP(){var t=Sf;return Sf<<=1,!(Sf&4194240)&&(Sf=64),t}function og(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Gh(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Vi(e),t[e]=n}function PN(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Vi(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function s_(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Vi(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ot=0;function lP(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var uP,o_,cP,hP,fP,Fy=!1,Pf=[],lo=null,uo=null,co=null,sh=new Map,oh=new Map,Qs=[],AN="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 Nx(t,e){switch(t){case"focusin":case"focusout":lo=null;break;case"dragenter":case"dragleave":uo=null;break;case"mouseover":case"mouseout":co=null;break;case"pointerover":case"pointerout":sh.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":oh.delete(e.pointerId)}}function zu(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Qh(e),e!==null&&o_(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function RN(t,e,n,r,i){switch(e){case"focusin":return lo=zu(lo,t,e,n,r,i),!0;case"dragenter":return uo=zu(uo,t,e,n,r,i),!0;case"mouseover":return co=zu(co,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return sh.set(s,zu(sh.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,oh.set(s,zu(oh.get(s)||null,t,e,n,r,i)),!0}return!1}function dP(t){var e=ta(t.target);if(e!==null){var n=Fa(e);if(n!==null){if(e=n.tag,e===13){if(e=tP(n),e!==null){t.blockedOn=e,fP(t.priority,function(){cP(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function _d(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=jy(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);My=r,n.target.dispatchEvent(r),My=null}else return e=Qh(n),e!==null&&o_(e),t.blockedOn=n,!1;e.shift()}return!0}function Vx(t,e,n){_d(t)&&n.delete(e)}function IN(){Fy=!1,lo!==null&&_d(lo)&&(lo=null),uo!==null&&_d(uo)&&(uo=null),co!==null&&_d(co)&&(co=null),sh.forEach(Vx),oh.forEach(Vx)}function Bu(t,e){t.blockedOn===e&&(t.blockedOn=null,Fy||(Fy=!0,ti.unstable_scheduleCallback(ti.unstable_NormalPriority,IN)))}function ah(t){function e(i){return Bu(i,t)}if(0<Pf.length){Bu(Pf[0],t);for(var n=1;n<Pf.length;n++){var r=Pf[n];r.blockedOn===t&&(r.blockedOn=null)}}for(lo!==null&&Bu(lo,t),uo!==null&&Bu(uo,t),co!==null&&Bu(co,t),sh.forEach(e),oh.forEach(e),n=0;n<Qs.length;n++)r=Qs[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Qs.length&&(n=Qs[0],n.blockedOn===null);)dP(n),n.blockedOn===null&&Qs.shift()}var Dl=Ls.ReactCurrentBatchConfig,np=!0;function kN(t,e,n,r){var i=ot,s=Dl.transition;Dl.transition=null;try{ot=1,a_(t,e,n,r)}finally{ot=i,Dl.transition=s}}function DN(t,e,n,r){var i=ot,s=Dl.transition;Dl.transition=null;try{ot=4,a_(t,e,n,r)}finally{ot=i,Dl.transition=s}}function a_(t,e,n,r){if(np){var i=jy(t,e,n,r);if(i===null)gg(t,e,r,rp,n),Nx(t,r);else if(RN(i,t,e,n,r))r.stopPropagation();else if(Nx(t,r),e&4&&-1<AN.indexOf(t)){for(;i!==null;){var s=Qh(i);if(s!==null&&uP(s),s=jy(t,e,n,r),s===null&&gg(t,e,r,rp,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else gg(t,e,r,null,n)}}var rp=null;function jy(t,e,n,r){if(rp=null,t=r_(r),t=ta(t),t!==null)if(e=Fa(t),e===null)t=null;else if(n=e.tag,n===13){if(t=tP(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return rp=t,null}function pP(t){switch(t){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(_N()){case i_:return 1;case sP:return 4;case ep:case wN:return 16;case oP:return 536870912;default:return 16}default:return 16}}var Zs=null,l_=null,wd=null;function mP(){if(wd)return wd;var t,e=l_,n=e.length,r,i="value"in Zs?Zs.value:Zs.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var o=n-t;for(r=1;r<=o&&e[n-r]===i[s-r];r++);return wd=i.slice(t,1<r?1-r:void 0)}function xd(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Af(){return!0}function Lx(){return!1}function si(t){function e(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Af:Lx,this.isPropagationStopped=Lx,this}return Mt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Af)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Af)},persist:function(){},isPersistent:Af}),e}var vu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},u_=si(vu),Yh=Mt({},vu,{view:0,detail:0}),MN=si(Yh),ag,lg,Uu,im=Mt({},Yh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:c_,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Uu&&(Uu&&t.type==="mousemove"?(ag=t.screenX-Uu.screenX,lg=t.screenY-Uu.screenY):lg=ag=0,Uu=t),ag)},movementY:function(t){return"movementY"in t?t.movementY:lg}}),Ox=si(im),NN=Mt({},im,{dataTransfer:0}),VN=si(NN),LN=Mt({},Yh,{relatedTarget:0}),ug=si(LN),ON=Mt({},vu,{animationName:0,elapsedTime:0,pseudoElement:0}),FN=si(ON),jN=Mt({},vu,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),$N=si(jN),zN=Mt({},vu,{data:0}),Fx=si(zN),BN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},UN={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"},HN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function WN(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=HN[t])?!!e[t]:!1}function c_(){return WN}var qN=Mt({},Yh,{key:function(t){if(t.key){var e=BN[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=xd(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?UN[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:c_,charCode:function(t){return t.type==="keypress"?xd(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?xd(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),KN=si(qN),GN=Mt({},im,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jx=si(GN),YN=Mt({},Yh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:c_}),QN=si(YN),XN=Mt({},vu,{propertyName:0,elapsedTime:0,pseudoElement:0}),JN=si(XN),ZN=Mt({},im,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),eV=si(ZN),tV=[9,13,27,32],h_=Cs&&"CompositionEvent"in window,Cc=null;Cs&&"documentMode"in document&&(Cc=document.documentMode);var nV=Cs&&"TextEvent"in window&&!Cc,gP=Cs&&(!h_||Cc&&8<Cc&&11>=Cc),$x=" ",zx=!1;function yP(t,e){switch(t){case"keyup":return tV.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vP(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ul=!1;function rV(t,e){switch(t){case"compositionend":return vP(e);case"keypress":return e.which!==32?null:(zx=!0,$x);case"textInput":return t=e.data,t===$x&&zx?null:t;default:return null}}function iV(t,e){if(ul)return t==="compositionend"||!h_&&yP(t,e)?(t=mP(),wd=l_=Zs=null,ul=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return gP&&e.locale!=="ko"?null:e.data;default:return null}}var sV={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 Bx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!sV[t.type]:e==="textarea"}function _P(t,e,n,r){QC(r),e=ip(e,"onChange"),0<e.length&&(n=new u_("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Pc=null,lh=null;function oV(t){IP(t,0)}function sm(t){var e=fl(t);if(UC(e))return t}function aV(t,e){if(t==="change")return e}var wP=!1;if(Cs){var cg;if(Cs){var hg="oninput"in document;if(!hg){var Ux=document.createElement("div");Ux.setAttribute("oninput","return;"),hg=typeof Ux.oninput=="function"}cg=hg}else cg=!1;wP=cg&&(!document.documentMode||9<document.documentMode)}function Hx(){Pc&&(Pc.detachEvent("onpropertychange",xP),lh=Pc=null)}function xP(t){if(t.propertyName==="value"&&sm(lh)){var e=[];_P(e,lh,t,r_(t)),eP(oV,e)}}function lV(t,e,n){t==="focusin"?(Hx(),Pc=e,lh=n,Pc.attachEvent("onpropertychange",xP)):t==="focusout"&&Hx()}function uV(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return sm(lh)}function cV(t,e){if(t==="click")return sm(e)}function hV(t,e){if(t==="input"||t==="change")return sm(e)}function fV(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Oi=typeof Object.is=="function"?Object.is:fV;function uh(t,e){if(Oi(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xy.call(e,i)||!Oi(t[i],e[i]))return!1}return!0}function Wx(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qx(t,e){var n=Wx(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wx(n)}}function TP(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?TP(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function EP(){for(var t=window,e=Xd();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Xd(t.document)}return e}function f_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function dV(t){var e=EP(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&TP(n.ownerDocument.documentElement,n)){if(r!==null&&f_(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=qx(n,s);var o=qx(n,r);i&&o&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var pV=Cs&&"documentMode"in document&&11>=document.documentMode,cl=null,$y=null,Ac=null,zy=!1;function Kx(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zy||cl==null||cl!==Xd(r)||(r=cl,"selectionStart"in r&&f_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ac&&uh(Ac,r)||(Ac=r,r=ip($y,"onSelect"),0<r.length&&(e=new u_("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=cl)))}function Rf(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var hl={animationend:Rf("Animation","AnimationEnd"),animationiteration:Rf("Animation","AnimationIteration"),animationstart:Rf("Animation","AnimationStart"),transitionend:Rf("Transition","TransitionEnd")},fg={},bP={};Cs&&(bP=document.createElement("div").style,"AnimationEvent"in window||(delete hl.animationend.animation,delete hl.animationiteration.animation,delete hl.animationstart.animation),"TransitionEvent"in window||delete hl.transitionend.transition);function om(t){if(fg[t])return fg[t];if(!hl[t])return t;var e=hl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in bP)return fg[t]=e[n];return t}var SP=om("animationend"),CP=om("animationiteration"),PP=om("animationstart"),AP=om("transitionend"),RP=new Map,Gx="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 Vo(t,e){RP.set(t,e),Oa(e,[t])}for(var dg=0;dg<Gx.length;dg++){var pg=Gx[dg],mV=pg.toLowerCase(),gV=pg[0].toUpperCase()+pg.slice(1);Vo(mV,"on"+gV)}Vo(SP,"onAnimationEnd");Vo(CP,"onAnimationIteration");Vo(PP,"onAnimationStart");Vo("dblclick","onDoubleClick");Vo("focusin","onFocus");Vo("focusout","onBlur");Vo(AP,"onTransitionEnd");ql("onMouseEnter",["mouseout","mouseover"]);ql("onMouseLeave",["mouseout","mouseover"]);ql("onPointerEnter",["pointerout","pointerover"]);ql("onPointerLeave",["pointerout","pointerover"]);Oa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Oa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Oa("onBeforeInput",["compositionend","keypress","textInput","paste"]);Oa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Oa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Oa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cc="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(" "),yV=new Set("cancel close invalid load scroll toggle".split(" ").concat(cc));function Yx(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,mN(r,e,void 0,t),t.currentTarget=null}function IP(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;Yx(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;Yx(i,a,u),s=l}}}if(Zd)throw t=Ly,Zd=!1,Ly=null,t}function vt(t,e){var n=e[qy];n===void 0&&(n=e[qy]=new Set);var r=t+"__bubble";n.has(r)||(kP(e,t,2,!1),n.add(r))}function mg(t,e,n){var r=0;e&&(r|=4),kP(n,t,r,e)}var If="_reactListening"+Math.random().toString(36).slice(2);function ch(t){if(!t[If]){t[If]=!0,FC.forEach(function(n){n!=="selectionchange"&&(yV.has(n)||mg(n,!1,t),mg(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[If]||(e[If]=!0,mg("selectionchange",!1,e))}}function kP(t,e,n,r){switch(pP(e)){case 1:var i=kN;break;case 4:i=DN;break;default:i=a_}n=i.bind(null,e,n,t),i=void 0,!Vy||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function gg(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=ta(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}eP(function(){var u=s,h=r_(n),f=[];e:{var d=RP.get(t);if(d!==void 0){var p=u_,v=t;switch(t){case"keypress":if(xd(n)===0)break e;case"keydown":case"keyup":p=KN;break;case"focusin":v="focus",p=ug;break;case"focusout":v="blur",p=ug;break;case"beforeblur":case"afterblur":p=ug;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Ox;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=VN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=QN;break;case SP:case CP:case PP:p=FN;break;case AP:p=JN;break;case"scroll":p=MN;break;case"wheel":p=eV;break;case"copy":case"cut":case"paste":p=$N;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=jx}var y=(e&4)!==0,C=!y&&t==="scroll",_=y?d!==null?d+"Capture":null:d;y=[];for(var w=u,T;w!==null;){T=w;var k=T.stateNode;if(T.tag===5&&k!==null&&(T=k,_!==null&&(k=ih(w,_),k!=null&&y.push(hh(w,k,T)))),C)break;w=w.return}0<y.length&&(d=new p(d,v,null,n,h),f.push({event:d,listeners:y}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",p=t==="mouseout"||t==="pointerout",d&&n!==My&&(v=n.relatedTarget||n.fromElement)&&(ta(v)||v[Ps]))break e;if((p||d)&&(d=h.window===h?h:(d=h.ownerDocument)?d.defaultView||d.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?ta(v):null,v!==null&&(C=Fa(v),v!==C||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=u),p!==v)){if(y=Ox,k="onMouseLeave",_="onMouseEnter",w="mouse",(t==="pointerout"||t==="pointerover")&&(y=jx,k="onPointerLeave",_="onPointerEnter",w="pointer"),C=p==null?d:fl(p),T=v==null?d:fl(v),d=new y(k,w+"leave",p,n,h),d.target=C,d.relatedTarget=T,k=null,ta(h)===u&&(y=new y(_,w+"enter",v,n,h),y.target=T,y.relatedTarget=C,k=y),C=k,p&&v)t:{for(y=p,_=v,w=0,T=y;T;T=Ka(T))w++;for(T=0,k=_;k;k=Ka(k))T++;for(;0<w-T;)y=Ka(y),w--;for(;0<T-w;)_=Ka(_),T--;for(;w--;){if(y===_||_!==null&&y===_.alternate)break t;y=Ka(y),_=Ka(_)}y=null}else y=null;p!==null&&Qx(f,d,p,y,!1),v!==null&&C!==null&&Qx(f,C,v,y,!0)}}e:{if(d=u?fl(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var P=aV;else if(Bx(d))if(wP)P=hV;else{P=uV;var V=lV}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(P=cV);if(P&&(P=P(t,u))){_P(f,P,n,h);break e}V&&V(t,d,u),t==="focusout"&&(V=d._wrapperState)&&V.controlled&&d.type==="number"&&Ay(d,"number",d.value)}switch(V=u?fl(u):window,t){case"focusin":(Bx(V)||V.contentEditable==="true")&&(cl=V,$y=u,Ac=null);break;case"focusout":Ac=$y=cl=null;break;case"mousedown":zy=!0;break;case"contextmenu":case"mouseup":case"dragend":zy=!1,Kx(f,n,h);break;case"selectionchange":if(pV)break;case"keydown":case"keyup":Kx(f,n,h)}var S;if(h_)e:{switch(t){case"compositionstart":var m="onCompositionStart";break e;case"compositionend":m="onCompositionEnd";break e;case"compositionupdate":m="onCompositionUpdate";break e}m=void 0}else ul?yP(t,n)&&(m="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(m="onCompositionStart");m&&(gP&&n.locale!=="ko"&&(ul||m!=="onCompositionStart"?m==="onCompositionEnd"&&ul&&(S=mP()):(Zs=h,l_="value"in Zs?Zs.value:Zs.textContent,ul=!0)),V=ip(u,m),0<V.length&&(m=new Fx(m,t,null,n,h),f.push({event:m,listeners:V}),S?m.data=S:(S=vP(n),S!==null&&(m.data=S)))),(S=nV?rV(t,n):iV(t,n))&&(u=ip(u,"onBeforeInput"),0<u.length&&(h=new Fx("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:u}),h.data=S))}IP(f,e)})}function hh(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ip(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=ih(t,n),s!=null&&r.unshift(hh(t,s,i)),s=ih(t,e),s!=null&&r.push(hh(t,s,i))),t=t.return}return r}function Ka(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Qx(t,e,n,r,i){for(var s=e._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=ih(n,s),l!=null&&o.unshift(hh(n,l,a))):i||(l=ih(n,s),l!=null&&o.push(hh(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var vV=/\r\n?/g,_V=/\u0000|\uFFFD/g;function Xx(t){return(typeof t=="string"?t:""+t).replace(vV,` `).replace(_V,"")}function kf(t,e,n){if(e=Xx(e),Xx(t)!==e&&n)throw Error(oe(425))}function sp(){}var By=null,Uy=null;function Hy(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Wy=typeof setTimeout=="function"?setTimeout:void 0,wV=typeof clearTimeout=="function"?clearTimeout:void 0,Jx=typeof Promise=="function"?Promise:void 0,xV=typeof queueMicrotask=="function"?queueMicrotask:typeof Jx<"u"?function(t){return Jx.resolve(null).then(t).catch(TV)}:Wy;function TV(t){setTimeout(function(){throw t})}function yg(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),ah(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ah(e)}function ho(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Zx(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var _u=Math.random().toString(36).slice(2),Yi="__reactFiber$"+_u,fh="__reactProps$"+_u,Ps="__reactContainer$"+_u,qy="__reactEvents$"+_u,EV="__reactListeners$"+_u,bV="__reactHandles$"+_u;function ta(t){var e=t[Yi];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ps]||n[Yi]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Zx(t);t!==null;){if(n=t[Yi])return n;t=Zx(t)}return e}t=n,n=t.parentNode}return null}function Qh(t){return t=t[Yi]||t[Ps],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function fl(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(oe(33))}function am(t){return t[fh]||null}var Ky=[],dl=-1;function Lo(t){return{current:t}}function _t(t){0>dl||(t.current=Ky[dl],Ky[dl]=null,dl--)}function mt(t,e){dl++,Ky[dl]=t.current,t.current=e}var Eo={},Xn=Lo(Eo),Pr=Lo(!1),Sa=Eo;function Kl(t,e){var n=t.type.contextTypes;if(!n)return Eo;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Ar(t){return t=t.childContextTypes,t!=null}function op(){_t(Pr),_t(Xn)}function eT(t,e,n){if(Xn.current!==Eo)throw Error(oe(168));mt(Xn,e),mt(Pr,n)}function DP(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(oe(108,lN(t)||"Unknown",i));return Mt({},n,r)}function ap(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Eo,Sa=Xn.current,mt(Xn,t),mt(Pr,Pr.current),!0}function tT(t,e,n){var r=t.stateNode;if(!r)throw Error(oe(169));n?(t=DP(t,e,Sa),r.__reactInternalMemoizedMergedChildContext=t,_t(Pr),_t(Xn),mt(Xn,t)):_t(Pr),mt(Pr,n)}var vs=null,lm=!1,vg=!1;function MP(t){vs===null?vs=[t]:vs.push(t)}function SV(t){lm=!0,MP(t)}function Oo(){if(!vg&&vs!==null){vg=!0;var t=0,e=ot;try{var n=vs;for(ot=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}vs=null,lm=!1}catch(i){throw vs!==null&&(vs=vs.slice(t+1)),iP(i_,Oo),i}finally{ot=e,vg=!1}}return null}var pl=[],ml=0,lp=null,up=0,ci=[],hi=0,Ca=null,xs=1,Ts="";function Ko(t,e){pl[ml++]=up,pl[ml++]=lp,lp=t,up=e}function NP(t,e,n){ci[hi++]=xs,ci[hi++]=Ts,ci[hi++]=Ca,Ca=t;var r=xs;t=Ts;var i=32-Vi(r)-1;r&=~(1<<i),n+=1;var s=32-Vi(e)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xs=1<<32-Vi(e)+i|n<<i|r,Ts=s+t}else xs=1<<s|n<<i|r,Ts=t}function d_(t){t.return!==null&&(Ko(t,1),NP(t,1,0))}function p_(t){for(;t===lp;)lp=pl[--ml],pl[ml]=null,up=pl[--ml],pl[ml]=null;for(;t===Ca;)Ca=ci[--hi],ci[hi]=null,Ts=ci[--hi],ci[hi]=null,xs=ci[--hi],ci[hi]=null}var Zr=null,Xr=null,wt=!1,Ni=null;function VP(t,e){var n=gi(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function nT(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Zr=t,Xr=ho(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Zr=t,Xr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Ca!==null?{id:xs,overflow:Ts}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=gi(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Zr=t,Xr=null,!0):!1;default:return!1}}function Gy(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Yy(t){if(wt){var e=Xr;if(e){var n=e;if(!nT(t,e)){if(Gy(t))throw Error(oe(418));e=ho(n.nextSibling);var r=Zr;e&&nT(t,e)?VP(r,n):(t.flags=t.flags&-4097|2,wt=!1,Zr=t)}}else{if(Gy(t))throw Error(oe(418));t.flags=t.flags&-4097|2,wt=!1,Zr=t}}}function rT(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Zr=t}function Df(t){if(t!==Zr)return!1;if(!wt)return rT(t),wt=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Hy(t.type,t.memoizedProps)),e&&(e=Xr)){if(Gy(t))throw LP(),Error(oe(418));for(;e;)VP(t,e),e=ho(e.nextSibling)}if(rT(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(oe(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Xr=ho(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Xr=null}}else Xr=Zr?ho(t.stateNode.nextSibling):null;return!0}function LP(){for(var t=Xr;t;)t=ho(t.nextSibling)}function Gl(){Xr=Zr=null,wt=!1}function m_(t){Ni===null?Ni=[t]:Ni.push(t)}var CV=Ls.ReactCurrentBatchConfig;function Hu(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(oe(309));var r=n.stateNode}if(!r)throw Error(oe(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(oe(284));if(!n._owner)throw Error(oe(290,t))}return t}function Mf(t,e){throw t=Object.prototype.toString.call(e),Error(oe(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function iT(t){var e=t._init;return e(t._payload)}function OP(t){function e(_,w){if(t){var T=_.deletions;T===null?(_.deletions=[w],_.flags|=16):T.push(w)}}function n(_,w){if(!t)return null;for(;w!==null;)e(_,w),w=w.sibling;return null}function r(_,w){for(_=new Map;w!==null;)w.key!==null?_.set(w.key,w):_.set(w.index,w),w=w.sibling;return _}function i(_,w){return _=go(_,w),_.index=0,_.sibling=null,_}function s(_,w,T){return _.index=T,t?(T=_.alternate,T!==null?(T=T.index,T<w?(_.flags|=2,w):T):(_.flags|=2,w)):(_.flags|=1048576,w)}function o(_){return t&&_.alternate===null&&(_.flags|=2),_}function a(_,w,T,k){return w===null||w.tag!==6?(w=Sg(T,_.mode,k),w.return=_,w):(w=i(w,T),w.return=_,w)}function l(_,w,T,k){var P=T.type;return P===ll?h(_,w,T.props.children,k,T.key):w!==null&&(w.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Gs&&iT(P)===w.type)?(k=i(w,T.props),k.ref=Hu(_,w,T),k.return=_,k):(k=Ad(T.type,T.key,T.props,null,_.mode,k),k.ref=Hu(_,w,T),k.return=_,k)}function u(_,w,T,k){return w===null||w.tag!==4||w.stateNode.containerInfo!==T.containerInfo||w.stateNode.implementation!==T.implementation?(w=Cg(T,_.mode,k),w.return=_,w):(w=i(w,T.children||[]),w.return=_,w)}function h(_,w,T,k,P){return w===null||w.tag!==7?(w=fa(T,_.mode,k,P),w.return=_,w):(w=i(w,T),w.return=_,w)}function f(_,w,T){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Sg(""+w,_.mode,T),w.return=_,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Tf:return T=Ad(w.type,w.key,w.props,null,_.mode,T),T.ref=Hu(_,null,w),T.return=_,T;case al:return w=Cg(w,_.mode,T),w.return=_,w;case Gs:var k=w._init;return f(_,k(w._payload),T)}if(lc(w)||ju(w))return w=fa(w,_.mode,T,null),w.return=_,w;Mf(_,w)}return null}function d(_,w,T,k){var P=w!==null?w.key:null;if(typeof T=="string"&&T!==""||typeof T=="number")return P!==null?null:a(_,w,""+T,k);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Tf:return T.key===P?l(_,w,T,k):null;case al:return T.key===P?u(_,w,T,k):null;case Gs:return P=T._init,d(_,w,P(T._payload),k)}if(lc(T)||ju(T))return P!==null?null:h(_,w,T,k,null);Mf(_,T)}return null}function p(_,w,T,k,P){if(typeof k=="string"&&k!==""||typeof k=="number")return _=_.get(T)||null,a(w,_,""+k,P);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Tf:return _=_.get(k.key===null?T:k.key)||null,l(w,_,k,P);case al:return _=_.get(k.key===null?T:k.key)||null,u(w,_,k,P);case Gs:var V=k._init;return p(_,w,T,V(k._payload),P)}if(lc(k)||ju(k))return _=_.get(T)||null,h(w,_,k,P,null);Mf(w,k)}return null}function v(_,w,T,k){for(var P=null,V=null,S=w,m=w=0,E=null;S!==null&&m<T.length;m++){S.index>m?(E=S,S=null):E=S.sibling;var A=d(_,S,T[m],k);if(A===null){S===null&&(S=E);break}t&&S&&A.alternate===null&&e(_,S),w=s(A,w,m),V===null?P=A:V.sibling=A,V=A,S=E}if(m===T.length)return n(_,S),wt&&Ko(_,m),P;if(S===null){for(;m<T.length;m++)S=f(_,T[m],k),S!==null&&(w=s(S,w,m),V===null?P=S:V.sibling=S,V=S);return wt&&Ko(_,m),P}for(S=r(_,S);m<T.length;m++)E=p(S,_,m,T[m],k),E!==null&&(t&&E.alternate!==null&&S.delete(E.key===null?m:E.key),w=s(E,w,m),V===null?P=E:V.sibling=E,V=E);return t&&S.forEach(function(D){return e(_,D)}),wt&&Ko(_,m),P}function y(_,w,T,k){var P=ju(T);if(typeof P!="function")throw Error(oe(150));if(T=P.call(T),T==null)throw Error(oe(151));for(var V=P=null,S=w,m=w=0,E=null,A=T.next();S!==null&&!A.done;m++,A=T.next()){S.index>m?(E=S,S=null):E=S.sibling;var D=d(_,S,A.value,k);if(D===null){S===null&&(S=E);break}t&&S&&D.alternate===null&&e(_,S),w=s(D,w,m),V===null?P=D:V.sibling=D,V=D,S=E}if(A.done)return n(_,S),wt&&Ko(_,m),P;if(S===null){for(;!A.done;m++,A=T.next())A=f(_,A.value,k),A!==null&&(w=s(A,w,m),V===null?P=A:V.sibling=A,V=A);return wt&&Ko(_,m),P}for(S=r(_,S);!A.done;m++,A=T.next())A=p(S,_,m,A.value,k),A!==null&&(t&&A.alternate!==null&&S.delete(A.key===null?m:A.key),w=s(A,w,m),V===null?P=A:V.sibling=A,V=A);return t&&S.forEach(function(R){return e(_,R)}),wt&&Ko(_,m),P}function C(_,w,T,k){if(typeof T=="object"&&T!==null&&T.type===ll&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Tf:e:{for(var P=T.key,V=w;V!==null;){if(V.key===P){if(P=T.type,P===ll){if(V.tag===7){n(_,V.sibling),w=i(V,T.props.children),w.return=_,_=w;break e}}else if(V.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Gs&&iT(P)===V.type){n(_,V.sibling),w=i(V,T.props),w.ref=Hu(_,V,T),w.return=_,_=w;break e}n(_,V);break}else e(_,V);V=V.sibling}T.type===ll?(w=fa(T.props.children,_.mode,k,T.key),w.return=_,_=w):(k=Ad(T.type,T.key,T.props,null,_.mode,k),k.ref=Hu(_,w,T),k.return=_,_=k)}return o(_);case al:e:{for(V=T.key;w!==null;){if(w.key===V)if(w.tag===4&&w.stateNode.containerInfo===T.containerInfo&&w.stateNode.implementation===T.implementation){n(_,w.sibling),w=i(w,T.children||[]),w.return=_,_=w;break e}else{n(_,w);break}else e(_,w);w=w.sibling}w=Cg(T,_.mode,k),w.return=_,_=w}return o(_);case Gs:return V=T._init,C(_,w,V(T._payload),k)}if(lc(T))return v(_,w,T,k);if(ju(T))return y(_,w,T,k);Mf(_,T)}return typeof T=="string"&&T!==""||typeof T=="number"?(T=""+T,w!==null&&w.tag===6?(n(_,w.sibling),w=i(w,T),w.return=_,_=w):(n(_,w),w=Sg(T,_.mode,k),w.return=_,_=w),o(_)):n(_,w)}return C}var Yl=OP(!0),FP=OP(!1),cp=Lo(null),hp=null,gl=null,g_=null;function y_(){g_=gl=hp=null}function v_(t){var e=cp.current;_t(cp),t._currentValue=e}function Qy(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Ml(t,e){hp=t,g_=gl=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Sr=!0),t.firstContext=null)}function Ei(t){var e=t._currentValue;if(g_!==t)if(t={context:t,memoizedValue:e,next:null},gl===null){if(hp===null)throw Error(oe(308));gl=t,hp.dependencies={lanes:0,firstContext:t}}else gl=gl.next=t;return e}var na=null;function __(t){na===null?na=[t]:na.push(t)}function jP(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,__(e)):(n.next=i.next,i.next=n),e.interleaved=n,As(t,r)}function As(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ys=!1;function w_(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $P(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function bs(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function fo(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Je&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,As(t,n)}return i=r.interleaved,i===null?(e.next=e,__(r)):(e.next=i.next,i.next=e),r.interleaved=e,As(t,n)}function Td(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,s_(t,n)}}function sT(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function fp(t,e,n,r){var i=t.updateQueue;Ys=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var h=t.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=u:a.next=u,h.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;o=0,h=u=l=null,a=s;do{var d=a.lane,p=a.eventTime;if((r&d)===d){h!==null&&(h=h.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,y=a;switch(d=e,p=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(p,f,d);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,d=typeof v=="function"?v.call(p,f,d):v,d==null)break e;f=Mt({},f,d);break e;case 2:Ys=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else p={eventTime:p,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(u=h=p,l=f):h=h.next=p,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(h===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=h,e=i.shared.interleaved,e!==null){i=e;do o|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);Aa|=o,t.lanes=o,t.memoizedState=f}}function oT(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(oe(191,i));i.call(r)}}}var Xh={},rs=Lo(Xh),dh=Lo(Xh),ph=Lo(Xh);function ra(t){if(t===Xh)throw Error(oe(174));return t}function x_(t,e){switch(mt(ph,e),mt(dh,t),mt(rs,Xh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Iy(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Iy(e,t)}_t(rs),mt(rs,e)}function Ql(){_t(rs),_t(dh),_t(ph)}function zP(t){ra(ph.current);var e=ra(rs.current),n=Iy(e,t.type);e!==n&&(mt(dh,t),mt(rs,n))}function T_(t){dh.current===t&&(_t(rs),_t(dh))}var Ct=Lo(0);function dp(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var _g=[];function E_(){for(var t=0;t<_g.length;t++)_g[t]._workInProgressVersionPrimary=null;_g.length=0}var Ed=Ls.ReactCurrentDispatcher,wg=Ls.ReactCurrentBatchConfig,Pa=0,It=null,ln=null,yn=null,pp=!1,Rc=!1,mh=0,PV=0;function On(){throw Error(oe(321))}function b_(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Oi(t[n],e[n]))return!1;return!0}function S_(t,e,n,r,i,s){if(Pa=s,It=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Ed.current=t===null||t.memoizedState===null?kV:DV,t=n(r,i),Rc){s=0;do{if(Rc=!1,mh=0,25<=s)throw Error(oe(301));s+=1,yn=ln=null,e.updateQueue=null,Ed.current=MV,t=n(r,i)}while(Rc)}if(Ed.current=mp,e=ln!==null&&ln.next!==null,Pa=0,yn=ln=It=null,pp=!1,e)throw Error(oe(300));return t}function C_(){var t=mh!==0;return mh=0,t}function qi(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yn===null?It.memoizedState=yn=t:yn=yn.next=t,yn}function bi(){if(ln===null){var t=It.alternate;t=t!==null?t.memoizedState:null}else t=ln.next;var e=yn===null?It.memoizedState:yn.next;if(e!==null)yn=e,ln=t;else{if(t===null)throw Error(oe(310));ln=t,t={memoizedState:ln.memoizedState,baseState:ln.baseState,baseQueue:ln.baseQueue,queue:ln.queue,next:null},yn===null?It.memoizedState=yn=t:yn=yn.next=t}return yn}function gh(t,e){return typeof e=="function"?e(t):e}function xg(t){var e=bi(),n=e.queue;if(n===null)throw Error(oe(311));n.lastRenderedReducer=t;var r=ln,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var h=u.lane;if((Pa&h)===h)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,It.lanes|=h,Aa|=h}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,Oi(r,e.memoizedState)||(Sr=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,It.lanes|=s,Aa|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Tg(t){var e=bi(),n=e.queue;if(n===null)throw Error(oe(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=t(s,o.action),o=o.next;while(o!==i);Oi(s,e.memoizedState)||(Sr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function BP(){}function UP(t,e){var n=It,r=bi(),i=e(),s=!Oi(r.memoizedState,i);if(s&&(r.memoizedState=i,Sr=!0),r=r.queue,P_(qP.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||yn!==null&&yn.memoizedState.tag&1){if(n.flags|=2048,yh(9,WP.bind(null,n,r,i,e),void 0,null),vn===null)throw Error(oe(349));Pa&30||HP(n,e,i)}return i}function HP(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=It.updateQueue,e===null?(e={lastEffect:null,stores:null},It.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function WP(t,e,n,r){e.value=n,e.getSnapshot=r,KP(e)&&GP(t)}function qP(t,e,n){return n(function(){KP(e)&&GP(t)})}function KP(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Oi(t,n)}catch{return!0}}function GP(t){var e=As(t,1);e!==null&&Li(e,t,1,-1)}function aT(t){var e=qi();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},e.queue=t,t=t.dispatch=IV.bind(null,It,t),[e.memoizedState,t]}function yh(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=It.updateQueue,e===null?(e={lastEffect:null,stores:null},It.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function YP(){return bi().memoizedState}function bd(t,e,n,r){var i=qi();It.flags|=t,i.memoizedState=yh(1|e,n,void 0,r===void 0?null:r)}function um(t,e,n,r){var i=bi();r=r===void 0?null:r;var s=void 0;if(ln!==null){var o=ln.memoizedState;if(s=o.destroy,r!==null&&b_(r,o.deps)){i.memoizedState=yh(e,n,s,r);return}}It.flags|=t,i.memoizedState=yh(1|e,n,s,r)}function lT(t,e){return bd(8390656,8,t,e)}function P_(t,e){return um(2048,8,t,e)}function QP(t,e){return um(4,2,t,e)}function XP(t,e){return um(4,4,t,e)}function JP(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ZP(t,e,n){return n=n!=null?n.concat([t]):null,um(4,4,JP.bind(null,e,t),n)}function A_(){}function eA(t,e){var n=bi();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&b_(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function tA(t,e){var n=bi();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&b_(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function nA(t,e,n){return Pa&21?(Oi(n,e)||(n=aP(),It.lanes|=n,Aa|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Sr=!0),t.memoizedState=n)}function AV(t,e){var n=ot;ot=n!==0&&4>n?n:4,t(!0);var r=wg.transition;wg.transition={};try{t(!1),e()}finally{ot=n,wg.transition=r}}function rA(){return bi().memoizedState}function RV(t,e,n){var r=mo(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},iA(t))sA(e,n);else if(n=jP(t,e,n,r),n!==null){var i=mr();Li(n,t,r,i),oA(n,e,r)}}function IV(t,e,n){var r=mo(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(iA(t))sA(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,Oi(a,o)){var l=e.interleaved;l===null?(i.next=i,__(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=jP(t,e,i,r),n!==null&&(i=mr(),Li(n,t,r,i),oA(n,e,r))}}function iA(t){var e=t.alternate;return t===It||e!==null&&e===It}function sA(t,e){Rc=pp=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function oA(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,s_(t,n)}}var mp={readContext:Ei,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},kV={readContext:Ei,useCallback:function(t,e){return qi().memoizedState=[t,e===void 0?null:e],t},useContext:Ei,useEffect:lT,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,bd(4194308,4,JP.bind(null,e,t),n)},useLayoutEffect:function(t,e){return bd(4194308,4,t,e)},useInsertionEffect:function(t,e){return bd(4,2,t,e)},useMemo:function(t,e){var n=qi();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=qi();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=RV.bind(null,It,t),[r.memoizedState,t]},useRef:function(t){var e=qi();return t={current:t},e.memoizedState=t},useState:aT,useDebugValue:A_,useDeferredValue:function(t){return qi().memoizedState=t},useTransition:function(){var t=aT(!1),e=t[0];return t=AV.bind(null,t[1]),qi().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=It,i=qi();if(wt){if(n===void 0)throw Error(oe(407));n=n()}else{if(n=e(),vn===null)throw Error(oe(349));Pa&30||HP(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,lT(qP.bind(null,r,s,t),[t]),r.flags|=2048,yh(9,WP.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=qi(),e=vn.identifierPrefix;if(wt){var n=Ts,r=xs;n=(r&~(1<<32-Vi(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=mh++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=PV++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},DV={readContext:Ei,useCallback:eA,useContext:Ei,useEffect:P_,useImperativeHandle:ZP,useInsertionEffect:QP,useLayoutEffect:XP,useMemo:tA,useReducer:xg,useRef:YP,useState:function(){return xg(gh)},useDebugValue:A_,useDeferredValue:function(t){var e=bi();return nA(e,ln.memoizedState,t)},useTransition:function(){var t=xg(gh)[0],e=bi().memoizedState;return[t,e]},useMutableSource:BP,useSyncExternalStore:UP,useId:rA,unstable_isNewReconciler:!1},MV={readContext:Ei,useCallback:eA,useContext:Ei,useEffect:P_,useImperativeHandle:ZP,useInsertionEffect:QP,useLayoutEffect:XP,useMemo:tA,useReducer:Tg,useRef:YP,useState:function(){return Tg(gh)},useDebugValue:A_,useDeferredValue:function(t){var e=bi();return ln===null?e.memoizedState=t:nA(e,ln.memoizedState,t)},useTransition:function(){var t=Tg(gh)[0],e=bi().memoizedState;return[t,e]},useMutableSource:BP,useSyncExternalStore:UP,useId:rA,unstable_isNewReconciler:!1};function ki(t,e){if(t&&t.defaultProps){e=Mt({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Xy(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:Mt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var cm={isMounted:function(t){return(t=t._reactInternals)?Fa(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=mr(),i=mo(t),s=bs(r,i);s.payload=e,n!=null&&(s.callback=n),e=fo(t,s,i),e!==null&&(Li(e,t,i,r),Td(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=mr(),i=mo(t),s=bs(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=fo(t,s,i),e!==null&&(Li(e,t,i,r),Td(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=mr(),r=mo(t),i=bs(n,r);i.tag=2,e!=null&&(i.callback=e),e=fo(t,i,r),e!==null&&(Li(e,t,r,n),Td(e,t,r))}};function uT(t,e,n,r,i,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,o):e.prototype&&e.prototype.isPureReactComponent?!uh(n,r)||!uh(i,s):!0}function aA(t,e,n){var r=!1,i=Eo,s=e.contextType;return typeof s=="object"&&s!==null?s=Ei(s):(i=Ar(e)?Sa:Xn.current,r=e.contextTypes,s=(r=r!=null)?Kl(t,i):Eo),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=cm,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function cT(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&cm.enqueueReplaceState(e,e.state,null)}function Jy(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},w_(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=Ei(s):(s=Ar(e)?Sa:Xn.current,i.context=Kl(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Xy(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&cm.enqueueReplaceState(i,i.state,null),fp(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function Xl(t,e){try{var n="",r=e;do n+=aN(r),r=r.return;while(r);var i=n}catch(s){i=` Error generating stack: `+s.message+` `+s.stack}return{value:t,source:e,stack:i,digest:null}}function Eg(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Zy(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var NV=typeof WeakMap=="function"?WeakMap:Map;function lA(t,e,n){n=bs(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){yp||(yp=!0,u0=r),Zy(t,e)},n}function uA(t,e,n){n=bs(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Zy(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Zy(t,e),typeof r!="function"&&(po===null?po=new Set([this]):po.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function hT(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new NV;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=GV.bind(null,t,e,n),e.then(t,t))}function fT(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function dT(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=bs(-1,1),e.tag=2,fo(n,e,1))),n.lanes|=1),t)}var VV=Ls.ReactCurrentOwner,Sr=!1;function lr(t,e,n,r){e.child=t===null?FP(e,null,n,r):Yl(e,t.child,n,r)}function pT(t,e,n,r,i){n=n.render;var s=e.ref;return Ml(e,i),r=S_(t,e,n,r,s,i),n=C_(),t!==null&&!Sr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Rs(t,e,i)):(wt&&n&&d_(e),e.flags|=1,lr(t,e,r,i),e.child)}function mT(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!L_(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,cA(t,e,s,r,i)):(t=Ad(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:uh,n(o,r)&&t.ref===e.ref)return Rs(t,e,i)}return e.flags|=1,t=go(s,r),t.ref=e.ref,t.return=e,e.child=t}function cA(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(uh(s,r)&&t.ref===e.ref)if(Sr=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Sr=!0);else return e.lanes=t.lanes,Rs(t,e,i)}return e0(t,e,n,r,i)}function hA(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},mt(vl,Hr),Hr|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,mt(vl,Hr),Hr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,mt(vl,Hr),Hr|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,mt(vl,Hr),Hr|=r;return lr(t,e,i,n),e.child}function fA(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function e0(t,e,n,r,i){var s=Ar(n)?Sa:Xn.current;return s=Kl(e,s),Ml(e,i),n=S_(t,e,n,r,s,i),r=C_(),t!==null&&!Sr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Rs(t,e,i)):(wt&&r&&d_(e),e.flags|=1,lr(t,e,n,i),e.child)}function gT(t,e,n,r,i){if(Ar(n)){var s=!0;ap(e)}else s=!1;if(Ml(e,i),e.stateNode===null)Sd(t,e),aA(e,n,r),Jy(e,n,r,i),r=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ei(u):(u=Ar(n)?Sa:Xn.current,u=Kl(e,u));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&cT(e,o,r,u),Ys=!1;var d=e.memoizedState;o.state=d,fp(e,r,o,i),l=e.memoizedState,a!==r||d!==l||Pr.current||Ys?(typeof h=="function"&&(Xy(e,n,h,r),l=e.memoizedState),(a=Ys||uT(e,n,a,r,d,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,$P(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:ki(e.type,a),o.props=u,f=e.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ei(l):(l=Ar(n)?Sa:Xn.current,l=Kl(e,l));var p=n.getDerivedStateFromProps;(h=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||d!==l)&&cT(e,o,r,l),Ys=!1,d=e.memoizedState,o.state=d,fp(e,r,o,i);var v=e.memoizedState;a!==f||d!==v||Pr.current||Ys?(typeof p=="function"&&(Xy(e,n,p,r),v=e.memoizedState),(u=Ys||uT(e,n,u,r,d,v,l)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return t0(t,e,n,r,s,i)}function t0(t,e,n,r,i,s){fA(t,e);var o=(e.flags&128)!==0;if(!r&&!o)return i&&tT(e,n,!1),Rs(t,e,s);r=e.stateNode,VV.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&o?(e.child=Yl(e,t.child,null,s),e.child=Yl(e,null,a,s)):lr(t,e,a,s),e.memoizedState=r.state,i&&tT(e,n,!0),e.child}function dA(t){var e=t.stateNode;e.pendingContext?eT(t,e.pendingContext,e.pendingContext!==e.context):e.context&&eT(t,e.context,!1),x_(t,e.containerInfo)}function yT(t,e,n,r,i){return Gl(),m_(i),e.flags|=256,lr(t,e,n,r),e.child}var n0={dehydrated:null,treeContext:null,retryLane:0};function r0(t){return{baseLanes:t,cachePool:null,transitions:null}}function pA(t,e,n){var r=e.pendingProps,i=Ct.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(i&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),mt(Ct,i&1),t===null)return Yy(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=r.children,t=r.fallback,s?(r=e.mode,s=e.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=dm(o,r,0,null),t=fa(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=r0(n),e.memoizedState=n0,t):R_(e,o));if(i=t.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return LV(t,e,o,r,a,i,n);if(s){s=r.fallback,o=e.mode,i=t.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=go(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=go(a,s):(s=fa(s,o,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,o=t.child.memoizedState,o=o===null?r0(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=n0,r}return s=t.child,t=s.sibling,r=go(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function R_(t,e){return e=dm({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Nf(t,e,n,r){return r!==null&&m_(r),Yl(e,t.child,null,n),t=R_(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function LV(t,e,n,r,i,s,o){if(n)return e.flags&256?(e.flags&=-257,r=Eg(Error(oe(422))),Nf(t,e,o,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=dm({mode:"visible",children:r.children},i,0,null),s=fa(s,i,o,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&Yl(e,t.child,null,o),e.child.memoizedState=r0(o),e.memoizedState=n0,s);if(!(e.mode&1))return Nf(t,e,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(oe(419)),r=Eg(s,r,void 0),Nf(t,e,o,r)}if(a=(o&t.childLanes)!==0,Sr||a){if(r=vn,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,As(t,i),Li(r,t,i,-1))}return V_(),r=Eg(Error(oe(421))),Nf(t,e,o,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=YV.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Xr=ho(i.nextSibling),Zr=e,wt=!0,Ni=null,t!==null&&(ci[hi++]=xs,ci[hi++]=Ts,ci[hi++]=Ca,xs=t.id,Ts=t.overflow,Ca=e),e=R_(e,r.children),e.flags|=4096,e)}function vT(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Qy(t.return,e,n)}function bg(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function mA(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(lr(t,e,r.children,n),r=Ct.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&vT(t,n,e);else if(t.tag===19)vT(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(mt(Ct,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&dp(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),bg(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&dp(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}bg(e,!0,n,null,s);break;case"together":bg(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Sd(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Rs(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Aa|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(oe(153));if(e.child!==null){for(t=e.child,n=go(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=go(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function OV(t,e,n){switch(e.tag){case 3:dA(e),Gl();break;case 5:zP(e);break;case 1:Ar(e.type)&&ap(e);break;case 4:x_(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;mt(cp,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(mt(Ct,Ct.current&1),e.flags|=128,null):n&e.child.childLanes?pA(t,e,n):(mt(Ct,Ct.current&1),t=Rs(t,e,n),t!==null?t.sibling:null);mt(Ct,Ct.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return mA(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),mt(Ct,Ct.current),r)break;return null;case 22:case 23:return e.lanes=0,hA(t,e,n)}return Rs(t,e,n)}var gA,i0,yA,vA;gA=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};i0=function(){};yA=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,ra(rs.current);var s=null;switch(n){case"input":i=Cy(t,i),r=Cy(t,r),s=[];break;case"select":i=Mt({},i,{value:void 0}),r=Mt({},r,{value:void 0}),s=[];break;case"textarea":i=Ry(t,i),r=Ry(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=sp)}ky(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(nh.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(nh.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&vt("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};vA=function(t,e,n,r){n!==r&&(e.flags|=4)};function Wu(t,e){if(!wt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Fn(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function FV(t,e,n){var r=e.pendingProps;switch(p_(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fn(e),null;case 1:return Ar(e.type)&&op(),Fn(e),null;case 3:return r=e.stateNode,Ql(),_t(Pr),_t(Xn),E_(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Df(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ni!==null&&(f0(Ni),Ni=null))),i0(t,e),Fn(e),null;case 5:T_(e);var i=ra(ph.current);if(n=e.type,t!==null&&e.stateNode!=null)yA(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(oe(166));return Fn(e),null}if(t=ra(rs.current),Df(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Yi]=e,r[fh]=s,t=(e.mode&1)!==0,n){case"dialog":vt("cancel",r),vt("close",r);break;case"iframe":case"object":case"embed":vt("load",r);break;case"video":case"audio":for(i=0;i<cc.length;i++)vt(cc[i],r);break;case"source":vt("error",r);break;case"img":case"image":case"link":vt("error",r),vt("load",r);break;case"details":vt("toggle",r);break;case"input":Px(r,s),vt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},vt("invalid",r);break;case"textarea":Rx(r,s),vt("invalid",r)}ky(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&kf(r.textContent,a,t),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&kf(r.textContent,a,t),i=["children",""+a]):nh.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&vt("scroll",r)}switch(n){case"input":Ef(r),Ax(r,s,!0);break;case"textarea":Ef(r),Ix(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=sp)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=qC(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=o.createElement(n,{is:r.is}):(t=o.createElement(n),n==="select"&&(o=t,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):t=o.createElementNS(t,n),t[Yi]=e,t[fh]=r,gA(t,e,!1,!1),e.stateNode=t;e:{switch(o=Dy(n,r),n){case"dialog":vt("cancel",t),vt("close",t),i=r;break;case"iframe":case"object":case"embed":vt("load",t),i=r;break;case"video":case"audio":for(i=0;i<cc.length;i++)vt(cc[i],t);i=r;break;case"source":vt("error",t),i=r;break;case"img":case"image":case"link":vt("error",t),vt("load",t),i=r;break;case"details":vt("toggle",t),i=r;break;case"input":Px(t,r),i=Cy(t,r),vt("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=Mt({},r,{value:void 0}),vt("invalid",t);break;case"textarea":Rx(t,r),i=Ry(t,r),vt("invalid",t);break;default:i=r}ky(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?YC(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&KC(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&rh(t,l):typeof l=="number"&&rh(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(nh.hasOwnProperty(s)?l!=null&&s==="onScroll"&&vt("scroll",t):l!=null&&Zv(t,s,l,o))}switch(n){case"input":Ef(t),Ax(t,r,!1);break;case"textarea":Ef(t),Ix(t);break;case"option":r.value!=null&&t.setAttribute("value",""+To(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?Rl(t,!!r.multiple,s,!1):r.defaultValue!=null&&Rl(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=sp)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Fn(e),null;case 6:if(t&&e.stateNode!=null)vA(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(oe(166));if(n=ra(ph.current),ra(rs.current),Df(e)){if(r=e.stateNode,n=e.memoizedProps,r[Yi]=e,(s=r.nodeValue!==n)&&(t=Zr,t!==null))switch(t.tag){case 3:kf(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&kf(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Yi]=e,e.stateNode=r}return Fn(e),null;case 13:if(_t(Ct),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(wt&&Xr!==null&&e.mode&1&&!(e.flags&128))LP(),Gl(),e.flags|=98560,s=!1;else if(s=Df(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(oe(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(oe(317));s[Yi]=e}else Gl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Fn(e),s=!1}else Ni!==null&&(f0(Ni),Ni=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||Ct.current&1?cn===0&&(cn=3):V_())),e.updateQueue!==null&&(e.flags|=4),Fn(e),null);case 4:return Ql(),i0(t,e),t===null&&ch(e.stateNode.containerInfo),Fn(e),null;case 10:return v_(e.type._context),Fn(e),null;case 17:return Ar(e.type)&&op(),Fn(e),null;case 19:if(_t(Ct),s=e.memoizedState,s===null)return Fn(e),null;if(r=(e.flags&128)!==0,o=s.rendering,o===null)if(r)Wu(s,!1);else{if(cn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=dp(t),o!==null){for(e.flags|=128,Wu(s,!1),r=o.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return mt(Ct,Ct.current&1|2),e.child}t=t.sibling}s.tail!==null&&Ut()>Jl&&(e.flags|=128,r=!0,Wu(s,!1),e.lanes=4194304)}else{if(!r)if(t=dp(o),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Wu(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!wt)return Fn(e),null}else 2*Ut()-s.renderingStartTime>Jl&&n!==1073741824&&(e.flags|=128,r=!0,Wu(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ut(),e.sibling=null,n=Ct.current,mt(Ct,r?n&1|2:n&1),e):(Fn(e),null);case 22:case 23:return N_(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Hr&1073741824&&(Fn(e),e.subtreeFlags&6&&(e.flags|=8192)):Fn(e),null;case 24:return null;case 25:return null}throw Error(oe(156,e.tag))}function jV(t,e){switch(p_(e),e.tag){case 1:return Ar(e.type)&&op(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ql(),_t(Pr),_t(Xn),E_(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return T_(e),null;case 13:if(_t(Ct),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(oe(340));Gl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return _t(Ct),null;case 4:return Ql(),null;case 10:return v_(e.type._context),null;case 22:case 23:return N_(),null;case 24:return null;default:return null}}var Vf=!1,Hn=!1,$V=typeof WeakSet=="function"?WeakSet:Set,pe=null;function yl(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ot(t,e,r)}else n.current=null}function s0(t,e,n){try{n()}catch(r){Ot(t,e,r)}}var _T=!1;function zV(t,e){if(By=np,t=EP(),f_(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,h=0,f=t,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=o+i),f!==s||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===t)break t;if(d===n&&++u===i&&(a=o),d===s&&++h===r&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Uy={focusedElem:t,selectionRange:n},np=!1,pe=e;pe!==null;)if(e=pe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,pe=t;else for(;pe!==null;){e=pe;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,C=v.memoizedState,_=e.stateNode,w=_.getSnapshotBeforeUpdate(e.elementType===e.type?y:ki(e.type,y),C);_.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var T=e.stateNode.containerInfo;T.nodeType===1?T.textContent="":T.nodeType===9&&T.documentElement&&T.removeChild(T.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(oe(163))}}catch(k){Ot(e,e.return,k)}if(t=e.sibling,t!==null){t.return=e.return,pe=t;break}pe=e.return}return v=_T,_T=!1,v}function Ic(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&s0(e,n,s)}i=i.next}while(i!==r)}}function hm(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function o0(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function _A(t){var e=t.alternate;e!==null&&(t.alternate=null,_A(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Yi],delete e[fh],delete e[qy],delete e[EV],delete e[bV])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function wA(t){return t.tag===5||t.tag===3||t.tag===4}function wT(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wA(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function a0(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=sp));else if(r!==4&&(t=t.child,t!==null))for(a0(t,e,n),t=t.sibling;t!==null;)a0(t,e,n),t=t.sibling}function l0(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(l0(t,e,n),t=t.sibling;t!==null;)l0(t,e,n),t=t.sibling}var Sn=null,Di=!1;function Bs(t,e,n){for(n=n.child;n!==null;)xA(t,e,n),n=n.sibling}function xA(t,e,n){if(ns&&typeof ns.onCommitFiberUnmount=="function")try{ns.onCommitFiberUnmount(rm,n)}catch{}switch(n.tag){case 5:Hn||yl(n,e);case 6:var r=Sn,i=Di;Sn=null,Bs(t,e,n),Sn=r,Di=i,Sn!==null&&(Di?(t=Sn,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Sn.removeChild(n.stateNode));break;case 18:Sn!==null&&(Di?(t=Sn,n=n.stateNode,t.nodeType===8?yg(t.parentNode,n):t.nodeType===1&&yg(t,n),ah(t)):yg(Sn,n.stateNode));break;case 4:r=Sn,i=Di,Sn=n.stateNode.containerInfo,Di=!0,Bs(t,e,n),Sn=r,Di=i;break;case 0:case 11:case 14:case 15:if(!Hn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&s0(n,e,o),i=i.next}while(i!==r)}Bs(t,e,n);break;case 1:if(!Hn&&(yl(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ot(n,e,a)}Bs(t,e,n);break;case 21:Bs(t,e,n);break;case 22:n.mode&1?(Hn=(r=Hn)||n.memoizedState!==null,Bs(t,e,n),Hn=r):Bs(t,e,n);break;default:Bs(t,e,n)}}function xT(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new $V),e.forEach(function(r){var i=QV.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pi(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:Sn=a.stateNode,Di=!1;break e;case 3:Sn=a.stateNode.containerInfo,Di=!0;break e;case 4:Sn=a.stateNode.containerInfo,Di=!0;break e}a=a.return}if(Sn===null)throw Error(oe(160));xA(s,o,i),Sn=null,Di=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ot(i,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)TA(e,t),e=e.sibling}function TA(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Pi(e,t),Wi(t),r&4){try{Ic(3,t,t.return),hm(3,t)}catch(y){Ot(t,t.return,y)}try{Ic(5,t,t.return)}catch(y){Ot(t,t.return,y)}}break;case 1:Pi(e,t),Wi(t),r&512&&n!==null&&yl(n,n.return);break;case 5:if(Pi(e,t),Wi(t),r&512&&n!==null&&yl(n,n.return),t.flags&32){var i=t.stateNode;try{rh(i,"")}catch(y){Ot(t,t.return,y)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&HC(i,s),Dy(a,o);var u=Dy(a,s);for(o=0;o<l.length;o+=2){var h=l[o],f=l[o+1];h==="style"?YC(i,f):h==="dangerouslySetInnerHTML"?KC(i,f):h==="children"?rh(i,f):Zv(i,h,f,u)}switch(a){case"input":Py(i,s);break;case"textarea":WC(i,s);break;case"select":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Rl(i,!!s.multiple,p,!1):d!==!!s.multiple&&(s.defaultValue!=null?Rl(i,!!s.multiple,s.defaultValue,!0):Rl(i,!!s.multiple,s.multiple?[]:"",!1))}i[fh]=s}catch(y){Ot(t,t.return,y)}}break;case 6:if(Pi(e,t),Wi(t),r&4){if(t.stateNode===null)throw Error(oe(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(y){Ot(t,t.return,y)}}break;case 3:if(Pi(e,t),Wi(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ah(e.containerInfo)}catch(y){Ot(t,t.return,y)}break;case 4:Pi(e,t),Wi(t);break;case 13:Pi(e,t),Wi(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(D_=Ut())),r&4&&xT(t);break;case 22:if(h=n!==null&&n.memoizedState!==null,t.mode&1?(Hn=(u=Hn)||h,Pi(e,t),Hn=u):Pi(e,t),Wi(t),r&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!h&&t.mode&1)for(pe=t,h=t.child;h!==null;){for(f=pe=h;pe!==null;){switch(d=pe,p=d.child,d.tag){case 0:case 11:case 14:case 15:Ic(4,d,d.return);break;case 1:yl(d,d.return);var v=d.stateNode;if(typeof v.componentWillUnmount=="function"){r=d,n=d.return;try{e=r,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(y){Ot(r,n,y)}}break;case 5:yl(d,d.return);break;case 22:if(d.memoizedState!==null){ET(f);continue}}p!==null?(p.return=d,pe=p):ET(f)}h=h.sibling}e:for(h=null,f=t;;){if(f.tag===5){if(h===null){h=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=GC("display",o))}catch(y){Ot(t,t.return,y)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Ot(t,t.return,y)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Pi(e,t),Wi(t),r&4&&xT(t);break;case 21:break;default:Pi(e,t),Wi(t)}}function Wi(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(wA(n)){var r=n;break e}n=n.return}throw Error(oe(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(rh(i,""),r.flags&=-33);var s=wT(t);l0(t,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=wT(t);a0(t,a,o);break;default:throw Error(oe(161))}}catch(l){Ot(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function BV(t,e,n){pe=t,EA(t)}function EA(t,e,n){for(var r=(t.mode&1)!==0;pe!==null;){var i=pe,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Vf;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||Hn;a=Vf;var u=Hn;if(Vf=o,(Hn=l)&&!u)for(pe=i;pe!==null;)o=pe,l=o.child,o.tag===22&&o.memoizedState!==null?bT(i):l!==null?(l.return=o,pe=l):bT(i);for(;s!==null;)pe=s,EA(s),s=s.sibling;pe=i,Vf=a,Hn=u}TT(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,pe=s):TT(t)}}function TT(t){for(;pe!==null;){var e=pe;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Hn||hm(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Hn)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:ki(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&oT(e,s,r);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}oT(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var h=u.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&ah(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(oe(163))}Hn||e.flags&512&&o0(e)}catch(d){Ot(e,e.return,d)}}if(e===t){pe=null;break}if(n=e.sibling,n!==null){n.return=e.return,pe=n;break}pe=e.return}}function ET(t){for(;pe!==null;){var e=pe;if(e===t){pe=null;break}var n=e.sibling;if(n!==null){n.return=e.return,pe=n;break}pe=e.return}}function bT(t){for(;pe!==null;){var e=pe;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{hm(4,e)}catch(l){Ot(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){Ot(e,i,l)}}var s=e.return;try{o0(e)}catch(l){Ot(e,s,l)}break;case 5:var o=e.return;try{o0(e)}catch(l){Ot(e,o,l)}}}catch(l){Ot(e,e.return,l)}if(e===t){pe=null;break}var a=e.sibling;if(a!==null){a.return=e.return,pe=a;break}pe=e.return}}var UV=Math.ceil,gp=Ls.ReactCurrentDispatcher,I_=Ls.ReactCurrentOwner,wi=Ls.ReactCurrentBatchConfig,Je=0,vn=null,tn=null,Rn=0,Hr=0,vl=Lo(0),cn=0,vh=null,Aa=0,fm=0,k_=0,kc=null,br=null,D_=0,Jl=1/0,gs=null,yp=!1,u0=null,po=null,Lf=!1,eo=null,vp=0,Dc=0,c0=null,Cd=-1,Pd=0;function mr(){return Je&6?Ut():Cd!==-1?Cd:Cd=Ut()}function mo(t){return t.mode&1?Je&2&&Rn!==0?Rn&-Rn:CV.transition!==null?(Pd===0&&(Pd=aP()),Pd):(t=ot,t!==0||(t=window.event,t=t===void 0?16:pP(t.type)),t):1}function Li(t,e,n,r){if(50<Dc)throw Dc=0,c0=null,Error(oe(185));Gh(t,n,r),(!(Je&2)||t!==vn)&&(t===vn&&(!(Je&2)&&(fm|=n),cn===4&&Xs(t,Rn)),Rr(t,r),n===1&&Je===0&&!(e.mode&1)&&(Jl=Ut()+500,lm&&Oo()))}function Rr(t,e){var n=t.callbackNode;CN(t,e);var r=tp(t,t===vn?Rn:0);if(r===0)n!==null&&Mx(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&Mx(n),e===1)t.tag===0?SV(ST.bind(null,t)):MP(ST.bind(null,t)),xV(function(){!(Je&6)&&Oo()}),n=null;else{switch(lP(r)){case 1:n=i_;break;case 4:n=sP;break;case 16:n=ep;break;case 536870912:n=oP;break;default:n=ep}n=kA(n,bA.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function bA(t,e){if(Cd=-1,Pd=0,Je&6)throw Error(oe(327));var n=t.callbackNode;if(Nl()&&t.callbackNode!==n)return null;var r=tp(t,t===vn?Rn:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=_p(t,r);else{e=r;var i=Je;Je|=2;var s=CA();(vn!==t||Rn!==e)&&(gs=null,Jl=Ut()+500,ha(t,e));do try{qV();break}catch(a){SA(t,a)}while(!0);y_(),gp.current=s,Je=i,tn!==null?e=0:(vn=null,Rn=0,e=cn)}if(e!==0){if(e===2&&(i=Oy(t),i!==0&&(r=i,e=h0(t,i))),e===1)throw n=vh,ha(t,0),Xs(t,r),Rr(t,Ut()),n;if(e===6)Xs(t,r);else{if(i=t.current.alternate,!(r&30)&&!HV(i)&&(e=_p(t,r),e===2&&(s=Oy(t),s!==0&&(r=s,e=h0(t,s))),e===1))throw n=vh,ha(t,0),Xs(t,r),Rr(t,Ut()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(oe(345));case 2:Go(t,br,gs);break;case 3:if(Xs(t,r),(r&130023424)===r&&(e=D_+500-Ut(),10<e)){if(tp(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){mr(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=Wy(Go.bind(null,t,br,gs),e);break}Go(t,br,gs);break;case 4:if(Xs(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Vi(r);s=1<<o,o=e[o],o>i&&(i=o),r&=~s}if(r=i,r=Ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UV(r/1960))-r,10<r){t.timeoutHandle=Wy(Go.bind(null,t,br,gs),r);break}Go(t,br,gs);break;case 5:Go(t,br,gs);break;default:throw Error(oe(329))}}}return Rr(t,Ut()),t.callbackNode===n?bA.bind(null,t):null}function h0(t,e){var n=kc;return t.current.memoizedState.isDehydrated&&(ha(t,e).flags|=256),t=_p(t,e),t!==2&&(e=br,br=n,e!==null&&f0(e)),t}function f0(t){br===null?br=t:br.push.apply(br,t)}function HV(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Oi(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Xs(t,e){for(e&=~k_,e&=~fm,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Vi(e),r=1<<n;t[n]=-1,e&=~r}}function ST(t){if(Je&6)throw Error(oe(327));Nl();var e=tp(t,0);if(!(e&1))return Rr(t,Ut()),null;var n=_p(t,e);if(t.tag!==0&&n===2){var r=Oy(t);r!==0&&(e=r,n=h0(t,r))}if(n===1)throw n=vh,ha(t,0),Xs(t,e),Rr(t,Ut()),n;if(n===6)throw Error(oe(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Go(t,br,gs),Rr(t,Ut()),null}function M_(t,e){var n=Je;Je|=1;try{return t(e)}finally{Je=n,Je===0&&(Jl=Ut()+500,lm&&Oo())}}function Ra(t){eo!==null&&eo.tag===0&&!(Je&6)&&Nl();var e=Je;Je|=1;var n=wi.transition,r=ot;try{if(wi.transition=null,ot=1,t)return t()}finally{ot=r,wi.transition=n,Je=e,!(Je&6)&&Oo()}}function N_(){Hr=vl.current,_t(vl)}function ha(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,wV(n)),tn!==null)for(n=tn.return;n!==null;){var r=n;switch(p_(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&op();break;case 3:Ql(),_t(Pr),_t(Xn),E_();break;case 5:T_(r);break;case 4:Ql();break;case 13:_t(Ct);break;case 19:_t(Ct);break;case 10:v_(r.type._context);break;case 22:case 23:N_()}n=n.return}if(vn=t,tn=t=go(t.current,null),Rn=Hr=e,cn=0,vh=null,k_=fm=Aa=0,br=kc=null,na!==null){for(e=0;e<na.length;e++)if(n=na[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}na=null}return t}function SA(t,e){do{var n=tn;try{if(y_(),Ed.current=mp,pp){for(var r=It.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}pp=!1}if(Pa=0,yn=ln=It=null,Rc=!1,mh=0,I_.current=null,n===null||n.return===null){cn=1,vh=e,tn=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=Rn,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,h=a,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var d=h.alternate;d?(h.updateQueue=d.updateQueue,h.memoizedState=d.memoizedState,h.lanes=d.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=fT(o);if(p!==null){p.flags&=-257,dT(p,o,a,s,e),p.mode&1&&hT(s,u,e),e=p,l=u;var v=e.updateQueue;if(v===null){var y=new Set;y.add(l),e.updateQueue=y}else v.add(l);break e}else{if(!(e&1)){hT(s,u,e),V_();break e}l=Error(oe(426))}}else if(wt&&a.mode&1){var C=fT(o);if(C!==null){!(C.flags&65536)&&(C.flags|=256),dT(C,o,a,s,e),m_(Xl(l,a));break e}}s=l=Xl(l,a),cn!==4&&(cn=2),kc===null?kc=[s]:kc.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var _=lA(s,l,e);sT(s,_);break e;case 1:a=l;var w=s.type,T=s.stateNode;if(!(s.flags&128)&&(typeof w.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(po===null||!po.has(T)))){s.flags|=65536,e&=-e,s.lanes|=e;var k=uA(s,a,e);sT(s,k);break e}}s=s.return}while(s!==null)}AA(n)}catch(P){e=P,tn===n&&n!==null&&(tn=n=n.return);continue}break}while(!0)}function CA(){var t=gp.current;return gp.current=mp,t===null?mp:t}function V_(){(cn===0||cn===3||cn===2)&&(cn=4),vn===null||!(Aa&268435455)&&!(fm&268435455)||Xs(vn,Rn)}function _p(t,e){var n=Je;Je|=2;var r=CA();(vn!==t||Rn!==e)&&(gs=null,ha(t,e));do try{WV();break}catch(i){SA(t,i)}while(!0);if(y_(),Je=n,gp.current=r,tn!==null)throw Error(oe(261));return vn=null,Rn=0,cn}function WV(){for(;tn!==null;)PA(tn)}function qV(){for(;tn!==null&&!yN();)PA(tn)}function PA(t){var e=IA(t.alternate,t,Hr);t.memoizedProps=t.pendingProps,e===null?AA(t):tn=e,I_.current=null}function AA(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=jV(n,e),n!==null){n.flags&=32767,tn=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{cn=6,tn=null;return}}else if(n=FV(n,e,Hr),n!==null){tn=n;return}if(e=e.sibling,e!==null){tn=e;return}tn=e=t}while(e!==null);cn===0&&(cn=5)}function Go(t,e,n){var r=ot,i=wi.transition;try{wi.transition=null,ot=1,KV(t,e,n,r)}finally{wi.transition=i,ot=r}return null}function KV(t,e,n,r){do Nl();while(eo!==null);if(Je&6)throw Error(oe(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(oe(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(PN(t,s),t===vn&&(tn=vn=null,Rn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Lf||(Lf=!0,kA(ep,function(){return Nl(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=wi.transition,wi.transition=null;var o=ot;ot=1;var a=Je;Je|=4,I_.current=null,zV(t,n),TA(n,t),dV(Uy),np=!!By,Uy=By=null,t.current=n,BV(n),vN(),Je=a,ot=o,wi.transition=s}else t.current=n;if(Lf&&(Lf=!1,eo=t,vp=i),s=t.pendingLanes,s===0&&(po=null),xN(n.stateNode),Rr(t,Ut()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(yp)throw yp=!1,t=u0,u0=null,t;return vp&1&&t.tag!==0&&Nl(),s=t.pendingLanes,s&1?t===c0?Dc++:(Dc=0,c0=t):Dc=0,Oo(),null}function Nl(){if(eo!==null){var t=lP(vp),e=wi.transition,n=ot;try{if(wi.transition=null,ot=16>t?16:t,eo===null)var r=!1;else{if(t=eo,eo=null,vp=0,Je&6)throw Error(oe(331));var i=Je;for(Je|=4,pe=t.current;pe!==null;){var s=pe,o=s.child;if(pe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(pe=u;pe!==null;){var h=pe;switch(h.tag){case 0:case 11:case 15:Ic(8,h,s)}var f=h.child;if(f!==null)f.return=h,pe=f;else for(;pe!==null;){h=pe;var d=h.sibling,p=h.return;if(_A(h),h===u){pe=null;break}if(d!==null){d.return=p,pe=d;break}pe=p}}}var v=s.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var C=y.sibling;y.sibling=null,y=C}while(y!==null)}}pe=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,pe=o;else e:for(;pe!==null;){if(s=pe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ic(9,s,s.return)}var _=s.sibling;if(_!==null){_.return=s.return,pe=_;break e}pe=s.return}}var w=t.current;for(pe=w;pe!==null;){o=pe;var T=o.child;if(o.subtreeFlags&2064&&T!==null)T.return=o,pe=T;else e:for(o=w;pe!==null;){if(a=pe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:hm(9,a)}}catch(P){Ot(a,a.return,P)}if(a===o){pe=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,pe=k;break e}pe=a.return}}if(Je=i,Oo(),ns&&typeof ns.onPostCommitFiberRoot=="function")try{ns.onPostCommitFiberRoot(rm,t)}catch{}r=!0}return r}finally{ot=n,wi.transition=e}}return!1}function CT(t,e,n){e=Xl(n,e),e=lA(t,e,1),t=fo(t,e,1),e=mr(),t!==null&&(Gh(t,1,e),Rr(t,e))}function Ot(t,e,n){if(t.tag===3)CT(t,t,n);else for(;e!==null;){if(e.tag===3){CT(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(po===null||!po.has(r))){t=Xl(n,t),t=uA(e,t,1),e=fo(e,t,1),t=mr(),e!==null&&(Gh(e,1,t),Rr(e,t));break}}e=e.return}}function GV(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=mr(),t.pingedLanes|=t.suspendedLanes&n,vn===t&&(Rn&n)===n&&(cn===4||cn===3&&(Rn&130023424)===Rn&&500>Ut()-D_?ha(t,0):k_|=n),Rr(t,e)}function RA(t,e){e===0&&(t.mode&1?(e=Cf,Cf<<=1,!(Cf&130023424)&&(Cf=4194304)):e=1);var n=mr();t=As(t,e),t!==null&&(Gh(t,e,n),Rr(t,n))}function YV(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),RA(t,n)}function QV(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(oe(314))}r!==null&&r.delete(e),RA(t,n)}var IA;IA=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Pr.current)Sr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Sr=!1,OV(t,e,n);Sr=!!(t.flags&131072)}else Sr=!1,wt&&e.flags&1048576&&NP(e,up,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Sd(t,e),t=e.pendingProps;var i=Kl(e,Xn.current);Ml(e,n),i=S_(null,e,r,t,i,n);var s=C_();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ar(r)?(s=!0,ap(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w_(e),i.updater=cm,e.stateNode=i,i._reactInternals=e,Jy(e,r,t,n),e=t0(null,e,r,!0,s,n)):(e.tag=0,wt&&s&&d_(e),lr(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Sd(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=JV(r),t=ki(r,t),i){case 0:e=e0(null,e,r,t,n);break e;case 1:e=gT(null,e,r,t,n);break e;case 11:e=pT(null,e,r,t,n);break e;case 14:e=mT(null,e,r,ki(r.type,t),n);break e}throw Error(oe(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ki(r,i),e0(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ki(r,i),gT(t,e,r,i,n);case 3:e:{if(dA(e),t===null)throw Error(oe(387));r=e.pendingProps,s=e.memoizedState,i=s.element,$P(t,e),fp(e,r,null,n);var o=e.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=Xl(Error(oe(423)),e),e=yT(t,e,r,n,i);break e}else if(r!==i){i=Xl(Error(oe(424)),e),e=yT(t,e,r,n,i);break e}else for(Xr=ho(e.stateNode.containerInfo.firstChild),Zr=e,wt=!0,Ni=null,n=FP(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gl(),r===i){e=Rs(t,e,n);break e}lr(t,e,r,n)}e=e.child}return e;case 5:return zP(e),t===null&&Yy(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,o=i.children,Hy(r,i)?o=null:s!==null&&Hy(r,s)&&(e.flags|=32),fA(t,e),lr(t,e,o,n),e.child;case 6:return t===null&&Yy(e),null;case 13:return pA(t,e,n);case 4:return x_(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Yl(e,null,r,n):lr(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ki(r,i),pT(t,e,r,i,n);case 7:return lr(t,e,e.pendingProps,n),e.child;case 8:return lr(t,e,e.pendingProps.children,n),e.child;case 12:return lr(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,o=i.value,mt(cp,r._currentValue),r._currentValue=o,s!==null)if(Oi(s.value,o)){if(s.children===i.children&&!Pr.current){e=Rs(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=bs(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Qy(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(oe(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Qy(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}lr(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Ml(e,n),i=Ei(i),r=r(i),e.flags|=1,lr(t,e,r,n),e.child;case 14:return r=e.type,i=ki(r,e.pendingProps),i=ki(r.type,i),mT(t,e,r,i,n);case 15:return cA(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:ki(r,i),Sd(t,e),e.tag=1,Ar(r)?(t=!0,ap(e)):t=!1,Ml(e,n),aA(e,r,i),Jy(e,r,i,n),t0(null,e,r,!0,t,n);case 19:return mA(t,e,n);case 22:return hA(t,e,n)}throw Error(oe(156,e.tag))};function kA(t,e){return iP(t,e)}function XV(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gi(t,e,n,r){return new XV(t,e,n,r)}function L_(t){return t=t.prototype,!(!t||!t.isReactComponent)}function JV(t){if(typeof t=="function")return L_(t)?1:0;if(t!=null){if(t=t.$$typeof,t===t_)return 11;if(t===n_)return 14}return 2}function go(t,e){var n=t.alternate;return n===null?(n=gi(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Ad(t,e,n,r,i,s){var o=2;if(r=t,typeof t=="function")L_(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case ll:return fa(n.children,i,s,e);case e_:o=8,i|=8;break;case Ty:return t=gi(12,n,e,i|2),t.elementType=Ty,t.lanes=s,t;case Ey:return t=gi(13,n,e,i),t.elementType=Ey,t.lanes=s,t;case by:return t=gi(19,n,e,i),t.elementType=by,t.lanes=s,t;case zC:return dm(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case jC:o=10;break e;case $C:o=9;break e;case t_:o=11;break e;case n_:o=14;break e;case Gs:o=16,r=null;break e}throw Error(oe(130,t==null?t:typeof t,""))}return e=gi(o,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function fa(t,e,n,r){return t=gi(7,t,r,e),t.lanes=n,t}function dm(t,e,n,r){return t=gi(22,t,r,e),t.elementType=zC,t.lanes=n,t.stateNode={isHidden:!1},t}function Sg(t,e,n){return t=gi(6,t,null,e),t.lanes=n,t}function Cg(t,e,n){return e=gi(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ZV(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=og(0),this.expirationTimes=og(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=og(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function O_(t,e,n,r,i,s,o,a,l){return t=new ZV(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=gi(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w_(s),t}function e4(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:al,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function DA(t){if(!t)return Eo;t=t._reactInternals;e:{if(Fa(t)!==t||t.tag!==1)throw Error(oe(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Ar(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(oe(171))}if(t.tag===1){var n=t.type;if(Ar(n))return DP(t,n,e)}return e}function MA(t,e,n,r,i,s,o,a,l){return t=O_(n,r,!0,t,i,s,o,a,l),t.context=DA(null),n=t.current,r=mr(),i=mo(n),s=bs(r,i),s.callback=e??null,fo(n,s,i),t.current.lanes=i,Gh(t,i,r),Rr(t,r),t}function pm(t,e,n,r){var i=e.current,s=mr(),o=mo(i);return n=DA(n),e.context===null?e.context=n:e.pendingContext=n,e=bs(s,o),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=fo(i,e,o),t!==null&&(Li(t,i,o,s),Td(t,i,o)),o}function wp(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function PT(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function F_(t,e){PT(t,e),(t=t.alternate)&&PT(t,e)}function t4(){return null}var NA=typeof reportError=="function"?reportError:function(t){console.error(t)};function j_(t){this._internalRoot=t}mm.prototype.render=j_.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(oe(409));pm(t,e,null,null)};mm.prototype.unmount=j_.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ra(function(){pm(null,t,null,null)}),e[Ps]=null}};function mm(t){this._internalRoot=t}mm.prototype.unstable_scheduleHydration=function(t){if(t){var e=hP();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Qs.length&&e!==0&&e<Qs[n].priority;n++);Qs.splice(n,0,t),n===0&&dP(t)}};function $_(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function gm(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function AT(){}function n4(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=wp(o);s.call(u)}}var o=MA(e,r,t,0,null,!1,!1,"",AT);return t._reactRootContainer=o,t[Ps]=o.current,ch(t.nodeType===8?t.parentNode:t),Ra(),o}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=wp(l);a.call(u)}}var l=O_(t,0,!1,null,null,!1,!1,"",AT);return t._reactRootContainer=l,t[Ps]=l.current,ch(t.nodeType===8?t.parentNode:t),Ra(function(){pm(e,l,n,r)}),l}function ym(t,e,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var l=wp(o);a.call(l)}}pm(e,o,t,i)}else o=n4(n,e,t,i,r);return wp(o)}uP=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=uc(e.pendingLanes);n!==0&&(s_(e,n|1),Rr(e,Ut()),!(Je&6)&&(Jl=Ut()+500,Oo()))}break;case 13:Ra(function(){var r=As(t,1);if(r!==null){var i=mr();Li(r,t,1,i)}}),F_(t,1)}};o_=function(t){if(t.tag===13){var e=As(t,134217728);if(e!==null){var n=mr();Li(e,t,134217728,n)}F_(t,134217728)}};cP=function(t){if(t.tag===13){var e=mo(t),n=As(t,e);if(n!==null){var r=mr();Li(n,t,e,r)}F_(t,e)}};hP=function(){return ot};fP=function(t,e){var n=ot;try{return ot=t,e()}finally{ot=n}};Ny=function(t,e,n){switch(e){case"input":if(Py(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=am(r);if(!i)throw Error(oe(90));UC(r),Py(r,i)}}}break;case"textarea":WC(t,n);break;case"select":e=n.value,e!=null&&Rl(t,!!n.multiple,e,!1)}};JC=M_;ZC=Ra;var r4={usingClientEntryPoint:!1,Events:[Qh,fl,am,QC,XC,M_]},qu={findFiberByHostInstance:ta,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},i4={bundleType:qu.bundleType,version:qu.version,rendererPackageName:qu.rendererPackageName,rendererConfig:qu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ls.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=nP(t),t===null?null:t.stateNode},findFiberByHostInstance:qu.findFiberByHostInstance||t4,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 Of=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Of.isDisabled&&Of.supportsFiber)try{rm=Of.inject(i4),ns=Of}catch{}}ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=r4;ii.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$_(e))throw Error(oe(200));return e4(t,e,null,n)};ii.createRoot=function(t,e){if(!$_(t))throw Error(oe(299));var n=!1,r="",i=NA;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=O_(t,1,!1,null,null,n,!1,r,i),t[Ps]=e.current,ch(t.nodeType===8?t.parentNode:t),new j_(e)};ii.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(oe(188)):(t=Object.keys(t).join(","),Error(oe(268,t)));return t=nP(e),t=t===null?null:t.stateNode,t};ii.flushSync=function(t){return Ra(t)};ii.hydrate=function(t,e,n){if(!gm(e))throw Error(oe(200));return ym(null,t,e,!0,n)};ii.hydrateRoot=function(t,e,n){if(!$_(t))throw Error(oe(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=NA;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=MA(e,null,t,1,n??null,i,!1,s,o),t[Ps]=e.current,ch(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new mm(e)};ii.render=function(t,e,n){if(!gm(e))throw Error(oe(200));return ym(null,t,e,!1,n)};ii.unmountComponentAtNode=function(t){if(!gm(t))throw Error(oe(40));return t._reactRootContainer?(Ra(function(){ym(null,null,t,!1,function(){t._reactRootContainer=null,t[Ps]=null})}),!0):!1};ii.unstable_batchedUpdates=M_;ii.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!gm(n))throw Error(oe(200));if(t==null||t._reactInternals===void 0)throw Error(oe(38));return ym(t,e,n,!1,r)};ii.version="18.3.1-next-f1338f8080-20240426";function VA(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VA)}catch(t){console.error(t)}}VA(),VC.exports=ii;var LA=VC.exports;const s4=tm(LA);var z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.parse=f4;z_.serialize=d4;const o4=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,a4=/^[\u0021-\u003A\u003C-\u007E]*$/,l4=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,u4=/^[\u0020-\u003A\u003D-\u007E]*$/,c4=Object.prototype.toString,h4=(()=>{const t=function(){};return t.prototype=Object.create(null),t})();function f4(t,e){const n=new h4,r=t.length;if(r<2)return n;const i=(e==null?void 0:e.decode)||p4;let s=0;do{const o=t.indexOf("=",s);if(o===-1)break;const a=t.indexOf(";",s),l=a===-1?r:a;if(o>l){s=t.lastIndexOf(";",o-1)+1;continue}const u=RT(t,s,o),h=IT(t,o,u),f=t.slice(u,h);if(n[f]===void 0){let d=RT(t,o+1,l),p=IT(t,l,d);const v=i(t.slice(d,p));n[f]=v}s=l+1}while(s<r);return n}function RT(t,e,n){do{const r=t.charCodeAt(e);if(r!==32&&r!==9)return e}while(++e<n);return n}function IT(t,e,n){for(;e>n;){const r=t.charCodeAt(--e);if(r!==32&&r!==9)return e+1}return n}function d4(t,e,n){const r=(n==null?void 0:n.encode)||encodeURIComponent;if(!o4.test(t))throw new TypeError(`argument name is invalid: ${t}`);const i=r(e);if(!a4.test(i))throw new TypeError(`argument val is invalid: ${e}`);let s=t+"="+i;if(!n)return s;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);s+="; Max-Age="+n.maxAge}if(n.domain){if(!l4.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);s+="; Domain="+n.domain}if(n.path){if(!u4.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);s+="; Path="+n.path}if(n.expires){if(!m4(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.partitioned&&(s+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"none":s+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return s}function p4(t){if(t.indexOf("%")===-1)return t;try{return decodeURIComponent(t)}catch{return t}}function m4(t){return c4.call(t)==="[object Date]"}/** * react-router v7.0.1 * * 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 */var kT="popstate";function g4(t={}){function e(i,s){let{pathname:o="/",search:a="",hash:l=""}=Os(i.location.hash.substring(1));return!o.startsWith("/")&&!o.startsWith(".")&&(o="/"+o),_h("",{pathname:o,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(i,s){let o=i.document.querySelector("base"),a="";if(o&&o.getAttribute("href")){let l=i.location.href,u=l.indexOf("#");a=u===-1?l:l.slice(0,u)}return a+"#"+(typeof s=="string"?s:bo(s))}function r(i,s){Nr(i.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(s)})`)}return v4(e,n,r,t)}function Be(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Nr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function y4(){return Math.random().toString(36).substring(2,10)}function DT(t,e){return{usr:t.state,key:t.key,idx:e}}function _h(t,e,n=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?Os(e):e,state:n,key:e&&e.key||r||y4()}}function bo({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Os(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substring(r),t=t.substring(0,r)),t&&(e.pathname=t)}return e}function v4(t,e,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,u=h();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function h(){return(o.state||{idx:null}).idx}function f(){a="POP";let C=h(),_=C==null?null:C-u;u=C,l&&l({action:a,location:y.location,delta:_})}function d(C,_){a="PUSH";let w=_h(y.location,C,_);n&&n(w,C),u=h()+1;let T=DT(w,u),k=y.createHref(w);try{o.pushState(T,"",k)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(k)}s&&l&&l({action:a,location:y.location,delta:1})}function p(C,_){a="REPLACE";let w=_h(y.location,C,_);n&&n(w,C),u=h();let T=DT(w,u),k=y.createHref(w);o.replaceState(T,"",k),s&&l&&l({action:a,location:y.location,delta:0})}function v(C){let _=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof C=="string"?C:bo(C);return w=w.replace(/ $/,"%20"),Be(_,`No window.location.(origin|href) available to create URL for href: ${w}`),new URL(w,_)}let y={get action(){return a},get location(){return t(i,o)},listen(C){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(kT,f),l=C,()=>{i.removeEventListener(kT,f),l=null}},createHref(C){return e(i,C)},createURL:v,encodeLocation(C){let _=v(C);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:d,replace:p,go(C){return o.go(C)}};return y}var _4=new Set(["lazy","caseSensitive","path","id","index","children"]);function w4(t){return t.index===!0}function xp(t,e,n=[],r={}){return t.map((i,s)=>{let o=[...n,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(Be(i.index!==!0||!i.children,"Cannot specify children on an index route"),Be(!r[a],`Found a route id collision on id "${a}". Route id's must be globally unique within Data Router usages`),w4(i)){let l={...i,...e(i),id:a};return r[a]=l,l}else{let l={...i,...e(i),id:a,children:void 0};return r[a]=l,i.children&&(l.children=xp(i.children,e,o,r)),l}})}function Js(t,e,n="/"){return Rd(t,e,n,!1)}function Rd(t,e,n,r){let i=typeof e=="string"?Os(e):e,s=Fi(i.pathname||"/",n);if(s==null)return null;let o=OA(t);T4(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=M4(s);a=k4(o[l],u,r)}return a}function x4(t,e){let{route:n,pathname:r,params:i}=t;return{id:n.id,pathname:r,params:i,data:e[n.id],handle:n.handle}}function OA(t,e=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Be(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=is([r,l.relativePath]),h=n.concat(l);s.children&&s.children.length>0&&(Be(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),OA(s.children,e,h,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:R4(u,s.index),routesMeta:h})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of FA(s.path))i(s,o,l)}),e}function FA(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=FA(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function T4(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:I4(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var E4=/^:[\w-]+$/,b4=3,S4=2,C4=1,P4=10,A4=-2,MT=t=>t==="*";function R4(t,e){let n=t.split("/"),r=n.length;return n.some(MT)&&(r+=A4),e&&(r+=S4),n.filter(i=>!MT(i)).reduce((i,s)=>i+(E4.test(s)?b4:s===""?C4:P4),r)}function I4(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function k4(t,e,n=!1){let{routesMeta:r}=t,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,h=s==="/"?e:e.slice(s.length)||"/",f=Tp({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},h),d=l.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Tp({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},h)),!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:is([s,f.pathname]),pathnameBase:L4(is([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=is([s,f.pathnameBase]))}return o}function Tp(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=D4(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,{paramName:h,isOptional:f},d)=>{if(h==="*"){let v=a[d]||"";o=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const p=a[d];return f&&!p?u[h]=void 0:u[h]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function D4(t,e=!1,n=!0){Nr(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 r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function M4(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Nr(!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 (${e}).`),t}}function Fi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function N4(t,e="/"){let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Os(t):t;return{pathname:n?n.startsWith("/")?n:V4(n,e):e,search:O4(r),hash:F4(i)}}function V4(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Pg(t,e,n,r){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jA(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function vm(t){let e=jA(t);return e.map((n,r)=>r===e.length-1?n.pathname:n.pathnameBase)}function _m(t,e,n,r=!1){let i;typeof t=="string"?i=Os(t):(i={...t},Be(!i.pathname||!i.pathname.includes("?"),Pg("?","pathname","search",i)),Be(!i.pathname||!i.pathname.includes("#"),Pg("#","pathname","hash",i)),Be(!i.search||!i.search.includes("#"),Pg("#","search","hash",i)));let s=t===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=e.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?e[f]:"/"}let l=N4(i,a),u=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||h)&&(l.pathname+="/"),l}var is=t=>t.join("/").replace(/\/\/+/g,"/"),L4=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),O4=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,F4=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Ep=class{constructor(t,e,n,r=!1){this.status=t,this.statusText=e||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function wm(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var $A=["POST","PUT","PATCH","DELETE"],j4=new Set($A),$4=["GET",...$A],z4=new Set($4),B4=new Set([301,302,303,307,308]),U4=new Set([307,308]),Ag={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},H4={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ku={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},B_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W4=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),zA="remix-router-transitions",BA=Symbol("ResetLoaderData");function q4(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u";Be(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.mapRouteProperties||W4,i={},s=xp(t.routes,r,void 0,i),o,a=t.basename||"/",l=t.dataStrategy||X4,u=t.patchRoutesOnNavigation,h={...t.future},f=null,d=new Set,p=null,v=null,y=null,C=t.hydrationData!=null,_=Js(s,t.history.location,a),w=null;if(_==null&&!u){let j=ui(404,{pathname:t.history.location.pathname}),{matches:F,route:$}=HT(s);_=F,w={[$.id]:j}}_&&!t.hydrationData&&Yt(_,s,t.history.location.pathname).active&&(_=null);let T;if(_)if(_.some(j=>j.route.lazy))T=!1;else if(!_.some(j=>j.route.loader))T=!0;else{let j=t.hydrationData?t.hydrationData.loaderData:null,F=t.hydrationData?t.hydrationData.errors:null;if(F){let $=_.findIndex(W=>F[W.route.id]!==void 0);T=_.slice(0,$+1).every(W=>!p0(W.route,j,F))}else T=_.every($=>!p0($.route,j,F))}else{T=!1,_=[];let j=Yt(null,s,t.history.location.pathname);j.active&&j.matches&&(_=j.matches)}let k,P={historyAction:t.history.action,location:t.history.location,matches:_,initialized:T,navigation:Ag,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||w,fetchers:new Map,blockers:new Map},V="POP",S=!1,m,E=!1,A=new Map,D=null,R=!1,b=!1,q=new Set,z=new Map,ee=0,J=-1,B=new Map,Q=new Set,L=new Map,O=new Map,H=new Set,se=new Map,ue,he=null;function be(){if(f=t.history.listen(({action:j,location:F,delta:$})=>{if(ue){ue(),ue=void 0;return}Nr(se.size===0||$!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let W=Fr({currentLocation:P.location,nextLocation:F,historyAction:j});if(W&&$!=null){let K=new Promise(ne=>{ue=ne});t.history.go($*-1),Or(W,{state:"blocked",location:F,proceed(){Or(W,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),K.then(()=>t.history.go($))},reset(){let ne=new Map(P.blockers);ne.set(W,Ku),ve({blockers:ne})}});return}return Ce(j,F)}),n){lL(e,A);let j=()=>uL(e,A);e.addEventListener("pagehide",j),D=()=>e.removeEventListener("pagehide",j)}return P.initialized||Ce("POP",P.location,{initialHydration:!0}),k}function we(){f&&f(),D&&D(),d.clear(),m&&m.abort(),P.fetchers.forEach((j,F)=>Gt(F)),P.blockers.forEach((j,F)=>Lr(F))}function Me(j){return d.add(j),()=>d.delete(j)}function ve(j,F={}){P={...P,...j};let $=[],W=[];P.fetchers.forEach((K,ne)=>{K.state==="idle"&&(H.has(ne)?$.push(ne):W.push(ne))}),[...d].forEach(K=>K(P,{deletedFetchers:$,viewTransitionOpts:F.viewTransitionOpts,flushSync:F.flushSync===!0})),$.forEach(K=>Gt(K)),W.forEach(K=>P.fetchers.delete(K))}function Ze(j,F,{flushSync:$}={}){var X,fe;let W=P.actionData!=null&&P.navigation.formMethod!=null&&Mi(P.navigation.formMethod)&&P.navigation.state==="loading"&&((X=j.state)==null?void 0:X._isRedirect)!==!0,K;F.actionData?Object.keys(F.actionData).length>0?K=F.actionData:K=null:W?K=P.actionData:K=null;let ne=F.loaderData?BT(P.loaderData,F.loaderData,F.matches||[],F.errors):P.loaderData,re=P.blockers;re.size>0&&(re=new Map(re),re.forEach((ye,xe)=>re.set(xe,Ku)));let te=S===!0||P.navigation.formMethod!=null&&Mi(P.navigation.formMethod)&&((fe=j.state)==null?void 0:fe._isRedirect)!==!0;o&&(s=o,o=void 0),R||V==="POP"||(V==="PUSH"?t.history.push(j,j.state):V==="REPLACE"&&t.history.replace(j,j.state));let le;if(V==="POP"){let ye=A.get(P.location.pathname);ye&&ye.has(j.pathname)?le={currentLocation:P.location,nextLocation:j}:A.has(j.pathname)&&(le={currentLocation:j,nextLocation:P.location})}else if(E){let ye=A.get(P.location.pathname);ye?ye.add(j.pathname):(ye=new Set([j.pathname]),A.set(P.location.pathname,ye)),le={currentLocation:P.location,nextLocation:j}}ve({...F,actionData:K,loaderData:ne,historyAction:V,location:j,initialized:!0,navigation:Ag,revalidation:"idle",restoreScrollPosition:fn(j,F.matches||P.matches),preventScrollReset:te,blockers:re},{viewTransitionOpts:le,flushSync:$===!0}),V="POP",S=!1,E=!1,R=!1,b=!1,he==null||he.resolve(),he=null}async function Et(j,F){if(typeof j=="number"){t.history.go(j);return}let $=d0(P.location,P.matches,a,j,F==null?void 0:F.fromRouteId,F==null?void 0:F.relative),{path:W,submission:K,error:ne}=NT(!1,$,F),re=P.location,te=_h(P.location,W,F&&F.state);te={...te,...t.history.encodeLocation(te)};let le=F&&F.replace!=null?F.replace:void 0,X="PUSH";le===!0?X="REPLACE":le===!1||K!=null&&Mi(K.formMethod)&&K.formAction===P.location.pathname+P.location.search&&(X="REPLACE");let fe=F&&"preventScrollReset"in F?F.preventScrollReset===!0:void 0,ye=(F&&F.flushSync)===!0,xe=Fr({currentLocation:re,nextLocation:te,historyAction:X});if(xe){Or(xe,{state:"blocked",location:te,proceed(){Or(xe,{state:"proceeding",proceed:void 0,reset:void 0,location:te}),Et(j,F)},reset(){let Pe=new Map(P.blockers);Pe.set(xe,Ku),ve({blockers:Pe})}});return}await Ce(X,te,{submission:K,pendingError:ne,preventScrollReset:fe,replace:F&&F.replace,enableViewTransition:F&&F.viewTransition,flushSync:ye})}function qt(){he||(he=cL()),Zn(),ve({revalidation:"loading"});let j=he.promise;return P.navigation.state==="submitting"?j:P.navigation.state==="idle"?(Ce(P.historyAction,P.location,{startUninterruptedRevalidation:!0}),j):(Ce(V||P.historyAction,P.navigation.location,{overrideNavigation:P.navigation,enableViewTransition:E===!0}),j)}async function Ce(j,F,$){m&&m.abort(),m=null,V=j,R=($&&$.startUninterruptedRevalidation)===!0,sn(P.location,P.matches),S=($&&$.preventScrollReset)===!0,E=($&&$.enableViewTransition)===!0;let W=o||s,K=$&&$.overrideNavigation,ne=Js(W,F,a),re=($&&$.flushSync)===!0,te=Yt(ne,W,F.pathname);if(te.active&&te.matches&&(ne=te.matches),!ne){let{error:_e,notFoundMatches:ke,route:Te}=er(F.pathname);Ze(F,{matches:ke,loaderData:{},errors:{[Te.id]:_e}},{flushSync:re});return}if(P.initialized&&!b&&rL(P.location,F)&&!($&&$.submission&&Mi($.submission.formMethod))){Ze(F,{matches:ne},{flushSync:re});return}m=new AbortController;let le=Ga(t.history,F,m.signal,$&&$.submission),X;if($&&$.pendingError)X=[ea(ne).route.id,{type:"error",error:$.pendingError}];else if($&&$.submission&&Mi($.submission.formMethod)){let _e=await at(le,F,$.submission,ne,te.active,{replace:$.replace,flushSync:re});if(_e.shortCircuited)return;if(_e.pendingActionResult){let[ke,Te]=_e.pendingActionResult;if(qr(Te)&&wm(Te.error)&&Te.error.status===404){m=null,Ze(F,{matches:_e.matches,loaderData:{},errors:{[ke]:Te.error}});return}}ne=_e.matches||ne,X=_e.pendingActionResult,K=Rg(F,$.submission),re=!1,te.active=!1,le=Ga(t.history,le.url,le.signal)}let{shortCircuited:fe,matches:ye,loaderData:xe,errors:Pe}=await Kt(le,F,ne,te.active,K,$&&$.submission,$&&$.fetcherSubmission,$&&$.replace,$&&$.initialHydration===!0,re,X);fe||(m=null,Ze(F,{matches:ye||ne,...UT(X),loaderData:xe,errors:Pe}))}async function at(j,F,$,W,K,ne={}){Zn();let re=oL(F,$);if(ve({navigation:re},{flushSync:ne.flushSync===!0}),K){let X=await Qt(W,F.pathname,j.signal);if(X.type==="aborted")return{shortCircuited:!0};if(X.type==="error"){let fe=ea(X.partialMatches).route.id;return{matches:X.partialMatches,pendingActionResult:[fe,{type:"error",error:X.error}]}}else if(X.matches)W=X.matches;else{let{notFoundMatches:fe,error:ye,route:xe}=er(F.pathname);return{matches:fe,pendingActionResult:[xe.id,{type:"error",error:ye}]}}}let te,le=hc(W,F);if(!le.route.action&&!le.route.lazy)te={type:"error",error:ui(405,{method:j.method,pathname:F.pathname,routeId:le.route.id})};else if(te=(await Tn("action",P,j,[le],W,null))[le.route.id],j.signal.aborted)return{shortCircuited:!0};if(ia(te)){let X;return ne&&ne.replace!=null?X=ne.replace:X=jT(te.response.headers.get("Location"),new URL(j.url),a)===P.location.pathname+P.location.search,await Ye(j,te,!0,{submission:$,replace:X}),{shortCircuited:!0}}if(qr(te)){let X=ea(W,le.route.id);return(ne&&ne.replace)!==!0&&(V="PUSH"),{matches:W,pendingActionResult:[X.route.id,te]}}return{matches:W,pendingActionResult:[le.route.id,te]}}async function Kt(j,F,$,W,K,ne,re,te,le,X,fe){let ye=K||Rg(F,ne),xe=ne||re||qT(ye),Pe=!R&&!le;if(W){if(Pe){let dt=rn(fe);ve({navigation:ye,...dt!==void 0?{actionData:dt}:{}},{flushSync:X})}let De=await Qt($,F.pathname,j.signal);if(De.type==="aborted")return{shortCircuited:!0};if(De.type==="error"){let dt=ea(De.partialMatches).route.id;return{matches:De.partialMatches,loaderData:{},errors:{[dt]:De.error}}}else if(De.matches)$=De.matches;else{let{error:dt,notFoundMatches:tr,route:nr}=er(F.pathname);return{matches:tr,loaderData:{},errors:{[nr.id]:dt}}}}let _e=o||s,[ke,Te]=LT(t.history,P,$,xe,F,le===!0,b,q,H,L,Q,_e,a,fe);if(J=++ee,ke.length===0&&Te.length===0){let De=st();return Ze(F,{matches:$,loaderData:{},errors:fe&&qr(fe[1])?{[fe[0]]:fe[1].error}:null,...UT(fe),...De?{fetchers:new Map(P.fetchers)}:{}},{flushSync:X}),{shortCircuited:!0}}if(Pe){let De={};if(!W){De.navigation=ye;let dt=rn(fe);dt!==void 0&&(De.actionData=dt)}Te.length>0&&(De.fetchers=G(Te)),ve(De,{flushSync:X})}Te.forEach(De=>{jt(De.key),De.controller&&z.set(De.key,De.controller)});let bt=()=>Te.forEach(De=>jt(De.key));m&&m.signal.addEventListener("abort",bt);let{loaderResults:on,fetcherResults:nt}=await Jn(P,$,ke,Te,j);if(j.signal.aborted)return{shortCircuited:!0};m&&m.signal.removeEventListener("abort",bt),Te.forEach(De=>z.delete(De.key));let et=Ff(on);if(et)return await Ye(j,et.result,!0,{replace:te}),{shortCircuited:!0};if(et=Ff(nt),et)return Q.add(et.key),await Ye(j,et.result,!0,{replace:te}),{shortCircuited:!0};let{loaderData:St,errors:Nn}=zT(P,$,on,fe,Te,nt);le&&P.errors&&(Nn={...P.errors,...Nn});let xr=st(),ft=Ui(J),lt=xr||ft||Te.length>0;return{matches:$,loaderData:St,errors:Nn,...lt?{fetchers:new Map(P.fetchers)}:{}}}function rn(j){if(j&&!qr(j[1]))return{[j[0]]:j[1].data};if(P.actionData)return Object.keys(P.actionData).length===0?null:P.actionData}function G(j){return j.forEach(F=>{let $=P.fetchers.get(F.key),W=Gu(void 0,$?$.data:void 0);P.fetchers.set(F.key,W)}),new Map(P.fetchers)}async function xn(j,F,$,W){jt(j);let K=(W&&W.flushSync)===!0,ne=o||s,re=d0(P.location,P.matches,a,$,F,W==null?void 0:W.relative),te=Js(ne,re,a),le=Yt(te,ne,re);if(le.active&&le.matches&&(te=le.matches),!te){Ue(j,F,ui(404,{pathname:re}),{flushSync:K});return}let{path:X,submission:fe,error:ye}=NT(!0,re,W);if(ye){Ue(j,F,ye,{flushSync:K});return}let xe=hc(te,X),Pe=(W&&W.preventScrollReset)===!0;if(fe&&Mi(fe.formMethod)){await vr(j,F,X,xe,te,le.active,K,Pe,fe);return}L.set(j,{routeId:F,path:X}),await _r(j,F,X,xe,te,le.active,K,Pe,fe)}async function vr(j,F,$,W,K,ne,re,te,le){Zn(),L.delete(j);function X(Qe){if(!Qe.route.action&&!Qe.route.lazy){let rr=ui(405,{method:le.formMethod,pathname:$,routeId:F});return Ue(j,F,rr,{flushSync:re}),!0}return!1}if(!ne&&X(W))return;let fe=P.fetchers.get(j);rt(j,aL(le,fe),{flushSync:re});let ye=new AbortController,xe=Ga(t.history,$,ye.signal,le);if(ne){let Qe=await Qt(K,$,xe.signal);if(Qe.type==="aborted")return;if(Qe.type==="error"){Ue(j,F,Qe.error,{flushSync:re});return}else if(Qe.matches){if(K=Qe.matches,W=hc(K,$),X(W))return}else{Ue(j,F,ui(404,{pathname:$}),{flushSync:re});return}}z.set(j,ye);let Pe=ee,ke=(await Tn("action",P,xe,[W],K,j))[W.route.id];if(xe.signal.aborted){z.get(j)===ye&&z.delete(j);return}if(H.has(j)){if(ia(ke)||qr(ke)){rt(j,Ws(void 0));return}}else{if(ia(ke))if(z.delete(j),J>Pe){rt(j,Ws(void 0));return}else return Q.add(j),rt(j,Gu(le)),Ye(xe,ke,!1,{fetcherSubmission:le,preventScrollReset:te});if(qr(ke)){Ue(j,F,ke.error);return}}let Te=P.navigation.location||P.location,bt=Ga(t.history,Te,ye.signal),on=o||s,nt=P.navigation.state!=="idle"?Js(on,P.navigation.location,a):P.matches;Be(nt,"Didn't find any matches after fetcher action");let et=++ee;B.set(j,et);let St=Gu(le,ke.data);P.fetchers.set(j,St);let[Nn,xr]=LT(t.history,P,nt,le,Te,!1,b,q,H,L,Q,on,a,[W.route.id,ke]);xr.filter(Qe=>Qe.key!==j).forEach(Qe=>{let rr=Qe.key,Hi=P.fetchers.get(rr),$r=Gu(void 0,Hi?Hi.data:void 0);P.fetchers.set(rr,$r),jt(rr),Qe.controller&&z.set(rr,Qe.controller)}),ve({fetchers:new Map(P.fetchers)});let ft=()=>xr.forEach(Qe=>jt(Qe.key));ye.signal.addEventListener("abort",ft);let{loaderResults:lt,fetcherResults:De}=await Jn(P,nt,Nn,xr,bt);if(ye.signal.aborted)return;ye.signal.removeEventListener("abort",ft),B.delete(j),z.delete(j),xr.forEach(Qe=>z.delete(Qe.key));let dt=Ff(lt);if(dt)return Ye(bt,dt.result,!1,{preventScrollReset:te});if(dt=Ff(De),dt)return Q.add(dt.key),Ye(bt,dt.result,!1,{preventScrollReset:te});let{loaderData:tr,errors:nr}=zT(P,nt,lt,void 0,xr,De);if(P.fetchers.has(j)){let Qe=Ws(ke.data);P.fetchers.set(j,Qe)}Ui(et),P.navigation.state==="loading"&&et>J?(Be(V,"Expected pending action"),m&&m.abort(),Ze(P.navigation.location,{matches:nt,loaderData:tr,errors:nr,fetchers:new Map(P.fetchers)})):(ve({errors:nr,loaderData:BT(P.loaderData,tr,nt,nr),fetchers:new Map(P.fetchers)}),b=!1)}async function _r(j,F,$,W,K,ne,re,te,le){let X=P.fetchers.get(j);rt(j,Gu(le,X?X.data:void 0),{flushSync:re});let fe=new AbortController,ye=Ga(t.history,$,fe.signal);if(ne){let ke=await Qt(K,$,ye.signal);if(ke.type==="aborted")return;if(ke.type==="error"){Ue(j,F,ke.error,{flushSync:re});return}else if(ke.matches)K=ke.matches,W=hc(K,$);else{Ue(j,F,ui(404,{pathname:$}),{flushSync:re});return}}z.set(j,fe);let xe=ee,_e=(await Tn("loader",P,ye,[W],K,j))[W.route.id];if(z.get(j)===fe&&z.delete(j),!ye.signal.aborted){if(H.has(j)){rt(j,Ws(void 0));return}if(ia(_e))if(J>xe){rt(j,Ws(void 0));return}else{Q.add(j),await Ye(ye,_e,!1,{preventScrollReset:te});return}if(qr(_e)){Ue(j,F,_e.error);return}rt(j,Ws(_e.data))}}async function Ye(j,F,$,{submission:W,fetcherSubmission:K,preventScrollReset:ne,replace:re}={}){F.response.headers.has("X-Remix-Revalidate")&&(b=!0);let te=F.response.headers.get("Location");Be(te,"Expected a Location header on the redirect Response"),te=jT(te,new URL(j.url),a);let le=_h(P.location,te,{_isRedirect:!0});if(n){let _e=!1;if(F.response.headers.has("X-Remix-Reload-Document"))_e=!0;else if(B_.test(te)){const ke=t.history.createURL(te);_e=ke.origin!==e.location.origin||Fi(ke.pathname,a)==null}if(_e){re?e.location.replace(te):e.location.assign(te);return}}m=null;let X=re===!0||F.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:fe,formAction:ye,formEncType:xe}=P.navigation;!W&&!K&&fe&&ye&&xe&&(W=qT(P.navigation));let Pe=W||K;if(U4.has(F.response.status)&&Pe&&Mi(Pe.formMethod))await Ce(X,le,{submission:{...Pe,formAction:te},preventScrollReset:ne||S,enableViewTransition:$?E:void 0});else{let _e=Rg(le,W);await Ce(X,le,{overrideNavigation:_e,fetcherSubmission:K,preventScrollReset:ne||S,enableViewTransition:$?E:void 0})}}async function Tn(j,F,$,W,K,ne){let re,te={};try{re=await J4(l,j,F,$,W,K,ne,i,r)}catch(le){return W.forEach(X=>{te[X.route.id]={type:"error",error:le}}),te}for(let[le,X]of Object.entries(re))if(iL(X)){let fe=X.result;te[le]={type:"redirect",response:tL(fe,$,le,K,a)}}else te[le]=await eL(X);return te}async function Jn(j,F,$,W,K){let ne=Tn("loader",j,K,$,F,null),re=Promise.all(W.map(async X=>{if(X.matches&&X.match&&X.controller){let ye=(await Tn("loader",j,Ga(t.history,X.path,X.controller.signal),[X.match],X.matches,X.key))[X.match.route.id];return{[X.key]:ye}}else return Promise.resolve({[X.key]:{type:"error",error:ui(404,{pathname:X.path})}})})),te=await ne,le=(await re).reduce((X,fe)=>Object.assign(X,fe),{});return{loaderResults:te,fetcherResults:le}}function Zn(){b=!0,L.forEach((j,F)=>{z.has(F)&&q.add(F),jt(F)})}function rt(j,F,$={}){P.fetchers.set(j,F),ve({fetchers:new Map(P.fetchers)},{flushSync:($&&$.flushSync)===!0})}function Ue(j,F,$,W={}){let K=ea(P.matches,F);Gt(j),ve({errors:{[K.route.id]:$},fetchers:new Map(P.fetchers)},{flushSync:(W&&W.flushSync)===!0})}function Ne(j){return O.set(j,(O.get(j)||0)+1),H.has(j)&&H.delete(j),P.fetchers.get(j)||H4}function Gt(j){let F=P.fetchers.get(j);z.has(j)&&!(F&&F.state==="loading"&&B.has(j))&&jt(j),L.delete(j),B.delete(j),Q.delete(j),H.delete(j),q.delete(j),P.fetchers.delete(j)}function En(j){let F=(O.get(j)||0)-1;F<=0?(O.delete(j),H.add(j)):O.set(j,F),ve({fetchers:new Map(P.fetchers)})}function jt(j){let F=z.get(j);F&&(F.abort(),z.delete(j))}function Bi(j){for(let F of j){let $=Ne(F),W=Ws($.data);P.fetchers.set(F,W)}}function st(){let j=[],F=!1;for(let $ of Q){let W=P.fetchers.get($);Be(W,`Expected fetcher: ${$}`),W.state==="loading"&&(Q.delete($),j.push($),F=!0)}return Bi(j),F}function Ui(j){let F=[];for(let[$,W]of B)if(W<j){let K=P.fetchers.get($);Be(K,`Expected fetcher: ${$}`),K.state==="loading"&&(jt($),B.delete($),F.push($))}return Bi(F),F.length>0}function wr(j,F){let $=P.blockers.get(j)||Ku;return se.get(j)!==F&&se.set(j,F),$}function Lr(j){P.blockers.delete(j),se.delete(j)}function Or(j,F){let $=P.blockers.get(j)||Ku;Be($.state==="unblocked"&&F.state==="blocked"||$.state==="blocked"&&F.state==="blocked"||$.state==="blocked"&&F.state==="proceeding"||$.state==="blocked"&&F.state==="unblocked"||$.state==="proceeding"&&F.state==="unblocked",`Invalid blocker state transition: ${$.state} -> ${F.state}`);let W=new Map(P.blockers);W.set(j,F),ve({blockers:W})}function Fr({currentLocation:j,nextLocation:F,historyAction:$}){if(se.size===0)return;se.size>1&&Nr(!1,"A router only supports one blocker at a time");let W=Array.from(se.entries()),[K,ne]=W[W.length-1],re=P.blockers.get(K);if(!(re&&re.state==="proceeding")&&ne({currentLocation:j,nextLocation:F,historyAction:$}))return K}function er(j){let F=ui(404,{pathname:j}),$=o||s,{matches:W,route:K}=HT($);return{notFoundMatches:W,route:K,error:F}}function Ie(j,F,$){if(p=j,y=F,v=$||null,!C&&P.navigation===Ag){C=!0;let W=fn(P.location,P.matches);W!=null&&ve({restoreScrollPosition:W})}return()=>{p=null,y=null,v=null}}function jr(j,F){return v&&v(j,F.map(W=>x4(W,P.loaderData)))||j.key}function sn(j,F){if(p&&y){let $=jr(j,F);p[$]=y()}}function fn(j,F){if(p){let $=jr(j,F),W=p[$];if(typeof W=="number")return W}return null}function Yt(j,F,$){if(u)if(j){if(Object.keys(j[0].params).length>0)return{active:!0,matches:Rd(F,$,a,!0)}}else return{active:!0,matches:Rd(F,$,a,!0)||[]};return{active:!1,matches:null}}async function Qt(j,F,$){if(!u)return{type:"success",matches:j};let W=j;for(;;){let K=o==null,ne=o||s,re=i;try{await u({path:F,matches:W,patch:(X,fe)=>{$.aborted||FT(X,fe,ne,re,r)}})}catch(X){return{type:"error",error:X,partialMatches:W}}finally{K&&!$.aborted&&(s=[...s])}if($.aborted)return{type:"aborted"};let te=Js(ne,F,a);if(te)return{type:"success",matches:te};let le=Rd(ne,F,a,!0);if(!le||W.length===le.length&&W.every((X,fe)=>X.route.id===le[fe].route.id))return{type:"success",matches:null};W=le}}function Si(j){i={},o=xp(j,r,void 0,i)}function Mn(j,F){let $=o==null;FT(j,F,o||s,i,r),$&&(s=[...s],ve({}))}return k={get basename(){return a},get future(){return h},get state(){return P},get routes(){return s},get window(){return e},initialize:be,subscribe:Me,enableScrollRestoration:Ie,navigate:Et,fetch:xn,revalidate:qt,createHref:j=>t.history.createHref(j),encodeLocation:j=>t.history.encodeLocation(j),getFetcher:Ne,deleteFetcher:En,dispose:we,getBlocker:wr,deleteBlocker:Lr,patchRoutes:Mn,_internalFetchControllers:z,_internalSetRoutes:Si},k}function K4(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function d0(t,e,n,r,i,s){let o,a;if(i){o=[];for(let u of e)if(o.push(u),u.route.id===i){a=u;break}}else o=e,a=e[e.length-1];let l=_m(r||".",vm(o),Fi(t.pathname,n)||t.pathname,s==="path");if(r==null&&(l.search=t.search,l.hash=t.hash),(r==null||r===""||r===".")&&a){let u=U_(l.search);if(a.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!a.route.index&&u){let h=new URLSearchParams(l.search),f=h.getAll("index");h.delete("index"),f.filter(p=>p).forEach(p=>h.append("index",p));let d=h.toString();l.search=d?`?${d}`:""}}return n!=="/"&&(l.pathname=l.pathname==="/"?n:is([n,l.pathname])),bo(l)}function NT(t,e,n){if(!n||!K4(n))return{path:e};if(n.formMethod&&!sL(n.formMethod))return{path:e,error:ui(405,{method:n.formMethod})};let r=()=>({path:e,error:ui(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),o=HA(e);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Mi(s))return r();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((d,[p,v])=>`${d}${p}=${v} `,""):String(n.body);return{path:e,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Mi(s))return r();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:e,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return r()}}}Be(typeof FormData=="function","FormData is not available in this environment");let a,l;if(n.formData)a=m0(n.formData),l=n.formData;else if(n.body instanceof FormData)a=m0(n.body),l=n.body;else if(n.body instanceof URLSearchParams)a=n.body,l=$T(a);else if(n.body==null)a=new URLSearchParams,l=new FormData;else try{a=new URLSearchParams(n.body),l=$T(a)}catch{return r()}let u={formMethod:s,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Mi(u.formMethod))return{path:e,submission:u};let h=Os(e);return t&&h.search&&U_(h.search)&&a.append("index",""),h.search=`?${a}`,{path:bo(h),submission:u}}function VT(t,e,n=!1){let r=t.findIndex(i=>i.route.id===e);return r>=0?t.slice(0,n?r+1:r):t}function LT(t,e,n,r,i,s,o,a,l,u,h,f,d,p){let v=p?qr(p[1])?p[1].error:p[1].data:void 0,y=t.createURL(e.location),C=t.createURL(i),_=n;s&&e.errors?_=VT(n,Object.keys(e.errors)[0],!0):p&&qr(p[1])&&(_=VT(n,p[0]));let w=p?p[1].statusCode:void 0,T=w&&w>=400,k=_.filter((V,S)=>{let{route:m}=V;if(m.lazy)return!0;if(m.loader==null)return!1;if(s)return p0(m,e.loaderData,e.errors);if(G4(e.loaderData,e.matches[S],V))return!0;let E=e.matches[S],A=V;return OT(V,{currentUrl:y,currentParams:E.params,nextUrl:C,nextParams:A.params,...r,actionResult:v,actionStatus:w,defaultShouldRevalidate:T?!1:o||y.pathname+y.search===C.pathname+C.search||y.search!==C.search||Y4(E,A)})}),P=[];return u.forEach((V,S)=>{if(s||!n.some(R=>R.route.id===V.routeId)||l.has(S))return;let m=Js(f,V.path,d);if(!m){P.push({key:S,routeId:V.routeId,path:V.path,matches:null,match:null,controller:null});return}let E=e.fetchers.get(S),A=hc(m,V.path),D=!1;h.has(S)?D=!1:a.has(S)?(a.delete(S),D=!0):E&&E.state!=="idle"&&E.data===void 0?D=o:D=OT(A,{currentUrl:y,currentParams:e.matches[e.matches.length-1].params,nextUrl:C,nextParams:n[n.length-1].params,...r,actionResult:v,actionStatus:w,defaultShouldRevalidate:T?!1:o}),D&&P.push({key:S,routeId:V.routeId,path:V.path,matches:m,match:A,controller:new AbortController})}),[k,P]}function p0(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let r=e!=null&&e[t.id]!==void 0,i=n!=null&&n[t.id]!==void 0;return!r&&i?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!i}function G4(t,e,n){let r=!e||n.route.id!==e.route.id,i=!t.hasOwnProperty(n.route.id);return r||i}function Y4(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function OT(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function FT(t,e,n,r,i){let s;if(t){let l=r[t];Be(l,`No route found to patch children into: routeId = ${t}`),l.children||(l.children=[]),s=l.children}else s=n;let o=e.filter(l=>!s.some(u=>UA(l,u))),a=xp(o,i,[t||"_","patch",String((s==null?void 0:s.length)||"0")],r);s.push(...a)}function UA(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var i;return(i=e.children)==null?void 0:i.some(s=>UA(n,s))}):!1}async function Q4(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let i=n[t.id];Be(i,"No route found in manifest");let s={};for(let o in r){let l=i[o]!==void 0&&o!=="hasErrorBoundary";Nr(!l,`Route "${i.id}" has a static property "${o}" defined but its lazy function is also returning a value for this property. The lazy route property "${o}" will be ignored.`),!l&&!_4.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,{...e(i),lazy:void 0})}async function X4({matches:t}){let e=t.filter(r=>r.shouldLoad);return(await Promise.all(e.map(r=>r.resolve()))).reduce((r,i,s)=>Object.assign(r,{[e[s].route.id]:i}),{})}async function J4(t,e,n,r,i,s,o,a,l,u){let h=s.map(p=>p.route.lazy?Q4(p.route,l,a):void 0),f=s.map((p,v)=>{let y=h[v],C=i.some(w=>w.route.id===p.route.id);return{...p,shouldLoad:C,resolve:async w=>(w&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(C=!0),C?Z4(e,r,p,y,w,u):Promise.resolve({type:"data",result:void 0}))}}),d=await t({matches:f,request:r,params:s[0].params,fetcherKey:o,context:u});try{await Promise.all(h)}catch{}return d}async function Z4(t,e,n,r,i,s){let o,a,l=u=>{let h,f=new Promise((v,y)=>h=y);a=()=>h(),e.signal.addEventListener("abort",a);let d=v=>typeof u!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${t}" [routeId: ${n.route.id}]`)):u({request:e,params:n.params,context:s},...v!==void 0?[v]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(y=>d(y)):d())}}catch(v){return{type:"error",result:v}}})();return Promise.race([p,f])};try{let u=n.route[t];if(r)if(u){let h,[f]=await Promise.all([l(u).catch(d=>{h=d}),r]);if(h!==void 0)throw h;o=f}else if(await r,u=n.route[t],u)o=await l(u);else if(t==="action"){let h=new URL(e.url),f=h.pathname+h.search;throw ui(405,{method:e.method,pathname:f,routeId:n.route.id})}else return{type:"data",result:void 0};else if(u)o=await l(u);else{let h=new URL(e.url),f=h.pathname+h.search;throw ui(404,{pathname:f})}}catch(u){return{type:"error",result:u}}finally{a&&e.signal.removeEventListener("abort",a)}return o}async function eL(t){var r,i,s,o;let{result:e,type:n}=t;if(WA(e)){let a;try{let l=e.headers.get("Content-Type");l&&/\bapplication\/json\b/.test(l)?e.body==null?a=null:a=await e.json():a=await e.text()}catch(l){return{type:"error",error:l}}return n==="error"?{type:"error",error:new Ep(e.status,e.statusText,a),statusCode:e.status,headers:e.headers}:{type:"data",data:a,statusCode:e.status,headers:e.headers}}if(n==="error"){if(WT(e)){if(e.data instanceof Error)return{type:"error",error:e.data,statusCode:(r=e.init)==null?void 0:r.status};e=new Ep(((i=e.init)==null?void 0:i.status)||500,void 0,e.data)}return{type:"error",error:e,statusCode:wm(e)?e.status:void 0}}return WT(e)?{type:"data",data:e.data,statusCode:(s=e.init)==null?void 0:s.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}:{type:"data",data:e}}function tL(t,e,n,r,i){let s=t.headers.get("Location");if(Be(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!B_.test(s)){let o=r.slice(0,r.findIndex(a=>a.route.id===n)+1);s=d0(new URL(e.url),o,i,s),t.headers.set("Location",s)}return t}function jT(t,e,n){if(B_.test(t)){let r=t,i=r.startsWith("//")?new URL(e.protocol+r):new URL(r),s=Fi(i.pathname,n)!=null;if(i.origin===e.origin&&s)return i.pathname+i.search+i.hash}return t}function Ga(t,e,n,r){let i=t.createURL(HA(e)).toString(),s={signal:n};if(r&&Mi(r.formMethod)){let{formMethod:o,formEncType:a}=r;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=m0(r.formData):s.body=r.formData}return new Request(i,s)}function m0(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function $T(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function nL(t,e,n,r=!1,i=!1){let s={},o=null,a,l=!1,u={},h=n&&qr(n[1])?n[1].error:void 0;return t.forEach(f=>{if(!(f.route.id in e))return;let d=f.route.id,p=e[d];if(Be(!ia(p),"Cannot handle redirect results in processLoaderData"),qr(p)){let v=p.error;if(h!==void 0&&(v=h,h=void 0),o=o||{},i)o[d]=v;else{let y=ea(t,d);o[y.route.id]==null&&(o[y.route.id]=v)}r||(s[d]=BA),l||(l=!0,a=wm(p.error)?p.error.status:500),p.headers&&(u[d]=p.headers)}else s[d]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(u[d]=p.headers)}),h!==void 0&&n&&(o={[n[0]]:h},s[n[0]]=void 0),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:u}}function zT(t,e,n,r,i,s){let{loaderData:o,errors:a}=nL(e,n,r);return i.forEach(l=>{let{key:u,match:h,controller:f}=l,d=s[u];if(Be(d,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(qr(d)){let p=ea(t.matches,h==null?void 0:h.route.id);a&&a[p.route.id]||(a={...a,[p.route.id]:d.error}),t.fetchers.delete(u)}else if(ia(d))Be(!1,"Unhandled fetcher revalidation redirect");else{let p=Ws(d.data);t.fetchers.set(u,p)}}),{loaderData:o,errors:a}}function BT(t,e,n,r){let i=Object.entries(e).filter(([,s])=>s!==BA).reduce((s,[o,a])=>(s[o]=a,s),{});for(let s of n){let o=s.route.id;if(!e.hasOwnProperty(o)&&t.hasOwnProperty(o)&&s.route.loader&&(i[o]=t[o]),r&&r.hasOwnProperty(o))break}return i}function UT(t){return t?qr(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ea(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function HT(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function ui(t,{pathname:e,routeId:n,method:r,type:i,message:s}={}){let o="Unknown Server Error",a="Unknown @remix-run/router error";return t===400?(o="Bad Request",r&&e&&n?a=`You made a ${r} request to "${e}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(a="Unable to encode submission body")):t===403?(o="Forbidden",a=`Route "${n}" does not match URL "${e}"`):t===404?(o="Not Found",a=`No route matches URL "${e}"`):t===405&&(o="Method Not Allowed",r&&e&&n?a=`You made a ${r.toUpperCase()} request to "${e}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(a=`Invalid request method "${r.toUpperCase()}"`)),new Ep(t||500,o,new Error(a),!0)}function Ff(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,i]=e[n];if(ia(i))return{key:r,result:i}}}function HA(t){let e=typeof t=="string"?Os(t):t;return bo({...e,hash:""})}function rL(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function iL(t){return WA(t.result)&&B4.has(t.result.status)}function qr(t){return t.type==="error"}function ia(t){return(t&&t.type)==="redirect"}function WT(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function WA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function sL(t){return z4.has(t.toUpperCase())}function Mi(t){return j4.has(t.toUpperCase())}function U_(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function hc(t,e){let n=typeof e=="string"?Os(e).search:e.search;if(t[t.length-1].route.index&&U_(n||""))return t[t.length-1];let r=jA(t);return r[r.length-1]}function qT(t){let{formMethod:e,formAction:n,formEncType:r,text:i,formData:s,json:o}=t;if(!(!e||!n||!r)){if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Rg(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function oL(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Gu(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function aL(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ws(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function lL(t,e){try{let n=t.sessionStorage.getItem(zA);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function uL(t,e){if(e.size>0){let n={};for(let[r,i]of e)n[r]=[...i];try{t.sessionStorage.setItem(zA,JSON.stringify(n))}catch(r){Nr(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function cL(){let t,e,n=new Promise((r,i)=>{t=async s=>{r(s);try{await n}catch{}},e=async s=>{i(s);try{await n}catch{}}});return{promise:n,resolve:t,reject:e}}var ja=N.createContext(null);ja.displayName="DataRouter";var Jh=N.createContext(null);Jh.displayName="DataRouterState";var H_=N.createContext({isTransitioning:!1});H_.displayName="ViewTransition";var qA=N.createContext(new Map);qA.displayName="Fetchers";var hL=N.createContext(null);hL.displayName="Await";var $i=N.createContext(null);$i.displayName="Navigation";var xm=N.createContext(null);xm.displayName="Location";var zi=N.createContext({outlet:null,matches:[],isDataRoute:!1});zi.displayName="Route";var W_=N.createContext(null);W_.displayName="RouteError";function fL(t,{relative:e}={}){Be(wu(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=N.useContext($i),{hash:i,pathname:s,search:o}=Zh(t,{relative:e}),a=s;return n!=="/"&&(a=s==="/"?n:is([n,s])),r.createHref({pathname:a,search:o,hash:i})}function wu(){return N.useContext(xm)!=null}function Fo(){return Be(wu(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(xm).location}var KA="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function GA(t){N.useContext($i).static||N.useLayoutEffect(t)}function YA(){let{isDataRoute:t}=N.useContext(zi);return t?PL():dL()}function dL(){Be(wu(),"useNavigate() may be used only in the context of a <Router> component.");let t=N.useContext(ja),{basename:e,navigator:n}=N.useContext($i),{matches:r}=N.useContext(zi),{pathname:i}=Fo(),s=JSON.stringify(vm(r)),o=N.useRef(!1);return GA(()=>{o.current=!0}),N.useCallback((l,u={})=>{if(Nr(o.current,KA),!o.current)return;if(typeof l=="number"){n.go(l);return}let h=_m(l,JSON.parse(s),i,u.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:is([e,h.pathname])),(u.replace?n.replace:n.push)(h,u.state,u)},[e,n,s,i,t])}var pL=N.createContext(null);function mL(t){let e=N.useContext(zi).outlet;return e&&N.createElement(pL.Provider,{value:t},e)}function Zh(t,{relative:e}={}){let{matches:n}=N.useContext(zi),{pathname:r}=Fo(),i=JSON.stringify(vm(n));return N.useMemo(()=>_m(t,JSON.parse(i),r,e==="path"),[t,i,r,e])}function gL(t,e,n,r){Be(wu(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=N.useContext($i),{matches:s}=N.useContext(zi),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Fo(),h;h=u;let f=h.pathname||"/",d=f;if(l!=="/"){let y=l.replace(/^\//,"").split("/");d="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=Js(t,{pathname:d});return xL(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},a,y.params),pathname:is([l,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?l:is([l,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),s,n,r)}function yL(){let t=CL(),e=wm(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},e),n?N.createElement("pre",{style:i},n):null,null)}var vL=N.createElement(yL,null),_L=class extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){console.error("React Router caught the following error during render",t,e)}render(){return this.state.error!==void 0?N.createElement(zi.Provider,{value:this.props.routeContext},N.createElement(W_.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function wL({routeContext:t,match:e,children:n}){let r=N.useContext(ja);return r&&r.static&&r.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=e.route.id),N.createElement(zi.Provider,{value:t},n)}function xL(t,e=[],n=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let i=t,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);Be(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:h,errors:f}=n,d=u.route.loader&&!h.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||d){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,u,h)=>{let f,d=!1,p=null,v=null;n&&(f=s&&u.route.id?s[u.route.id]:void 0,p=u.route.errorElement||vL,o&&(a<0&&h===0?(AL("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,v=null):a===h&&(d=!0,v=u.route.hydrateFallbackElement||null)));let y=e.concat(i.slice(0,h+1)),C=()=>{let _;return f?_=p:d?_=v:u.route.Component?_=N.createElement(u.route.Component,null):u.route.element?_=u.route.element:_=l,N.createElement(wL,{match:u,routeContext:{outlet:l,matches:y,isDataRoute:n!=null},children:_})};return n&&(u.route.ErrorBoundary||u.route.errorElement||h===0)?N.createElement(_L,{location:n.location,revalidation:n.revalidation,component:p,error:f,children:C(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):C()},null)}function q_(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function TL(t){let e=N.useContext(ja);return Be(e,q_(t)),e}function EL(t){let e=N.useContext(Jh);return Be(e,q_(t)),e}function bL(t){let e=N.useContext(zi);return Be(e,q_(t)),e}function K_(t){let e=bL(t),n=e.matches[e.matches.length-1];return Be(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function SL(){return K_("useRouteId")}function CL(){var r;let t=N.useContext(W_),e=EL("useRouteError"),n=K_("useRouteError");return t!==void 0?t:(r=e.errors)==null?void 0:r[n]}function PL(){let{router:t}=TL("useNavigate"),e=K_("useNavigate"),n=N.useRef(!1);return GA(()=>{n.current=!0}),N.useCallback(async(i,s={})=>{Nr(n.current,KA),n.current&&(typeof i=="number"?t.navigate(i):await t.navigate(i,{fromRouteId:e,...s}))},[t,e])}var KT={};function AL(t,e,n){KT[t]||(KT[t]=!0,Nr(!1,n))}var GT={};function YT(t,e){!t&&!GT[e]&&(GT[e]=!0,console.warn(e))}function RL(t){let e={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:N.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:N.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:N.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}var IL=class{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}};function kL({router:t,flushSync:e}){let[n,r]=N.useState(t.state),[i,s]=N.useState(),[o,a]=N.useState({isTransitioning:!1}),[l,u]=N.useState(),[h,f]=N.useState(),[d,p]=N.useState(),v=N.useRef(new Map),y=N.useCallback((T,{deletedFetchers:k,flushSync:P,viewTransitionOpts:V})=>{k.forEach(m=>v.current.delete(m)),T.fetchers.forEach((m,E)=>{m.data!==void 0&&v.current.set(E,m.data)}),YT(P===!1||e!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let S=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(YT(V==null||S,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!V||!S){e&&P?e(()=>r(T)):N.startTransition(()=>r(T));return}if(e&&P){e(()=>{h&&(l&&l.resolve(),h.skipTransition()),a({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let m=t.window.document.startViewTransition(()=>{e(()=>r(T))});m.finished.finally(()=>{e(()=>{u(void 0),f(void 0),s(void 0),a({isTransitioning:!1})})}),e(()=>f(m));return}h?(l&&l.resolve(),h.skipTransition(),p({state:T,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(s(T),a({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[t.window,e,h,l]);N.useLayoutEffect(()=>t.subscribe(y),[t,y]),N.useEffect(()=>{o.isTransitioning&&!o.flushSync&&u(new IL)},[o]),N.useEffect(()=>{if(l&&i&&t.window){let T=i,k=l.promise,P=t.window.document.startViewTransition(async()=>{N.startTransition(()=>r(T)),await k});P.finished.finally(()=>{u(void 0),f(void 0),s(void 0),a({isTransitioning:!1})}),f(P)}},[i,l,t.window]),N.useEffect(()=>{l&&i&&n.location.key===i.location.key&&l.resolve()},[l,h,n.location,i]),N.useEffect(()=>{!o.isTransitioning&&d&&(s(d.state),a({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}),p(void 0))},[o.isTransitioning,d]);let C=N.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:T=>t.navigate(T),push:(T,k,P)=>t.navigate(T,{state:k,preventScrollReset:P==null?void 0:P.preventScrollReset}),replace:(T,k,P)=>t.navigate(T,{replace:!0,state:k,preventScrollReset:P==null?void 0:P.preventScrollReset})}),[t]),_=t.basename||"/",w=N.useMemo(()=>({router:t,navigator:C,static:!1,basename:_}),[t,C,_]);return N.createElement(N.Fragment,null,N.createElement(ja.Provider,{value:w},N.createElement(Jh.Provider,{value:n},N.createElement(qA.Provider,{value:v.current},N.createElement(H_.Provider,{value:o},N.createElement(LL,{basename:_,location:n.location,navigationType:n.historyAction,navigator:C},N.createElement(DL,{routes:t.routes,future:t.future,state:n})))))),null)}var DL=N.memo(ML);function ML({routes:t,future:e,state:n}){return gL(t,void 0,n,e)}function NL({to:t,replace:e,state:n,relative:r}){Be(wu(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=N.useContext($i);Nr(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=N.useContext(zi),{pathname:o}=Fo(),a=YA(),l=_m(t,vm(s),o,r==="path"),u=JSON.stringify(l);return N.useEffect(()=>{a(JSON.parse(u),{replace:e,state:n,relative:r})},[a,u,r,e,n]),null}function VL(t){return mL(t.context)}function LL({basename:t="/",children:e=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){Be(!wu(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=t.replace(/^\/*/,"/"),a=N.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=Os(n));let{pathname:l="/",search:u="",hash:h="",state:f=null,key:d="default"}=n,p=N.useMemo(()=>{let v=Fi(l,o);return v==null?null:{location:{pathname:v,search:u,hash:h,state:f,key:d},navigationType:r}},[o,l,u,h,f,d,r]);return Nr(p!=null,`<Router basename="${o}"> is not able to match the URL "${l}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),p==null?null:N.createElement($i.Provider,{value:a},N.createElement(xm.Provider,{children:e,value:p}))}var Id="get",kd="application/x-www-form-urlencoded";function Tm(t){return t!=null&&typeof t.tagName=="string"}function OL(t){return Tm(t)&&t.tagName.toLowerCase()==="button"}function FL(t){return Tm(t)&&t.tagName.toLowerCase()==="form"}function jL(t){return Tm(t)&&t.tagName.toLowerCase()==="input"}function $L(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function zL(t,e){return t.button===0&&(!e||e==="_self")&&!$L(t)}var jf=null;function BL(){if(jf===null)try{new FormData(document.createElement("form"),0),jf=!1}catch{jf=!0}return jf}var UL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ig(t){return t!=null&&!UL.has(t)?(Nr(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kd}"`),null):t}function HL(t,e){let n,r,i,s,o;if(FL(t)){let a=t.getAttribute("action");r=a?Fi(a,e):null,n=t.getAttribute("method")||Id,i=Ig(t.getAttribute("enctype"))||kd,s=new FormData(t)}else if(OL(t)||jL(t)&&(t.type==="submit"||t.type==="image")){let a=t.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=t.getAttribute("formaction")||a.getAttribute("action");if(r=l?Fi(l,e):null,n=t.getAttribute("formmethod")||a.getAttribute("method")||Id,i=Ig(t.getAttribute("formenctype"))||Ig(a.getAttribute("enctype"))||kd,s=new FormData(a,t),!BL()){let{name:u,type:h,value:f}=t;if(h==="image"){let d=u?`${u}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else u&&s.append(u,f)}}else{if(Tm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Id,r=null,i=kd,o=t}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function G_(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}async function WL(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function qL(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function KL(t,e,n){let r=await Promise.all(t.map(async i=>{let s=e.routes[i.route.id];if(s){let o=await WL(s,n);return o.links?o.links():[]}return[]}));return XL(r.flat(1).filter(qL).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function QT(t,e,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var h;return n[u].pathname!==l.pathname||((h=n[u].route.path)==null?void 0:h.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?e.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?e.filter((l,u)=>{var f;let h=r.routes[l.route.id];if(!h||!h.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(t,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function GL(t,e){return YL(t.map(n=>{let r=e.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function YL(t){return[...new Set(t)]}function QL(t){let e={},n=Object.keys(t).sort();for(let r of n)e[r]=t[r];return e}function XL(t,e){let n=new Set;return new Set(e),t.reduce((r,i)=>{let s=JSON.stringify(QL(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}function JL(t){let e=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return e.pathname==="/"?e.pathname="_root.data":e.pathname=`${e.pathname.replace(/\/$/,"")}.data`,e}function ZL(){let t=N.useContext(ja);return G_(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function eO(){let t=N.useContext(Jh);return G_(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Y_=N.createContext(void 0);Y_.displayName="FrameworkContext";function QA(){let t=N.useContext(Y_);return G_(t,"You must render this element inside a <HydratedRouter> element"),t}function tO(t,e){let n=N.useContext(Y_),[r,i]=N.useState(!1),[s,o]=N.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:h,onTouchStart:f}=e,d=N.useRef(null);N.useEffect(()=>{if(t==="render"&&o(!0),t==="viewport"){let y=_=>{_.forEach(w=>{o(w.isIntersecting)})},C=new IntersectionObserver(y,{threshold:.5});return d.current&&C.observe(d.current),()=>{C.disconnect()}}},[t]),N.useEffect(()=>{if(r){let y=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(y)}}},[r]);let p=()=>{i(!0)},v=()=>{i(!1),o(!1)};return n?t!=="intent"?[s,d,{}]:[s,d,{onFocus:Yu(a,p),onBlur:Yu(l,v),onMouseEnter:Yu(u,p),onMouseLeave:Yu(h,v),onTouchStart:Yu(f,p)}]:[!1,d,{}]}function Yu(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function nO({page:t,...e}){let{router:n}=ZL(),r=N.useMemo(()=>Js(n.routes,t,n.basename),[n.routes,t,n.basename]);return r?N.createElement(iO,{page:t,matches:r,...e}):(console.warn(`Tried to prefetch ${t} but no routes matched.`),null)}function rO(t){let{manifest:e,routeModules:n}=QA(),[r,i]=N.useState([]);return N.useEffect(()=>{let s=!1;return KL(t,e,n).then(o=>{s||i(o)}),()=>{s=!0}},[t,e,n]),r}function iO({page:t,matches:e,...n}){let r=Fo(),{manifest:i,routeModules:s}=QA(),{loaderData:o,matches:a}=eO(),l=N.useMemo(()=>QT(t,e,a,i,r,"data"),[t,e,a,i,r]),u=N.useMemo(()=>QT(t,e,a,i,r,"assets"),[t,e,a,i,r]),h=N.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let p=new Set,v=!1;if(e.forEach(C=>{var w;let _=i.routes[C.route.id];!_||!_.hasLoader||(!l.some(T=>T.route.id===C.route.id)&&C.route.id in o&&((w=s[C.route.id])!=null&&w.shouldRevalidate)||_.hasClientLoader?v=!0:p.add(C.route.id))}),p.size===0)return[];let y=JL(t);return v&&p.size>0&&y.searchParams.set("_routes",e.filter(C=>p.has(C.route.id)).map(C=>C.route.id).join(",")),[y.pathname+y.search]},[o,r,i,l,e,t,s]),f=N.useMemo(()=>GL(u,i),[u,i]),d=rO(u);return N.createElement(N.Fragment,null,h.map(p=>N.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),f.map(p=>N.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),d.map(({key:p,link:v})=>N.createElement("link",{key:p,...v})))}function sO(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var XA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{XA&&(window.__reactRouterVersion="7.0.1")}catch{}function oO(t,e){return q4({basename:e==null?void 0:e.basename,future:e==null?void 0:e.future,history:g4({window:e==null?void 0:e.window}),hydrationData:aO(),routes:t,mapRouteProperties:RL,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function aO(){let t=window==null?void 0:window.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:lO(t.errors)}),t}function lO(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")n[r]=new Ep(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}var JA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=N.forwardRef(function({onClick:e,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:h,viewTransition:f,...d},p){let{basename:v}=N.useContext($i),y=typeof u=="string"&&JA.test(u),C,_=!1;if(typeof u=="string"&&y&&(C=u,XA))try{let E=new URL(window.location.href),A=u.startsWith("//")?new URL(E.protocol+u):new URL(u),D=Fi(A.pathname,v);A.origin===E.origin&&D!=null?u=D+A.search+A.hash:_=!0}catch{Nr(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=fL(u,{relative:i}),[T,k,P]=tO(r,d),V=fO(u,{replace:o,state:a,target:l,preventScrollReset:h,relative:i,viewTransition:f});function S(E){e&&e(E),E.defaultPrevented||V(E)}let m=N.createElement("a",{...d,...P,href:C||w,onClick:_||s?e:S,ref:sO(p,k),target:l,"data-discover":!y&&n==="render"?"true":void 0});return T&&!y?N.createElement(N.Fragment,null,m,N.createElement(nO,{page:w})):m});hr.displayName="Link";var uO=N.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},h){let f=Zh(o,{relative:u.relative}),d=Fo(),p=N.useContext(Jh),{navigator:v,basename:y}=N.useContext($i),C=p!=null&&yO(f)&&a===!0,_=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,w=d.pathname,T=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(w=w.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&y&&(T=Fi(T,y)||T);const k=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let P=w===_||!i&&w.startsWith(_)&&w.charAt(k)==="/",V=T!=null&&(T===_||!i&&T.startsWith(_)&&T.charAt(_.length)==="/"),S={isActive:P,isPending:V,isTransitioning:C},m=P?e:void 0,E;typeof r=="function"?E=r(S):E=[r,P?"active":null,V?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let A=typeof s=="function"?s(S):s;return N.createElement(hr,{...u,"aria-current":m,className:E,ref:h,style:A,to:o,viewTransition:a},typeof l=="function"?l(S):l)});uO.displayName="NavLink";var cO=N.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Id,action:a,onSubmit:l,relative:u,preventScrollReset:h,viewTransition:f,...d},p)=>{let v=mO(),y=gO(a,{relative:u}),C=o.toLowerCase()==="get"?"get":"post",_=typeof a=="string"&&JA.test(a),w=T=>{if(l&&l(T),T.defaultPrevented)return;T.preventDefault();let k=T.nativeEvent.submitter,P=(k==null?void 0:k.getAttribute("formmethod"))||o;v(k||T.currentTarget,{fetcherKey:e,method:P,navigate:n,replace:i,state:s,relative:u,preventScrollReset:h,viewTransition:f})};return N.createElement("form",{ref:p,method:C,action:y,onSubmit:r?l:w,...d,"data-discover":!_&&t==="render"?"true":void 0})});cO.displayName="Form";function hO(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ZA(t){let e=N.useContext(ja);return Be(e,hO(t)),e}function fO(t,{target:e,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=YA(),l=Fo(),u=Zh(t,{relative:s});return N.useCallback(h=>{if(zL(h,e)){h.preventDefault();let f=n!==void 0?n:bo(l)===bo(u);a(t,{replace:f,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,u,n,r,e,t,i,s,o])}var dO=0,pO=()=>`__${String(++dO)}__`;function mO(){let{router:t}=ZA("useSubmit"),{basename:e}=N.useContext($i),n=SL();return N.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:u}=HL(r,e);if(i.navigate===!1){let h=i.fetcherKey||pO();await t.fetch(h,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await t.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[t,e,n])}function gO(t,{relative:e}={}){let{basename:n}=N.useContext($i),r=N.useContext(zi);Be(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...Zh(t||".",{relative:e})},o=Fo();if(t==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(h=>h==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let h=a.toString();s.search=h?`?${h}`:""}}return(!t||t===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:is([n,s.pathname])),bo(s)}function yO(t,e={}){let n=N.useContext(H_);Be(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ZA("useViewTransitionState"),i=Zh(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=Fi(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Fi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Tp(i.pathname,o)!=null||Tp(i.pathname,s)!=null}new TextEncoder;/** * react-router v7.0.1 * * 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 vO(t){return N.createElement(kL,{flushSync:LA.flushSync,...t})}const Q_=N.createContext({});function X_(t){const e=N.useRef(null);return e.current===null&&(e.current=t()),e.current}const J_=typeof window<"u",eR=J_?N.useLayoutEffect:N.useEffect,Em=N.createContext(null);function Z_(t,e){t.indexOf(e)===-1&&t.push(e)}function e1(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Is=(t,e,n)=>n>e?e:n<t?t:n;let bp=()=>{};const ks={},tR=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function nR(t){return typeof t=="object"&&t!==null}const rR=t=>/^0[^.\s]+$/u.test(t);function t1(t){let e;return()=>(e===void 0&&(e=t()),e)}const xi=t=>t,_O=(t,e)=>n=>e(t(n)),ef=(...t)=>t.reduce(_O),wh=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class n1{constructor(){this.subscriptions=[]}add(e){return Z_(this.subscriptions,e),()=>e1(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ss=t=>t*1e3,os=t=>t/1e3;function iR(t,e){return e?t*(1e3/e):0}const sR=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,wO=1e-7,xO=12;function TO(t,e,n,r,i){let s,o,a=0;do o=e+(n-e)/2,s=sR(o,r,i)-t,s>0?n=o:e=o;while(Math.abs(s)>wO&&++a<xO);return o}function tf(t,e,n,r){if(t===e&&n===r)return xi;const i=s=>TO(s,0,1,t,n);return s=>s===0||s===1?s:sR(i(s),e,r)}const oR=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,aR=t=>e=>1-t(1-e),lR=tf(.33,1.53,.69,.99),r1=aR(lR),uR=oR(r1),cR=t=>(t*=2)<1?.5*r1(t):.5*(2-Math.pow(2,-10*(t-1))),i1=t=>1-Math.sin(Math.acos(t)),hR=aR(i1),fR=oR(i1),EO=tf(.42,0,1,1),bO=tf(0,0,.58,1),dR=tf(.42,0,.58,1),SO=t=>Array.isArray(t)&&typeof t[0]!="number",pR=t=>Array.isArray(t)&&typeof t[0]=="number",XT={linear:xi,easeIn:EO,easeInOut:dR,easeOut:bO,circIn:i1,circInOut:fR,circOut:hR,backIn:r1,backInOut:uR,backOut:lR,anticipate:cR},CO=t=>typeof t=="string",JT=t=>{if(pR(t)){bp(t.length===4);const[e,n,r,i]=t;return tf(e,n,r,i)}else if(CO(t))return bp(XT[t]!==void 0),XT[t];return t},$f=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],ZT={value:null,addProjectionMetrics:null};function PO(t,e){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(f){o.has(f)&&(h.schedule(f),t()),l++,f(a)}const h={schedule:(f,d=!1,p=!1)=>{const y=p&&i?n:r;return d&&o.add(f),y.has(f)||y.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(a=f,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),e&&ZT.value&&ZT.value.frameloop[e].push(l),l=0,n.clear(),i=!1,s&&(s=!1,h.process(f))}};return h}const AO=40;function mR(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=$f.reduce((T,k)=>(T[k]=PO(s,e?k:void 0),T),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:h,update:f,preRender:d,render:p,postRender:v}=o,y=()=>{const T=ks.useManualTiming?i.timestamp:performance.now();n=!1,ks.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(T-i.timestamp,AO),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),h.process(i),f.process(i),d.process(i),p.process(i),v.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(y))},C=()=>{n=!0,r=!0,i.isProcessing||t(y)};return{schedule:$f.reduce((T,k)=>{const P=o[k];return T[k]=(V,S=!1,m=!1)=>(n||C(),P.schedule(V,S,m)),T},{}),cancel:T=>{for(let k=0;k<$f.length;k++)o[$f[k]].cancel(T)},state:i,steps:o}}const{schedule:kt,cancel:So,state:Cn,steps:kg}=mR(typeof requestAnimationFrame<"u"?requestAnimationFrame:xi,!0);let Dd;function RO(){Dd=void 0}const Cr={now:()=>(Dd===void 0&&Cr.set(Cn.isProcessing||ks.useManualTiming?Cn.timestamp:performance.now()),Dd),set:t=>{Dd=t,queueMicrotask(RO)}},gR=t=>e=>typeof e=="string"&&e.startsWith(t),s1=gR("--"),IO=gR("var(--"),o1=t=>IO(t)?kO.test(t.split("/*")[0].trim()):!1,kO=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xu={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},xh={...xu,transform:t=>Is(0,1,t)},zf={...xu,default:1},Mc=t=>Math.round(t*1e5)/1e5,a1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function DO(t){return t==null}const MO=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,l1=(t,e)=>n=>!!(typeof n=="string"&&MO.test(n)&&n.startsWith(t)||e&&!DO(n)&&Object.prototype.hasOwnProperty.call(n,e)),yR=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(a1);return{[t]:parseFloat(i),[e]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},NO=t=>Is(0,255,t),Dg={...xu,transform:t=>Math.round(NO(t))},sa={test:l1("rgb","red"),parse:yR("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Dg.transform(t)+", "+Dg.transform(e)+", "+Dg.transform(n)+", "+Mc(xh.transform(r))+")"};function VO(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const g0={test:l1("#"),parse:VO,transform:sa.transform},nf=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),qs=nf("deg"),as=nf("%"),Se=nf("px"),LO=nf("vh"),OO=nf("vw"),eE={...as,parse:t=>as.parse(t)/100,transform:t=>as.transform(t*100)},_l={test:l1("hsl","hue"),parse:yR("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+as.transform(Mc(e))+", "+as.transform(Mc(n))+", "+Mc(xh.transform(r))+")"},zn={test:t=>sa.test(t)||g0.test(t)||_l.test(t),parse:t=>sa.test(t)?sa.parse(t):_l.test(t)?_l.parse(t):g0.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?sa.transform(t):_l.transform(t)},FO=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jO(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(a1))==null?void 0:e.length)||0)+(((n=t.match(FO))==null?void 0:n.length)||0)>0}const vR="number",_R="color",$O="var",zO="var(",tE="${}",BO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Th(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=e.replace(BO,l=>(zn.test(l)?(r.color.push(s),i.push(_R),n.push(zn.parse(l))):l.startsWith(zO)?(r.var.push(s),i.push($O),n.push(l)):(r.number.push(s),i.push(vR),n.push(parseFloat(l))),++s,tE)).split(tE);return{values:n,split:a,indexes:r,types:i}}function wR(t){return Th(t).values}function xR(t){const{split:e,types:n}=Th(t),r=e.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=e[o],i[o]!==void 0){const a=n[o];a===vR?s+=Mc(i[o]):a===_R?s+=zn.transform(i[o]):s+=i[o]}return s}}const UO=t=>typeof t=="number"?0:t;function HO(t){const e=wR(t);return xR(t)(e.map(UO))}const Co={test:jO,parse:wR,createTransformer:xR,getAnimatableNone:HO};function Mg(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function WO({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,s=0,o=0;if(!e)i=s=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Mg(l,a,t+1/3),s=Mg(l,a,t),o=Mg(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function Sp(t,e){return n=>n>0?e:t}const At=(t,e,n)=>t+(e-t)*n,Ng=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},qO=[g0,sa,_l],KO=t=>qO.find(e=>e.test(t));function nE(t){const e=KO(t);if(!e)return!1;let n=e.parse(t);return e===_l&&(n=WO(n)),n}const rE=(t,e)=>{const n=nE(t),r=nE(e);if(!n||!r)return Sp(t,e);const i={...n};return s=>(i.red=Ng(n.red,r.red,s),i.green=Ng(n.green,r.green,s),i.blue=Ng(n.blue,r.blue,s),i.alpha=At(n.alpha,r.alpha,s),sa.transform(i))},y0=new Set(["none","hidden"]);function GO(t,e){return y0.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function YO(t,e){return n=>At(t,e,n)}function u1(t){return typeof t=="number"?YO:typeof t=="string"?o1(t)?Sp:zn.test(t)?rE:JO:Array.isArray(t)?TR:typeof t=="object"?zn.test(t)?rE:QO:Sp}function TR(t,e){const n=[...t],r=n.length,i=t.map((s,o)=>u1(s)(s,e[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function QO(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=u1(t[i])(t[i],e[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function XO(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const s=e.types[i],o=t.indexes[s][r[s]],a=t.values[o]??0;n[i]=a,r[s]++}return n}const JO=(t,e)=>{const n=Co.createTransformer(e),r=Th(t),i=Th(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?y0.has(t)&&!i.values.length||y0.has(e)&&!r.values.length?GO(t,e):ef(TR(XO(r,i),i.values),n):Sp(t,e)};function ER(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?At(t,e,n):u1(t)(t,e)}const ZO=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>kt.update(e,n),stop:()=>So(e),now:()=>Cn.isProcessing?Cn.timestamp:Cr.now()}},bR=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let s=0;s<i;s++)r+=t(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},Cp=2e4;function c1(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Cp;)e+=n,r=t.next(e);return e>=Cp?1/0:e}function e3(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(c1(r),Cp);return{type:"keyframes",ease:s=>r.next(i*s).value/e,duration:os(i)}}const t3=5;function SR(t,e,n){const r=Math.max(e-t3,0);return iR(n-t(r),e-r)}const Vt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vg=.001;function n3({duration:t=Vt.duration,bounce:e=Vt.bounce,velocity:n=Vt.velocity,mass:r=Vt.mass}){let i,s,o=1-e;o=Is(Vt.minDamping,Vt.maxDamping,o),t=Is(Vt.minDuration,Vt.maxDuration,os(t)),o<1?(i=u=>{const h=u*o,f=h*t,d=h-n,p=v0(u,o),v=Math.exp(-f);return Vg-d/p*v},s=u=>{const f=u*o*t,d=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*t,v=Math.exp(-f),y=v0(Math.pow(u,2),o);return(-i(u)+Vg>0?-1:1)*((d-p)*v)/y}):(i=u=>{const h=Math.exp(-u*t),f=(u-n)*t+1;return-Vg+h*f},s=u=>{const h=Math.exp(-u*t),f=(n-u)*(t*t);return h*f});const a=5/t,l=i3(i,s,a);if(t=ss(t),isNaN(l))return{stiffness:Vt.stiffness,damping:Vt.damping,duration:t};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:t}}}const r3=12;function i3(t,e,n){let r=n;for(let i=1;i<r3;i++)r=r-t(r)/e(r);return r}function v0(t,e){return t*Math.sqrt(1-e*e)}const s3=["duration","bounce"],o3=["stiffness","damping","mass"];function iE(t,e){return e.some(n=>t[n]!==void 0)}function a3(t){let e={velocity:Vt.velocity,stiffness:Vt.stiffness,damping:Vt.damping,mass:Vt.mass,isResolvedFromDuration:!1,...t};if(!iE(t,o3)&&iE(t,s3))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Is(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Vt.mass,stiffness:i,damping:s}}else{const n=n3(t);e={...e,...n,mass:Vt.mass},e.isResolvedFromDuration=!0}return e}function Pp(t=Vt.visualDuration,e=Vt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:h,duration:f,velocity:d,isResolvedFromDuration:p}=a3({...n,velocity:-os(n.velocity||0)}),v=d||0,y=u/(2*Math.sqrt(l*h)),C=o-s,_=os(Math.sqrt(l/h)),w=Math.abs(C)<5;r||(r=w?Vt.restSpeed.granular:Vt.restSpeed.default),i||(i=w?Vt.restDelta.granular:Vt.restDelta.default);let T;if(y<1){const P=v0(_,y);T=V=>{const S=Math.exp(-y*_*V);return o-S*((v+y*_*C)/P*Math.sin(P*V)+C*Math.cos(P*V))}}else if(y===1)T=P=>o-Math.exp(-_*P)*(C+(v+_*C)*P);else{const P=_*Math.sqrt(y*y-1);T=V=>{const S=Math.exp(-y*_*V),m=Math.min(P*V,300);return o-S*((v+y*_*C)*Math.sinh(m)+P*C*Math.cosh(m))/P}}const k={calculatedDuration:p&&f||null,next:P=>{const V=T(P);if(p)a.done=P>=f;else{let S=P===0?v:0;y<1&&(S=P===0?ss(v):SR(T,P,V));const m=Math.abs(S)<=r,E=Math.abs(o-V)<=i;a.done=m&&E}return a.value=a.done?o:V,a},toString:()=>{const P=Math.min(c1(k),Cp),V=bR(S=>k.next(P*S).value,P,30);return P+"ms "+V},toTransition:()=>{}};return k}Pp.applyToOptions=t=>{const e=e3(t,100,Pp);return t.ease=e.ease,t.duration=ss(e.duration),t.type="keyframes",t};function _0({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){const f=t[0],d={done:!1,value:f},p=m=>a!==void 0&&m<a||l!==void 0&&m>l,v=m=>a===void 0?l:l===void 0||Math.abs(a-m)<Math.abs(l-m)?a:l;let y=n*e;const C=f+y,_=o===void 0?C:o(C);_!==C&&(y=_-f);const w=m=>-y*Math.exp(-m/r),T=m=>_+w(m),k=m=>{const E=w(m),A=T(m);d.done=Math.abs(E)<=u,d.value=d.done?_:A};let P,V;const S=m=>{p(d.value)&&(P=m,V=Pp({keyframes:[d.value,v(d.value)],velocity:SR(T,m,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:h}))};return S(0),{calculatedDuration:null,next:m=>{let E=!1;return!V&&P===void 0&&(E=!0,k(m),S(m)),P!==void 0&&m>=P?V.next(m-P):(!E&&k(m),d)}}}function l3(t,e,n){const r=[],i=n||ks.mix||ER,s=t.length-1;for(let o=0;o<s;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||xi:e;a=ef(l,a)}r.push(a)}return r}function u3(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const s=t.length;if(bp(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=l3(e,r,i),l=a.length,u=h=>{if(o&&h<t[0])return e[0];let f=0;if(l>1)for(;f<t.length-2&&!(h<t[f+1]);f++);const d=wh(t[f],t[f+1],h);return a[f](d)};return n?h=>u(Is(t[0],t[s-1],h)):u}function c3(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=wh(0,e,r);t.push(At(n,1,i))}}function h3(t){const e=[0];return c3(e,t.length-1),e}function f3(t,e){return t.map(n=>n*e)}function d3(t,e){return t.map(()=>e||dR).splice(0,t.length-1)}function Nc({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=SO(r)?r.map(JT):JT(r),s={done:!1,value:e[0]},o=f3(n&&n.length===e.length?n:h3(e),t),a=u3(o,e,{ease:Array.isArray(i)?i:d3(e,i)});return{calculatedDuration:t,next:l=>(s.value=a(l),s.done=l>=t,s)}}const p3=t=>t!==null;function h1(t,{repeat:e,repeatType:n="loop"},r,i=1){const s=t.filter(p3),a=i<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const m3={decay:_0,inertia:_0,tween:Nc,keyframes:Nc,spring:Pp};function CR(t){typeof t.type=="string"&&(t.type=m3[t.type])}class f1{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const g3=t=>t/100;class d1 extends f1{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Cr.now()&&this.tick(Cr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;CR(e);const{type:n=Nc,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Nc;l!==Nc&&typeof a[0]!="number"&&(this.mixKeyframes=ef(g3,ER(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=c1(u));const{calculatedDuration:h}=u;this.calculatedDuration=h,this.resolvedDuration=h+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:h,repeat:f,repeatType:d,repeatDelay:p,type:v,onUpdate:y,finalKeyframe:C}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const _=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,k=r;if(f){const m=Math.min(this.currentTime,i)/a;let E=Math.floor(m),A=m%1;!A&&m>=1&&(A=1),A===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(d==="reverse"?(A=1-A,p&&(A-=p/a)):d==="mirror"&&(k=o)),T=Is(0,1,A)*a}const P=w?{done:!1,value:h[0]}:k.next(T);s&&(P.value=s(P.value));let{done:V}=P;!w&&l!==null&&(V=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return S&&v!==_0&&(P.value=h1(h,this.options,C,this.speed)),y&&y(P.value),S&&this.finish(),P}then(e,n){return this.finished.then(e,n)}get duration(){return os(this.calculatedDuration)}get time(){return os(this.currentTime)}set time(e){var n;e=ss(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Cr.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=os(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:e=ZO,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Cr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function y3(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const oa=t=>t*180/Math.PI,w0=t=>{const e=oa(Math.atan2(t[1],t[0]));return x0(e)},v3={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:w0,rotateZ:w0,skewX:t=>oa(Math.atan(t[1])),skewY:t=>oa(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},x0=t=>(t=t%360,t<0&&(t+=360),t),sE=w0,oE=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),aE=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),_3={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:oE,scaleY:aE,scale:t=>(oE(t)+aE(t))/2,rotateX:t=>x0(oa(Math.atan2(t[6],t[5]))),rotateY:t=>x0(oa(Math.atan2(-t[2],t[0]))),rotateZ:sE,rotate:sE,skewX:t=>oa(Math.atan(t[4])),skewY:t=>oa(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function T0(t){return t.includes("scale")?1:0}function E0(t,e){if(!t||t==="none")return T0(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=_3,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=v3,i=a}if(!i)return T0(e);const s=r[e],o=i[1].split(",").map(x3);return typeof s=="function"?s(o):o[s]}const w3=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return E0(n,e)};function x3(t){return parseFloat(t.trim())}const Tu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Eu=new Set(Tu),lE=t=>t===xu||t===Se,T3=new Set(["x","y","z"]),E3=Tu.filter(t=>!T3.has(t));function b3(t){const e=[];return E3.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const da={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>E0(e,"x"),y:(t,{transform:e})=>E0(e,"y")};da.translateX=da.x;da.translateY=da.y;const pa=new Set;let b0=!1,S0=!1,C0=!1;function PR(){if(S0){const t=Array.from(pa).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=b3(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}S0=!1,b0=!1,pa.forEach(t=>t.complete(C0)),pa.clear()}function AR(){pa.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(S0=!0)})}function S3(){C0=!0,AR(),PR(),C0=!1}class p1{constructor(e,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(pa.add(this),b0||(b0=!0,kt.read(AR),kt.resolveKeyframes(PR))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const s=i==null?void 0:i.get(),o=e[e.length-1];if(s!==void 0)e[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&s===void 0&&i.set(e[0])}y3(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),pa.delete(this)}cancel(){this.state==="scheduled"&&(pa.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const C3=t=>t.startsWith("--");function P3(t,e,n){C3(e)?t.style.setProperty(e,n):t.style[e]=n}const A3=t1(()=>window.ScrollTimeline!==void 0),R3={};function I3(t,e){const n=t1(t);return()=>R3[e]??n()}const RR=I3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fc=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,uE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fc([0,.65,.55,1]),circOut:fc([.55,0,1,.45]),backIn:fc([.31,.01,.66,-.59]),backOut:fc([.33,1.53,.69,.99])};function IR(t,e){if(t)return typeof t=="function"?RR()?bR(t,e):"ease-out":pR(t)?fc(t):Array.isArray(t)?t.map(n=>IR(n,e)||uE.easeOut):uE[t]}function k3(t,e,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const h={[e]:n};l&&(h.offset=l);const f=IR(a,i);Array.isArray(f)&&(h.easing=f);const d={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),t.animate(h,d)}function kR(t){return typeof t=="function"&&"applyToOptions"in t}function D3({type:t,...e}){return kR(t)&&RR()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class M3 extends f1{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=e,bp(typeof e.type!="string");const u=D3(e);this.animation=k3(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const h=h1(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(h):P3(n,r,h),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return os(Number(e))}get time(){return os(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=ss(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&A3()?(this.animation.timeline=e,xi):n(this)}}const DR={anticipate:cR,backInOut:uR,circInOut:fR};function N3(t){return t in DR}function V3(t){typeof t.ease=="string"&&N3(t.ease)&&(t.ease=DR[t.ease])}const cE=10;class L3 extends M3{constructor(e){V3(e),CR(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new d1({...o,autoplay:!1}),l=ss(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-cE).value,a.sample(l).value,cE),a.stop()}}const hE=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Co.test(t)||t==="0")&&!t.startsWith("url("));function O3(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function F3(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],o=hE(i,e),a=hE(s,e);return!o||!a?!1:O3(t)||(n==="spring"||kR(n))&&r}function m1(t){return nR(t)&&"offsetHeight"in t}const j3=new Set(["opacity","clipPath","filter","transform"]),$3=t1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function z3(t){var u;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=t;if(!m1((u=e==null?void 0:e.owner)==null?void 0:u.current))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return $3()&&n&&j3.has(n)&&(n!=="transform"||!l)&&!a&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const B3=40;class U3 extends f1{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:h,...f}){var v;super(),this.stop=()=>{var y,C;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(C=this.keyframeResolver)==null||C.cancel()},this.createdAt=Cr.now();const d={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:h,...f},p=(h==null?void 0:h.KeyframeResolver)||p1;this.keyframeResolver=new p(a,(y,C,_)=>this.onKeyframesResolved(y,C,d,!_),l,u,h),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:h}=r;this.resolvedAt=Cr.now(),F3(e,s,o,a)||((ks.instantAnimations||!l)&&(h==null||h(h1(e,r,n))),e[0]=e[e.length-1],r.duration=0,r.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>B3?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},p=!u&&z3(d)?new L3({...d,element:d.motionValue.owner.current}):new d1(d);p.finished.then(()=>this.notifyFinished()).catch(xi),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),S3()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const H3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function W3(t){const e=H3.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function MR(t,e,n=1){const[r,i]=W3(t);if(!r)return;const s=window.getComputedStyle(e).getPropertyValue(r);if(s){const o=s.trim();return tR(o)?parseFloat(o):o}return o1(i)?MR(i,e,n+1):i}function g1(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const NR=new Set(["width","height","top","left","right","bottom",...Tu]),q3={test:t=>t==="auto",parse:t=>t},VR=t=>e=>e.test(t),LR=[xu,Se,as,qs,OO,LO,q3],fE=t=>LR.find(VR(t));function K3(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||rR(t):!0}const G3=new Set(["brightness","contrast","saturate","opacity"]);function Y3(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(a1)||[];if(!r)return t;const i=n.replace(r,"");let s=G3.has(e)?1:0;return r!==n&&(s*=100),e+"("+s+i+")"}const Q3=/\b([a-z-]*)\(.*?\)/gu,P0={...Co,getAnimatableNone:t=>{const e=t.match(Q3);return e?e.map(Y3).join(" "):t}},dE={...xu,transform:Math.round},X3={rotate:qs,rotateX:qs,rotateY:qs,rotateZ:qs,scale:zf,scaleX:zf,scaleY:zf,scaleZ:zf,skew:qs,skewX:qs,skewY:qs,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:xh,originX:eE,originY:eE,originZ:Se},y1={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se,...X3,zIndex:dE,fillOpacity:xh,strokeOpacity:xh,numOctaves:dE},J3={...y1,color:zn,backgroundColor:zn,outlineColor:zn,fill:zn,stroke:zn,borderColor:zn,borderTopColor:zn,borderRightColor:zn,borderBottomColor:zn,borderLeftColor:zn,filter:P0,WebkitFilter:P0},OR=t=>J3[t];function FR(t,e){let n=OR(t);return n!==P0&&(n=Co),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Z3=new Set(["auto","none","0"]);function e5(t,e,n){let r=0,i;for(;r<t.length&&!i;){const s=t[r];typeof s=="string"&&!Z3.has(s)&&Th(s).values.length&&(i=t[r]),r++}if(i&&n)for(const s of e)t[s]=FR(n,i)}class t5 extends p1{constructor(e,n,r,i,s){super(e,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),o1(u))){const h=MR(u,n.current);h!==void 0&&(e[l]=h),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!NR.has(r)||e.length!==2)return;const[i,s]=e,o=fE(i),a=fE(s);if(o!==a)if(lE(o)&&lE(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else da[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||K3(e[i]))&&r.push(i);r.length&&e5(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=da[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=da[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function n5(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const jR=(t,e)=>e&&typeof t=="number"?e.transform(t):t,pE=30,r5=t=>!isNaN(parseFloat(t));class i5{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{var o,a;const s=Cr.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Cr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=r5(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new n1);const r=this.events[e].add(n);return e==="change"?()=>{r(),kt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>pE)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pE);return iR(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zl(t,e){return new i5(t,e)}const{schedule:v1,cancel:VW}=mR(queueMicrotask,!1),Ii={x:!1,y:!1};function $R(){return Ii.x||Ii.y}function s5(t){return t==="x"||t==="y"?Ii[t]?null:(Ii[t]=!0,()=>{Ii[t]=!1}):Ii.x||Ii.y?null:(Ii.x=Ii.y=!0,()=>{Ii.x=Ii.y=!1})}function zR(t,e){const n=n5(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function mE(t){return!(t.pointerType==="touch"||$R())}function o5(t,e,n={}){const[r,i,s]=zR(t,n),o=a=>{if(!mE(a))return;const{target:l}=a,u=e(l,a);if(typeof u!="function"||!l)return;const h=f=>{mE(f)&&(u(f),l.removeEventListener("pointerleave",h))};l.addEventListener("pointerleave",h,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const BR=(t,e)=>e?t===e?!0:BR(t,e.parentElement):!1,_1=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,a5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function l5(t){return a5.has(t.tagName)||t.tabIndex!==-1}const Md=new WeakSet;function gE(t){return e=>{e.key==="Enter"&&t(e)}}function Lg(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const u5=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=gE(()=>{if(Md.has(n))return;Lg(n,"down");const i=gE(()=>{Lg(n,"up")}),s=()=>Lg(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function yE(t){return _1(t)&&!$R()}function c5(t,e,n={}){const[r,i,s]=zR(t,n),o=a=>{const l=a.currentTarget;if(!yE(a))return;Md.add(l);const u=e(l,a),h=(p,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Md.has(l)&&Md.delete(l),yE(p)&&typeof u=="function"&&u(p,{success:v})},f=p=>{h(p,l===window||l===document||n.useGlobalTarget||BR(l,p.target))},d=p=>{h(p,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),m1(a)&&(a.addEventListener("focus",u=>u5(u,i)),!l5(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function UR(t){return nR(t)&&"ownerSVGElement"in t}function h5(t){return UR(t)&&t.tagName==="svg"}const Yn=t=>!!(t&&t.getVelocity),f5=[...LR,zn,Co],d5=t=>f5.find(VR(t)),w1=N.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class p5 extends N.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=m1(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function m5({children:t,isPresent:e,anchorX:n}){const r=N.useId(),i=N.useRef(null),s=N.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=N.useContext(w1);return N.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:h,right:f}=s.current;if(e||!i.current||!a||!l)return;const d=n==="left"?`left: ${h}`:`right: ${f}`;i.current.dataset.motionPopId=r;const p=document.createElement("style");return o&&(p.nonce=o),document.head.appendChild(p),p.sheet&&p.sheet.insertRule(` [data-motion-pop-id="${r}"] { position: absolute !important; width: ${a}px !important; height: ${l}px !important; ${d}px !important; top: ${u}px !important; } `),()=>{document.head.contains(p)&&document.head.removeChild(p)}},[e]),I.jsx(p5,{isPresent:e,childRef:i,sizeRef:s,children:N.cloneElement(t,{ref:i})})}const g5=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=X_(y5),u=N.useId();let h=!0,f=N.useMemo(()=>(h=!1,{id:u,initial:e,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const p of l.values())if(!p)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&h&&(f={...f}),N.useMemo(()=>{l.forEach((d,p)=>l.set(p,!1))},[n]),N.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(t=I.jsx(m5,{isPresent:n,anchorX:a,children:t})),I.jsx(Em.Provider,{value:f,children:t})};function y5(){return new Map}function HR(t=!0){const e=N.useContext(Em);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,s=N.useId();N.useEffect(()=>{if(t)return i(s)},[t]);const o=N.useCallback(()=>t&&r&&r(s),[s,r,t]);return!n&&r?[!1,o]:[!0]}const Bf=t=>t.key||"";function vE(t){const e=[];return N.Children.forEach(t,n=>{N.isValidElement(n)&&e.push(n)}),e}const v5=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=HR(o),h=N.useMemo(()=>vE(t),[t]),f=o&&!l?[]:h.map(Bf),d=N.useRef(!0),p=N.useRef(h),v=X_(()=>new Map),[y,C]=N.useState(h),[_,w]=N.useState(h);eR(()=>{d.current=!1,p.current=h;for(let P=0;P<_.length;P++){const V=Bf(_[P]);f.includes(V)?v.delete(V):v.get(V)!==!0&&v.set(V,!1)}},[_,f.length,f.join("-")]);const T=[];if(h!==y){let P=[...h];for(let V=0;V<_.length;V++){const S=_[V],m=Bf(S);f.includes(m)||(P.splice(V,0,S),T.push(S))}return s==="wait"&&T.length&&(P=T),w(vE(P)),C(h),null}const{forceRender:k}=N.useContext(Q_);return I.jsx(I.Fragment,{children:_.map(P=>{const V=Bf(P),S=o&&!l?!1:h===_||f.includes(V),m=()=>{if(v.has(V))v.set(V,!0);else return;let E=!0;v.forEach(A=>{A||(E=!1)}),E&&(k==null||k(),w(p.current),o&&(u==null||u()),r&&r())};return I.jsx(g5,{isPresent:S,initial:!d.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:s,onExitComplete:S?void 0:m,anchorX:a,children:P},V)})})},WR=N.createContext({strict:!1}),_E={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},eu={};for(const t in _E)eu[t]={isEnabled:e=>_E[t].some(n=>!!e[n])};function _5(t){for(const e in t)eu[e]={...eu[e],...t[e]}}const w5=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ap(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||w5.has(t)}let qR=t=>!Ap(t);function x5(t){t&&(qR=e=>e.startsWith("on")?!Ap(e):t(e))}try{x5(require("@emotion/is-prop-valid").default)}catch{}function T5(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(qR(i)||n===!0&&Ap(i)||!e&&!Ap(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function E5(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...r)=>t(...r);return new Proxy(n,{get:(r,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const bm=N.createContext({});function Sm(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Eh(t){return typeof t=="string"||Array.isArray(t)}const x1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],T1=["initial",...x1];function Cm(t){return Sm(t.animate)||T1.some(e=>Eh(t[e]))}function KR(t){return!!(Cm(t)||t.variants)}function b5(t,e){if(Cm(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Eh(n)?n:void 0,animate:Eh(r)?r:void 0}}return t.inherit!==!1?e:{}}function S5(t){const{initial:e,animate:n}=b5(t,N.useContext(bm));return N.useMemo(()=>({initial:e,animate:n}),[wE(e),wE(n)])}function wE(t){return Array.isArray(t)?t.join(" "):t}const C5=Symbol.for("motionComponentSymbol");function wl(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function P5(t,e,n){return N.useCallback(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):wl(n)&&(n.current=r))},[e])}const E1=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),A5="framerAppearId",GR="data-"+E1(A5),YR=N.createContext({});function R5(t,e,n,r,i){var y,C;const{visualElement:s}=N.useContext(bm),o=N.useContext(WR),a=N.useContext(Em),l=N.useContext(w1).reducedMotion,u=N.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const h=u.current,f=N.useContext(YR);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&I5(u.current,n,i,f);const d=N.useRef(!1);N.useInsertionEffect(()=>{h&&d.current&&h.update(n,a)});const p=n[GR],v=N.useRef(!!p&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((C=window.MotionHasOptimisedAnimation)==null?void 0:C.call(window,p)));return eR(()=>{h&&(d.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),v1.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),N.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,p)}),v.current=!1))}),h}function I5(t,e,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:QR(t.parent)),t.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&wl(a),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:l,layoutRoot:u})}function QR(t){if(t)return t.options.allowProjection!==!1?t.projection:QR(t.parent)}function k5({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&_5(t);function s(a,l){let u;const h={...N.useContext(w1),...a,layoutId:D5(a)},{isStatic:f}=h,d=S5(a),p=r(a,f);if(!f&&J_){M5();const v=N5(h);u=v.MeasureLayout,d.visualElement=R5(i,p,h,e,v.ProjectionNode)}return I.jsxs(bm.Provider,{value:d,children:[u&&d.visualElement?I.jsx(u,{visualElement:d.visualElement,...h}):null,n(i,a,P5(p,d.visualElement,l),p,f,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=N.forwardRef(s);return o[C5]=i,o}function D5({layoutId:t}){const e=N.useContext(Q_).id;return e&&t!==void 0?e+"-"+t:t}function M5(t,e){N.useContext(WR).strict}function N5(t){const{drag:e,layout:n}=eu;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const bh={};function V5(t){for(const e in t)bh[e]=t[e],s1(e)&&(bh[e].isCSSVariable=!0)}function XR(t,{layout:e,layoutId:n}){return Eu.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!bh[t]||t==="opacity")}const L5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},O5=Tu.length;function F5(t,e,n){let r="",i=!0;for(let s=0;s<O5;s++){const o=Tu[s],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=jR(a,y1[o]);if(!l){i=!1;const h=L5[o]||o;r+=`${h}(${u}) `}n&&(e[o]=u)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function b1(t,e,n){const{style:r,vars:i,transformOrigin:s}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(Eu.has(l)){o=!0;continue}else if(s1(l)){i[l]=u;continue}else{const h=jR(u,y1[l]);l.startsWith("origin")?(a=!0,s[l]=h):r[l]=h}}if(e.transform||(o||n?r.transform=F5(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:h=0}=s;r.transformOrigin=`${l} ${u} ${h}`}}const S1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function JR(t,e,n){for(const r in e)!Yn(e[r])&&!XR(r,n)&&(t[r]=e[r])}function j5({transformTemplate:t},e){return N.useMemo(()=>{const n=S1();return b1(n,e,t),Object.assign({},n.vars,n.style)},[e])}function $5(t,e){const n=t.style||{},r={};return JR(r,n,t),Object.assign(r,j5(t,e)),r}function z5(t,e){const n={},r=$5(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const B5={offset:"stroke-dashoffset",array:"stroke-dasharray"},U5={offset:"strokeDashoffset",array:"strokeDasharray"};function H5(t,e,n=1,r=0,i=!0){t.pathLength=1;const s=i?B5:U5;t[s.offset]=Se.transform(-r);const o=Se.transform(e),a=Se.transform(n);t[s.array]=`${o} ${a}`}function ZR(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,h){if(b1(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&H5(f,i,s,o,!1)}const e2=()=>({...S1(),attrs:{}}),t2=t=>typeof t=="string"&&t.toLowerCase()==="svg";function W5(t,e,n,r){const i=N.useMemo(()=>{const s=e2();return ZR(s,e,t2(r),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};JR(s,t.style,t),i.style={...s,...i.style}}return i}const q5=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function C1(t){return typeof t!="string"||t.includes("-")?!1:!!(q5.indexOf(t)>-1||/[A-Z]/u.test(t))}function K5(t=!1){return(n,r,i,{latestValues:s},o)=>{const l=(C1(n)?W5:z5)(r,s,o,n),u=T5(r,typeof n=="string",t),h=n!==N.Fragment?{...u,...l,ref:i}:{},{children:f}=r,d=N.useMemo(()=>Yn(f)?f.get():f,[f]);return N.createElement(n,{...h,children:d})}}function xE(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function P1(t,e,n,r){if(typeof e=="function"){const[i,s]=xE(r);e=e(n!==void 0?n:t.custom,i,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,s]=xE(r);e=e(n!==void 0?n:t.custom,i,s)}return e}function Nd(t){return Yn(t)?t.get():t}function G5({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:Y5(n,r,i,t),renderState:e()}}const n2=t=>(e,n)=>{const r=N.useContext(bm),i=N.useContext(Em),s=()=>G5(t,e,r,i);return n?s():X_(s)};function Y5(t,e,n,r){const i={},s=r(t,{});for(const d in s)i[d]=Nd(s[d]);let{initial:o,animate:a}=t;const l=Cm(t),u=KR(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=n?n.initial===!1:!1;h=h||o===!1;const f=h?a:o;if(f&&typeof f!="boolean"&&!Sm(f)){const d=Array.isArray(f)?f:[f];for(let p=0;p<d.length;p++){const v=P1(t,d[p]);if(v){const{transitionEnd:y,transition:C,..._}=v;for(const w in _){let T=_[w];if(Array.isArray(T)){const k=h?T.length-1:0;T=T[k]}T!==null&&(i[w]=T)}for(const w in y)i[w]=y[w]}}}return i}function A1(t,e,n){var s;const{style:r}=t,i={};for(const o in r)(Yn(r[o])||e.style&&Yn(e.style[o])||XR(o,t)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Q5={useVisualState:n2({scrapeMotionValuesFromProps:A1,createRenderState:S1})};function r2(t,e,n){const r=A1(t,e,n);for(const i in t)if(Yn(t[i])||Yn(e[i])){const s=Tu.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=t[i]}return r}const X5={useVisualState:n2({scrapeMotionValuesFromProps:r2,createRenderState:e2})};function J5(t,e){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...C1(r)?X5:Q5,preloadedFeatures:t,useRender:K5(i),createVisualElement:e,Component:r};return k5(o)}}function Sh(t,e,n){const r=t.getProps();return P1(r,e,n!==void 0?n:r.custom,t)}const A0=t=>Array.isArray(t);function Z5(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Zl(n))}function eF(t){return A0(t)?t[t.length-1]||0:t}function tF(t,e){const n=Sh(t,e);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=eF(s[o]);Z5(t,o,a)}}function nF(t){return!!(Yn(t)&&t.add)}function R0(t,e){const n=t.getValue("willChange");if(nF(n))return n.add(e);if(!n&&ks.WillChange){const r=new ks.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function i2(t){return t.props[GR]}const rF=t=>t!==null;function iF(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(rF),s=e&&n!=="loop"&&e%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const sF={type:"spring",stiffness:500,damping:25,restSpeed:10},oF=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),aF={type:"keyframes",duration:.8},lF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},uF=(t,{keyframes:e})=>e.length>2?aF:Eu.has(t)?t.startsWith("scale")?oF(e[1]):sF:lF;function cF({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...h}){return!!Object.keys(h).length}const R1=(t,e,n,r={},i,s)=>o=>{const a=g1(r,t)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ss(l);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:s?void 0:i};cF(a)||Object.assign(h,uF(t,h)),h.duration&&(h.duration=ss(h.duration)),h.repeatDelay&&(h.repeatDelay=ss(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let f=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(f=!0)),(ks.instantAnimations||ks.skipAnimations)&&(f=!0,h.duration=0,h.delay=0),h.allowFlatten=!a.type&&!a.ease,f&&!s&&e.get()!==void 0){const d=iF(h.keyframes,a);if(d!==void 0){kt.update(()=>{h.onUpdate(d),h.onComplete()});return}}return a.isSync?new d1(h):new U3(h)};function hF({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function s2(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=t.getDefaultTransition(),transitionEnd:o,...a}=e;r&&(s=r);const l=[],u=i&&t.animationState&&t.animationState.getState()[i];for(const h in a){const f=t.getValue(h,t.latestValues[h]??null),d=a[h];if(d===void 0||u&&hF(u,h))continue;const p={delay:n,...g1(s||{},h)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===v&&!p.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const _=i2(t);if(_){const w=window.MotionHandoffAnimation(_,h,kt);w!==null&&(p.startTime=w,y=!0)}}R0(t,h),f.start(R1(h,f,d,t.shouldReduceMotion&&NR.has(h)?{type:!1}:p,t,y));const C=f.animation;C&&l.push(C)}return o&&Promise.all(l).then(()=>{kt.update(()=>{o&&tF(t,o)})}),l}function I0(t,e,n={}){var l;const r=Sh(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(s2(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:h=0,staggerChildren:f,staggerDirection:d}=i;return fF(t,e,h+u,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,h]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>h())}else return Promise.all([s(),o(n.delay)])}function fF(t,e,n=0,r=0,i=1,s){const o=[],a=(t.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(t.variantChildren).sort(dF).forEach((u,h)=>{u.notify("AnimationStart",e),o.push(I0(u,e,{...s,delay:n+l(h)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function dF(t,e){return t.sortNodePosition(e)}function pF(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(s=>I0(t,s,n));r=Promise.all(i)}else if(typeof e=="string")r=I0(t,e,n);else{const i=typeof e=="function"?Sh(t,e,n.custom):e;r=Promise.all(s2(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function o2(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const mF=T1.length;function a2(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?a2(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<mF;n++){const r=T1[n],i=t.props[r];(Eh(i)||i===!1)&&(e[r]=i)}return e}const gF=[...x1].reverse(),yF=x1.length;function vF(t){return e=>Promise.all(e.map(({animation:n,options:r})=>pF(t,n,r)))}function _F(t){let e=vF(t),n=TE(),r=!0;const i=l=>(u,h)=>{var d;const f=Sh(t,h,l==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:p,transitionEnd:v,...y}=f;u={...u,...y,...v}}return u};function s(l){e=l(t)}function o(l){const{props:u}=t,h=a2(t.parent)||{},f=[],d=new Set;let p={},v=1/0;for(let C=0;C<yF;C++){const _=gF[C],w=n[_],T=u[_]!==void 0?u[_]:h[_],k=Eh(T),P=_===l?w.isActive:null;P===!1&&(v=C);let V=T===h[_]&&T!==u[_]&&k;if(V&&r&&t.manuallyAnimateOnMount&&(V=!1),w.protectedKeys={...p},!w.isActive&&P===null||!T&&!w.prevProp||Sm(T)||typeof T=="boolean")continue;const S=wF(w.prevProp,T);let m=S||_===l&&w.isActive&&!V&&k||C>v&&k,E=!1;const A=Array.isArray(T)?T:[T];let D=A.reduce(i(_),{});P===!1&&(D={});const{prevResolvedValues:R={}}=w,b={...R,...D},q=J=>{m=!0,d.has(J)&&(E=!0,d.delete(J)),w.needsAnimating[J]=!0;const B=t.getValue(J);B&&(B.liveStyle=!1)};for(const J in b){const B=D[J],Q=R[J];if(p.hasOwnProperty(J))continue;let L=!1;A0(B)&&A0(Q)?L=!o2(B,Q):L=B!==Q,L?B!=null?q(J):d.add(J):B!==void 0&&d.has(J)?q(J):w.protectedKeys[J]=!0}w.prevProp=T,w.prevResolvedValues=D,w.isActive&&(p={...p,...D}),r&&t.blockInitialAnimation&&(m=!1),m&&(!(V&&S)||E)&&f.push(...A.map(J=>({animation:J,options:{type:_}})))}if(d.size){const C={};if(typeof u.initial!="boolean"){const _=Sh(t,Array.isArray(u.initial)?u.initial[0]:u.initial);_&&_.transition&&(C.transition=_.transition)}d.forEach(_=>{const w=t.getBaseTarget(_),T=t.getValue(_);T&&(T.liveStyle=!0),C[_]=w??null}),f.push({animation:C})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(y=!1),r=!1,y?e(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var p;return(p=d.animationState)==null?void 0:p.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=TE(),r=!0}}}function wF(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!o2(e,t):!1}function Ho(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function TE(){return{animate:Ho(!0),whileInView:Ho(),whileHover:Ho(),whileTap:Ho(),whileDrag:Ho(),whileFocus:Ho(),exit:Ho()}}class jo{constructor(e){this.isMounted=!1,this.node=e}update(){}}class xF extends jo{constructor(e){super(e),e.animationState||(e.animationState=_F(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Sm(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let TF=0;class EF extends jo{constructor(){super(...arguments),this.id=TF++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const bF={animation:{Feature:xF},exit:{Feature:EF}};function Ch(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function rf(t){return{point:{x:t.pageX,y:t.pageY}}}const SF=t=>e=>_1(e)&&t(e,rf(e));function Vc(t,e,n,r){return Ch(t,e,SF(n),r)}function l2({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function CF({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function PF(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const u2=1e-4,AF=1-u2,RF=1+u2,c2=.01,IF=0-c2,kF=0+c2;function pr(t){return t.max-t.min}function DF(t,e,n){return Math.abs(t-e)<=n}function EE(t,e,n,r=.5){t.origin=r,t.originPoint=At(e.min,e.max,t.origin),t.scale=pr(n)/pr(e),t.translate=At(n.min,n.max,t.origin)-t.originPoint,(t.scale>=AF&&t.scale<=RF||isNaN(t.scale))&&(t.scale=1),(t.translate>=IF&&t.translate<=kF||isNaN(t.translate))&&(t.translate=0)}function Lc(t,e,n,r){EE(t.x,e.x,n.x,r?r.originX:void 0),EE(t.y,e.y,n.y,r?r.originY:void 0)}function bE(t,e,n){t.min=n.min+e.min,t.max=t.min+pr(e)}function MF(t,e,n){bE(t.x,e.x,n.x),bE(t.y,e.y,n.y)}function SE(t,e,n){t.min=e.min-n.min,t.max=t.min+pr(e)}function Oc(t,e,n){SE(t.x,e.x,n.x),SE(t.y,e.y,n.y)}const CE=()=>({translate:0,scale:1,origin:0,originPoint:0}),xl=()=>({x:CE(),y:CE()}),PE=()=>({min:0,max:0}),$t=()=>({x:PE(),y:PE()});function ai(t){return[t("x"),t("y")]}function Og(t){return t===void 0||t===1}function k0({scale:t,scaleX:e,scaleY:n}){return!Og(t)||!Og(e)||!Og(n)}function Yo(t){return k0(t)||h2(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function h2(t){return AE(t.x)||AE(t.y)}function AE(t){return t&&t!=="0%"}function Rp(t,e,n){const r=t-n,i=e*r;return n+i}function RE(t,e,n,r,i){return i!==void 0&&(t=Rp(t,i,r)),Rp(t,n,r)+e}function D0(t,e=0,n=1,r,i){t.min=RE(t.min,e,n,r,i),t.max=RE(t.max,e,n,r,i)}function f2(t,{x:e,y:n}){D0(t.x,e.translate,e.scale,e.originPoint),D0(t.y,n.translate,n.scale,n.originPoint)}const IE=.999999999999,kE=1.0000000000001;function NF(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&El(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,f2(t,o)),r&&Yo(s.latestValues)&&El(t,s.latestValues))}e.x<kE&&e.x>IE&&(e.x=1),e.y<kE&&e.y>IE&&(e.y=1)}function Tl(t,e){t.min=t.min+e,t.max=t.max+e}function DE(t,e,n,r,i=.5){const s=At(t.min,t.max,i);D0(t,e,n,s,r)}function El(t,e){DE(t.x,e.x,e.scaleX,e.scale,e.originX),DE(t.y,e.y,e.scaleY,e.scale,e.originY)}function d2(t,e){return l2(PF(t.getBoundingClientRect(),e))}function VF(t,e,n){const r=d2(t,n),{scroll:i}=e;return i&&(Tl(r.x,i.offset.x),Tl(r.y,i.offset.y)),r}const p2=({current:t})=>t?t.ownerDocument.defaultView:null,ME=(t,e)=>Math.abs(t-e);function LF(t,e){const n=ME(t.x,e.x),r=ME(t.y,e.y);return Math.sqrt(n**2+r**2)}class m2{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=jg(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,p=LF(f.offset,{x:0,y:0})>=3;if(!d&&!p)return;const{point:v}=f,{timestamp:y}=Cn;this.history.push({...v,timestamp:y});const{onStart:C,onMove:_}=this.handlers;d||(C&&C(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Fg(d,this.transformPagePoint),kt.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:p,onSessionEnd:v,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const C=jg(f.type==="pointercancel"?this.lastMoveEventInfo:Fg(d,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,C),v&&v(f,C)},!_1(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=rf(e),a=Fg(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Cn;this.history=[{...l,timestamp:u}];const{onSessionStart:h}=n;h&&h(e,jg(a,this.history)),this.removeListeners=ef(Vc(this.contextWindow,"pointermove",this.handlePointerMove),Vc(this.contextWindow,"pointerup",this.handlePointerUp),Vc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),So(this.updatePoint)}}function Fg(t,e){return e?{point:e(t.point)}:t}function NE(t,e){return{x:t.x-e.x,y:t.y-e.y}}function jg({point:t},e){return{point:t,delta:NE(t,g2(e)),offset:NE(t,OF(e)),velocity:FF(e,.1)}}function OF(t){return t[0]}function g2(t){return t[t.length-1]}function FF(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=g2(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>ss(e)));)n--;if(!r)return{x:0,y:0};const s=os(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function jF(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?At(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?At(n,t,r.max):Math.min(t,n)),t}function VE(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function $F(t,{top:e,left:n,bottom:r,right:i}){return{x:VE(t.x,n,i),y:VE(t.y,e,r)}}function LE(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function zF(t,e){return{x:LE(t.x,e.x),y:LE(t.y,e.y)}}function BF(t,e){let n=.5;const r=pr(t),i=pr(e);return i>r?n=wh(e.min,e.max-r,t.min):r>i&&(n=wh(t.min,t.max-i,e.min)),Is(0,1,n)}function UF(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const M0=.35;function HF(t=M0){return t===!1?t=0:t===!0&&(t=M0),{x:OE(t,"left","right"),y:OE(t,"top","bottom")}}function OE(t,e,n){return{min:FE(t,e),max:FE(t,n)}}function FE(t,e){return typeof t=="number"?t:t[e]||0}const WF=new WeakMap;class qF{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=$t(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(rf(h).point)},s=(h,f)=>{const{drag:d,dragPropagation:p,onDragStart:v}=this.getProps();if(d&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=s5(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ai(C=>{let _=this.getAxisMotionValue(C).get()||0;if(as.test(_)){const{projection:w}=this.visualElement;if(w&&w.layout){const T=w.layout.layoutBox[C];T&&(_=pr(T)*(parseFloat(_)/100))}}this.originPoint[C]=_}),v&&kt.postRender(()=>v(h,f)),R0(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(h,f)=>{const{dragPropagation:d,dragDirectionLock:p,onDirectionLock:v,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:C}=f;if(p&&this.currentDirection===null){this.currentDirection=KF(C),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,C),this.updateAxis("y",f.point,C),this.visualElement.render(),y&&y(h,f)},a=(h,f)=>this.stop(h,f),l=()=>ai(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new m2(e,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:p2(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&kt.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!Uf(e,i,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(o=jF(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;e&&wl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=$F(r.layoutBox,e):this.constraints=!1,this.elastic=HF(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ai(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=UF(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!wl(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=VF(r,i.root,this.visualElement.getTransformPagePoint());let o=zF(i.layout.layoutBox,s);if(n){const a=n(CF(o));this.hasMutatedConstraints=!!a,a&&(o=l2(a))}return o}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=ai(h=>{if(!Uf(h,n,this.currentDirection))return;let f=l&&l[h]||{};o&&(f={min:0,max:0});const d=i?200:1e6,p=i?40:1e7,v={type:"inertia",velocity:r?e[h]:0,bounceStiffness:d,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(h,v)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return R0(this.visualElement,e),r.start(R1(e,r,0,n,this.visualElement,!1))}stopAnimation(){ai(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){ai(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){ai(n=>{const{drag:r}=this.getProps();if(!Uf(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(e[n]-At(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!wl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ai(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=BF({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ai(o=>{if(!Uf(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(At(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;WF.set(this.visualElement,this);const e=this.visualElement.current,n=Vc(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();wl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),kt.read(r);const o=Ch(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ai(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=M0,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Uf(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function KF(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class GF extends jo{constructor(e){super(e),this.removeGroupControls=xi,this.removeListeners=xi,this.controls=new qF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xi}unmount(){this.removeGroupControls(),this.removeListeners()}}const jE=t=>(e,n)=>{t&&kt.postRender(()=>t(e,n))};class YF extends jo{constructor(){super(...arguments),this.removePointerDownListener=xi}onPointerDown(e){this.session=new m2(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p2(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:jE(e),onStart:jE(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&kt.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Vc(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Vd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $E(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Qu={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Se.test(t))t=parseFloat(t);else return t;const n=$E(t,e.target.x),r=$E(t,e.target.y);return`${n}% ${r}%`}},QF={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Co.parse(t);if(i.length>5)return r;const s=Co.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=At(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class XF extends N.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=e;V5(JF),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Vd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,i||e.layoutDependency!==n||n===void 0||e.isPresent!==s?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||kt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),v1.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function y2(t){const[e,n]=HR(),r=N.useContext(Q_);return I.jsx(XF,{...t,layoutGroup:r,switchLayoutGroup:N.useContext(YR),isPresent:e,safeToRemove:n})}const JF={borderRadius:{...Qu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Qu,borderTopRightRadius:Qu,borderBottomLeftRadius:Qu,borderBottomRightRadius:Qu,boxShadow:QF};function ZF(t,e,n){const r=Yn(t)?t:Zl(t);return r.start(R1("",r,e,n)),r.animation}const ej=(t,e)=>t.depth-e.depth;class tj{constructor(){this.children=[],this.isDirty=!1}add(e){Z_(this.children,e),this.isDirty=!0}remove(e){e1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ej),this.isDirty=!1,this.children.forEach(e)}}function nj(t,e){const n=Cr.now(),r=({timestamp:i})=>{const s=i-n;s>=e&&(So(r),t(s-e))};return kt.setup(r,!0),()=>So(r)}const v2=["TopLeft","TopRight","BottomLeft","BottomRight"],rj=v2.length,zE=t=>typeof t=="string"?parseFloat(t):t,BE=t=>typeof t=="number"||Se.test(t);function ij(t,e,n,r,i,s){i?(t.opacity=At(0,n.opacity??1,sj(r)),t.opacityExit=At(e.opacity??1,0,oj(r))):s&&(t.opacity=At(e.opacity??1,n.opacity??1,r));for(let o=0;o<rj;o++){const a=`border${v2[o]}Radius`;let l=UE(e,a),u=UE(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||BE(l)===BE(u)?(t[a]=Math.max(At(zE(l),zE(u),r),0),(as.test(u)||as.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=At(e.rotate||0,n.rotate||0,r))}function UE(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const sj=_2(0,.5,hR),oj=_2(.5,.95,xi);function _2(t,e,n){return r=>r<t?0:r>e?1:n(wh(t,e,r))}function HE(t,e){t.min=e.min,t.max=e.max}function oi(t,e){HE(t.x,e.x),HE(t.y,e.y)}function WE(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function qE(t,e,n,r,i){return t-=e,t=Rp(t,1/n,r),i!==void 0&&(t=Rp(t,1/i,r)),t}function aj(t,e=0,n=1,r=.5,i,s=t,o=t){if(as.test(e)&&(e=parseFloat(e),e=At(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=At(s.min,s.max,r);t===s&&(a-=e),t.min=qE(t.min,e,n,a,i),t.max=qE(t.max,e,n,a,i)}function KE(t,e,[n,r,i],s,o){aj(t,e[n],e[r],e[i],e.scale,s,o)}const lj=["x","scaleX","originX"],uj=["y","scaleY","originY"];function GE(t,e,n,r){KE(t.x,e,lj,n?n.x:void 0,r?r.x:void 0),KE(t.y,e,uj,n?n.y:void 0,r?r.y:void 0)}function YE(t){return t.translate===0&&t.scale===1}function w2(t){return YE(t.x)&&YE(t.y)}function QE(t,e){return t.min===e.min&&t.max===e.max}function cj(t,e){return QE(t.x,e.x)&&QE(t.y,e.y)}function XE(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function x2(t,e){return XE(t.x,e.x)&&XE(t.y,e.y)}function JE(t){return pr(t.x)/pr(t.y)}function ZE(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class hj{constructor(){this.members=[]}add(e){Z_(this.members,e),e.scheduleRender()}remove(e){if(e1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fj(t,e,n){let r="";const i=t.x.translate/e.x,s=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:h,rotateX:f,rotateY:d,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),h&&(r+=`rotate(${h}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const $g=["","X","Y","Z"],dj={visibility:"hidden"},pj=1e3;let mj=0;function zg(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function T2(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=i2(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",kt,!(i||s))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&T2(r)}function E2({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=mj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vj),this.nodes.forEach(Ej),this.nodes.forEach(bj),this.nodes.forEach(_j)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new tj)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new n1),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=UR(o)&&!h5(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=nj(f,250),Vd.hasAnimatedSinceResize&&(Vd.hasAnimatedSinceResize=!1,this.nodes.forEach(tb))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||Rj,{onLayoutAnimationStart:y,onLayoutAnimationComplete:C}=u.getProps(),_=!this.targetLayout||!x2(this.targetLayout,p),w=!f&&d;if(this.options.layoutRoot||this.resumeFrom||w||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...g1(v,"layout"),onPlay:y,onComplete:C};(u.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(h,w)}else f||tb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),So(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Sj),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&T2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const f=this.path[h];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(eb);return}this.isUpdating||this.nodes.forEach(xj),this.isUpdating=!1,this.nodes.forEach(Tj),this.nodes.forEach(gj),this.nodes.forEach(yj),this.clearAllSnapshots();const a=Cr.now();Cn.delta=Is(0,1e3/60,a-Cn.timestamp),Cn.timestamp=a,Cn.isProcessing=!0,kg.update.process(Cn),kg.preRender.process(Cn),kg.render.process(Cn),Cn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v1.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wj),this.sharedNodes.forEach(Cj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!pr(this.snapshot.measuredBox.x)&&!pr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=$t(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!w2(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,h=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||Yo(this.latestValues)||h)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Ij(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return $t();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(kj))){const{scroll:h}=this.root;h&&(Tl(a.x,h.offset.x),Tl(a.y,h.offset.y))}return a}removeElementScroll(o){var l;const a=$t();if(oi(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const h=this.path[u],{scroll:f,options:d}=h;h!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&oi(a,o),Tl(a.x,f.offset.x),Tl(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const l=$t();oi(l,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&El(l,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),Yo(h.latestValues)&&El(l,h.latestValues)}return Yo(this.latestValues)&&El(l,this.latestValues),l}removeTransform(o){const a=$t();oi(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Yo(u.latestValues))continue;k0(u.latestValues)&&u.updateSnapshot();const h=$t(),f=u.measurePageBox();oi(h,f),GE(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,h)}return Yo(this.latestValues)&&GE(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Cn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=Cn.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Oc(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),oi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=$t(),this.targetWithTransforms=$t()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),MF(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):oi(this.target,this.layout.layoutBox),f2(this.target,this.targetDelta)):oi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=$t(),this.relativeTargetOrigin=$t(),Oc(this.relativeTargetOrigin,this.target,p.target),oi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||k0(this.parent.latestValues)||h2(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Cn.timestamp&&(l=!1),l)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;oi(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;NF(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=$t());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(WE(this.prevProjectionDelta.x,this.projectionDelta.x),WE(this.prevProjectionDelta.y,this.projectionDelta.y)),Lc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!ZE(this.projectionDelta.x,this.prevProjectionDelta.x)||!ZE(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xl(),this.projectionDelta=xl(),this.projectionDeltaWithTransform=xl()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},h={...this.latestValues},f=xl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=$t(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,y=p!==v,C=this.getStack(),_=!C||C.members.length<=1,w=!!(y&&!_&&this.options.crossfade===!0&&!this.path.some(Aj));this.animationProgress=0;let T;this.mixTargetDelta=k=>{const P=k/1e3;nb(f.x,o.x,P),nb(f.y,o.y,P),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oc(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pj(this.relativeTarget,this.relativeTargetOrigin,d,P),T&&cj(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=$t()),oi(T,this.relativeTarget)),y&&(this.animationValues=h,ij(h,u,this.latestValues,P,w,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(So(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kt.update(()=>{Vd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Zl(0)),this.currentAnimation=ZF(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pj),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&b2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||$t();const f=pr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const d=pr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}oi(a,l),El(a,h),Lc(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hj),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&zg("z",o,u,this.animationValues);for(let h=0;h<$g.length;h++)zg(`rotate${$g[h]}`,o,u,this.animationValues),zg(`skew${$g[h]}`,o,u,this.animationValues);o.render();for(const h in u)o.setStaticValue(h,u[h]),this.animationValues&&(this.animationValues[h]=u[h]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return dj;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Nd(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Nd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Yo(this.latestValues)&&(p.transform=l?l({},""):"none",this.hasProjected=!1),p}const h=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=fj(this.projectionDeltaWithTransform,this.treeScale,h),l&&(a.transform=l(h,a.transform));const{x:f,y:d}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:a.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const p in bh){if(h[p]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:C}=bh[p],_=a.transform==="none"?h[p]:v(h[p],u);if(y){const w=y.length;for(let T=0;T<w;T++)a[y[T]]=_}else C?this.options.visualElement.renderState.vars[p]=_:a[p]=_}return this.options.layoutId&&(a.pointerEvents=u===this?Nd(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(eb),this.root.sharedNodes.clear()}}}function gj(t){t.updateLayout()}function yj(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;s==="size"?ai(f=>{const d=o?e.measuredBox[f]:e.layoutBox[f],p=pr(d);d.min=r[f].min,d.max=d.min+p}):b2(s,e.layoutBox,r)&&ai(f=>{const d=o?e.measuredBox[f]:e.layoutBox[f],p=pr(r[f]);d.max=d.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+p)});const a=xl();Lc(a,r,e.layoutBox);const l=xl();o?Lc(l,t.applyTransform(i,!0),e.measuredBox):Lc(l,r,e.layoutBox);const u=!w2(a);let h=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:p}=f;if(d&&p){const v=$t();Oc(v,e.layoutBox,d.layoutBox);const y=$t();Oc(y,r,p.layoutBox),x2(v,y)||(h=!0),f.options.layoutRoot&&(t.relativeTarget=y,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function vj(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function _j(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function wj(t){t.clearSnapshot()}function eb(t){t.clearMeasurements()}function xj(t){t.isLayoutDirty=!1}function Tj(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function tb(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ej(t){t.resolveTargetDelta()}function bj(t){t.calcProjection()}function Sj(t){t.resetSkewAndRotation()}function Cj(t){t.removeLeadSnapshot()}function nb(t,e,n){t.translate=At(e.translate,0,n),t.scale=At(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function rb(t,e,n,r){t.min=At(e.min,n.min,r),t.max=At(e.max,n.max,r)}function Pj(t,e,n,r){rb(t.x,e.x,n.x,r),rb(t.y,e.y,n.y,r)}function Aj(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Rj={duration:.45,ease:[.4,0,.1,1]},ib=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),sb=ib("applewebkit/")&&!ib("chrome/")?Math.round:xi;function ob(t){t.min=sb(t.min),t.max=sb(t.max)}function Ij(t){ob(t.x),ob(t.y)}function b2(t,e,n){return t==="position"||t==="preserve-aspect"&&!DF(JE(e),JE(n),.2)}function kj(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const Dj=E2({attachResizeListener:(t,e)=>Ch(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Bg={current:void 0},S2=E2({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Bg.current){const t=new Dj({});t.mount(window),t.setOptions({layoutScroll:!0}),Bg.current=t}return Bg.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Mj={pan:{Feature:YF},drag:{Feature:GF,ProjectionNode:S2,MeasureLayout:y2}};function ab(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&kt.postRender(()=>s(e,rf(e)))}class Nj extends jo{mount(){const{current:e}=this.node;e&&(this.unmount=o5(e,(n,r)=>(ab(this.node,r,"Start"),i=>ab(this.node,i,"End"))))}unmount(){}}class Vj extends jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ef(Ch(this.node.current,"focus",()=>this.onFocus()),Ch(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function lb(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&kt.postRender(()=>s(e,rf(e)))}class Lj extends jo{mount(){const{current:e}=this.node;e&&(this.unmount=c5(e,(n,r)=>(lb(this.node,r,"Start"),(i,{success:s})=>lb(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const N0=new WeakMap,Ug=new WeakMap,Oj=t=>{const e=N0.get(t.target);e&&e(t)},Fj=t=>{t.forEach(Oj)};function jj({root:t,...e}){const n=t||document;Ug.has(n)||Ug.set(n,{});const r=Ug.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Fj,{root:t,...e})),r[i]}function $j(t,e,n){const r=jj(e);return N0.set(t,n),r.observe(t),()=>{N0.delete(t),r.unobserve(t)}}const zj={some:0,all:1};class Bj extends jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=e,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:zj[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),d=u?h:f;d&&d(l)};return $j(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Uj(e,n))&&this.startObserver()}unmount(){}}function Uj({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Hj={inView:{Feature:Bj},tap:{Feature:Lj},focus:{Feature:Vj},hover:{Feature:Nj}},Wj={layout:{ProjectionNode:S2,MeasureLayout:y2}},V0={current:null},C2={current:!1};function qj(){if(C2.current=!0,!!J_)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>V0.current=t.matches;t.addListener(e),e()}else V0.current=!1}const Kj=new WeakMap;function Gj(t,e,n){for(const r in e){const i=e[r],s=n[r];if(Yn(i))t.addValue(r,i);else if(Yn(s))t.addValue(r,Zl(i,{owner:t}));else if(s!==i)if(t.hasValue(r)){const o=t.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(r);t.addValue(r,Zl(o!==void 0?o:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const ub=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Yj{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=p1,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Cr.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,kt.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Cm(n),this.isVariantNode=KR(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&Yn(p)&&p.set(l[d],!1)}}mount(e){this.current=e,Kj.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),C2.current||qj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:V0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),So(this.notifyUpdate),So(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=Eu.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&kt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in eu){const n=eu[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):$t()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ub.length;r++){const i=ub[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=e[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Gj(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Zl(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(tR(r)||rR(r))?r=parseFloat(r):!d5(r)&&Co.test(n)&&(r=FR(e,n)),this.setBaseTarget(e,Yn(r)?r.get():r)),Yn(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=P1(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Yn(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new n1),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class P2 extends Yj{constructor(){super(...arguments),this.KeyframeResolver=t5}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Yn(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function A2(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const s in n)t.style.setProperty(s,n[s])}function Qj(t){return window.getComputedStyle(t)}class Xj extends P2{constructor(){super(...arguments),this.type="html",this.renderInstance=A2}readValueFromInstance(e,n){var r;if(Eu.has(n))return(r=this.projection)!=null&&r.isProjecting?T0(n):w3(e,n);{const i=Qj(e),s=(s1(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return d2(e,n)}build(e,n,r){b1(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return A1(e,n,r)}}const R2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jj(t,e,n,r){A2(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(R2.has(i)?i:E1(i),e.attrs[i])}class Zj extends P2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=$t}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Eu.has(n)){const r=OR(n);return r&&r.default||0}return n=R2.has(n)?n:E1(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return r2(e,n,r)}build(e,n,r){ZR(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){Jj(e,n,r,i)}mount(e){this.isSVGTag=t2(e.tagName),super.mount(e)}}const e6=(t,e)=>C1(t)?new Zj(e):new Xj(e,{allowProjection:t!==N.Fragment}),t6=J5({...bF,...Hj,...Mj,...Wj},e6),me=E5(t6);var L0=new Map,Hf=new WeakMap,cb=0,n6=void 0;function r6(t){return t?(Hf.has(t)||(cb+=1,Hf.set(t,cb.toString())),Hf.get(t)):"0"}function i6(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?r6(t.root):t[e]}`).toString()}function s6(t){const e=i6(t);let n=L0.get(e);if(!n){const r=new Map;let i;const s=new IntersectionObserver(o=>{o.forEach(a=>{var l;const u=a.isIntersecting&&i.some(h=>a.intersectionRatio>=h);t.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(l=r.get(a.target))==null||l.forEach(h=>{h(u,a)})})},t);i=s.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:s,elements:r},L0.set(e,n)}return n}function o6(t,e,n={},r=n6){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=t.getBoundingClientRect();return e(r,{isIntersecting:r,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:s,elements:o}=s6(n),a=o.get(t)||[];return o.has(t)||o.set(t,a),a.push(e),s.observe(t),function(){a.splice(a.indexOf(e),1),a.length===0&&(o.delete(t),s.unobserve(t)),o.size===0&&(s.disconnect(),L0.delete(i))}}function Xu({threshold:t,delay:e,trackVisibility:n,rootMargin:r,root:i,triggerOnce:s,skip:o,initialInView:a,fallbackInView:l,onChange:u}={}){var h;const[f,d]=N.useState(null),p=N.useRef(u),[v,y]=N.useState({inView:!!a,entry:void 0});p.current=u,N.useEffect(()=>{if(o||!f)return;let T;return T=o6(f,(k,P)=>{y({inView:k,entry:P}),p.current&&p.current(k,P),P.isIntersecting&&s&&T&&(T(),T=void 0)},{root:i,rootMargin:r,threshold:t,trackVisibility:n,delay:e},l),()=>{T&&T()}},[Array.isArray(t)?t.toString():t,f,i,r,s,o,n,l,e]);const C=(h=v.entry)==null?void 0:h.target,_=N.useRef(void 0);!f&&C&&!s&&!o&&_.current!==C&&(_.current=C,y({inView:!!a,entry:void 0}));const w=[d,v.inView,v.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}const Ju={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2}}},ps={hidden:{opacity:0,y:20,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:"easeOut"}}};function a6(){const[t,e]=Xu({triggerOnce:!1,threshold:.1}),[n,r]=Xu({triggerOnce:!1,threshold:.2}),[i,s]=Xu({triggerOnce:!1,threshold:.2}),[o,a]=Xu({triggerOnce:!1,threshold:.2}),[l,u]=Xu({triggerOnce:!1,threshold:.2});return I.jsxs("div",{className:"relative text-white font-sans overflow-hidden min-h-screen",children:[I.jsx(me.div,{className:"absolute inset-0 z-0",style:{background:"radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0a0a 70%)"},animate:{background:["radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 30%, #2a1a5e 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 60%, #1e1b4b 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 70%, #2a1a5e 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 30%, #1e1b4b 0%, #0a0a0a 70%)"]},transition:{duration:15,repeat:1/0,ease:"linear"},children:I.jsx(me.div,{className:"absolute inset-0 z-[1]",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(139, 92, 246, 0.4) 1px, transparent 0)",backgroundSize:"30px 30px",filter:"blur(1px)"},animate:{opacity:[.6,.9,.6],scale:[1,1.05,1],x:[-15,15,-15]},transition:{duration:8,repeat:1/0,ease:"easeInOut"}})}),I.jsx(me.section,{ref:t,variants:Ju,initial:"hidden",animate:e?"visible":"hidden",className:"flex flex-col justify-center items-center w-full relative z-[5] px-4 py-20",children:I.jsxs(me.div,{variants:ps,className:"text-center max-w-4xl mt-10",children:[I.jsx("h1",{className:"text-5xl md:text-7xl font-bold mb-6 mt-16 bg-gradient-to-r from-white to-indigo-300 text-transparent bg-clip-text",children:"About CyFuse"}),I.jsx("p",{className:"text-xl md:text-2xl text-gray-300 mb-8",children:"Welcome to CyFuse! We are the official technology club of IIIT Delhi, dedicated to driving innovation and technical excellence through collaboration and creativity."}),I.jsx("p",{className:"text-lg md:text-xl text-gray-300 mb-4",children:"CyFuse is a student-led initiative that brings together individuals from diverse academic backgrounds to explore emerging technologies and solve real-world problems through hands-on projects and research."}),I.jsx("p",{className:"text-lg md:text-xl text-gray-300",children:"As a member of CyFuse, you'll have the opportunity to refine your technical skills, expand your network, and contribute to impactful solutions in a professional yet inclusive environment."})]})}),I.jsxs(me.section,{ref:n,variants:Ju,initial:"hidden",animate:r?"visible":"hidden",className:"flex flex-col justify-center items-center w-full py-20 relative px-4 z-[5]",children:[I.jsx(me.h2,{variants:ps,className:"text-3xl md:text-4xl font-semibold text-white mb-8",children:"Our Mission"}),I.jsx(me.div,{variants:ps,className:"max-w-3xl bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl p-8 text-center shadow-lg hover:shadow-xl transition-all duration-300",children:I.jsx("p",{className:"text-lg md:text-xl text-gray-300",children:"To foster a culture of innovation and continuous learning by integrating technology and creativity, enabling students to develop practical skills and contribute to impactful solutions."})})]}),I.jsxs(me.section,{ref:i,variants:Ju,initial:"hidden",animate:s?"visible":"hidden",className:"flex flex-col justify-center items-center w-full py-20 relative px-4 z-[5]",children:[I.jsx(me.h2,{variants:ps,className:"text-3xl md:text-4xl font-semibold text-white mb-8",children:"Our Vision"}),I.jsx(me.div,{variants:ps,className:"max-w-3xl bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl p-8 text-center shadow-lg hover:shadow-xl transition-all duration-300",children:I.jsx("p",{className:"text-lg md:text-xl text-gray-300",children:"We envision a future where technology and innovation are accessible to all. CyFuse strives to be a leading tech community that inspires, educates, and fosters the next generation of tech leaders and creators."})})]}),I.jsxs(me.section,{ref:o,variants:Ju,initial:"hidden",animate:a?"visible":"hidden",className:"flex flex-col justify-center items-center w-full py-20 relative px-4 z-[5]",children:[I.jsx(me.h2,{variants:ps,className:"text-3xl md:text-4xl font-semibold text-white mb-12",children:"Our Activities"}),I.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-5xl",children:[{title:"Technical Projects",description:"Development of advanced projects in AI, cybersecurity, blockchain, and more."},{title:"Workshops",description:"Hands-on sessions to equip students with in-demand technical skills."},{title:"Hackathons",description:"Participation in and hosting of coding contests and innovation challenges."},{title:"Peer Learning",description:"Mutual learning and growth through mentorship and collaboration."},{title:"Social Impact",description:"Developing solutions that contribute to societal welfare."}].map((h,f)=>I.jsxs(me.div,{variants:ps,className:"bg-white/10 backdrop-blur-lg border border-white/20 rounded-2xl p-6 text-center shadow-lg hover:shadow-xl transition-all duration-300",children:[I.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:h.title}),I.jsx("p",{className:"text-gray-300",children:h.description})]},f))})]}),I.jsxs(me.section,{ref:l,variants:Ju,initial:"hidden",animate:u?"visible":"hidden",className:"flex flex-col justify-center items-center w-full py-20 relative px-4 z-[5]",children:[I.jsx(me.h2,{variants:ps,className:"text-3xl md:text-4xl font-semibold text-white mb-8",children:"Join the CyFuse Community"}),I.jsxs(me.div,{variants:ps,className:"text-center max-w-2xl",children:[I.jsx("p",{className:"text-lg md:text-xl text-gray-300 mb-8",children:"Ready to innovate with us? Join our community to collaborate on exciting projects, attend tech events, and meet like-minded creators."}),I.jsx("p",{className:"text-md md:text-md text-gray-300 mb-8",children:"As a student-led initiative, CyFuse offers a professional yet inclusive environment where members can refine their technical expertise, expand their network, and gain exposure to real-world applications of their knowledge. The club stands as a testament to IIIT-Delhi’s commitment to academic and technological excellence."}),I.jsx(me.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:I.jsx(hr,{to:"#",className:"inline-block px-8 py-4 bg-indigo-600 text-white rounded-full text-lg font-semibold hover:bg-indigo-700 transition-all duration-300",children:"Join Us"})})]})]})]})}var hb={};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const I2=function(t){const e=[];let n=0;for(let r=0;r<t.length;r++){let i=t.charCodeAt(r);i<128?e[n++]=i:i<2048?(e[n++]=i>>6|192,e[n++]=i&63|128):(i&64512)===55296&&r+1<t.length&&(t.charCodeAt(r+1)&64512)===56320?(i=65536+((i&1023)<<10)+(t.charCodeAt(++r)&1023),e[n++]=i>>18|240,e[n++]=i>>12&63|128,e[n++]=i>>6&63|128,e[n++]=i&63|128):(e[n++]=i>>12|224,e[n++]=i>>6&63|128,e[n++]=i&63|128)}return e},l6=function(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n++];if(i<128)e[r++]=String.fromCharCode(i);else if(i>191&&i<224){const s=t[n++];e[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){const s=t[n++],o=t[n++],a=t[n++],l=((i&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;e[r++]=String.fromCharCode(55296+(l>>10)),e[r++]=String.fromCharCode(56320+(l&1023))}else{const s=t[n++],o=t[n++];e[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|o&63)}}return e.join("")},k2={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let i=0;i<t.length;i+=3){const s=t[i],o=i+1<t.length,a=o?t[i+1]:0,l=i+2<t.length,u=l?t[i+2]:0,h=s>>2,f=(s&3)<<4|a>>4;let d=(a&15)<<2|u>>6,p=u&63;l||(p=64,o||(d=64)),r.push(n[h],n[f],n[d],n[p])}return r.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(I2(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):l6(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let i=0;i<t.length;){const s=n[t.charAt(i++)],a=i<t.length?n[t.charAt(i)]:0;++i;const u=i<t.length?n[t.charAt(i)]:64;++i;const f=i<t.length?n[t.charAt(i)]:64;if(++i,s==null||a==null||u==null||f==null)throw new u6;const d=s<<2|a>>4;if(r.push(d),u!==64){const p=a<<4&240|u>>2;if(r.push(p),f!==64){const v=u<<6&192|f;r.push(v)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class u6 extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const c6=function(t){const e=I2(t);return k2.encodeByteArray(e,!0)},Ip=function(t){return c6(t).replace(/\./g,"")},h6=function(t){try{return k2.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function f6(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const d6=()=>f6().__FIREBASE_DEFAULTS__,p6=()=>{if(typeof process>"u"||typeof hb>"u")return;const t=hb.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},m6=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=t&&h6(t[1]);return e&&JSON.parse(e)},I1=()=>{try{return d6()||p6()||m6()}catch(t){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);return}},g6=t=>{var e,n;return(n=(e=I1())===null||e===void 0?void 0:e.emulatorHosts)===null||n===void 0?void 0:n[t]},y6=t=>{const e=g6(t);if(!e)return;const n=e.lastIndexOf(":");if(n<=0||n+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const r=parseInt(e.substring(n+1),10);return e[0]==="["?[e.substring(1,n-1),r]:[e.substring(0,n),r]},D2=()=>{var t;return(t=I1())===null||t===void 0?void 0:t.config};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class v6{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,r))}}}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function _6(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');const n={alg:"none",type:"JWT"},r=e||"demo-project",i=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");const o=Object.assign({iss:`https://securetoken.google.com/${r}`,aud:r,iat:i,exp:i+3600,auth_time:i,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[Ip(JSON.stringify(n)),Ip(JSON.stringify(o)),""].join(".")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function w6(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function x6(){var t;const e=(t=I1())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function T6(){return!x6()&&!!navigator.userAgent&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function E6(){try{return typeof indexedDB=="object"}catch{return!1}}function b6(){return new Promise((t,e)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),t(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var s;e(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const S6="FirebaseError";class bu extends Error{constructor(e,n,r){super(n),this.code=e,this.customData=r,this.name=S6,Object.setPrototypeOf(this,bu.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,M2.prototype.create)}}class M2{constructor(e,n,r){this.service=e,this.serviceName=n,this.errors=r}create(e,...n){const r=n[0]||{},i=`${this.service}/${e}`,s=this.errors[e],o=s?C6(s,r):"Error",a=`${this.serviceName}: ${o} (${i}).`;return new bu(i,a,r)}}function C6(t,e){return t.replace(P6,(n,r)=>{const i=e[r];return i!=null?String(i):`<${r}?>`})}const P6=/\{\$([^}]+)}/g;function O0(t,e){if(t===e)return!0;const n=Object.keys(t),r=Object.keys(e);for(const i of n){if(!r.includes(i))return!1;const s=t[i],o=e[i];if(fb(s)&&fb(o)){if(!O0(s,o))return!1}else if(s!==o)return!1}for(const i of r)if(!n.includes(i))return!1;return!0}function fb(t){return t!==null&&typeof t=="object"}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Ph(t){return t&&t._delegate?t._delegate:t}class Ah{constructor(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Qo="[DEFAULT]";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class A6{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const r=new v6;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const r=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(I6(e))try{this.getOrInitializeService({instanceIdentifier:Qo})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(n);try{const s=this.getOrInitializeService({instanceIdentifier:i});r.resolve(s)}catch{}}}}clearInstance(e=Qo){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Qo){return this.instances.has(e)}getOptions(e=Qo){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,r=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[s,o]of this.instancesDeferred.entries()){const a=this.normalizeInstanceIdentifier(s);r===a&&o.resolve(i)}return i}onInit(e,n){var r;const i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(e),this.onInitCallbacks.set(i,s);const o=this.instances.get(i);return o&&e(o,i),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){const r=this.onInitCallbacks.get(n);if(r)for(const i of r)try{i(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let r=this.instances.get(e);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:R6(e),options:n}),this.instances.set(e,r),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(r,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,r)}catch{}return r||null}normalizeInstanceIdentifier(e=Qo){return this.component?this.component.multipleInstances?e:Qo:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function R6(t){return t===Qo?void 0:t}function I6(t){return t.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class k6{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new A6(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var qe;(function(t){t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT"})(qe||(qe={}));const D6={debug:qe.DEBUG,verbose:qe.VERBOSE,info:qe.INFO,warn:qe.WARN,error:qe.ERROR,silent:qe.SILENT},M6=qe.INFO,N6={[qe.DEBUG]:"log",[qe.VERBOSE]:"log",[qe.INFO]:"info",[qe.WARN]:"warn",[qe.ERROR]:"error"},V6=(t,e,...n)=>{if(e<t.logLevel)return;const r=new Date().toISOString(),i=N6[e];if(i)console[i](`[${r}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class N2{constructor(e){this.name=e,this._logLevel=M6,this._logHandler=V6,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in qe))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?D6[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,qe.DEBUG,...e),this._logHandler(this,qe.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,qe.VERBOSE,...e),this._logHandler(this,qe.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,qe.INFO,...e),this._logHandler(this,qe.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,qe.WARN,...e),this._logHandler(this,qe.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,qe.ERROR,...e),this._logHandler(this,qe.ERROR,...e)}}const L6=(t,e)=>e.some(n=>t instanceof n);let db,pb;function O6(){return db||(db=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function F6(){return pb||(pb=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const V2=new WeakMap,F0=new WeakMap,L2=new WeakMap,Hg=new WeakMap,k1=new WeakMap;function j6(t){const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(yo(t.result)),i()},o=()=>{r(t.error),i()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&V2.set(n,t)}).catch(()=>{}),k1.set(e,t),e}function $6(t){if(F0.has(t))return;const e=new Promise((n,r)=>{const i=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),i()},o=()=>{r(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});F0.set(t,e)}let j0={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return F0.get(t);if(e==="objectStoreNames")return t.objectStoreNames||L2.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return yo(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function z6(t){j0=t(j0)}function B6(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const r=t.call(Wg(this),e,...n);return L2.set(r,e.sort?e.sort():[e]),yo(r)}:F6().includes(t)?function(...e){return t.apply(Wg(this),e),yo(V2.get(this))}:function(...e){return yo(t.apply(Wg(this),e))}}function U6(t){return typeof t=="function"?B6(t):(t instanceof IDBTransaction&&$6(t),L6(t,O6())?new Proxy(t,j0):t)}function yo(t){if(t instanceof IDBRequest)return j6(t);if(Hg.has(t))return Hg.get(t);const e=U6(t);return e!==t&&(Hg.set(t,e),k1.set(e,t)),e}const Wg=t=>k1.get(t);function H6(t,e,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){const o=indexedDB.open(t,e),a=yo(o);return r&&o.addEventListener("upgradeneeded",l=>{r(yo(o.result),l.oldVersion,l.newVersion,yo(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{s&&l.addEventListener("close",()=>s()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),a}const W6=["get","getKey","getAll","getAllKeys","count"],q6=["put","add","delete","clear"],qg=new Map;function mb(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(qg.get(e))return qg.get(e);const n=e.replace(/FromIndex$/,""),r=e!==n,i=q6.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||W6.includes(n)))return;const s=async function(o,...a){const l=this.transaction(o,i?"readwrite":"readonly");let u=l.store;return r&&(u=u.index(a.shift())),(await Promise.all([u[n](...a),i&&l.done]))[0]};return qg.set(e,s),s}z6(t=>({...t,get:(e,n,r)=>mb(e,n)||t.get(e,n,r),has:(e,n)=>!!mb(e,n)||t.has(e,n)}));/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class K6{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(G6(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function G6(t){const e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}const $0="@firebase/app",gb="0.10.17";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ds=new N2("@firebase/app"),Y6="@firebase/app-compat",Q6="@firebase/analytics-compat",X6="@firebase/analytics",J6="@firebase/app-check-compat",Z6="@firebase/app-check",e$="@firebase/auth",t$="@firebase/auth-compat",n$="@firebase/database",r$="@firebase/data-connect",i$="@firebase/database-compat",s$="@firebase/functions",o$="@firebase/functions-compat",a$="@firebase/installations",l$="@firebase/installations-compat",u$="@firebase/messaging",c$="@firebase/messaging-compat",h$="@firebase/performance",f$="@firebase/performance-compat",d$="@firebase/remote-config",p$="@firebase/remote-config-compat",m$="@firebase/storage",g$="@firebase/storage-compat",y$="@firebase/firestore",v$="@firebase/vertexai",_$="@firebase/firestore-compat",w$="firebase",x$="11.1.0";/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const z0="[DEFAULT]",T$={[$0]:"fire-core",[Y6]:"fire-core-compat",[X6]:"fire-analytics",[Q6]:"fire-analytics-compat",[Z6]:"fire-app-check",[J6]:"fire-app-check-compat",[e$]:"fire-auth",[t$]:"fire-auth-compat",[n$]:"fire-rtdb",[r$]:"fire-data-connect",[i$]:"fire-rtdb-compat",[s$]:"fire-fn",[o$]:"fire-fn-compat",[a$]:"fire-iid",[l$]:"fire-iid-compat",[u$]:"fire-fcm",[c$]:"fire-fcm-compat",[h$]:"fire-perf",[f$]:"fire-perf-compat",[d$]:"fire-rc",[p$]:"fire-rc-compat",[m$]:"fire-gcs",[g$]:"fire-gcs-compat",[y$]:"fire-fst",[_$]:"fire-fst-compat",[v$]:"fire-vertex","fire-js":"fire-js",[w$]:"fire-js-all"};/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const kp=new Map,E$=new Map,B0=new Map;function yb(t,e){try{t.container.addComponent(e)}catch(n){Ds.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function Dp(t){const e=t.name;if(B0.has(e))return Ds.debug(`There were multiple attempts to register component ${e}.`),!1;B0.set(e,t);for(const n of kp.values())yb(n,t);for(const n of E$.values())yb(n,t);return!0}function b$(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const S$={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},vo=new M2("app","Firebase",S$);/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class C${constructor(e,n,r){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new Ah("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw vo.create("app-deleted",{appName:this._name})}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const P$=x$;function O2(t,e={}){let n=t;typeof e!="object"&&(e={name:e});const r=Object.assign({name:z0,automaticDataCollectionEnabled:!1},e),i=r.name;if(typeof i!="string"||!i)throw vo.create("bad-app-name",{appName:String(i)});if(n||(n=D2()),!n)throw vo.create("no-options");const s=kp.get(i);if(s){if(O0(n,s.options)&&O0(r,s.config))return s;throw vo.create("duplicate-app",{appName:i})}const o=new k6(i);for(const l of B0.values())o.addComponent(l);const a=new C$(n,r,o);return kp.set(i,a),a}function A$(t=z0){const e=kp.get(t);if(!e&&t===z0&&D2())return O2();if(!e)throw vo.create("no-app",{appName:t});return e}function Vl(t,e,n){var r;let i=(r=T$[t])!==null&&r!==void 0?r:t;n&&(i+=`-${n}`);const s=i.match(/\s|\//),o=e.match(/\s|\//);if(s||o){const a=[`Unable to register library "${i}" with version "${e}":`];s&&a.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&o&&a.push("and"),o&&a.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Ds.warn(a.join(" "));return}Dp(new Ah(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const R$="firebase-heartbeat-database",I$=1,Rh="firebase-heartbeat-store";let Kg=null;function F2(){return Kg||(Kg=H6(R$,I$,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(Rh)}catch(n){console.warn(n)}}}}).catch(t=>{throw vo.create("idb-open",{originalErrorMessage:t.message})})),Kg}async function k$(t){try{const n=(await F2()).transaction(Rh),r=await n.objectStore(Rh).get(j2(t));return await n.done,r}catch(e){if(e instanceof bu)Ds.warn(e.message);else{const n=vo.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Ds.warn(n.message)}}}async function vb(t,e){try{const r=(await F2()).transaction(Rh,"readwrite");await r.objectStore(Rh).put(e,j2(t)),await r.done}catch(n){if(n instanceof bu)Ds.warn(n.message);else{const r=vo.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});Ds.warn(r.message)}}}function j2(t){return`${t.name}!${t.options.appId}`}/** * @license * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const D$=1024,M$=30*24*60*60*1e3;class N${constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new L$(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){var e,n;try{const i=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=_b();return((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s)?void 0:(this._heartbeatsCache.heartbeats.push({date:s,agent:i}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(o=>{const a=new Date(o.date).valueOf();return Date.now()-a<=M$}),this._storage.overwrite(this._heartbeatsCache))}catch(r){Ds.warn(r)}}async getHeartbeatsHeader(){var e;try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";const n=_b(),{heartbeatsToSend:r,unsentEntries:i}=V$(this._heartbeatsCache.heartbeats),s=Ip(JSON.stringify({version:2,heartbeats:r}));return this._heartbeatsCache.lastSentHeartbeatDate=n,i.length>0?(this._heartbeatsCache.heartbeats=i,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return Ds.warn(n),""}}}function _b(){return new Date().toISOString().substring(0,10)}function V$(t,e=D$){const n=[];let r=t.slice();for(const i of t){const s=n.find(o=>o.agent===i.agent);if(s){if(s.dates.push(i.date),wb(n)>e){s.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),wb(n)>e){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class L${constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return E6()?b6().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await k$(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return vb(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const i=await this.read();return vb(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function wb(t){return Ip(JSON.stringify({version:2,heartbeats:t})).length}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function O$(t){Dp(new Ah("platform-logger",e=>new K6(e),"PRIVATE")),Dp(new Ah("heartbeat",e=>new N$(e),"PRIVATE")),Vl($0,gb,t),Vl($0,gb,"esm2017"),Vl("fire-js","")}O$("");var F$="firebase",j$="11.1.0";/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */Vl(F$,j$,"app");var xb=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */var ma,$2;(function(){var t;/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */function e(S,m){function E(){}E.prototype=m.prototype,S.D=m.prototype,S.prototype=new E,S.prototype.constructor=S,S.C=function(A,D,R){for(var b=Array(arguments.length-2),q=2;q<arguments.length;q++)b[q-2]=arguments[q];return m.prototype[D].apply(A,b)}}function n(){this.blockSize=-1}function r(){this.blockSize=-1,this.blockSize=64,this.g=Array(4),this.B=Array(this.blockSize),this.o=this.h=0,this.s()}e(r,n),r.prototype.s=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.o=this.h=0};function i(S,m,E){E||(E=0);var A=Array(16);if(typeof m=="string")for(var D=0;16>D;++D)A[D]=m.charCodeAt(E++)|m.charCodeAt(E++)<<8|m.charCodeAt(E++)<<16|m.charCodeAt(E++)<<24;else for(D=0;16>D;++D)A[D]=m[E++]|m[E++]<<8|m[E++]<<16|m[E++]<<24;m=S.g[0],E=S.g[1],D=S.g[2];var R=S.g[3],b=m+(R^E&(D^R))+A[0]+3614090360&4294967295;m=E+(b<<7&4294967295|b>>>25),b=R+(D^m&(E^D))+A[1]+3905402710&4294967295,R=m+(b<<12&4294967295|b>>>20),b=D+(E^R&(m^E))+A[2]+606105819&4294967295,D=R+(b<<17&4294967295|b>>>15),b=E+(m^D&(R^m))+A[3]+3250441966&4294967295,E=D+(b<<22&4294967295|b>>>10),b=m+(R^E&(D^R))+A[4]+4118548399&4294967295,m=E+(b<<7&4294967295|b>>>25),b=R+(D^m&(E^D))+A[5]+1200080426&4294967295,R=m+(b<<12&4294967295|b>>>20),b=D+(E^R&(m^E))+A[6]+2821735955&4294967295,D=R+(b<<17&4294967295|b>>>15),b=E+(m^D&(R^m))+A[7]+4249261313&4294967295,E=D+(b<<22&4294967295|b>>>10),b=m+(R^E&(D^R))+A[8]+1770035416&4294967295,m=E+(b<<7&4294967295|b>>>25),b=R+(D^m&(E^D))+A[9]+2336552879&4294967295,R=m+(b<<12&4294967295|b>>>20),b=D+(E^R&(m^E))+A[10]+4294925233&4294967295,D=R+(b<<17&4294967295|b>>>15),b=E+(m^D&(R^m))+A[11]+2304563134&4294967295,E=D+(b<<22&4294967295|b>>>10),b=m+(R^E&(D^R))+A[12]+1804603682&4294967295,m=E+(b<<7&4294967295|b>>>25),b=R+(D^m&(E^D))+A[13]+4254626195&4294967295,R=m+(b<<12&4294967295|b>>>20),b=D+(E^R&(m^E))+A[14]+2792965006&4294967295,D=R+(b<<17&4294967295|b>>>15),b=E+(m^D&(R^m))+A[15]+1236535329&4294967295,E=D+(b<<22&4294967295|b>>>10),b=m+(D^R&(E^D))+A[1]+4129170786&4294967295,m=E+(b<<5&4294967295|b>>>27),b=R+(E^D&(m^E))+A[6]+3225465664&4294967295,R=m+(b<<9&4294967295|b>>>23),b=D+(m^E&(R^m))+A[11]+643717713&4294967295,D=R+(b<<14&4294967295|b>>>18),b=E+(R^m&(D^R))+A[0]+3921069994&4294967295,E=D+(b<<20&4294967295|b>>>12),b=m+(D^R&(E^D))+A[5]+3593408605&4294967295,m=E+(b<<5&4294967295|b>>>27),b=R+(E^D&(m^E))+A[10]+38016083&4294967295,R=m+(b<<9&4294967295|b>>>23),b=D+(m^E&(R^m))+A[15]+3634488961&4294967295,D=R+(b<<14&4294967295|b>>>18),b=E+(R^m&(D^R))+A[4]+3889429448&4294967295,E=D+(b<<20&4294967295|b>>>12),b=m+(D^R&(E^D))+A[9]+568446438&4294967295,m=E+(b<<5&4294967295|b>>>27),b=R+(E^D&(m^E))+A[14]+3275163606&4294967295,R=m+(b<<9&4294967295|b>>>23),b=D+(m^E&(R^m))+A[3]+4107603335&4294967295,D=R+(b<<14&4294967295|b>>>18),b=E+(R^m&(D^R))+A[8]+1163531501&4294967295,E=D+(b<<20&4294967295|b>>>12),b=m+(D^R&(E^D))+A[13]+2850285829&4294967295,m=E+(b<<5&4294967295|b>>>27),b=R+(E^D&(m^E))+A[2]+4243563512&4294967295,R=m+(b<<9&4294967295|b>>>23),b=D+(m^E&(R^m))+A[7]+1735328473&4294967295,D=R+(b<<14&4294967295|b>>>18),b=E+(R^m&(D^R))+A[12]+2368359562&4294967295,E=D+(b<<20&4294967295|b>>>12),b=m+(E^D^R)+A[5]+4294588738&4294967295,m=E+(b<<4&4294967295|b>>>28),b=R+(m^E^D)+A[8]+2272392833&4294967295,R=m+(b<<11&4294967295|b>>>21),b=D+(R^m^E)+A[11]+1839030562&4294967295,D=R+(b<<16&4294967295|b>>>16),b=E+(D^R^m)+A[14]+4259657740&4294967295,E=D+(b<<23&4294967295|b>>>9),b=m+(E^D^R)+A[1]+2763975236&4294967295,m=E+(b<<4&4294967295|b>>>28),b=R+(m^E^D)+A[4]+1272893353&4294967295,R=m+(b<<11&4294967295|b>>>21),b=D+(R^m^E)+A[7]+4139469664&4294967295,D=R+(b<<16&4294967295|b>>>16),b=E+(D^R^m)+A[10]+3200236656&4294967295,E=D+(b<<23&4294967295|b>>>9),b=m+(E^D^R)+A[13]+681279174&4294967295,m=E+(b<<4&4294967295|b>>>28),b=R+(m^E^D)+A[0]+3936430074&4294967295,R=m+(b<<11&4294967295|b>>>21),b=D+(R^m^E)+A[3]+3572445317&4294967295,D=R+(b<<16&4294967295|b>>>16),b=E+(D^R^m)+A[6]+76029189&4294967295,E=D+(b<<23&4294967295|b>>>9),b=m+(E^D^R)+A[9]+3654602809&4294967295,m=E+(b<<4&4294967295|b>>>28),b=R+(m^E^D)+A[12]+3873151461&4294967295,R=m+(b<<11&4294967295|b>>>21),b=D+(R^m^E)+A[15]+530742520&4294967295,D=R+(b<<16&4294967295|b>>>16),b=E+(D^R^m)+A[2]+3299628645&4294967295,E=D+(b<<23&4294967295|b>>>9),b=m+(D^(E|~R))+A[0]+4096336452&4294967295,m=E+(b<<6&4294967295|b>>>26),b=R+(E^(m|~D))+A[7]+1126891415&4294967295,R=m+(b<<10&4294967295|b>>>22),b=D+(m^(R|~E))+A[14]+2878612391&4294967295,D=R+(b<<15&4294967295|b>>>17),b=E+(R^(D|~m))+A[5]+4237533241&4294967295,E=D+(b<<21&4294967295|b>>>11),b=m+(D^(E|~R))+A[12]+1700485571&4294967295,m=E+(b<<6&4294967295|b>>>26),b=R+(E^(m|~D))+A[3]+2399980690&4294967295,R=m+(b<<10&4294967295|b>>>22),b=D+(m^(R|~E))+A[10]+4293915773&4294967295,D=R+(b<<15&4294967295|b>>>17),b=E+(R^(D|~m))+A[1]+2240044497&4294967295,E=D+(b<<21&4294967295|b>>>11),b=m+(D^(E|~R))+A[8]+1873313359&4294967295,m=E+(b<<6&4294967295|b>>>26),b=R+(E^(m|~D))+A[15]+4264355552&4294967295,R=m+(b<<10&4294967295|b>>>22),b=D+(m^(R|~E))+A[6]+2734768916&4294967295,D=R+(b<<15&4294967295|b>>>17),b=E+(R^(D|~m))+A[13]+1309151649&4294967295,E=D+(b<<21&4294967295|b>>>11),b=m+(D^(E|~R))+A[4]+4149444226&4294967295,m=E+(b<<6&4294967295|b>>>26),b=R+(E^(m|~D))+A[11]+3174756917&4294967295,R=m+(b<<10&4294967295|b>>>22),b=D+(m^(R|~E))+A[2]+718787259&4294967295,D=R+(b<<15&4294967295|b>>>17),b=E+(R^(D|~m))+A[9]+3951481745&4294967295,S.g[0]=S.g[0]+m&4294967295,S.g[1]=S.g[1]+(D+(b<<21&4294967295|b>>>11))&4294967295,S.g[2]=S.g[2]+D&4294967295,S.g[3]=S.g[3]+R&4294967295}r.prototype.u=function(S,m){m===void 0&&(m=S.length);for(var E=m-this.blockSize,A=this.B,D=this.h,R=0;R<m;){if(D==0)for(;R<=E;)i(this,S,R),R+=this.blockSize;if(typeof S=="string"){for(;R<m;)if(A[D++]=S.charCodeAt(R++),D==this.blockSize){i(this,A),D=0;break}}else for(;R<m;)if(A[D++]=S[R++],D==this.blockSize){i(this,A),D=0;break}}this.h=D,this.o+=m},r.prototype.v=function(){var S=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);S[0]=128;for(var m=1;m<S.length-8;++m)S[m]=0;var E=8*this.o;for(m=S.length-8;m<S.length;++m)S[m]=E&255,E/=256;for(this.u(S),S=Array(16),m=E=0;4>m;++m)for(var A=0;32>A;A+=8)S[E++]=this.g[m]>>>A&255;return S};function s(S,m){var E=a;return Object.prototype.hasOwnProperty.call(E,S)?E[S]:E[S]=m(S)}function o(S,m){this.h=m;for(var E=[],A=!0,D=S.length-1;0<=D;D--){var R=S[D]|0;A&&R==m||(E[D]=R,A=!1)}this.g=E}var a={};function l(S){return-128<=S&&128>S?s(S,function(m){return new o([m|0],0>m?-1:0)}):new o([S|0],0>S?-1:0)}function u(S){if(isNaN(S)||!isFinite(S))return f;if(0>S)return C(u(-S));for(var m=[],E=1,A=0;S>=E;A++)m[A]=S/E|0,E*=4294967296;return new o(m,0)}function h(S,m){if(S.length==0)throw Error("number format error: empty string");if(m=m||10,2>m||36<m)throw Error("radix out of range: "+m);if(S.charAt(0)=="-")return C(h(S.substring(1),m));if(0<=S.indexOf("-"))throw Error('number format error: interior "-" character');for(var E=u(Math.pow(m,8)),A=f,D=0;D<S.length;D+=8){var R=Math.min(8,S.length-D),b=parseInt(S.substring(D,D+R),m);8>R?(R=u(Math.pow(m,R)),A=A.j(R).add(u(b))):(A=A.j(E),A=A.add(u(b)))}return A}var f=l(0),d=l(1),p=l(16777216);t=o.prototype,t.m=function(){if(y(this))return-C(this).m();for(var S=0,m=1,E=0;E<this.g.length;E++){var A=this.i(E);S+=(0<=A?A:4294967296+A)*m,m*=4294967296}return S},t.toString=function(S){if(S=S||10,2>S||36<S)throw Error("radix out of range: "+S);if(v(this))return"0";if(y(this))return"-"+C(this).toString(S);for(var m=u(Math.pow(S,6)),E=this,A="";;){var D=k(E,m).g;E=_(E,D.j(m));var R=((0<E.g.length?E.g[0]:E.h)>>>0).toString(S);if(E=D,v(E))return R+A;for(;6>R.length;)R="0"+R;A=R+A}},t.i=function(S){return 0>S?0:S<this.g.length?this.g[S]:this.h};function v(S){if(S.h!=0)return!1;for(var m=0;m<S.g.length;m++)if(S.g[m]!=0)return!1;return!0}function y(S){return S.h==-1}t.l=function(S){return S=_(this,S),y(S)?-1:v(S)?0:1};function C(S){for(var m=S.g.length,E=[],A=0;A<m;A++)E[A]=~S.g[A];return new o(E,~S.h).add(d)}t.abs=function(){return y(this)?C(this):this},t.add=function(S){for(var m=Math.max(this.g.length,S.g.length),E=[],A=0,D=0;D<=m;D++){var R=A+(this.i(D)&65535)+(S.i(D)&65535),b=(R>>>16)+(this.i(D)>>>16)+(S.i(D)>>>16);A=b>>>16,R&=65535,b&=65535,E[D]=b<<16|R}return new o(E,E[E.length-1]&-2147483648?-1:0)};function _(S,m){return S.add(C(m))}t.j=function(S){if(v(this)||v(S))return f;if(y(this))return y(S)?C(this).j(C(S)):C(C(this).j(S));if(y(S))return C(this.j(C(S)));if(0>this.l(p)&&0>S.l(p))return u(this.m()*S.m());for(var m=this.g.length+S.g.length,E=[],A=0;A<2*m;A++)E[A]=0;for(A=0;A<this.g.length;A++)for(var D=0;D<S.g.length;D++){var R=this.i(A)>>>16,b=this.i(A)&65535,q=S.i(D)>>>16,z=S.i(D)&65535;E[2*A+2*D]+=b*z,w(E,2*A+2*D),E[2*A+2*D+1]+=R*z,w(E,2*A+2*D+1),E[2*A+2*D+1]+=b*q,w(E,2*A+2*D+1),E[2*A+2*D+2]+=R*q,w(E,2*A+2*D+2)}for(A=0;A<m;A++)E[A]=E[2*A+1]<<16|E[2*A];for(A=m;A<2*m;A++)E[A]=0;return new o(E,0)};function w(S,m){for(;(S[m]&65535)!=S[m];)S[m+1]+=S[m]>>>16,S[m]&=65535,m++}function T(S,m){this.g=S,this.h=m}function k(S,m){if(v(m))throw Error("division by zero");if(v(S))return new T(f,f);if(y(S))return m=k(C(S),m),new T(C(m.g),C(m.h));if(y(m))return m=k(S,C(m)),new T(C(m.g),m.h);if(30<S.g.length){if(y(S)||y(m))throw Error("slowDivide_ only works with positive integers.");for(var E=d,A=m;0>=A.l(S);)E=P(E),A=P(A);var D=V(E,1),R=V(A,1);for(A=V(A,2),E=V(E,2);!v(A);){var b=R.add(A);0>=b.l(S)&&(D=D.add(E),R=b),A=V(A,1),E=V(E,1)}return m=_(S,D.j(m)),new T(D,m)}for(D=f;0<=S.l(m);){for(E=Math.max(1,Math.floor(S.m()/m.m())),A=Math.ceil(Math.log(E)/Math.LN2),A=48>=A?1:Math.pow(2,A-48),R=u(E),b=R.j(m);y(b)||0<b.l(S);)E-=A,R=u(E),b=R.j(m);v(R)&&(R=d),D=D.add(R),S=_(S,b)}return new T(D,S)}t.A=function(S){return k(this,S).h},t.and=function(S){for(var m=Math.max(this.g.length,S.g.length),E=[],A=0;A<m;A++)E[A]=this.i(A)&S.i(A);return new o(E,this.h&S.h)},t.or=function(S){for(var m=Math.max(this.g.length,S.g.length),E=[],A=0;A<m;A++)E[A]=this.i(A)|S.i(A);return new o(E,this.h|S.h)},t.xor=function(S){for(var m=Math.max(this.g.length,S.g.length),E=[],A=0;A<m;A++)E[A]=this.i(A)^S.i(A);return new o(E,this.h^S.h)};function P(S){for(var m=S.g.length+1,E=[],A=0;A<m;A++)E[A]=S.i(A)<<1|S.i(A-1)>>>31;return new o(E,S.h)}function V(S,m){var E=m>>5;m%=32;for(var A=S.g.length-E,D=[],R=0;R<A;R++)D[R]=0<m?S.i(R+E)>>>m|S.i(R+E+1)<<32-m:S.i(R+E);return new o(D,S.h)}r.prototype.digest=r.prototype.v,r.prototype.reset=r.prototype.s,r.prototype.update=r.prototype.u,$2=r,o.prototype.add=o.prototype.add,o.prototype.multiply=o.prototype.j,o.prototype.modulo=o.prototype.A,o.prototype.compare=o.prototype.l,o.prototype.toNumber=o.prototype.m,o.prototype.toString=o.prototype.toString,o.prototype.getBits=o.prototype.i,o.fromNumber=u,o.fromString=h,ma=o}).apply(typeof xb<"u"?xb:typeof self<"u"?self:typeof window<"u"?window:{});var Wf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */var z2,dc,B2,Ld,U0,U2,H2,W2;(function(){var t,e=typeof Object.defineProperties=="function"?Object.defineProperty:function(c,g,x){return c==Array.prototype||c==Object.prototype||(c[g]=x.value),c};function n(c){c=[typeof globalThis=="object"&&globalThis,c,typeof window=="object"&&window,typeof self=="object"&&self,typeof Wf=="object"&&Wf];for(var g=0;g<c.length;++g){var x=c[g];if(x&&x.Math==Math)return x}throw Error("Cannot find global object")}var r=n(this);function i(c,g){if(g)e:{var x=r;c=c.split(".");for(var M=0;M<c.length-1;M++){var U=c[M];if(!(U in x))break e;x=x[U]}c=c[c.length-1],M=x[c],g=g(M),g!=M&&g!=null&&e(x,c,{configurable:!0,writable:!0,value:g})}}function s(c,g){c instanceof String&&(c+="");var x=0,M=!1,U={next:function(){if(!M&&x<c.length){var Y=x++;return{value:g(Y,c[Y]),done:!1}}return M=!0,{done:!0,value:void 0}}};return U[Symbol.iterator]=function(){return U},U}i("Array.prototype.values",function(c){return c||function(){return s(this,function(g,x){return x})}});/** @license Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */var o=o||{},a=this||self;function l(c){var g=typeof c;return g=g!="object"?g:c?Array.isArray(c)?"array":g:"null",g=="array"||g=="object"&&typeof c.length=="number"}function u(c){var g=typeof c;return g=="object"&&c!=null||g=="function"}function h(c,g,x){return c.call.apply(c.bind,arguments)}function f(c,g,x){if(!c)throw Error();if(2<arguments.length){var M=Array.prototype.slice.call(arguments,2);return function(){var U=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(U,M),c.apply(g,U)}}return function(){return c.apply(g,arguments)}}function d(c,g,x){return d=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?h:f,d.apply(null,arguments)}function p(c,g){var x=Array.prototype.slice.call(arguments,1);return function(){var M=x.slice();return M.push.apply(M,arguments),c.apply(this,M)}}function v(c,g){function x(){}x.prototype=g.prototype,c.aa=g.prototype,c.prototype=new x,c.prototype.constructor=c,c.Qb=function(M,U,Y){for(var ae=Array(arguments.length-2),ut=2;ut<arguments.length;ut++)ae[ut-2]=arguments[ut];return g.prototype[U].apply(M,ae)}}function y(c){const g=c.length;if(0<g){const x=Array(g);for(let M=0;M<g;M++)x[M]=c[M];return x}return[]}function C(c,g){for(let x=1;x<arguments.length;x++){const M=arguments[x];if(l(M)){const U=c.length||0,Y=M.length||0;c.length=U+Y;for(let ae=0;ae<Y;ae++)c[U+ae]=M[ae]}else c.push(M)}}class _{constructor(g,x){this.i=g,this.j=x,this.h=0,this.g=null}get(){let g;return 0<this.h?(this.h--,g=this.g,this.g=g.next,g.next=null):g=this.i(),g}}function w(c){return/^[\s\xa0]*$/.test(c)}function T(){var c=a.navigator;return c&&(c=c.userAgent)?c:""}function k(c){return k[" "](c),c}k[" "]=function(){};var P=T().indexOf("Gecko")!=-1&&!(T().toLowerCase().indexOf("webkit")!=-1&&T().indexOf("Edge")==-1)&&!(T().indexOf("Trident")!=-1||T().indexOf("MSIE")!=-1)&&T().indexOf("Edge")==-1;function V(c,g,x){for(const M in c)g.call(x,c[M],M,c)}function S(c,g){for(const x in c)g.call(void 0,c[x],x,c)}function m(c){const g={};for(const x in c)g[x]=c[x];return g}const E="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function A(c,g){let x,M;for(let U=1;U<arguments.length;U++){M=arguments[U];for(x in M)c[x]=M[x];for(let Y=0;Y<E.length;Y++)x=E[Y],Object.prototype.hasOwnProperty.call(M,x)&&(c[x]=M[x])}}function D(c){var g=1;c=c.split(":");const x=[];for(;0<g&&c.length;)x.push(c.shift()),g--;return c.length&&x.push(c.join(":")),x}function R(c){a.setTimeout(()=>{throw c},0)}function b(){var c=Q;let g=null;return c.g&&(g=c.g,c.g=c.g.next,c.g||(c.h=null),g.next=null),g}class q{constructor(){this.h=this.g=null}add(g,x){const M=z.get();M.set(g,x),this.h?this.h.next=M:this.g=M,this.h=M}}var z=new _(()=>new ee,c=>c.reset());class ee{constructor(){this.next=this.g=this.h=null}set(g,x){this.h=g,this.g=x,this.next=null}reset(){this.next=this.g=this.h=null}}let J,B=!1,Q=new q,L=()=>{const c=a.Promise.resolve(void 0);J=()=>{c.then(O)}};var O=()=>{for(var c;c=b();){try{c.h.call(c.g)}catch(x){R(x)}var g=z;g.j(c),100>g.h&&(g.h++,c.next=g.g,g.g=c)}B=!1};function H(){this.s=this.s,this.C=this.C}H.prototype.s=!1,H.prototype.ma=function(){this.s||(this.s=!0,this.N())},H.prototype.N=function(){if(this.C)for(;this.C.length;)this.C.shift()()};function se(c,g){this.type=c,this.g=this.target=g,this.defaultPrevented=!1}se.prototype.h=function(){this.defaultPrevented=!0};var ue=function(){if(!a.addEventListener||!Object.defineProperty)return!1;var c=!1,g=Object.defineProperty({},"passive",{get:function(){c=!0}});try{const x=()=>{};a.addEventListener("test",x,g),a.removeEventListener("test",x,g)}catch{}return c}();function he(c,g){if(se.call(this,c?c.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,c){var x=this.type=c.type,M=c.changedTouches&&c.changedTouches.length?c.changedTouches[0]:null;if(this.target=c.target||c.srcElement,this.g=g,g=c.relatedTarget){if(P){e:{try{k(g.nodeName);var U=!0;break e}catch{}U=!1}U||(g=null)}}else x=="mouseover"?g=c.fromElement:x=="mouseout"&&(g=c.toElement);this.relatedTarget=g,M?(this.clientX=M.clientX!==void 0?M.clientX:M.pageX,this.clientY=M.clientY!==void 0?M.clientY:M.pageY,this.screenX=M.screenX||0,this.screenY=M.screenY||0):(this.clientX=c.clientX!==void 0?c.clientX:c.pageX,this.clientY=c.clientY!==void 0?c.clientY:c.pageY,this.screenX=c.screenX||0,this.screenY=c.screenY||0),this.button=c.button,this.key=c.key||"",this.ctrlKey=c.ctrlKey,this.altKey=c.altKey,this.shiftKey=c.shiftKey,this.metaKey=c.metaKey,this.pointerId=c.pointerId||0,this.pointerType=typeof c.pointerType=="string"?c.pointerType:be[c.pointerType]||"",this.state=c.state,this.i=c,c.defaultPrevented&&he.aa.h.call(this)}}v(he,se);var be={2:"touch",3:"pen",4:"mouse"};he.prototype.h=function(){he.aa.h.call(this);var c=this.i;c.preventDefault?c.preventDefault():c.returnValue=!1};var we="closure_listenable_"+(1e6*Math.random()|0),Me=0;function ve(c,g,x,M,U){this.listener=c,this.proxy=null,this.src=g,this.type=x,this.capture=!!M,this.ha=U,this.key=++Me,this.da=this.fa=!1}function Ze(c){c.da=!0,c.listener=null,c.proxy=null,c.src=null,c.ha=null}function Et(c){this.src=c,this.g={},this.h=0}Et.prototype.add=function(c,g,x,M,U){var Y=c.toString();c=this.g[Y],c||(c=this.g[Y]=[],this.h++);var ae=Ce(c,g,M,U);return-1<ae?(g=c[ae],x||(g.fa=!1)):(g=new ve(g,this.src,Y,!!M,U),g.fa=x,c.push(g)),g};function qt(c,g){var x=g.type;if(x in c.g){var M=c.g[x],U=Array.prototype.indexOf.call(M,g,void 0),Y;(Y=0<=U)&&Array.prototype.splice.call(M,U,1),Y&&(Ze(g),c.g[x].length==0&&(delete c.g[x],c.h--))}}function Ce(c,g,x,M){for(var U=0;U<c.length;++U){var Y=c[U];if(!Y.da&&Y.listener==g&&Y.capture==!!x&&Y.ha==M)return U}return-1}var at="closure_lm_"+(1e6*Math.random()|0),Kt={};function rn(c,g,x,M,U){if(Array.isArray(g)){for(var Y=0;Y<g.length;Y++)rn(c,g[Y],x,M,U);return null}return x=rt(x),c&&c[we]?c.K(g,x,u(M)?!!M.capture:!!M,U):G(c,g,x,!1,M,U)}function G(c,g,x,M,U,Y){if(!g)throw Error("Invalid event type");var ae=u(U)?!!U.capture:!!U,ut=Jn(c);if(ut||(c[at]=ut=new Et(c)),x=ut.add(g,x,M,ae,Y),x.proxy)return x;if(M=xn(),x.proxy=M,M.src=c,M.listener=x,c.addEventListener)ue||(U=ae),U===void 0&&(U=!1),c.addEventListener(g.toString(),M,U);else if(c.attachEvent)c.attachEvent(Ye(g.toString()),M);else if(c.addListener&&c.removeListener)c.addListener(M);else throw Error("addEventListener and attachEvent are unavailable.");return x}function xn(){function c(x){return g.call(c.src,c.listener,x)}const g=Tn;return c}function vr(c,g,x,M,U){if(Array.isArray(g))for(var Y=0;Y<g.length;Y++)vr(c,g[Y],x,M,U);else M=u(M)?!!M.capture:!!M,x=rt(x),c&&c[we]?(c=c.i,g=String(g).toString(),g in c.g&&(Y=c.g[g],x=Ce(Y,x,M,U),-1<x&&(Ze(Y[x]),Array.prototype.splice.call(Y,x,1),Y.length==0&&(delete c.g[g],c.h--)))):c&&(c=Jn(c))&&(g=c.g[g.toString()],c=-1,g&&(c=Ce(g,x,M,U)),(x=-1<c?g[c]:null)&&_r(x))}function _r(c){if(typeof c!="number"&&c&&!c.da){var g=c.src;if(g&&g[we])qt(g.i,c);else{var x=c.type,M=c.proxy;g.removeEventListener?g.removeEventListener(x,M,c.capture):g.detachEvent?g.detachEvent(Ye(x),M):g.addListener&&g.removeListener&&g.removeListener(M),(x=Jn(g))?(qt(x,c),x.h==0&&(x.src=null,g[at]=null)):Ze(c)}}}function Ye(c){return c in Kt?Kt[c]:Kt[c]="on"+c}function Tn(c,g){if(c.da)c=!0;else{g=new he(g,this);var x=c.listener,M=c.ha||c.src;c.fa&&_r(c),c=x.call(M,g)}return c}function Jn(c){return c=c[at],c instanceof Et?c:null}var Zn="__closure_events_fn_"+(1e9*Math.random()>>>0);function rt(c){return typeof c=="function"?c:(c[Zn]||(c[Zn]=function(g){return c.handleEvent(g)}),c[Zn])}function Ue(){H.call(this),this.i=new Et(this),this.M=this,this.F=null}v(Ue,H),Ue.prototype[we]=!0,Ue.prototype.removeEventListener=function(c,g,x,M){vr(this,c,g,x,M)};function Ne(c,g){var x,M=c.F;if(M)for(x=[];M;M=M.F)x.push(M);if(c=c.M,M=g.type||g,typeof g=="string")g=new se(g,c);else if(g instanceof se)g.target=g.target||c;else{var U=g;g=new se(M,c),A(g,U)}if(U=!0,x)for(var Y=x.length-1;0<=Y;Y--){var ae=g.g=x[Y];U=Gt(ae,M,!0,g)&&U}if(ae=g.g=c,U=Gt(ae,M,!0,g)&&U,U=Gt(ae,M,!1,g)&&U,x)for(Y=0;Y<x.length;Y++)ae=g.g=x[Y],U=Gt(ae,M,!1,g)&&U}Ue.prototype.N=function(){if(Ue.aa.N.call(this),this.i){var c=this.i,g;for(g in c.g){for(var x=c.g[g],M=0;M<x.length;M++)Ze(x[M]);delete c.g[g],c.h--}}this.F=null},Ue.prototype.K=function(c,g,x,M){return this.i.add(String(c),g,!1,x,M)},Ue.prototype.L=function(c,g,x,M){return this.i.add(String(c),g,!0,x,M)};function Gt(c,g,x,M){if(g=c.i.g[String(g)],!g)return!0;g=g.concat();for(var U=!0,Y=0;Y<g.length;++Y){var ae=g[Y];if(ae&&!ae.da&&ae.capture==x){var ut=ae.listener,bn=ae.ha||ae.src;ae.fa&&qt(c.i,ae),U=ut.call(bn,M)!==!1&&U}}return U&&!M.defaultPrevented}function En(c,g,x){if(typeof c=="function")x&&(c=d(c,x));else if(c&&typeof c.handleEvent=="function")c=d(c.handleEvent,c);else throw Error("Invalid listener argument");return 2147483647<Number(g)?-1:a.setTimeout(c,g||0)}function jt(c){c.g=En(()=>{c.g=null,c.i&&(c.i=!1,jt(c))},c.l);const g=c.h;c.h=null,c.m.apply(null,g)}class Bi extends H{constructor(g,x){super(),this.m=g,this.l=x,this.h=null,this.i=!1,this.g=null}j(g){this.h=arguments,this.g?this.i=!0:jt(this)}N(){super.N(),this.g&&(a.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function st(c){H.call(this),this.h=c,this.g={}}v(st,H);var Ui=[];function wr(c){V(c.g,function(g,x){this.g.hasOwnProperty(x)&&_r(g)},c),c.g={}}st.prototype.N=function(){st.aa.N.call(this),wr(this)},st.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")};var Lr=a.JSON.stringify,Or=a.JSON.parse,Fr=class{stringify(c){return a.JSON.stringify(c,void 0)}parse(c){return a.JSON.parse(c,void 0)}};function er(){}er.prototype.h=null;function Ie(c){return c.h||(c.h=c.i())}function jr(){}var sn={OPEN:"a",kb:"b",Ja:"c",wb:"d"};function fn(){se.call(this,"d")}v(fn,se);function Yt(){se.call(this,"c")}v(Yt,se);var Qt={},Si=null;function Mn(){return Si=Si||new Ue}Qt.La="serverreachability";function j(c){se.call(this,Qt.La,c)}v(j,se);function F(c){const g=Mn();Ne(g,new j(g))}Qt.STAT_EVENT="statevent";function $(c,g){se.call(this,Qt.STAT_EVENT,c),this.stat=g}v($,se);function W(c){const g=Mn();Ne(g,new $(g,c))}Qt.Ma="timingevent";function K(c,g){se.call(this,Qt.Ma,c),this.size=g}v(K,se);function ne(c,g){if(typeof c!="function")throw Error("Fn must not be null and must be a function");return a.setTimeout(function(){c()},g)}function re(){this.g=!0}re.prototype.xa=function(){this.g=!1};function te(c,g,x,M,U,Y){c.info(function(){if(c.g)if(Y)for(var ae="",ut=Y.split("&"),bn=0;bn<ut.length;bn++){var tt=ut[bn].split("=");if(1<tt.length){var Vn=tt[0];tt=tt[1];var Ln=Vn.split("_");ae=2<=Ln.length&&Ln[1]=="type"?ae+(Vn+"="+tt+"&"):ae+(Vn+"=redacted&")}}else ae=null;else ae=Y;return"XMLHTTP REQ ("+M+") [attempt "+U+"]: "+g+` `+x+` `+ae})}function le(c,g,x,M,U,Y,ae){c.info(function(){return"XMLHTTP RESP ("+M+") [ attempt "+U+"]: "+g+` `+x+` `+Y+" "+ae})}function X(c,g,x,M){c.info(function(){return"XMLHTTP TEXT ("+g+"): "+ye(c,x)+(M?" "+M:"")})}function fe(c,g){c.info(function(){return"TIMEOUT: "+g})}re.prototype.info=function(){};function ye(c,g){if(!c.g)return g;if(!g)return null;try{var x=JSON.parse(g);if(x){for(c=0;c<x.length;c++)if(Array.isArray(x[c])){var M=x[c];if(!(2>M.length)){var U=M[1];if(Array.isArray(U)&&!(1>U.length)){var Y=U[0];if(Y!="noop"&&Y!="stop"&&Y!="close")for(var ae=1;ae<U.length;ae++)U[ae]=""}}}}return Lr(x)}catch{return g}}var xe={NO_ERROR:0,gb:1,tb:2,sb:3,nb:4,rb:5,ub:6,Ia:7,TIMEOUT:8,xb:9},Pe={lb:"complete",Hb:"success",Ja:"error",Ia:"abort",zb:"ready",Ab:"readystatechange",TIMEOUT:"timeout",vb:"incrementaldata",yb:"progress",ob:"downloadprogress",Pb:"uploadprogress"},_e;function ke(){}v(ke,er),ke.prototype.g=function(){return new XMLHttpRequest},ke.prototype.i=function(){return{}},_e=new ke;function Te(c,g,x,M){this.j=c,this.i=g,this.l=x,this.R=M||1,this.U=new st(this),this.I=45e3,this.H=null,this.o=!1,this.m=this.A=this.v=this.L=this.F=this.S=this.B=null,this.D=[],this.g=null,this.C=0,this.s=this.u=null,this.X=-1,this.J=!1,this.O=0,this.M=null,this.W=this.K=this.T=this.P=!1,this.h=new bt}function bt(){this.i=null,this.g="",this.h=!1}var on={},nt={};function et(c,g,x){c.L=1,c.v=ff(fs(g)),c.m=x,c.P=!0,St(c,null)}function St(c,g){c.F=Date.now(),ft(c),c.A=fs(c.v);var x=c.A,M=c.R;Array.isArray(M)||(M=[String(M)]),Zw(x.i,"t",M),c.C=0,x=c.j.J,c.h=new bt,c.g=yx(c.j,x?g:null,!c.m),0<c.O&&(c.M=new Bi(d(c.Y,c,c.g),c.O)),g=c.U,x=c.g,M=c.ca;var U="readystatechange";Array.isArray(U)||(U&&(Ui[0]=U.toString()),U=Ui);for(var Y=0;Y<U.length;Y++){var ae=rn(x,U[Y],M||g.handleEvent,!1,g.h||g);if(!ae)break;g.g[ae.key]=ae}g=c.H?m(c.H):{},c.m?(c.u||(c.u="POST"),g["Content-Type"]="application/x-www-form-urlencoded",c.g.ea(c.A,c.u,c.m,g)):(c.u="GET",c.g.ea(c.A,c.u,null,g)),F(),te(c.i,c.u,c.A,c.l,c.R,c.m)}Te.prototype.ca=function(c){c=c.target;const g=this.M;g&&ds(c)==3?g.j():this.Y(c)},Te.prototype.Y=function(c){try{if(c==this.g)e:{const Ln=ds(this.g);var g=this.g.Ba();const qa=this.g.Z();if(!(3>Ln)&&(Ln!=3||this.g&&(this.h.h||this.g.oa()||ox(this.g)))){this.J||Ln!=4||g==7||(g==8||0>=qa?F(3):F(2)),De(this);var x=this.g.Z();this.X=x;t:if(Nn(this)){var M=ox(this.g);c="";var U=M.length,Y=ds(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){tr(this),dt(this);var ae="";break t}this.h.i=new a.TextDecoder}for(g=0;g<U;g++)this.h.h=!0,c+=this.h.i.decode(M[g],{stream:!(Y&&g==U-1)});M.length=0,this.h.g+=c,this.C=0,ae=this.h.g}else ae=this.g.oa();if(this.o=x==200,le(this.i,this.u,this.A,this.l,this.R,Ln,x),this.o){if(this.T&&!this.K){t:{if(this.g){var ut,bn=this.g;if((ut=bn.g?bn.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!w(ut)){var tt=ut;break t}}tt=null}if(x=tt)X(this.i,this.l,x,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,nr(this,x);else{this.o=!1,this.s=3,W(12),tr(this),dt(this);break e}}if(this.P){x=!0;let Ci;for(;!this.J&&this.C<ae.length;)if(Ci=xr(this,ae),Ci==nt){Ln==4&&(this.s=4,W(14),x=!1),X(this.i,this.l,null,"[Incomplete Response]");break}else if(Ci==on){this.s=4,W(15),X(this.i,this.l,ae,"[Invalid Chunk]"),x=!1;break}else X(this.i,this.l,Ci,null),nr(this,Ci);if(Nn(this)&&this.C!=0&&(this.h.g=this.h.g.slice(this.C),this.C=0),Ln!=4||ae.length!=0||this.h.h||(this.s=1,W(16),x=!1),this.o=this.o&&x,!x)X(this.i,this.l,ae,"[Invalid Chunked Response]"),tr(this),dt(this);else if(0<ae.length&&!this.W){this.W=!0;var Vn=this.j;Vn.g==this&&Vn.ba&&!Vn.M&&(Vn.j.info("Great, no buffering proxy detected. Bytes received: "+ae.length),Zm(Vn),Vn.M=!0,W(11))}}else X(this.i,this.l,ae,null),nr(this,ae);Ln==4&&tr(this),this.o&&!this.J&&(Ln==4?dx(this.j,this):(this.o=!1,ft(this)))}else DM(this.g),x==400&&0<ae.indexOf("Unknown SID")?(this.s=3,W(12)):(this.s=0,W(13)),tr(this),dt(this)}}}catch{}finally{}};function Nn(c){return c.g?c.u=="GET"&&c.L!=2&&c.j.Ca:!1}function xr(c,g){var x=c.C,M=g.indexOf(` `,x);return M==-1?nt:(x=Number(g.substring(x,M)),isNaN(x)?on:(M+=1,M+x>g.length?nt:(g=g.slice(M,M+x),c.C=M+x,g)))}Te.prototype.cancel=function(){this.J=!0,tr(this)};function ft(c){c.S=Date.now()+c.I,lt(c,c.I)}function lt(c,g){if(c.B!=null)throw Error("WatchDog timer not null");c.B=ne(d(c.ba,c),g)}function De(c){c.B&&(a.clearTimeout(c.B),c.B=null)}Te.prototype.ba=function(){this.B=null;const c=Date.now();0<=c-this.S?(fe(this.i,this.A),this.L!=2&&(F(),W(17)),tr(this),this.s=2,dt(this)):lt(this,this.S-c)};function dt(c){c.j.G==0||c.J||dx(c.j,c)}function tr(c){De(c);var g=c.M;g&&typeof g.ma=="function"&&g.ma(),c.M=null,wr(c.U),c.g&&(g=c.g,c.g=null,g.abort(),g.ma())}function nr(c,g){try{var x=c.j;if(x.G!=0&&(x.g==c||Gm(x.h,c))){if(!c.K&&Gm(x.h,c)&&x.G==3){try{var M=x.Da.g.parse(g)}catch{M=null}if(Array.isArray(M)&&M.length==3){var U=M;if(U[0]==0){e:if(!x.u){if(x.g)if(x.g.F+3e3<c.F)vf(x),gf(x);else break e;Jm(x),W(18)}}else x.za=U[1],0<x.za-x.T&&37500>U[2]&&x.F&&x.v==0&&!x.C&&(x.C=ne(d(x.Za,x),6e3));if(1>=$r(x.h)&&x.ca){try{x.ca()}catch{}x.ca=void 0}}else Uo(x,11)}else if((c.K||x.g==c)&&vf(x),!w(g))for(U=x.Da.g.parse(g),g=0;g<U.length;g++){let tt=U[g];if(x.T=tt[0],tt=tt[1],x.G==2)if(tt[0]=="c"){x.K=tt[1],x.ia=tt[2];const Vn=tt[3];Vn!=null&&(x.la=Vn,x.j.info("VER="+x.la));const Ln=tt[4];Ln!=null&&(x.Aa=Ln,x.j.info("SVER="+x.Aa));const qa=tt[5];qa!=null&&typeof qa=="number"&&0<qa&&(M=1.5*qa,x.L=M,x.j.info("backChannelRequestTimeoutMs_="+M)),M=x;const Ci=c.g;if(Ci){const wf=Ci.g?Ci.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(wf){var Y=M.h;Y.g||wf.indexOf("spdy")==-1&&wf.indexOf("quic")==-1&&wf.indexOf("h2")==-1||(Y.j=Y.l,Y.g=new Set,Y.h&&(Ym(Y,Y.h),Y.h=null))}if(M.D){const eg=Ci.g?Ci.g.getResponseHeader("X-HTTP-Session-Id"):null;eg&&(M.ya=eg,gt(M.I,M.D,eg))}}x.G=3,x.l&&x.l.ua(),x.ba&&(x.R=Date.now()-c.F,x.j.info("Handshake RTT: "+x.R+"ms")),M=x;var ae=c;if(M.qa=gx(M,M.J?M.ia:null,M.W),ae.K){Ww(M.h,ae);var ut=ae,bn=M.L;bn&&(ut.I=bn),ut.B&&(De(ut),ft(ut)),M.g=ae}else hx(M);0<x.i.length&&yf(x)}else tt[0]!="stop"&&tt[0]!="close"||Uo(x,7);else x.G==3&&(tt[0]=="stop"||tt[0]=="close"?tt[0]=="stop"?Uo(x,7):Xm(x):tt[0]!="noop"&&x.l&&x.l.ta(tt),x.v=0)}}F(4)}catch{}}var Qe=class{constructor(c,g){this.g=c,this.map=g}};function rr(c){this.l=c||10,a.PerformanceNavigationTiming?(c=a.performance.getEntriesByType("navigation"),c=0<c.length&&(c[0].nextHopProtocol=="hq"||c[0].nextHopProtocol=="h2")):c=!!(a.chrome&&a.chrome.loadTimes&&a.chrome.loadTimes()&&a.chrome.loadTimes().wasFetchedViaSpdy),this.j=c?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}function Hi(c){return c.h?!0:c.g?c.g.size>=c.j:!1}function $r(c){return c.h?1:c.g?c.g.size:0}function Gm(c,g){return c.h?c.h==g:c.g?c.g.has(g):!1}function Ym(c,g){c.g?c.g.add(g):c.h=g}function Ww(c,g){c.h&&c.h==g?c.h=null:c.g&&c.g.has(g)&&c.g.delete(g)}rr.prototype.cancel=function(){if(this.i=qw(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){for(const c of this.g.values())c.cancel();this.g.clear()}};function qw(c){if(c.h!=null)return c.i.concat(c.h.D);if(c.g!=null&&c.g.size!==0){let g=c.i;for(const x of c.g.values())g=g.concat(x.D);return g}return y(c.i)}function yM(c){if(c.V&&typeof c.V=="function")return c.V();if(typeof Map<"u"&&c instanceof Map||typeof Set<"u"&&c instanceof Set)return Array.from(c.values());if(typeof c=="string")return c.split("");if(l(c)){for(var g=[],x=c.length,M=0;M<x;M++)g.push(c[M]);return g}g=[],x=0;for(M in c)g[x++]=c[M];return g}function vM(c){if(c.na&&typeof c.na=="function")return c.na();if(!c.V||typeof c.V!="function"){if(typeof Map<"u"&&c instanceof Map)return Array.from(c.keys());if(!(typeof Set<"u"&&c instanceof Set)){if(l(c)||typeof c=="string"){var g=[];c=c.length;for(var x=0;x<c;x++)g.push(x);return g}g=[],x=0;for(const M in c)g[x++]=M;return g}}}function Kw(c,g){if(c.forEach&&typeof c.forEach=="function")c.forEach(g,void 0);else if(l(c)||typeof c=="string")Array.prototype.forEach.call(c,g,void 0);else for(var x=vM(c),M=yM(c),U=M.length,Y=0;Y<U;Y++)g.call(void 0,M[Y],x&&x[Y],c)}var Gw=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function _M(c,g){if(c){c=c.split("&");for(var x=0;x<c.length;x++){var M=c[x].indexOf("="),U=null;if(0<=M){var Y=c[x].substring(0,M);U=c[x].substring(M+1)}else Y=c[x];g(Y,U?decodeURIComponent(U.replace(/\+/g," ")):"")}}}function Bo(c){if(this.g=this.o=this.j="",this.s=null,this.m=this.l="",this.h=!1,c instanceof Bo){this.h=c.h,cf(this,c.j),this.o=c.o,this.g=c.g,hf(this,c.s),this.l=c.l;var g=c.i,x=new Nu;x.i=g.i,g.g&&(x.g=new Map(g.g),x.h=g.h),Yw(this,x),this.m=c.m}else c&&(g=String(c).match(Gw))?(this.h=!1,cf(this,g[1]||"",!0),this.o=Du(g[2]||""),this.g=Du(g[3]||"",!0),hf(this,g[4]),this.l=Du(g[5]||"",!0),Yw(this,g[6]||"",!0),this.m=Du(g[7]||"")):(this.h=!1,this.i=new Nu(null,this.h))}Bo.prototype.toString=function(){var c=[],g=this.j;g&&c.push(Mu(g,Qw,!0),":");var x=this.g;return(x||g=="file")&&(c.push("//"),(g=this.o)&&c.push(Mu(g,Qw,!0),"@"),c.push(encodeURIComponent(String(x)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),x=this.s,x!=null&&c.push(":",String(x))),(x=this.l)&&(this.g&&x.charAt(0)!="/"&&c.push("/"),c.push(Mu(x,x.charAt(0)=="/"?TM:xM,!0))),(x=this.i.toString())&&c.push("?",x),(x=this.m)&&c.push("#",Mu(x,bM)),c.join("")};function fs(c){return new Bo(c)}function cf(c,g,x){c.j=x?Du(g,!0):g,c.j&&(c.j=c.j.replace(/:$/,""))}function hf(c,g){if(g){if(g=Number(g),isNaN(g)||0>g)throw Error("Bad port number "+g);c.s=g}else c.s=null}function Yw(c,g,x){g instanceof Nu?(c.i=g,SM(c.i,c.h)):(x||(g=Mu(g,EM)),c.i=new Nu(g,c.h))}function gt(c,g,x){c.i.set(g,x)}function ff(c){return gt(c,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),c}function Du(c,g){return c?g?decodeURI(c.replace(/%25/g,"%2525")):decodeURIComponent(c):""}function Mu(c,g,x){return typeof c=="string"?(c=encodeURI(c).replace(g,wM),x&&(c=c.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c):null}function wM(c){return c=c.charCodeAt(0),"%"+(c>>4&15).toString(16)+(c&15).toString(16)}var Qw=/[#\/\?@]/g,xM=/[#\?:]/g,TM=/[#\?]/g,EM=/[#\?@]/g,bM=/#/g;function Nu(c,g){this.h=this.g=null,this.i=c||null,this.j=!!g}function $s(c){c.g||(c.g=new Map,c.h=0,c.i&&_M(c.i,function(g,x){c.add(decodeURIComponent(g.replace(/\+/g," ")),x)}))}t=Nu.prototype,t.add=function(c,g){$s(this),this.i=null,c=Ha(this,c);var x=this.g.get(c);return x||this.g.set(c,x=[]),x.push(g),this.h+=1,this};function Xw(c,g){$s(c),g=Ha(c,g),c.g.has(g)&&(c.i=null,c.h-=c.g.get(g).length,c.g.delete(g))}function Jw(c,g){return $s(c),g=Ha(c,g),c.g.has(g)}t.forEach=function(c,g){$s(this),this.g.forEach(function(x,M){x.forEach(function(U){c.call(g,U,M,this)},this)},this)},t.na=function(){$s(this);const c=Array.from(this.g.values()),g=Array.from(this.g.keys()),x=[];for(let M=0;M<g.length;M++){const U=c[M];for(let Y=0;Y<U.length;Y++)x.push(g[M])}return x},t.V=function(c){$s(this);let g=[];if(typeof c=="string")Jw(this,c)&&(g=g.concat(this.g.get(Ha(this,c))));else{c=Array.from(this.g.values());for(let x=0;x<c.length;x++)g=g.concat(c[x])}return g},t.set=function(c,g){return $s(this),this.i=null,c=Ha(this,c),Jw(this,c)&&(this.h-=this.g.get(c).length),this.g.set(c,[g]),this.h+=1,this},t.get=function(c,g){return c?(c=this.V(c),0<c.length?String(c[0]):g):g};function Zw(c,g,x){Xw(c,g),0<x.length&&(c.i=null,c.g.set(Ha(c,g),y(x)),c.h+=x.length)}t.toString=function(){if(this.i)return this.i;if(!this.g)return"";const c=[],g=Array.from(this.g.keys());for(var x=0;x<g.length;x++){var M=g[x];const Y=encodeURIComponent(String(M)),ae=this.V(M);for(M=0;M<ae.length;M++){var U=Y;ae[M]!==""&&(U+="="+encodeURIComponent(String(ae[M]))),c.push(U)}}return this.i=c.join("&")};function Ha(c,g){return g=String(g),c.j&&(g=g.toLowerCase()),g}function SM(c,g){g&&!c.j&&($s(c),c.i=null,c.g.forEach(function(x,M){var U=M.toLowerCase();M!=U&&(Xw(this,M),Zw(this,U,x))},c)),c.j=g}function CM(c,g){const x=new re;if(a.Image){const M=new Image;M.onload=p(zs,x,"TestLoadImage: loaded",!0,g,M),M.onerror=p(zs,x,"TestLoadImage: error",!1,g,M),M.onabort=p(zs,x,"TestLoadImage: abort",!1,g,M),M.ontimeout=p(zs,x,"TestLoadImage: timeout",!1,g,M),a.setTimeout(function(){M.ontimeout&&M.ontimeout()},1e4),M.src=c}else g(!1)}function PM(c,g){const x=new re,M=new AbortController,U=setTimeout(()=>{M.abort(),zs(x,"TestPingServer: timeout",!1,g)},1e4);fetch(c,{signal:M.signal}).then(Y=>{clearTimeout(U),Y.ok?zs(x,"TestPingServer: ok",!0,g):zs(x,"TestPingServer: server error",!1,g)}).catch(()=>{clearTimeout(U),zs(x,"TestPingServer: error",!1,g)})}function zs(c,g,x,M,U){try{U&&(U.onload=null,U.onerror=null,U.onabort=null,U.ontimeout=null),M(x)}catch{}}function AM(){this.g=new Fr}function RM(c,g,x){const M=x||"";try{Kw(c,function(U,Y){let ae=U;u(U)&&(ae=Lr(U)),g.push(M+Y+"="+encodeURIComponent(ae))})}catch(U){throw g.push(M+"type="+encodeURIComponent("_badmap")),U}}function df(c){this.l=c.Ub||null,this.j=c.eb||!1}v(df,er),df.prototype.g=function(){return new pf(this.l,this.j)},df.prototype.i=function(c){return function(){return c}}({});function pf(c,g){Ue.call(this),this.D=c,this.o=g,this.m=void 0,this.status=this.readyState=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.u=new Headers,this.h=null,this.B="GET",this.A="",this.g=!1,this.v=this.j=this.l=null}v(pf,Ue),t=pf.prototype,t.open=function(c,g){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.B=c,this.A=g,this.readyState=1,Lu(this)},t.send=function(c){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;const g={headers:this.u,method:this.B,credentials:this.m,cache:void 0};c&&(g.body=c),(this.D||a).fetch(new Request(this.A,g)).then(this.Sa.bind(this),this.ga.bind(this))},t.abort=function(){this.response=this.responseText="",this.u=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,Vu(this)),this.readyState=0},t.Sa=function(c){if(this.g&&(this.l=c,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=c.headers,this.readyState=2,Lu(this)),this.g&&(this.readyState=3,Lu(this),this.g)))if(this.responseType==="arraybuffer")c.arrayBuffer().then(this.Qa.bind(this),this.ga.bind(this));else if(typeof a.ReadableStream<"u"&&"body"in c){if(this.j=c.body.getReader(),this.o){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.v=new TextDecoder;ex(this)}else c.text().then(this.Ra.bind(this),this.ga.bind(this))};function ex(c){c.j.read().then(c.Pa.bind(c)).catch(c.ga.bind(c))}t.Pa=function(c){if(this.g){if(this.o&&c.value)this.response.push(c.value);else if(!this.o){var g=c.value?c.value:new Uint8Array(0);(g=this.v.decode(g,{stream:!c.done}))&&(this.response=this.responseText+=g)}c.done?Vu(this):Lu(this),this.readyState==3&&ex(this)}},t.Ra=function(c){this.g&&(this.response=this.responseText=c,Vu(this))},t.Qa=function(c){this.g&&(this.response=c,Vu(this))},t.ga=function(){this.g&&Vu(this)};function Vu(c){c.readyState=4,c.l=null,c.j=null,c.v=null,Lu(c)}t.setRequestHeader=function(c,g){this.u.append(c,g)},t.getResponseHeader=function(c){return this.h&&this.h.get(c.toLowerCase())||""},t.getAllResponseHeaders=function(){if(!this.h)return"";const c=[],g=this.h.entries();for(var x=g.next();!x.done;)x=x.value,c.push(x[0]+": "+x[1]),x=g.next();return c.join(`\r `)};function Lu(c){c.onreadystatechange&&c.onreadystatechange.call(c)}Object.defineProperty(pf.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(c){this.m=c?"include":"same-origin"}});function tx(c){let g="";return V(c,function(x,M){g+=M,g+=":",g+=x,g+=`\r `}),g}function Qm(c,g,x){e:{for(M in x){var M=!1;break e}M=!0}M||(x=tx(x),typeof c=="string"?x!=null&&encodeURIComponent(String(x)):gt(c,g,x))}function Nt(c){Ue.call(this),this.headers=new Map,this.o=c||null,this.h=!1,this.v=this.g=null,this.D="",this.m=0,this.l="",this.j=this.B=this.u=this.A=!1,this.I=null,this.H="",this.J=!1}v(Nt,Ue);var IM=/^https?$/i,kM=["POST","PUT"];t=Nt.prototype,t.Ha=function(c){this.J=c},t.ea=function(c,g,x,M){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.D+"; newUri="+c);g=g?g.toUpperCase():"GET",this.D=c,this.l="",this.m=0,this.A=!1,this.h=!0,this.g=this.o?this.o.g():_e.g(),this.v=this.o?Ie(this.o):Ie(_e),this.g.onreadystatechange=d(this.Ea,this);try{this.B=!0,this.g.open(g,String(c),!0),this.B=!1}catch(Y){nx(this,Y);return}if(c=x||"",x=new Map(this.headers),M)if(Object.getPrototypeOf(M)===Object.prototype)for(var U in M)x.set(U,M[U]);else if(typeof M.keys=="function"&&typeof M.get=="function")for(const Y of M.keys())x.set(Y,M.get(Y));else throw Error("Unknown input type for opt_headers: "+String(M));M=Array.from(x.keys()).find(Y=>Y.toLowerCase()=="content-type"),U=a.FormData&&c instanceof a.FormData,!(0<=Array.prototype.indexOf.call(kM,g,void 0))||M||U||x.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const[Y,ae]of x)this.g.setRequestHeader(Y,ae);this.H&&(this.g.responseType=this.H),"withCredentials"in this.g&&this.g.withCredentials!==this.J&&(this.g.withCredentials=this.J);try{sx(this),this.u=!0,this.g.send(c),this.u=!1}catch(Y){nx(this,Y)}};function nx(c,g){c.h=!1,c.g&&(c.j=!0,c.g.abort(),c.j=!1),c.l=g,c.m=5,rx(c),mf(c)}function rx(c){c.A||(c.A=!0,Ne(c,"complete"),Ne(c,"error"))}t.abort=function(c){this.g&&this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1,this.m=c||7,Ne(this,"complete"),Ne(this,"abort"),mf(this))},t.N=function(){this.g&&(this.h&&(this.h=!1,this.j=!0,this.g.abort(),this.j=!1),mf(this,!0)),Nt.aa.N.call(this)},t.Ea=function(){this.s||(this.B||this.u||this.j?ix(this):this.bb())},t.bb=function(){ix(this)};function ix(c){if(c.h&&typeof o<"u"&&(!c.v[1]||ds(c)!=4||c.Z()!=2)){if(c.u&&ds(c)==4)En(c.Ea,0,c);else if(Ne(c,"readystatechange"),ds(c)==4){c.h=!1;try{const ae=c.Z();e:switch(ae){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var g=!0;break e;default:g=!1}var x;if(!(x=g)){var M;if(M=ae===0){var U=String(c.D).match(Gw)[1]||null;!U&&a.self&&a.self.location&&(U=a.self.location.protocol.slice(0,-1)),M=!IM.test(U?U.toLowerCase():"")}x=M}if(x)Ne(c,"complete"),Ne(c,"success");else{c.m=6;try{var Y=2<ds(c)?c.g.statusText:""}catch{Y=""}c.l=Y+" ["+c.Z()+"]",rx(c)}}finally{mf(c)}}}}function mf(c,g){if(c.g){sx(c);const x=c.g,M=c.v[0]?()=>{}:null;c.g=null,c.v=null,g||Ne(c,"ready");try{x.onreadystatechange=M}catch{}}}function sx(c){c.I&&(a.clearTimeout(c.I),c.I=null)}t.isActive=function(){return!!this.g};function ds(c){return c.g?c.g.readyState:0}t.Z=function(){try{return 2<ds(this)?this.g.status:-1}catch{return-1}},t.oa=function(){try{return this.g?this.g.responseText:""}catch{return""}},t.Oa=function(c){if(this.g){var g=this.g.responseText;return c&&g.indexOf(c)==0&&(g=g.substring(c.length)),Or(g)}};function ox(c){try{if(!c.g)return null;if("response"in c.g)return c.g.response;switch(c.H){case"":case"text":return c.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in c.g)return c.g.mozResponseArrayBuffer}return null}catch{return null}}function DM(c){const g={};c=(c.g&&2<=ds(c)&&c.g.getAllResponseHeaders()||"").split(`\r `);for(let M=0;M<c.length;M++){if(w(c[M]))continue;var x=D(c[M]);const U=x[0];if(x=x[1],typeof x!="string")continue;x=x.trim();const Y=g[U]||[];g[U]=Y,Y.push(x)}S(g,function(M){return M.join(", ")})}t.Ba=function(){return this.m},t.Ka=function(){return typeof this.l=="string"?this.l:String(this.l)};function Ou(c,g,x){return x&&x.internalChannelParams&&x.internalChannelParams[c]||g}function ax(c){this.Aa=0,this.i=[],this.j=new re,this.ia=this.qa=this.I=this.W=this.g=this.ya=this.D=this.H=this.m=this.S=this.o=null,this.Ya=this.U=0,this.Va=Ou("failFast",!1,c),this.F=this.C=this.u=this.s=this.l=null,this.X=!0,this.za=this.T=-1,this.Y=this.v=this.B=0,this.Ta=Ou("baseRetryDelayMs",5e3,c),this.cb=Ou("retryDelaySeedMs",1e4,c),this.Wa=Ou("forwardChannelMaxRetries",2,c),this.wa=Ou("forwardChannelRequestTimeoutMs",2e4,c),this.pa=c&&c.xmlHttpFactory||void 0,this.Xa=c&&c.Tb||void 0,this.Ca=c&&c.useFetchStreams||!1,this.L=void 0,this.J=c&&c.supportsCrossDomainXhr||!1,this.K="",this.h=new rr(c&&c.concurrentRequestLimit),this.Da=new AM,this.P=c&&c.fastHandshake||!1,this.O=c&&c.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.Ua=c&&c.Rb||!1,c&&c.xa&&this.j.xa(),c&&c.forceLongPolling&&(this.X=!1),this.ba=!this.P&&this.X&&c&&c.detectBufferingProxy||!1,this.ja=void 0,c&&c.longPollingTimeout&&0<c.longPollingTimeout&&(this.ja=c.longPollingTimeout),this.ca=void 0,this.R=0,this.M=!1,this.ka=this.A=null}t=ax.prototype,t.la=8,t.G=1,t.connect=function(c,g,x,M){W(0),this.W=c,this.H=g||{},x&&M!==void 0&&(this.H.OSID=x,this.H.OAID=M),this.F=this.X,this.I=gx(this,null,this.W),yf(this)};function Xm(c){if(lx(c),c.G==3){var g=c.U++,x=fs(c.I);if(gt(x,"SID",c.K),gt(x,"RID",g),gt(x,"TYPE","terminate"),Fu(c,x),g=new Te(c,c.j,g),g.L=2,g.v=ff(fs(x)),x=!1,a.navigator&&a.navigator.sendBeacon)try{x=a.navigator.sendBeacon(g.v.toString(),"")}catch{}!x&&a.Image&&(new Image().src=g.v,x=!0),x||(g.g=yx(g.j,null),g.g.ea(g.v)),g.F=Date.now(),ft(g)}mx(c)}function gf(c){c.g&&(Zm(c),c.g.cancel(),c.g=null)}function lx(c){gf(c),c.u&&(a.clearTimeout(c.u),c.u=null),vf(c),c.h.cancel(),c.s&&(typeof c.s=="number"&&a.clearTimeout(c.s),c.s=null)}function yf(c){if(!Hi(c.h)&&!c.s){c.s=!0;var g=c.Ga;J||L(),B||(J(),B=!0),Q.add(g,c),c.B=0}}function MM(c,g){return $r(c.h)>=c.h.j-(c.s?1:0)?!1:c.s?(c.i=g.D.concat(c.i),!0):c.G==1||c.G==2||c.B>=(c.Va?0:c.Wa)?!1:(c.s=ne(d(c.Ga,c,g),px(c,c.B)),c.B++,!0)}t.Ga=function(c){if(this.s)if(this.s=null,this.G==1){if(!c){this.U=Math.floor(1e5*Math.random()),c=this.U++;const U=new Te(this,this.j,c);let Y=this.o;if(this.S&&(Y?(Y=m(Y),A(Y,this.S)):Y=this.S),this.m!==null||this.O||(U.H=Y,Y=null),this.P)e:{for(var g=0,x=0;x<this.i.length;x++){t:{var M=this.i[x];if("__data__"in M.map&&(M=M.map.__data__,typeof M=="string")){M=M.length;break t}M=void 0}if(M===void 0)break;if(g+=M,4096<g){g=x;break e}if(g===4096||x===this.i.length-1){g=x+1;break e}}g=1e3}else g=1e3;g=cx(this,U,g),x=fs(this.I),gt(x,"RID",c),gt(x,"CVER",22),this.D&>(x,"X-HTTP-Session-Id",this.D),Fu(this,x),Y&&(this.O?g="headers="+encodeURIComponent(String(tx(Y)))+"&"+g:this.m&&Qm(x,this.m,Y)),Ym(this.h,U),this.Ua&>(x,"TYPE","init"),this.P?(gt(x,"$req",g),gt(x,"SID","null"),U.T=!0,et(U,x,null)):et(U,x,g),this.G=2}}else this.G==3&&(c?ux(this,c):this.i.length==0||Hi(this.h)||ux(this))};function ux(c,g){var x;g?x=g.l:x=c.U++;const M=fs(c.I);gt(M,"SID",c.K),gt(M,"RID",x),gt(M,"AID",c.T),Fu(c,M),c.m&&c.o&&Qm(M,c.m,c.o),x=new Te(c,c.j,x,c.B+1),c.m===null&&(x.H=c.o),g&&(c.i=g.D.concat(c.i)),g=cx(c,x,1e3),x.I=Math.round(.5*c.wa)+Math.round(.5*c.wa*Math.random()),Ym(c.h,x),et(x,M,g)}function Fu(c,g){c.H&&V(c.H,function(x,M){gt(g,M,x)}),c.l&&Kw({},function(x,M){gt(g,M,x)})}function cx(c,g,x){x=Math.min(c.i.length,x);var M=c.l?d(c.l.Na,c.l,c):null;e:{var U=c.i;let Y=-1;for(;;){const ae=["count="+x];Y==-1?0<x?(Y=U[0].g,ae.push("ofs="+Y)):Y=0:ae.push("ofs="+Y);let ut=!0;for(let bn=0;bn<x;bn++){let tt=U[bn].g;const Vn=U[bn].map;if(tt-=Y,0>tt)Y=Math.max(0,U[bn].g-100),ut=!1;else try{RM(Vn,ae,"req"+tt+"_")}catch{M&&M(Vn)}}if(ut){M=ae.join("&");break e}}}return c=c.i.splice(0,x),g.D=c,M}function hx(c){if(!c.g&&!c.u){c.Y=1;var g=c.Fa;J||L(),B||(J(),B=!0),Q.add(g,c),c.v=0}}function Jm(c){return c.g||c.u||3<=c.v?!1:(c.Y++,c.u=ne(d(c.Fa,c),px(c,c.v)),c.v++,!0)}t.Fa=function(){if(this.u=null,fx(this),this.ba&&!(this.M||this.g==null||0>=this.R)){var c=2*this.R;this.j.info("BP detection timer enabled: "+c),this.A=ne(d(this.ab,this),c)}},t.ab=function(){this.A&&(this.A=null,this.j.info("BP detection timeout reached."),this.j.info("Buffering proxy detected and switch to long-polling!"),this.F=!1,this.M=!0,W(10),gf(this),fx(this))};function Zm(c){c.A!=null&&(a.clearTimeout(c.A),c.A=null)}function fx(c){c.g=new Te(c,c.j,"rpc",c.Y),c.m===null&&(c.g.H=c.o),c.g.O=0;var g=fs(c.qa);gt(g,"RID","rpc"),gt(g,"SID",c.K),gt(g,"AID",c.T),gt(g,"CI",c.F?"0":"1"),!c.F&&c.ja&>(g,"TO",c.ja),gt(g,"TYPE","xmlhttp"),Fu(c,g),c.m&&c.o&&Qm(g,c.m,c.o),c.L&&(c.g.I=c.L);var x=c.g;c=c.ia,x.L=1,x.v=ff(fs(g)),x.m=null,x.P=!0,St(x,c)}t.Za=function(){this.C!=null&&(this.C=null,gf(this),Jm(this),W(19))};function vf(c){c.C!=null&&(a.clearTimeout(c.C),c.C=null)}function dx(c,g){var x=null;if(c.g==g){vf(c),Zm(c),c.g=null;var M=2}else if(Gm(c.h,g))x=g.D,Ww(c.h,g),M=1;else return;if(c.G!=0){if(g.o)if(M==1){x=g.m?g.m.length:0,g=Date.now()-g.F;var U=c.B;M=Mn(),Ne(M,new K(M,x)),yf(c)}else hx(c);else if(U=g.s,U==3||U==0&&0<g.X||!(M==1&&MM(c,g)||M==2&&Jm(c)))switch(x&&0<x.length&&(g=c.h,g.i=g.i.concat(x)),U){case 1:Uo(c,5);break;case 4:Uo(c,10);break;case 3:Uo(c,6);break;default:Uo(c,2)}}}function px(c,g){let x=c.Ta+Math.floor(Math.random()*c.cb);return c.isActive()||(x*=2),x*g}function Uo(c,g){if(c.j.info("Error code "+g),g==2){var x=d(c.fb,c),M=c.Xa;const U=!M;M=new Bo(M||"//www.google.com/images/cleardot.gif"),a.location&&a.location.protocol=="http"||cf(M,"https"),ff(M),U?CM(M.toString(),x):PM(M.toString(),x)}else W(2);c.G=0,c.l&&c.l.sa(g),mx(c),lx(c)}t.fb=function(c){c?(this.j.info("Successfully pinged google.com"),W(2)):(this.j.info("Failed to ping google.com"),W(1))};function mx(c){if(c.G=0,c.ka=[],c.l){const g=qw(c.h);(g.length!=0||c.i.length!=0)&&(C(c.ka,g),C(c.ka,c.i),c.h.i.length=0,y(c.i),c.i.length=0),c.l.ra()}}function gx(c,g,x){var M=x instanceof Bo?fs(x):new Bo(x);if(M.g!="")g&&(M.g=g+"."+M.g),hf(M,M.s);else{var U=a.location;M=U.protocol,g=g?g+"."+U.hostname:U.hostname,U=+U.port;var Y=new Bo(null);M&&cf(Y,M),g&&(Y.g=g),U&&hf(Y,U),x&&(Y.l=x),M=Y}return x=c.D,g=c.ya,x&&g&>(M,x,g),gt(M,"VER",c.la),Fu(c,M),M}function yx(c,g,x){if(g&&!c.J)throw Error("Can't create secondary domain capable XhrIo object.");return g=c.Ca&&!c.pa?new Nt(new df({eb:x})):new Nt(c.pa),g.Ha(c.J),g}t.isActive=function(){return!!this.l&&this.l.isActive(this)};function vx(){}t=vx.prototype,t.ua=function(){},t.ta=function(){},t.sa=function(){},t.ra=function(){},t.isActive=function(){return!0},t.Na=function(){};function _f(){}_f.prototype.g=function(c,g){return new zr(c,g)};function zr(c,g){Ue.call(this),this.g=new ax(g),this.l=c,this.h=g&&g.messageUrlParams||null,c=g&&g.messageHeaders||null,g&&g.clientProtocolHeaderRequired&&(c?c["X-Client-Protocol"]="webchannel":c={"X-Client-Protocol":"webchannel"}),this.g.o=c,c=g&&g.initMessageHeaders||null,g&&g.messageContentType&&(c?c["X-WebChannel-Content-Type"]=g.messageContentType:c={"X-WebChannel-Content-Type":g.messageContentType}),g&&g.va&&(c?c["X-WebChannel-Client-Profile"]=g.va:c={"X-WebChannel-Client-Profile":g.va}),this.g.S=c,(c=g&&g.Sb)&&!w(c)&&(this.g.m=c),this.v=g&&g.supportsCrossDomainXhr||!1,this.u=g&&g.sendRawJson||!1,(g=g&&g.httpSessionIdParam)&&!w(g)&&(this.g.D=g,c=this.h,c!==null&&g in c&&(c=this.h,g in c&&delete c[g])),this.j=new Wa(this)}v(zr,Ue),zr.prototype.m=function(){this.g.l=this.j,this.v&&(this.g.J=!0),this.g.connect(this.l,this.h||void 0)},zr.prototype.close=function(){Xm(this.g)},zr.prototype.o=function(c){var g=this.g;if(typeof c=="string"){var x={};x.__data__=c,c=x}else this.u&&(x={},x.__data__=Lr(c),c=x);g.i.push(new Qe(g.Ya++,c)),g.G==3&&yf(g)},zr.prototype.N=function(){this.g.l=null,delete this.j,Xm(this.g),delete this.g,zr.aa.N.call(this)};function _x(c){fn.call(this),c.__headers__&&(this.headers=c.__headers__,this.statusCode=c.__status__,delete c.__headers__,delete c.__status__);var g=c.__sm__;if(g){e:{for(const x in g){c=x;break e}c=void 0}(this.i=c)&&(c=this.i,g=g!==null&&c in g?g[c]:void 0),this.data=g}else this.data=c}v(_x,fn);function wx(){Yt.call(this),this.status=1}v(wx,Yt);function Wa(c){this.g=c}v(Wa,vx),Wa.prototype.ua=function(){Ne(this.g,"a")},Wa.prototype.ta=function(c){Ne(this.g,new _x(c))},Wa.prototype.sa=function(c){Ne(this.g,new wx)},Wa.prototype.ra=function(){Ne(this.g,"b")},_f.prototype.createWebChannel=_f.prototype.g,zr.prototype.send=zr.prototype.o,zr.prototype.open=zr.prototype.m,zr.prototype.close=zr.prototype.close,W2=function(){return new _f},H2=function(){return Mn()},U2=Qt,U0={mb:0,pb:1,qb:2,Jb:3,Ob:4,Lb:5,Mb:6,Kb:7,Ib:8,Nb:9,PROXY:10,NOPROXY:11,Gb:12,Cb:13,Db:14,Bb:15,Eb:16,Fb:17,ib:18,hb:19,jb:20},xe.NO_ERROR=0,xe.TIMEOUT=8,xe.HTTP_ERROR=6,Ld=xe,Pe.COMPLETE="complete",B2=Pe,jr.EventType=sn,sn.OPEN="a",sn.CLOSE="b",sn.ERROR="c",sn.MESSAGE="d",Ue.prototype.listen=Ue.prototype.K,dc=jr,Nt.prototype.listenOnce=Nt.prototype.L,Nt.prototype.getLastError=Nt.prototype.Ka,Nt.prototype.getLastErrorCode=Nt.prototype.Ba,Nt.prototype.getStatus=Nt.prototype.Z,Nt.prototype.getResponseJson=Nt.prototype.Oa,Nt.prototype.getResponseText=Nt.prototype.oa,Nt.prototype.send=Nt.prototype.ea,Nt.prototype.setWithCredentials=Nt.prototype.Ha,z2=Nt}).apply(typeof Wf<"u"?Wf:typeof self<"u"?self:typeof window<"u"?window:{});const Tb="@firebase/firestore";/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Bn{constructor(e){this.uid=e}isAuthenticated(){return this.uid!=null}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}Bn.UNAUTHENTICATED=new Bn(null),Bn.GOOGLE_CREDENTIALS=new Bn("google-credentials-uid"),Bn.FIRST_PARTY=new Bn("first-party-uid"),Bn.MOCK_USER=new Bn("mock-user");/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Su="11.0.2";/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ia=new N2("@firebase/firestore");function Za(){return Ia.logLevel}function de(t,...e){if(Ia.logLevel<=qe.DEBUG){const n=e.map(D1);Ia.debug(`Firestore (${Su}): ${t}`,...n)}}function Ms(t,...e){if(Ia.logLevel<=qe.ERROR){const n=e.map(D1);Ia.error(`Firestore (${Su}): ${t}`,...n)}}function tu(t,...e){if(Ia.logLevel<=qe.WARN){const n=e.map(D1);Ia.warn(`Firestore (${Su}): ${t}`,...n)}}function D1(t){if(typeof t=="string")return t;try{/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */return function(n){return JSON.stringify(n)}(t)}catch{return t}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Re(t="Unexpected state"){const e=`FIRESTORE (${Su}) INTERNAL ASSERTION FAILED: `+t;throw Ms(e),new Error(e)}function Dt(t,e){t||Re()}function Ge(t,e){return t}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const ie={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class ce extends bu{constructor(e,n){super(e,n),this.code=e,this.message=n,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ga{constructor(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class q2{constructor(e,n){this.user=n,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class $${getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,n){e.enqueueRetryable(()=>n(Bn.UNAUTHENTICATED))}shutdown(){}}class z${constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,n){this.changeListener=n,e.enqueueRetryable(()=>n(this.token.user))}shutdown(){this.changeListener=null}}class B${constructor(e){this.t=e,this.currentUser=Bn.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,n){Dt(this.o===void 0);let r=this.i;const i=l=>this.i!==r?(r=this.i,n(l)):Promise.resolve();let s=new ga;this.o=()=>{this.i++,this.currentUser=this.u(),s.resolve(),s=new ga,e.enqueueRetryable(()=>i(this.currentUser))};const o=()=>{const l=s;e.enqueueRetryable(async()=>{await l.promise,await i(this.currentUser)})},a=l=>{de("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=l,this.o&&(this.auth.addAuthTokenListener(this.o),o())};this.t.onInit(l=>a(l)),setTimeout(()=>{if(!this.auth){const l=this.t.getImmediate({optional:!0});l?a(l):(de("FirebaseAuthCredentialsProvider","Auth not yet detected"),s.resolve(),s=new ga)}},0),o()}getToken(){const e=this.i,n=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(n).then(r=>this.i!==e?(de("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):r?(Dt(typeof r.accessToken=="string"),new q2(r.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.o&&this.auth.removeAuthTokenListener(this.o),this.o=void 0}u(){const e=this.auth&&this.auth.getUid();return Dt(e===null||typeof e=="string"),new Bn(e)}}class U${constructor(e,n,r){this.l=e,this.h=n,this.P=r,this.type="FirstParty",this.user=Bn.FIRST_PARTY,this.T=new Map}I(){return this.P?this.P():null}get headers(){this.T.set("X-Goog-AuthUser",this.l);const e=this.I();return e&&this.T.set("Authorization",e),this.h&&this.T.set("X-Goog-Iam-Authorization-Token",this.h),this.T}}class H${constructor(e,n,r){this.l=e,this.h=n,this.P=r}getToken(){return Promise.resolve(new U$(this.l,this.h,this.P))}start(e,n){e.enqueueRetryable(()=>n(Bn.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class W${constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class q${constructor(e){this.A=e,this.forceRefresh=!1,this.appCheck=null,this.R=null}start(e,n){Dt(this.o===void 0);const r=s=>{s.error!=null&&de("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${s.error.message}`);const o=s.token!==this.R;return this.R=s.token,de("FirebaseAppCheckTokenProvider",`Received ${o?"new":"existing"} token.`),o?n(s.token):Promise.resolve()};this.o=s=>{e.enqueueRetryable(()=>r(s))};const i=s=>{de("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=s,this.o&&this.appCheck.addTokenListener(this.o)};this.A.onInit(s=>i(s)),setTimeout(()=>{if(!this.appCheck){const s=this.A.getImmediate({optional:!0});s?i(s):de("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){const e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(n=>n?(Dt(typeof n.token=="string"),this.R=n.token,new W$(n.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.o&&this.appCheck.removeTokenListener(this.o),this.o=void 0}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function K$(t){const e=typeof self<"u"&&(self.crypto||self.msCrypto),n=new Uint8Array(t);if(e&&typeof e.getRandomValues=="function")e.getRandomValues(n);else for(let r=0;r<t;r++)n[r]=Math.floor(256*Math.random());return n}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class G${static newId(){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/e.length)*e.length;let r="";for(;r.length<20;){const i=K$(40);for(let s=0;s<i.length;++s)r.length<20&&i[s]<n&&(r+=e.charAt(i[s]%e.length))}return r}}function Ke(t,e){return t<e?-1:t>e?1:0}function nu(t,e,n){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class _n{static now(){return _n.fromMillis(Date.now())}static fromDate(e){return _n.fromMillis(e.getTime())}static fromMillis(e){const n=Math.floor(e/1e3),r=Math.floor(1e6*(e-1e3*n));return new _n(n,r)}constructor(e,n){if(this.seconds=e,this.nanoseconds=n,n<0)throw new ce(ie.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new ce(ie.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(e<-62135596800)throw new ce(ie.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e);if(e>=253402300800)throw new ce(ie.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?Ke(this.nanoseconds,e.nanoseconds):Ke(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){const e=this.seconds- -62135596800;return String(e).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ae{static fromTimestamp(e){return new Ae(e)}static min(){return new Ae(new _n(0,0))}static max(){return new Ae(new _n(253402300799,999999999))}constructor(e){this.timestamp=e}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ih{constructor(e,n,r){n===void 0?n=0:n>e.length&&Re(),r===void 0?r=e.length-n:r>e.length-n&&Re(),this.segments=e,this.offset=n,this.len=r}get length(){return this.len}isEqual(e){return Ih.comparator(this,e)===0}child(e){const n=this.segments.slice(this.offset,this.limit());return e instanceof Ih?e.forEach(r=>{n.push(r)}):n.push(e),this.construct(n)}limit(){return this.offset+this.length}popFirst(e){return e=e===void 0?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return this.length===0}isPrefixOf(e){if(e.length<this.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let n=0;n<this.length;n++)if(this.get(n)!==e.get(n))return!1;return!0}forEach(e){for(let n=this.offset,r=this.limit();n<r;n++)e(this.segments[n])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,n){const r=Math.min(e.length,n.length);for(let i=0;i<r;i++){const s=e.get(i),o=n.get(i);if(s<o)return-1;if(s>o)return 1}return e.length<n.length?-1:e.length>n.length?1:0}}class xt extends Ih{construct(e,n,r){return new xt(e,n,r)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}toUriEncodedString(){return this.toArray().map(encodeURIComponent).join("/")}static fromString(...e){const n=[];for(const r of e){if(r.indexOf("//")>=0)throw new ce(ie.INVALID_ARGUMENT,`Invalid segment (${r}). Paths must not contain // in them.`);n.push(...r.split("/").filter(i=>i.length>0))}return new xt(n)}static emptyPath(){return new xt([])}}const Y$=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class qn extends Ih{construct(e,n,r){return new qn(e,n,r)}static isValidIdentifier(e){return Y$.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),qn.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return this.length===1&&this.get(0)==="__name__"}static keyField(){return new qn(["__name__"])}static fromServerFormat(e){const n=[];let r="",i=0;const s=()=>{if(r.length===0)throw new ce(ie.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);n.push(r),r=""};let o=!1;for(;i<e.length;){const a=e[i];if(a==="\\"){if(i+1===e.length)throw new ce(ie.INVALID_ARGUMENT,"Path has trailing escape character: "+e);const l=e[i+1];if(l!=="\\"&&l!=="."&&l!=="`")throw new ce(ie.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);r+=l,i+=2}else a==="`"?(o=!o,i++):a!=="."||o?(r+=a,i++):(s(),i++)}if(s(),o)throw new ce(ie.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new qn(n)}static emptyPath(){return new qn([])}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Ee{constructor(e){this.path=e}static fromPath(e){return new Ee(xt.fromString(e))}static fromName(e){return new Ee(xt.fromString(e).popFirst(5))}static empty(){return new Ee(xt.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return e!==null&&xt.comparator(this.path,e.path)===0}toString(){return this.path.toString()}static comparator(e,n){return xt.comparator(e.path,n.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new Ee(new xt(e.slice()))}}function Q$(t,e){const n=t.toTimestamp().seconds,r=t.toTimestamp().nanoseconds+1,i=Ae.fromTimestamp(r===1e9?new _n(n+1,0):new _n(n,r));return new Po(i,Ee.empty(),e)}function X$(t){return new Po(t.readTime,t.key,-1)}class Po{constructor(e,n,r){this.readTime=e,this.documentKey=n,this.largestBatchId=r}static min(){return new Po(Ae.min(),Ee.empty(),-1)}static max(){return new Po(Ae.max(),Ee.empty(),-1)}}function J$(t,e){let n=t.readTime.compareTo(e.readTime);return n!==0?n:(n=Ee.comparator(t.documentKey,e.documentKey),n!==0?n:Ke(t.largestBatchId,e.largestBatchId))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Z$="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.";class e9{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */async function Pm(t){if(t.code!==ie.FAILED_PRECONDITION||t.message!==Z$)throw t;de("LocalStore","Unexpectedly lost primary lease")}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Z{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(n=>{this.isDone=!0,this.result=n,this.nextCallback&&this.nextCallback(n)},n=>{this.isDone=!0,this.error=n,this.catchCallback&&this.catchCallback(n)})}catch(e){return this.next(void 0,e)}next(e,n){return this.callbackAttached&&Re(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(e,this.result):new Z((r,i)=>{this.nextCallback=s=>{this.wrapSuccess(e,s).next(r,i)},this.catchCallback=s=>{this.wrapFailure(n,s).next(r,i)}})}toPromise(){return new Promise((e,n)=>{this.next(e,n)})}wrapUserFunction(e){try{const n=e();return n instanceof Z?n:Z.resolve(n)}catch(n){return Z.reject(n)}}wrapSuccess(e,n){return e?this.wrapUserFunction(()=>e(n)):Z.resolve(n)}wrapFailure(e,n){return e?this.wrapUserFunction(()=>e(n)):Z.reject(n)}static resolve(e){return new Z((n,r)=>{n(e)})}static reject(e){return new Z((n,r)=>{r(e)})}static waitFor(e){return new Z((n,r)=>{let i=0,s=0,o=!1;e.forEach(a=>{++i,a.next(()=>{++s,o&&s===i&&n()},l=>r(l))}),o=!0,s===i&&n()})}static or(e){let n=Z.resolve(!1);for(const r of e)n=n.next(i=>i?Z.resolve(i):r());return n}static forEach(e,n){const r=[];return e.forEach((i,s)=>{r.push(n.call(this,i,s))}),this.waitFor(r)}static mapArray(e,n){return new Z((r,i)=>{const s=e.length,o=new Array(s);let a=0;for(let l=0;l<s;l++){const u=l;n(e[u]).next(h=>{o[u]=h,++a,a===s&&r(o)},h=>i(h))}})}static doWhile(e,n){return new Z((r,i)=>{const s=()=>{e()===!0?n().next(()=>{s()},i):r()};s()})}}function t9(t){const e=t.match(/Android ([\d.]+)/i),n=e?e[1].split(".").slice(0,2).join("."):"-1";return Number(n)}function Cu(t){return t.name==="IndexedDbTransactionError"}/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Am{constructor(e,n){this.previousValue=e,n&&(n.sequenceNumberHandler=r=>this.ie(r),this.se=r=>n.writeSequenceNumber(r))}ie(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){const e=++this.previousValue;return this.se&&this.se(e),e}}Am.oe=-1;function Rm(t){return t==null}function Mp(t){return t===0&&1/t==-1/0}function n9(t){return typeof t=="number"&&Number.isInteger(t)&&!Mp(t)&&t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function r9(t){let e="";for(let n=0;n<t.length;n++)e.length>0&&(e=Eb(e)),e=i9(t.get(n),e);return Eb(e)}function i9(t,e){let n=e;const r=t.length;for(let i=0;i<r;i++){const s=t.charAt(i);switch(s){case"\0":n+="";break;case"":n+="";break;default:n+=s}}return n}function Eb(t){return t+""}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function bb(t){let e=0;for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}function Pu(t,e){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])}function K2(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Wt{constructor(e,n){this.comparator=e,this.root=n||Pn.EMPTY}insert(e,n){return new Wt(this.comparator,this.root.insert(e,n,this.comparator).copy(null,null,Pn.BLACK,null,null))}remove(e){return new Wt(this.comparator,this.root.remove(e,this.comparator).copy(null,null,Pn.BLACK,null,null))}get(e){let n=this.root;for(;!n.isEmpty();){const r=this.comparator(e,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null}indexOf(e){let n=0,r=this.root;for(;!r.isEmpty();){const i=this.comparator(e,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((n,r)=>(e(n,r),!1))}toString(){const e=[];return this.inorderTraversal((n,r)=>(e.push(`${n}:${r}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new qf(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new qf(this.root,e,this.comparator,!1)}getReverseIterator(){return new qf(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new qf(this.root,e,this.comparator,!0)}}class qf{constructor(e,n,r,i){this.isReverse=i,this.nodeStack=[];let s=1;for(;!e.isEmpty();)if(s=n?r(e.key,n):1,n&&i&&(s*=-1),s<0)e=this.isReverse?e.left:e.right;else{if(s===0){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop();const n={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return n}hasNext(){return this.nodeStack.length>0}peek(){if(this.nodeStack.length===0)return null;const e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class Pn{constructor(e,n,r,i,s){this.key=e,this.value=n,this.color=r??Pn.RED,this.left=i??Pn.EMPTY,this.right=s??Pn.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,n,r,i,s){return new Pn(e??this.key,n??this.value,r??this.color,i??this.left,s??this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,n,r){let i=this;const s=r(e,i.key);return i=s<0?i.copy(null,null,null,i.left.insert(e,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(e,n,r)),i.fixUp()}removeMin(){if(this.left.isEmpty())return Pn.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),e=e.copy(null,null,null,e.left.removeMin(),null),e.fixUp()}remove(e,n){let r,i=this;if(n(e,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(e,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(e,i.key)===0){if(i.right.isEmpty())return Pn.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(e,n))}return i.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=e.copy(null,null,null,null,e.right.rotateRight()),e=e.rotateLeft(),e=e.colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=e.rotateRight(),e=e.colorFlip()),e}rotateLeft(){const e=this.copy(null,null,Pn.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){const e=this.copy(null,null,Pn.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){const e=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,n)}checkMaxDepth(){const e=this.check();return Math.pow(2,e)<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw Re();const e=this.left.check();if(e!==this.right.check())throw Re();return e+(this.isRed()?0:1)}}Pn.EMPTY=null,Pn.RED=!0,Pn.BLACK=!1;Pn.EMPTY=new class{constructor(){this.size=0}get key(){throw Re()}get value(){throw Re()}get color(){throw Re()}get left(){throw Re()}get right(){throw Re()}copy(e,n,r,i,s){return this}insert(e,n,r){return new Pn(e,n)}remove(e,n){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hn{constructor(e){this.comparator=e,this.data=new Wt(this.comparator)}has(e){return this.data.get(e)!==null}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((n,r)=>(e(n),!1))}forEachInRange(e,n){const r=this.data.getIteratorFrom(e[0]);for(;r.hasNext();){const i=r.getNext();if(this.comparator(i.key,e[1])>=0)return;n(i.key)}}forEachWhile(e,n){let r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!e(r.getNext().key))return}firstAfterOrEqual(e){const n=this.data.getIteratorFrom(e);return n.hasNext()?n.getNext().key:null}getIterator(){return new Sb(this.data.getIterator())}getIteratorFrom(e){return new Sb(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let n=this;return n.size<e.size&&(n=e,e=this),e.forEach(r=>{n=n.add(r)}),n}isEqual(e){if(!(e instanceof hn)||this.size!==e.size)return!1;const n=this.data.getIterator(),r=e.data.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(this.comparator(i,s)!==0)return!1}return!0}toArray(){const e=[];return this.forEach(n=>{e.push(n)}),e}toString(){const e=[];return this.forEach(n=>e.push(n)),"SortedSet("+e.toString()+")"}copy(e){const n=new hn(this.comparator);return n.data=e,n}}class Sb{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class to{constructor(e){this.fields=e,e.sort(qn.comparator)}static empty(){return new to([])}unionWith(e){let n=new hn(qn.comparator);for(const r of this.fields)n=n.add(r);for(const r of e)n=n.add(r);return new to(n.toArray())}covers(e){for(const n of this.fields)if(n.isPrefixOf(e))return!0;return!1}isEqual(e){return nu(this.fields,e.fields,(n,r)=>n.isEqual(r))}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class G2 extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Dn{constructor(e){this.binaryString=e}static fromBase64String(e){const n=function(i){try{return atob(i)}catch(s){throw typeof DOMException<"u"&&s instanceof DOMException?new G2("Invalid base64 string: "+s):s}}(e);return new Dn(n)}static fromUint8Array(e){const n=function(i){let s="";for(let o=0;o<i.length;++o)s+=String.fromCharCode(i[o]);return s}(e);return new Dn(n)}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return function(n){return btoa(n)}(this.binaryString)}toUint8Array(){return function(n){const r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return Ke(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}Dn.EMPTY_BYTE_STRING=new Dn("");const s9=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function Ao(t){if(Dt(!!t),typeof t=="string"){let e=0;const n=s9.exec(t);if(Dt(!!n),n[1]){let i=n[1];i=(i+"000000000").substr(0,9),e=Number(i)}const r=new Date(t);return{seconds:Math.floor(r.getTime()/1e3),nanos:e}}return{seconds:zt(t.seconds),nanos:zt(t.nanos)}}function zt(t){return typeof t=="number"?t:typeof t=="string"?Number(t):0}function Ro(t){return typeof t=="string"?Dn.fromBase64String(t):Dn.fromUint8Array(t)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Im(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="server_timestamp"}function km(t){const e=t.mapValue.fields.__previous_value__;return Im(e)?km(e):e}function kh(t){const e=Ao(t.mapValue.fields.__local_write_time__.timestampValue);return new _n(e.seconds,e.nanos)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class o9{constructor(e,n,r,i,s,o,a,l,u){this.databaseId=e,this.appId=n,this.persistenceKey=r,this.host=i,this.ssl=s,this.forceLongPolling=o,this.autoDetectLongPolling=a,this.longPollingOptions=l,this.useFetchStreams=u}}class Dh{constructor(e,n){this.projectId=e,this.database=n||"(default)"}static empty(){return new Dh("","")}get isDefaultDatabase(){return this.database==="(default)"}isEqual(e){return e instanceof Dh&&e.projectId===this.projectId&&e.database===this.database}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Kf={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function Io(t){return"nullValue"in t?0:"booleanValue"in t?1:"integerValue"in t||"doubleValue"in t?2:"timestampValue"in t?3:"stringValue"in t?5:"bytesValue"in t?6:"referenceValue"in t?7:"geoPointValue"in t?8:"arrayValue"in t?9:"mapValue"in t?Im(t)?4:l9(t)?9007199254740991:a9(t)?10:11:Re()}function cs(t,e){if(t===e)return!0;const n=Io(t);if(n!==Io(e))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return t.booleanValue===e.booleanValue;case 4:return kh(t).isEqual(kh(e));case 3:return function(i,s){if(typeof i.timestampValue=="string"&&typeof s.timestampValue=="string"&&i.timestampValue.length===s.timestampValue.length)return i.timestampValue===s.timestampValue;const o=Ao(i.timestampValue),a=Ao(s.timestampValue);return o.seconds===a.seconds&&o.nanos===a.nanos}(t,e);case 5:return t.stringValue===e.stringValue;case 6:return function(i,s){return Ro(i.bytesValue).isEqual(Ro(s.bytesValue))}(t,e);case 7:return t.referenceValue===e.referenceValue;case 8:return function(i,s){return zt(i.geoPointValue.latitude)===zt(s.geoPointValue.latitude)&&zt(i.geoPointValue.longitude)===zt(s.geoPointValue.longitude)}(t,e);case 2:return function(i,s){if("integerValue"in i&&"integerValue"in s)return zt(i.integerValue)===zt(s.integerValue);if("doubleValue"in i&&"doubleValue"in s){const o=zt(i.doubleValue),a=zt(s.doubleValue);return o===a?Mp(o)===Mp(a):isNaN(o)&&isNaN(a)}return!1}(t,e);case 9:return nu(t.arrayValue.values||[],e.arrayValue.values||[],cs);case 10:case 11:return function(i,s){const o=i.mapValue.fields||{},a=s.mapValue.fields||{};if(bb(o)!==bb(a))return!1;for(const l in o)if(o.hasOwnProperty(l)&&(a[l]===void 0||!cs(o[l],a[l])))return!1;return!0}(t,e);default:return Re()}}function Mh(t,e){return(t.values||[]).find(n=>cs(n,e))!==void 0}function ru(t,e){if(t===e)return 0;const n=Io(t),r=Io(e);if(n!==r)return Ke(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return Ke(t.booleanValue,e.booleanValue);case 2:return function(s,o){const a=zt(s.integerValue||s.doubleValue),l=zt(o.integerValue||o.doubleValue);return a<l?-1:a>l?1:a===l?0:isNaN(a)?isNaN(l)?0:-1:1}(t,e);case 3:return Cb(t.timestampValue,e.timestampValue);case 4:return Cb(kh(t),kh(e));case 5:return Ke(t.stringValue,e.stringValue);case 6:return function(s,o){const a=Ro(s),l=Ro(o);return a.compareTo(l)}(t.bytesValue,e.bytesValue);case 7:return function(s,o){const a=s.split("/"),l=o.split("/");for(let u=0;u<a.length&&u<l.length;u++){const h=Ke(a[u],l[u]);if(h!==0)return h}return Ke(a.length,l.length)}(t.referenceValue,e.referenceValue);case 8:return function(s,o){const a=Ke(zt(s.latitude),zt(o.latitude));return a!==0?a:Ke(zt(s.longitude),zt(o.longitude))}(t.geoPointValue,e.geoPointValue);case 9:return Pb(t.arrayValue,e.arrayValue);case 10:return function(s,o){var a,l,u,h;const f=s.fields||{},d=o.fields||{},p=(a=f.value)===null||a===void 0?void 0:a.arrayValue,v=(l=d.value)===null||l===void 0?void 0:l.arrayValue,y=Ke(((u=p==null?void 0:p.values)===null||u===void 0?void 0:u.length)||0,((h=v==null?void 0:v.values)===null||h===void 0?void 0:h.length)||0);return y!==0?y:Pb(p,v)}(t.mapValue,e.mapValue);case 11:return function(s,o){if(s===Kf.mapValue&&o===Kf.mapValue)return 0;if(s===Kf.mapValue)return 1;if(o===Kf.mapValue)return-1;const a=s.fields||{},l=Object.keys(a),u=o.fields||{},h=Object.keys(u);l.sort(),h.sort();for(let f=0;f<l.length&&f<h.length;++f){const d=Ke(l[f],h[f]);if(d!==0)return d;const p=ru(a[l[f]],u[h[f]]);if(p!==0)return p}return Ke(l.length,h.length)}(t.mapValue,e.mapValue);default:throw Re()}}function Cb(t,e){if(typeof t=="string"&&typeof e=="string"&&t.length===e.length)return Ke(t,e);const n=Ao(t),r=Ao(e),i=Ke(n.seconds,r.seconds);return i!==0?i:Ke(n.nanos,r.nanos)}function Pb(t,e){const n=t.values||[],r=e.values||[];for(let i=0;i<n.length&&i<r.length;++i){const s=ru(n[i],r[i]);if(s)return s}return Ke(n.length,r.length)}function iu(t){return H0(t)}function H0(t){return"nullValue"in t?"null":"booleanValue"in t?""+t.booleanValue:"integerValue"in t?""+t.integerValue:"doubleValue"in t?""+t.doubleValue:"timestampValue"in t?function(n){const r=Ao(n);return`time(${r.seconds},${r.nanos})`}(t.timestampValue):"stringValue"in t?t.stringValue:"bytesValue"in t?function(n){return Ro(n).toBase64()}(t.bytesValue):"referenceValue"in t?function(n){return Ee.fromName(n).toString()}(t.referenceValue):"geoPointValue"in t?function(n){return`geo(${n.latitude},${n.longitude})`}(t.geoPointValue):"arrayValue"in t?function(n){let r="[",i=!0;for(const s of n.values||[])i?i=!1:r+=",",r+=H0(s);return r+"]"}(t.arrayValue):"mapValue"in t?function(n){const r=Object.keys(n.fields||{}).sort();let i="{",s=!0;for(const o of r)s?s=!1:i+=",",i+=`${o}:${H0(n.fields[o])}`;return i+"}"}(t.mapValue):Re()}function Od(t){switch(Io(t)){case 0:case 1:return 4;case 2:return 8;case 3:case 8:return 16;case 4:const e=km(t);return e?16+Od(e):16;case 5:return 2*t.stringValue.length;case 6:return Ro(t.bytesValue).approximateByteSize();case 7:return t.referenceValue.length;case 9:return function(r){return(r.values||[]).reduce((i,s)=>i+Od(s),0)}(t.arrayValue);case 10:case 11:return function(r){let i=0;return Pu(r.fields,(s,o)=>{i+=s.length+Od(o)}),i}(t.mapValue);default:throw Re()}}function Np(t,e){return{referenceValue:`projects/${t.projectId}/databases/${t.database}/documents/${e.path.canonicalString()}`}}function W0(t){return!!t&&"integerValue"in t}function M1(t){return!!t&&"arrayValue"in t}function Ab(t){return!!t&&"nullValue"in t}function Rb(t){return!!t&&"doubleValue"in t&&isNaN(Number(t.doubleValue))}function Gg(t){return!!t&&"mapValue"in t}function a9(t){var e,n;return((n=(((e=t==null?void 0:t.mapValue)===null||e===void 0?void 0:e.fields)||{}).__type__)===null||n===void 0?void 0:n.stringValue)==="__vector__"}function Fc(t){if(t.geoPointValue)return{geoPointValue:Object.assign({},t.geoPointValue)};if(t.timestampValue&&typeof t.timestampValue=="object")return{timestampValue:Object.assign({},t.timestampValue)};if(t.mapValue){const e={mapValue:{fields:{}}};return Pu(t.mapValue.fields,(n,r)=>e.mapValue.fields[n]=Fc(r)),e}if(t.arrayValue){const e={arrayValue:{values:[]}};for(let n=0;n<(t.arrayValue.values||[]).length;++n)e.arrayValue.values[n]=Fc(t.arrayValue.values[n]);return e}return Object.assign({},t)}function l9(t){return(((t.mapValue||{}).fields||{}).__type__||{}).stringValue==="__max__"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Qi{constructor(e){this.value=e}static empty(){return new Qi({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let n=this.value;for(let r=0;r<e.length-1;++r)if(n=(n.mapValue.fields||{})[e.get(r)],!Gg(n))return null;return n=(n.mapValue.fields||{})[e.lastSegment()],n||null}}set(e,n){this.getFieldsMap(e.popLast())[e.lastSegment()]=Fc(n)}setAll(e){let n=qn.emptyPath(),r={},i=[];e.forEach((o,a)=>{if(!n.isImmediateParentOf(a)){const l=this.getFieldsMap(n);this.applyChanges(l,r,i),r={},i=[],n=a.popLast()}o?r[a.lastSegment()]=Fc(o):i.push(a.lastSegment())});const s=this.getFieldsMap(n);this.applyChanges(s,r,i)}delete(e){const n=this.field(e.popLast());Gg(n)&&n.mapValue.fields&&delete n.mapValue.fields[e.lastSegment()]}isEqual(e){return cs(this.value,e.value)}getFieldsMap(e){let n=this.value;n.mapValue.fields||(n.mapValue={fields:{}});for(let r=0;r<e.length;++r){let i=n.mapValue.fields[e.get(r)];Gg(i)&&i.mapValue.fields||(i={mapValue:{fields:{}}},n.mapValue.fields[e.get(r)]=i),n=i}return n.mapValue.fields}applyChanges(e,n,r){Pu(n,(i,s)=>e[i]=s);for(const i of r)delete e[i]}clone(){return new Qi(Fc(this.value))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Wn{constructor(e,n,r,i,s,o,a){this.key=e,this.documentType=n,this.version=r,this.readTime=i,this.createTime=s,this.data=o,this.documentState=a}static newInvalidDocument(e){return new Wn(e,0,Ae.min(),Ae.min(),Ae.min(),Qi.empty(),0)}static newFoundDocument(e,n,r,i){return new Wn(e,1,n,Ae.min(),r,i,0)}static newNoDocument(e,n){return new Wn(e,2,n,Ae.min(),Ae.min(),Qi.empty(),0)}static newUnknownDocument(e,n){return new Wn(e,3,n,Ae.min(),Ae.min(),Qi.empty(),2)}convertToFoundDocument(e,n){return!this.createTime.isEqual(Ae.min())||this.documentType!==2&&this.documentType!==0||(this.createTime=e),this.version=e,this.documentType=1,this.data=n,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=Qi.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=Qi.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=Ae.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return this.documentState===1}get hasCommittedMutations(){return this.documentState===2}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return this.documentType!==0}isFoundDocument(){return this.documentType===1}isNoDocument(){return this.documentType===2}isUnknownDocument(){return this.documentType===3}isEqual(e){return e instanceof Wn&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new Wn(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class su{constructor(e,n){this.position=e,this.inclusive=n}}function Ib(t,e,n){let r=0;for(let i=0;i<t.position.length;i++){const s=e[i],o=t.position[i];if(s.field.isKeyField()?r=Ee.comparator(Ee.fromName(o.referenceValue),n.key):r=ru(o,n.data.field(s.field)),s.dir==="desc"&&(r*=-1),r!==0)break}return r}function kb(t,e){if(t===null)return e===null;if(e===null||t.inclusive!==e.inclusive||t.position.length!==e.position.length)return!1;for(let n=0;n<t.position.length;n++)if(!cs(t.position[n],e.position[n]))return!1;return!0}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Nh{constructor(e,n="asc"){this.field=e,this.dir=n}}function u9(t,e){return t.dir===e.dir&&t.field.isEqual(e.field)}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Y2{}class nn extends Y2{constructor(e,n,r){super(),this.field=e,this.op=n,this.value=r}static create(e,n,r){return e.isKeyField()?n==="in"||n==="not-in"?this.createKeyFieldInFilter(e,n,r):new h9(e,n,r):n==="array-contains"?new p9(e,r):n==="in"?new m9(e,r):n==="not-in"?new g9(e,r):n==="array-contains-any"?new y9(e,r):new nn(e,n,r)}static createKeyFieldInFilter(e,n,r){return n==="in"?new f9(e,r):new d9(e,r)}matches(e){const n=e.data.field(this.field);return this.op==="!="?n!==null&&this.matchesComparison(ru(n,this.value)):n!==null&&Io(this.value)===Io(n)&&this.matchesComparison(ru(n,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return e===0;case"!=":return e!==0;case">":return e>0;case">=":return e>=0;default:return Re()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}}class ji extends Y2{constructor(e,n){super(),this.filters=e,this.op=n,this.ae=null}static create(e,n){return new ji(e,n)}matches(e){return Q2(this)?this.filters.find(n=>!n.matches(e))===void 0:this.filters.find(n=>n.matches(e))!==void 0}getFlattenedFilters(){return this.ae!==null||(this.ae=this.filters.reduce((e,n)=>e.concat(n.getFlattenedFilters()),[])),this.ae}getFilters(){return Object.assign([],this.filters)}}function Q2(t){return t.op==="and"}function X2(t){return c9(t)&&Q2(t)}function c9(t){for(const e of t.filters)if(e instanceof ji)return!1;return!0}function q0(t){if(t instanceof nn)return t.field.canonicalString()+t.op.toString()+iu(t.value);if(X2(t))return t.filters.map(e=>q0(e)).join(",");{const e=t.filters.map(n=>q0(n)).join(",");return`${t.op}(${e})`}}function J2(t,e){return t instanceof nn?function(r,i){return i instanceof nn&&r.op===i.op&&r.field.isEqual(i.field)&&cs(r.value,i.value)}(t,e):t instanceof ji?function(r,i){return i instanceof ji&&r.op===i.op&&r.filters.length===i.filters.length?r.filters.reduce((s,o,a)=>s&&J2(o,i.filters[a]),!0):!1}(t,e):void Re()}function Z2(t){return t instanceof nn?function(n){return`${n.field.canonicalString()} ${n.op} ${iu(n.value)}`}(t):t instanceof ji?function(n){return n.op.toString()+" {"+n.getFilters().map(Z2).join(" ,")+"}"}(t):"Filter"}class h9 extends nn{constructor(e,n,r){super(e,n,r),this.key=Ee.fromName(r.referenceValue)}matches(e){const n=Ee.comparator(e.key,this.key);return this.matchesComparison(n)}}class f9 extends nn{constructor(e,n){super(e,"in",n),this.keys=eI("in",n)}matches(e){return this.keys.some(n=>n.isEqual(e.key))}}class d9 extends nn{constructor(e,n){super(e,"not-in",n),this.keys=eI("not-in",n)}matches(e){return!this.keys.some(n=>n.isEqual(e.key))}}function eI(t,e){var n;return(((n=e.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(r=>Ee.fromName(r.referenceValue))}class p9 extends nn{constructor(e,n){super(e,"array-contains",n)}matches(e){const n=e.data.field(this.field);return M1(n)&&Mh(n.arrayValue,this.value)}}class m9 extends nn{constructor(e,n){super(e,"in",n)}matches(e){const n=e.data.field(this.field);return n!==null&&Mh(this.value.arrayValue,n)}}class g9 extends nn{constructor(e,n){super(e,"not-in",n)}matches(e){if(Mh(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;const n=e.data.field(this.field);return n!==null&&!Mh(this.value.arrayValue,n)}}class y9 extends nn{constructor(e,n){super(e,"array-contains-any",n)}matches(e){const n=e.data.field(this.field);return!(!M1(n)||!n.arrayValue.values)&&n.arrayValue.values.some(r=>Mh(this.value.arrayValue,r))}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class v9{constructor(e,n=null,r=[],i=[],s=null,o=null,a=null){this.path=e,this.collectionGroup=n,this.orderBy=r,this.filters=i,this.limit=s,this.startAt=o,this.endAt=a,this.ue=null}}function Db(t,e=null,n=[],r=[],i=null,s=null,o=null){return new v9(t,e,n,r,i,s,o)}function N1(t){const e=Ge(t);if(e.ue===null){let n=e.path.canonicalString();e.collectionGroup!==null&&(n+="|cg:"+e.collectionGroup),n+="|f:",n+=e.filters.map(r=>q0(r)).join(","),n+="|ob:",n+=e.orderBy.map(r=>function(s){return s.field.canonicalString()+s.dir}(r)).join(","),Rm(e.limit)||(n+="|l:",n+=e.limit),e.startAt&&(n+="|lb:",n+=e.startAt.inclusive?"b:":"a:",n+=e.startAt.position.map(r=>iu(r)).join(",")),e.endAt&&(n+="|ub:",n+=e.endAt.inclusive?"a:":"b:",n+=e.endAt.position.map(r=>iu(r)).join(",")),e.ue=n}return e.ue}function V1(t,e){if(t.limit!==e.limit||t.orderBy.length!==e.orderBy.length)return!1;for(let n=0;n<t.orderBy.length;n++)if(!u9(t.orderBy[n],e.orderBy[n]))return!1;if(t.filters.length!==e.filters.length)return!1;for(let n=0;n<t.filters.length;n++)if(!J2(t.filters[n],e.filters[n]))return!1;return t.collectionGroup===e.collectionGroup&&!!t.path.isEqual(e.path)&&!!kb(t.startAt,e.startAt)&&kb(t.endAt,e.endAt)}function K0(t){return Ee.isDocumentKey(t.path)&&t.collectionGroup===null&&t.filters.length===0}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class $a{constructor(e,n=null,r=[],i=[],s=null,o="F",a=null,l=null){this.path=e,this.collectionGroup=n,this.explicitOrderBy=r,this.filters=i,this.limit=s,this.limitType=o,this.startAt=a,this.endAt=l,this.ce=null,this.le=null,this.he=null,this.startAt,this.endAt}}function _9(t,e,n,r,i,s,o,a){return new $a(t,e,n,r,i,s,o,a)}function tI(t){return new $a(t)}function Mb(t){return t.filters.length===0&&t.limit===null&&t.startAt==null&&t.endAt==null&&(t.explicitOrderBy.length===0||t.explicitOrderBy.length===1&&t.explicitOrderBy[0].field.isKeyField())}function L1(t){return t.collectionGroup!==null}function Ll(t){const e=Ge(t);if(e.ce===null){e.ce=[];const n=new Set;for(const s of e.explicitOrderBy)e.ce.push(s),n.add(s.field.canonicalString());const r=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";(function(o){let a=new hn(qn.comparator);return o.filters.forEach(l=>{l.getFlattenedFilters().forEach(u=>{u.isInequality()&&(a=a.add(u.field))})}),a})(e).forEach(s=>{n.has(s.canonicalString())||s.isKeyField()||e.ce.push(new Nh(s,r))}),n.has(qn.keyField().canonicalString())||e.ce.push(new Nh(qn.keyField(),r))}return e.ce}function ls(t){const e=Ge(t);return e.le||(e.le=w9(e,Ll(t))),e.le}function w9(t,e){if(t.limitType==="F")return Db(t.path,t.collectionGroup,e,t.filters,t.limit,t.startAt,t.endAt);{e=e.map(i=>{const s=i.dir==="desc"?"asc":"desc";return new Nh(i.field,s)});const n=t.endAt?new su(t.endAt.position,t.endAt.inclusive):null,r=t.startAt?new su(t.startAt.position,t.startAt.inclusive):null;return Db(t.path,t.collectionGroup,e,t.filters,t.limit,n,r)}}function G0(t,e){const n=t.filters.concat([e]);return new $a(t.path,t.collectionGroup,t.explicitOrderBy.slice(),n,t.limit,t.limitType,t.startAt,t.endAt)}function Vp(t,e,n){return new $a(t.path,t.collectionGroup,t.explicitOrderBy.slice(),t.filters.slice(),e,n,t.startAt,t.endAt)}function Dm(t,e){return V1(ls(t),ls(e))&&t.limitType===e.limitType}function nI(t){return`${N1(ls(t))}|lt:${t.limitType}`}function el(t){return`Query(target=${function(n){let r=n.path.canonicalString();return n.collectionGroup!==null&&(r+=" collectionGroup="+n.collectionGroup),n.filters.length>0&&(r+=`, filters: [${n.filters.map(i=>Z2(i)).join(", ")}]`),Rm(n.limit)||(r+=", limit: "+n.limit),n.orderBy.length>0&&(r+=`, orderBy: [${n.orderBy.map(i=>function(o){return`${o.field.canonicalString()} (${o.dir})`}(i)).join(", ")}]`),n.startAt&&(r+=", startAt: ",r+=n.startAt.inclusive?"b:":"a:",r+=n.startAt.position.map(i=>iu(i)).join(",")),n.endAt&&(r+=", endAt: ",r+=n.endAt.inclusive?"a:":"b:",r+=n.endAt.position.map(i=>iu(i)).join(",")),`Target(${r})`}(ls(t))}; limitType=${t.limitType})`}function Mm(t,e){return e.isFoundDocument()&&function(r,i){const s=i.key.path;return r.collectionGroup!==null?i.key.hasCollectionId(r.collectionGroup)&&r.path.isPrefixOf(s):Ee.isDocumentKey(r.path)?r.path.isEqual(s):r.path.isImmediateParentOf(s)}(t,e)&&function(r,i){for(const s of Ll(r))if(!s.field.isKeyField()&&i.data.field(s.field)===null)return!1;return!0}(t,e)&&function(r,i){for(const s of r.filters)if(!s.matches(i))return!1;return!0}(t,e)&&function(r,i){return!(r.startAt&&!function(o,a,l){const u=Ib(o,a,l);return o.inclusive?u<=0:u<0}(r.startAt,Ll(r),i)||r.endAt&&!function(o,a,l){const u=Ib(o,a,l);return o.inclusive?u>=0:u>0}(r.endAt,Ll(r),i))}(t,e)}function x9(t){return t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2))}function rI(t){return(e,n)=>{let r=!1;for(const i of Ll(t)){const s=T9(i,e,n);if(s!==0)return s;r=r||i.field.isKeyField()}return 0}}function T9(t,e,n){const r=t.field.isKeyField()?Ee.comparator(e.key,n.key):function(s,o,a){const l=o.data.field(s),u=a.data.field(s);return l!==null&&u!==null?ru(l,u):Re()}(t.field,e,n);switch(t.dir){case"asc":return r;case"desc":return-1*r;default:return Re()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class za{constructor(e,n){this.mapKeyFn=e,this.equalsFn=n,this.inner={},this.innerSize=0}get(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r!==void 0){for(const[i,s]of r)if(this.equalsFn(i,e))return s}}has(e){return this.get(e)!==void 0}set(e,n){const r=this.mapKeyFn(e),i=this.inner[r];if(i===void 0)return this.inner[r]=[[e,n]],void this.innerSize++;for(let s=0;s<i.length;s++)if(this.equalsFn(i[s][0],e))return void(i[s]=[e,n]);i.push([e,n]),this.innerSize++}delete(e){const n=this.mapKeyFn(e),r=this.inner[n];if(r===void 0)return!1;for(let i=0;i<r.length;i++)if(this.equalsFn(r[i][0],e))return r.length===1?delete this.inner[n]:r.splice(i,1),this.innerSize--,!0;return!1}forEach(e){Pu(this.inner,(n,r)=>{for(const[i,s]of r)e(i,s)})}isEmpty(){return K2(this.inner)}size(){return this.innerSize}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const E9=new Wt(Ee.comparator);function ko(){return E9}const iI=new Wt(Ee.comparator);function pc(...t){let e=iI;for(const n of t)e=e.insert(n.key,n);return e}function b9(t){let e=iI;return t.forEach((n,r)=>e=e.insert(n,r.overlayedDocument)),e}function aa(){return jc()}function sI(){return jc()}function jc(){return new za(t=>t.toString(),(t,e)=>t.isEqual(e))}const S9=new hn(Ee.comparator);function Xe(...t){let e=S9;for(const n of t)e=e.add(n);return e}const C9=new hn(Ke);function P9(){return C9}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function O1(t,e){if(t.useProto3Json){if(isNaN(e))return{doubleValue:"NaN"};if(e===1/0)return{doubleValue:"Infinity"};if(e===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:Mp(e)?"-0":e}}function oI(t){return{integerValue:""+t}}function A9(t,e){return n9(e)?oI(e):O1(t,e)}/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Nm{constructor(){this._=void 0}}function R9(t,e,n){return t instanceof Y0?function(i,s){const o={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:i.seconds,nanos:i.nanoseconds}}}};return s&&Im(s)&&(s=km(s)),s&&(o.fields.__previous_value__=s),{mapValue:o}}(n,e):t instanceof Lp?aI(t,e):t instanceof Op?lI(t,e):function(i,s){const o=k9(i,s),a=Nb(o)+Nb(i.Pe);return W0(o)&&W0(i.Pe)?oI(a):O1(i.serializer,a)}(t,e)}function I9(t,e,n){return t instanceof Lp?aI(t,e):t instanceof Op?lI(t,e):n}function k9(t,e){return t instanceof Q0?function(r){return W0(r)||function(s){return!!s&&"doubleValue"in s}(r)}(e)?e:{integerValue:0}:null}class Y0 extends Nm{}class Lp extends Nm{constructor(e){super(),this.elements=e}}function aI(t,e){const n=uI(e);for(const r of t.elements)n.some(i=>cs(i,r))||n.push(r);return{arrayValue:{values:n}}}class Op extends Nm{constructor(e){super(),this.elements=e}}function lI(t,e){let n=uI(e);for(const r of t.elements)n=n.filter(i=>!cs(i,r));return{arrayValue:{values:n}}}class Q0 extends Nm{constructor(e,n){super(),this.serializer=e,this.Pe=n}}function Nb(t){return zt(t.integerValue||t.doubleValue)}function uI(t){return M1(t)&&t.arrayValue.values?t.arrayValue.values.slice():[]}function D9(t,e){return t.field.isEqual(e.field)&&function(r,i){return r instanceof Lp&&i instanceof Lp||r instanceof Op&&i instanceof Op?nu(r.elements,i.elements,cs):r instanceof Q0&&i instanceof Q0?cs(r.Pe,i.Pe):r instanceof Y0&&i instanceof Y0}(t.transform,e.transform)}class ya{constructor(e,n){this.updateTime=e,this.exists=n}static none(){return new ya}static exists(e){return new ya(void 0,e)}static updateTime(e){return new ya(e)}get isNone(){return this.updateTime===void 0&&this.exists===void 0}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function Fd(t,e){return t.updateTime!==void 0?e.isFoundDocument()&&e.version.isEqual(t.updateTime):t.exists===void 0||t.exists===e.isFoundDocument()}class F1{}function cI(t,e){if(!t.hasLocalMutations||e&&e.fields.length===0)return null;if(e===null)return t.isNoDocument()?new N9(t.key,ya.none()):new j1(t.key,t.data,ya.none());{const n=t.data,r=Qi.empty();let i=new hn(qn.comparator);for(let s of e.fields)if(!i.has(s)){let o=n.field(s);o===null&&s.length>1&&(s=s.popLast(),o=n.field(s)),o===null?r.delete(s):r.set(s,o),i=i.add(s)}return new Vm(t.key,r,new to(i.toArray()),ya.none())}}function M9(t,e,n){t instanceof j1?function(i,s,o){const a=i.value.clone(),l=Lb(i.fieldTransforms,s,o.transformResults);a.setAll(l),s.convertToFoundDocument(o.version,a).setHasCommittedMutations()}(t,e,n):t instanceof Vm?function(i,s,o){if(!Fd(i.precondition,s))return void s.convertToUnknownDocument(o.version);const a=Lb(i.fieldTransforms,s,o.transformResults),l=s.data;l.setAll(hI(i)),l.setAll(a),s.convertToFoundDocument(o.version,l).setHasCommittedMutations()}(t,e,n):function(i,s,o){s.convertToNoDocument(o.version).setHasCommittedMutations()}(0,e,n)}function $c(t,e,n,r){return t instanceof j1?function(s,o,a,l){if(!Fd(s.precondition,o))return a;const u=s.value.clone(),h=Ob(s.fieldTransforms,l,o);return u.setAll(h),o.convertToFoundDocument(o.version,u).setHasLocalMutations(),null}(t,e,n,r):t instanceof Vm?function(s,o,a,l){if(!Fd(s.precondition,o))return a;const u=Ob(s.fieldTransforms,l,o),h=o.data;return h.setAll(hI(s)),h.setAll(u),o.convertToFoundDocument(o.version,h).setHasLocalMutations(),a===null?null:a.unionWith(s.fieldMask.fields).unionWith(s.fieldTransforms.map(f=>f.field))}(t,e,n,r):function(s,o,a){return Fd(s.precondition,o)?(o.convertToNoDocument(o.version).setHasLocalMutations(),null):a}(t,e,n)}function Vb(t,e){return t.type===e.type&&!!t.key.isEqual(e.key)&&!!t.precondition.isEqual(e.precondition)&&!!function(r,i){return r===void 0&&i===void 0||!(!r||!i)&&nu(r,i,(s,o)=>D9(s,o))}(t.fieldTransforms,e.fieldTransforms)&&(t.type===0?t.value.isEqual(e.value):t.type!==1||t.data.isEqual(e.data)&&t.fieldMask.isEqual(e.fieldMask))}class j1 extends F1{constructor(e,n,r,i=[]){super(),this.key=e,this.value=n,this.precondition=r,this.fieldTransforms=i,this.type=0}getFieldMask(){return null}}class Vm extends F1{constructor(e,n,r,i,s=[]){super(),this.key=e,this.data=n,this.fieldMask=r,this.precondition=i,this.fieldTransforms=s,this.type=1}getFieldMask(){return this.fieldMask}}function hI(t){const e=new Map;return t.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){const r=t.data.field(n);e.set(n,r)}}),e}function Lb(t,e,n){const r=new Map;Dt(t.length===n.length);for(let i=0;i<n.length;i++){const s=t[i],o=s.transform,a=e.data.field(s.field);r.set(s.field,I9(o,a,n[i]))}return r}function Ob(t,e,n){const r=new Map;for(const i of t){const s=i.transform,o=n.data.field(i.field);r.set(i.field,R9(s,o,e))}return r}class N9 extends F1{constructor(e,n){super(),this.key=e,this.precondition=n,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class V9{constructor(e,n,r,i){this.batchId=e,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}applyToRemoteDocument(e,n){const r=n.mutationResults;for(let i=0;i<this.mutations.length;i++){const s=this.mutations[i];s.key.isEqual(e.key)&&M9(s,e,r[i])}}applyToLocalView(e,n){for(const r of this.baseMutations)r.key.isEqual(e.key)&&(n=$c(r,e,n,this.localWriteTime));for(const r of this.mutations)r.key.isEqual(e.key)&&(n=$c(r,e,n,this.localWriteTime));return n}applyToLocalDocumentSet(e,n){const r=sI();return this.mutations.forEach(i=>{const s=e.get(i.key),o=s.overlayedDocument;let a=this.applyToLocalView(o,s.mutatedFields);a=n.has(i.key)?null:a;const l=cI(o,a);l!==null&&r.set(i.key,l),o.isValidDocument()||o.convertToNoDocument(Ae.min())}),r}keys(){return this.mutations.reduce((e,n)=>e.add(n.key),Xe())}isEqual(e){return this.batchId===e.batchId&&nu(this.mutations,e.mutations,(n,r)=>Vb(n,r))&&nu(this.baseMutations,e.baseMutations,(n,r)=>Vb(n,r))}}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class L9{constructor(e,n){this.largestBatchId=e,this.mutation=n}getKey(){return this.mutation.key}isEqual(e){return e!==null&&this.mutation===e.mutation}toString(){return`Overlay{ largestBatchId: ${this.largestBatchId}, mutation: ${this.mutation.toString()} }`}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class O9{constructor(e,n){this.count=e,this.unchangedNames=n}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */var Xt,We;function fI(t){if(t===void 0)return Ms("GRPC error has no .code"),ie.UNKNOWN;switch(t){case Xt.OK:return ie.OK;case Xt.CANCELLED:return ie.CANCELLED;case Xt.UNKNOWN:return ie.UNKNOWN;case Xt.DEADLINE_EXCEEDED:return ie.DEADLINE_EXCEEDED;case Xt.RESOURCE_EXHAUSTED:return ie.RESOURCE_EXHAUSTED;case Xt.INTERNAL:return ie.INTERNAL;case Xt.UNAVAILABLE:return ie.UNAVAILABLE;case Xt.UNAUTHENTICATED:return ie.UNAUTHENTICATED;case Xt.INVALID_ARGUMENT:return ie.INVALID_ARGUMENT;case Xt.NOT_FOUND:return ie.NOT_FOUND;case Xt.ALREADY_EXISTS:return ie.ALREADY_EXISTS;case Xt.PERMISSION_DENIED:return ie.PERMISSION_DENIED;case Xt.FAILED_PRECONDITION:return ie.FAILED_PRECONDITION;case Xt.ABORTED:return ie.ABORTED;case Xt.OUT_OF_RANGE:return ie.OUT_OF_RANGE;case Xt.UNIMPLEMENTED:return ie.UNIMPLEMENTED;case Xt.DATA_LOSS:return ie.DATA_LOSS;default:return Re()}}(We=Xt||(Xt={}))[We.OK=0]="OK",We[We.CANCELLED=1]="CANCELLED",We[We.UNKNOWN=2]="UNKNOWN",We[We.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",We[We.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",We[We.NOT_FOUND=5]="NOT_FOUND",We[We.ALREADY_EXISTS=6]="ALREADY_EXISTS",We[We.PERMISSION_DENIED=7]="PERMISSION_DENIED",We[We.UNAUTHENTICATED=16]="UNAUTHENTICATED",We[We.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",We[We.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",We[We.ABORTED=10]="ABORTED",We[We.OUT_OF_RANGE=11]="OUT_OF_RANGE",We[We.UNIMPLEMENTED=12]="UNIMPLEMENTED",We[We.INTERNAL=13]="INTERNAL",We[We.UNAVAILABLE=14]="UNAVAILABLE",We[We.DATA_LOSS=15]="DATA_LOSS";/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function F9(){return new TextEncoder}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const j9=new ma([4294967295,4294967295],0);function Fb(t){const e=F9().encode(t),n=new $2;return n.update(e),new Uint8Array(n.digest())}function jb(t){const e=new DataView(t.buffer),n=e.getUint32(0,!0),r=e.getUint32(4,!0),i=e.getUint32(8,!0),s=e.getUint32(12,!0);return[new ma([n,r],0),new ma([i,s],0)]}class $1{constructor(e,n,r){if(this.bitmap=e,this.padding=n,this.hashCount=r,n<0||n>=8)throw new mc(`Invalid padding: ${n}`);if(r<0)throw new mc(`Invalid hash count: ${r}`);if(e.length>0&&this.hashCount===0)throw new mc(`Invalid hash count: ${r}`);if(e.length===0&&n!==0)throw new mc(`Invalid padding when bitmap length is 0: ${n}`);this.Te=8*e.length-n,this.Ie=ma.fromNumber(this.Te)}Ee(e,n,r){let i=e.add(n.multiply(ma.fromNumber(r)));return i.compare(j9)===1&&(i=new ma([i.getBits(0),i.getBits(1)],0)),i.modulo(this.Ie).toNumber()}de(e){return(this.bitmap[Math.floor(e/8)]&1<<e%8)!=0}mightContain(e){if(this.Te===0)return!1;const n=Fb(e),[r,i]=jb(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);if(!this.de(o))return!1}return!0}static create(e,n,r){const i=e%8==0?0:8-e%8,s=new Uint8Array(Math.ceil(e/8)),o=new $1(s,i,n);return r.forEach(a=>o.insert(a)),o}insert(e){if(this.Te===0)return;const n=Fb(e),[r,i]=jb(n);for(let s=0;s<this.hashCount;s++){const o=this.Ee(r,i,s);this.Ae(o)}}Ae(e){const n=Math.floor(e/8),r=e%8;this.bitmap[n]|=1<<r}}class mc extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Lm{constructor(e,n,r,i,s){this.snapshotVersion=e,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}static createSynthesizedRemoteEventForCurrentChange(e,n,r){const i=new Map;return i.set(e,sf.createSynthesizedTargetChangeForCurrentChange(e,n,r)),new Lm(Ae.min(),i,new Wt(Ke),ko(),Xe())}}class sf{constructor(e,n,r,i,s){this.resumeToken=e,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}static createSynthesizedTargetChangeForCurrentChange(e,n,r){return new sf(r,n,Xe(),Xe(),Xe())}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class jd{constructor(e,n,r,i){this.Re=e,this.removedTargetIds=n,this.key=r,this.Ve=i}}class dI{constructor(e,n){this.targetId=e,this.me=n}}class pI{constructor(e,n,r=Dn.EMPTY_BYTE_STRING,i=null){this.state=e,this.targetIds=n,this.resumeToken=r,this.cause=i}}class $b{constructor(){this.fe=0,this.ge=zb(),this.pe=Dn.EMPTY_BYTE_STRING,this.ye=!1,this.we=!0}get current(){return this.ye}get resumeToken(){return this.pe}get Se(){return this.fe!==0}get be(){return this.we}De(e){e.approximateByteSize()>0&&(this.we=!0,this.pe=e)}ve(){let e=Xe(),n=Xe(),r=Xe();return this.ge.forEach((i,s)=>{switch(s){case 0:e=e.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:Re()}}),new sf(this.pe,this.ye,e,n,r)}Ce(){this.we=!1,this.ge=zb()}Fe(e,n){this.we=!0,this.ge=this.ge.insert(e,n)}Me(e){this.we=!0,this.ge=this.ge.remove(e)}xe(){this.fe+=1}Oe(){this.fe-=1,Dt(this.fe>=0)}Ne(){this.we=!0,this.ye=!0}}class $9{constructor(e){this.Le=e,this.Be=new Map,this.ke=ko(),this.qe=Gf(),this.Qe=Gf(),this.Ke=new Wt(Ke)}$e(e){for(const n of e.Re)e.Ve&&e.Ve.isFoundDocument()?this.Ue(n,e.Ve):this.We(n,e.key,e.Ve);for(const n of e.removedTargetIds)this.We(n,e.key,e.Ve)}Ge(e){this.forEachTarget(e,n=>{const r=this.ze(n);switch(e.state){case 0:this.je(n)&&r.De(e.resumeToken);break;case 1:r.Oe(),r.Se||r.Ce(),r.De(e.resumeToken);break;case 2:r.Oe(),r.Se||this.removeTarget(n);break;case 3:this.je(n)&&(r.Ne(),r.De(e.resumeToken));break;case 4:this.je(n)&&(this.He(n),r.De(e.resumeToken));break;default:Re()}})}forEachTarget(e,n){e.targetIds.length>0?e.targetIds.forEach(n):this.Be.forEach((r,i)=>{this.je(i)&&n(i)})}Je(e){const n=e.targetId,r=e.me.count,i=this.Ye(n);if(i){const s=i.target;if(K0(s))if(r===0){const o=new Ee(s.path);this.We(n,o,Wn.newNoDocument(o,Ae.min()))}else Dt(r===1);else{const o=this.Ze(n);if(o!==r){const a=this.Xe(e),l=a?this.et(a,e,o):1;if(l!==0){this.He(n);const u=l===2?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch";this.Ke=this.Ke.insert(n,u)}}}}}Xe(e){const n=e.me.unchangedNames;if(!n||!n.bits)return null;const{bits:{bitmap:r="",padding:i=0},hashCount:s=0}=n;let o,a;try{o=Ro(r).toUint8Array()}catch(l){if(l instanceof G2)return tu("Decoding the base64 bloom filter in existence filter failed ("+l.message+"); ignoring the bloom filter and falling back to full re-query."),null;throw l}try{a=new $1(o,i,s)}catch(l){return tu(l instanceof mc?"BloomFilter error: ":"Applying bloom filter failed: ",l),null}return a.Te===0?null:a}et(e,n,r){return n.me.count===r-this.rt(e,n.targetId)?0:2}rt(e,n){const r=this.Le.getRemoteKeysForTarget(n);let i=0;return r.forEach(s=>{const o=this.Le.nt(),a=`projects/${o.projectId}/databases/${o.database}/documents/${s.path.canonicalString()}`;e.mightContain(a)||(this.We(n,s,null),i++)}),i}it(e){const n=new Map;this.Be.forEach((s,o)=>{const a=this.Ye(o);if(a){if(s.current&&K0(a.target)){const l=new Ee(a.target.path);this.st(l).has(o)||this.ot(o,l)||this.We(o,l,Wn.newNoDocument(l,e))}s.be&&(n.set(o,s.ve()),s.Ce())}});let r=Xe();this.Qe.forEach((s,o)=>{let a=!0;o.forEachWhile(l=>{const u=this.Ye(l);return!u||u.purpose==="TargetPurposeLimboResolution"||(a=!1,!1)}),a&&(r=r.add(s))}),this.ke.forEach((s,o)=>o.setReadTime(e));const i=new Lm(e,n,this.Ke,this.ke,r);return this.ke=ko(),this.qe=Gf(),this.Qe=Gf(),this.Ke=new Wt(Ke),i}Ue(e,n){if(!this.je(e))return;const r=this.ot(e,n.key)?2:0;this.ze(e).Fe(n.key,r),this.ke=this.ke.insert(n.key,n),this.qe=this.qe.insert(n.key,this.st(n.key).add(e)),this.Qe=this.Qe.insert(n.key,this._t(n.key).add(e))}We(e,n,r){if(!this.je(e))return;const i=this.ze(e);this.ot(e,n)?i.Fe(n,1):i.Me(n),this.Qe=this.Qe.insert(n,this._t(n).delete(e)),this.Qe=this.Qe.insert(n,this._t(n).add(e)),r&&(this.ke=this.ke.insert(n,r))}removeTarget(e){this.Be.delete(e)}Ze(e){const n=this.ze(e).ve();return this.Le.getRemoteKeysForTarget(e).size+n.addedDocuments.size-n.removedDocuments.size}xe(e){this.ze(e).xe()}ze(e){let n=this.Be.get(e);return n||(n=new $b,this.Be.set(e,n)),n}_t(e){let n=this.Qe.get(e);return n||(n=new hn(Ke),this.Qe=this.Qe.insert(e,n)),n}st(e){let n=this.qe.get(e);return n||(n=new hn(Ke),this.qe=this.qe.insert(e,n)),n}je(e){const n=this.Ye(e)!==null;return n||de("WatchChangeAggregator","Detected inactive target",e),n}Ye(e){const n=this.Be.get(e);return n&&n.Se?null:this.Le.ut(e)}He(e){this.Be.set(e,new $b),this.Le.getRemoteKeysForTarget(e).forEach(n=>{this.We(e,n,null)})}ot(e,n){return this.Le.getRemoteKeysForTarget(e).has(n)}}function Gf(){return new Wt(Ee.comparator)}function zb(){return new Wt(Ee.comparator)}const z9={asc:"ASCENDING",desc:"DESCENDING"},B9={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},U9={and:"AND",or:"OR"};class H9{constructor(e,n){this.databaseId=e,this.useProto3Json=n}}function X0(t,e){return t.useProto3Json||Rm(e)?e:{value:e}}function J0(t,e){return t.useProto3Json?`${new Date(1e3*e.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+e.nanoseconds).slice(-9)}Z`:{seconds:""+e.seconds,nanos:e.nanoseconds}}function mI(t,e){return t.useProto3Json?e.toBase64():e.toUint8Array()}function Ol(t){return Dt(!!t),Ae.fromTimestamp(function(n){const r=Ao(n);return new _n(r.seconds,r.nanos)}(t))}function gI(t,e){return Z0(t,e).canonicalString()}function Z0(t,e){const n=function(i){return new xt(["projects",i.projectId,"databases",i.database])}(t).child("documents");return e===void 0?n:n.child(e)}function yI(t){const e=xt.fromString(t);return Dt(TI(e)),e}function Yg(t,e){const n=yI(e);if(n.get(1)!==t.databaseId.projectId)throw new ce(ie.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+t.databaseId.projectId);if(n.get(3)!==t.databaseId.database)throw new ce(ie.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+t.databaseId.database);return new Ee(_I(n))}function vI(t,e){return gI(t.databaseId,e)}function W9(t){const e=yI(t);return e.length===4?xt.emptyPath():_I(e)}function Bb(t){return new xt(["projects",t.databaseId.projectId,"databases",t.databaseId.database]).canonicalString()}function _I(t){return Dt(t.length>4&&t.get(4)==="documents"),t.popFirst(5)}function q9(t,e){let n;if("targetChange"in e){e.targetChange;const r=function(u){return u==="NO_CHANGE"?0:u==="ADD"?1:u==="REMOVE"?2:u==="CURRENT"?3:u==="RESET"?4:Re()}(e.targetChange.targetChangeType||"NO_CHANGE"),i=e.targetChange.targetIds||[],s=function(u,h){return u.useProto3Json?(Dt(h===void 0||typeof h=="string"),Dn.fromBase64String(h||"")):(Dt(h===void 0||h instanceof Buffer||h instanceof Uint8Array),Dn.fromUint8Array(h||new Uint8Array))}(t,e.targetChange.resumeToken),o=e.targetChange.cause,a=o&&function(u){const h=u.code===void 0?ie.UNKNOWN:fI(u.code);return new ce(h,u.message||"")}(o);n=new pI(r,i,s,a||null)}else if("documentChange"in e){e.documentChange;const r=e.documentChange;r.document,r.document.name,r.document.updateTime;const i=Yg(t,r.document.name),s=Ol(r.document.updateTime),o=r.document.createTime?Ol(r.document.createTime):Ae.min(),a=new Qi({mapValue:{fields:r.document.fields}}),l=Wn.newFoundDocument(i,s,o,a),u=r.targetIds||[],h=r.removedTargetIds||[];n=new jd(u,h,l.key,l)}else if("documentDelete"in e){e.documentDelete;const r=e.documentDelete;r.document;const i=Yg(t,r.document),s=r.readTime?Ol(r.readTime):Ae.min(),o=Wn.newNoDocument(i,s),a=r.removedTargetIds||[];n=new jd([],a,o.key,o)}else if("documentRemove"in e){e.documentRemove;const r=e.documentRemove;r.document;const i=Yg(t,r.document),s=r.removedTargetIds||[];n=new jd([],s,i,null)}else{if(!("filter"in e))return Re();{e.filter;const r=e.filter;r.targetId;const{count:i=0,unchangedNames:s}=r,o=new O9(i,s),a=r.targetId;n=new dI(a,o)}}return n}function K9(t,e){return{documents:[vI(t,e.path)]}}function G9(t,e){const n={structuredQuery:{}},r=e.path;let i;e.collectionGroup!==null?(i=r,n.structuredQuery.from=[{collectionId:e.collectionGroup,allDescendants:!0}]):(i=r.popLast(),n.structuredQuery.from=[{collectionId:r.lastSegment()}]),n.parent=vI(t,i);const s=function(u){if(u.length!==0)return xI(ji.create(u,"and"))}(e.filters);s&&(n.structuredQuery.where=s);const o=function(u){if(u.length!==0)return u.map(h=>function(d){return{field:tl(d.field),direction:X9(d.dir)}}(h))}(e.orderBy);o&&(n.structuredQuery.orderBy=o);const a=X0(t,e.limit);return a!==null&&(n.structuredQuery.limit=a),e.startAt&&(n.structuredQuery.startAt=function(u){return{before:u.inclusive,values:u.position}}(e.startAt)),e.endAt&&(n.structuredQuery.endAt=function(u){return{before:!u.inclusive,values:u.position}}(e.endAt)),{ct:n,parent:i}}function Y9(t){let e=W9(t.parent);const n=t.structuredQuery,r=n.from?n.from.length:0;let i=null;if(r>0){Dt(r===1);const h=n.from[0];h.allDescendants?i=h.collectionId:e=e.child(h.collectionId)}let s=[];n.where&&(s=function(f){const d=wI(f);return d instanceof ji&&X2(d)?d.getFilters():[d]}(n.where));let o=[];n.orderBy&&(o=function(f){return f.map(d=>function(v){return new Nh(nl(v.field),function(C){switch(C){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(v.direction))}(d))}(n.orderBy));let a=null;n.limit&&(a=function(f){let d;return d=typeof f=="object"?f.value:f,Rm(d)?null:d}(n.limit));let l=null;n.startAt&&(l=function(f){const d=!!f.before,p=f.values||[];return new su(p,d)}(n.startAt));let u=null;return n.endAt&&(u=function(f){const d=!f.before,p=f.values||[];return new su(p,d)}(n.endAt)),_9(e,i,o,s,a,"F",l,u)}function Q9(t,e){const n=function(i){switch(i){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return Re()}}(e.purpose);return n==null?null:{"goog-listen-tags":n}}function wI(t){return t.unaryFilter!==void 0?function(n){switch(n.unaryFilter.op){case"IS_NAN":const r=nl(n.unaryFilter.field);return nn.create(r,"==",{doubleValue:NaN});case"IS_NULL":const i=nl(n.unaryFilter.field);return nn.create(i,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":const s=nl(n.unaryFilter.field);return nn.create(s,"!=",{doubleValue:NaN});case"IS_NOT_NULL":const o=nl(n.unaryFilter.field);return nn.create(o,"!=",{nullValue:"NULL_VALUE"});default:return Re()}}(t):t.fieldFilter!==void 0?function(n){return nn.create(nl(n.fieldFilter.field),function(i){switch(i){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return Re()}}(n.fieldFilter.op),n.fieldFilter.value)}(t):t.compositeFilter!==void 0?function(n){return ji.create(n.compositeFilter.filters.map(r=>wI(r)),function(i){switch(i){case"AND":return"and";case"OR":return"or";default:return Re()}}(n.compositeFilter.op))}(t):Re()}function X9(t){return z9[t]}function J9(t){return B9[t]}function Z9(t){return U9[t]}function tl(t){return{fieldPath:t.canonicalString()}}function nl(t){return qn.fromServerFormat(t.fieldPath)}function xI(t){return t instanceof nn?function(n){if(n.op==="=="){if(Rb(n.value))return{unaryFilter:{field:tl(n.field),op:"IS_NAN"}};if(Ab(n.value))return{unaryFilter:{field:tl(n.field),op:"IS_NULL"}}}else if(n.op==="!="){if(Rb(n.value))return{unaryFilter:{field:tl(n.field),op:"IS_NOT_NAN"}};if(Ab(n.value))return{unaryFilter:{field:tl(n.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:tl(n.field),op:J9(n.op),value:n.value}}}(t):t instanceof ji?function(n){const r=n.getFilters().map(i=>xI(i));return r.length===1?r[0]:{compositeFilter:{op:Z9(n.op),filters:r}}}(t):Re()}function TI(t){return t.length>=4&&t.get(0)==="projects"&&t.get(2)==="databases"}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class no{constructor(e,n,r,i,s=Ae.min(),o=Ae.min(),a=Dn.EMPTY_BYTE_STRING,l=null){this.target=e,this.targetId=n,this.purpose=r,this.sequenceNumber=i,this.snapshotVersion=s,this.lastLimboFreeSnapshotVersion=o,this.resumeToken=a,this.expectedCount=l}withSequenceNumber(e){return new no(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,n){return new no(this.target,this.targetId,this.purpose,this.sequenceNumber,n,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new no(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new no(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ez{constructor(e){this.ht=e}}function tz(t){const e=Y9({parent:t.parent,structuredQuery:t.structuredQuery});return t.limitType==="LAST"?Vp(e,e.limit,"L"):e}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class nz{constructor(){this.ln=new rz}addToCollectionParentIndex(e,n){return this.ln.add(n),Z.resolve()}getCollectionParents(e,n){return Z.resolve(this.ln.getEntries(n))}addFieldIndex(e,n){return Z.resolve()}deleteFieldIndex(e,n){return Z.resolve()}deleteAllFieldIndexes(e){return Z.resolve()}createTargetIndexes(e,n){return Z.resolve()}getDocumentsMatchingTarget(e,n){return Z.resolve(null)}getIndexType(e,n){return Z.resolve(0)}getFieldIndexes(e,n){return Z.resolve([])}getNextCollectionGroupToUpdate(e){return Z.resolve(null)}getMinOffset(e,n){return Z.resolve(Po.min())}getMinOffsetFromCollectionGroup(e,n){return Z.resolve(Po.min())}updateCollectionGroup(e,n,r){return Z.resolve()}updateIndexEntries(e,n){return Z.resolve()}}class rz{constructor(){this.index={}}add(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n]||new hn(xt.comparator),s=!i.has(r);return this.index[n]=i.add(r),s}has(e){const n=e.lastSegment(),r=e.popLast(),i=this.index[n];return i&&i.has(r)}getEntries(e){return(this.index[e]||new hn(xt.comparator)).toArray()}}/** * @license * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Ub={didRun:!1,sequenceNumbersCollected:0,targetsRemoved:0,documentsRemoved:0};class Er{static withCacheSize(e){return new Er(e,Er.DEFAULT_COLLECTION_PERCENTILE,Er.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}constructor(e,n,r){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=n,this.maximumSequenceNumbersToCollect=r}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */Er.DEFAULT_COLLECTION_PERCENTILE=10,Er.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Er.DEFAULT=new Er(41943040,Er.DEFAULT_COLLECTION_PERCENTILE,Er.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Er.DISABLED=new Er(-1,0,0);/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class ou{constructor(e){this.kn=e}next(){return this.kn+=2,this.kn}static qn(){return new ou(0)}static Qn(){return new ou(-1)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Hb([t,e],[n,r]){const i=Ke(t,n);return i===0?Ke(e,r):i}class iz{constructor(e){this.Gn=e,this.buffer=new hn(Hb),this.zn=0}jn(){return++this.zn}Hn(e){const n=[e,this.jn()];if(this.buffer.size<this.Gn)this.buffer=this.buffer.add(n);else{const r=this.buffer.last();Hb(n,r)<0&&(this.buffer=this.buffer.delete(r).add(n))}}get maxValue(){return this.buffer.last()[0]}}class sz{constructor(e,n,r){this.garbageCollector=e,this.asyncQueue=n,this.localStore=r,this.Jn=null}start(){this.garbageCollector.params.cacheSizeCollectionThreshold!==-1&&this.Yn(6e4)}stop(){this.Jn&&(this.Jn.cancel(),this.Jn=null)}get started(){return this.Jn!==null}Yn(e){de("LruGarbageCollector",`Garbage collection scheduled in ${e}ms`),this.Jn=this.asyncQueue.enqueueAfterDelay("lru_garbage_collection",e,async()=>{this.Jn=null;try{await this.localStore.collectGarbage(this.garbageCollector)}catch(n){Cu(n)?de("LruGarbageCollector","Ignoring IndexedDB error during garbage collection: ",n):await Pm(n)}await this.Yn(3e5)})}}class oz{constructor(e,n){this.Zn=e,this.params=n}calculateTargetCount(e,n){return this.Zn.Xn(e).next(r=>Math.floor(n/100*r))}nthSequenceNumber(e,n){if(n===0)return Z.resolve(Am.oe);const r=new iz(n);return this.Zn.forEachTarget(e,i=>r.Hn(i.sequenceNumber)).next(()=>this.Zn.er(e,i=>r.Hn(i))).next(()=>r.maxValue)}removeTargets(e,n,r){return this.Zn.removeTargets(e,n,r)}removeOrphanedDocuments(e,n){return this.Zn.removeOrphanedDocuments(e,n)}collect(e,n){return this.params.cacheSizeCollectionThreshold===-1?(de("LruGarbageCollector","Garbage collection skipped; disabled"),Z.resolve(Ub)):this.getCacheSize(e).next(r=>r<this.params.cacheSizeCollectionThreshold?(de("LruGarbageCollector",`Garbage collection skipped; Cache size ${r} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`),Ub):this.tr(e,n))}getCacheSize(e){return this.Zn.getCacheSize(e)}tr(e,n){let r,i,s,o,a,l,u;const h=Date.now();return this.calculateTargetCount(e,this.params.percentileToCollect).next(f=>(f>this.params.maximumSequenceNumbersToCollect?(de("LruGarbageCollector",`Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${f}`),i=this.params.maximumSequenceNumbersToCollect):i=f,o=Date.now(),this.nthSequenceNumber(e,i))).next(f=>(r=f,a=Date.now(),this.removeTargets(e,r,n))).next(f=>(s=f,l=Date.now(),this.removeOrphanedDocuments(e,r))).next(f=>(u=Date.now(),Za()<=qe.DEBUG&&de("LruGarbageCollector",`LRU Garbage Collection Counted targets in ${o-h}ms Determined least recently used ${i} in `+(a-o)+`ms Removed ${s} targets in `+(l-a)+`ms Removed ${f} documents in `+(u-l)+`ms Total Duration: ${u-h}ms`),Z.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:f})))}}function az(t,e){return new oz(t,e)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class lz{constructor(){this.changes=new za(e=>e.toString(),(e,n)=>e.isEqual(n)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,n){this.assertNotApplied(),this.changes.set(e,Wn.newInvalidDocument(e).setReadTime(n))}getEntry(e,n){this.assertNotApplied();const r=this.changes.get(n);return r!==void 0?Z.resolve(r):this.getFromCache(e,n)}getEntries(e,n){return this.getAllFromCache(e,n)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class uz{constructor(e,n){this.overlayedDocument=e,this.mutatedFields=n}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class cz{constructor(e,n,r,i){this.remoteDocumentCache=e,this.mutationQueue=n,this.documentOverlayCache=r,this.indexManager=i}getDocument(e,n){let r=null;return this.documentOverlayCache.getOverlay(e,n).next(i=>(r=i,this.remoteDocumentCache.getEntry(e,n))).next(i=>(r!==null&&$c(r.mutation,i,to.empty(),_n.now()),i))}getDocuments(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.getLocalViewOfDocuments(e,r,Xe()).next(()=>r))}getLocalViewOfDocuments(e,n,r=Xe()){const i=aa();return this.populateOverlays(e,i,n).next(()=>this.computeViews(e,n,i,r).next(s=>{let o=pc();return s.forEach((a,l)=>{o=o.insert(a,l.overlayedDocument)}),o}))}getOverlayedDocuments(e,n){const r=aa();return this.populateOverlays(e,r,n).next(()=>this.computeViews(e,n,r,Xe()))}populateOverlays(e,n,r){const i=[];return r.forEach(s=>{n.has(s)||i.push(s)}),this.documentOverlayCache.getOverlays(e,i).next(s=>{s.forEach((o,a)=>{n.set(o,a)})})}computeViews(e,n,r,i){let s=ko();const o=jc(),a=function(){return jc()}();return n.forEach((l,u)=>{const h=r.get(u.key);i.has(u.key)&&(h===void 0||h.mutation instanceof Vm)?s=s.insert(u.key,u):h!==void 0?(o.set(u.key,h.mutation.getFieldMask()),$c(h.mutation,u,h.mutation.getFieldMask(),_n.now())):o.set(u.key,to.empty())}),this.recalculateAndSaveOverlays(e,s).next(l=>(l.forEach((u,h)=>o.set(u,h)),n.forEach((u,h)=>{var f;return a.set(u,new uz(h,(f=o.get(u))!==null&&f!==void 0?f:null))}),a))}recalculateAndSaveOverlays(e,n){const r=jc();let i=new Wt((o,a)=>o-a),s=Xe();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,n).next(o=>{for(const a of o)a.keys().forEach(l=>{const u=n.get(l);if(u===null)return;let h=r.get(l)||to.empty();h=a.applyToLocalView(u,h),r.set(l,h);const f=(i.get(a.batchId)||Xe()).add(l);i=i.insert(a.batchId,f)})}).next(()=>{const o=[],a=i.getReverseIterator();for(;a.hasNext();){const l=a.getNext(),u=l.key,h=l.value,f=sI();h.forEach(d=>{if(!s.has(d)){const p=cI(n.get(d),r.get(d));p!==null&&f.set(d,p),s=s.add(d)}}),o.push(this.documentOverlayCache.saveOverlays(e,u,f))}return Z.waitFor(o)}).next(()=>r)}recalculateAndSaveOverlaysForDocumentKeys(e,n){return this.remoteDocumentCache.getEntries(e,n).next(r=>this.recalculateAndSaveOverlays(e,r))}getDocumentsMatchingQuery(e,n,r,i){return function(o){return Ee.isDocumentKey(o.path)&&o.collectionGroup===null&&o.filters.length===0}(n)?this.getDocumentsMatchingDocumentQuery(e,n.path):L1(n)?this.getDocumentsMatchingCollectionGroupQuery(e,n,r,i):this.getDocumentsMatchingCollectionQuery(e,n,r,i)}getNextDocuments(e,n,r,i){return this.remoteDocumentCache.getAllFromCollectionGroup(e,n,r,i).next(s=>{const o=i-s.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,n,r.largestBatchId,i-s.size):Z.resolve(aa());let a=-1,l=s;return o.next(u=>Z.forEach(u,(h,f)=>(a<f.largestBatchId&&(a=f.largestBatchId),s.get(h)?Z.resolve():this.remoteDocumentCache.getEntry(e,h).next(d=>{l=l.insert(h,d)}))).next(()=>this.populateOverlays(e,u,s)).next(()=>this.computeViews(e,l,u,Xe())).next(h=>({batchId:a,changes:b9(h)})))})}getDocumentsMatchingDocumentQuery(e,n){return this.getDocument(e,new Ee(n)).next(r=>{let i=pc();return r.isFoundDocument()&&(i=i.insert(r.key,r)),i})}getDocumentsMatchingCollectionGroupQuery(e,n,r,i){const s=n.collectionGroup;let o=pc();return this.indexManager.getCollectionParents(e,s).next(a=>Z.forEach(a,l=>{const u=function(f,d){return new $a(d,null,f.explicitOrderBy.slice(),f.filters.slice(),f.limit,f.limitType,f.startAt,f.endAt)}(n,l.child(s));return this.getDocumentsMatchingCollectionQuery(e,u,r,i).next(h=>{h.forEach((f,d)=>{o=o.insert(f,d)})})}).next(()=>o))}getDocumentsMatchingCollectionQuery(e,n,r,i){let s;return this.documentOverlayCache.getOverlaysForCollection(e,n.path,r.largestBatchId).next(o=>(s=o,this.remoteDocumentCache.getDocumentsMatchingQuery(e,n,r,s,i))).next(o=>{s.forEach((l,u)=>{const h=u.getKey();o.get(h)===null&&(o=o.insert(h,Wn.newInvalidDocument(h)))});let a=pc();return o.forEach((l,u)=>{const h=s.get(l);h!==void 0&&$c(h.mutation,u,to.empty(),_n.now()),Mm(n,u)&&(a=a.insert(l,u))}),a})}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class hz{constructor(e){this.serializer=e,this.Tr=new Map,this.Ir=new Map}getBundleMetadata(e,n){return Z.resolve(this.Tr.get(n))}saveBundleMetadata(e,n){return this.Tr.set(n.id,function(i){return{id:i.id,version:i.version,createTime:Ol(i.createTime)}}(n)),Z.resolve()}getNamedQuery(e,n){return Z.resolve(this.Ir.get(n))}saveNamedQuery(e,n){return this.Ir.set(n.name,function(i){return{name:i.name,query:tz(i.bundledQuery),readTime:Ol(i.readTime)}}(n)),Z.resolve()}}/** * @license * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class fz{constructor(){this.overlays=new Wt(Ee.comparator),this.Er=new Map}getOverlay(e,n){return Z.resolve(this.overlays.get(n))}getOverlays(e,n){const r=aa();return Z.forEach(n,i=>this.getOverlay(e,i).next(s=>{s!==null&&r.set(i,s)})).next(()=>r)}saveOverlays(e,n,r){return r.forEach((i,s)=>{this.Tt(e,n,s)}),Z.resolve()}removeOverlaysForBatchId(e,n,r){const i=this.Er.get(r);return i!==void 0&&(i.forEach(s=>this.overlays=this.overlays.remove(s)),this.Er.delete(r)),Z.resolve()}getOverlaysForCollection(e,n,r){const i=aa(),s=n.length+1,o=new Ee(n.child("")),a=this.overlays.getIteratorFrom(o);for(;a.hasNext();){const l=a.getNext().value,u=l.getKey();if(!n.isPrefixOf(u.path))break;u.path.length===s&&l.largestBatchId>r&&i.set(l.getKey(),l)}return Z.resolve(i)}getOverlaysForCollectionGroup(e,n,r,i){let s=new Wt((u,h)=>u-h);const o=this.overlays.getIterator();for(;o.hasNext();){const u=o.getNext().value;if(u.getKey().getCollectionGroup()===n&&u.largestBatchId>r){let h=s.get(u.largestBatchId);h===null&&(h=aa(),s=s.insert(u.largestBatchId,h)),h.set(u.getKey(),u)}}const a=aa(),l=s.getIterator();for(;l.hasNext()&&(l.getNext().value.forEach((u,h)=>a.set(u,h)),!(a.size()>=i)););return Z.resolve(a)}Tt(e,n,r){const i=this.overlays.get(r.key);if(i!==null){const o=this.Er.get(i.largestBatchId).delete(r.key);this.Er.set(i.largestBatchId,o)}this.overlays=this.overlays.insert(r.key,new L9(n,r));let s=this.Er.get(n);s===void 0&&(s=Xe(),this.Er.set(n,s)),this.Er.set(n,s.add(r.key))}}/** * @license * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class dz{constructor(){this.sessionToken=Dn.EMPTY_BYTE_STRING}getSessionToken(e){return Z.resolve(this.sessionToken)}setSessionToken(e,n){return this.sessionToken=n,Z.resolve()}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class z1{constructor(){this.dr=new hn(gn.Ar),this.Rr=new hn(gn.Vr)}isEmpty(){return this.dr.isEmpty()}addReference(e,n){const r=new gn(e,n);this.dr=this.dr.add(r),this.Rr=this.Rr.add(r)}mr(e,n){e.forEach(r=>this.addReference(r,n))}removeReference(e,n){this.gr(new gn(e,n))}pr(e,n){e.forEach(r=>this.removeReference(r,n))}yr(e){const n=new Ee(new xt([])),r=new gn(n,e),i=new gn(n,e+1),s=[];return this.Rr.forEachInRange([r,i],o=>{this.gr(o),s.push(o.key)}),s}wr(){this.dr.forEach(e=>this.gr(e))}gr(e){this.dr=this.dr.delete(e),this.Rr=this.Rr.delete(e)}Sr(e){const n=new Ee(new xt([])),r=new gn(n,e),i=new gn(n,e+1);let s=Xe();return this.Rr.forEachInRange([r,i],o=>{s=s.add(o.key)}),s}containsKey(e){const n=new gn(e,0),r=this.dr.firstAfterOrEqual(n);return r!==null&&e.isEqual(r.key)}}class gn{constructor(e,n){this.key=e,this.br=n}static Ar(e,n){return Ee.comparator(e.key,n.key)||Ke(e.br,n.br)}static Vr(e,n){return Ke(e.br,n.br)||Ee.comparator(e.key,n.key)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class pz{constructor(e,n){this.indexManager=e,this.referenceDelegate=n,this.mutationQueue=[],this.Dr=1,this.vr=new hn(gn.Ar)}checkEmpty(e){return Z.resolve(this.mutationQueue.length===0)}addMutationBatch(e,n,r,i){const s=this.Dr;this.Dr++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];const o=new V9(s,n,r,i);this.mutationQueue.push(o);for(const a of i)this.vr=this.vr.add(new gn(a.key,s)),this.indexManager.addToCollectionParentIndex(e,a.key.path.popLast());return Z.resolve(o)}lookupMutationBatch(e,n){return Z.resolve(this.Cr(n))}getNextMutationBatchAfterBatchId(e,n){const r=n+1,i=this.Fr(r),s=i<0?0:i;return Z.resolve(this.mutationQueue.length>s?this.mutationQueue[s]:null)}getHighestUnacknowledgedBatchId(){return Z.resolve(this.mutationQueue.length===0?-1:this.Dr-1)}getAllMutationBatches(e){return Z.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,n){const r=new gn(n,0),i=new gn(n,Number.POSITIVE_INFINITY),s=[];return this.vr.forEachInRange([r,i],o=>{const a=this.Cr(o.br);s.push(a)}),Z.resolve(s)}getAllMutationBatchesAffectingDocumentKeys(e,n){let r=new hn(Ke);return n.forEach(i=>{const s=new gn(i,0),o=new gn(i,Number.POSITIVE_INFINITY);this.vr.forEachInRange([s,o],a=>{r=r.add(a.br)})}),Z.resolve(this.Mr(r))}getAllMutationBatchesAffectingQuery(e,n){const r=n.path,i=r.length+1;let s=r;Ee.isDocumentKey(s)||(s=s.child(""));const o=new gn(new Ee(s),0);let a=new hn(Ke);return this.vr.forEachWhile(l=>{const u=l.key.path;return!!r.isPrefixOf(u)&&(u.length===i&&(a=a.add(l.br)),!0)},o),Z.resolve(this.Mr(a))}Mr(e){const n=[];return e.forEach(r=>{const i=this.Cr(r);i!==null&&n.push(i)}),n}removeMutationBatch(e,n){Dt(this.Or(n.batchId,"removed")===0),this.mutationQueue.shift();let r=this.vr;return Z.forEach(n.mutations,i=>{const s=new gn(i.key,n.batchId);return r=r.delete(s),this.referenceDelegate.markPotentiallyOrphaned(e,i.key)}).next(()=>{this.vr=r})}Ln(e){}containsKey(e,n){const r=new gn(n,0),i=this.vr.firstAfterOrEqual(r);return Z.resolve(n.isEqual(i&&i.key))}performConsistencyCheck(e){return this.mutationQueue.length,Z.resolve()}Or(e,n){return this.Fr(e)}Fr(e){return this.mutationQueue.length===0?0:e-this.mutationQueue[0].batchId}Cr(e){const n=this.Fr(e);return n<0||n>=this.mutationQueue.length?null:this.mutationQueue[n]}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class mz{constructor(e){this.Nr=e,this.docs=function(){return new Wt(Ee.comparator)}(),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,n){const r=n.key,i=this.docs.get(r),s=i?i.size:0,o=this.Nr(n);return this.docs=this.docs.insert(r,{document:n.mutableCopy(),size:o}),this.size+=o-s,this.indexManager.addToCollectionParentIndex(e,r.path.popLast())}removeEntry(e){const n=this.docs.get(e);n&&(this.docs=this.docs.remove(e),this.size-=n.size)}getEntry(e,n){const r=this.docs.get(n);return Z.resolve(r?r.document.mutableCopy():Wn.newInvalidDocument(n))}getEntries(e,n){let r=ko();return n.forEach(i=>{const s=this.docs.get(i);r=r.insert(i,s?s.document.mutableCopy():Wn.newInvalidDocument(i))}),Z.resolve(r)}getDocumentsMatchingQuery(e,n,r,i){let s=ko();const o=n.path,a=new Ee(o.child("")),l=this.docs.getIteratorFrom(a);for(;l.hasNext();){const{key:u,value:{document:h}}=l.getNext();if(!o.isPrefixOf(u.path))break;u.path.length>o.length+1||J$(X$(h),r)<=0||(i.has(h.key)||Mm(n,h))&&(s=s.insert(h.key,h.mutableCopy()))}return Z.resolve(s)}getAllFromCollectionGroup(e,n,r,i){Re()}Lr(e,n){return Z.forEach(this.docs,r=>n(r))}newChangeBuffer(e){return new gz(this)}getSize(e){return Z.resolve(this.size)}}class gz extends lz{constructor(e){super(),this.hr=e}applyChanges(e){const n=[];return this.changes.forEach((r,i)=>{i.isValidDocument()?n.push(this.hr.addEntry(e,i)):this.hr.removeEntry(r)}),Z.waitFor(n)}getFromCache(e,n){return this.hr.getEntry(e,n)}getAllFromCache(e,n){return this.hr.getEntries(e,n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class yz{constructor(e){this.persistence=e,this.Br=new za(n=>N1(n),V1),this.lastRemoteSnapshotVersion=Ae.min(),this.highestTargetId=0,this.kr=0,this.qr=new z1,this.targetCount=0,this.Qr=ou.qn()}forEachTarget(e,n){return this.Br.forEach((r,i)=>n(i)),Z.resolve()}getLastRemoteSnapshotVersion(e){return Z.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return Z.resolve(this.kr)}allocateTargetId(e){return this.highestTargetId=this.Qr.next(),Z.resolve(this.highestTargetId)}setTargetsMetadata(e,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.kr&&(this.kr=n),Z.resolve()}Un(e){this.Br.set(e.target,e);const n=e.targetId;n>this.highestTargetId&&(this.Qr=new ou(n),this.highestTargetId=n),e.sequenceNumber>this.kr&&(this.kr=e.sequenceNumber)}addTargetData(e,n){return this.Un(n),this.targetCount+=1,Z.resolve()}updateTargetData(e,n){return this.Un(n),Z.resolve()}removeTargetData(e,n){return this.Br.delete(n.target),this.qr.yr(n.targetId),this.targetCount-=1,Z.resolve()}removeTargets(e,n,r){let i=0;const s=[];return this.Br.forEach((o,a)=>{a.sequenceNumber<=n&&r.get(a.targetId)===null&&(this.Br.delete(o),s.push(this.removeMatchingKeysForTargetId(e,a.targetId)),i++)}),Z.waitFor(s).next(()=>i)}getTargetCount(e){return Z.resolve(this.targetCount)}getTargetData(e,n){const r=this.Br.get(n)||null;return Z.resolve(r)}addMatchingKeys(e,n,r){return this.qr.mr(n,r),Z.resolve()}removeMatchingKeys(e,n,r){this.qr.pr(n,r);const i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(o=>{s.push(i.markPotentiallyOrphaned(e,o))}),Z.waitFor(s)}removeMatchingKeysForTargetId(e,n){return this.qr.yr(n),Z.resolve()}getMatchingKeysForTargetId(e,n){const r=this.qr.Sr(n);return Z.resolve(r)}containsKey(e,n){return Z.resolve(this.qr.containsKey(n))}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class EI{constructor(e,n){this.Kr={},this.overlays={},this.$r=new Am(0),this.Ur=!1,this.Ur=!0,this.Wr=new dz,this.referenceDelegate=e(this),this.Gr=new yz(this),this.indexManager=new nz,this.remoteDocumentCache=function(i){return new mz(i)}(r=>this.referenceDelegate.zr(r)),this.serializer=new ez(n),this.jr=new hz(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Ur=!1,Promise.resolve()}get started(){return this.Ur}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let n=this.overlays[e.toKey()];return n||(n=new fz,this.overlays[e.toKey()]=n),n}getMutationQueue(e,n){let r=this.Kr[e.toKey()];return r||(r=new pz(n,this.referenceDelegate),this.Kr[e.toKey()]=r),r}getGlobalsCache(){return this.Wr}getTargetCache(){return this.Gr}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.jr}runTransaction(e,n,r){de("MemoryPersistence","Starting transaction:",e);const i=new vz(this.$r.next());return this.referenceDelegate.Hr(),r(i).next(s=>this.referenceDelegate.Jr(i).next(()=>s)).toPromise().then(s=>(i.raiseOnCommittedEvent(),s))}Yr(e,n){return Z.or(Object.values(this.Kr).map(r=>()=>r.containsKey(e,n)))}}class vz extends e9{constructor(e){super(),this.currentSequenceNumber=e}}class B1{constructor(e){this.persistence=e,this.Zr=new z1,this.Xr=null}static ei(e){return new B1(e)}get ti(){if(this.Xr)return this.Xr;throw Re()}addReference(e,n,r){return this.Zr.addReference(r,n),this.ti.delete(r.toString()),Z.resolve()}removeReference(e,n,r){return this.Zr.removeReference(r,n),this.ti.add(r.toString()),Z.resolve()}markPotentiallyOrphaned(e,n){return this.ti.add(n.toString()),Z.resolve()}removeTarget(e,n){this.Zr.yr(n.targetId).forEach(i=>this.ti.add(i.toString()));const r=this.persistence.getTargetCache();return r.getMatchingKeysForTargetId(e,n.targetId).next(i=>{i.forEach(s=>this.ti.add(s.toString()))}).next(()=>r.removeTargetData(e,n))}Hr(){this.Xr=new Set}Jr(e){const n=this.persistence.getRemoteDocumentCache().newChangeBuffer();return Z.forEach(this.ti,r=>{const i=Ee.fromPath(r);return this.ni(e,i).next(s=>{s||n.removeEntry(i,Ae.min())})}).next(()=>(this.Xr=null,n.apply(e)))}updateLimboDocument(e,n){return this.ni(e,n).next(r=>{r?this.ti.delete(n.toString()):this.ti.add(n.toString())})}zr(e){return 0}ni(e,n){return Z.or([()=>Z.resolve(this.Zr.containsKey(n)),()=>this.persistence.getTargetCache().containsKey(e,n),()=>this.persistence.Yr(e,n)])}}class Fp{constructor(e,n){this.persistence=e,this.ri=new za(r=>r9(r.path),(r,i)=>r.isEqual(i)),this.garbageCollector=az(this,n)}static ei(e,n){return new Fp(e,n)}Hr(){}Jr(e){return Z.resolve()}forEachTarget(e,n){return this.persistence.getTargetCache().forEachTarget(e,n)}Xn(e){const n=this.nr(e);return this.persistence.getTargetCache().getTargetCount(e).next(r=>n.next(i=>r+i))}nr(e){let n=0;return this.er(e,r=>{n++}).next(()=>n)}er(e,n){return Z.forEach(this.ri,(r,i)=>this.ir(e,r,i).next(s=>s?Z.resolve():n(i)))}removeTargets(e,n,r){return this.persistence.getTargetCache().removeTargets(e,n,r)}removeOrphanedDocuments(e,n){let r=0;const i=this.persistence.getRemoteDocumentCache(),s=i.newChangeBuffer();return i.Lr(e,o=>this.ir(e,o,n).next(a=>{a||(r++,s.removeEntry(o,Ae.min()))})).next(()=>s.apply(e)).next(()=>r)}markPotentiallyOrphaned(e,n){return this.ri.set(n,e.currentSequenceNumber),Z.resolve()}removeTarget(e,n){const r=n.withSequenceNumber(e.currentSequenceNumber);return this.persistence.getTargetCache().updateTargetData(e,r)}addReference(e,n,r){return this.ri.set(r,e.currentSequenceNumber),Z.resolve()}removeReference(e,n,r){return this.ri.set(r,e.currentSequenceNumber),Z.resolve()}updateLimboDocument(e,n){return this.ri.set(n,e.currentSequenceNumber),Z.resolve()}zr(e){let n=e.key.toString().length;return e.isFoundDocument()&&(n+=Od(e.data.value)),n}ir(e,n,r){return Z.or([()=>this.persistence.Yr(e,n),()=>this.persistence.getTargetCache().containsKey(e,n),()=>{const i=this.ri.get(n);return Z.resolve(i!==void 0&&i>r)}])}getCacheSize(e){return this.persistence.getRemoteDocumentCache().getSize(e)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class U1{constructor(e,n,r,i){this.targetId=e,this.fromCache=n,this.Wi=r,this.Gi=i}static zi(e,n){let r=Xe(),i=Xe();for(const s of n.docChanges)switch(s.type){case 0:r=r.add(s.doc.key);break;case 1:i=i.add(s.doc.key)}return new U1(e,n.fromCache,r,i)}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class _z{constructor(){this._documentReadCount=0}get documentReadCount(){return this._documentReadCount}incrementDocumentReadCount(e){this._documentReadCount+=e}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class wz{constructor(){this.ji=!1,this.Hi=!1,this.Ji=100,this.Yi=function(){return T6()?8:t9(w6())>0?6:4}()}initialize(e,n){this.Zi=e,this.indexManager=n,this.ji=!0}getDocumentsMatchingQuery(e,n,r,i){const s={result:null};return this.Xi(e,n).next(o=>{s.result=o}).next(()=>{if(!s.result)return this.es(e,n,i,r).next(o=>{s.result=o})}).next(()=>{if(s.result)return;const o=new _z;return this.ts(e,n,o).next(a=>{if(s.result=a,this.Hi)return this.ns(e,n,o,a.size)})}).next(()=>s.result)}ns(e,n,r,i){return r.documentReadCount<this.Ji?(Za()<=qe.DEBUG&&de("QueryEngine","SDK will not create cache indexes for query:",el(n),"since it only creates cache indexes for collection contains","more than or equal to",this.Ji,"documents"),Z.resolve()):(Za()<=qe.DEBUG&&de("QueryEngine","Query:",el(n),"scans",r.documentReadCount,"local documents and returns",i,"documents as results."),r.documentReadCount>this.Yi*i?(Za()<=qe.DEBUG&&de("QueryEngine","The SDK decides to create cache indexes for query:",el(n),"as using cache indexes may help improve performance."),this.indexManager.createTargetIndexes(e,ls(n))):Z.resolve())}Xi(e,n){if(Mb(n))return Z.resolve(null);let r=ls(n);return this.indexManager.getIndexType(e,r).next(i=>i===0?null:(n.limit!==null&&i===1&&(n=Vp(n,null,"F"),r=ls(n)),this.indexManager.getDocumentsMatchingTarget(e,r).next(s=>{const o=Xe(...s);return this.Zi.getDocuments(e,o).next(a=>this.indexManager.getMinOffset(e,r).next(l=>{const u=this.rs(n,a);return this.ss(n,u,o,l.readTime)?this.Xi(e,Vp(n,null,"F")):this.os(e,u,n,l)}))})))}es(e,n,r,i){return Mb(n)||i.isEqual(Ae.min())?Z.resolve(null):this.Zi.getDocuments(e,r).next(s=>{const o=this.rs(n,s);return this.ss(n,o,r,i)?Z.resolve(null):(Za()<=qe.DEBUG&&de("QueryEngine","Re-using previous result from %s to execute query: %s",i.toString(),el(n)),this.os(e,o,n,Q$(i,-1)).next(a=>a))})}rs(e,n){let r=new hn(rI(e));return n.forEach((i,s)=>{Mm(e,s)&&(r=r.add(s))}),r}ss(e,n,r,i){if(e.limit===null)return!1;if(r.size!==n.size)return!0;const s=e.limitType==="F"?n.last():n.first();return!!s&&(s.hasPendingWrites||s.version.compareTo(i)>0)}ts(e,n,r){return Za()<=qe.DEBUG&&de("QueryEngine","Using full collection scan to execute query:",el(n)),this.Zi.getDocumentsMatchingQuery(e,n,Po.min(),r)}os(e,n,r,i){return this.Zi.getDocumentsMatchingQuery(e,r,i).next(s=>(n.forEach(o=>{s=s.insert(o.key,o)}),s))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class xz{constructor(e,n,r,i){this.persistence=e,this._s=n,this.serializer=i,this.us=new Wt(Ke),this.cs=new za(s=>N1(s),V1),this.ls=new Map,this.hs=e.getRemoteDocumentCache(),this.Gr=e.getTargetCache(),this.jr=e.getBundleCache(),this.Ps(r)}Ps(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new cz(this.hs,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.hs.setIndexManager(this.indexManager),this._s.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",n=>e.collect(n,this.us))}}function Tz(t,e,n,r){return new xz(t,e,n,r)}async function bI(t,e){const n=Ge(t);return await n.persistence.runTransaction("Handle user change","readonly",r=>{let i;return n.mutationQueue.getAllMutationBatches(r).next(s=>(i=s,n.Ps(e),n.mutationQueue.getAllMutationBatches(r))).next(s=>{const o=[],a=[];let l=Xe();for(const u of i){o.push(u.batchId);for(const h of u.mutations)l=l.add(h.key)}for(const u of s){a.push(u.batchId);for(const h of u.mutations)l=l.add(h.key)}return n.localDocuments.getDocuments(r,l).next(u=>({Ts:u,removedBatchIds:o,addedBatchIds:a}))})})}function SI(t){const e=Ge(t);return e.persistence.runTransaction("Get last remote snapshot version","readonly",n=>e.Gr.getLastRemoteSnapshotVersion(n))}function Ez(t,e){const n=Ge(t),r=e.snapshotVersion;let i=n.us;return n.persistence.runTransaction("Apply remote event","readwrite-primary",s=>{const o=n.hs.newChangeBuffer({trackRemovals:!0});i=n.us;const a=[];e.targetChanges.forEach((h,f)=>{const d=i.get(f);if(!d)return;a.push(n.Gr.removeMatchingKeys(s,h.removedDocuments,f).next(()=>n.Gr.addMatchingKeys(s,h.addedDocuments,f)));let p=d.withSequenceNumber(s.currentSequenceNumber);e.targetMismatches.get(f)!==null?p=p.withResumeToken(Dn.EMPTY_BYTE_STRING,Ae.min()).withLastLimboFreeSnapshotVersion(Ae.min()):h.resumeToken.approximateByteSize()>0&&(p=p.withResumeToken(h.resumeToken,r)),i=i.insert(f,p),function(y,C,_){return y.resumeToken.approximateByteSize()===0||C.snapshotVersion.toMicroseconds()-y.snapshotVersion.toMicroseconds()>=3e8?!0:_.addedDocuments.size+_.modifiedDocuments.size+_.removedDocuments.size>0}(d,p,h)&&a.push(n.Gr.updateTargetData(s,p))});let l=ko(),u=Xe();if(e.documentUpdates.forEach(h=>{e.resolvedLimboDocuments.has(h)&&a.push(n.persistence.referenceDelegate.updateLimboDocument(s,h))}),a.push(bz(s,o,e.documentUpdates).next(h=>{l=h.Is,u=h.Es})),!r.isEqual(Ae.min())){const h=n.Gr.getLastRemoteSnapshotVersion(s).next(f=>n.Gr.setTargetsMetadata(s,s.currentSequenceNumber,r));a.push(h)}return Z.waitFor(a).next(()=>o.apply(s)).next(()=>n.localDocuments.getLocalViewOfDocuments(s,l,u)).next(()=>l)}).then(s=>(n.us=i,s))}function bz(t,e,n){let r=Xe(),i=Xe();return n.forEach(s=>r=r.add(s)),e.getEntries(t,r).next(s=>{let o=ko();return n.forEach((a,l)=>{const u=s.get(a);l.isFoundDocument()!==u.isFoundDocument()&&(i=i.add(a)),l.isNoDocument()&&l.version.isEqual(Ae.min())?(e.removeEntry(a,l.readTime),o=o.insert(a,l)):!u.isValidDocument()||l.version.compareTo(u.version)>0||l.version.compareTo(u.version)===0&&u.hasPendingWrites?(e.addEntry(l),o=o.insert(a,l)):de("LocalStore","Ignoring outdated watch update for ",a,". Current version:",u.version," Watch version:",l.version)}),{Is:o,Es:i}})}function Sz(t,e){const n=Ge(t);return n.persistence.runTransaction("Allocate target","readwrite",r=>{let i;return n.Gr.getTargetData(r,e).next(s=>s?(i=s,Z.resolve(i)):n.Gr.allocateTargetId(r).next(o=>(i=new no(e,o,"TargetPurposeListen",r.currentSequenceNumber),n.Gr.addTargetData(r,i).next(()=>i))))}).then(r=>{const i=n.us.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.us=n.us.insert(r.targetId,r),n.cs.set(e,r.targetId)),r})}async function ev(t,e,n){const r=Ge(t),i=r.us.get(e),s=n?"readwrite":"readwrite-primary";try{n||await r.persistence.runTransaction("Release target",s,o=>r.persistence.referenceDelegate.removeTarget(o,i))}catch(o){if(!Cu(o))throw o;de("LocalStore",`Failed to update sequence numbers for target ${e}: ${o}`)}r.us=r.us.remove(e),r.cs.delete(i.target)}function Wb(t,e,n){const r=Ge(t);let i=Ae.min(),s=Xe();return r.persistence.runTransaction("Execute query","readwrite",o=>function(l,u,h){const f=Ge(l),d=f.cs.get(h);return d!==void 0?Z.resolve(f.us.get(d)):f.Gr.getTargetData(u,h)}(r,o,ls(e)).next(a=>{if(a)return i=a.lastLimboFreeSnapshotVersion,r.Gr.getMatchingKeysForTargetId(o,a.targetId).next(l=>{s=l})}).next(()=>r._s.getDocumentsMatchingQuery(o,e,n?i:Ae.min(),n?s:Xe())).next(a=>(Cz(r,x9(e),a),{documents:a,ds:s})))}function Cz(t,e,n){let r=t.ls.get(e)||Ae.min();n.forEach((i,s)=>{s.readTime.compareTo(r)>0&&(r=s.readTime)}),t.ls.set(e,r)}class qb{constructor(){this.activeTargetIds=P9()}ps(e){this.activeTargetIds=this.activeTargetIds.add(e)}ys(e){this.activeTargetIds=this.activeTargetIds.delete(e)}gs(){const e={activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()};return JSON.stringify(e)}}class Pz{constructor(){this._o=new qb,this.ao={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,n,r){}addLocalQueryTarget(e,n=!0){return n&&this._o.ps(e),this.ao[e]||"not-current"}updateQueryState(e,n,r){this.ao[e]=n}removeLocalQueryTarget(e){this._o.ys(e)}isLocalQueryTarget(e){return this._o.activeTargetIds.has(e)}clearQueryState(e){delete this.ao[e]}getAllActiveQueryTargets(){return this._o.activeTargetIds}isActiveQueryTarget(e){return this._o.activeTargetIds.has(e)}start(){return this._o=new qb,Promise.resolve()}handleUserChange(e,n,r){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Az{uo(e){}shutdown(){}}/** * @license * Copyright 2019 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Kb{constructor(){this.co=()=>this.lo(),this.ho=()=>this.Po(),this.To=[],this.Io()}uo(e){this.To.push(e)}shutdown(){window.removeEventListener("online",this.co),window.removeEventListener("offline",this.ho)}Io(){window.addEventListener("online",this.co),window.addEventListener("offline",this.ho)}lo(){de("ConnectivityMonitor","Network connectivity changed: AVAILABLE");for(const e of this.To)e(0)}Po(){de("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE");for(const e of this.To)e(1)}static p(){return typeof window<"u"&&window.addEventListener!==void 0&&window.removeEventListener!==void 0}}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */let Yf=null;function Qg(){return Yf===null?Yf=function(){return 268435456+Math.round(2147483648*Math.random())}():Yf++,"0x"+Yf.toString(16)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const Rz={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Iz{constructor(e){this.Eo=e.Eo,this.Ao=e.Ao}Ro(e){this.Vo=e}mo(e){this.fo=e}po(e){this.yo=e}onMessage(e){this.wo=e}close(){this.Ao()}send(e){this.Eo(e)}So(){this.Vo()}bo(){this.fo()}Do(e){this.yo(e)}vo(e){this.wo(e)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const jn="WebChannelConnection";class kz extends class{get Co(){return!1}constructor(n){this.databaseInfo=n,this.databaseId=n.databaseId;const r=n.ssl?"https":"http",i=encodeURIComponent(this.databaseId.projectId),s=encodeURIComponent(this.databaseId.database);this.Fo=r+"://"+n.host,this.Mo=`projects/${i}/databases/${s}`,this.xo=this.databaseId.database==="(default)"?`project_id=${i}`:`project_id=${i}&database_id=${s}`}Oo(n,r,i,s,o){const a=Qg(),l=this.No(n,r.toUriEncodedString());de("RestConnection",`Sending RPC '${n}' ${a}:`,l,i);const u={"google-cloud-resource-prefix":this.Mo,"x-goog-request-params":this.xo};return this.Lo(u,s,o),this.Bo(n,l,u,i).then(h=>(de("RestConnection",`Received RPC '${n}' ${a}: `,h),h),h=>{throw tu("RestConnection",`RPC '${n}' ${a} failed with error: `,h,"url: ",l,"request:",i),h})}ko(n,r,i,s,o,a){return this.Oo(n,r,i,s,o)}Lo(n,r,i){n["X-Goog-Api-Client"]=function(){return"gl-js/ fire/"+Su}(),n["Content-Type"]="text/plain",this.databaseInfo.appId&&(n["X-Firebase-GMPID"]=this.databaseInfo.appId),r&&r.headers.forEach((s,o)=>n[o]=s),i&&i.headers.forEach((s,o)=>n[o]=s)}No(n,r){const i=Rz[n];return`${this.Fo}/v1/${r}:${i}`}terminate(){}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Bo(e,n,r,i){const s=Qg();return new Promise((o,a)=>{const l=new z2;l.setWithCredentials(!0),l.listenOnce(B2.COMPLETE,()=>{try{switch(l.getLastErrorCode()){case Ld.NO_ERROR:const h=l.getResponseJson();de(jn,`XHR for RPC '${e}' ${s} received:`,JSON.stringify(h)),o(h);break;case Ld.TIMEOUT:de(jn,`RPC '${e}' ${s} timed out`),a(new ce(ie.DEADLINE_EXCEEDED,"Request time out"));break;case Ld.HTTP_ERROR:const f=l.getStatus();if(de(jn,`RPC '${e}' ${s} failed with status:`,f,"response text:",l.getResponseText()),f>0){let d=l.getResponseJson();Array.isArray(d)&&(d=d[0]);const p=d==null?void 0:d.error;if(p&&p.status&&p.message){const v=function(C){const _=C.toLowerCase().replace(/_/g,"-");return Object.values(ie).indexOf(_)>=0?_:ie.UNKNOWN}(p.status);a(new ce(v,p.message))}else a(new ce(ie.UNKNOWN,"Server responded with status "+l.getStatus()))}else a(new ce(ie.UNAVAILABLE,"Connection failed."));break;default:Re()}}finally{de(jn,`RPC '${e}' ${s} completed.`)}});const u=JSON.stringify(i);de(jn,`RPC '${e}' ${s} sending request:`,i),l.send(n,"POST",u,r,15)})}qo(e,n,r){const i=Qg(),s=[this.Fo,"/","google.firestore.v1.Firestore","/",e,"/channel"],o=W2(),a=H2(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;u!==void 0&&(l.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(l.useFetchStreams=!0),this.Lo(l.initMessageHeaders,n,r),l.encodeInitMessageHeaders=!0;const h=s.join("");de(jn,`Creating RPC '${e}' stream ${i}: ${h}`,l);const f=o.createWebChannel(h,l);let d=!1,p=!1;const v=new Iz({Eo:C=>{p?de(jn,`Not sending because RPC '${e}' stream ${i} is closed:`,C):(d||(de(jn,`Opening RPC '${e}' stream ${i} transport.`),f.open(),d=!0),de(jn,`RPC '${e}' stream ${i} sending:`,C),f.send(C))},Ao:()=>f.close()}),y=(C,_,w)=>{C.listen(_,T=>{try{w(T)}catch(k){setTimeout(()=>{throw k},0)}})};return y(f,dc.EventType.OPEN,()=>{p||(de(jn,`RPC '${e}' stream ${i} transport opened.`),v.So())}),y(f,dc.EventType.CLOSE,()=>{p||(p=!0,de(jn,`RPC '${e}' stream ${i} transport closed`),v.Do())}),y(f,dc.EventType.ERROR,C=>{p||(p=!0,tu(jn,`RPC '${e}' stream ${i} transport errored:`,C),v.Do(new ce(ie.UNAVAILABLE,"The operation could not be completed")))}),y(f,dc.EventType.MESSAGE,C=>{var _;if(!p){const w=C.data[0];Dt(!!w);const T=w,k=(T==null?void 0:T.error)||((_=T[0])===null||_===void 0?void 0:_.error);if(k){de(jn,`RPC '${e}' stream ${i} received error:`,k);const P=k.status;let V=function(E){const A=Xt[E];if(A!==void 0)return fI(A)}(P),S=k.message;V===void 0&&(V=ie.INTERNAL,S="Unknown error status: "+P+" with message "+k.message),p=!0,v.Do(new ce(V,S)),f.close()}else de(jn,`RPC '${e}' stream ${i} received:`,w),v.vo(w)}}),y(a,U2.STAT_EVENT,C=>{C.stat===U0.PROXY?de(jn,`RPC '${e}' stream ${i} detected buffering proxy`):C.stat===U0.NOPROXY&&de(jn,`RPC '${e}' stream ${i} detected no buffering proxy`)}),setTimeout(()=>{v.bo()},0),v}}function Xg(){return typeof document<"u"?document:null}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function Om(t){return new H9(t,!0)}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class CI{constructor(e,n,r=1e3,i=1.5,s=6e4){this.li=e,this.timerId=n,this.Qo=r,this.Ko=i,this.$o=s,this.Uo=0,this.Wo=null,this.Go=Date.now(),this.reset()}reset(){this.Uo=0}zo(){this.Uo=this.$o}jo(e){this.cancel();const n=Math.floor(this.Uo+this.Ho()),r=Math.max(0,Date.now()-this.Go),i=Math.max(0,n-r);i>0&&de("ExponentialBackoff",`Backing off for ${i} ms (base delay: ${this.Uo} ms, delay with jitter: ${n} ms, last attempt: ${r} ms ago)`),this.Wo=this.li.enqueueAfterDelay(this.timerId,i,()=>(this.Go=Date.now(),e())),this.Uo*=this.Ko,this.Uo<this.Qo&&(this.Uo=this.Qo),this.Uo>this.$o&&(this.Uo=this.$o)}Jo(){this.Wo!==null&&(this.Wo.skipDelay(),this.Wo=null)}cancel(){this.Wo!==null&&(this.Wo.cancel(),this.Wo=null)}Ho(){return(Math.random()-.5)*this.Uo}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Dz{constructor(e,n,r,i,s,o,a,l){this.li=e,this.Yo=r,this.Zo=i,this.connection=s,this.authCredentialsProvider=o,this.appCheckCredentialsProvider=a,this.listener=l,this.state=0,this.Xo=0,this.e_=null,this.t_=null,this.stream=null,this.n_=0,this.r_=new CI(e,n)}i_(){return this.state===1||this.state===5||this.s_()}s_(){return this.state===2||this.state===3}start(){this.n_=0,this.state!==4?this.auth():this.o_()}async stop(){this.i_()&&await this.close(0)}__(){this.state=0,this.r_.reset()}a_(){this.s_()&&this.e_===null&&(this.e_=this.li.enqueueAfterDelay(this.Yo,6e4,()=>this.u_()))}c_(e){this.l_(),this.stream.send(e)}async u_(){if(this.s_())return this.close(0)}l_(){this.e_&&(this.e_.cancel(),this.e_=null)}h_(){this.t_&&(this.t_.cancel(),this.t_=null)}async close(e,n){this.l_(),this.h_(),this.r_.cancel(),this.Xo++,e!==4?this.r_.reset():n&&n.code===ie.RESOURCE_EXHAUSTED?(Ms(n.toString()),Ms("Using maximum backoff delay to prevent overloading the backend."),this.r_.zo()):n&&n.code===ie.UNAUTHENTICATED&&this.state!==3&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),this.stream!==null&&(this.P_(),this.stream.close(),this.stream=null),this.state=e,await this.listener.po(n)}P_(){}auth(){this.state=1;const e=this.T_(this.Xo),n=this.Xo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([r,i])=>{this.Xo===n&&this.I_(r,i)},r=>{e(()=>{const i=new ce(ie.UNKNOWN,"Fetching auth token failed: "+r.message);return this.E_(i)})})}I_(e,n){const r=this.T_(this.Xo);this.stream=this.d_(e,n),this.stream.Ro(()=>{r(()=>this.listener.Ro())}),this.stream.mo(()=>{r(()=>(this.state=2,this.t_=this.li.enqueueAfterDelay(this.Zo,1e4,()=>(this.s_()&&(this.state=3),Promise.resolve())),this.listener.mo()))}),this.stream.po(i=>{r(()=>this.E_(i))}),this.stream.onMessage(i=>{r(()=>++this.n_==1?this.A_(i):this.onNext(i))})}o_(){this.state=5,this.r_.jo(async()=>{this.state=0,this.start()})}E_(e){return de("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}T_(e){return n=>{this.li.enqueueAndForget(()=>this.Xo===e?n():(de("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class Mz extends Dz{constructor(e,n,r,i,s,o){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",n,r,i,o),this.serializer=s}d_(e,n){return this.connection.qo("Listen",e,n)}A_(e){return this.onNext(e)}onNext(e){this.r_.reset();const n=q9(this.serializer,e),r=function(s){if(!("targetChange"in s))return Ae.min();const o=s.targetChange;return o.targetIds&&o.targetIds.length?Ae.min():o.readTime?Ol(o.readTime):Ae.min()}(e);return this.listener.R_(n,r)}V_(e){const n={};n.database=Bb(this.serializer),n.addTarget=function(s,o){let a;const l=o.target;if(a=K0(l)?{documents:K9(s,l)}:{query:G9(s,l).ct},a.targetId=o.targetId,o.resumeToken.approximateByteSize()>0){a.resumeToken=mI(s,o.resumeToken);const u=X0(s,o.expectedCount);u!==null&&(a.expectedCount=u)}else if(o.snapshotVersion.compareTo(Ae.min())>0){a.readTime=J0(s,o.snapshotVersion.toTimestamp());const u=X0(s,o.expectedCount);u!==null&&(a.expectedCount=u)}return a}(this.serializer,e);const r=Q9(this.serializer,e);r&&(n.labels=r),this.c_(n)}m_(e){const n={};n.database=Bb(this.serializer),n.removeTarget=e,this.c_(n)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Nz extends class{}{constructor(e,n,r,i){super(),this.authCredentials=e,this.appCheckCredentials=n,this.connection=r,this.serializer=i,this.S_=!1}b_(){if(this.S_)throw new ce(ie.FAILED_PRECONDITION,"The client has already been terminated.")}Oo(e,n,r,i){return this.b_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([s,o])=>this.connection.Oo(e,Z0(n,r),i,s,o)).catch(s=>{throw s.name==="FirebaseError"?(s.code===ie.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),s):new ce(ie.UNKNOWN,s.toString())})}ko(e,n,r,i,s){return this.b_(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([o,a])=>this.connection.ko(e,Z0(n,r),i,o,a,s)).catch(o=>{throw o.name==="FirebaseError"?(o.code===ie.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),o):new ce(ie.UNKNOWN,o.toString())})}terminate(){this.S_=!0,this.connection.terminate()}}class Vz{constructor(e,n){this.asyncQueue=e,this.onlineStateHandler=n,this.state="Unknown",this.D_=0,this.v_=null,this.C_=!0}F_(){this.D_===0&&(this.M_("Unknown"),this.v_=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this.v_=null,this.x_("Backend didn't respond within 10 seconds."),this.M_("Offline"),Promise.resolve())))}O_(e){this.state==="Online"?this.M_("Unknown"):(this.D_++,this.D_>=1&&(this.N_(),this.x_(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.M_("Offline")))}set(e){this.N_(),this.D_=0,e==="Online"&&(this.C_=!1),this.M_(e)}M_(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}x_(e){const n=`Could not reach Cloud Firestore backend. ${e} This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.C_?(Ms(n),this.C_=!1):de("OnlineStateTracker",n)}N_(){this.v_!==null&&(this.v_.cancel(),this.v_=null)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Lz{constructor(e,n,r,i,s){this.localStore=e,this.datastore=n,this.asyncQueue=r,this.remoteSyncer={},this.L_=[],this.B_=new Map,this.k_=new Set,this.q_=[],this.Q_=s,this.Q_.uo(o=>{r.enqueueAndForget(async()=>{af(this)&&(de("RemoteStore","Restarting streams for network reachability change."),await async function(l){const u=Ge(l);u.k_.add(4),await of(u),u.K_.set("Unknown"),u.k_.delete(4),await Fm(u)}(this))})}),this.K_=new Vz(r,i)}}async function Fm(t){if(af(t))for(const e of t.q_)await e(!0)}async function of(t){for(const e of t.q_)await e(!1)}function PI(t,e){const n=Ge(t);n.B_.has(e.targetId)||(n.B_.set(e.targetId,e),K1(n)?q1(n):Au(n).s_()&&W1(n,e))}function H1(t,e){const n=Ge(t),r=Au(n);n.B_.delete(e),r.s_()&&AI(n,e),n.B_.size===0&&(r.s_()?r.a_():af(n)&&n.K_.set("Unknown"))}function W1(t,e){if(t.U_.xe(e.targetId),e.resumeToken.approximateByteSize()>0||e.snapshotVersion.compareTo(Ae.min())>0){const n=t.remoteSyncer.getRemoteKeysForTarget(e.targetId).size;e=e.withExpectedCount(n)}Au(t).V_(e)}function AI(t,e){t.U_.xe(e),Au(t).m_(e)}function q1(t){t.U_=new $9({getRemoteKeysForTarget:e=>t.remoteSyncer.getRemoteKeysForTarget(e),ut:e=>t.B_.get(e)||null,nt:()=>t.datastore.serializer.databaseId}),Au(t).start(),t.K_.F_()}function K1(t){return af(t)&&!Au(t).i_()&&t.B_.size>0}function af(t){return Ge(t).k_.size===0}function RI(t){t.U_=void 0}async function Oz(t){t.K_.set("Online")}async function Fz(t){t.B_.forEach((e,n)=>{W1(t,e)})}async function jz(t,e){RI(t),K1(t)?(t.K_.O_(e),q1(t)):t.K_.set("Unknown")}async function $z(t,e,n){if(t.K_.set("Online"),e instanceof pI&&e.state===2&&e.cause)try{await async function(i,s){const o=s.cause;for(const a of s.targetIds)i.B_.has(a)&&(await i.remoteSyncer.rejectListen(a,o),i.B_.delete(a),i.U_.removeTarget(a))}(t,e)}catch(r){de("RemoteStore","Failed to remove targets %s: %s ",e.targetIds.join(","),r),await Gb(t,r)}else if(e instanceof jd?t.U_.$e(e):e instanceof dI?t.U_.Je(e):t.U_.Ge(e),!n.isEqual(Ae.min()))try{const r=await SI(t.localStore);n.compareTo(r)>=0&&await function(s,o){const a=s.U_.it(o);return a.targetChanges.forEach((l,u)=>{if(l.resumeToken.approximateByteSize()>0){const h=s.B_.get(u);h&&s.B_.set(u,h.withResumeToken(l.resumeToken,o))}}),a.targetMismatches.forEach((l,u)=>{const h=s.B_.get(l);if(!h)return;s.B_.set(l,h.withResumeToken(Dn.EMPTY_BYTE_STRING,h.snapshotVersion)),AI(s,l);const f=new no(h.target,l,u,h.sequenceNumber);W1(s,f)}),s.remoteSyncer.applyRemoteEvent(a)}(t,n)}catch(r){de("RemoteStore","Failed to raise snapshot:",r),await Gb(t,r)}}async function Gb(t,e,n){if(!Cu(e))throw e;t.k_.add(1),await of(t),t.K_.set("Offline"),n||(n=()=>SI(t.localStore)),t.asyncQueue.enqueueRetryable(async()=>{de("RemoteStore","Retrying IndexedDB access"),await n(),t.k_.delete(1),await Fm(t)})}async function Yb(t,e){const n=Ge(t);n.asyncQueue.verifyOperationInProgress(),de("RemoteStore","RemoteStore received new credentials");const r=af(n);n.k_.add(3),await of(n),r&&n.K_.set("Unknown"),await n.remoteSyncer.handleCredentialChange(e),n.k_.delete(3),await Fm(n)}async function zz(t,e){const n=Ge(t);e?(n.k_.delete(2),await Fm(n)):e||(n.k_.add(2),await of(n),n.K_.set("Unknown"))}function Au(t){return t.W_||(t.W_=function(n,r,i){const s=Ge(n);return s.b_(),new Mz(r,s.connection,s.authCredentials,s.appCheckCredentials,s.serializer,i)}(t.datastore,t.asyncQueue,{Ro:Oz.bind(null,t),mo:Fz.bind(null,t),po:jz.bind(null,t),R_:$z.bind(null,t)}),t.q_.push(async e=>{e?(t.W_.__(),K1(t)?q1(t):t.K_.set("Unknown")):(await t.W_.stop(),RI(t))})),t.W_}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class G1{constructor(e,n,r,i,s){this.asyncQueue=e,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new ga,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(o=>{})}get promise(){return this.deferred.promise}static createAndSchedule(e,n,r,i,s){const o=Date.now()+r,a=new G1(e,n,o,i,s);return a.start(r),a}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new ce(ie.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>this.timerHandle!==null?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function II(t,e){if(Ms("AsyncQueue",`${e}: ${t}`),Cu(t))return new ce(ie.UNAVAILABLE,`${e}: ${t}`);throw t}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Fl{static emptySet(e){return new Fl(e.comparator)}constructor(e){this.comparator=e?(n,r)=>e(n,r)||Ee.comparator(n.key,r.key):(n,r)=>Ee.comparator(n.key,r.key),this.keyedMap=pc(),this.sortedSet=new Wt(this.comparator)}has(e){return this.keyedMap.get(e)!=null}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){const n=this.keyedMap.get(e);return n?this.sortedSet.indexOf(n):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((n,r)=>(e(n),!1))}add(e){const n=this.delete(e.key);return n.copy(n.keyedMap.insert(e.key,e),n.sortedSet.insert(e,null))}delete(e){const n=this.get(e);return n?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(n)):this}isEqual(e){if(!(e instanceof Fl)||this.size!==e.size)return!1;const n=this.sortedSet.getIterator(),r=e.sortedSet.getIterator();for(;n.hasNext();){const i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0}toString(){const e=[];return this.forEach(n=>{e.push(n.toString())}),e.length===0?"DocumentSet ()":`DocumentSet ( `+e.join(` `)+` )`}copy(e,n){const r=new Fl;return r.comparator=this.comparator,r.keyedMap=e,r.sortedSet=n,r}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Qb{constructor(){this.z_=new Wt(Ee.comparator)}track(e){const n=e.doc.key,r=this.z_.get(n);r?e.type!==0&&r.type===3?this.z_=this.z_.insert(n,e):e.type===3&&r.type!==1?this.z_=this.z_.insert(n,{type:r.type,doc:e.doc}):e.type===2&&r.type===2?this.z_=this.z_.insert(n,{type:2,doc:e.doc}):e.type===2&&r.type===0?this.z_=this.z_.insert(n,{type:0,doc:e.doc}):e.type===1&&r.type===0?this.z_=this.z_.remove(n):e.type===1&&r.type===2?this.z_=this.z_.insert(n,{type:1,doc:r.doc}):e.type===0&&r.type===1?this.z_=this.z_.insert(n,{type:2,doc:e.doc}):Re():this.z_=this.z_.insert(n,e)}j_(){const e=[];return this.z_.inorderTraversal((n,r)=>{e.push(r)}),e}}class au{constructor(e,n,r,i,s,o,a,l,u){this.query=e,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=o,this.syncStateChanged=a,this.excludesMetadataChanges=l,this.hasCachedResults=u}static fromInitialDocuments(e,n,r,i,s){const o=[];return n.forEach(a=>{o.push({type:0,doc:a})}),new au(e,n,Fl.emptySet(n),o,r,i,!0,!1,s)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&Dm(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;const n=this.docChanges,r=e.docChanges;if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(n[i].type!==r[i].type||!n[i].doc.isEqual(r[i].doc))return!1;return!0}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Bz{constructor(){this.H_=void 0,this.J_=[]}Y_(){return this.J_.some(e=>e.Z_())}}class Uz{constructor(){this.queries=Xb(),this.onlineState="Unknown",this.X_=new Set}terminate(){(function(n,r){const i=Ge(n),s=i.queries;i.queries=Xb(),s.forEach((o,a)=>{for(const l of a.J_)l.onError(r)})})(this,new ce(ie.ABORTED,"Firestore shutting down"))}}function Xb(){return new za(t=>nI(t),Dm)}async function Hz(t,e){const n=Ge(t);let r=3;const i=e.query;let s=n.queries.get(i);s?!s.Y_()&&e.Z_()&&(r=2):(s=new Bz,r=e.Z_()?0:1);try{switch(r){case 0:s.H_=await n.onListen(i,!0);break;case 1:s.H_=await n.onListen(i,!1);break;case 2:await n.onFirstRemoteStoreListen(i)}}catch(o){const a=II(o,`Initialization of query '${el(e.query)}' failed`);return void e.onError(a)}n.queries.set(i,s),s.J_.push(e),e.ea(n.onlineState),s.H_&&e.ta(s.H_)&&Y1(n)}async function Wz(t,e){const n=Ge(t),r=e.query;let i=3;const s=n.queries.get(r);if(s){const o=s.J_.indexOf(e);o>=0&&(s.J_.splice(o,1),s.J_.length===0?i=e.Z_()?0:1:!s.Y_()&&e.Z_()&&(i=2))}switch(i){case 0:return n.queries.delete(r),n.onUnlisten(r,!0);case 1:return n.queries.delete(r),n.onUnlisten(r,!1);case 2:return n.onLastRemoteStoreUnlisten(r);default:return}}function qz(t,e){const n=Ge(t);let r=!1;for(const i of e){const s=i.query,o=n.queries.get(s);if(o){for(const a of o.J_)a.ta(i)&&(r=!0);o.H_=i}}r&&Y1(n)}function Kz(t,e,n){const r=Ge(t),i=r.queries.get(e);if(i)for(const s of i.J_)s.onError(n);r.queries.delete(e)}function Y1(t){t.X_.forEach(e=>{e.next()})}var tv,Jb;(Jb=tv||(tv={})).na="default",Jb.Cache="cache";class Gz{constructor(e,n,r){this.query=e,this.ra=n,this.ia=!1,this.sa=null,this.onlineState="Unknown",this.options=r||{}}ta(e){if(!this.options.includeMetadataChanges){const r=[];for(const i of e.docChanges)i.type!==3&&r.push(i);e=new au(e.query,e.docs,e.oldDocs,r,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let n=!1;return this.ia?this.oa(e)&&(this.ra.next(e),n=!0):this._a(e,this.onlineState)&&(this.aa(e),n=!0),this.sa=e,n}onError(e){this.ra.error(e)}ea(e){this.onlineState=e;let n=!1;return this.sa&&!this.ia&&this._a(this.sa,e)&&(this.aa(this.sa),n=!0),n}_a(e,n){if(!e.fromCache||!this.Z_())return!0;const r=n!=="Offline";return(!this.options.ua||!r)&&(!e.docs.isEmpty()||e.hasCachedResults||n==="Offline")}oa(e){if(e.docChanges.length>0)return!0;const n=this.sa&&this.sa.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0}aa(e){e=au.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.ia=!0,this.ra.next(e)}Z_(){return this.options.source!==tv.Cache}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class kI{constructor(e){this.key=e}}class DI{constructor(e){this.key=e}}class Yz{constructor(e,n){this.query=e,this.da=n,this.Aa=null,this.hasCachedResults=!1,this.current=!1,this.Ra=Xe(),this.mutatedKeys=Xe(),this.Va=rI(e),this.ma=new Fl(this.Va)}get fa(){return this.da}ga(e,n){const r=n?n.pa:new Qb,i=n?n.ma:this.ma;let s=n?n.mutatedKeys:this.mutatedKeys,o=i,a=!1;const l=this.query.limitType==="F"&&i.size===this.query.limit?i.last():null,u=this.query.limitType==="L"&&i.size===this.query.limit?i.first():null;if(e.inorderTraversal((h,f)=>{const d=i.get(h),p=Mm(this.query,f)?f:null,v=!!d&&this.mutatedKeys.has(d.key),y=!!p&&(p.hasLocalMutations||this.mutatedKeys.has(p.key)&&p.hasCommittedMutations);let C=!1;d&&p?d.data.isEqual(p.data)?v!==y&&(r.track({type:3,doc:p}),C=!0):this.ya(d,p)||(r.track({type:2,doc:p}),C=!0,(l&&this.Va(p,l)>0||u&&this.Va(p,u)<0)&&(a=!0)):!d&&p?(r.track({type:0,doc:p}),C=!0):d&&!p&&(r.track({type:1,doc:d}),C=!0,(l||u)&&(a=!0)),C&&(p?(o=o.add(p),s=y?s.add(h):s.delete(h)):(o=o.delete(h),s=s.delete(h)))}),this.query.limit!==null)for(;o.size>this.query.limit;){const h=this.query.limitType==="F"?o.last():o.first();o=o.delete(h.key),s=s.delete(h.key),r.track({type:1,doc:h})}return{ma:o,pa:r,ss:a,mutatedKeys:s}}ya(e,n){return e.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations}applyChanges(e,n,r,i){const s=this.ma;this.ma=e.ma,this.mutatedKeys=e.mutatedKeys;const o=e.pa.j_();o.sort((h,f)=>function(p,v){const y=C=>{switch(C){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return Re()}};return y(p)-y(v)}(h.type,f.type)||this.Va(h.doc,f.doc)),this.wa(r),i=i!=null&&i;const a=n&&!i?this.Sa():[],l=this.Ra.size===0&&this.current&&!i?1:0,u=l!==this.Aa;return this.Aa=l,o.length!==0||u?{snapshot:new au(this.query,e.ma,s,o,e.mutatedKeys,l===0,u,!1,!!r&&r.resumeToken.approximateByteSize()>0),ba:a}:{ba:a}}ea(e){return this.current&&e==="Offline"?(this.current=!1,this.applyChanges({ma:this.ma,pa:new Qb,mutatedKeys:this.mutatedKeys,ss:!1},!1)):{ba:[]}}Da(e){return!this.da.has(e)&&!!this.ma.has(e)&&!this.ma.get(e).hasLocalMutations}wa(e){e&&(e.addedDocuments.forEach(n=>this.da=this.da.add(n)),e.modifiedDocuments.forEach(n=>{}),e.removedDocuments.forEach(n=>this.da=this.da.delete(n)),this.current=e.current)}Sa(){if(!this.current)return[];const e=this.Ra;this.Ra=Xe(),this.ma.forEach(r=>{this.Da(r.key)&&(this.Ra=this.Ra.add(r.key))});const n=[];return e.forEach(r=>{this.Ra.has(r)||n.push(new DI(r))}),this.Ra.forEach(r=>{e.has(r)||n.push(new kI(r))}),n}va(e){this.da=e.ds,this.Ra=Xe();const n=this.ga(e.documents);return this.applyChanges(n,!0)}Ca(){return au.fromInitialDocuments(this.query,this.ma,this.mutatedKeys,this.Aa===0,this.hasCachedResults)}}class Qz{constructor(e,n,r){this.query=e,this.targetId=n,this.view=r}}class Xz{constructor(e){this.key=e,this.Fa=!1}}class Jz{constructor(e,n,r,i,s,o){this.localStore=e,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=o,this.Ma={},this.xa=new za(a=>nI(a),Dm),this.Oa=new Map,this.Na=new Set,this.La=new Wt(Ee.comparator),this.Ba=new Map,this.ka=new z1,this.qa={},this.Qa=new Map,this.Ka=ou.Qn(),this.onlineState="Unknown",this.$a=void 0}get isPrimaryClient(){return this.$a===!0}}async function Zz(t,e,n=!0){const r=OI(t);let i;const s=r.xa.get(e);return s?(r.sharedClientState.addLocalQueryTarget(s.targetId),i=s.view.Ca()):i=await MI(r,e,n,!0),i}async function eB(t,e){const n=OI(t);await MI(n,e,!0,!1)}async function MI(t,e,n,r){const i=await Sz(t.localStore,ls(e)),s=i.targetId,o=t.sharedClientState.addLocalQueryTarget(s,n);let a;return r&&(a=await tB(t,e,s,o==="current",i.resumeToken)),t.isPrimaryClient&&n&&PI(t.remoteStore,i),a}async function tB(t,e,n,r,i){t.Ua=(f,d,p)=>async function(y,C,_,w){let T=C.view.ga(_);T.ss&&(T=await Wb(y.localStore,C.query,!1).then(({documents:S})=>C.view.ga(S,T)));const k=w&&w.targetChanges.get(C.targetId),P=w&&w.targetMismatches.get(C.targetId)!=null,V=C.view.applyChanges(T,y.isPrimaryClient,k,P);return eS(y,C.targetId,V.ba),V.snapshot}(t,f,d,p);const s=await Wb(t.localStore,e,!0),o=new Yz(e,s.ds),a=o.ga(s.documents),l=sf.createSynthesizedTargetChangeForCurrentChange(n,r&&t.onlineState!=="Offline",i),u=o.applyChanges(a,t.isPrimaryClient,l);eS(t,n,u.ba);const h=new Qz(e,n,o);return t.xa.set(e,h),t.Oa.has(n)?t.Oa.get(n).push(e):t.Oa.set(n,[e]),u.snapshot}async function nB(t,e,n){const r=Ge(t),i=r.xa.get(e),s=r.Oa.get(i.targetId);if(s.length>1)return r.Oa.set(i.targetId,s.filter(o=>!Dm(o,e))),void r.xa.delete(e);r.isPrimaryClient?(r.sharedClientState.removeLocalQueryTarget(i.targetId),r.sharedClientState.isActiveQueryTarget(i.targetId)||await ev(r.localStore,i.targetId,!1).then(()=>{r.sharedClientState.clearQueryState(i.targetId),n&&H1(r.remoteStore,i.targetId),nv(r,i.targetId)}).catch(Pm)):(nv(r,i.targetId),await ev(r.localStore,i.targetId,!0))}async function rB(t,e){const n=Ge(t),r=n.xa.get(e),i=n.Oa.get(r.targetId);n.isPrimaryClient&&i.length===1&&(n.sharedClientState.removeLocalQueryTarget(r.targetId),H1(n.remoteStore,r.targetId))}async function NI(t,e){const n=Ge(t);try{const r=await Ez(n.localStore,e);e.targetChanges.forEach((i,s)=>{const o=n.Ba.get(s);o&&(Dt(i.addedDocuments.size+i.modifiedDocuments.size+i.removedDocuments.size<=1),i.addedDocuments.size>0?o.Fa=!0:i.modifiedDocuments.size>0?Dt(o.Fa):i.removedDocuments.size>0&&(Dt(o.Fa),o.Fa=!1))}),await LI(n,r,e)}catch(r){await Pm(r)}}function Zb(t,e,n){const r=Ge(t);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){const i=[];r.xa.forEach((s,o)=>{const a=o.view.ea(e);a.snapshot&&i.push(a.snapshot)}),function(o,a){const l=Ge(o);l.onlineState=a;let u=!1;l.queries.forEach((h,f)=>{for(const d of f.J_)d.ea(a)&&(u=!0)}),u&&Y1(l)}(r.eventManager,e),i.length&&r.Ma.R_(i),r.onlineState=e,r.isPrimaryClient&&r.sharedClientState.setOnlineState(e)}}async function iB(t,e,n){const r=Ge(t);r.sharedClientState.updateQueryState(e,"rejected",n);const i=r.Ba.get(e),s=i&&i.key;if(s){let o=new Wt(Ee.comparator);o=o.insert(s,Wn.newNoDocument(s,Ae.min()));const a=Xe().add(s),l=new Lm(Ae.min(),new Map,new Wt(Ke),o,a);await NI(r,l),r.La=r.La.remove(s),r.Ba.delete(e),Q1(r)}else await ev(r.localStore,e,!1).then(()=>nv(r,e,n)).catch(Pm)}function nv(t,e,n=null){t.sharedClientState.removeLocalQueryTarget(e);for(const r of t.Oa.get(e))t.xa.delete(r),n&&t.Ma.Wa(r,n);t.Oa.delete(e),t.isPrimaryClient&&t.ka.yr(e).forEach(r=>{t.ka.containsKey(r)||VI(t,r)})}function VI(t,e){t.Na.delete(e.path.canonicalString());const n=t.La.get(e);n!==null&&(H1(t.remoteStore,n),t.La=t.La.remove(e),t.Ba.delete(n),Q1(t))}function eS(t,e,n){for(const r of n)r instanceof kI?(t.ka.addReference(r.key,e),sB(t,r)):r instanceof DI?(de("SyncEngine","Document no longer in limbo: "+r.key),t.ka.removeReference(r.key,e),t.ka.containsKey(r.key)||VI(t,r.key)):Re()}function sB(t,e){const n=e.key,r=n.path.canonicalString();t.La.get(n)||t.Na.has(r)||(de("SyncEngine","New document in limbo: "+n),t.Na.add(r),Q1(t))}function Q1(t){for(;t.Na.size>0&&t.La.size<t.maxConcurrentLimboResolutions;){const e=t.Na.values().next().value;t.Na.delete(e);const n=new Ee(xt.fromString(e)),r=t.Ka.next();t.Ba.set(r,new Xz(n)),t.La=t.La.insert(n,r),PI(t.remoteStore,new no(ls(tI(n.path)),r,"TargetPurposeLimboResolution",Am.oe))}}async function LI(t,e,n){const r=Ge(t),i=[],s=[],o=[];r.xa.isEmpty()||(r.xa.forEach((a,l)=>{o.push(r.Ua(l,e,n).then(u=>{var h;if((u||n)&&r.isPrimaryClient){const f=u?!u.fromCache:(h=n==null?void 0:n.targetChanges.get(l.targetId))===null||h===void 0?void 0:h.current;r.sharedClientState.updateQueryState(l.targetId,f?"current":"not-current")}if(u){i.push(u);const f=U1.zi(l.targetId,u);s.push(f)}}))}),await Promise.all(o),r.Ma.R_(i),await async function(l,u){const h=Ge(l);try{await h.persistence.runTransaction("notifyLocalViewChanges","readwrite",f=>Z.forEach(u,d=>Z.forEach(d.Wi,p=>h.persistence.referenceDelegate.addReference(f,d.targetId,p)).next(()=>Z.forEach(d.Gi,p=>h.persistence.referenceDelegate.removeReference(f,d.targetId,p)))))}catch(f){if(!Cu(f))throw f;de("LocalStore","Failed to update sequence numbers: "+f)}for(const f of u){const d=f.targetId;if(!f.fromCache){const p=h.us.get(d),v=p.snapshotVersion,y=p.withLastLimboFreeSnapshotVersion(v);h.us=h.us.insert(d,y)}}}(r.localStore,s))}async function oB(t,e){const n=Ge(t);if(!n.currentUser.isEqual(e)){de("SyncEngine","User change. New user:",e.toKey());const r=await bI(n.localStore,e);n.currentUser=e,function(s,o){s.Qa.forEach(a=>{a.forEach(l=>{l.reject(new ce(ie.CANCELLED,o))})}),s.Qa.clear()}(n,"'waitForPendingWrites' promise is rejected due to a user change."),n.sharedClientState.handleUserChange(e,r.removedBatchIds,r.addedBatchIds),await LI(n,r.Ts)}}function aB(t,e){const n=Ge(t),r=n.Ba.get(e);if(r&&r.Fa)return Xe().add(r.key);{let i=Xe();const s=n.Oa.get(e);if(!s)return i;for(const o of s){const a=n.xa.get(o);i=i.unionWith(a.view.fa)}return i}}function OI(t){const e=Ge(t);return e.remoteStore.remoteSyncer.applyRemoteEvent=NI.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=aB.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=iB.bind(null,e),e.Ma.R_=qz.bind(null,e.eventManager),e.Ma.Wa=Kz.bind(null,e.eventManager),e}class jp{constructor(){this.kind="memory",this.synchronizeTabs=!1}async initialize(e){this.serializer=Om(e.databaseInfo.databaseId),this.sharedClientState=this.za(e),this.persistence=this.ja(e),await this.persistence.start(),this.localStore=this.Ha(e),this.gcScheduler=this.Ja(e,this.localStore),this.indexBackfillerScheduler=this.Ya(e,this.localStore)}Ja(e,n){return null}Ya(e,n){return null}Ha(e){return Tz(this.persistence,new wz,e.initialUser,this.serializer)}ja(e){return new EI(B1.ei,this.serializer)}za(e){return new Pz}async terminate(){var e,n;(e=this.gcScheduler)===null||e===void 0||e.stop(),(n=this.indexBackfillerScheduler)===null||n===void 0||n.stop(),this.sharedClientState.shutdown(),await this.persistence.shutdown()}}jp.provider={build:()=>new jp};class lB extends jp{constructor(e){super(),this.cacheSizeBytes=e}Ja(e,n){Dt(this.persistence.referenceDelegate instanceof Fp);const r=this.persistence.referenceDelegate.garbageCollector;return new sz(r,e.asyncQueue,n)}ja(e){const n=this.cacheSizeBytes!==void 0?Er.withCacheSize(this.cacheSizeBytes):Er.DEFAULT;return new EI(r=>Fp.ei(r,n),this.serializer)}}class rv{async initialize(e,n){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=r=>Zb(this.syncEngine,r,1),this.remoteStore.remoteSyncer.handleCredentialChange=oB.bind(null,this.syncEngine),await zz(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return function(){return new Uz}()}createDatastore(e){const n=Om(e.databaseInfo.databaseId),r=function(s){return new kz(s)}(e.databaseInfo);return function(s,o,a,l){return new Nz(s,o,a,l)}(e.authCredentials,e.appCheckCredentials,r,n)}createRemoteStore(e){return function(r,i,s,o,a){return new Lz(r,i,s,o,a)}(this.localStore,this.datastore,e.asyncQueue,n=>Zb(this.syncEngine,n,0),function(){return Kb.p()?new Kb:new Az}())}createSyncEngine(e,n){return function(i,s,o,a,l,u,h){const f=new Jz(i,s,o,a,l,u);return h&&(f.$a=!0),f}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,n)}async terminate(){var e,n;await async function(i){const s=Ge(i);de("RemoteStore","RemoteStore shutting down."),s.k_.add(5),await of(s),s.Q_.shutdown(),s.K_.set("Unknown")}(this.remoteStore),(e=this.datastore)===null||e===void 0||e.terminate(),(n=this.eventManager)===null||n===void 0||n.terminate()}}rv.provider={build:()=>new rv};/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class uB{constructor(e){this.observer=e,this.muted=!1}next(e){this.muted||this.observer.next&&this.Xa(this.observer.next,e)}error(e){this.muted||(this.observer.error?this.Xa(this.observer.error,e):Ms("Uncaught Error in snapshot listener:",e.toString()))}eu(){this.muted=!0}Xa(e,n){setTimeout(()=>{this.muted||e(n)},0)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class cB{constructor(e,n,r,i,s){this.authCredentials=e,this.appCheckCredentials=n,this.asyncQueue=r,this.databaseInfo=i,this.user=Bn.UNAUTHENTICATED,this.clientId=G$.newId(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this._uninitializedComponentsProvider=s,this.authCredentials.start(r,async o=>{de("FirestoreClient","Received user=",o.uid),await this.authCredentialListener(o),this.user=o}),this.appCheckCredentials.start(r,o=>(de("FirestoreClient","Received new app check token=",o),this.appCheckCredentialListener(o,this.user)))}get configuration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}terminate(){this.asyncQueue.enterRestrictedMode();const e=new ga;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){const r=II(n,"Failed to shutdown persistence");e.reject(r)}}),e.promise}}async function Jg(t,e){t.asyncQueue.verifyOperationInProgress(),de("FirestoreClient","Initializing OfflineComponentProvider");const n=t.configuration;await e.initialize(n);let r=n.initialUser;t.setCredentialChangeListener(async i=>{r.isEqual(i)||(await bI(e.localStore,i),r=i)}),e.persistence.setDatabaseDeletedListener(()=>t.terminate()),t._offlineComponents=e}async function tS(t,e){t.asyncQueue.verifyOperationInProgress();const n=await hB(t);de("FirestoreClient","Initializing OnlineComponentProvider"),await e.initialize(n,t.configuration),t.setCredentialChangeListener(r=>Yb(e.remoteStore,r)),t.setAppCheckTokenChangeListener((r,i)=>Yb(e.remoteStore,i)),t._onlineComponents=e}async function hB(t){if(!t._offlineComponents)if(t._uninitializedComponentsProvider){de("FirestoreClient","Using user provided OfflineComponentProvider");try{await Jg(t,t._uninitializedComponentsProvider._offline)}catch(e){const n=e;if(!function(i){return i.name==="FirebaseError"?i.code===ie.FAILED_PRECONDITION||i.code===ie.UNIMPLEMENTED:!(typeof DOMException<"u"&&i instanceof DOMException)||i.code===22||i.code===20||i.code===11}(n))throw n;tu("Error using user provided cache. Falling back to memory cache: "+n),await Jg(t,new jp)}}else de("FirestoreClient","Using default OfflineComponentProvider"),await Jg(t,new lB(void 0));return t._offlineComponents}async function fB(t){return t._onlineComponents||(t._uninitializedComponentsProvider?(de("FirestoreClient","Using user provided OnlineComponentProvider"),await tS(t,t._uninitializedComponentsProvider._online)):(de("FirestoreClient","Using default OnlineComponentProvider"),await tS(t,new rv))),t._onlineComponents}async function dB(t){const e=await fB(t),n=e.eventManager;return n.onListen=Zz.bind(null,e.syncEngine),n.onUnlisten=nB.bind(null,e.syncEngine),n.onFirstRemoteStoreListen=eB.bind(null,e.syncEngine),n.onLastRemoteStoreUnlisten=rB.bind(null,e.syncEngine),n}function pB(t,e,n={}){const r=new ga;return t.asyncQueue.enqueueAndForget(async()=>function(s,o,a,l,u){const h=new uB({next:d=>{h.eu(),o.enqueueAndForget(()=>Wz(s,f)),d.fromCache&&l.source==="server"?u.reject(new ce(ie.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):u.resolve(d)},error:d=>u.reject(d)}),f=new Gz(a,h,{includeMetadataChanges:!0,ua:!0});return Hz(s,f)}(await dB(t),t.asyncQueue,e,n,r)),r.promise}/** * @license * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function FI(t){const e={};return t.timeoutSeconds!==void 0&&(e.timeoutSeconds=t.timeoutSeconds),e}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const nS=new Map;/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function mB(t,e,n){if(!n)throw new ce(ie.INVALID_ARGUMENT,`Function ${t}() cannot be called with an empty ${e}.`)}function gB(t,e,n,r){if(e===!0&&r===!0)throw new ce(ie.INVALID_ARGUMENT,`${t} and ${n} cannot be used together.`)}function rS(t){if(Ee.isDocumentKey(t))throw new ce(ie.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${t} has ${t.length}.`)}function jm(t){if(t===void 0)return"undefined";if(t===null)return"null";if(typeof t=="string")return t.length>20&&(t=`${t.substring(0,20)}...`),JSON.stringify(t);if(typeof t=="number"||typeof t=="boolean")return""+t;if(typeof t=="object"){if(t instanceof Array)return"an array";{const e=function(r){return r.constructor?r.constructor.name:null}(t);return e?`a custom ${e} object`:"an object"}}return typeof t=="function"?"a function":Re()}function iv(t,e){if("_delegate"in t&&(t=t._delegate),!(t instanceof e)){if(e.name===t.constructor.name)throw new ce(ie.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{const n=jm(t);throw new ce(ie.INVALID_ARGUMENT,`Expected type '${e.name}', but it was: ${n}`)}}return t}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class iS{constructor(e){var n,r;if(e.host===void 0){if(e.ssl!==void 0)throw new ce(ie.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=(n=e.ssl)===null||n===void 0||n;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.localCache=e.localCache,e.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(e.cacheSizeBytes!==-1&&e.cacheSizeBytes<1048576)throw new ce(ie.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}gB("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:e.experimentalAutoDetectLongPolling===void 0?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=FI((r=e.experimentalLongPollingOptions)!==null&&r!==void 0?r:{}),function(s){if(s.timeoutSeconds!==void 0){if(isNaN(s.timeoutSeconds))throw new ce(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (must not be NaN)`);if(s.timeoutSeconds<5)throw new ce(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (minimum allowed value is 5)`);if(s.timeoutSeconds>30)throw new ce(ie.INVALID_ARGUMENT,`invalid long polling timeout: ${s.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&function(r,i){return r.timeoutSeconds===i.timeoutSeconds}(this.experimentalLongPollingOptions,e.experimentalLongPollingOptions)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class X1{constructor(e,n,r,i){this._authCredentials=e,this._appCheckCredentials=n,this._databaseId=r,this._app=i,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new iS({}),this._settingsFrozen=!1,this._terminateTask="notTerminated"}get app(){if(!this._app)throw new ce(ie.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return this._terminateTask!=="notTerminated"}_setSettings(e){if(this._settingsFrozen)throw new ce(ie.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new iS(e),e.credentials!==void 0&&(this._authCredentials=function(r){if(!r)return new $$;switch(r.type){case"firstParty":return new H$(r.sessionIndex||"0",r.iamToken||null,r.authTokenFactory||null);case"provider":return r.client;default:throw new ce(ie.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask==="notTerminated"&&(this._terminateTask=this._terminate()),this._terminateTask}async _restart(){this._terminateTask==="notTerminated"?await this._terminate():this._terminateTask="notTerminated"}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(n){const r=nS.get(n);r&&(de("ComponentProvider","Removing Datastore"),nS.delete(n),r.terminate())}(this),Promise.resolve()}}function yB(t,e,n,r={}){var i;const s=(t=iv(t,X1))._getSettings(),o=`${e}:${n}`;if(s.host!=="firestore.googleapis.com"&&s.host!==o&&tu("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),t._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let a,l;if(typeof r.mockUserToken=="string")a=r.mockUserToken,l=Bn.MOCK_USER;else{a=_6(r.mockUserToken,(i=t._app)===null||i===void 0?void 0:i.options.projectId);const u=r.mockUserToken.sub||r.mockUserToken.user_id;if(!u)throw new ce(ie.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");l=new Bn(u)}t._authCredentials=new z$(new q2(a,l))}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Fs{constructor(e,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=e}withConverter(e){return new Fs(this.firestore,e,this._query)}}class js{constructor(e,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new jl(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new js(this.firestore,e,this._key)}}class jl extends Fs{constructor(e,n,r){super(e,n,tI(r)),this._path=r,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){const e=this._path.popLast();return e.isEmpty()?null:new js(this.firestore,null,new Ee(e))}withConverter(e){return new jl(this.firestore,e,this._path)}}function jI(t,e,...n){if(t=Ph(t),mB("collection","path",e),t instanceof X1){const r=xt.fromString(e,...n);return rS(r),new jl(t,null,r)}{if(!(t instanceof js||t instanceof jl))throw new ce(ie.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");const r=t._path.child(xt.fromString(e,...n));return rS(r),new jl(t.firestore,null,r)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class sS{constructor(e=Promise.resolve()){this.Iu=[],this.Eu=!1,this.du=[],this.Au=null,this.Ru=!1,this.Vu=!1,this.mu=[],this.r_=new CI(this,"async_queue_retry"),this.fu=()=>{const r=Xg();r&&de("AsyncQueue","Visibility state changed to "+r.visibilityState),this.r_.Jo()},this.gu=e;const n=Xg();n&&typeof n.addEventListener=="function"&&n.addEventListener("visibilitychange",this.fu)}get isShuttingDown(){return this.Eu}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.pu(),this.yu(e)}enterRestrictedMode(e){if(!this.Eu){this.Eu=!0,this.Vu=e||!1;const n=Xg();n&&typeof n.removeEventListener=="function"&&n.removeEventListener("visibilitychange",this.fu)}}enqueue(e){if(this.pu(),this.Eu)return new Promise(()=>{});const n=new ga;return this.yu(()=>this.Eu&&this.Vu?Promise.resolve():(e().then(n.resolve,n.reject),n.promise)).then(()=>n.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Iu.push(e),this.wu()))}async wu(){if(this.Iu.length!==0){try{await this.Iu[0](),this.Iu.shift(),this.r_.reset()}catch(e){if(!Cu(e))throw e;de("AsyncQueue","Operation failed with retryable error: "+e)}this.Iu.length>0&&this.r_.jo(()=>this.wu())}}yu(e){const n=this.gu.then(()=>(this.Ru=!0,e().catch(r=>{this.Au=r,this.Ru=!1;const i=function(o){let a=o.message||"";return o.stack&&(a=o.stack.includes(o.message)?o.stack:o.message+` `+o.stack),a}(r);throw Ms("INTERNAL UNHANDLED ERROR: ",i),r}).then(r=>(this.Ru=!1,r))));return this.gu=n,n}enqueueAfterDelay(e,n,r){this.pu(),this.mu.indexOf(e)>-1&&(n=0);const i=G1.createAndSchedule(this,e,n,r,s=>this.Su(s));return this.du.push(i),i}pu(){this.Au&&Re()}verifyOperationInProgress(){}async bu(){let e;do e=this.gu,await e;while(e!==this.gu)}Du(e){for(const n of this.du)if(n.timerId===e)return!0;return!1}vu(e){return this.bu().then(()=>{this.du.sort((n,r)=>n.targetTimeMs-r.targetTimeMs);for(const n of this.du)if(n.skipDelay(),e!=="all"&&n.timerId===e)break;return this.bu()})}Cu(e){this.mu.push(e)}Su(e){const n=this.du.indexOf(e);this.du.splice(n,1)}}class $I extends X1{constructor(e,n,r,i){super(e,n,r,i),this.type="firestore",this._queue=new sS,this._persistenceKey=(i==null?void 0:i.name)||"[DEFAULT]"}async _terminate(){if(this._firestoreClient){const e=this._firestoreClient.terminate();this._queue=new sS(e),this._firestoreClient=void 0,await e}}}function vB(t,e){const n=typeof t=="object"?t:A$(),r=typeof t=="string"?t:"(default)",i=b$(n,"firestore").getImmediate({identifier:r});if(!i._initialized){const s=y6("firestore");s&&yB(i,...s)}return i}function _B(t){if(t._terminated)throw new ce(ie.FAILED_PRECONDITION,"The client has already been terminated.");return t._firestoreClient||wB(t),t._firestoreClient}function wB(t){var e,n,r;const i=t._freezeSettings(),s=function(a,l,u,h){return new o9(a,l,u,h.host,h.ssl,h.experimentalForceLongPolling,h.experimentalAutoDetectLongPolling,FI(h.experimentalLongPollingOptions),h.useFetchStreams)}(t._databaseId,((e=t._app)===null||e===void 0?void 0:e.options.appId)||"",t._persistenceKey,i);t._componentsProvider||!((n=i.localCache)===null||n===void 0)&&n._offlineComponentProvider&&(!((r=i.localCache)===null||r===void 0)&&r._onlineComponentProvider)&&(t._componentsProvider={_offline:i.localCache._offlineComponentProvider,_online:i.localCache._onlineComponentProvider}),t._firestoreClient=new cB(t._authCredentials,t._appCheckCredentials,t._queue,s,t._componentsProvider&&function(a){const l=a==null?void 0:a._online.build();return{_offline:a==null?void 0:a._offline.build(l),_online:l}}(t._componentsProvider))}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class lu{constructor(e){this._byteString=e}static fromBase64String(e){try{return new lu(Dn.fromBase64String(e))}catch(n){throw new ce(ie.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+n)}}static fromUint8Array(e){return new lu(Dn.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class zI{constructor(...e){for(let n=0;n<e.length;++n)if(e[n].length===0)throw new ce(ie.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new qn(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class BI{constructor(e){this._methodName=e}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class J1{constructor(e,n){if(!isFinite(e)||e<-90||e>90)throw new ce(ie.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(n)||n<-180||n>180)throw new ce(ie.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=e,this._long=n}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return Ke(this._lat,e._lat)||Ke(this._long,e._long)}}/** * @license * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Z1{constructor(e){this._values=(e||[]).map(n=>n)}toArray(){return this._values.map(e=>e)}isEqual(e){return function(r,i){if(r.length!==i.length)return!1;for(let s=0;s<r.length;++s)if(r[s]!==i[s])return!1;return!0}(this._values,e._values)}}/** * @license * Copyright 2017 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */const xB=/^__.*__$/;function UI(t){switch(t){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw Re()}}class ew{constructor(e,n,r,i,s,o){this.settings=e,this.databaseId=n,this.serializer=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Fu(),this.fieldTransforms=s||[],this.fieldMask=o||[]}get path(){return this.settings.path}get Mu(){return this.settings.Mu}xu(e){return new ew(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}Ou(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.xu({path:r,Nu:!1});return i.Lu(e),i}Bu(e){var n;const r=(n=this.path)===null||n===void 0?void 0:n.child(e),i=this.xu({path:r,Nu:!1});return i.Fu(),i}ku(e){return this.xu({path:void 0,Nu:!0})}qu(e){return sv(e,this.settings.methodName,this.settings.Qu||!1,this.path,this.settings.Ku)}contains(e){return this.fieldMask.find(n=>e.isPrefixOf(n))!==void 0||this.fieldTransforms.find(n=>e.isPrefixOf(n.field))!==void 0}Fu(){if(this.path)for(let e=0;e<this.path.length;e++)this.Lu(this.path.get(e))}Lu(e){if(e.length===0)throw this.qu("Document fields must not be empty");if(UI(this.Mu)&&xB.test(e))throw this.qu('Document fields cannot begin and end with "__"')}}class TB{constructor(e,n,r){this.databaseId=e,this.ignoreUndefinedProperties=n,this.serializer=r||Om(e)}$u(e,n,r,i=!1){return new ew({Mu:e,methodName:n,Ku:r,path:qn.emptyPath(),Nu:!1,Qu:i},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function HI(t){const e=t._freezeSettings(),n=Om(t._databaseId);return new TB(t._databaseId,!!e.ignoreUndefinedProperties,n)}function WI(t,e,n,r=!1){return tw(n,t.$u(r?4:3,e))}function tw(t,e){if(qI(t=Ph(t)))return bB("Unsupported field value:",e,t),EB(t,e);if(t instanceof BI)return function(r,i){if(!UI(i.Mu))throw i.qu(`${r._methodName}() can only be used with update() and set()`);if(!i.path)throw i.qu(`${r._methodName}() is not currently supported inside arrays`);const s=r._toFieldTransform(i);s&&i.fieldTransforms.push(s)}(t,e),null;if(t===void 0&&e.ignoreUndefinedProperties)return null;if(e.path&&e.fieldMask.push(e.path),t instanceof Array){if(e.settings.Nu&&e.Mu!==4)throw e.qu("Nested arrays are not supported");return function(r,i){const s=[];let o=0;for(const a of r){let l=tw(a,i.ku(o));l==null&&(l={nullValue:"NULL_VALUE"}),s.push(l),o++}return{arrayValue:{values:s}}}(t,e)}return function(r,i){if((r=Ph(r))===null)return{nullValue:"NULL_VALUE"};if(typeof r=="number")return A9(i.serializer,r);if(typeof r=="boolean")return{booleanValue:r};if(typeof r=="string")return{stringValue:r};if(r instanceof Date){const s=_n.fromDate(r);return{timestampValue:J0(i.serializer,s)}}if(r instanceof _n){const s=new _n(r.seconds,1e3*Math.floor(r.nanoseconds/1e3));return{timestampValue:J0(i.serializer,s)}}if(r instanceof J1)return{geoPointValue:{latitude:r.latitude,longitude:r.longitude}};if(r instanceof lu)return{bytesValue:mI(i.serializer,r._byteString)};if(r instanceof js){const s=i.databaseId,o=r.firestore._databaseId;if(!o.isEqual(s))throw i.qu(`Document reference is for database ${o.projectId}/${o.database} but should be for database ${s.projectId}/${s.database}`);return{referenceValue:gI(r.firestore._databaseId||i.databaseId,r._key.path)}}if(r instanceof Z1)return function(o,a){return{mapValue:{fields:{__type__:{stringValue:"__vector__"},value:{arrayValue:{values:o.toArray().map(l=>{if(typeof l!="number")throw a.qu("VectorValues must only contain numeric values.");return O1(a.serializer,l)})}}}}}}(r,i);throw i.qu(`Unsupported field value: ${jm(r)}`)}(t,e)}function EB(t,e){const n={};return K2(t)?e.path&&e.path.length>0&&e.fieldMask.push(e.path):Pu(t,(r,i)=>{const s=tw(i,e.Ou(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function qI(t){return!(typeof t!="object"||t===null||t instanceof Array||t instanceof Date||t instanceof _n||t instanceof J1||t instanceof lu||t instanceof js||t instanceof BI||t instanceof Z1)}function bB(t,e,n){if(!qI(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){const r=jm(n);throw r==="an object"?e.qu(t+" a custom object"):e.qu(t+" "+r)}}const SB=new RegExp("[~\\*/\\[\\]]");function CB(t,e,n){if(e.search(SB)>=0)throw sv(`Invalid field path (${e}). Paths must not contain '~', '*', '/', '[', or ']'`,t,!1,void 0,n);try{return new zI(...e.split("."))._internalPath}catch{throw sv(`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,t,!1,void 0,n)}}function sv(t,e,n,r,i){const s=r&&!r.isEmpty(),o=i!==void 0;let a=`Function ${e}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new ce(ie.INVALID_ARGUMENT,a+t+l)}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class nw{constructor(e,n,r,i,s){this._firestore=e,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}get id(){return this._key.path.lastSegment()}get ref(){return new js(this._firestore,this._converter,this._key)}exists(){return this._document!==null}data(){if(this._document){if(this._converter){const e=new PB(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){const n=this._document.data.field(rw("DocumentSnapshot.get",e));if(n!==null)return this._userDataWriter.convertValue(n)}}}class PB extends nw{data(){return super.data()}}function rw(t,e){return typeof e=="string"?CB(t,e):e instanceof zI?e._internalPath:e._delegate._internalPath}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */function AB(t){if(t.limitType==="L"&&t.explicitOrderBy.length===0)throw new ce(ie.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class iw{}class $m extends iw{}function oS(t,e,...n){let r=[];e instanceof iw&&r.push(e),r=r.concat(n),function(s){const o=s.filter(l=>l instanceof ow).length,a=s.filter(l=>l instanceof sw).length;if(o>1||o>0&&a>0)throw new ce(ie.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r);for(const i of r)t=i._apply(t);return t}class sw extends $m{constructor(e,n,r){super(),this._field=e,this._op=n,this._value=r,this.type="where"}static _create(e,n,r){return new sw(e,n,r)}_apply(e){const n=this._parse(e);return KI(e._query,n),new Fs(e.firestore,e.converter,G0(e._query,n))}_parse(e){const n=HI(e.firestore);return function(s,o,a,l,u,h,f){let d;if(u.isKeyField()){if(h==="array-contains"||h==="array-contains-any")throw new ce(ie.INVALID_ARGUMENT,`Invalid Query. You can't perform '${h}' queries on documentId().`);if(h==="in"||h==="not-in"){cS(f,h);const p=[];for(const v of f)p.push(uS(l,s,v));d={arrayValue:{values:p}}}else d=uS(l,s,f)}else h!=="in"&&h!=="not-in"&&h!=="array-contains-any"||cS(f,h),d=WI(a,o,f,h==="in"||h==="not-in");return nn.create(u,h,d)}(e._query,"where",n,e.firestore._databaseId,this._field,this._op,this._value)}}class ow extends iw{constructor(e,n){super(),this.type=e,this._queryConstraints=n}static _create(e,n){return new ow(e,n)}_parse(e){const n=this._queryConstraints.map(r=>r._parse(e)).filter(r=>r.getFilters().length>0);return n.length===1?n[0]:ji.create(n,this._getOperator())}_apply(e){const n=this._parse(e);return n.getFilters().length===0?e:(function(i,s){let o=i;const a=s.getFlattenedFilters();for(const l of a)KI(o,l),o=G0(o,l)}(e._query,n),new Fs(e.firestore,e.converter,G0(e._query,n)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return this.type==="and"?"and":"or"}}class aw extends $m{constructor(e,n){super(),this._field=e,this._direction=n,this.type="orderBy"}static _create(e,n){return new aw(e,n)}_apply(e){const n=function(i,s,o){if(i.startAt!==null)throw new ce(ie.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new ce(ie.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");return new Nh(s,o)}(e._query,this._field,this._direction);return new Fs(e.firestore,e.converter,function(i,s){const o=i.explicitOrderBy.concat([s]);return new $a(i.path,i.collectionGroup,o,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(e._query,n))}}function aS(t,e="asc"){const n=e,r=rw("orderBy",t);return aw._create(r,n)}class lw extends $m{constructor(e,n,r){super(),this.type=e,this._limit=n,this._limitType=r}static _create(e,n,r){return new lw(e,n,r)}_apply(e){return new Fs(e.firestore,e.converter,Vp(e._query,this._limit,this._limitType))}}function lS(t){return lw._create("limit",t,"F")}class uw extends $m{constructor(e,n,r){super(),this.type=e,this._docOrFields=n,this._inclusive=r}static _create(e,n,r){return new uw(e,n,r)}_apply(e){const n=IB(e,this.type,this._docOrFields,this._inclusive);return new Fs(e.firestore,e.converter,function(i,s){return new $a(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)}(e._query,n))}}function RB(...t){return uw._create("startAfter",t,!1)}function IB(t,e,n,r){if(n[0]=Ph(n[0]),n[0]instanceof nw)return function(s,o,a,l,u){if(!l)throw new ce(ie.NOT_FOUND,`Can't use a DocumentSnapshot that doesn't exist for ${a}().`);const h=[];for(const f of Ll(s))if(f.field.isKeyField())h.push(Np(o,l.key));else{const d=l.data.field(f.field);if(Im(d))throw new ce(ie.INVALID_ARGUMENT,'Invalid query. You are trying to start or end a query using a document for which the field "'+f.field+'" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');if(d===null){const p=f.field.canonicalString();throw new ce(ie.INVALID_ARGUMENT,`Invalid query. You are trying to start or end a query using a document for which the field '${p}' (used as the orderBy) does not exist.`)}h.push(d)}return new su(h,u)}(t._query,t.firestore._databaseId,e,n[0]._document,r);{const i=HI(t.firestore);return function(o,a,l,u,h,f){const d=o.explicitOrderBy;if(h.length>d.length)throw new ce(ie.INVALID_ARGUMENT,`Too many arguments provided to ${u}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);const p=[];for(let v=0;v<h.length;v++){const y=h[v];if(d[v].field.isKeyField()){if(typeof y!="string")throw new ce(ie.INVALID_ARGUMENT,`Invalid query. Expected a string for document ID in ${u}(), but got a ${typeof y}`);if(!L1(o)&&y.indexOf("/")!==-1)throw new ce(ie.INVALID_ARGUMENT,`Invalid query. When querying a collection and ordering by documentId(), the value passed to ${u}() must be a plain document ID, but '${y}' contains a slash.`);const C=o.path.child(xt.fromString(y));if(!Ee.isDocumentKey(C))throw new ce(ie.INVALID_ARGUMENT,`Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${u}() must result in a valid document path, but '${C}' is not because it contains an odd number of segments.`);const _=new Ee(C);p.push(Np(a,_))}else{const C=WI(l,u,y);p.push(C)}}return new su(p,f)}(t._query,t.firestore._databaseId,i,e,n,r)}}function uS(t,e,n){if(typeof(n=Ph(n))=="string"){if(n==="")throw new ce(ie.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!L1(e)&&n.indexOf("/")!==-1)throw new ce(ie.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);const r=e.path.child(xt.fromString(n));if(!Ee.isDocumentKey(r))throw new ce(ie.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return Np(t,new Ee(r))}if(n instanceof js)return Np(t,n._key);throw new ce(ie.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${jm(n)}.`)}function cS(t,e){if(!Array.isArray(t)||t.length===0)throw new ce(ie.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${e.toString()}' filters.`)}function KI(t,e){const n=function(i,s){for(const o of i)for(const a of o.getFlattenedFilters())if(s.indexOf(a.op)>=0)return a.op;return null}(t.filters,function(i){switch(i){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(e.op));if(n!==null)throw n===e.op?new ce(ie.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${e.op.toString()}' filter.`):new ce(ie.INVALID_ARGUMENT,`Invalid query. You cannot use '${e.op.toString()}' filters with '${n.toString()}' filters.`)}class kB{convertValue(e,n="none"){switch(Io(e)){case 0:return null;case 1:return e.booleanValue;case 2:return zt(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,n);case 5:return e.stringValue;case 6:return this.convertBytes(Ro(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,n);case 11:return this.convertObject(e.mapValue,n);case 10:return this.convertVectorValue(e.mapValue);default:throw Re()}}convertObject(e,n){return this.convertObjectMap(e.fields,n)}convertObjectMap(e,n="none"){const r={};return Pu(e,(i,s)=>{r[i]=this.convertValue(s,n)}),r}convertVectorValue(e){var n,r,i;const s=(i=(r=(n=e.fields)===null||n===void 0?void 0:n.value.arrayValue)===null||r===void 0?void 0:r.values)===null||i===void 0?void 0:i.map(o=>zt(o.doubleValue));return new Z1(s)}convertGeoPoint(e){return new J1(zt(e.latitude),zt(e.longitude))}convertArray(e,n){return(e.values||[]).map(r=>this.convertValue(r,n))}convertServerTimestamp(e,n){switch(n){case"previous":const r=km(e);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(kh(e));default:return null}}convertTimestamp(e){const n=Ao(e);return new _n(n.seconds,n.nanos)}convertDocumentKey(e,n){const r=xt.fromString(e);Dt(TI(r));const i=new Dh(r.get(1),r.get(3)),s=new Ee(r.popFirst(5));return i.isEqual(n)||Ms(`Document ${s} contains a document reference within a different database (${i.projectId}/${i.database}) which is not supported. It will be treated as a reference in the current database (${n.projectId}/${n.database}) instead.`),s}}/** * @license * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */class Qf{constructor(e,n){this.hasPendingWrites=e,this.fromCache=n}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class DB extends nw{constructor(e,n,r,i,s,o){super(e,n,r,i,o),this._firestore=e,this._firestoreImpl=e,this.metadata=s}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){const n=new $d(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(n,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,n={}){if(this._document){const r=this._document.data.field(rw("DocumentSnapshot.get",e));if(r!==null)return this._userDataWriter.convertValue(r,n.serverTimestamps)}}}class $d extends DB{data(e={}){return super.data(e)}}class MB{constructor(e,n,r,i){this._firestore=e,this._userDataWriter=n,this._snapshot=i,this.metadata=new Qf(i.hasPendingWrites,i.fromCache),this.query=r}get docs(){const e=[];return this.forEach(n=>e.push(n)),e}get size(){return this._snapshot.docs.size}get empty(){return this.size===0}forEach(e,n){this._snapshot.docs.forEach(r=>{e.call(n,new $d(this._firestore,this._userDataWriter,r.key,r,new Qf(this._snapshot.mutatedKeys.has(r.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){const n=!!e.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new ce(ie.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(i,s){if(i._snapshot.oldDocs.isEmpty()){let o=0;return i._snapshot.docChanges.map(a=>{const l=new $d(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Qf(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);return a.doc,{type:"added",doc:l,oldIndex:-1,newIndex:o++}})}{let o=i._snapshot.oldDocs;return i._snapshot.docChanges.filter(a=>s||a.type!==3).map(a=>{const l=new $d(i._firestore,i._userDataWriter,a.doc.key,a.doc,new Qf(i._snapshot.mutatedKeys.has(a.doc.key),i._snapshot.fromCache),i.query.converter);let u=-1,h=-1;return a.type!==0&&(u=o.indexOf(a.doc.key),o=o.delete(a.doc.key)),a.type!==1&&(o=o.add(a.doc),h=o.indexOf(a.doc.key)),{type:NB(a.type),doc:l,oldIndex:u,newIndex:h}})}}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges}}function NB(t){switch(t){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return Re()}}class VB extends kB{constructor(e){super(),this.firestore=e}convertBytes(e){return new lu(e)}convertReference(e){const n=this.convertDocumentKey(e,this.firestore._databaseId);return new js(this.firestore,null,n)}}function GI(t){t=iv(t,Fs);const e=iv(t.firestore,$I),n=_B(e),r=new VB(e);return AB(t._query),pB(n,t._query).then(i=>new MB(e,r,t,i))}(function(e,n=!0){(function(i){Su=i})(P$),Dp(new Ah("firestore",(r,{instanceIdentifier:i,options:s})=>{const o=r.getProvider("app").getImmediate(),a=new $I(new B$(r.getProvider("auth-internal")),new q$(r.getProvider("app-check-internal")),function(u,h){if(!Object.prototype.hasOwnProperty.apply(u.options,["projectId"]))throw new ce(ie.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new Dh(u.options.projectId,h)}(o,i),o);return s=Object.assign({useFetchStreams:n},s),a._setSettings(s),a},"PUBLIC").setMultipleInstances(!0)),Vl(Tb,"4.7.5",e),Vl(Tb,"4.7.5","esm2017")})();const LB={apiKey:"AIzaSyBOJBqKGPBdx6ZokTHJwJ8YIqYZTjE6skQ",authDomain:"cyfuse-c906e.firebaseapp.com",databaseURL:"https://cyfuse-c906e-default-rtdb.firebaseio.com",projectId:"cyfuse-c906e",storageBucket:"cyfuse-c906e.appspot.com",messagingSenderId:"586599557367",appId:"1:586599557367:web:d96a63d23f22efe4f30bf2",measurementId:"G-RSQVCSEBF9"},OB=O2(LB),YI=vB(OB);async function zm(t){const e=jI(YI,t);try{let r=(await GI(e)).docs.map(i=>({id:i.id,...i.data()}));return r=r.sort((i,s)=>(i.order_id||0)-(s.order_id||0)),r}catch(n){console.error(`Error fetching data from ${t}:`,n)}}async function hS(t,e,n){const r=jI(YI,t),i=n?oS(r,aS("Time"),RB(n),lS(e)):oS(r,aS("Time"),lS(e));try{const s=await GI(i),o=s.docs.map(l=>({id:l.id,...l.data()})),a=s.docs[s.docs.length-1]||null;return console.log(`Fetched ${o.length} documents from ${t}. Last visible:`,(a==null?void 0:a.id)||"None"),{data:o,lastDoc:a,empty:s.empty}}catch(s){throw console.error(`Error fetching paginated data from ${t}:`,s),s}}const Zg={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},FB={hidden:{opacity:0,y:20,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:"easeOut"}}},jB=()=>I.jsxs("div",{className:"flex flex-col bg-white/5 backdrop-blur-lg border border-white/10 rounded-2xl p-4 md:p-6 w-full sm:w-[45%] md:w-[30%] lg:w-[22%] animate-pulse",children:[I.jsx("div",{className:"flex-shrink-0 mb-4",children:I.jsx("div",{className:"w-full h-48 rounded-xl bg-gray-700"})}),I.jsxs("div",{className:"flex-1 space-y-3",children:[I.jsx("div",{className:"h-6 w-3/4 rounded bg-gray-700"}),I.jsx("div",{className:"h-4 w-full rounded bg-gray-700"}),I.jsx("div",{className:"h-4 w-1/2 rounded bg-gray-700"}),I.jsx("div",{className:"h-4 w-2/3 rounded bg-gray-700"}),I.jsx("div",{className:"h-4 w-1/3 rounded bg-gray-700"})]})]}),ey=({events:t})=>I.jsx(I.Fragment,{children:t.length?I.jsx("div",{className:"flex flex-wrap justify-center gap-6 px-4",children:t.map(e=>I.jsxs(me.div,{variants:FB,className:"flex flex-col bg-white/5 backdrop-blur-lg border border-white/10 rounded-2xl p-4 md:p-6 w-full sm:w-[45%] md:w-[30%] lg:w-[22%] shadow-lg hover:shadow-xl hover:border-purple-500/30 transition-all duration-300 hover:-rotate-1",children:[I.jsx("div",{className:"flex-shrink-0 mb-4",children:I.jsx("img",{src:e.Picture||"https://blocks.astratic.com/img/general-img-portrait.png",alt:e.Title,className:"w-full h-48 rounded-xl object-cover border border-white/10"})}),I.jsxs("div",{className:"flex-1",children:[I.jsx("h3",{className:"text-xl font-semibold mb-3 bg-clip-text text-transparent bg-gradient-to-r from-purple-300 to-pink-400",children:e.Title}),I.jsxs("p",{className:"text-gray-300 mb-2 text-sm leading-relaxed",children:[I.jsx("strong",{className:"text-white",children:"Description:"})," ",e.Description]}),I.jsxs("p",{className:"text-gray-300 mb-2 text-sm",children:[I.jsx("strong",{className:"text-white",children:"Venue:"})," ",e.Venue]}),I.jsxs("p",{className:"text-gray-300 mb-2 text-sm",children:[I.jsx("strong",{className:"text-white",children:"Date:"})," ",new Date(e.Time.seconds*1e3).toLocaleString().split(",")[0]]}),I.jsxs("p",{className:"text-gray-300 mb-2 text-sm",children:[I.jsx("strong",{className:"text-white",children:"Status:"})," ",e.Status]}),e.Registration&&e.Registration!=="OVER"?I.jsxs("p",{className:"text-gray-300 text-sm",children:[I.jsx("strong",{className:"text-white",children:"Registration:"})," ",I.jsx("a",{href:e.Registration,target:"_blank",rel:"noopener noreferrer",className:"text-purple-400 underline hover:text-pink-400 transition",children:"Register here"})]}):null]})]},e.id))}):I.jsx(me.p,{className:"text-center text-gray-400 text-lg",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:"No events in this category."})});function $B(){let t=.2;window.innerWidth<768&&(t=.001);const[n,r]=N.useState(!0),[i,s]=N.useState(null),[o,a]=N.useState([]),[l,u]=N.useState([]),[h,f]=N.useState([]),[d,p]=N.useState(!1),[v,y]=N.useState(1),[C,_]=N.useState(!0),[w,T]=N.useState([null]),k=8,P=()=>{const R=document.getElementById("events-section");R&&R.scrollIntoView({behavior:"smooth"})},V=async R=>{p(!0);try{const b=w[R-1]||null;let q=[],z=b,ee=b;for(;q.length<R*k;){const{data:O,lastDoc:H,empty:se}=await hS("events",k,z),ue=O.filter(he=>he.Status==="Completed");if(q=[...q,...ue],ee=H,z=H,se)break}const J=(R-1)*k,B=q.slice(J,J+k);f(B);let Q=0,L=b;for(;Q<R*k;){const{data:O,lastDoc:H}=await hS("Announcements",k,L),se=O.filter(ue=>ue.Status==="Completed");if(Q+=se.length,L=H,!H)break}T(O=>{const H=[...O];return H[R]=L||null,H}),_(q.length>R*k),y(R),P(),s(null)}catch(b){console.error("Error fetching past events page:",b),s("Failed to load past events. Please try again later.")}finally{p(!1),r(!1)}};N.useEffect(()=>{(async()=>{try{r(!0);const b=await zm("Announcements");a(b.filter(q=>q.Status==="upcoming")),u(b.filter(q=>q.Status==="live")),await V(1)}catch(b){console.error(b),s("Failed to fetch events. Please try again later."),r(!1)}})()},[]);const S=()=>{C&&V(v+1)},m=()=>{v!==1&&V(v-1)},E=()=>{v!==1&&V(1)},A=()=>{C&&V(v+1)},D=()=>{const R=[];let q=Math.max(1,v-1),z=q+3-1;!C&&z>v&&(z=v);for(let ee=q;ee<=z;ee++)R.push(I.jsx("button",{onClick:()=>{if(ee!==v){if(ee<v)return m();if(ee>v)return S()}},disabled:d,className:`px-4 py-2 rounded-full text-sm font-medium transition duration-300 ${v===ee?"bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-lg":d?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-white/5 text-gray-300 hover:bg-white/10"}`,children:ee},ee));return I.jsxs("div",{className:"flex justify-center items-center gap-2 mt-8",children:[I.jsx("button",{onClick:E,disabled:v===1||d,className:`px-4 py-2 rounded-full text-sm font-medium transition duration-300 ${v===1||d?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-white/5 text-gray-300 hover:bg-white/10"}`,children:"First"}),I.jsx("button",{onClick:m,disabled:v===1||d,className:`px-4 py-2 rounded-full text-sm font-medium transition duration-300 ${v===1||d?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-white/5 text-gray-300 hover:bg-white/10"}`,children:"Prev"}),R,I.jsx("button",{onClick:S,disabled:!C||d,className:`px-4 py-2 rounded-full text-sm font-medium transition duration-300 ${!C||d?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-white/5 text-gray-300 hover:bg-white/10"}`,children:"Next"}),I.jsx("button",{onClick:A,disabled:!C||d,className:`px-4 py-2 rounded-full text-sm font-medium transition duration-300 ${!C||d?"bg-gray-700 text-gray-500 cursor-not-allowed":"bg-white/5 text-gray-300 hover:bg-white/10"}`,children:"Last"})]})};return n?I.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-950",children:I.jsx(me.p,{className:"text-white text-xl",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:"Loading events..."})}):i?I.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-950",children:I.jsx(me.p,{className:"text-center text-red-500 text-lg",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:i})}):I.jsxs("div",{id:"events-section",className:"relative min-h-screen text-white font-sans py-16 px-6 md:px-16 lg:px-24 overflow-hidden",children:[I.jsx(me.div,{className:"absolute inset-0 z-0",style:{background:"radial-gradient(circle at 50% 50%, #2a1a5e 0%, #0a0a0a 70%)"},animate:{background:["radial-gradient(circle at 50% 50%, #2a1a5e 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 30%, #3b2a8b 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 60%, #2a1a5e 0%, #0a0a0a 70%)"]},transition:{duration:15,repeat:1/0,ease:"linear"},children:I.jsx(me.div,{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.15) 1px, transparent 0)",backgroundSize:"40px 40px",filter:"blur(1px)"},animate:{opacity:[.4,.6,.4],scale:[1,1.02,1]},transition:{duration:5,repeat:1/0,ease:"easeInOut"}})}),I.jsxs("header",{className:"relative z-10 text-center my-24",children:[I.jsx(me.h1,{className:"text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-white to-purple-400",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.6},children:"Events"}),I.jsx(me.p,{className:"mt-4 text-lg md:text-2xl text-gray-300",initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.5},children:"Discover what's happening at CyFuse"})]}),I.jsxs(me.section,{variants:Zg,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"relative z-10 mb-20 w-full px-2 sm:px-4",children:[I.jsx("h2",{className:"text-4xl font-bold mb-10 text-center",children:"Upcoming Events"}),I.jsx(ey,{events:o})]}),I.jsxs(me.section,{variants:Zg,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"relative z-10 mb-20",children:[I.jsx("h2",{className:"text-4xl font-bold mb-10 text-center",children:"Live Events"}),I.jsx(ey,{events:l})]}),I.jsxs(me.section,{variants:Zg,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:t},className:"relative z-10 mb-20",children:[I.jsx("h2",{className:"text-4xl font-bold mb-10 text-center",children:"Past Events"}),d?I.jsx("div",{className:"flex flex-wrap justify-center gap-6 px-4",children:Array.from({length:k}).map((R,b)=>I.jsx(jB,{},b))}):I.jsx(ey,{events:h}),D()]})]})}function zB(){return I.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-900 text-white",children:[I.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Event Detail"}),I.jsx("p",{className:"text-lg",children:"Details about the selected event will be displayed here."})]})}function ys(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function QI(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*! * GSAP 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var ei={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},uu={duration:.5,overwrite:!1,delay:0},cw,In,Tt,yi=1e8,ht=1/yi,ov=Math.PI*2,BB=ov/4,UB=0,XI=Math.sqrt,HB=Math.cos,WB=Math.sin,wn=function(e){return typeof e=="string"},Ft=function(e){return typeof e=="function"},Ns=function(e){return typeof e=="number"},hw=function(e){return typeof e>"u"},hs=function(e){return typeof e=="object"},Ir=function(e){return e!==!1},fw=function(){return typeof window<"u"},Xf=function(e){return Ft(e)||wn(e)},JI=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Qn=Array.isArray,av=/(?:-?\.?\d|\.)+/gi,ZI=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,bl=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,ty=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ek=/[+-]=-?[.\d]+/,tk=/[^,'"\[\]\s]+/gi,qB=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Pt,Ki,lv,dw,ni={},$p={},nk,rk=function(e){return($p=cu(e,ni))&&Vr},pw=function(e,n){return console.warn("Invalid property",e,"set to",n,"Missing plugin? gsap.registerPlugin()")},Vh=function(e,n){return!n&&console.warn(e)},ik=function(e,n){return e&&(ni[e]=n)&&$p&&($p[e]=n)||ni},Lh=function(){return 0},KB={suppressEvents:!0,isStart:!0,kill:!1},zd={suppressEvents:!0,kill:!1},GB={suppressEvents:!0},mw={},_o=[],uv={},sk,Kr={},ny={},fS=30,Bd=[],gw="",yw=function(e){var n=e[0],r,i;if(hs(n)||Ft(n)||(e=[e]),!(r=(n._gsap||{}).harness)){for(i=Bd.length;i--&&!Bd[i].targetTest(n););r=Bd[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new Rk(e[i],r)))||e.splice(i,1);return e},va=function(e){return e._gsap||yw(vi(e))[0]._gsap},ok=function(e,n,r){return(r=e[n])&&Ft(r)?e[n]():hw(r)&&e.getAttribute&&e.getAttribute(n)||r},kr=function(e,n){return(e=e.split(",")).forEach(n)||e},Bt=function(e){return Math.round(e*1e5)/1e5||0},en=function(e){return Math.round(e*1e7)/1e7||0},$l=function(e,n){var r=n.charAt(0),i=parseFloat(n.substr(2));return e=parseFloat(e),r==="+"?e+i:r==="-"?e-i:r==="*"?e*i:e/i},YB=function(e,n){for(var r=n.length,i=0;e.indexOf(n[i])<0&&++i<r;);return i<r},zp=function(){var e=_o.length,n=_o.slice(0),r,i;for(uv={},_o.length=0,r=0;r<e;r++)i=n[r],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},vw=function(e){return!!(e._initted||e._startAt||e.add)},ak=function(e,n,r,i){_o.length&&!In&&zp(),e.render(n,r,!!(In&&n<0&&vw(e))),_o.length&&!In&&zp()},lk=function(e){var n=parseFloat(e);return(n||n===0)&&(e+"").match(tk).length<2?n:wn(e)?e.trim():e},uk=function(e){return e},ri=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},QB=function(e){return function(n,r){for(var i in r)i in n||i==="duration"&&e||i==="ease"||(n[i]=r[i])}},cu=function(e,n){for(var r in n)e[r]=n[r];return e},dS=function t(e,n){for(var r in n)r!=="__proto__"&&r!=="constructor"&&r!=="prototype"&&(e[r]=hs(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},Bp=function(e,n){var r={},i;for(i in e)i in n||(r[i]=e[i]);return r},zc=function(e){var n=e.parent||Pt,r=e.keyframes?QB(Qn(e.keyframes)):ri;if(Ir(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},XB=function(e,n){for(var r=e.length,i=r===n.length;i&&r--&&e[r]===n[r];);return r<0},ck=function(e,n,r,i,s){var o=e[i],a;if(s)for(a=n[s];o&&o[s]>a;)o=o._prev;return o?(n._next=o._next,o._next=n):(n._next=e[r],e[r]=n),n._next?n._next._prev=n:e[i]=n,n._prev=o,n.parent=n._dp=e,n},Bm=function(e,n,r,i){r===void 0&&(r="_first"),i===void 0&&(i="_last");var s=n._prev,o=n._next;s?s._next=o:e[r]===n&&(e[r]=o),o?o._prev=s:e[i]===n&&(e[i]=s),n._next=n._prev=n.parent=null},Do=function(e,n){e.parent&&(!n||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},_a=function(e,n){if(e&&(!n||n._end>e._dur||n._start<0))for(var r=e;r;)r._dirty=1,r=r.parent;return e},JB=function(e){for(var n=e.parent;n&&n.parent;)n._dirty=1,n.totalDuration(),n=n.parent;return e},cv=function(e,n,r,i){return e._startAt&&(In?e._startAt.revert(zd):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(n,!0,i))},ZB=function t(e){return!e||e._ts&&t(e.parent)},pS=function(e){return e._repeat?hu(e._tTime,e=e.duration()+e._rDelay)*e:0},hu=function(e,n){var r=Math.floor(e=en(e/n));return e&&r===e?r-1:r},Up=function(e,n){return(e-n._start)*n._ts+(n._ts>=0?0:n._dirty?n.totalDuration():n._tDur)},Um=function(e){return e._end=en(e._start+(e._tDur/Math.abs(e._ts||e._rts||ht)||0))},Hm=function(e,n){var r=e._dp;return r&&r.smoothChildTiming&&e._ts&&(e._start=en(r._time-(e._ts>0?n/e._ts:((e._dirty?e.totalDuration():e._tDur)-n)/-e._ts)),Um(e),r._dirty||_a(r,e)),e},hk=function(e,n){var r;if((n._time||!n._dur&&n._initted||n._start<e._time&&(n._dur||!n.add))&&(r=Up(e.rawTime(),n),(!n._dur||lf(0,n.totalDuration(),r)-n._tTime>ht)&&n.render(r,!0)),_a(e,n)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(r=e;r._dp;)r.rawTime()>=0&&r.totalTime(r._tTime),r=r._dp;e._zTime=-ht}},Xi=function(e,n,r,i){return n.parent&&Do(n),n._start=en((Ns(r)?r:r||e!==Pt?li(e,r,n):e._time)+n._delay),n._end=en(n._start+(n.totalDuration()/Math.abs(n.timeScale())||0)),ck(e,n,"_first","_last",e._sort?"_start":0),hv(n)||(e._recent=n),i||hk(e,n),e._ts<0&&Hm(e,e._tTime),e},fk=function(e,n){return(ni.ScrollTrigger||pw("scrollTrigger",n))&&ni.ScrollTrigger.create(n,e)},dk=function(e,n,r,i,s){if(ww(e,n,s),!e._initted)return 1;if(!r&&e._pt&&!In&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&sk!==Yr.frame)return _o.push(e),e._lazy=[s,i],1},eU=function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))},hv=function(e){var n=e.data;return n==="isFromStart"||n==="isStart"},tU=function(e,n,r,i){var s=e.ratio,o=n<0||!n&&(!e._start&&eU(e)&&!(!e._initted&&hv(e))||(e._ts<0||e._dp._ts<0)&&!hv(e))?0:1,a=e._rDelay,l=0,u,h,f;if(a&&e._repeat&&(l=lf(0,e._tDur,n),h=hu(l,a),e._yoyo&&h&1&&(o=1-o),h!==hu(e._tTime,a)&&(s=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==s||In||i||e._zTime===ht||!n&&e._zTime){if(!e._initted&&dk(e,n,i,r,l))return;for(f=e._zTime,e._zTime=n||(r?ht:0),r||(r=n&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;n<0&&cv(e,n,r,!0),e._onUpdate&&!r&&Jr(e,"onUpdate"),l&&e._repeat&&!r&&e.parent&&Jr(e,"onRepeat"),(n>=e._tDur||n<0)&&e.ratio===o&&(o&&Do(e,1),!r&&!In&&(Jr(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=n)},nU=function(e,n,r){var i;if(r>n)for(i=e._first;i&&i._start<=r;){if(i.data==="isPause"&&i._start>n)return i;i=i._next}else for(i=e._last;i&&i._start>=r;){if(i.data==="isPause"&&i._start<n)return i;i=i._prev}},fu=function(e,n,r,i){var s=e._repeat,o=en(n)||0,a=e._tTime/e._tDur;return a&&!i&&(e._time*=o/e._dur),e._dur=o,e._tDur=s?s<0?1e10:en(o*(s+1)+e._rDelay*s):o,a>0&&!i&&Hm(e,e._tTime=e._tDur*a),e.parent&&Um(e),r||_a(e.parent,e),e},mS=function(e){return e instanceof fr?_a(e):fu(e,e._dur)},rU={_start:0,endTime:Lh,totalDuration:Lh},li=function t(e,n,r){var i=e.labels,s=e._recent||rU,o=e.duration()>=yi?s.endTime(!1):e._dur,a,l,u;return wn(n)&&(isNaN(n)||n in i)?(l=n.charAt(0),u=n.substr(-1)==="%",a=n.indexOf("="),l==="<"||l===">"?(a>=0&&(n=n.replace(/=/,"")),(l==="<"?s._start:s.endTime(s._repeat>=0))+(parseFloat(n.substr(1))||0)*(u?(a<0?s:r).totalDuration()/100:1)):a<0?(n in i||(i[n]=o),i[n]):(l=parseFloat(n.charAt(a-1)+n.substr(a+1)),u&&r&&(l=l/100*(Qn(r)?r[0]:r).totalDuration()),a>1?t(e,n.substr(0,a-1),r)+l:o+l)):n==null?o:+n},Bc=function(e,n,r){var i=Ns(n[1]),s=(i?2:1)+(e<2?0:1),o=n[s],a,l;if(i&&(o.duration=n[1]),o.parent=r,e){for(a=o,l=r;l&&!("immediateRender"in a);)a=l.vars.defaults||{},l=Ir(l.vars.inherit)&&l.parent;o.immediateRender=Ir(a.immediateRender),e<2?o.runBackwards=1:o.startAt=n[s-1]}return new Zt(n[0],o,n[s+1])},$o=function(e,n){return e||e===0?n(e):n},lf=function(e,n,r){return r<e?e:r>n?n:r},Kn=function(e,n){return!wn(e)||!(n=qB.exec(e))?"":n[1]},iU=function(e,n,r){return $o(r,function(i){return lf(e,n,i)})},fv=[].slice,pk=function(e,n){return e&&hs(e)&&"length"in e&&(!n&&!e.length||e.length-1 in e&&hs(e[0]))&&!e.nodeType&&e!==Ki},sU=function(e,n,r){return r===void 0&&(r=[]),e.forEach(function(i){var s;return wn(i)&&!n||pk(i,1)?(s=r).push.apply(s,vi(i)):r.push(i)})||r},vi=function(e,n,r){return Tt&&!n&&Tt.selector?Tt.selector(e):wn(e)&&!r&&(lv||!du())?fv.call((n||dw).querySelectorAll(e),0):Qn(e)?sU(e,r):pk(e)?fv.call(e,0):e?[e]:[]},dv=function(e){return e=vi(e)[0]||Vh("Invalid scope")||{},function(n){var r=e.current||e.nativeElement||e;return vi(n,r.querySelectorAll?r:r===e?Vh("Invalid scope")||dw.createElement("div"):e)}},mk=function(e){return e.sort(function(){return .5-Math.random()})},gk=function(e){if(Ft(e))return e;var n=hs(e)?e:{each:e},r=wa(n.ease),i=n.from||0,s=parseFloat(n.base)||0,o={},a=i>0&&i<1,l=isNaN(i)||a,u=n.axis,h=i,f=i;return wn(i)?h=f={center:.5,edges:.5,end:1}[i]||0:!a&&l&&(h=i[0],f=i[1]),function(d,p,v){var y=(v||n).length,C=o[y],_,w,T,k,P,V,S,m,E;if(!C){if(E=n.grid==="auto"?0:(n.grid||[1,yi])[1],!E){for(S=-yi;S<(S=v[E++].getBoundingClientRect().left)&&E<y;);E<y&&E--}for(C=o[y]=[],_=l?Math.min(E,y)*h-.5:i%E,w=E===yi?0:l?y*f/E-.5:i/E|0,S=0,m=yi,V=0;V<y;V++)T=V%E-_,k=w-(V/E|0),C[V]=P=u?Math.abs(u==="y"?k:T):XI(T*T+k*k),P>S&&(S=P),P<m&&(m=P);i==="random"&&mk(C),C.max=S-m,C.min=m,C.v=y=(parseFloat(n.amount)||parseFloat(n.each)*(E>y?y-1:u?u==="y"?y/E:E:Math.max(E,y/E))||0)*(i==="edges"?-1:1),C.b=y<0?s-y:s,C.u=Kn(n.amount||n.each)||0,r=r&&y<0?Ck(r):r}return y=(C[d]-C.min)/C.max||0,en(C.b+(r?r(y):y)*C.v)+C.u}},pv=function(e){var n=Math.pow(10,((e+"").split(".")[1]||"").length);return function(r){var i=en(Math.round(parseFloat(r)/e)*e*n);return(i-i%1)/n+(Ns(r)?0:Kn(r))}},yk=function(e,n){var r=Qn(e),i,s;return!r&&hs(e)&&(i=r=e.radius||yi,e.values?(e=vi(e.values),(s=!Ns(e[0]))&&(i*=i)):e=pv(e.increment)),$o(n,r?Ft(e)?function(o){return s=e(o),Math.abs(s-o)<=i?s:o}:function(o){for(var a=parseFloat(s?o.x:o),l=parseFloat(s?o.y:0),u=yi,h=0,f=e.length,d,p;f--;)s?(d=e[f].x-a,p=e[f].y-l,d=d*d+p*p):d=Math.abs(e[f]-a),d<u&&(u=d,h=f);return h=!i||u<=i?e[h]:o,s||h===o||Ns(o)?h:h+Kn(o)}:pv(e))},vk=function(e,n,r,i){return $o(Qn(e)?!n:r===!0?!!(r=0):!i,function(){return Qn(e)?e[~~(Math.random()*e.length)]:(r=r||1e-5)&&(i=r<1?Math.pow(10,(r+"").length-2):1)&&Math.floor(Math.round((e-r/2+Math.random()*(n-e+r*.99))/r)*r*i)/i})},oU=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(i){return n.reduce(function(s,o){return o(s)},i)}},aU=function(e,n){return function(r){return e(parseFloat(r))+(n||Kn(r))}},lU=function(e,n,r){return wk(e,n,0,1,r)},_k=function(e,n,r){return $o(r,function(i){return e[~~n(i)]})},uU=function t(e,n,r){var i=n-e;return Qn(e)?_k(e,t(0,e.length),n):$o(r,function(s){return(i+(s-e)%i)%i+e})},cU=function t(e,n,r){var i=n-e,s=i*2;return Qn(e)?_k(e,t(0,e.length-1),n):$o(r,function(o){return o=(s+(o-e)%s)%s||0,e+(o>i?s-o:o)})},Oh=function(e){for(var n=0,r="",i,s,o,a;~(i=e.indexOf("random(",n));)o=e.indexOf(")",i),a=e.charAt(i+7)==="[",s=e.substr(i+7,o-i-7).match(a?tk:av),r+=e.substr(n,i-n)+vk(a?s:+s[0],a?0:+s[1],+s[2]||1e-5),n=o+1;return r+e.substr(n,e.length-n)},wk=function(e,n,r,i,s){var o=n-e,a=i-r;return $o(s,function(l){return r+((l-e)/o*a||0)})},hU=function t(e,n,r,i){var s=isNaN(e+n)?0:function(p){return(1-p)*e+p*n};if(!s){var o=wn(e),a={},l,u,h,f,d;if(r===!0&&(i=1)&&(r=null),o)e={p:e},n={p:n};else if(Qn(e)&&!Qn(n)){for(h=[],f=e.length,d=f-2,u=1;u<f;u++)h.push(t(e[u-1],e[u]));f--,s=function(v){v*=f;var y=Math.min(d,~~v);return h[y](v-y)},r=n}else i||(e=cu(Qn(e)?[]:{},e));if(!h){for(l in n)_w.call(a,e,l,"get",n[l]);s=function(v){return Ew(v,a)||(o?e.p:e)}}}return $o(r,s)},gS=function(e,n,r){var i=e.labels,s=yi,o,a,l;for(o in i)a=i[o]-n,a<0==!!r&&a&&s>(a=Math.abs(a))&&(l=o,s=a);return l},Jr=function(e,n,r){var i=e.vars,s=i[n],o=Tt,a=e._ctx,l,u,h;if(s)return l=i[n+"Params"],u=i.callbackScope||e,r&&_o.length&&zp(),a&&(Tt=a),h=l?s.apply(u,l):s.call(u),Tt=o,h},gc=function(e){return Do(e),e.scrollTrigger&&e.scrollTrigger.kill(!!In),e.progress()<1&&Jr(e,"onInterrupt"),e},Sl,xk=[],Tk=function(e){if(e)if(e=!e.name&&e.default||e,fw()||e.headless){var n=e.name,r=Ft(e),i=n&&!r&&e.init?function(){this._props=[]}:e,s={init:Lh,render:Ew,add:_w,kill:PU,modifier:CU,rawVars:0},o={targetTest:0,get:0,getSetter:Tw,aliases:{},register:0};if(du(),e!==i){if(Kr[n])return;ri(i,ri(Bp(e,s),o)),cu(i.prototype,cu(s,Bp(e,o))),Kr[i.prop=n]=i,e.targetTest&&(Bd.push(i),mw[n]=1),n=(n==="css"?"CSS":n.charAt(0).toUpperCase()+n.substr(1))+"Plugin"}ik(n,i),e.register&&e.register(Vr,i,Dr)}else xk.push(e)},ct=255,yc={aqua:[0,ct,ct],lime:[0,ct,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ct],navy:[0,0,128],white:[ct,ct,ct],olive:[128,128,0],yellow:[ct,ct,0],orange:[ct,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ct,0,0],pink:[ct,192,203],cyan:[0,ct,ct],transparent:[ct,ct,ct,0]},ry=function(e,n,r){return e+=e<0?1:e>1?-1:0,(e*6<1?n+(r-n)*e*6:e<.5?r:e*3<2?n+(r-n)*(2/3-e)*6:n)*ct+.5|0},Ek=function(e,n,r){var i=e?Ns(e)?[e>>16,e>>8&ct,e&ct]:0:yc.black,s,o,a,l,u,h,f,d,p,v;if(!i){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),yc[e])i=yc[e];else if(e.charAt(0)==="#"){if(e.length<6&&(s=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+s+s+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return i=parseInt(e.substr(1,6),16),[i>>16,i>>8&ct,i&ct,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),i=[e>>16,e>>8&ct,e&ct]}else if(e.substr(0,3)==="hsl"){if(i=v=e.match(av),!n)l=+i[0]%360/360,u=+i[1]/100,h=+i[2]/100,o=h<=.5?h*(u+1):h+u-h*u,s=h*2-o,i.length>3&&(i[3]*=1),i[0]=ry(l+1/3,s,o),i[1]=ry(l,s,o),i[2]=ry(l-1/3,s,o);else if(~e.indexOf("="))return i=e.match(ZI),r&&i.length<4&&(i[3]=1),i}else i=e.match(av)||yc.transparent;i=i.map(Number)}return n&&!v&&(s=i[0]/ct,o=i[1]/ct,a=i[2]/ct,f=Math.max(s,o,a),d=Math.min(s,o,a),h=(f+d)/2,f===d?l=u=0:(p=f-d,u=h>.5?p/(2-f-d):p/(f+d),l=f===s?(o-a)/p+(o<a?6:0):f===o?(a-s)/p+2:(s-o)/p+4,l*=60),i[0]=~~(l+.5),i[1]=~~(u*100+.5),i[2]=~~(h*100+.5)),r&&i.length<4&&(i[3]=1),i},bk=function(e){var n=[],r=[],i=-1;return e.split(wo).forEach(function(s){var o=s.match(bl)||[];n.push.apply(n,o),r.push(i+=o.length+1)}),n.c=r,n},yS=function(e,n,r){var i="",s=(e+i).match(wo),o=n?"hsla(":"rgba(",a=0,l,u,h,f;if(!s)return e;if(s=s.map(function(d){return(d=Ek(d,n,1))&&o+(n?d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:d.join(","))+")"}),r&&(h=bk(e),l=r.c,l.join(i)!==h.c.join(i)))for(u=e.replace(wo,"1").split(bl),f=u.length-1;a<f;a++)i+=u[a]+(~l.indexOf(a)?s.shift()||o+"0,0,0,0)":(h.length?h:s.length?s:r).shift());if(!u)for(u=e.split(wo),f=u.length-1;a<f;a++)i+=u[a]+s[a];return i+u[f]},wo=function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in yc)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),fU=/hsl[a]?\(/,Sk=function(e){var n=e.join(" "),r;if(wo.lastIndex=0,wo.test(n))return r=fU.test(n),e[1]=yS(e[1],r),e[0]=yS(e[0],r,bk(e[1])),!0},Fh,Yr=function(){var t=Date.now,e=500,n=33,r=t(),i=r,s=1e3/240,o=s,a=[],l,u,h,f,d,p,v=function y(C){var _=t()-i,w=C===!0,T,k,P,V;if((_>e||_<0)&&(r+=_-n),i+=_,P=i-r,T=P-o,(T>0||w)&&(V=++f.frame,d=P-f.time*1e3,f.time=P=P/1e3,o+=T+(T>=s?4:s-T),k=1),w||(l=u(y)),k)for(p=0;p<a.length;p++)a[p](P,d,V,C)};return f={time:0,frame:0,tick:function(){v(!0)},deltaRatio:function(C){return d/(1e3/(C||60))},wake:function(){nk&&(!lv&&fw()&&(Ki=lv=window,dw=Ki.document||{},ni.gsap=Vr,(Ki.gsapVersions||(Ki.gsapVersions=[])).push(Vr.version),rk($p||Ki.GreenSockGlobals||!Ki.gsap&&Ki||{}),xk.forEach(Tk)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,l&&f.sleep(),u=h||function(C){return setTimeout(C,o-f.time*1e3+1|0)},Fh=1,v(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(l),Fh=0,u=Lh},lagSmoothing:function(C,_){e=C||1/0,n=Math.min(_||33,e)},fps:function(C){s=1e3/(C||240),o=f.time*1e3+s},add:function(C,_,w){var T=_?function(k,P,V,S){C(k,P,V,S),f.remove(T)}:C;return f.remove(C),a[w?"unshift":"push"](T),du(),T},remove:function(C,_){~(_=a.indexOf(C))&&a.splice(_,1)&&p>=_&&p--},_listeners:a},f}(),du=function(){return!Fh&&Yr.wake()},He={},dU=/^[\d.\-M][\d.\-,\s]/,pU=/["']/g,mU=function(e){for(var n={},r=e.substr(1,e.length-3).split(":"),i=r[0],s=1,o=r.length,a,l,u;s<o;s++)l=r[s],a=s!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,a),n[i]=isNaN(u)?u.replace(pU,"").trim():+u,i=l.substr(a+1).trim();return n},gU=function(e){var n=e.indexOf("(")+1,r=e.indexOf(")"),i=e.indexOf("(",n);return e.substring(n,~i&&i<r?e.indexOf(")",r+1):r)},yU=function(e){var n=(e+"").split("("),r=He[n[0]];return r&&n.length>1&&r.config?r.config.apply(null,~e.indexOf("{")?[mU(n[1])]:gU(e).split(",").map(lk)):He._CE&&dU.test(e)?He._CE("",e):r},Ck=function(e){return function(n){return 1-e(1-n)}},Pk=function t(e,n){for(var r=e._first,i;r;)r instanceof fr?t(r,n):r.vars.yoyoEase&&(!r._yoyo||!r._repeat)&&r._yoyo!==n&&(r.timeline?t(r.timeline,n):(i=r._ease,r._ease=r._yEase,r._yEase=i,r._yoyo=n)),r=r._next},wa=function(e,n){return e&&(Ft(e)?e:He[e]||yU(e))||n},Ba=function(e,n,r,i){r===void 0&&(r=function(l){return 1-n(1-l)}),i===void 0&&(i=function(l){return l<.5?n(l*2)/2:1-n((1-l)*2)/2});var s={easeIn:n,easeOut:r,easeInOut:i},o;return kr(e,function(a){He[a]=ni[a]=s,He[o=a.toLowerCase()]=r;for(var l in s)He[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=He[a+"."+l]=s[l]}),s},Ak=function(e){return function(n){return n<.5?(1-e(1-n*2))/2:.5+e((n-.5)*2)/2}},iy=function t(e,n,r){var i=n>=1?n:1,s=(r||(e?.3:.45))/(n<1?n:1),o=s/ov*(Math.asin(1/i)||0),a=function(h){return h===1?1:i*Math.pow(2,-10*h)*WB((h-o)*s)+1},l=e==="out"?a:e==="in"?function(u){return 1-a(1-u)}:Ak(a);return s=ov/s,l.config=function(u,h){return t(e,u,h)},l},sy=function t(e,n){n===void 0&&(n=1.70158);var r=function(o){return o?--o*o*((n+1)*o+n)+1:0},i=e==="out"?r:e==="in"?function(s){return 1-r(1-s)}:Ak(r);return i.config=function(s){return t(e,s)},i};kr("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var n=e<5?e+1:e;Ba(t+",Power"+(n-1),e?function(r){return Math.pow(r,n)}:function(r){return r},function(r){return 1-Math.pow(1-r,n)},function(r){return r<.5?Math.pow(r*2,n)/2:1-Math.pow((1-r)*2,n)/2})});He.Linear.easeNone=He.none=He.Linear.easeIn;Ba("Elastic",iy("in"),iy("out"),iy());(function(t,e){var n=1/e,r=2*n,i=2.5*n,s=function(a){return a<n?t*a*a:a<r?t*Math.pow(a-1.5/e,2)+.75:a<i?t*(a-=2.25/e)*a+.9375:t*Math.pow(a-2.625/e,2)+.984375};Ba("Bounce",function(o){return 1-s(1-o)},s)})(7.5625,2.75);Ba("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});Ba("Circ",function(t){return-(XI(1-t*t)-1)});Ba("Sine",function(t){return t===1?1:-HB(t*BB)+1});Ba("Back",sy("in"),sy("out"),sy());He.SteppedEase=He.steps=ni.SteppedEase={config:function(e,n){e===void 0&&(e=1);var r=1/e,i=e+(n?0:1),s=n?1:0,o=1-ht;return function(a){return((i*lf(0,o,a)|0)+s)*r}}};uu.ease=He["quad.out"];kr("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return gw+=t+","+t+"Params,"});var Rk=function(e,n){this.id=UB++,e._gsap=this,this.target=e,this.harness=n,this.get=n?n.get:ok,this.set=n?n.getSetter:Tw},jh=function(){function t(n){this.vars=n,this._delay=+n.delay||0,(this._repeat=n.repeat===1/0?-2:n.repeat||0)&&(this._rDelay=n.repeatDelay||0,this._yoyo=!!n.yoyo||!!n.yoyoEase),this._ts=1,fu(this,+n.duration,1,1),this.data=n.data,Tt&&(this._ctx=Tt,Tt.data.push(this)),Fh||Yr.wake()}var e=t.prototype;return e.delay=function(r){return r||r===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+r-this._delay),this._delay=r,this):this._delay},e.duration=function(r){return arguments.length?this.totalDuration(this._repeat>0?r+(r+this._rDelay)*this._repeat:r):this.totalDuration()&&this._dur},e.totalDuration=function(r){return arguments.length?(this._dirty=0,fu(this,this._repeat<0?r:(r-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(r,i){if(du(),!arguments.length)return this._tTime;var s=this._dp;if(s&&s.smoothChildTiming&&this._ts){for(Hm(this,r),!s._dp||s.parent||hk(s,this);s&&s.parent;)s.parent._time!==s._start+(s._ts>=0?s._tTime/s._ts:(s.totalDuration()-s._tTime)/-s._ts)&&s.totalTime(s._tTime,!0),s=s.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&r<this._tDur||this._ts<0&&r>0||!this._tDur&&!r)&&Xi(this._dp,this,this._start-this._delay)}return(this._tTime!==r||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===ht||!r&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=r),ak(this,r,i)),this},e.time=function(r,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),r+pS(this))%(this._dur+this._rDelay)||(r?this._dur:0),i):this._time},e.totalProgress=function(r,i){return arguments.length?this.totalTime(this.totalDuration()*r,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(r,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-r:r)+pS(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(r,i){var s=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(r-1)*s,i):this._repeat?hu(this._tTime,s)+1:1},e.timeScale=function(r,i){if(!arguments.length)return this._rts===-ht?0:this._rts;if(this._rts===r)return this;var s=this.parent&&this._ts?Up(this.parent._time,this):this._tTime;return this._rts=+r||0,this._ts=this._ps||r===-ht?0:this._rts,this.totalTime(lf(-Math.abs(this._delay),this.totalDuration(),s),i!==!1),Um(this),JB(this)},e.paused=function(r){return arguments.length?(this._ps!==r&&(this._ps=r,r?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(du(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==ht&&(this._tTime-=ht)))),this):this._ps},e.startTime=function(r){if(arguments.length){this._start=r;var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Xi(i,this,r-this._delay),this}return this._start},e.endTime=function(r){return this._start+(Ir(r)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(r){var i=this.parent||this._dp;return i?r&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Up(i.rawTime(r),this):this._tTime:this._tTime},e.revert=function(r){r===void 0&&(r=GB);var i=In;return In=r,vw(this)&&(this.timeline&&this.timeline.revert(r),this.totalTime(-.01,r.suppressEvents)),this.data!=="nested"&&r.kill!==!1&&this.kill(),In=i,this},e.globalTime=function(r){for(var i=this,s=arguments.length?r:i.rawTime();i;)s=i._start+s/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(r):s},e.repeat=function(r){return arguments.length?(this._repeat=r===1/0?-2:r,mS(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(r){if(arguments.length){var i=this._time;return this._rDelay=r,mS(this),i?this.time(i):this}return this._rDelay},e.yoyo=function(r){return arguments.length?(this._yoyo=r,this):this._yoyo},e.seek=function(r,i){return this.totalTime(li(this,r),Ir(i))},e.restart=function(r,i){return this.play().totalTime(r?-this._delay:0,Ir(i)),this._dur||(this._zTime=-ht),this},e.play=function(r,i){return r!=null&&this.seek(r,i),this.reversed(!1).paused(!1)},e.reverse=function(r,i){return r!=null&&this.seek(r||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function(r,i){return r!=null&&this.seek(r,i),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(r){return arguments.length?(!!r!==this.reversed()&&this.timeScale(-this._rts||(r?-ht:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-ht,this},e.isActive=function(){var r=this.parent||this._dp,i=this._start,s;return!!(!r||this._ts&&this._initted&&r.isActive()&&(s=r.rawTime(!0))>=i&&s<this.endTime(!0)-ht)},e.eventCallback=function(r,i,s){var o=this.vars;return arguments.length>1?(i?(o[r]=i,s&&(o[r+"Params"]=s),r==="onUpdate"&&(this._onUpdate=i)):delete o[r],this):o[r]},e.then=function(r){var i=this;return new Promise(function(s){var o=Ft(r)?r:uk,a=function(){var u=i.then;i.then=null,Ft(o)&&(o=o(i))&&(o.then||o===i)&&(i.then=u),s(o),i.then=u};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?a():i._prom=a})},e.kill=function(){gc(this)},t}();ri(jh.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-ht,_prom:0,_ps:!1,_rts:1});var fr=function(t){QI(e,t);function e(r,i){var s;return r===void 0&&(r={}),s=t.call(this,r)||this,s.labels={},s.smoothChildTiming=!!r.smoothChildTiming,s.autoRemoveChildren=!!r.autoRemoveChildren,s._sort=Ir(r.sortChildren),Pt&&Xi(r.parent||Pt,ys(s),i),r.reversed&&s.reverse(),r.paused&&s.paused(!0),r.scrollTrigger&&fk(ys(s),r.scrollTrigger),s}var n=e.prototype;return n.to=function(i,s,o){return Bc(0,arguments,this),this},n.from=function(i,s,o){return Bc(1,arguments,this),this},n.fromTo=function(i,s,o,a){return Bc(2,arguments,this),this},n.set=function(i,s,o){return s.duration=0,s.parent=this,zc(s).repeatDelay||(s.repeat=0),s.immediateRender=!!s.immediateRender,new Zt(i,s,li(this,o),1),this},n.call=function(i,s,o){return Xi(this,Zt.delayedCall(0,i,s),o)},n.staggerTo=function(i,s,o,a,l,u,h){return o.duration=s,o.stagger=o.stagger||a,o.onComplete=u,o.onCompleteParams=h,o.parent=this,new Zt(i,o,li(this,l)),this},n.staggerFrom=function(i,s,o,a,l,u,h){return o.runBackwards=1,zc(o).immediateRender=Ir(o.immediateRender),this.staggerTo(i,s,o,a,l,u,h)},n.staggerFromTo=function(i,s,o,a,l,u,h,f){return a.startAt=o,zc(a).immediateRender=Ir(a.immediateRender),this.staggerTo(i,s,a,l,u,h,f)},n.render=function(i,s,o){var a=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,h=i<=0?0:en(i),f=this._zTime<0!=i<0&&(this._initted||!u),d,p,v,y,C,_,w,T,k,P,V,S;if(this!==Pt&&h>l&&i>=0&&(h=l),h!==this._tTime||o||f){if(a!==this._time&&u&&(h+=this._time-a,i+=this._time-a),d=h,k=this._start,T=this._ts,_=!T,f&&(u||(a=this._zTime),(i||!s)&&(this._zTime=i)),this._repeat){if(V=this._yoyo,C=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(C*100+i,s,o);if(d=en(h%C),h===l?(y=this._repeat,d=u):(P=en(h/C),y=~~P,y&&y===P&&(d=u,y--),d>u&&(d=u)),P=hu(this._tTime,C),!a&&this._tTime&&P!==y&&this._tTime-P*C-this._dur<=0&&(P=y),V&&y&1&&(d=u-d,S=1),y!==P&&!this._lock){var m=V&&P&1,E=m===(V&&y&1);if(y<P&&(m=!m),a=m?0:h%u?u:h,this._lock=1,this.render(a||(S?0:en(y*C)),s,!u)._lock=0,this._tTime=h,!s&&this.parent&&Jr(this,"onRepeat"),this.vars.repeatRefresh&&!S&&(this.invalidate()._lock=1),a&&a!==this._time||_!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,E&&(this._lock=2,a=m?u:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!S&&this.invalidate()),this._lock=0,!this._ts&&!_)return this;Pk(this,S)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(w=nU(this,en(a),en(d)),w&&(h-=d-(d=w._start))),this._tTime=h,this._time=d,this._act=!T,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,a=0),!a&&h&&!s&&!P&&(Jr(this,"onStart"),this._tTime!==h))return this;if(d>=a&&i>=0)for(p=this._first;p;){if(v=p._next,(p._act||d>=p._start)&&p._ts&&w!==p){if(p.parent!==this)return this.render(i,s,o);if(p.render(p._ts>0?(d-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(d-p._start)*p._ts,s,o),d!==this._time||!this._ts&&!_){w=0,v&&(h+=this._zTime=-ht);break}}p=v}else{p=this._last;for(var A=i<0?i:d;p;){if(v=p._prev,(p._act||A<=p._end)&&p._ts&&w!==p){if(p.parent!==this)return this.render(i,s,o);if(p.render(p._ts>0?(A-p._start)*p._ts:(p._dirty?p.totalDuration():p._tDur)+(A-p._start)*p._ts,s,o||In&&vw(p)),d!==this._time||!this._ts&&!_){w=0,v&&(h+=this._zTime=A?-ht:ht);break}}p=v}}if(w&&!s&&(this.pause(),w.render(d>=a?0:-ht)._zTime=d>=a?1:-1,this._ts))return this._start=k,Um(this),this.render(i,s,o);this._onUpdate&&!s&&Jr(this,"onUpdate",!0),(h===l&&this._tTime>=this.totalDuration()||!h&&a)&&(k===this._start||Math.abs(T)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(h===l&&this._ts>0||!h&&this._ts<0)&&Do(this,1),!s&&!(i<0&&!a)&&(h||a||!l)&&(Jr(this,h===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(i,s){var o=this;if(Ns(s)||(s=li(this,s,i)),!(i instanceof jh)){if(Qn(i))return i.forEach(function(a){return o.add(a,s)}),this;if(wn(i))return this.addLabel(i,s);if(Ft(i))i=Zt.delayedCall(0,i);else return this}return this!==i?Xi(this,i,s):this},n.getChildren=function(i,s,o,a){i===void 0&&(i=!0),s===void 0&&(s=!0),o===void 0&&(o=!0),a===void 0&&(a=-yi);for(var l=[],u=this._first;u;)u._start>=a&&(u instanceof Zt?s&&l.push(u):(o&&l.push(u),i&&l.push.apply(l,u.getChildren(!0,s,o)))),u=u._next;return l},n.getById=function(i){for(var s=this.getChildren(1,1,1),o=s.length;o--;)if(s[o].vars.id===i)return s[o]},n.remove=function(i){return wn(i)?this.removeLabel(i):Ft(i)?this.killTweensOf(i):(i.parent===this&&Bm(this,i),i===this._recent&&(this._recent=this._last),_a(this))},n.totalTime=function(i,s){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=en(Yr.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),t.prototype.totalTime.call(this,i,s),this._forcing=0,this):this._tTime},n.addLabel=function(i,s){return this.labels[i]=li(this,s),this},n.removeLabel=function(i){return delete this.labels[i],this},n.addPause=function(i,s,o){var a=Zt.delayedCall(0,s||Lh,o);return a.data="isPause",this._hasPause=1,Xi(this,a,li(this,i))},n.removePause=function(i){var s=this._first;for(i=li(this,i);s;)s._start===i&&s.data==="isPause"&&Do(s),s=s._next},n.killTweensOf=function(i,s,o){for(var a=this.getTweensOf(i,o),l=a.length;l--;)ro!==a[l]&&a[l].kill(i,s);return this},n.getTweensOf=function(i,s){for(var o=[],a=vi(i),l=this._first,u=Ns(s),h;l;)l instanceof Zt?YB(l._targets,a)&&(u?(!ro||l._initted&&l._ts)&&l.globalTime(0)<=s&&l.globalTime(l.totalDuration())>s:!s||l.isActive())&&o.push(l):(h=l.getTweensOf(a,s)).length&&o.push.apply(o,h),l=l._next;return o},n.tweenTo=function(i,s){s=s||{};var o=this,a=li(o,i),l=s,u=l.startAt,h=l.onStart,f=l.onStartParams,d=l.immediateRender,p,v=Zt.to(o,ri({ease:s.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale())||ht,onStart:function(){if(o.pause(),!p){var C=s.duration||Math.abs((a-(u&&"time"in u?u.time:o._time))/o.timeScale());v._dur!==C&&fu(v,C,0,1).render(v._time,!0,!0),p=1}h&&h.apply(v,f||[])}},s));return d?v.render(0):v},n.tweenFromTo=function(i,s,o){return this.tweenTo(s,ri({startAt:{time:li(this,i)}},o))},n.recent=function(){return this._recent},n.nextLabel=function(i){return i===void 0&&(i=this._time),gS(this,li(this,i))},n.previousLabel=function(i){return i===void 0&&(i=this._time),gS(this,li(this,i),1)},n.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+ht)},n.shiftChildren=function(i,s,o){o===void 0&&(o=0);for(var a=this._first,l=this.labels,u;a;)a._start>=o&&(a._start+=i,a._end+=i),a=a._next;if(s)for(u in l)l[u]>=o&&(l[u]+=i);return _a(this)},n.invalidate=function(i){var s=this._first;for(this._lock=0;s;)s.invalidate(i),s=s._next;return t.prototype.invalidate.call(this,i)},n.clear=function(i){i===void 0&&(i=!0);for(var s=this._first,o;s;)o=s._next,this.remove(s),s=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),_a(this)},n.totalDuration=function(i){var s=0,o=this,a=o._last,l=yi,u,h,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(f=o.parent;a;)u=a._prev,a._dirty&&a.totalDuration(),h=a._start,h>l&&o._sort&&a._ts&&!o._lock?(o._lock=1,Xi(o,a,h-a._delay,1)._lock=0):l=h,h<0&&a._ts&&(s-=h,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=h/o._ts,o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),l=0),a._end>s&&a._ts&&(s=a._end),a=u;fu(o,o===Pt&&o._time>s?o._time:s,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(i){if(Pt._ts&&(ak(Pt,Up(i,Pt)),sk=Yr.frame),Yr.frame>=fS){fS+=ei.autoSleep||120;var s=Pt._first;if((!s||!s._ts)&&ei.autoSleep&&Yr._listeners.length<2){for(;s&&!s._ts;)s=s._next;s||Yr.sleep()}}},e}(jh);ri(fr.prototype,{_lock:0,_hasPause:0,_forcing:0});var vU=function(e,n,r,i,s,o,a){var l=new Dr(this._pt,e,n,0,1,Vk,null,s),u=0,h=0,f,d,p,v,y,C,_,w;for(l.b=r,l.e=i,r+="",i+="",(_=~i.indexOf("random("))&&(i=Oh(i)),o&&(w=[r,i],o(w,e,n),r=w[0],i=w[1]),d=r.match(ty)||[];f=ty.exec(i);)v=f[0],y=i.substring(u,f.index),p?p=(p+1)%5:y.substr(-5)==="rgba("&&(p=1),v!==d[h++]&&(C=parseFloat(d[h-1])||0,l._pt={_next:l._pt,p:y||h===1?y:",",s:C,c:v.charAt(1)==="="?$l(C,v)-C:parseFloat(v)-C,m:p&&p<4?Math.round:0},u=ty.lastIndex);return l.c=u<i.length?i.substring(u,i.length):"",l.fp=a,(ek.test(i)||_)&&(l.e=0),this._pt=l,l},_w=function(e,n,r,i,s,o,a,l,u,h){Ft(i)&&(i=i(s||0,e,o));var f=e[n],d=r!=="get"?r:Ft(f)?u?e[n.indexOf("set")||!Ft(e["get"+n.substr(3)])?n:"get"+n.substr(3)](u):e[n]():f,p=Ft(f)?u?EU:Mk:xw,v;if(wn(i)&&(~i.indexOf("random(")&&(i=Oh(i)),i.charAt(1)==="="&&(v=$l(d,i)+(Kn(d)||0),(v||v===0)&&(i=v))),!h||d!==i||mv)return!isNaN(d*i)&&i!==""?(v=new Dr(this._pt,e,n,+d||0,i-(d||0),typeof f=="boolean"?SU:Nk,0,p),u&&(v.fp=u),a&&v.modifier(a,this,e),this._pt=v):(!f&&!(n in e)&&pw(n,i),vU.call(this,e,n,d,i,p,l||ei.stringFilter,u))},_U=function(e,n,r,i,s){if(Ft(e)&&(e=Uc(e,s,n,r,i)),!hs(e)||e.style&&e.nodeType||Qn(e)||JI(e))return wn(e)?Uc(e,s,n,r,i):e;var o={},a;for(a in e)o[a]=Uc(e[a],s,n,r,i);return o},Ik=function(e,n,r,i,s,o){var a,l,u,h;if(Kr[e]&&(a=new Kr[e]).init(s,a.rawVars?n[e]:_U(n[e],i,s,o,r),r,i,o)!==!1&&(r._pt=l=new Dr(r._pt,s,e,0,1,a.render,a,0,a.priority),r!==Sl))for(u=r._ptLookup[r._targets.indexOf(s)],h=a._props.length;h--;)u[a._props[h]]=l;return a},ro,mv,ww=function t(e,n,r){var i=e.vars,s=i.ease,o=i.startAt,a=i.immediateRender,l=i.lazy,u=i.onUpdate,h=i.runBackwards,f=i.yoyoEase,d=i.keyframes,p=i.autoRevert,v=e._dur,y=e._startAt,C=e._targets,_=e.parent,w=_&&_.data==="nested"?_.vars.targets:C,T=e._overwrite==="auto"&&!cw,k=e.timeline,P,V,S,m,E,A,D,R,b,q,z,ee,J;if(k&&(!d||!s)&&(s="none"),e._ease=wa(s,uu.ease),e._yEase=f?Ck(wa(f===!0?s:f,uu.ease)):0,f&&e._yoyo&&!e._repeat&&(f=e._yEase,e._yEase=e._ease,e._ease=f),e._from=!k&&!!i.runBackwards,!k||d&&!i.stagger){if(R=C[0]?va(C[0]).harness:0,ee=R&&i[R.prop],P=Bp(i,mw),y&&(y._zTime<0&&y.progress(1),n<0&&h&&a&&!p?y.render(-1,!0):y.revert(h&&v?zd:KB),y._lazy=0),o){if(Do(e._startAt=Zt.set(C,ri({data:"isStart",overwrite:!1,parent:_,immediateRender:!0,lazy:!y&&Ir(l),startAt:null,delay:0,onUpdate:u&&function(){return Jr(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(In||!a&&!p)&&e._startAt.revert(zd),a&&v&&n<=0&&r<=0){n&&(e._zTime=n);return}}else if(h&&v&&!y){if(n&&(a=!1),S=ri({overwrite:!1,data:"isFromStart",lazy:a&&!y&&Ir(l),immediateRender:a,stagger:0,parent:_},P),ee&&(S[R.prop]=ee),Do(e._startAt=Zt.set(C,S)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(In?e._startAt.revert(zd):e._startAt.render(-1,!0)),e._zTime=n,!a)t(e._startAt,ht,ht);else if(!n)return}for(e._pt=e._ptCache=0,l=v&&Ir(l)||l&&!v,V=0;V<C.length;V++){if(E=C[V],D=E._gsap||yw(C)[V]._gsap,e._ptLookup[V]=q={},uv[D.id]&&_o.length&&zp(),z=w===C?V:w.indexOf(E),R&&(b=new R).init(E,ee||P,e,z,w)!==!1&&(e._pt=m=new Dr(e._pt,E,b.name,0,1,b.render,b,0,b.priority),b._props.forEach(function(B){q[B]=m}),b.priority&&(A=1)),!R||ee)for(S in P)Kr[S]&&(b=Ik(S,P,e,z,E,w))?b.priority&&(A=1):q[S]=m=_w.call(e,E,S,"get",P[S],z,w,0,i.stringFilter);e._op&&e._op[V]&&e.kill(E,e._op[V]),T&&e._pt&&(ro=e,Pt.killTweensOf(E,q,e.globalTime(n)),J=!e.parent,ro=0),e._pt&&l&&(uv[D.id]=1)}A&&Lk(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!J,d&&n<=0&&k.render(yi,!0,!0)},wU=function(e,n,r,i,s,o,a,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[n],h,f,d,p;if(!u)for(u=e._ptCache[n]=[],d=e._ptLookup,p=e._targets.length;p--;){if(h=d[p][n],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==n&&h.fp!==n;)h=h._next;if(!h)return mv=1,e.vars[n]="+=0",ww(e,a),mv=0,l?Vh(n+" not eligible for reset"):1;u.push(h)}for(p=u.length;p--;)f=u[p],h=f._pt||f,h.s=(i||i===0)&&!s?i:h.s+(i||0)+o*h.c,h.c=r-h.s,f.e&&(f.e=Bt(r)+Kn(f.e)),f.b&&(f.b=h.s+Kn(f.b))},xU=function(e,n){var r=e[0]?va(e[0]).harness:0,i=r&&r.aliases,s,o,a,l;if(!i)return n;s=cu({},n);for(o in i)if(o in s)for(l=i[o].split(","),a=l.length;a--;)s[l[a]]=s[o];return s},TU=function(e,n,r,i){var s=n.ease||i||"power1.inOut",o,a;if(Qn(n))a=r[e]||(r[e]=[]),n.forEach(function(l,u){return a.push({t:u/(n.length-1)*100,v:l,e:s})});else for(o in n)a=r[o]||(r[o]=[]),o==="ease"||a.push({t:parseFloat(e),v:n[o],e:s})},Uc=function(e,n,r,i,s){return Ft(e)?e.call(n,r,i,s):wn(e)&&~e.indexOf("random(")?Oh(e):e},kk=gw+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",Dk={};kr(kk+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return Dk[t]=1});var Zt=function(t){QI(e,t);function e(r,i,s,o){var a;typeof i=="number"&&(s.duration=i,i=s,s=null),a=t.call(this,o?i:zc(i))||this;var l=a.vars,u=l.duration,h=l.delay,f=l.immediateRender,d=l.stagger,p=l.overwrite,v=l.keyframes,y=l.defaults,C=l.scrollTrigger,_=l.yoyoEase,w=i.parent||Pt,T=(Qn(r)||JI(r)?Ns(r[0]):"length"in i)?[r]:vi(r),k,P,V,S,m,E,A,D;if(a._targets=T.length?yw(T):Vh("GSAP target "+r+" not found. https://gsap.com",!ei.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=p,v||d||Xf(u)||Xf(h)){if(i=a.vars,k=a.timeline=new fr({data:"nested",defaults:y||{},targets:w&&w.data==="nested"?w.vars.targets:T}),k.kill(),k.parent=k._dp=ys(a),k._start=0,d||Xf(u)||Xf(h)){if(S=T.length,A=d&&gk(d),hs(d))for(m in d)~kk.indexOf(m)&&(D||(D={}),D[m]=d[m]);for(P=0;P<S;P++)V=Bp(i,Dk),V.stagger=0,_&&(V.yoyoEase=_),D&&cu(V,D),E=T[P],V.duration=+Uc(u,ys(a),P,E,T),V.delay=(+Uc(h,ys(a),P,E,T)||0)-a._delay,!d&&S===1&&V.delay&&(a._delay=h=V.delay,a._start+=h,V.delay=0),k.to(E,V,A?A(P,E,T):0),k._ease=He.none;k.duration()?u=h=0:a.timeline=0}else if(v){zc(ri(k.vars.defaults,{ease:"none"})),k._ease=wa(v.ease||i.ease||"none");var R=0,b,q,z;if(Qn(v))v.forEach(function(ee){return k.to(T,ee,">")}),k.duration();else{V={};for(m in v)m==="ease"||m==="easeEach"||TU(m,v[m],V,v.easeEach);for(m in V)for(b=V[m].sort(function(ee,J){return ee.t-J.t}),R=0,P=0;P<b.length;P++)q=b[P],z={ease:q.e,duration:(q.t-(P?b[P-1].t:0))/100*u},z[m]=q.v,k.to(T,z,R),R+=z.duration;k.duration()<u&&k.to({},{duration:u-k.duration()})}}u||a.duration(u=k.duration())}else a.timeline=0;return p===!0&&!cw&&(ro=ys(a),Pt.killTweensOf(T),ro=0),Xi(w,ys(a),s),i.reversed&&a.reverse(),i.paused&&a.paused(!0),(f||!u&&!v&&a._start===en(w._time)&&Ir(f)&&ZB(ys(a))&&w.data!=="nested")&&(a._tTime=-ht,a.render(Math.max(0,-h)||0)),C&&fk(ys(a),C),a}var n=e.prototype;return n.render=function(i,s,o){var a=this._time,l=this._tDur,u=this._dur,h=i<0,f=i>l-ht&&!h?l:i<ht?0:i,d,p,v,y,C,_,w,T,k;if(!u)tU(this,i,s,o);else if(f!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(d=f,T=this.timeline,this._repeat){if(y=u+this._rDelay,this._repeat<-1&&h)return this.totalTime(y*100+i,s,o);if(d=en(f%y),f===l?(v=this._repeat,d=u):(C=en(f/y),v=~~C,v&&v===C?(d=u,v--):d>u&&(d=u)),_=this._yoyo&&v&1,_&&(k=this._yEase,d=u-d),C=hu(this._tTime,y),d===a&&!o&&this._initted&&v===C)return this._tTime=f,this;v!==C&&(T&&this._yEase&&Pk(T,_),this.vars.repeatRefresh&&!_&&!this._lock&&d!==y&&this._initted&&(this._lock=o=1,this.render(en(y*v),!0).invalidate()._lock=0))}if(!this._initted){if(dk(this,h?i:d,o,s,f))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&v!==C))return this;if(u!==this._dur)return this.render(i,s,o)}if(this._tTime=f,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(k||this._ease)(d/u),this._from&&(this.ratio=w=1-w),!a&&f&&!s&&!C&&(Jr(this,"onStart"),this._tTime!==f))return this;for(p=this._pt;p;)p.r(w,p.d),p=p._next;T&&T.render(i<0?i:T._dur*T._ease(d/this._dur),s,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!s&&(h&&cv(this,i,s,o),Jr(this,"onUpdate")),this._repeat&&v!==C&&this.vars.onRepeat&&!s&&this.parent&&Jr(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(h&&!this._onUpdate&&cv(this,i,!0,!0),(i||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Do(this,1),!s&&!(h&&!a)&&(f||a||_)&&(Jr(this,f===l?"onComplete":"onReverseComplete",!0),this._prom&&!(f<l&&this.timeScale()>0)&&this._prom()))}return this},n.targets=function(){return this._targets},n.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),t.prototype.invalidate.call(this,i)},n.resetTo=function(i,s,o,a,l){Fh||Yr.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||ww(this,u),h=this._ease(u/this._dur),wU(this,i,s,o,a,h,u,l)?this.resetTo(i,s,o,a,1):(Hm(this,0),this.parent||ck(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(i,s){if(s===void 0&&(s="all"),!i&&(!s||s==="all"))return this._lazy=this._pt=0,this.parent?gc(this):this.scrollTrigger&&this.scrollTrigger.kill(!!In),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,s,ro&&ro.vars.overwrite!==!0)._first||gc(this),this.parent&&o!==this.timeline.totalDuration()&&fu(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,l=i?vi(i):a,u=this._ptLookup,h=this._pt,f,d,p,v,y,C,_;if((!s||s==="all")&&XB(a,l))return s==="all"&&(this._pt=0),gc(this);for(f=this._op=this._op||[],s!=="all"&&(wn(s)&&(y={},kr(s,function(w){return y[w]=1}),s=y),s=xU(a,s)),_=a.length;_--;)if(~l.indexOf(a[_])){d=u[_],s==="all"?(f[_]=s,v=d,p={}):(p=f[_]=f[_]||{},v=s);for(y in v)C=d&&d[y],C&&((!("kill"in C.d)||C.d.kill(y)===!0)&&Bm(this,C,"_pt"),delete d[y]),p!=="all"&&(p[y]=1)}return this._initted&&!this._pt&&h&&gc(this),this},e.to=function(i,s){return new e(i,s,arguments[2])},e.from=function(i,s){return Bc(1,arguments)},e.delayedCall=function(i,s,o,a){return new e(s,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:s,onReverseComplete:s,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(i,s,o){return Bc(2,arguments)},e.set=function(i,s){return s.duration=0,s.repeatDelay||(s.repeat=0),new e(i,s)},e.killTweensOf=function(i,s,o){return Pt.killTweensOf(i,s,o)},e}(jh);ri(Zt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});kr("staggerTo,staggerFrom,staggerFromTo",function(t){Zt[t]=function(){var e=new fr,n=fv.call(arguments,0);return n.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,n)}});var xw=function(e,n,r){return e[n]=r},Mk=function(e,n,r){return e[n](r)},EU=function(e,n,r,i){return e[n](i.fp,r)},bU=function(e,n,r){return e.setAttribute(n,r)},Tw=function(e,n){return Ft(e[n])?Mk:hw(e[n])&&e.setAttribute?bU:xw},Nk=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e6)/1e6,n)},SU=function(e,n){return n.set(n.t,n.p,!!(n.s+n.c*e),n)},Vk=function(e,n){var r=n._pt,i="";if(!e&&n.b)i=n.b;else if(e===1&&n.e)i=n.e;else{for(;r;)i=r.p+(r.m?r.m(r.s+r.c*e):Math.round((r.s+r.c*e)*1e4)/1e4)+i,r=r._next;i+=n.c}n.set(n.t,n.p,i,n)},Ew=function(e,n){for(var r=n._pt;r;)r.r(e,r.d),r=r._next},CU=function(e,n,r,i){for(var s=this._pt,o;s;)o=s._next,s.p===i&&s.modifier(e,n,r),s=o},PU=function(e){for(var n=this._pt,r,i;n;)i=n._next,n.p===e&&!n.op||n.op===e?Bm(this,n,"_pt"):n.dep||(r=1),n=i;return!r},AU=function(e,n,r,i){i.mSet(e,n,i.m.call(i.tween,r,i.mt),i)},Lk=function(e){for(var n=e._pt,r,i,s,o;n;){for(r=n._next,i=s;i&&i.pr>n.pr;)i=i._next;(n._prev=i?i._prev:o)?n._prev._next=n:s=n,(n._next=i)?i._prev=n:o=n,n=r}e._pt=s},Dr=function(){function t(n,r,i,s,o,a,l,u,h){this.t=r,this.s=s,this.c=o,this.p=i,this.r=a||Nk,this.d=l||this,this.set=u||xw,this.pr=h||0,this._next=n,n&&(n._prev=this)}var e=t.prototype;return e.modifier=function(r,i,s){this.mSet=this.mSet||this.set,this.set=AU,this.m=r,this.mt=s,this.tween=i},t}();kr(gw+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(t){return mw[t]=1});ni.TweenMax=ni.TweenLite=Zt;ni.TimelineLite=ni.TimelineMax=fr;Pt=new fr({sortChildren:!1,defaults:uu,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});ei.stringFilter=Sk;var xa=[],Ud={},RU=[],vS=0,IU=0,oy=function(e){return(Ud[e]||RU).map(function(n){return n()})},gv=function(){var e=Date.now(),n=[];e-vS>2&&(oy("matchMediaInit"),xa.forEach(function(r){var i=r.queries,s=r.conditions,o,a,l,u;for(a in i)o=Ki.matchMedia(i[a]).matches,o&&(l=1),o!==s[a]&&(s[a]=o,u=1);u&&(r.revert(),l&&n.push(r))}),oy("matchMediaRevert"),n.forEach(function(r){return r.onMatch(r,function(i){return r.add(null,i)})}),vS=e,oy("matchMedia"))},Ok=function(){function t(n,r){this.selector=r&&dv(r),this.data=[],this._r=[],this.isReverted=!1,this.id=IU++,n&&this.add(n)}var e=t.prototype;return e.add=function(r,i,s){Ft(r)&&(s=i,i=r,r=Ft);var o=this,a=function(){var u=Tt,h=o.selector,f;return u&&u!==o&&u.data.push(o),s&&(o.selector=dv(s)),Tt=o,f=i.apply(o,arguments),Ft(f)&&o._r.push(f),Tt=u,o.selector=h,o.isReverted=!1,f};return o.last=a,r===Ft?a(o,function(l){return o.add(null,l)}):r?o[r]=a:a},e.ignore=function(r){var i=Tt;Tt=null,r(this),Tt=i},e.getTweens=function(){var r=[];return this.data.forEach(function(i){return i instanceof t?r.push.apply(r,i.getTweens()):i instanceof Zt&&!(i.parent&&i.parent.data==="nested")&&r.push(i)}),r},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(r,i){var s=this;if(r?function(){for(var a=s.getTweens(),l=s.data.length,u;l--;)u=s.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(h){return a.splice(a.indexOf(h),1)}));for(a.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,f){return f.g-h.g||-1/0}).forEach(function(h){return h.t.revert(r)}),l=s.data.length;l--;)u=s.data[l],u instanceof fr?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof Zt)&&u.revert&&u.revert(r);s._r.forEach(function(h){return h(r,s)}),s.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),i)for(var o=xa.length;o--;)xa[o].id===this.id&&xa.splice(o,1)},e.revert=function(r){this.kill(r||{})},t}(),kU=function(){function t(n){this.contexts=[],this.scope=n,Tt&&Tt.data.push(this)}var e=t.prototype;return e.add=function(r,i,s){hs(r)||(r={matches:r});var o=new Ok(0,s||this.scope),a=o.conditions={},l,u,h;Tt&&!o.selector&&(o.selector=Tt.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=r;for(u in r)u==="all"?h=1:(l=Ki.matchMedia(r[u]),l&&(xa.indexOf(o)<0&&xa.push(o),(a[u]=l.matches)&&(h=1),l.addListener?l.addListener(gv):l.addEventListener("change",gv)));return h&&i(o,function(f){return o.add(null,f)}),this},e.revert=function(r){this.kill(r||{})},e.kill=function(r){this.contexts.forEach(function(i){return i.kill(r,!0)})},t}(),Hp={registerPlugin:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(function(i){return Tk(i)})},timeline:function(e){return new fr(e)},getTweensOf:function(e,n){return Pt.getTweensOf(e,n)},getProperty:function(e,n,r,i){wn(e)&&(e=vi(e)[0]);var s=va(e||{}).get,o=r?uk:lk;return r==="native"&&(r=""),e&&(n?o((Kr[n]&&Kr[n].get||s)(e,n,r,i)):function(a,l,u){return o((Kr[a]&&Kr[a].get||s)(e,a,l,u))})},quickSetter:function(e,n,r){if(e=vi(e),e.length>1){var i=e.map(function(h){return Vr.quickSetter(h,n,r)}),s=i.length;return function(h){for(var f=s;f--;)i[f](h)}}e=e[0]||{};var o=Kr[n],a=va(e),l=a.harness&&(a.harness.aliases||{})[n]||n,u=o?function(h){var f=new o;Sl._pt=0,f.init(e,r?h+r:h,Sl,0,[e]),f.render(1,f),Sl._pt&&Ew(1,Sl)}:a.set(e,l);return o?u:function(h){return u(e,l,r?h+r:h,a,1)}},quickTo:function(e,n,r){var i,s=Vr.to(e,ri((i={},i[n]="+=0.1",i.paused=!0,i.stagger=0,i),r||{})),o=function(l,u,h){return s.resetTo(n,l,u,h)};return o.tween=s,o},isTweening:function(e){return Pt.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=wa(e.ease,uu.ease)),dS(uu,e||{})},config:function(e){return dS(ei,e||{})},registerEffect:function(e){var n=e.name,r=e.effect,i=e.plugins,s=e.defaults,o=e.extendTimeline;(i||"").split(",").forEach(function(a){return a&&!Kr[a]&&!ni[a]&&Vh(n+" effect requires "+a+" plugin.")}),ny[n]=function(a,l,u){return r(vi(a),ri(l||{},s),u)},o&&(fr.prototype[n]=function(a,l,u){return this.add(ny[n](a,hs(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,n){He[e]=wa(n)},parseEase:function(e,n){return arguments.length?wa(e,n):He},getById:function(e){return Pt.getById(e)},exportRoot:function(e,n){e===void 0&&(e={});var r=new fr(e),i,s;for(r.smoothChildTiming=Ir(e.smoothChildTiming),Pt.remove(r),r._dp=0,r._time=r._tTime=Pt._time,i=Pt._first;i;)s=i._next,(n||!(!i._dur&&i instanceof Zt&&i.vars.onComplete===i._targets[0]))&&Xi(r,i,i._start-i._delay),i=s;return Xi(Pt,r,0),r},context:function(e,n){return e?new Ok(e,n):Tt},matchMedia:function(e){return new kU(e)},matchMediaRefresh:function(){return xa.forEach(function(e){var n=e.conditions,r,i;for(i in n)n[i]&&(n[i]=!1,r=1);r&&e.revert()})||gv()},addEventListener:function(e,n){var r=Ud[e]||(Ud[e]=[]);~r.indexOf(n)||r.push(n)},removeEventListener:function(e,n){var r=Ud[e],i=r&&r.indexOf(n);i>=0&&r.splice(i,1)},utils:{wrap:uU,wrapYoyo:cU,distribute:gk,random:vk,snap:yk,normalize:lU,getUnit:Kn,clamp:iU,splitColor:Ek,toArray:vi,selector:dv,mapRange:wk,pipe:oU,unitize:aU,interpolate:hU,shuffle:mk},install:rk,effects:ny,ticker:Yr,updateRoot:fr.updateRoot,plugins:Kr,globalTimeline:Pt,core:{PropTween:Dr,globals:ik,Tween:Zt,Timeline:fr,Animation:jh,getCache:va,_removeLinkedListItem:Bm,reverting:function(){return In},context:function(e){return e&&Tt&&(Tt.data.push(e),e._ctx=Tt),Tt},suppressOverwrites:function(e){return cw=e}}};kr("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Hp[t]=Zt[t]});Yr.add(fr.updateRoot);Sl=Hp.to({},{duration:0});var DU=function(e,n){for(var r=e._pt;r&&r.p!==n&&r.op!==n&&r.fp!==n;)r=r._next;return r},MU=function(e,n){var r=e._targets,i,s,o;for(i in n)for(s=r.length;s--;)o=e._ptLookup[s][i],o&&(o=o.d)&&(o._pt&&(o=DU(o,i)),o&&o.modifier&&o.modifier(n[i],e,r[s],i))},ay=function(e,n){return{name:e,headless:1,rawVars:1,init:function(i,s,o){o._onInit=function(a){var l,u;if(wn(s)&&(l={},kr(s,function(h){return l[h]=1}),s=l),n){l={};for(u in s)l[u]=n(s[u]);s=l}MU(a,s)}}}},Vr=Hp.registerPlugin({name:"attr",init:function(e,n,r,i,s){var o,a,l;this.tween=r;for(o in n)l=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(l||0)+"",n[o],i,s,0,0,o),a.op=o,a.b=l,this._props.push(o)},render:function(e,n){for(var r=n._pt;r;)In?r.set(r.t,r.p,r.b,r):r.r(e,r.d),r=r._next}},{name:"endArray",headless:1,init:function(e,n){for(var r=n.length;r--;)this.add(e,r,e[r]||0,n[r],0,0,0,0,0,1)}},ay("roundProps",pv),ay("modifiers"),ay("snap",yk))||Hp;Zt.version=fr.version=Vr.version="3.13.0";nk=1;fw()&&du();He.Power0;He.Power1;He.Power2;He.Power3;He.Power4;He.Linear;He.Quad;He.Cubic;He.Quart;He.Quint;He.Strong;He.Elastic;He.Back;He.SteppedEase;He.Bounce;He.Sine;He.Expo;He.Circ;/*! * CSSPlugin 3.13.0 * https://gsap.com * * Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var _S,io,zl,bw,la,wS,Sw,NU=function(){return typeof window<"u"},Vs={},Xo=180/Math.PI,Bl=Math.PI/180,Ya=Math.atan2,xS=1e8,Cw=/([A-Z])/g,VU=/(left|right|width|margin|padding|x)/i,LU=/[\s,\(]\S/,Ji={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},yv=function(e,n){return n.set(n.t,n.p,Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},OU=function(e,n){return n.set(n.t,n.p,e===1?n.e:Math.round((n.s+n.c*e)*1e4)/1e4+n.u,n)},FU=function(e,n){return n.set(n.t,n.p,e?Math.round((n.s+n.c*e)*1e4)/1e4+n.u:n.b,n)},jU=function(e,n){var r=n.s+n.c*e;n.set(n.t,n.p,~~(r+(r<0?-.5:.5))+n.u,n)},Fk=function(e,n){return n.set(n.t,n.p,e?n.e:n.b,n)},jk=function(e,n){return n.set(n.t,n.p,e!==1?n.b:n.e,n)},$U=function(e,n,r){return e.style[n]=r},zU=function(e,n,r){return e.style.setProperty(n,r)},BU=function(e,n,r){return e._gsap[n]=r},UU=function(e,n,r){return e._gsap.scaleX=e._gsap.scaleY=r},HU=function(e,n,r,i,s){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(s,o)},WU=function(e,n,r,i,s){var o=e._gsap;o[n]=r,o.renderTransform(s,o)},Rt="transform",Mr=Rt+"Origin",qU=function t(e,n){var r=this,i=this.target,s=i.style,o=i._gsap;if(e in Vs&&s){if(this.tfm=this.tfm||{},e!=="transform")e=Ji[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return r.tfm[a]=_s(i,a)}):this.tfm[e]=o.x?o[e]:_s(i,e),e===Mr&&(this.tfm.zOrigin=o.zOrigin);else return Ji.transform.split(",").forEach(function(a){return t.call(r,a,n)});if(this.props.indexOf(Rt)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Mr,n,"")),e=Rt}(s||n)&&this.props.push(e,n,s[e])},$k=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},KU=function(){var e=this.props,n=this.target,r=n.style,i=n._gsap,s,o;for(s=0;s<e.length;s+=3)e[s+1]?e[s+1]===2?n[e[s]](e[s+2]):n[e[s]]=e[s+2]:e[s+2]?r[e[s]]=e[s+2]:r.removeProperty(e[s].substr(0,2)==="--"?e[s]:e[s].replace(Cw,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),s=Sw(),(!s||!s.isStart)&&!r[Rt]&&($k(r),i.zOrigin&&r[Mr]&&(r[Mr]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},zk=function(e,n){var r={target:e,props:[],revert:KU,save:qU};return e._gsap||Vr.core.getCache(e),n&&e.style&&e.nodeType&&n.split(",").forEach(function(i){return r.save(i)}),r},Bk,vv=function(e,n){var r=io.createElementNS?io.createElementNS((n||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):io.createElement(e);return r&&r.style?r:io.createElement(e)},_i=function t(e,n,r){var i=getComputedStyle(e);return i[n]||i.getPropertyValue(n.replace(Cw,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&t(e,pu(n)||n,1)||""},TS="O,Moz,ms,Ms,Webkit".split(","),pu=function(e,n,r){var i=n||la,s=i.style,o=5;if(e in s&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(TS[o]+e in s););return o<0?null:(o===3?"ms":o>=0?TS[o]:"")+e},_v=function(){NU()&&window.document&&(_S=window,io=_S.document,zl=io.documentElement,la=vv("div")||{style:{}},vv("div"),Rt=pu(Rt),Mr=Rt+"Origin",la.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Bk=!!pu("perspective"),Sw=Vr.core.reverting,bw=1)},ES=function(e){var n=e.ownerSVGElement,r=vv("svg",n&&n.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=e.cloneNode(!0),s;i.style.display="block",r.appendChild(i),zl.appendChild(r);try{s=i.getBBox()}catch{}return r.removeChild(i),zl.removeChild(r),s},bS=function(e,n){for(var r=n.length;r--;)if(e.hasAttribute(n[r]))return e.getAttribute(n[r])},Uk=function(e){var n,r;try{n=e.getBBox()}catch{n=ES(e),r=1}return n&&(n.width||n.height)||r||(n=ES(e)),n&&!n.width&&!n.x&&!n.y?{x:+bS(e,["x","cx","x1"])||0,y:+bS(e,["y","cy","y1"])||0,width:0,height:0}:n},Hk=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Uk(e))},ka=function(e,n){if(n){var r=e.style,i;n in Vs&&n!==Mr&&(n=Rt),r.removeProperty?(i=n.substr(0,2),(i==="ms"||n.substr(0,6)==="webkit")&&(n="-"+n),r.removeProperty(i==="--"?n:n.replace(Cw,"-$1").toLowerCase())):r.removeAttribute(n)}},so=function(e,n,r,i,s,o){var a=new Dr(e._pt,n,r,0,1,o?jk:Fk);return e._pt=a,a.b=i,a.e=s,e._props.push(r),a},SS={deg:1,rad:1,turn:1},GU={grid:1,flex:1},Mo=function t(e,n,r,i){var s=parseFloat(r)||0,o=(r+"").trim().substr((s+"").length)||"px",a=la.style,l=VU.test(n),u=e.tagName.toLowerCase()==="svg",h=(u?"client":"offset")+(l?"Width":"Height"),f=100,d=i==="px",p=i==="%",v,y,C,_;if(i===o||!s||SS[i]||SS[o])return s;if(o!=="px"&&!d&&(s=t(e,n,r,"px")),_=e.getCTM&&Hk(e),(p||o==="%")&&(Vs[n]||~n.indexOf("adius")))return v=_?e.getBBox()[l?"width":"height"]:e[h],Bt(p?s/v*f:s/100*v);if(a[l?"width":"height"]=f+(d?o:i),y=i!=="rem"&&~n.indexOf("adius")||i==="em"&&e.appendChild&&!u?e:e.parentNode,_&&(y=(e.ownerSVGElement||{}).parentNode),(!y||y===io||!y.appendChild)&&(y=io.body),C=y._gsap,C&&p&&C.width&&l&&C.time===Yr.time&&!C.uncache)return Bt(s/C.width*f);if(p&&(n==="height"||n==="width")){var w=e.style[n];e.style[n]=f+i,v=e[h],w?e.style[n]=w:ka(e,n)}else(p||o==="%")&&!GU[_i(y,"display")]&&(a.position=_i(e,"position")),y===e&&(a.position="static"),y.appendChild(la),v=la[h],y.removeChild(la),a.position="absolute";return l&&p&&(C=va(y),C.time=Yr.time,C.width=y[h]),Bt(d?v*s/f:v&&s?f/v*s:0)},_s=function(e,n,r,i){var s;return bw||_v(),n in Ji&&n!=="transform"&&(n=Ji[n],~n.indexOf(",")&&(n=n.split(",")[0])),Vs[n]&&n!=="transform"?(s=zh(e,i),s=n!=="transformOrigin"?s[n]:s.svg?s.origin:qp(_i(e,Mr))+" "+s.zOrigin+"px"):(s=e.style[n],(!s||s==="auto"||i||~(s+"").indexOf("calc("))&&(s=Wp[n]&&Wp[n](e,n,r)||_i(e,n)||ok(e,n)||(n==="opacity"?1:0))),r&&!~(s+"").trim().indexOf(" ")?Mo(e,n,s,r)+r:s},YU=function(e,n,r,i){if(!r||r==="none"){var s=pu(n,e,1),o=s&&_i(e,s,1);o&&o!==r?(n=s,r=o):n==="borderColor"&&(r=_i(e,"borderTopColor"))}var a=new Dr(this._pt,e.style,n,0,1,Vk),l=0,u=0,h,f,d,p,v,y,C,_,w,T,k,P;if(a.b=r,a.e=i,r+="",i+="",i.substring(0,6)==="var(--"&&(i=_i(e,i.substring(4,i.indexOf(")")))),i==="auto"&&(y=e.style[n],e.style[n]=i,i=_i(e,n)||i,y?e.style[n]=y:ka(e,n)),h=[r,i],Sk(h),r=h[0],i=h[1],d=r.match(bl)||[],P=i.match(bl)||[],P.length){for(;f=bl.exec(i);)C=f[0],w=i.substring(l,f.index),v?v=(v+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(v=1),C!==(y=d[u++]||"")&&(p=parseFloat(y)||0,k=y.substr((p+"").length),C.charAt(1)==="="&&(C=$l(p,C)+k),_=parseFloat(C),T=C.substr((_+"").length),l=bl.lastIndex-T.length,T||(T=T||ei.units[n]||k,l===i.length&&(i+=T,a.e+=T)),k!==T&&(p=Mo(e,n,y,T)||0),a._pt={_next:a._pt,p:w||u===1?w:",",s:p,c:_-p,m:v&&v<4||n==="zIndex"?Math.round:0});a.c=l<i.length?i.substring(l,i.length):""}else a.r=n==="display"&&i==="none"?jk:Fk;return ek.test(i)&&(a.e=0),this._pt=a,a},CS={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},QU=function(e){var n=e.split(" "),r=n[0],i=n[1]||"50%";return(r==="top"||r==="bottom"||i==="left"||i==="right")&&(e=r,r=i,i=e),n[0]=CS[r]||r,n[1]=CS[i]||i,n.join(" ")},XU=function(e,n){if(n.tween&&n.tween._time===n.tween._dur){var r=n.t,i=r.style,s=n.u,o=r._gsap,a,l,u;if(s==="all"||s===!0)i.cssText="",l=1;else for(s=s.split(","),u=s.length;--u>-1;)a=s[u],Vs[a]&&(l=1,a=a==="transformOrigin"?Mr:Rt),ka(r,a);l&&(ka(r,Rt),o&&(o.svg&&r.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",zh(r,1),o.uncache=1,$k(i)))}},Wp={clearProps:function(e,n,r,i,s){if(s.data!=="isFromStart"){var o=e._pt=new Dr(e._pt,n,r,0,0,XU);return o.u=i,o.pr=-10,o.tween=s,e._props.push(r),1}}},$h=[1,0,0,1,0,0],Wk={},qk=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},PS=function(e){var n=_i(e,Rt);return qk(n)?$h:n.substr(7).match(ZI).map(Bt)},Pw=function(e,n){var r=e._gsap||va(e),i=e.style,s=PS(e),o,a,l,u;return r.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,s=[l.a,l.b,l.c,l.d,l.e,l.f],s.join(",")==="1,0,0,1,0,0"?$h:s):(s===$h&&!e.offsetParent&&e!==zl&&!r.svg&&(l=i.display,i.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,a=e.nextElementSibling,zl.appendChild(e)),s=PS(e),l?i.display=l:ka(e,"display"),u&&(a?o.insertBefore(e,a):o?o.appendChild(e):zl.removeChild(e))),n&&s.length>6?[s[0],s[1],s[4],s[5],s[12],s[13]]:s)},wv=function(e,n,r,i,s,o){var a=e._gsap,l=s||Pw(e,!0),u=a.xOrigin||0,h=a.yOrigin||0,f=a.xOffset||0,d=a.yOffset||0,p=l[0],v=l[1],y=l[2],C=l[3],_=l[4],w=l[5],T=n.split(" "),k=parseFloat(T[0])||0,P=parseFloat(T[1])||0,V,S,m,E;r?l!==$h&&(S=p*C-v*y)&&(m=k*(C/S)+P*(-y/S)+(y*w-C*_)/S,E=k*(-v/S)+P*(p/S)-(p*w-v*_)/S,k=m,P=E):(V=Uk(e),k=V.x+(~T[0].indexOf("%")?k/100*V.width:k),P=V.y+(~(T[1]||T[0]).indexOf("%")?P/100*V.height:P)),i||i!==!1&&a.smooth?(_=k-u,w=P-h,a.xOffset=f+(_*p+w*y)-_,a.yOffset=d+(_*v+w*C)-w):a.xOffset=a.yOffset=0,a.xOrigin=k,a.yOrigin=P,a.smooth=!!i,a.origin=n,a.originIsAbsolute=!!r,e.style[Mr]="0px 0px",o&&(so(o,a,"xOrigin",u,k),so(o,a,"yOrigin",h,P),so(o,a,"xOffset",f,a.xOffset),so(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",k+" "+P)},zh=function(e,n){var r=e._gsap||new Rk(e);if("x"in r&&!n&&!r.uncache)return r;var i=e.style,s=r.scaleX<0,o="px",a="deg",l=getComputedStyle(e),u=_i(e,Mr)||"0",h,f,d,p,v,y,C,_,w,T,k,P,V,S,m,E,A,D,R,b,q,z,ee,J,B,Q,L,O,H,se,ue,he;return h=f=d=y=C=_=w=T=k=0,p=v=1,r.svg=!!(e.getCTM&&Hk(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[Rt]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[Rt]!=="none"?l[Rt]:"")),i.scale=i.rotate=i.translate="none"),S=Pw(e,r.svg),r.svg&&(r.uncache?(B=e.getBBox(),u=r.xOrigin-B.x+"px "+(r.yOrigin-B.y)+"px",J=""):J=!n&&e.getAttribute("data-svg-origin"),wv(e,J||u,!!J||r.originIsAbsolute,r.smooth!==!1,S)),P=r.xOrigin||0,V=r.yOrigin||0,S!==$h&&(D=S[0],R=S[1],b=S[2],q=S[3],h=z=S[4],f=ee=S[5],S.length===6?(p=Math.sqrt(D*D+R*R),v=Math.sqrt(q*q+b*b),y=D||R?Ya(R,D)*Xo:0,w=b||q?Ya(b,q)*Xo+y:0,w&&(v*=Math.abs(Math.cos(w*Bl))),r.svg&&(h-=P-(P*D+V*b),f-=V-(P*R+V*q))):(he=S[6],se=S[7],L=S[8],O=S[9],H=S[10],ue=S[11],h=S[12],f=S[13],d=S[14],m=Ya(he,H),C=m*Xo,m&&(E=Math.cos(-m),A=Math.sin(-m),J=z*E+L*A,B=ee*E+O*A,Q=he*E+H*A,L=z*-A+L*E,O=ee*-A+O*E,H=he*-A+H*E,ue=se*-A+ue*E,z=J,ee=B,he=Q),m=Ya(-b,H),_=m*Xo,m&&(E=Math.cos(-m),A=Math.sin(-m),J=D*E-L*A,B=R*E-O*A,Q=b*E-H*A,ue=q*A+ue*E,D=J,R=B,b=Q),m=Ya(R,D),y=m*Xo,m&&(E=Math.cos(m),A=Math.sin(m),J=D*E+R*A,B=z*E+ee*A,R=R*E-D*A,ee=ee*E-z*A,D=J,z=B),C&&Math.abs(C)+Math.abs(y)>359.9&&(C=y=0,_=180-_),p=Bt(Math.sqrt(D*D+R*R+b*b)),v=Bt(Math.sqrt(ee*ee+he*he)),m=Ya(z,ee),w=Math.abs(m)>2e-4?m*Xo:0,k=ue?1/(ue<0?-ue:ue):0),r.svg&&(J=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!qk(_i(e,Rt)),J&&e.setAttribute("transform",J))),Math.abs(w)>90&&Math.abs(w)<270&&(s?(p*=-1,w+=y<=0?180:-180,y+=y<=0?180:-180):(v*=-1,w+=w<=0?180:-180)),n=n||r.uncache,r.x=h-((r.xPercent=h&&(!n&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+o,r.y=f-((r.yPercent=f&&(!n&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+o,r.z=d+o,r.scaleX=Bt(p),r.scaleY=Bt(v),r.rotation=Bt(y)+a,r.rotationX=Bt(C)+a,r.rotationY=Bt(_)+a,r.skewX=w+a,r.skewY=T+a,r.transformPerspective=k+o,(r.zOrigin=parseFloat(u.split(" ")[2])||!n&&r.zOrigin||0)&&(i[Mr]=qp(u)),r.xOffset=r.yOffset=0,r.force3D=ei.force3D,r.renderTransform=r.svg?ZU:Bk?Kk:JU,r.uncache=0,r},qp=function(e){return(e=e.split(" "))[0]+" "+e[1]},ly=function(e,n,r){var i=Kn(n);return Bt(parseFloat(n)+parseFloat(Mo(e,"x",r+"px",i)))+i},JU=function(e,n){n.z="0px",n.rotationY=n.rotationX="0deg",n.force3D=0,Kk(e,n)},Wo="0deg",Zu="0px",qo=") ",Kk=function(e,n){var r=n||this,i=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.z,u=r.rotation,h=r.rotationY,f=r.rotationX,d=r.skewX,p=r.skewY,v=r.scaleX,y=r.scaleY,C=r.transformPerspective,_=r.force3D,w=r.target,T=r.zOrigin,k="",P=_==="auto"&&e&&e!==1||_===!0;if(T&&(f!==Wo||h!==Wo)){var V=parseFloat(h)*Bl,S=Math.sin(V),m=Math.cos(V),E;V=parseFloat(f)*Bl,E=Math.cos(V),o=ly(w,o,S*E*-T),a=ly(w,a,-Math.sin(V)*-T),l=ly(w,l,m*E*-T+T)}C!==Zu&&(k+="perspective("+C+qo),(i||s)&&(k+="translate("+i+"%, "+s+"%) "),(P||o!==Zu||a!==Zu||l!==Zu)&&(k+=l!==Zu||P?"translate3d("+o+", "+a+", "+l+") ":"translate("+o+", "+a+qo),u!==Wo&&(k+="rotate("+u+qo),h!==Wo&&(k+="rotateY("+h+qo),f!==Wo&&(k+="rotateX("+f+qo),(d!==Wo||p!==Wo)&&(k+="skew("+d+", "+p+qo),(v!==1||y!==1)&&(k+="scale("+v+", "+y+qo),w.style[Rt]=k||"translate(0, 0)"},ZU=function(e,n){var r=n||this,i=r.xPercent,s=r.yPercent,o=r.x,a=r.y,l=r.rotation,u=r.skewX,h=r.skewY,f=r.scaleX,d=r.scaleY,p=r.target,v=r.xOrigin,y=r.yOrigin,C=r.xOffset,_=r.yOffset,w=r.forceCSS,T=parseFloat(o),k=parseFloat(a),P,V,S,m,E;l=parseFloat(l),u=parseFloat(u),h=parseFloat(h),h&&(h=parseFloat(h),u+=h,l+=h),l||u?(l*=Bl,u*=Bl,P=Math.cos(l)*f,V=Math.sin(l)*f,S=Math.sin(l-u)*-d,m=Math.cos(l-u)*d,u&&(h*=Bl,E=Math.tan(u-h),E=Math.sqrt(1+E*E),S*=E,m*=E,h&&(E=Math.tan(h),E=Math.sqrt(1+E*E),P*=E,V*=E)),P=Bt(P),V=Bt(V),S=Bt(S),m=Bt(m)):(P=f,m=d,V=S=0),(T&&!~(o+"").indexOf("px")||k&&!~(a+"").indexOf("px"))&&(T=Mo(p,"x",o,"px"),k=Mo(p,"y",a,"px")),(v||y||C||_)&&(T=Bt(T+v-(v*P+y*S)+C),k=Bt(k+y-(v*V+y*m)+_)),(i||s)&&(E=p.getBBox(),T=Bt(T+i/100*E.width),k=Bt(k+s/100*E.height)),E="matrix("+P+","+V+","+S+","+m+","+T+","+k+")",p.setAttribute("transform",E),w&&(p.style[Rt]=E)},e7=function(e,n,r,i,s){var o=360,a=wn(s),l=parseFloat(s)*(a&&~s.indexOf("rad")?Xo:1),u=l-i,h=i+u+"deg",f,d;return a&&(f=s.split("_")[1],f==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),f==="cw"&&u<0?u=(u+o*xS)%o-~~(u/o)*o:f==="ccw"&&u>0&&(u=(u-o*xS)%o-~~(u/o)*o)),e._pt=d=new Dr(e._pt,n,r,i,u,OU),d.e=h,d.u="deg",e._props.push(r),d},AS=function(e,n){for(var r in n)e[r]=n[r];return e},t7=function(e,n,r){var i=AS({},r._gsap),s="perspective,force3D,transformOrigin,svgOrigin",o=r.style,a,l,u,h,f,d,p,v;i.svg?(u=r.getAttribute("transform"),r.setAttribute("transform",""),o[Rt]=n,a=zh(r,1),ka(r,Rt),r.setAttribute("transform",u)):(u=getComputedStyle(r)[Rt],o[Rt]=n,a=zh(r,1),o[Rt]=u);for(l in Vs)u=i[l],h=a[l],u!==h&&s.indexOf(l)<0&&(p=Kn(u),v=Kn(h),f=p!==v?Mo(r,l,u,v):parseFloat(u),d=parseFloat(h),e._pt=new Dr(e._pt,a,l,f,d-f,yv),e._pt.u=v||0,e._props.push(l));AS(a,i)};kr("padding,margin,Width,Radius",function(t,e){var n="Top",r="Right",i="Bottom",s="Left",o=(e<3?[n,r,i,s]:[n+s,n+r,i+r,i+s]).map(function(a){return e<2?t+a:"border"+a+t});Wp[e>1?"border"+t:t]=function(a,l,u,h,f){var d,p;if(arguments.length<4)return d=o.map(function(v){return _s(a,v,u)}),p=d.join(" "),p.split(d[0]).length===5?d[0]:p;d=(h+"").split(" "),p={},o.forEach(function(v,y){return p[v]=d[y]=d[y]||d[(y-1)/2|0]}),a.init(l,p,f)}});var Gk={name:"css",register:_v,targetTest:function(e){return e.style&&e.nodeType},init:function(e,n,r,i,s){var o=this._props,a=e.style,l=r.vars.startAt,u,h,f,d,p,v,y,C,_,w,T,k,P,V,S,m;bw||_v(),this.styles=this.styles||zk(e),m=this.styles.props,this.tween=r;for(y in n)if(y!=="autoRound"&&(h=n[y],!(Kr[y]&&Ik(y,n,r,i,e,s)))){if(p=typeof h,v=Wp[y],p==="function"&&(h=h.call(r,i,e,s),p=typeof h),p==="string"&&~h.indexOf("random(")&&(h=Oh(h)),v)v(this,e,y,h,r)&&(S=1);else if(y.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(y)+"").trim(),h+="",wo.lastIndex=0,wo.test(u)||(C=Kn(u),_=Kn(h)),_?C!==_&&(u=Mo(e,y,u,_)+_):C&&(h+=C),this.add(a,"setProperty",u,h,i,s,0,0,y),o.push(y),m.push(y,0,a[y]);else if(p!=="undefined"){if(l&&y in l?(u=typeof l[y]=="function"?l[y].call(r,i,e,s):l[y],wn(u)&&~u.indexOf("random(")&&(u=Oh(u)),Kn(u+"")||u==="auto"||(u+=ei.units[y]||Kn(_s(e,y))||""),(u+"").charAt(1)==="="&&(u=_s(e,y))):u=_s(e,y),d=parseFloat(u),w=p==="string"&&h.charAt(1)==="="&&h.substr(0,2),w&&(h=h.substr(2)),f=parseFloat(h),y in Ji&&(y==="autoAlpha"&&(d===1&&_s(e,"visibility")==="hidden"&&f&&(d=0),m.push("visibility",0,a.visibility),so(this,a,"visibility",d?"inherit":"hidden",f?"inherit":"hidden",!f)),y!=="scale"&&y!=="transform"&&(y=Ji[y],~y.indexOf(",")&&(y=y.split(",")[0]))),T=y in Vs,T){if(this.styles.save(y),p==="string"&&h.substring(0,6)==="var(--"&&(h=_i(e,h.substring(4,h.indexOf(")"))),f=parseFloat(h)),k||(P=e._gsap,P.renderTransform&&!n.parseTransform||zh(e,n.parseTransform),V=n.smoothOrigin!==!1&&P.smooth,k=this._pt=new Dr(this._pt,a,Rt,0,1,P.renderTransform,P,0,-1),k.dep=1),y==="scale")this._pt=new Dr(this._pt,P,"scaleY",P.scaleY,(w?$l(P.scaleY,w+f):f)-P.scaleY||0,yv),this._pt.u=0,o.push("scaleY",y),y+="X";else if(y==="transformOrigin"){m.push(Mr,0,a[Mr]),h=QU(h),P.svg?wv(e,h,0,V,0,this):(_=parseFloat(h.split(" ")[2])||0,_!==P.zOrigin&&so(this,P,"zOrigin",P.zOrigin,_),so(this,a,y,qp(u),qp(h)));continue}else if(y==="svgOrigin"){wv(e,h,1,V,0,this);continue}else if(y in Wk){e7(this,P,y,d,w?$l(d,w+h):h);continue}else if(y==="smoothOrigin"){so(this,P,"smooth",P.smooth,h);continue}else if(y==="force3D"){P[y]=h;continue}else if(y==="transform"){t7(this,h,e);continue}}else y in a||(y=pu(y)||y);if(T||(f||f===0)&&(d||d===0)&&!LU.test(h)&&y in a)C=(u+"").substr((d+"").length),f||(f=0),_=Kn(h)||(y in ei.units?ei.units[y]:C),C!==_&&(d=Mo(e,y,u,_)),this._pt=new Dr(this._pt,T?P:a,y,d,(w?$l(d,w+f):f)-d,!T&&(_==="px"||y==="zIndex")&&n.autoRound!==!1?jU:yv),this._pt.u=_||0,C!==_&&_!=="%"&&(this._pt.b=u,this._pt.r=FU);else if(y in a)YU.call(this,e,y,u,w?w+h:h);else if(y in e)this.add(e,y,u||e[y],w?w+h:h,i,s);else if(y!=="parseTransform"){pw(y,h);continue}T||(y in a?m.push(y,0,a[y]):typeof e[y]=="function"?m.push(y,2,e[y]()):m.push(y,1,u||e[y])),o.push(y)}}S&&Lk(this)},render:function(e,n){if(n.tween._time||!Sw())for(var r=n._pt;r;)r.r(e,r.d),r=r._next;else n.styles.revert()},get:_s,aliases:Ji,getSetter:function(e,n,r){var i=Ji[n];return i&&i.indexOf(",")<0&&(n=i),n in Vs&&n!==Mr&&(e._gsap.x||_s(e,"x"))?r&&wS===r?n==="scale"?UU:BU:(wS=r||{})&&(n==="scale"?HU:WU):e.style&&!hw(e.style[n])?$U:~n.indexOf("-")?zU:Tw(e,n)},core:{_removeProperty:ka,_getMatrix:Pw}};Vr.utils.checkPrefix=pu;Vr.core.getStyleSaver=zk;(function(t,e,n,r){var i=kr(t+","+e+","+n,function(s){Vs[s]=1});kr(e,function(s){ei.units[s]="deg",Wk[s]=1}),Ji[i[13]]=t+","+e,kr(r,function(s){var o=s.split(":");Ji[o[1]]=i[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");kr("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){ei.units[t]="px"});Vr.registerPlugin(Gk);var Kp=Vr.registerPlugin(Gk)||Vr;Kp.core.Tween;function n7(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r7(t,e,n){return e&&n7(t.prototype,e),t}/*! * Observer 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var An,Hd,Qr,oo,ao,Ul,Yk,Jo,Hc,Qk,Es,Ri,Xk,Jk=function(){return An||typeof window<"u"&&(An=window.gsap)&&An.registerPlugin&&An},Zk=1,Cl=[],Fe=[],us=[],Wc=Date.now,xv=function(e,n){return n},i7=function(){var e=Hc.core,n=e.bridge||{},r=e._scrollers,i=e._proxies;r.push.apply(r,Fe),i.push.apply(i,us),Fe=r,us=i,xv=function(o,a){return n[o](a)}},xo=function(e,n){return~us.indexOf(e)&&us[us.indexOf(e)+1][n]},qc=function(e){return!!~Qk.indexOf(e)},sr=function(e,n,r,i,s){return e.addEventListener(n,r,{passive:i!==!1,capture:!!s})},ir=function(e,n,r,i){return e.removeEventListener(n,r,!!i)},Jf="scrollLeft",Zf="scrollTop",Tv=function(){return Es&&Es.isPressed||Fe.cache++},Gp=function(e,n){var r=function i(s){if(s||s===0){Zk&&(Qr.history.scrollRestoration="manual");var o=Es&&Es.isPressed;s=i.v=Math.round(s)||(Es&&Es.iOS?1:0),e(s),i.cacheID=Fe.cache,o&&xv("ss",s)}else(n||Fe.cache!==i.cacheID||xv("ref"))&&(i.cacheID=Fe.cache,i.v=e());return i.v+i.offset};return r.offset=0,e&&r},dr={s:Jf,p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:Gp(function(t){return arguments.length?Qr.scrollTo(t,un.sc()):Qr.pageXOffset||oo[Jf]||ao[Jf]||Ul[Jf]||0})},un={s:Zf,p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:dr,sc:Gp(function(t){return arguments.length?Qr.scrollTo(dr.sc(),t):Qr.pageYOffset||oo[Zf]||ao[Zf]||Ul[Zf]||0})},Tr=function(e,n){return(n&&n._ctx&&n._ctx.selector||An.utils.toArray)(e)[0]||(typeof e=="string"&&An.config().nullTargetWarn!==!1?console.warn("Element not found:",e):null)},s7=function(e,n){for(var r=n.length;r--;)if(n[r]===e||n[r].contains(e))return!0;return!1},No=function(e,n){var r=n.s,i=n.sc;qc(e)&&(e=oo.scrollingElement||ao);var s=Fe.indexOf(e),o=i===un.sc?1:2;!~s&&(s=Fe.push(e)-1),Fe[s+o]||sr(e,"scroll",Tv);var a=Fe[s+o],l=a||(Fe[s+o]=Gp(xo(e,r),!0)||(qc(e)?i:Gp(function(u){return arguments.length?e[r]=u:e[r]})));return l.target=e,a||(l.smooth=An.getProperty(e,"scrollBehavior")==="smooth"),l},Ev=function(e,n,r){var i=e,s=e,o=Wc(),a=o,l=n||50,u=Math.max(500,l*3),h=function(v,y){var C=Wc();y||C-o>l?(s=i,i=v,a=o,o=C):r?i+=v:i=s+(v-s)/(C-a)*(o-a)},f=function(){s=i=r?0:i,a=o=0},d=function(v){var y=a,C=s,_=Wc();return(v||v===0)&&v!==i&&h(v),o===a||_-a>u?0:(i+(r?C:-C))/((r?_:o)-y)*1e3};return{update:h,reset:f,getVelocity:d}},ec=function(e,n){return n&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},RS=function(e){var n=Math.max.apply(Math,e),r=Math.min.apply(Math,e);return Math.abs(n)>=Math.abs(r)?n:r},eD=function(){Hc=An.core.globals().ScrollTrigger,Hc&&Hc.core&&i7()},tD=function(e){return An=e||Jk(),!Hd&&An&&typeof document<"u"&&document.body&&(Qr=window,oo=document,ao=oo.documentElement,Ul=oo.body,Qk=[Qr,oo,ao,Ul],An.utils.clamp,Xk=An.core.context||function(){},Jo="onpointerenter"in Ul?"pointer":"mouse",Yk=Ht.isTouch=Qr.matchMedia&&Qr.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in Qr||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,Ri=Ht.eventTypes=("ontouchstart"in ao?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in ao?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout(function(){return Zk=0},500),eD(),Hd=1),Hd};dr.op=un;Fe.cache=0;var Ht=function(){function t(n){this.init(n)}var e=t.prototype;return e.init=function(r){Hd||tD(An)||console.warn("Please gsap.registerPlugin(Observer)"),Hc||eD();var i=r.tolerance,s=r.dragMinimum,o=r.type,a=r.target,l=r.lineHeight,u=r.debounce,h=r.preventDefault,f=r.onStop,d=r.onStopDelay,p=r.ignore,v=r.wheelSpeed,y=r.event,C=r.onDragStart,_=r.onDragEnd,w=r.onDrag,T=r.onPress,k=r.onRelease,P=r.onRight,V=r.onLeft,S=r.onUp,m=r.onDown,E=r.onChangeX,A=r.onChangeY,D=r.onChange,R=r.onToggleX,b=r.onToggleY,q=r.onHover,z=r.onHoverEnd,ee=r.onMove,J=r.ignoreCheck,B=r.isNormalizer,Q=r.onGestureStart,L=r.onGestureEnd,O=r.onWheel,H=r.onEnable,se=r.onDisable,ue=r.onClick,he=r.scrollSpeed,be=r.capture,we=r.allowClicks,Me=r.lockAxis,ve=r.onLockAxis;this.target=a=Tr(a)||ao,this.vars=r,p&&(p=An.utils.toArray(p)),i=i||1e-9,s=s||0,v=v||1,he=he||1,o=o||"wheel,touch,pointer",u=u!==!1,l||(l=parseFloat(Qr.getComputedStyle(Ul).lineHeight)||22);var Ze,Et,qt,Ce,at,Kt,rn,G=this,xn=0,vr=0,_r=r.passive||!h&&r.passive!==!1,Ye=No(a,dr),Tn=No(a,un),Jn=Ye(),Zn=Tn(),rt=~o.indexOf("touch")&&!~o.indexOf("pointer")&&Ri[0]==="pointerdown",Ue=qc(a),Ne=a.ownerDocument||oo,Gt=[0,0,0],En=[0,0,0],jt=0,Bi=function(){return jt=Wc()},st=function($,W){return(G.event=$)&&p&&s7($.target,p)||W&&rt&&$.pointerType!=="touch"||J&&J($,W)},Ui=function(){G._vx.reset(),G._vy.reset(),Et.pause(),f&&f(G)},wr=function(){var $=G.deltaX=RS(Gt),W=G.deltaY=RS(En),K=Math.abs($)>=i,ne=Math.abs(W)>=i;D&&(K||ne)&&D(G,$,W,Gt,En),K&&(P&&G.deltaX>0&&P(G),V&&G.deltaX<0&&V(G),E&&E(G),R&&G.deltaX<0!=xn<0&&R(G),xn=G.deltaX,Gt[0]=Gt[1]=Gt[2]=0),ne&&(m&&G.deltaY>0&&m(G),S&&G.deltaY<0&&S(G),A&&A(G),b&&G.deltaY<0!=vr<0&&b(G),vr=G.deltaY,En[0]=En[1]=En[2]=0),(Ce||qt)&&(ee&&ee(G),qt&&(C&&qt===1&&C(G),w&&w(G),qt=0),Ce=!1),Kt&&!(Kt=!1)&&ve&&ve(G),at&&(O(G),at=!1),Ze=0},Lr=function($,W,K){Gt[K]+=$,En[K]+=W,G._vx.update($),G._vy.update(W),u?Ze||(Ze=requestAnimationFrame(wr)):wr()},Or=function($,W){Me&&!rn&&(G.axis=rn=Math.abs($)>Math.abs(W)?"x":"y",Kt=!0),rn!=="y"&&(Gt[2]+=$,G._vx.update($,!0)),rn!=="x"&&(En[2]+=W,G._vy.update(W,!0)),u?Ze||(Ze=requestAnimationFrame(wr)):wr()},Fr=function($){if(!st($,1)){$=ec($,h);var W=$.clientX,K=$.clientY,ne=W-G.x,re=K-G.y,te=G.isDragging;G.x=W,G.y=K,(te||(ne||re)&&(Math.abs(G.startX-W)>=s||Math.abs(G.startY-K)>=s))&&(qt=te?2:1,te||(G.isDragging=!0),Or(ne,re))}},er=G.onPress=function(F){st(F,1)||F&&F.button||(G.axis=rn=null,Et.pause(),G.isPressed=!0,F=ec(F),xn=vr=0,G.startX=G.x=F.clientX,G.startY=G.y=F.clientY,G._vx.reset(),G._vy.reset(),sr(B?a:Ne,Ri[1],Fr,_r,!0),G.deltaX=G.deltaY=0,T&&T(G))},Ie=G.onRelease=function(F){if(!st(F,1)){ir(B?a:Ne,Ri[1],Fr,!0);var $=!isNaN(G.y-G.startY),W=G.isDragging,K=W&&(Math.abs(G.x-G.startX)>3||Math.abs(G.y-G.startY)>3),ne=ec(F);!K&&$&&(G._vx.reset(),G._vy.reset(),h&&we&&An.delayedCall(.08,function(){if(Wc()-jt>300&&!F.defaultPrevented){if(F.target.click)F.target.click();else if(Ne.createEvent){var re=Ne.createEvent("MouseEvents");re.initMouseEvent("click",!0,!0,Qr,1,ne.screenX,ne.screenY,ne.clientX,ne.clientY,!1,!1,!1,!1,0,null),F.target.dispatchEvent(re)}}})),G.isDragging=G.isGesturing=G.isPressed=!1,f&&W&&!B&&Et.restart(!0),qt&&wr(),_&&W&&_(G),k&&k(G,K)}},jr=function($){return $.touches&&$.touches.length>1&&(G.isGesturing=!0)&&Q($,G.isDragging)},sn=function(){return(G.isGesturing=!1)||L(G)},fn=function($){if(!st($)){var W=Ye(),K=Tn();Lr((W-Jn)*he,(K-Zn)*he,1),Jn=W,Zn=K,f&&Et.restart(!0)}},Yt=function($){if(!st($)){$=ec($,h),O&&(at=!0);var W=($.deltaMode===1?l:$.deltaMode===2?Qr.innerHeight:1)*v;Lr($.deltaX*W,$.deltaY*W,0),f&&!B&&Et.restart(!0)}},Qt=function($){if(!st($)){var W=$.clientX,K=$.clientY,ne=W-G.x,re=K-G.y;G.x=W,G.y=K,Ce=!0,f&&Et.restart(!0),(ne||re)&&Or(ne,re)}},Si=function($){G.event=$,q(G)},Mn=function($){G.event=$,z(G)},j=function($){return st($)||ec($,h)&&ue(G)};Et=G._dc=An.delayedCall(d||.25,Ui).pause(),G.deltaX=G.deltaY=0,G._vx=Ev(0,50,!0),G._vy=Ev(0,50,!0),G.scrollX=Ye,G.scrollY=Tn,G.isDragging=G.isGesturing=G.isPressed=!1,Xk(this),G.enable=function(F){return G.isEnabled||(sr(Ue?Ne:a,"scroll",Tv),o.indexOf("scroll")>=0&&sr(Ue?Ne:a,"scroll",fn,_r,be),o.indexOf("wheel")>=0&&sr(a,"wheel",Yt,_r,be),(o.indexOf("touch")>=0&&Yk||o.indexOf("pointer")>=0)&&(sr(a,Ri[0],er,_r,be),sr(Ne,Ri[2],Ie),sr(Ne,Ri[3],Ie),we&&sr(a,"click",Bi,!0,!0),ue&&sr(a,"click",j),Q&&sr(Ne,"gesturestart",jr),L&&sr(Ne,"gestureend",sn),q&&sr(a,Jo+"enter",Si),z&&sr(a,Jo+"leave",Mn),ee&&sr(a,Jo+"move",Qt)),G.isEnabled=!0,G.isDragging=G.isGesturing=G.isPressed=Ce=qt=!1,G._vx.reset(),G._vy.reset(),Jn=Ye(),Zn=Tn(),F&&F.type&&er(F),H&&H(G)),G},G.disable=function(){G.isEnabled&&(Cl.filter(function(F){return F!==G&&qc(F.target)}).length||ir(Ue?Ne:a,"scroll",Tv),G.isPressed&&(G._vx.reset(),G._vy.reset(),ir(B?a:Ne,Ri[1],Fr,!0)),ir(Ue?Ne:a,"scroll",fn,be),ir(a,"wheel",Yt,be),ir(a,Ri[0],er,be),ir(Ne,Ri[2],Ie),ir(Ne,Ri[3],Ie),ir(a,"click",Bi,!0),ir(a,"click",j),ir(Ne,"gesturestart",jr),ir(Ne,"gestureend",sn),ir(a,Jo+"enter",Si),ir(a,Jo+"leave",Mn),ir(a,Jo+"move",Qt),G.isEnabled=G.isPressed=G.isDragging=!1,se&&se(G))},G.kill=G.revert=function(){G.disable();var F=Cl.indexOf(G);F>=0&&Cl.splice(F,1),Es===G&&(Es=0)},Cl.push(G),B&&qc(a)&&(Es=G),G.enable(y)},r7(t,[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}]),t}();Ht.version="3.13.0";Ht.create=function(t){return new Ht(t)};Ht.register=tD;Ht.getAll=function(){return Cl.slice()};Ht.getById=function(t){return Cl.filter(function(e){return e.vars.id===t})[0]};Jk()&&An.registerPlugin(Ht);/*! * ScrollTrigger 3.13.0 * https://gsap.com * * @license Copyright 2008-2025, GreenSock. All rights reserved. * Subject to the terms at https://gsap.com/standard-license * @author: Jack Doyle, jack@greensock.com */var ge,rl,Oe,pt,Gr,it,Aw,Yp,Bh,Kc,vc,ed,$n,Wm,bv,ur,IS,kS,il,nD,uy,rD,ar,Sv,iD,sD,Ks,Cv,Rw,Hl,Iw,Qp,Pv,cy,td=1,Un=Date.now,hy=Un(),Ti=0,_c=0,DS=function(e,n,r){var i=Wr(e)&&(e.substr(0,6)==="clamp("||e.indexOf("max")>-1);return r["_"+n+"Clamp"]=i,i?e.substr(6,e.length-7):e},MS=function(e,n){return n&&(!Wr(e)||e.substr(0,6)!=="clamp(")?"clamp("+e+")":e},o7=function t(){return _c&&requestAnimationFrame(t)},NS=function(){return Wm=1},VS=function(){return Wm=0},Gi=function(e){return e},wc=function(e){return Math.round(e*1e5)/1e5||0},oD=function(){return typeof window<"u"},aD=function(){return ge||oD()&&(ge=window.gsap)&&ge.registerPlugin&&ge},Da=function(e){return!!~Aw.indexOf(e)},lD=function(e){return(e==="Height"?Iw:Oe["inner"+e])||Gr["client"+e]||it["client"+e]},uD=function(e){return xo(e,"getBoundingClientRect")||(Da(e)?function(){return Yd.width=Oe.innerWidth,Yd.height=Iw,Yd}:function(){return ws(e)})},a7=function(e,n,r){var i=r.d,s=r.d2,o=r.a;return(o=xo(e,"getBoundingClientRect"))?function(){return o()[i]}:function(){return(n?lD(s):e["client"+s])||0}},l7=function(e,n){return!n||~us.indexOf(e)?uD(e):function(){return Yd}},Zi=function(e,n){var r=n.s,i=n.d2,s=n.d,o=n.a;return Math.max(0,(r="scroll"+i)&&(o=xo(e,r))?o()-uD(e)()[s]:Da(e)?(Gr[r]||it[r])-lD(i):e[r]-e["offset"+i])},nd=function(e,n){for(var r=0;r<il.length;r+=3)(!n||~n.indexOf(il[r+1]))&&e(il[r],il[r+1],il[r+2])},Wr=function(e){return typeof e=="string"},Gn=function(e){return typeof e=="function"},xc=function(e){return typeof e=="number"},Zo=function(e){return typeof e=="object"},tc=function(e,n,r){return e&&e.progress(n?0:1)&&r&&e.pause()},fy=function(e,n){if(e.enabled){var r=e._ctx?e._ctx.add(function(){return n(e)}):n(e);r&&r.totalTime&&(e.callbackAnimation=r)}},Qa=Math.abs,cD="left",hD="top",kw="right",Dw="bottom",Ta="width",Ea="height",Gc="Right",Yc="Left",Qc="Top",Xc="Bottom",Jt="padding",fi="margin",mu="Width",Mw="Height",an="px",di=function(e){return Oe.getComputedStyle(e)},u7=function(e){var n=di(e).position;e.style.position=n==="absolute"||n==="fixed"?n:"relative"},LS=function(e,n){for(var r in n)r in e||(e[r]=n[r]);return e},ws=function(e,n){var r=n&&di(e)[bv]!=="matrix(1, 0, 0, 1, 0, 0)"&&ge.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=e.getBoundingClientRect();return r&&r.progress(0).kill(),i},Xp=function(e,n){var r=n.d2;return e["offset"+r]||e["client"+r]||0},fD=function(e){var n=[],r=e.labels,i=e.duration(),s;for(s in r)n.push(r[s]/i);return n},c7=function(e){return function(n){return ge.utils.snap(fD(e),n)}},Nw=function(e){var n=ge.utils.snap(e),r=Array.isArray(e)&&e.slice(0).sort(function(i,s){return i-s});return r?function(i,s,o){o===void 0&&(o=.001);var a;if(!s)return n(i);if(s>0){for(i-=o,a=0;a<r.length;a++)if(r[a]>=i)return r[a];return r[a-1]}else for(a=r.length,i+=o;a--;)if(r[a]<=i)return r[a];return r[0]}:function(i,s,o){o===void 0&&(o=.001);var a=n(i);return!s||Math.abs(a-i)<o||a-i<0==s<0?a:n(s<0?i-e:i+e)}},h7=function(e){return function(n,r){return Nw(fD(e))(n,r.direction)}},rd=function(e,n,r,i){return r.split(",").forEach(function(s){return e(n,s,i)})},mn=function(e,n,r,i,s){return e.addEventListener(n,r,{passive:!i,capture:!!s})},pn=function(e,n,r,i){return e.removeEventListener(n,r,!!i)},id=function(e,n,r){r=r&&r.wheelHandler,r&&(e(n,"wheel",r),e(n,"touchmove",r))},OS={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},sd={toggleActions:"play",anticipatePin:0},Jp={top:0,left:0,center:.5,bottom:1,right:1},Wd=function(e,n){if(Wr(e)){var r=e.indexOf("="),i=~r?+(e.charAt(r-1)+1)*parseFloat(e.substr(r+1)):0;~r&&(e.indexOf("%")>r&&(i*=n/100),e=e.substr(0,r-1)),e=i+(e in Jp?Jp[e]*n:~e.indexOf("%")?parseFloat(e)*n/100:parseFloat(e)||0)}return e},od=function(e,n,r,i,s,o,a,l){var u=s.startColor,h=s.endColor,f=s.fontSize,d=s.indent,p=s.fontWeight,v=pt.createElement("div"),y=Da(r)||xo(r,"pinType")==="fixed",C=e.indexOf("scroller")!==-1,_=y?it:r,w=e.indexOf("start")!==-1,T=w?u:h,k="border-color:"+T+";font-size:"+f+";color:"+T+";font-weight:"+p+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return k+="position:"+((C||l)&&y?"fixed;":"absolute;"),(C||l||!y)&&(k+=(i===un?kw:Dw)+":"+(o+parseFloat(d))+"px;"),a&&(k+="box-sizing:border-box;text-align:left;width:"+a.offsetWidth+"px;"),v._isStart=w,v.setAttribute("class","gsap-marker-"+e+(n?" marker-"+n:"")),v.style.cssText=k,v.innerText=n||n===0?e+"-"+n:e,_.children[0]?_.insertBefore(v,_.children[0]):_.appendChild(v),v._offset=v["offset"+i.op.d2],qd(v,0,i,w),v},qd=function(e,n,r,i){var s={display:"block"},o=r[i?"os2":"p2"],a=r[i?"p2":"os2"];e._isFlipped=i,s[r.a+"Percent"]=i?-100:0,s[r.a]=i?"1px":0,s["border"+o+mu]=1,s["border"+a+mu]=0,s[r.p]=n+"px",ge.set(e,s)},Le=[],Av={},Uh,FS=function(){return Un()-Ti>34&&(Uh||(Uh=requestAnimationFrame(Ss)))},Xa=function(){(!ar||!ar.isPressed||ar.startX>it.clientWidth)&&(Fe.cache++,ar?Uh||(Uh=requestAnimationFrame(Ss)):Ss(),Ti||Na("scrollStart"),Ti=Un())},dy=function(){sD=Oe.innerWidth,iD=Oe.innerHeight},Tc=function(e){Fe.cache++,(e===!0||!$n&&!rD&&!pt.fullscreenElement&&!pt.webkitFullscreenElement&&(!Sv||sD!==Oe.innerWidth||Math.abs(Oe.innerHeight-iD)>Oe.innerHeight*.25))&&Yp.restart(!0)},Ma={},f7=[],dD=function t(){return pn(Ve,"scrollEnd",t)||ua(!0)},Na=function(e){return Ma[e]&&Ma[e].map(function(n){return n()})||f7},Ur=[],pD=function(e){for(var n=0;n<Ur.length;n+=5)(!e||Ur[n+4]&&Ur[n+4].query===e)&&(Ur[n].style.cssText=Ur[n+1],Ur[n].getBBox&&Ur[n].setAttribute("transform",Ur[n+2]||""),Ur[n+3].uncache=1)},Vw=function(e,n){var r;for(ur=0;ur<Le.length;ur++)r=Le[ur],r&&(!n||r._ctx===n)&&(e?r.kill(1):r.revert(!0,!0));Qp=!0,n&&pD(n),n||Na("revert")},mD=function(e,n){Fe.cache++,(n||!cr)&&Fe.forEach(function(r){return Gn(r)&&r.cacheID++&&(r.rec=0)}),Wr(e)&&(Oe.history.scrollRestoration=Rw=e)},cr,ba=0,jS,d7=function(){if(jS!==ba){var e=jS=ba;requestAnimationFrame(function(){return e===ba&&ua(!0)})}},gD=function(){it.appendChild(Hl),Iw=!ar&&Hl.offsetHeight||Oe.innerHeight,it.removeChild(Hl)},$S=function(e){return Bh(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function(n){return n.style.display=e?"none":"block"})},ua=function(e,n){if(Gr=pt.documentElement,it=pt.body,Aw=[Oe,pt,Gr,it],Ti&&!e&&!Qp){mn(Ve,"scrollEnd",dD);return}gD(),cr=Ve.isRefreshing=!0,Fe.forEach(function(i){return Gn(i)&&++i.cacheID&&(i.rec=i())});var r=Na("refreshInit");nD&&Ve.sort(),n||Vw(),Fe.forEach(function(i){Gn(i)&&(i.smooth&&(i.target.style.scrollBehavior="auto"),i(0))}),Le.slice(0).forEach(function(i){return i.refresh()}),Qp=!1,Le.forEach(function(i){if(i._subPinOffset&&i.pin){var s=i.vars.horizontal?"offsetWidth":"offsetHeight",o=i.pin[s];i.revert(!0,1),i.adjustPinSpacing(i.pin[s]-o),i.refresh()}}),Pv=1,$S(!0),Le.forEach(function(i){var s=Zi(i.scroller,i._dir),o=i.vars.end==="max"||i._endClamp&&i.end>s,a=i._startClamp&&i.start>=s;(o||a)&&i.setPositions(a?s-1:i.start,o?Math.max(a?s:i.start+1,s):i.end,!0)}),$S(!1),Pv=0,r.forEach(function(i){return i&&i.render&&i.render(-1)}),Fe.forEach(function(i){Gn(i)&&(i.smooth&&requestAnimationFrame(function(){return i.target.style.scrollBehavior="smooth"}),i.rec&&i(i.rec))}),mD(Rw,1),Yp.pause(),ba++,cr=2,Ss(2),Le.forEach(function(i){return Gn(i.vars.onRefresh)&&i.vars.onRefresh(i)}),cr=Ve.isRefreshing=!1,Na("refresh")},Rv=0,Kd=1,Jc,Ss=function(e){if(e===2||!cr&&!Qp){Ve.isUpdating=!0,Jc&&Jc.update(0);var n=Le.length,r=Un(),i=r-hy>=50,s=n&&Le[0].scroll();if(Kd=Rv>s?-1:1,cr||(Rv=s),i&&(Ti&&!Wm&&r-Ti>200&&(Ti=0,Na("scrollEnd")),vc=hy,hy=r),Kd<0){for(ur=n;ur-- >0;)Le[ur]&&Le[ur].update(0,i);Kd=1}else for(ur=0;ur<n;ur++)Le[ur]&&Le[ur].update(0,i);Ve.isUpdating=!1}Uh=0},Iv=[cD,hD,Dw,kw,fi+Xc,fi+Gc,fi+Qc,fi+Yc,"display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Gd=Iv.concat([Ta,Ea,"boxSizing","max"+mu,"max"+Mw,"position",fi,Jt,Jt+Qc,Jt+Gc,Jt+Xc,Jt+Yc]),p7=function(e,n,r){Wl(r);var i=e._gsap;if(i.spacerIsNative)Wl(i.spacerState);else if(e._gsap.swappedIn){var s=n.parentNode;s&&(s.insertBefore(e,n),s.removeChild(n))}e._gsap.swappedIn=!1},py=function(e,n,r,i){if(!e._gsap.swappedIn){for(var s=Iv.length,o=n.style,a=e.style,l;s--;)l=Iv[s],o[l]=r[l];o.position=r.position==="absolute"?"absolute":"relative",r.display==="inline"&&(o.display="inline-block"),a[Dw]=a[kw]="auto",o.flexBasis=r.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o[Ta]=Xp(e,dr)+an,o[Ea]=Xp(e,un)+an,o[Jt]=a[fi]=a[hD]=a[cD]="0",Wl(i),a[Ta]=a["max"+mu]=r[Ta],a[Ea]=a["max"+Mw]=r[Ea],a[Jt]=r[Jt],e.parentNode!==n&&(e.parentNode.insertBefore(n,e),n.appendChild(e)),e._gsap.swappedIn=!0}},m7=/([A-Z])/g,Wl=function(e){if(e){var n=e.t.style,r=e.length,i=0,s,o;for((e.t._gsap||ge.core.getCache(e.t)).uncache=1;i<r;i+=2)o=e[i+1],s=e[i],o?n[s]=o:n[s]&&n.removeProperty(s.replace(m7,"-$1").toLowerCase())}},ad=function(e){for(var n=Gd.length,r=e.style,i=[],s=0;s<n;s++)i.push(Gd[s],r[Gd[s]]);return i.t=e,i},g7=function(e,n,r){for(var i=[],s=e.length,o=r?8:0,a;o<s;o+=2)a=e[o],i.push(a,a in n?n[a]:e[o+1]);return i.t=e.t,i},Yd={left:0,top:0},zS=function(e,n,r,i,s,o,a,l,u,h,f,d,p,v){Gn(e)&&(e=e(l)),Wr(e)&&e.substr(0,3)==="max"&&(e=d+(e.charAt(4)==="="?Wd("0"+e.substr(3),r):0));var y=p?p.time():0,C,_,w;if(p&&p.seek(0),isNaN(e)||(e=+e),xc(e))p&&(e=ge.utils.mapRange(p.scrollTrigger.start,p.scrollTrigger.end,0,d,e)),a&&qd(a,r,i,!0);else{Gn(n)&&(n=n(l));var T=(e||"0").split(" "),k,P,V,S;w=Tr(n,l)||it,k=ws(w)||{},(!k||!k.left&&!k.top)&&di(w).display==="none"&&(S=w.style.display,w.style.display="block",k=ws(w),S?w.style.display=S:w.style.removeProperty("display")),P=Wd(T[0],k[i.d]),V=Wd(T[1]||"0",r),e=k[i.p]-u[i.p]-h+P+s-V,a&&qd(a,V,i,r-V<20||a._isStart&&V>20),r-=r-V}if(v&&(l[v]=e||-.001,e<0&&(e=0)),o){var m=e+r,E=o._isStart;C="scroll"+i.d2,qd(o,m,i,E&&m>20||!E&&(f?Math.max(it[C],Gr[C]):o.parentNode[C])<=m+1),f&&(u=ws(a),f&&(o.style[i.op.p]=u[i.op.p]-i.op.m-o._offset+an))}return p&&w&&(C=ws(w),p.seek(d),_=ws(w),p._caScrollDist=C[i.p]-_[i.p],e=e/p._caScrollDist*d),p&&p.seek(y),p?e:Math.round(e)},y7=/(webkit|moz|length|cssText|inset)/i,BS=function(e,n,r,i){if(e.parentNode!==n){var s=e.style,o,a;if(n===it){e._stOrig=s.cssText,a=di(e);for(o in a)!+o&&!y7.test(o)&&a[o]&&typeof s[o]=="string"&&o!=="0"&&(s[o]=a[o]);s.top=r,s.left=i}else s.cssText=e._stOrig;ge.core.getCache(e).uncache=1,n.appendChild(e)}},yD=function(e,n,r){var i=n,s=i;return function(o){var a=Math.round(e());return a!==i&&a!==s&&Math.abs(a-i)>3&&Math.abs(a-s)>3&&(o=a,r&&r()),s=i,i=Math.round(o),i}},ld=function(e,n,r){var i={};i[n.p]="+="+r,ge.set(e,i)},US=function(e,n){var r=No(e,n),i="_scroll"+n.p2,s=function o(a,l,u,h,f){var d=o.tween,p=l.onComplete,v={};u=u||r();var y=yD(r,u,function(){d.kill(),o.tween=0});return f=h&&f||0,h=h||a-u,d&&d.kill(),l[i]=a,l.inherit=!1,l.modifiers=v,v[i]=function(){return y(u+h*d.ratio+f*d.ratio*d.ratio)},l.onUpdate=function(){Fe.cache++,o.tween&&Ss()},l.onComplete=function(){o.tween=0,p&&p.call(d)},d=o.tween=ge.to(e,l),d};return e[i]=r,r.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},mn(e,"wheel",r.wheelHandler),Ve.isTouch&&mn(e,"touchmove",r.wheelHandler),s},Ve=function(){function t(n,r){rl||t.register(ge)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Cv(this),this.init(n,r)}var e=t.prototype;return e.init=function(r,i){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),!_c){this.update=this.refresh=this.kill=Gi;return}r=LS(Wr(r)||xc(r)||r.nodeType?{trigger:r}:r,sd);var s=r,o=s.onUpdate,a=s.toggleClass,l=s.id,u=s.onToggle,h=s.onRefresh,f=s.scrub,d=s.trigger,p=s.pin,v=s.pinSpacing,y=s.invalidateOnRefresh,C=s.anticipatePin,_=s.onScrubComplete,w=s.onSnapComplete,T=s.once,k=s.snap,P=s.pinReparent,V=s.pinSpacer,S=s.containerAnimation,m=s.fastScrollEnd,E=s.preventOverlaps,A=r.horizontal||r.containerAnimation&&r.horizontal!==!1?dr:un,D=!f&&f!==0,R=Tr(r.scroller||Oe),b=ge.core.getCache(R),q=Da(R),z=("pinType"in r?r.pinType:xo(R,"pinType")||q&&"fixed")==="fixed",ee=[r.onEnter,r.onLeave,r.onEnterBack,r.onLeaveBack],J=D&&r.toggleActions.split(" "),B="markers"in r?r.markers:sd.markers,Q=q?0:parseFloat(di(R)["border"+A.p2+mu])||0,L=this,O=r.onRefreshInit&&function(){return r.onRefreshInit(L)},H=a7(R,q,A),se=l7(R,q),ue=0,he=0,be=0,we=No(R,A),Me,ve,Ze,Et,qt,Ce,at,Kt,rn,G,xn,vr,_r,Ye,Tn,Jn,Zn,rt,Ue,Ne,Gt,En,jt,Bi,st,Ui,wr,Lr,Or,Fr,er,Ie,jr,sn,fn,Yt,Qt,Si,Mn;if(L._startClamp=L._endClamp=!1,L._dir=A,C*=45,L.scroller=R,L.scroll=S?S.time.bind(S):we,Et=we(),L.vars=r,i=i||r.animation,"refreshPriority"in r&&(nD=1,r.refreshPriority===-9999&&(Jc=L)),b.tweenScroll=b.tweenScroll||{top:US(R,un),left:US(R,dr)},L.tweenTo=Me=b.tweenScroll[A.p],L.scrubDuration=function(K){jr=xc(K)&&K,jr?Ie?Ie.duration(K):Ie=ge.to(i,{ease:"expo",totalProgress:"+=0",inherit:!1,duration:jr,paused:!0,onComplete:function(){return _&&_(L)}}):(Ie&&Ie.progress(1).kill(),Ie=0)},i&&(i.vars.lazy=!1,i._initted&&!L.isReverted||i.vars.immediateRender!==!1&&r.immediateRender!==!1&&i.duration()&&i.render(0,!0,!0),L.animation=i.pause(),i.scrollTrigger=L,L.scrubDuration(f),Fr=0,l||(l=i.vars.id)),k&&((!Zo(k)||k.push)&&(k={snapTo:k}),"scrollBehavior"in it.style&&ge.set(q?[it,Gr]:R,{scrollBehavior:"auto"}),Fe.forEach(function(K){return Gn(K)&&K.target===(q?pt.scrollingElement||Gr:R)&&(K.smooth=!1)}),Ze=Gn(k.snapTo)?k.snapTo:k.snapTo==="labels"?c7(i):k.snapTo==="labelsDirectional"?h7(i):k.directional!==!1?function(K,ne){return Nw(k.snapTo)(K,Un()-he<500?0:ne.direction)}:ge.utils.snap(k.snapTo),sn=k.duration||{min:.1,max:2},sn=Zo(sn)?Kc(sn.min,sn.max):Kc(sn,sn),fn=ge.delayedCall(k.delay||jr/2||.1,function(){var K=we(),ne=Un()-he<500,re=Me.tween;if((ne||Math.abs(L.getVelocity())<10)&&!re&&!Wm&&ue!==K){var te=(K-Ce)/Ye,le=i&&!D?i.totalProgress():te,X=ne?0:(le-er)/(Un()-vc)*1e3||0,fe=ge.utils.clamp(-te,1-te,Qa(X/2)*X/.185),ye=te+(k.inertia===!1?0:fe),xe,Pe,_e=k,ke=_e.onStart,Te=_e.onInterrupt,bt=_e.onComplete;if(xe=Ze(ye,L),xc(xe)||(xe=ye),Pe=Math.max(0,Math.round(Ce+xe*Ye)),K<=at&&K>=Ce&&Pe!==K){if(re&&!re._initted&&re.data<=Qa(Pe-K))return;k.inertia===!1&&(fe=xe-te),Me(Pe,{duration:sn(Qa(Math.max(Qa(ye-le),Qa(xe-le))*.185/X/.05||0)),ease:k.ease||"power3",data:Qa(Pe-K),onInterrupt:function(){return fn.restart(!0)&&Te&&Te(L)},onComplete:function(){L.update(),ue=we(),i&&!D&&(Ie?Ie.resetTo("totalProgress",xe,i._tTime/i._tDur):i.progress(xe)),Fr=er=i&&!D?i.totalProgress():L.progress,w&&w(L),bt&&bt(L)}},K,fe*Ye,Pe-K-fe*Ye),ke&&ke(L,Me.tween)}}else L.isActive&&ue!==K&&fn.restart(!0)}).pause()),l&&(Av[l]=L),d=L.trigger=Tr(d||p!==!0&&p),Mn=d&&d._gsap&&d._gsap.stRevert,Mn&&(Mn=Mn(L)),p=p===!0?d:Tr(p),Wr(a)&&(a={targets:d,className:a}),p&&(v===!1||v===fi||(v=!v&&p.parentNode&&p.parentNode.style&&di(p.parentNode).display==="flex"?!1:Jt),L.pin=p,ve=ge.core.getCache(p),ve.spacer?Tn=ve.pinState:(V&&(V=Tr(V),V&&!V.nodeType&&(V=V.current||V.nativeElement),ve.spacerIsNative=!!V,V&&(ve.spacerState=ad(V))),ve.spacer=rt=V||pt.createElement("div"),rt.classList.add("pin-spacer"),l&&rt.classList.add("pin-spacer-"+l),ve.pinState=Tn=ad(p)),r.force3D!==!1&&ge.set(p,{force3D:!0}),L.spacer=rt=ve.spacer,Or=di(p),Bi=Or[v+A.os2],Ne=ge.getProperty(p),Gt=ge.quickSetter(p,A.a,an),py(p,rt,Or),Zn=ad(p)),B){vr=Zo(B)?LS(B,OS):OS,G=od("scroller-start",l,R,A,vr,0),xn=od("scroller-end",l,R,A,vr,0,G),Ue=G["offset"+A.op.d2];var j=Tr(xo(R,"content")||R);Kt=this.markerStart=od("start",l,j,A,vr,Ue,0,S),rn=this.markerEnd=od("end",l,j,A,vr,Ue,0,S),S&&(Si=ge.quickSetter([Kt,rn],A.a,an)),!z&&!(us.length&&xo(R,"fixedMarkers")===!0)&&(u7(q?it:R),ge.set([G,xn],{force3D:!0}),Ui=ge.quickSetter(G,A.a,an),Lr=ge.quickSetter(xn,A.a,an))}if(S){var F=S.vars.onUpdate,$=S.vars.onUpdateParams;S.eventCallback("onUpdate",function(){L.update(0,0,1),F&&F.apply(S,$||[])})}if(L.previous=function(){return Le[Le.indexOf(L)-1]},L.next=function(){return Le[Le.indexOf(L)+1]},L.revert=function(K,ne){if(!ne)return L.kill(!0);var re=K!==!1||!L.enabled,te=$n;re!==L.isReverted&&(re&&(Yt=Math.max(we(),L.scroll.rec||0),be=L.progress,Qt=i&&i.progress()),Kt&&[Kt,rn,G,xn].forEach(function(le){return le.style.display=re?"none":"block"}),re&&($n=L,L.update(re)),p&&(!P||!L.isActive)&&(re?p7(p,rt,Tn):py(p,rt,di(p),st)),re||L.update(re),$n=te,L.isReverted=re)},L.refresh=function(K,ne,re,te){if(!(($n||!L.enabled)&&!ne)){if(p&&K&&Ti){mn(t,"scrollEnd",dD);return}!cr&&O&&O(L),$n=L,Me.tween&&!re&&(Me.tween.kill(),Me.tween=0),Ie&&Ie.pause(),y&&i&&(i.revert({kill:!1}).invalidate(),i.getChildren&&i.getChildren(!0,!0,!1).forEach(function($r){return $r.vars.immediateRender&&$r.render(0,!0,!0)})),L.isReverted||L.revert(!0,!0),L._subPinOffset=!1;var le=H(),X=se(),fe=S?S.duration():Zi(R,A),ye=Ye<=.01||!Ye,xe=0,Pe=te||0,_e=Zo(re)?re.end:r.end,ke=r.endTrigger||d,Te=Zo(re)?re.start:r.start||(r.start===0||!d?0:p?"0 0":"0 100%"),bt=L.pinnedContainer=r.pinnedContainer&&Tr(r.pinnedContainer,L),on=d&&Math.max(0,Le.indexOf(L))||0,nt=on,et,St,Nn,xr,ft,lt,De,dt,tr,nr,Qe,rr,Hi;for(B&&Zo(re)&&(rr=ge.getProperty(G,A.p),Hi=ge.getProperty(xn,A.p));nt-- >0;)lt=Le[nt],lt.end||lt.refresh(0,1)||($n=L),De=lt.pin,De&&(De===d||De===p||De===bt)&&!lt.isReverted&&(nr||(nr=[]),nr.unshift(lt),lt.revert(!0,!0)),lt!==Le[nt]&&(on--,nt--);for(Gn(Te)&&(Te=Te(L)),Te=DS(Te,"start",L),Ce=zS(Te,d,le,A,we(),Kt,G,L,X,Q,z,fe,S,L._startClamp&&"_startClamp")||(p?-.001:0),Gn(_e)&&(_e=_e(L)),Wr(_e)&&!_e.indexOf("+=")&&(~_e.indexOf(" ")?_e=(Wr(Te)?Te.split(" ")[0]:"")+_e:(xe=Wd(_e.substr(2),le),_e=Wr(Te)?Te:(S?ge.utils.mapRange(0,S.duration(),S.scrollTrigger.start,S.scrollTrigger.end,Ce):Ce)+xe,ke=d)),_e=DS(_e,"end",L),at=Math.max(Ce,zS(_e||(ke?"100% 0":fe),ke,le,A,we()+xe,rn,xn,L,X,Q,z,fe,S,L._endClamp&&"_endClamp"))||-.001,xe=0,nt=on;nt--;)lt=Le[nt],De=lt.pin,De&<.start-lt._pinPush<=Ce&&!S&<.end>0&&(et=lt.end-(L._startClamp?Math.max(0,lt.start):lt.start),(De===d&<.start-lt._pinPush<Ce||De===bt)&&isNaN(Te)&&(xe+=et*(1-lt.progress)),De===p&&(Pe+=et));if(Ce+=xe,at+=xe,L._startClamp&&(L._startClamp+=xe),L._endClamp&&!cr&&(L._endClamp=at||-.001,at=Math.min(at,Zi(R,A))),Ye=at-Ce||(Ce-=.01)&&.001,ye&&(be=ge.utils.clamp(0,1,ge.utils.normalize(Ce,at,Yt))),L._pinPush=Pe,Kt&&xe&&(et={},et[A.a]="+="+xe,bt&&(et[A.p]="-="+we()),ge.set([Kt,rn],et)),p&&!(Pv&&L.end>=Zi(R,A)))et=di(p),xr=A===un,Nn=we(),En=parseFloat(Ne(A.a))+Pe,!fe&&at>1&&(Qe=(q?pt.scrollingElement||Gr:R).style,Qe={style:Qe,value:Qe["overflow"+A.a.toUpperCase()]},q&&di(it)["overflow"+A.a.toUpperCase()]!=="scroll"&&(Qe.style["overflow"+A.a.toUpperCase()]="scroll")),py(p,rt,et),Zn=ad(p),St=ws(p,!0),dt=z&&No(R,xr?dr:un)(),v?(st=[v+A.os2,Ye+Pe+an],st.t=rt,nt=v===Jt?Xp(p,A)+Ye+Pe:0,nt&&(st.push(A.d,nt+an),rt.style.flexBasis!=="auto"&&(rt.style.flexBasis=nt+an)),Wl(st),bt&&Le.forEach(function($r){$r.pin===bt&&$r.vars.pinSpacing!==!1&&($r._subPinOffset=!0)}),z&&we(Yt)):(nt=Xp(p,A),nt&&rt.style.flexBasis!=="auto"&&(rt.style.flexBasis=nt+an)),z&&(ft={top:St.top+(xr?Nn-Ce:dt)+an,left:St.left+(xr?dt:Nn-Ce)+an,boxSizing:"border-box",position:"fixed"},ft[Ta]=ft["max"+mu]=Math.ceil(St.width)+an,ft[Ea]=ft["max"+Mw]=Math.ceil(St.height)+an,ft[fi]=ft[fi+Qc]=ft[fi+Gc]=ft[fi+Xc]=ft[fi+Yc]="0",ft[Jt]=et[Jt],ft[Jt+Qc]=et[Jt+Qc],ft[Jt+Gc]=et[Jt+Gc],ft[Jt+Xc]=et[Jt+Xc],ft[Jt+Yc]=et[Jt+Yc],Jn=g7(Tn,ft,P),cr&&we(0)),i?(tr=i._initted,uy(1),i.render(i.duration(),!0,!0),jt=Ne(A.a)-En+Ye+Pe,wr=Math.abs(Ye-jt)>1,z&&wr&&Jn.splice(Jn.length-2,2),i.render(0,!0,!0),tr||i.invalidate(!0),i.parent||i.totalTime(i.totalTime()),uy(0)):jt=Ye,Qe&&(Qe.value?Qe.style["overflow"+A.a.toUpperCase()]=Qe.value:Qe.style.removeProperty("overflow-"+A.a));else if(d&&we()&&!S)for(St=d.parentNode;St&&St!==it;)St._pinOffset&&(Ce-=St._pinOffset,at-=St._pinOffset),St=St.parentNode;nr&&nr.forEach(function($r){return $r.revert(!1,!0)}),L.start=Ce,L.end=at,Et=qt=cr?Yt:we(),!S&&!cr&&(Et<Yt&&we(Yt),L.scroll.rec=0),L.revert(!1,!0),he=Un(),fn&&(ue=-1,fn.restart(!0)),$n=0,i&&D&&(i._initted||Qt)&&i.progress()!==Qt&&i.progress(Qt||0,!0).render(i.time(),!0,!0),(ye||be!==L.progress||S||y||i&&!i._initted)&&(i&&!D&&(i._initted||be||i.vars.immediateRender!==!1)&&i.totalProgress(S&&Ce<-.001&&!be?ge.utils.normalize(Ce,at,0):be,!0),L.progress=ye||(Et-Ce)/Ye===be?0:be),p&&v&&(rt._pinOffset=Math.round(L.progress*jt)),Ie&&Ie.invalidate(),isNaN(rr)||(rr-=ge.getProperty(G,A.p),Hi-=ge.getProperty(xn,A.p),ld(G,A,rr),ld(Kt,A,rr-(te||0)),ld(xn,A,Hi),ld(rn,A,Hi-(te||0))),ye&&!cr&&L.update(),h&&!cr&&!_r&&(_r=!0,h(L),_r=!1)}},L.getVelocity=function(){return(we()-qt)/(Un()-vc)*1e3||0},L.endAnimation=function(){tc(L.callbackAnimation),i&&(Ie?Ie.progress(1):i.paused()?D||tc(i,L.direction<0,1):tc(i,i.reversed()))},L.labelToScroll=function(K){return i&&i.labels&&(Ce||L.refresh()||Ce)+i.labels[K]/i.duration()*Ye||0},L.getTrailing=function(K){var ne=Le.indexOf(L),re=L.direction>0?Le.slice(0,ne).reverse():Le.slice(ne+1);return(Wr(K)?re.filter(function(te){return te.vars.preventOverlaps===K}):re).filter(function(te){return L.direction>0?te.end<=Ce:te.start>=at})},L.update=function(K,ne,re){if(!(S&&!re&&!K)){var te=cr===!0?Yt:L.scroll(),le=K?0:(te-Ce)/Ye,X=le<0?0:le>1?1:le||0,fe=L.progress,ye,xe,Pe,_e,ke,Te,bt,on;if(ne&&(qt=Et,Et=S?we():te,k&&(er=Fr,Fr=i&&!D?i.totalProgress():X)),C&&p&&!$n&&!td&&Ti&&(!X&&Ce<te+(te-qt)/(Un()-vc)*C?X=1e-4:X===1&&at>te+(te-qt)/(Un()-vc)*C&&(X=.9999)),X!==fe&&L.enabled){if(ye=L.isActive=!!X&&X<1,xe=!!fe&&fe<1,Te=ye!==xe,ke=Te||!!X!=!!fe,L.direction=X>fe?1:-1,L.progress=X,ke&&!$n&&(Pe=X&&!fe?0:X===1?1:fe===1?2:3,D&&(_e=!Te&&J[Pe+1]!=="none"&&J[Pe+1]||J[Pe],on=i&&(_e==="complete"||_e==="reset"||_e in i))),E&&(Te||on)&&(on||f||!i)&&(Gn(E)?E(L):L.getTrailing(E).forEach(function(Nn){return Nn.endAnimation()})),D||(Ie&&!$n&&!td?(Ie._dp._time-Ie._start!==Ie._time&&Ie.render(Ie._dp._time-Ie._start),Ie.resetTo?Ie.resetTo("totalProgress",X,i._tTime/i._tDur):(Ie.vars.totalProgress=X,Ie.invalidate().restart())):i&&i.totalProgress(X,!!($n&&(he||K)))),p){if(K&&v&&(rt.style[v+A.os2]=Bi),!z)Gt(wc(En+jt*X));else if(ke){if(bt=!K&&X>fe&&at+1>te&&te+1>=Zi(R,A),P)if(!K&&(ye||bt)){var nt=ws(p,!0),et=te-Ce;BS(p,it,nt.top+(A===un?et:0)+an,nt.left+(A===un?0:et)+an)}else BS(p,rt);Wl(ye||bt?Jn:Zn),wr&&X<1&&ye||Gt(En+(X===1&&!bt?jt:0))}}k&&!Me.tween&&!$n&&!td&&fn.restart(!0),a&&(Te||T&&X&&(X<1||!cy))&&Bh(a.targets).forEach(function(Nn){return Nn.classList[ye||T?"add":"remove"](a.className)}),o&&!D&&!K&&o(L),ke&&!$n?(D&&(on&&(_e==="complete"?i.pause().totalProgress(1):_e==="reset"?i.restart(!0).pause():_e==="restart"?i.restart(!0):i[_e]()),o&&o(L)),(Te||!cy)&&(u&&Te&&fy(L,u),ee[Pe]&&fy(L,ee[Pe]),T&&(X===1?L.kill(!1,1):ee[Pe]=0),Te||(Pe=X===1?1:3,ee[Pe]&&fy(L,ee[Pe]))),m&&!ye&&Math.abs(L.getVelocity())>(xc(m)?m:2500)&&(tc(L.callbackAnimation),Ie?Ie.progress(1):tc(i,_e==="reverse"?1:!X,1))):D&&o&&!$n&&o(L)}if(Lr){var St=S?te/S.duration()*(S._caScrollDist||0):te;Ui(St+(G._isFlipped?1:0)),Lr(St)}Si&&Si(-te/S.duration()*(S._caScrollDist||0))}},L.enable=function(K,ne){L.enabled||(L.enabled=!0,mn(R,"resize",Tc),q||mn(R,"scroll",Xa),O&&mn(t,"refreshInit",O),K!==!1&&(L.progress=be=0,Et=qt=ue=we()),ne!==!1&&L.refresh())},L.getTween=function(K){return K&&Me?Me.tween:Ie},L.setPositions=function(K,ne,re,te){if(S){var le=S.scrollTrigger,X=S.duration(),fe=le.end-le.start;K=le.start+fe*K/X,ne=le.start+fe*ne/X}L.refresh(!1,!1,{start:MS(K,re&&!!L._startClamp),end:MS(ne,re&&!!L._endClamp)},te),L.update()},L.adjustPinSpacing=function(K){if(st&&K){var ne=st.indexOf(A.d)+1;st[ne]=parseFloat(st[ne])+K+an,st[1]=parseFloat(st[1])+K+an,Wl(st)}},L.disable=function(K,ne){if(L.enabled&&(K!==!1&&L.revert(!0,!0),L.enabled=L.isActive=!1,ne||Ie&&Ie.pause(),Yt=0,ve&&(ve.uncache=1),O&&pn(t,"refreshInit",O),fn&&(fn.pause(),Me.tween&&Me.tween.kill()&&(Me.tween=0)),!q)){for(var re=Le.length;re--;)if(Le[re].scroller===R&&Le[re]!==L)return;pn(R,"resize",Tc),q||pn(R,"scroll",Xa)}},L.kill=function(K,ne){L.disable(K,ne),Ie&&!ne&&Ie.kill(),l&&delete Av[l];var re=Le.indexOf(L);re>=0&&Le.splice(re,1),re===ur&&Kd>0&&ur--,re=0,Le.forEach(function(te){return te.scroller===L.scroller&&(re=1)}),re||cr||(L.scroll.rec=0),i&&(i.scrollTrigger=null,K&&i.revert({kill:!1}),ne||i.kill()),Kt&&[Kt,rn,G,xn].forEach(function(te){return te.parentNode&&te.parentNode.removeChild(te)}),Jc===L&&(Jc=0),p&&(ve&&(ve.uncache=1),re=0,Le.forEach(function(te){return te.pin===p&&re++}),re||(ve.spacer=0)),r.onKill&&r.onKill(L)},Le.push(L),L.enable(!1,!1),Mn&&Mn(L),i&&i.add&&!Ye){var W=L.update;L.update=function(){L.update=W,Fe.cache++,Ce||at||L.refresh()},ge.delayedCall(.01,L.update),Ye=.01,Ce=at=0}else L.refresh();p&&d7()},t.register=function(r){return rl||(ge=r||aD(),oD()&&window.document&&t.enable(),rl=_c),rl},t.defaults=function(r){if(r)for(var i in r)sd[i]=r[i];return sd},t.disable=function(r,i){_c=0,Le.forEach(function(o){return o[i?"kill":"disable"](r)}),pn(Oe,"wheel",Xa),pn(pt,"scroll",Xa),clearInterval(ed),pn(pt,"touchcancel",Gi),pn(it,"touchstart",Gi),rd(pn,pt,"pointerdown,touchstart,mousedown",NS),rd(pn,pt,"pointerup,touchend,mouseup",VS),Yp.kill(),nd(pn);for(var s=0;s<Fe.length;s+=3)id(pn,Fe[s],Fe[s+1]),id(pn,Fe[s],Fe[s+2])},t.enable=function(){if(Oe=window,pt=document,Gr=pt.documentElement,it=pt.body,ge&&(Bh=ge.utils.toArray,Kc=ge.utils.clamp,Cv=ge.core.context||Gi,uy=ge.core.suppressOverwrites||Gi,Rw=Oe.history.scrollRestoration||"auto",Rv=Oe.pageYOffset||0,ge.core.globals("ScrollTrigger",t),it)){_c=1,Hl=document.createElement("div"),Hl.style.height="100vh",Hl.style.position="absolute",gD(),o7(),Ht.register(ge),t.isTouch=Ht.isTouch,Ks=Ht.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),Sv=Ht.isTouch===1,mn(Oe,"wheel",Xa),Aw=[Oe,pt,Gr,it],ge.matchMedia?(t.matchMedia=function(u){var h=ge.matchMedia(),f;for(f in u)h.add(f,u[f]);return h},ge.addEventListener("matchMediaInit",function(){return Vw()}),ge.addEventListener("matchMediaRevert",function(){return pD()}),ge.addEventListener("matchMedia",function(){ua(0,1),Na("matchMedia")}),ge.matchMedia().add("(orientation: portrait)",function(){return dy(),dy})):console.warn("Requires GSAP 3.11.0 or later"),dy(),mn(pt,"scroll",Xa);var r=it.hasAttribute("style"),i=it.style,s=i.borderTopStyle,o=ge.core.Animation.prototype,a,l;for(o.revert||Object.defineProperty(o,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",a=ws(it),un.m=Math.round(a.top+un.sc())||0,dr.m=Math.round(a.left+dr.sc())||0,s?i.borderTopStyle=s:i.removeProperty("border-top-style"),r||(it.setAttribute("style",""),it.removeAttribute("style")),ed=setInterval(FS,250),ge.delayedCall(.5,function(){return td=0}),mn(pt,"touchcancel",Gi),mn(it,"touchstart",Gi),rd(mn,pt,"pointerdown,touchstart,mousedown",NS),rd(mn,pt,"pointerup,touchend,mouseup",VS),bv=ge.utils.checkPrefix("transform"),Gd.push(bv),rl=Un(),Yp=ge.delayedCall(.2,ua).pause(),il=[pt,"visibilitychange",function(){var u=Oe.innerWidth,h=Oe.innerHeight;pt.hidden?(IS=u,kS=h):(IS!==u||kS!==h)&&Tc()},pt,"DOMContentLoaded",ua,Oe,"load",ua,Oe,"resize",Tc],nd(mn),Le.forEach(function(u){return u.enable(0,1)}),l=0;l<Fe.length;l+=3)id(pn,Fe[l],Fe[l+1]),id(pn,Fe[l],Fe[l+2])}},t.config=function(r){"limitCallbacks"in r&&(cy=!!r.limitCallbacks);var i=r.syncInterval;i&&clearInterval(ed)||(ed=i)&&setInterval(FS,i),"ignoreMobileResize"in r&&(Sv=t.isTouch===1&&r.ignoreMobileResize),"autoRefreshEvents"in r&&(nd(pn)||nd(mn,r.autoRefreshEvents||"none"),rD=(r.autoRefreshEvents+"").indexOf("resize")===-1)},t.scrollerProxy=function(r,i){var s=Tr(r),o=Fe.indexOf(s),a=Da(s);~o&&Fe.splice(o,a?6:2),i&&(a?us.unshift(Oe,i,it,i,Gr,i):us.unshift(s,i))},t.clearMatchMedia=function(r){Le.forEach(function(i){return i._ctx&&i._ctx.query===r&&i._ctx.kill(!0,!0)})},t.isInViewport=function(r,i,s){var o=(Wr(r)?Tr(r):r).getBoundingClientRect(),a=o[s?Ta:Ea]*i||0;return s?o.right-a>0&&o.left+a<Oe.innerWidth:o.bottom-a>0&&o.top+a<Oe.innerHeight},t.positionInViewport=function(r,i,s){Wr(r)&&(r=Tr(r));var o=r.getBoundingClientRect(),a=o[s?Ta:Ea],l=i==null?a/2:i in Jp?Jp[i]*a:~i.indexOf("%")?parseFloat(i)*a/100:parseFloat(i)||0;return s?(o.left+l)/Oe.innerWidth:(o.top+l)/Oe.innerHeight},t.killAll=function(r){if(Le.slice(0).forEach(function(s){return s.vars.id!=="ScrollSmoother"&&s.kill()}),r!==!0){var i=Ma.killAll||[];Ma={},i.forEach(function(s){return s()})}},t}();Ve.version="3.13.0";Ve.saveStyles=function(t){return t?Bh(t).forEach(function(e){if(e&&e.style){var n=Ur.indexOf(e);n>=0&&Ur.splice(n,5),Ur.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),ge.core.getCache(e),Cv())}}):Ur};Ve.revert=function(t,e){return Vw(!t,e)};Ve.create=function(t,e){return new Ve(t,e)};Ve.refresh=function(t){return t?Tc(!0):(rl||Ve.register())&&ua(!0)};Ve.update=function(t){return++Fe.cache&&Ss(t===!0?2:0)};Ve.clearScrollMemory=mD;Ve.maxScroll=function(t,e){return Zi(t,e?dr:un)};Ve.getScrollFunc=function(t,e){return No(Tr(t),e?dr:un)};Ve.getById=function(t){return Av[t]};Ve.getAll=function(){return Le.filter(function(t){return t.vars.id!=="ScrollSmoother"})};Ve.isScrolling=function(){return!!Ti};Ve.snapDirectional=Nw;Ve.addEventListener=function(t,e){var n=Ma[t]||(Ma[t]=[]);~n.indexOf(e)||n.push(e)};Ve.removeEventListener=function(t,e){var n=Ma[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)};Ve.batch=function(t,e){var n=[],r={},i=e.interval||.016,s=e.batchMax||1e9,o=function(u,h){var f=[],d=[],p=ge.delayedCall(i,function(){h(f,d),f=[],d=[]}).pause();return function(v){f.length||p.restart(!0),f.push(v.trigger),d.push(v),s<=f.length&&p.progress(1)}},a;for(a in e)r[a]=a.substr(0,2)==="on"&&Gn(e[a])&&a!=="onRefreshInit"?o(a,e[a]):e[a];return Gn(s)&&(s=s(),mn(Ve,"refresh",function(){return s=e.batchMax()})),Bh(t).forEach(function(l){var u={};for(a in r)u[a]=r[a];u.trigger=l,n.push(Ve.create(u))}),n};var HS=function(e,n,r,i){return n>i?e(i):n<0&&e(0),r>i?(i-n)/(r-n):r<0?n/(n-r):1},my=function t(e,n){n===!0?e.style.removeProperty("touch-action"):e.style.touchAction=n===!0?"auto":n?"pan-"+n+(Ht.isTouch?" pinch-zoom":""):"none",e===Gr&&t(it,n)},ud={auto:1,scroll:1},v7=function(e){var n=e.event,r=e.target,i=e.axis,s=(n.changedTouches?n.changedTouches[0]:n).target,o=s._gsap||ge.core.getCache(s),a=Un(),l;if(!o._isScrollT||a-o._isScrollT>2e3){for(;s&&s!==it&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!(ud[(l=di(s)).overflowY]||ud[l.overflowX]));)s=s.parentNode;o._isScroll=s&&s!==r&&!Da(s)&&(ud[(l=di(s)).overflowY]||ud[l.overflowX]),o._isScrollT=a}(o._isScroll||i==="x")&&(n.stopPropagation(),n._gsapAllow=!0)},vD=function(e,n,r,i){return Ht.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:n,onWheel:i=i&&v7,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return r&&mn(pt,Ht.eventTypes[0],qS,!1,!0)},onDisable:function(){return pn(pt,Ht.eventTypes[0],qS,!0)}})},_7=/(input|label|select|textarea)/i,WS,qS=function(e){var n=_7.test(e.target.tagName);(n||WS)&&(e._gsapAllow=!0,WS=n)},w7=function(e){Zo(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var n=e,r=n.normalizeScrollX,i=n.momentum,s=n.allowNestedScroll,o=n.onRelease,a,l,u=Tr(e.target)||Gr,h=ge.core.globals().ScrollSmoother,f=h&&h.get(),d=Ks&&(e.content&&Tr(e.content)||f&&e.content!==!1&&!f.smooth()&&f.content()),p=No(u,un),v=No(u,dr),y=1,C=(Ht.isTouch&&Oe.visualViewport?Oe.visualViewport.scale*Oe.visualViewport.width:Oe.outerWidth)/Oe.innerWidth,_=0,w=Gn(i)?function(){return i(a)}:function(){return i||2.8},T,k,P=vD(u,e.type,!0,s),V=function(){return k=!1},S=Gi,m=Gi,E=function(){l=Zi(u,un),m=Kc(Ks?1:0,l),r&&(S=Kc(0,Zi(u,dr))),T=ba},A=function(){d._gsap.y=wc(parseFloat(d._gsap.y)+p.offset)+"px",d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(d._gsap.y)+", 0, 1)",p.offset=p.cacheID=0},D=function(){if(k){requestAnimationFrame(V);var B=wc(a.deltaY/2),Q=m(p.v-B);if(d&&Q!==p.v+p.offset){p.offset=Q-p.v;var L=wc((parseFloat(d&&d._gsap.y)||0)-p.offset);d.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+L+", 0, 1)",d._gsap.y=L+"px",p.cacheID=Fe.cache,Ss()}return!0}p.offset&&A(),k=!0},R,b,q,z,ee=function(){E(),R.isActive()&&R.vars.scrollY>l&&(p()>l?R.progress(1)&&p(l):R.resetTo("scrollY",l))};return d&&ge.set(d,{y:"+=0"}),e.ignoreCheck=function(J){return Ks&&J.type==="touchmove"&&D()||y>1.05&&J.type!=="touchstart"||a.isGesturing||J.touches&&J.touches.length>1},e.onPress=function(){k=!1;var J=y;y=wc((Oe.visualViewport&&Oe.visualViewport.scale||1)/C),R.pause(),J!==y&&my(u,y>1.01?!0:r?!1:"x"),b=v(),q=p(),E(),T=ba},e.onRelease=e.onGestureStart=function(J,B){if(p.offset&&A(),!B)z.restart(!0);else{Fe.cache++;var Q=w(),L,O;r&&(L=v(),O=L+Q*.05*-J.velocityX/.227,Q*=HS(v,L,O,Zi(u,dr)),R.vars.scrollX=S(O)),L=p(),O=L+Q*.05*-J.velocityY/.227,Q*=HS(p,L,O,Zi(u,un)),R.vars.scrollY=m(O),R.invalidate().duration(Q).play(.01),(Ks&&R.vars.scrollY>=l||L>=l-1)&&ge.to({},{onUpdate:ee,duration:Q})}o&&o(J)},e.onWheel=function(){R._ts&&R.pause(),Un()-_>1e3&&(T=0,_=Un())},e.onChange=function(J,B,Q,L,O){if(ba!==T&&E(),B&&r&&v(S(L[2]===B?b+(J.startX-J.x):v()+B-L[1])),Q){p.offset&&A();var H=O[2]===Q,se=H?q+J.startY-J.y:p()+Q-O[1],ue=m(se);H&&se!==ue&&(q+=ue-se),p(ue)}(Q||B)&&Ss()},e.onEnable=function(){my(u,r?!1:"x"),Ve.addEventListener("refresh",ee),mn(Oe,"resize",ee),p.smooth&&(p.target.style.scrollBehavior="auto",p.smooth=v.smooth=!1),P.enable()},e.onDisable=function(){my(u,!0),pn(Oe,"resize",ee),Ve.removeEventListener("refresh",ee),P.kill()},e.lockAxis=e.lockAxis!==!1,a=new Ht(e),a.iOS=Ks,Ks&&!p()&&p(1),Ks&&ge.ticker.add(Gi),z=a._dc,R=ge.to(a,{ease:"power4",paused:!0,inherit:!1,scrollX:r?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:yD(p,p(),function(){return R.pause()})},onUpdate:Ss,onComplete:z.vars.onComplete}),a};Ve.sort=function(t){if(Gn(t))return Le.sort(t);var e=Oe.pageYOffset||0;return Ve.getAll().forEach(function(n){return n._sortY=n.trigger?e+n.trigger.getBoundingClientRect().top:n.start+Oe.innerHeight}),Le.sort(t||function(n,r){return(n.vars.refreshPriority||0)*-1e6+(n.vars.containerAnimation?1e6:n._sortY)-((r.vars.containerAnimation?1e6:r._sortY)+(r.vars.refreshPriority||0)*-1e6)})};Ve.observe=function(t){return new Ht(t)};Ve.normalizeScroll=function(t){if(typeof t>"u")return ar;if(t===!0&&ar)return ar.enable();if(t===!1){ar&&ar.kill(),ar=t;return}var e=t instanceof Ht?t:w7(t);return ar&&ar.target===e.target&&ar.kill(),Da(e.target)&&(ar=e),e};Ve.core={_getVelocityProp:Ev,_inputObserver:vD,_scrollers:Fe,_proxies:us,bridge:{ss:function(){Ti||Na("scrollStart"),Ti=Un()},ref:function(){return $n}}};aD()&&ge.registerPlugin(Ve);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const x7=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),T7=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),KS=t=>{const e=T7(t);return e.charAt(0).toUpperCase()+e.slice(1)},_D=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),E7=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var b7={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.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const S7=N.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>N.createElement("svg",{ref:l,...b7,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:_D("lucide",i),...!s&&!E7(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,h])=>N.createElement(u,h)),...Array.isArray(s)?s:[s]]));/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ru=(t,e)=>{const n=N.forwardRef(({className:r,...i},s)=>N.createElement(S7,{ref:s,iconNode:e,className:_D(`lucide-${x7(KS(t))}`,`lucide-${t}`,r),...i}));return n.displayName=KS(t),n};/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const C7=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],GS=Ru("arrow-right",C7);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const P7=[["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"}]],wD=Ru("calendar",P7);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const A7=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],R7=Ru("chevron-left",A7);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const I7=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],k7=Ru("chevron-right",I7);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const D7=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],M7=Ru("circle-check-big",D7);/** * @license lucide-react v0.511.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const N7=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],V7=Ru("code",N7);var xD={exports:{}},L7="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",O7=L7,F7=O7;function TD(){}function ED(){}ED.resetWarningCache=TD;var j7=function(){function t(r,i,s,o,a,l){if(l!==F7){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ED,resetWarningCache:TD};return n.PropTypes=n,n};xD.exports=j7();var $7=xD.exports;const Lt=tm($7);function Lw({announcements:t}){const[e,n]=N.useState(0),[r,i]=N.useState(0),s=N.useRef(null),o=N.useRef(null),a={hiddenRight:{x:"100%",opacity:0},hiddenLeft:{x:"-100%",opacity:0},visible:{x:0,opacity:1,transition:{duration:.5}},exit:{opacity:0,transition:{duration:.3}}},l=N.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i(1),n(w=>(w+1)%t.length)},5e3)},[t.length]);N.useEffect(()=>(l(),()=>{o.current&&clearTimeout(o.current)}),[e,t.length,l]);const u=()=>{o.current&&clearTimeout(o.current),i(1),n(w=>(w+1)%t.length)},h=()=>{o.current&&clearTimeout(o.current),i(-1),n(w=>(w-1+t.length)%t.length)},f=()=>{o.current&&clearTimeout(o.current)},d=()=>{l()},{Title:p,Time:v,Description:y,Picture:C}=t[e],_=v!=null&&v.seconds?new Date(v.seconds*1e3).toISOString().split("T")[0]:"Invalid date";return I.jsxs("div",{ref:s,className:"relative overflow-hidden rounded-xl",onMouseEnter:f,onMouseLeave:d,children:[I.jsx("div",{className:"aspect-[15/7] md:aspect-[21/9] relative",children:I.jsx(v5,{initial:!1,custom:r,children:I.jsx(me.div,{custom:r,variants:a,initial:r>0?"hiddenRight":"hiddenLeft",animate:"visible",exit:"exit",className:"absolute inset-0",children:I.jsxs("div",{className:"relative h-full w-full overflow-hidden rounded-xl",children:[I.jsx("img",{src:C||"/placeholder.svg",alt:p,className:"w-full h-full object-cover"}),I.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/50 to-transparent flex flex-col justify-end p-6 md:p-10",children:[I.jsxs("div",{className:"flex items-center text-gray-300 mb-3",children:[I.jsx(wD,{className:"h-4 w-4 mr-2"}),I.jsx("span",{className:"text-sm",children:_})]}),I.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-2",children:p}),I.jsx("p",{className:"text-gray-300 mb-4 max-w-2xl",children:y})]})]})},e)})}),I.jsx("button",{onClick:h,className:"absolute left-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-black/50 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/70 transition-colors z-10","aria-label":"Previous announcement",children:I.jsx(R7,{className:"h-6 w-6"})}),I.jsx("button",{onClick:u,className:"absolute right-4 top-1/2 -translate-y-1/2 w-10 h-10 rounded-full bg-black/50 backdrop-blur-sm flex items-center justify-center text-white hover:bg-black/70 transition-colors z-10","aria-label":"Next announcement",children:I.jsx(k7,{className:"h-6 w-6"})}),I.jsx("div",{className:"absolute bottom-4 left-1/2 transform -translate-x-1/2 flex space-x-2 z-10",children:t.map((w,T)=>I.jsx("button",{onClick:()=>{i(T>e?1:-1),n(T)},className:`w-2 h-2 rounded-full transition-all duration-300 ${e===T?"bg-white w-6":"bg-white/50 hover:bg-white/80"}`,"aria-label":`Go to announcement ${T+1}`},T))})]})}Lw.propTypes={announcements:Lt.arrayOf(Lt.shape({id:Lt.number.isRequired,Title:Lt.string.isRequired,Time:Lt.shape({seconds:Lt.number.isRequired,nanoseconds:Lt.number}).isRequired,Description:Lt.string.isRequired,Picture:Lt.string,Link:Lt.string})).isRequired};Lw.defaultProps={announcements:[]};kv.propTypes={children:Lt.node,onClick:Lt.func,icon:Lt.node,href:Lt.string};function kv({children:t,onClick:e,icon:n,href:r}){const i=` relative px-8 py-3 rounded-full font-medium text-white overflow-hidden group before:absolute before:inset-0 before:bg-gradient-to-r before:from-indigo-600 before:via-indigo-500 before:to-purple-600 hover:before:bg-gradient-to-r hover:before:from-indigo-500 hover:before:via-purple-600 hover:before:to-indigo-600 before:transition-all before:duration-500 after:absolute after:inset-0 after:bg-gradient-to-r after:from-indigo-600 after:via-indigo-500 after:to-purple-600 after:opacity-0 hover:after:opacity-100 after:transition-opacity after:duration-500 shadow-[0_0_15px_rgba(99,102,241,0.5)] hover:shadow-[0_0_25px_rgba(99,102,241,0.7)] transition-all duration-300 `,s=` relative z-10 flex items-center justify-center `;return r?I.jsx(hr,{to:r,className:i,children:I.jsxs("span",{className:s,children:[t,n]})}):I.jsx("button",{onClick:e,className:i,children:I.jsxs("span",{className:s,children:[t,n]})})}const z7="/assets/hero-DJBfKnwj.mp4",B7="/assets/about-bg-D9HtyJao.png",U7="/assets/project-home-bg-BksAXBck.png",H7="/assets/events-home-bg-DHtziSsv.png";typeof window<"u"&&Kp.registerPlugin(Ve);const YS={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2}}},gy={hidden:{opacity:0,y:20,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:"easeOut"}}};function W7(){const t=N.useRef(null),e=N.useRef(null),[n,r]=N.useState([{id:0,title:"No New Announcements for now",date:"To be Announced Eventually",content:"We will be right back with some exciting updates soon! Stay tuned for more information.",image:"https://blocks.astratic.com/img/general-img-portrait.png",link:"/"}]),i=async()=>{try{const s=await zm("Announcements");if(s.length===0){console.warn("No announcements found, using fallback data.");return}r(s)}catch(s){console.error("Error fetching announcements:",s)}};return N.useEffect(()=>{if(!t.current||!e.current)return;const s=()=>{const o=e.current,a=t.current,l=a.scrollWidth,u=window.innerWidth,h=u*.02,f=Math.max(0,l-u-h);Ve.getAll().forEach(d=>d.kill()),l>u+h?Kp.to(a,{x:-f,ease:"power1.out",scrollTrigger:{trigger:o,start:"top top",end:()=>`+=${f}`,scrub:.2,pin:!0,anticipatePin:1,invalidateOnRefresh:!0}}):(Kp.set(a,{x:0}),Ve.create({trigger:o,start:"top top",end:()=>`+=${window.innerHeight}`,pin:!0,anticipatePin:1,invalidateOnRefresh:!0}))};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s),Ve.getAll().forEach(o=>o.kill())}},[]),N.useEffect(()=>{const s=[{id:0,title:"No New Announcements for now",date:"To be Announced Eventually",content:"We will be right back with some exciting updates soon! Stay tuned for more information.",image:"https://blocks.astratic.com/img/general-img-portrait.png",link:"/"}];i(),n.length===0&&r(s),n||r(s)},[n]),I.jsxs("div",{className:"relative min-h-screen text-white font-sans overflow-hidden",children:[I.jsx(me.div,{className:"absolute inset-0 z-0",style:{background:"radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0a0a 70%)"},animate:{background:["radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 30%, #2a1a5e 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 60%, #1e1b4b 0%, #0a0a0a 70%)"]},transition:{duration:15,repeat:1/0,ease:"linear"},children:I.jsx(me.div,{className:"absolute inset-0 z-[1]",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(139, 92, 246, 0.4) 1px, transparent 0)",backgroundSize:"30px 30px",filter:"blur(1px)"},animate:{opacity:[.6,.9,.6],scale:[1,1.05,1],x:[-15,15,-15]},transition:{duration:8,repeat:1/0,ease:"easeInOut"}})}),I.jsxs(me.section,{variants:YS,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"relative w-full h-[70vh] flex justify-center items-center z-[5]",children:[I.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden",children:[I.jsx("video",{className:"absolute inset-0 w-full h-full object-cover filter brightness-75",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"auto",children:I.jsx("source",{src:z7,type:"video/mp4"})}),I.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/60 via-black/60 to-black/60 z-[1]"})]}),I.jsxs(me.div,{className:"text-center relative z-[2]",children:[I.jsx("h1",{className:"text-4xl md:text-8xl font-bold bg-clip-text text-white",children:"CyFuse"}),I.jsxs(me.h2,{className:"text-lg md:text-2xl mt-4 text-gray-300",initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.5},children:[I.jsx("p",{children:"Fusing tech to build tomorrow."}),I.jsx("p",{children:"Dare to Innovate, Unite to Create."})]})]})]}),I.jsx("section",{id:"announcements",className:"relative w-full py-16 z-10",children:I.jsxs("div",{className:"container mx-auto px-4",children:[I.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5},viewport:{once:!0},className:"mb-8",children:[I.jsx("h2",{className:"text-3xl md:text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-indigo-400 mb-4",children:"Latest Announcements"}),I.jsx("div",{className:"h-1 w-20 bg-indigo-500 rounded"})]}),I.jsx(Lw,{announcements:n})]})}),I.jsxs(me.section,{variants:YS,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"flex flex-col md:flex-row justify-center items-center w-full h-auto py-10 md:h-screen relative px-4 z-[5]",children:[I.jsxs(me.div,{variants:gy,className:"flex flex-col justify-center items-start z-[5]",children:[I.jsx("h1",{className:"text-3xl md:text-4xl mx-2 bg-clip-text text-transparent bg-gradient-to-r from-white to-indigo-400",children:"About Us"}),I.jsx(hr,{to:"/aboutus",className:"mt-4",children:I.jsx(me.span,{className:"mx-3 my-2 px-4 py-2 bg-white/5 backdrop-blur-lg border border-white/10 rounded-full cursor-pointer text-sm md:text-base transition-all duration-300 hover:bg-indigo-500/10 hover:border-indigo-500/30",whileHover:{scale:1.05},whileTap:{scale:.95},children:"Learn More"})})]}),I.jsx(me.div,{variants:gy,className:"flex justify-center items-center w-full md:w-1/3 h-auto md:h-1/2 min-w-[160px] min-h-[320px] ml-0 md:ml-12 p-6 md:p-16 text-sm md:text-lg bg-white/5 backdrop-blur-lg border border-white/10 rounded-2xl shadow-lg hover:shadow-xl hover:border-indigo-500/30 hover:-rotate-1 transition-all duration-300 z-[5]",children:I.jsx("p",{children:"An ultimate tech club where we're all about fusing diverse technologies and domains to create groundbreaking innovations!"})}),I.jsx(me.img,{variants:gy,src:B7,className:"absolute w-4/5 md:w-2/5 right-0 top-[-2vh] min-w-[320px] z-[4] opacity-70",alt:"About Background"})]}),I.jsx("div",{ref:e,className:"relative h-[100vh] z-10",children:I.jsx("div",{className:"sticky top-0 h-screen overflow-hidden",children:I.jsxs("div",{ref:t,className:"flex w-[200vw] h-full",children:[I.jsx("section",{className:"w-screen h-screen flex flex-col justify-center px-4 md:px-16",children:I.jsxs("div",{className:"container mx-auto",children:[I.jsxs(me.div,{initial:{opacity:0},whileInView:{opacity:1},transition:{duration:.5},viewport:{once:!0},className:"mb-8 flex items-center",children:[I.jsx(V7,{className:"w-8 h-8 mr-3 text-indigo-400"}),I.jsx("h2",{className:"text-3xl md:text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-indigo-400",children:"Projects"})]}),I.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8",children:[I.jsx(me.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.5},viewport:{once:!0},className:"md:w-1/2",children:I.jsxs("div",{className:"relative overflow-hidden rounded-xl border-2 border-indigo-500/30 shadow-[0_0_15px_rgba(99,102,241,0.2)]",children:[I.jsx("img",{src:U7,alt:"Featured Project",className:"w-full h-[70vh]"}),I.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent flex flex-col justify-end p-6",children:[I.jsx("span",{className:"px-3 py-1 bg-indigo-600/80 text-white text-sm rounded-full w-fit mb-3",children:"Featured"}),I.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-2",children:"AI-Powered Analytics"}),I.jsx("p",{className:"text-gray-300 mb-4 max-w-lg",children:"Our flagship project combines machine learning with real-time data processing to deliver actionable insights."})]})]})}),I.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:.2},viewport:{once:!0},className:"md:w-1/2 flex flex-col justify-center",children:[I.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Explore Our Tech Projects"}),I.jsx("p",{className:"text-gray-300 mb-6",children:"Discover innovative solutions created by our team. From AI and machine learning to web development and IoT, our projects showcase cutting-edge technology and creative problem-solving."}),I.jsxs("div",{className:"flex flex-wrap gap-3 mb-8",children:[I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"AI"}),I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"Machine Learning"}),I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"Web3"}),I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"IoT"})]}),I.jsx(kv,{href:"/projects",icon:I.jsx(GS,{className:"ml-2 h-5 w-5"}),children:"View All Projects"})]})]})]})}),I.jsx("section",{className:"w-screen h-screen flex flex-col justify-center px-4 md:px-16",children:I.jsxs("div",{className:"container mx-auto",children:[I.jsxs(me.div,{initial:{opacity:0},whileInView:{opacity:1},transition:{duration:.5},viewport:{once:!0},className:"mb-8 flex items-center",children:[I.jsx(wD,{className:"w-8 h-8 mr-3 text-indigo-400"}),I.jsx("h2",{className:"text-3xl md:text-4xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-white to-indigo-400",children:"Events"})]}),I.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-8",children:[I.jsx(me.div,{initial:{opacity:0,scale:.95},whileInView:{opacity:1,scale:1},transition:{duration:.5},viewport:{once:!0},className:"md:w-1/2",children:I.jsxs("div",{className:"relative overflow-hidden rounded-xl border-2 border-indigo-500/30 shadow-[0_0_15px_rgba(99,102,241,0.2)]",children:[I.jsx("img",{src:H7,alt:"Featured Event",className:"w-full h-[70vh]"}),I.jsxs("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent flex flex-col justify-end p-6",children:[I.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[I.jsx("span",{className:"px-3 py-1 bg-indigo-600/80 text-white text-sm rounded-full",children:"Upcoming"}),I.jsx("span",{className:"px-3 py-1 bg-white/20 text-white text-sm rounded-full",children:"June 15, 2025"})]}),I.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-2",children:"Annual Hackathon"}),I.jsx("p",{className:"text-gray-300 mb-4 max-w-lg",children:"Join us for 48 hours of coding, collaboration, and innovation. Prizes worth $10,000 to be won!"})]})]})}),I.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},transition:{duration:.5,delay:.2},viewport:{once:!0},className:"md:w-1/2 flex flex-col justify-center",children:[I.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-4",children:"Join Our Tech Events"}),I.jsx("p",{className:"text-gray-300 mb-6",children:"Participate in workshops, hackathons, and tech talks organized by CyFuse. Connect with fellow tech enthusiasts, learn new skills, and showcase your talents."}),I.jsxs("div",{className:"flex flex-wrap gap-3 mb-8",children:[I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"Workshops"}),I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"Tech Talks"}),I.jsx("span",{className:"px-3 py-1 bg-white/10 rounded-full text-sm",children:"Networking"})]}),I.jsx(kv,{href:"/events",icon:I.jsx(GS,{className:"ml-2 h-5 w-5"}),children:"View All Events"})]})]})]})})]})})})]})}function q7(){return I.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gray-900 text-white",children:[I.jsx("h1",{className:"text-4xl font-bold mb-4",children:"Event Detail"}),I.jsx("p",{className:"text-lg",children:"Details about the selected event will be displayed here."})]})}function K7(t){const e=N.useRef(null);return N.useImperativeHandle(t,()=>e.current),e}function bD(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=bD(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}function QS(...t){for(var e=0,n,r,i="";e<t.length;)(n=t[e++])&&(r=bD(n))&&(i&&(i+=" "),i+=r);return i}var G7=Object.create,SD=Object.defineProperty,Y7=Object.getOwnPropertyDescriptor,CD=Object.getOwnPropertyNames,Q7=Object.getPrototypeOf,X7=Object.prototype.hasOwnProperty,PD=(t,e)=>function(){return e||(0,t[CD(t)[0]])((e={exports:{}}).exports,e),e.exports},J7=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of CD(e))!X7.call(t,i)&&i!==n&&SD(t,i,{get:()=>e[i],enumerable:!(r=Y7(e,i))||r.enumerable});return t},Z7=(t,e,n)=>(n=t!=null?G7(Q7(t)):{},J7(!t||!t.__esModule?SD(n,"default",{value:t,enumerable:!0}):n,t)),e8=PD({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js"(t){var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator;function p(O){return O===null||typeof O!="object"?null:(O=d&&O[d]||O["@@iterator"],typeof O=="function"?O:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,C={};function _(O,H,se){this.props=O,this.context=H,this.refs=C,this.updater=se||v}_.prototype.isReactComponent={},_.prototype.setState=function(O,H){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,H,"setState")},_.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function w(){}w.prototype=_.prototype;function T(O,H,se){this.props=O,this.context=H,this.refs=C,this.updater=se||v}var k=T.prototype=new w;k.constructor=T,y(k,_.prototype),k.isPureReactComponent=!0;var P=Array.isArray,V=Object.prototype.hasOwnProperty,S={current:null},m={key:!0,ref:!0,__self:!0,__source:!0};function E(O,H,se){var ue,he={},be=null,we=null;if(H!=null)for(ue in H.ref!==void 0&&(we=H.ref),H.key!==void 0&&(be=""+H.key),H)V.call(H,ue)&&!m.hasOwnProperty(ue)&&(he[ue]=H[ue]);var Me=arguments.length-2;if(Me===1)he.children=se;else if(1<Me){for(var ve=Array(Me),Ze=0;Ze<Me;Ze++)ve[Ze]=arguments[Ze+2];he.children=ve}if(O&&O.defaultProps)for(ue in Me=O.defaultProps,Me)he[ue]===void 0&&(he[ue]=Me[ue]);return{$$typeof:e,type:O,key:be,ref:we,props:he,_owner:S.current}}function A(O,H){return{$$typeof:e,type:O.type,key:H,ref:O.ref,props:O.props,_owner:O._owner}}function D(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function R(O){var H={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(se){return H[se]})}var b=/\/+/g;function q(O,H){return typeof O=="object"&&O!==null&&O.key!=null?R(""+O.key):H.toString(36)}function z(O,H,se,ue,he){var be=typeof O;(be==="undefined"||be==="boolean")&&(O=null);var we=!1;if(O===null)we=!0;else switch(be){case"string":case"number":we=!0;break;case"object":switch(O.$$typeof){case e:case n:we=!0}}if(we)return we=O,he=he(we),O=ue===""?"."+q(we,0):ue,P(he)?(se="",O!=null&&(se=O.replace(b,"$&/")+"/"),z(he,H,se,"",function(Ze){return Ze})):he!=null&&(D(he)&&(he=A(he,se+(!he.key||we&&we.key===he.key?"":(""+he.key).replace(b,"$&/")+"/")+O)),H.push(he)),1;if(we=0,ue=ue===""?".":ue+":",P(O))for(var Me=0;Me<O.length;Me++){be=O[Me];var ve=ue+q(be,Me);we+=z(be,H,se,ve,he)}else if(ve=p(O),typeof ve=="function")for(O=ve.call(O),Me=0;!(be=O.next()).done;)be=be.value,ve=ue+q(be,Me++),we+=z(be,H,se,ve,he);else if(be==="object")throw H=String(O),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return we}function ee(O,H,se){if(O==null)return O;var ue=[],he=0;return z(O,ue,"","",function(be){return H.call(se,be,he++)}),ue}function J(O){if(O._status===-1){var H=O._result;H=H(),H.then(function(se){(O._status===0||O._status===-1)&&(O._status=1,O._result=se)},function(se){(O._status===0||O._status===-1)&&(O._status=2,O._result=se)}),O._status===-1&&(O._status=0,O._result=H)}if(O._status===1)return O._result.default;throw O._result}var B={current:null},Q={transition:null},L={ReactCurrentDispatcher:B,ReactCurrentBatchConfig:Q,ReactCurrentOwner:S};t.Children={map:ee,forEach:function(O,H,se){ee(O,function(){H.apply(this,arguments)},se)},count:function(O){var H=0;return ee(O,function(){H++}),H},toArray:function(O){return ee(O,function(H){return H})||[]},only:function(O){if(!D(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},t.Component=_,t.Fragment=r,t.Profiler=s,t.PureComponent=T,t.StrictMode=i,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(O,H,se){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var ue=y({},O.props),he=O.key,be=O.ref,we=O._owner;if(H!=null){if(H.ref!==void 0&&(be=H.ref,we=S.current),H.key!==void 0&&(he=""+H.key),O.type&&O.type.defaultProps)var Me=O.type.defaultProps;for(ve in H)V.call(H,ve)&&!m.hasOwnProperty(ve)&&(ue[ve]=H[ve]===void 0&&Me!==void 0?Me[ve]:H[ve])}var ve=arguments.length-2;if(ve===1)ue.children=se;else if(1<ve){Me=Array(ve);for(var Ze=0;Ze<ve;Ze++)Me[Ze]=arguments[Ze+2];ue.children=Me}return{$$typeof:e,type:O.type,key:he,ref:be,props:ue,_owner:we}},t.createContext=function(O){return O={$$typeof:a,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:o,_context:O},O.Consumer=O},t.createElement=E,t.createFactory=function(O){var H=E.bind(null,O);return H.type=O,H},t.createRef=function(){return{current:null}},t.forwardRef=function(O){return{$$typeof:l,render:O}},t.isValidElement=D,t.lazy=function(O){return{$$typeof:f,_payload:{_status:-1,_result:O},_init:J}},t.memo=function(O,H){return{$$typeof:h,type:O,compare:H===void 0?null:H}},t.startTransition=function(O){var H=Q.transition;Q.transition={};try{O()}finally{Q.transition=H}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(O,H){return B.current.useCallback(O,H)},t.useContext=function(O){return B.current.useContext(O)},t.useDebugValue=function(){},t.useDeferredValue=function(O){return B.current.useDeferredValue(O)},t.useEffect=function(O,H){return B.current.useEffect(O,H)},t.useId=function(){return B.current.useId()},t.useImperativeHandle=function(O,H,se){return B.current.useImperativeHandle(O,H,se)},t.useInsertionEffect=function(O,H){return B.current.useInsertionEffect(O,H)},t.useLayoutEffect=function(O,H){return B.current.useLayoutEffect(O,H)},t.useMemo=function(O,H){return B.current.useMemo(O,H)},t.useReducer=function(O,H,se){return B.current.useReducer(O,H,se)},t.useRef=function(O){return B.current.useRef(O)},t.useState=function(O){return B.current.useState(O)},t.useSyncExternalStore=function(O,H,se){return B.current.useSyncExternalStore(O,H,se)},t.useTransition=function(){return B.current.useTransition()},t.version="18.2.0"}}),t8=PD({"../../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"(t,e){e.exports=e8()}});Z7(t8());function n8(t){if(!t||typeof t!="object")return"";try{return JSON.stringify(t)}catch{return""}}/** * @license React * react.development.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. *//** * @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. */function r8(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function i8(t,e,n){r8(t,e),e.set(t,n)}const Ow=typeof document<"u"?th.useLayoutEffect:()=>{};function sl(t){const e=N.useRef(null);return Ow(()=>{e.current=t},[t]),N.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}let XS=new Map;function s8(t,e){if(t===e)return t;let n=XS.get(t);if(n)return n.forEach(i=>i(e)),e;let r=XS.get(e);return r?(r.forEach(i=>i(t)),t):e}function AD(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const mi=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},es=t=>t&&"window"in t&&t.window===t?t:mi(t).defaultView||window;function RD(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=RD(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function o8(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=RD(t))&&(r&&(r+=" "),r+=e);return r}function Fw(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let s=e[i],o=r[i];typeof s=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=AD(s,o):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof o=="string"?e[i]=o8(s,o):i==="id"&&s&&o?e.id=s8(s,o):e[i]=o!==void 0?o:s}}return e}function Ec(t){if(a8())t.focus({preventScroll:!0});else{let e=l8(t);t.focus(),u8(e)}}let cd=null;function a8(){if(cd==null){cd=!1;try{document.createElement("div").focus({get preventScroll(){return cd=!0,!0}})}catch{}}return cd}function l8(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function u8(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function qm(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function jw(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function zo(t){let e=null;return()=>(e==null&&(e=t()),e)}const Hh=zo(function(){return jw(/^Mac/i)}),c8=zo(function(){return jw(/^iPhone/i)}),ID=zo(function(){return jw(/^iPad/i)||Hh()&&navigator.maxTouchPoints>1}),kD=zo(function(){return c8()||ID()}),h8=zo(function(){return qm(/AppleWebKit/i)&&!f8()}),f8=zo(function(){return qm(/Chrome/i)}),DD=zo(function(){return qm(/Android/i)}),d8=zo(function(){return qm(/Firefox/i)});function Wh(t,e,n=!0){var r,i;let{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}=e;d8()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(Hh()?s=!0:o=!0);let u=h8()&&Hh()&&!ID()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:o,altKey:a,shiftKey:l}):new MouseEvent("click",{metaKey:s,ctrlKey:o,altKey:a,shiftKey:l,bubbles:!0,cancelable:!0});Wh.isOpening=n,Ec(t),t.dispatchEvent(u),Wh.isOpening=!1}Wh.isOpening=!1;let ol=new Map,Dv=new Set;function JS(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=ol.get(r.target);i||(i=new Set,ol.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=ol.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),ol.delete(r.target)),ol.size===0)){for(let s of Dv)s();Dv.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?JS():document.addEventListener("DOMContentLoaded",JS));function p8(t){requestAnimationFrame(()=>{ol.size===0?t():Dv.add(t)})}function m8(){let t=N.useRef(new Map),e=N.useCallback((i,s,o,a)=>{let l=a!=null&&a.once?(...u)=>{t.current.delete(o),o(...u)}:o;t.current.set(o,{type:s,eventTarget:i,fn:l,options:a}),i.addEventListener(s,o,a)},[]),n=N.useCallback((i,s,o,a)=>{var l;let u=((l=t.current.get(o))===null||l===void 0?void 0:l.fn)||o;i.removeEventListener(s,u,a),t.current.delete(o)},[]),r=N.useCallback(()=>{t.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return N.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function g8(t,e){Ow(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Mv(t){return t.mozInputSource===0&&t.isTrusted?!0:DD()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function y8(t){return!DD()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}let Pl="default",Nv="",Qd=new WeakMap;function ZS(t){if(kD()){if(Pl==="default"){const e=mi(t);Nv=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Pl="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(Qd.set(t,t.style.userSelect),t.style.userSelect="none")}function hd(t){if(kD()){if(Pl!=="disabled")return;Pl="restoring",setTimeout(()=>{p8(()=>{if(Pl==="restoring"){const e=mi(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Nv||""),Nv="",Pl="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Qd.has(t)){let e=Qd.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Qd.delete(t)}}const MD=th.createContext({register:()=>{}});MD.displayName="PressResponderContext";function v8(t,e){return e.get?e.get.call(t):e.value}function ND(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function _8(t,e){var n=ND(t,e,"get");return v8(t,n)}function w8(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function eC(t,e,n){var r=ND(t,e,"set");return w8(t,r,n),n}function x8(t){let e=N.useContext(MD);if(e){let{register:n,...r}=e;t=Fw(r,t),n()}return g8(e,t.ref),t}var fd=new WeakMap;class dd{continuePropagation(){eC(this,fd,!1)}get shouldStopPropagation(){return _8(this,fd)}constructor(e,n,r,i){i8(this,fd,{writable:!0,value:void 0}),eC(this,fd,!0);var s;let o=(s=i==null?void 0:i.target)!==null&&s!==void 0?s:r.currentTarget;const a=o==null?void 0:o.getBoundingClientRect();let l,u=0,h,f=null;r.clientX!=null&&r.clientY!=null&&(h=r.clientX,f=r.clientY),a&&(h!=null&&f!=null?(l=h-a.left,u=f-a.top):(l=a.width/2,u=a.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const tC=Symbol("linkClicked");function T8(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:s,isDisabled:o,isPressed:a,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:h,ref:f,...d}=x8(t),[p,v]=N.useState(!1),y=N.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:C,removeAllGlobalListeners:_}=m8(),w=sl((m,E)=>{let A=y.current;if(o||A.didFirePressStart)return!1;let D=!0;if(A.isTriggeringEvent=!0,r){let R=new dd("pressstart",E,m);r(R),D=R.shouldStopPropagation}return n&&n(!0),A.isTriggeringEvent=!1,A.didFirePressStart=!0,v(!0),D}),T=sl((m,E,A=!0)=>{let D=y.current;if(!D.didFirePressStart)return!1;D.ignoreClickAfterPress=!0,D.didFirePressStart=!1,D.isTriggeringEvent=!0;let R=!0;if(i){let b=new dd("pressend",E,m);i(b),R=b.shouldStopPropagation}if(n&&n(!1),v(!1),e&&A&&!o){let b=new dd("press",E,m);e(b),R&&(R=b.shouldStopPropagation)}return D.isTriggeringEvent=!1,R}),k=sl((m,E)=>{let A=y.current;if(o)return!1;if(s){A.isTriggeringEvent=!0;let D=new dd("pressup",E,m);return s(D),A.isTriggeringEvent=!1,D.shouldStopPropagation}return!0}),P=sl(m=>{let E=y.current;E.isPressed&&E.target&&(E.isOverTarget&&E.pointerType!=null&&T(ms(E.target,m),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,_(),h||hd(E.target))}),V=sl(m=>{u&&P(m)}),S=N.useMemo(()=>{let m=y.current,E={onKeyDown(D){if(yy(D.nativeEvent,D.currentTarget)&&D.currentTarget.contains(D.target)){var R;rC(D.target,D.key)&&D.preventDefault();let b=!0;if(!m.isPressed&&!D.repeat){m.target=D.currentTarget,m.isPressed=!0,b=w(D,"keyboard");let q=D.currentTarget,z=ee=>{yy(ee,q)&&!ee.repeat&&q.contains(ee.target)&&m.target&&k(ms(m.target,ee),"keyboard")};C(mi(D.currentTarget),"keyup",AD(z,A),!0)}b&&D.stopPropagation(),D.metaKey&&Hh()&&((R=m.metaKeyEvents)===null||R===void 0||R.set(D.key,D.nativeEvent))}else D.key==="Meta"&&(m.metaKeyEvents=new Map)},onClick(D){if(!(D&&!D.currentTarget.contains(D.target))&&D&&D.button===0&&!m.isTriggeringEvent&&!Wh.isOpening){let R=!0;if(o&&D.preventDefault(),!m.ignoreClickAfterPress&&!m.ignoreEmulatedMouseEvents&&!m.isPressed&&(m.pointerType==="virtual"||Mv(D.nativeEvent))){!o&&!l&&Ec(D.currentTarget);let b=w(D,"virtual"),q=k(D,"virtual"),z=T(D,"virtual");R=b&&q&&z}m.ignoreEmulatedMouseEvents=!1,m.ignoreClickAfterPress=!1,R&&D.stopPropagation()}}},A=D=>{var R;if(m.isPressed&&m.target&&yy(D,m.target)){var b;rC(D.target,D.key)&&D.preventDefault();let z=D.target;T(ms(m.target,D),"keyboard",m.target.contains(z)),_(),D.key!=="Enter"&&$w(m.target)&&m.target.contains(z)&&!D[tC]&&(D[tC]=!0,Wh(m.target,D,!1)),m.isPressed=!1,(b=m.metaKeyEvents)===null||b===void 0||b.delete(D.key)}else if(D.key==="Meta"&&(!((R=m.metaKeyEvents)===null||R===void 0)&&R.size)){var q;let z=m.metaKeyEvents;m.metaKeyEvents=void 0;for(let ee of z.values())(q=m.target)===null||q===void 0||q.dispatchEvent(new KeyboardEvent("keyup",ee))}};if(typeof PointerEvent<"u"){E.onPointerDown=z=>{if(z.button!==0||!z.currentTarget.contains(z.target))return;if(y8(z.nativeEvent)){m.pointerType="virtual";return}vy(z.currentTarget)&&z.preventDefault(),m.pointerType=z.pointerType;let ee=!0;m.isPressed||(m.isPressed=!0,m.isOverTarget=!0,m.activePointerId=z.pointerId,m.target=z.currentTarget,!o&&!l&&Ec(z.currentTarget),h||ZS(m.target),ee=w(z,m.pointerType),C(mi(z.currentTarget),"pointermove",D,!1),C(mi(z.currentTarget),"pointerup",R,!1),C(mi(z.currentTarget),"pointercancel",q,!1)),ee&&z.stopPropagation()},E.onMouseDown=z=>{z.currentTarget.contains(z.target)&&z.button===0&&(vy(z.currentTarget)&&z.preventDefault(),z.stopPropagation())},E.onPointerUp=z=>{!z.currentTarget.contains(z.target)||m.pointerType==="virtual"||z.button===0&&Ja(z,z.currentTarget)&&k(z,m.pointerType||z.pointerType)};let D=z=>{z.pointerId===m.activePointerId&&(m.target&&Ja(z,m.target)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,w(ms(m.target,z),m.pointerType)):m.target&&m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,T(ms(m.target,z),m.pointerType,!1),V(z)))},R=z=>{z.pointerId===m.activePointerId&&m.isPressed&&z.button===0&&m.target&&(Ja(z,m.target)&&m.pointerType!=null?T(ms(m.target,z),m.pointerType):m.isOverTarget&&m.pointerType!=null&&T(ms(m.target,z),m.pointerType,!1),m.isPressed=!1,m.isOverTarget=!1,m.activePointerId=null,m.pointerType=null,_(),h||hd(m.target),"ontouchend"in m.target&&z.pointerType!=="mouse"&&C(m.target,"touchend",b,{once:!0}))},b=z=>{VD(z.currentTarget)&&z.preventDefault()},q=z=>{P(z)};E.onDragStart=z=>{z.currentTarget.contains(z.target)&&P(z)}}else{E.onMouseDown=b=>{if(b.button!==0||!b.currentTarget.contains(b.target))return;if(vy(b.currentTarget)&&b.preventDefault(),m.ignoreEmulatedMouseEvents){b.stopPropagation();return}m.isPressed=!0,m.isOverTarget=!0,m.target=b.currentTarget,m.pointerType=Mv(b.nativeEvent)?"virtual":"mouse",!o&&!l&&Ec(b.currentTarget),w(b,m.pointerType)&&b.stopPropagation(),C(mi(b.currentTarget),"mouseup",D,!1)},E.onMouseEnter=b=>{if(!b.currentTarget.contains(b.target))return;let q=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!0,q=w(b,m.pointerType)),q&&b.stopPropagation()},E.onMouseLeave=b=>{if(!b.currentTarget.contains(b.target))return;let q=!0;m.isPressed&&!m.ignoreEmulatedMouseEvents&&m.pointerType!=null&&(m.isOverTarget=!1,q=T(b,m.pointerType,!1),V(b)),q&&b.stopPropagation()},E.onMouseUp=b=>{b.currentTarget.contains(b.target)&&!m.ignoreEmulatedMouseEvents&&b.button===0&&k(b,m.pointerType||"mouse")};let D=b=>{if(b.button===0){if(m.isPressed=!1,_(),m.ignoreEmulatedMouseEvents){m.ignoreEmulatedMouseEvents=!1;return}m.target&&Ja(b,m.target)&&m.pointerType!=null?T(ms(m.target,b),m.pointerType):m.target&&m.isOverTarget&&m.pointerType!=null&&T(ms(m.target,b),m.pointerType,!1),m.isOverTarget=!1}};E.onTouchStart=b=>{if(!b.currentTarget.contains(b.target))return;let q=E8(b.nativeEvent);if(!q)return;m.activePointerId=q.identifier,m.ignoreEmulatedMouseEvents=!0,m.isOverTarget=!0,m.isPressed=!0,m.target=b.currentTarget,m.pointerType="touch",!o&&!l&&Ec(b.currentTarget),h||ZS(m.target),w(Us(m.target,b),m.pointerType)&&b.stopPropagation(),C(es(b.currentTarget),"scroll",R,!0)},E.onTouchMove=b=>{if(!b.currentTarget.contains(b.target))return;if(!m.isPressed){b.stopPropagation();return}let q=nC(b.nativeEvent,m.activePointerId),z=!0;q&&Ja(q,b.currentTarget)?!m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!0,z=w(Us(m.target,b),m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(m.isOverTarget=!1,z=T(Us(m.target,b),m.pointerType,!1),V(Us(m.target,b))),z&&b.stopPropagation()},E.onTouchEnd=b=>{if(!b.currentTarget.contains(b.target))return;if(!m.isPressed){b.stopPropagation();return}let q=nC(b.nativeEvent,m.activePointerId),z=!0;q&&Ja(q,b.currentTarget)&&m.pointerType!=null?(k(Us(m.target,b),m.pointerType),z=T(Us(m.target,b),m.pointerType)):m.isOverTarget&&m.pointerType!=null&&(z=T(Us(m.target,b),m.pointerType,!1)),z&&b.stopPropagation(),m.isPressed=!1,m.activePointerId=null,m.isOverTarget=!1,m.ignoreEmulatedMouseEvents=!0,m.target&&!h&&hd(m.target),_()},E.onTouchCancel=b=>{b.currentTarget.contains(b.target)&&(b.stopPropagation(),m.isPressed&&P(Us(m.target,b)))};let R=b=>{m.isPressed&&b.target.contains(m.target)&&P({currentTarget:m.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};E.onDragStart=b=>{b.currentTarget.contains(b.target)&&P(b)}}return E},[C,o,l,_,h,P,V,T,w,k]);return N.useEffect(()=>()=>{var m;h||hd((m=y.current.target)!==null&&m!==void 0?m:void 0)},[h]),{isPressed:a||p,pressProps:Fw(d,S)}}function $w(t){return t.tagName==="A"&&t.hasAttribute("href")}function yy(t,e){const{key:n,code:r}=t,i=e,s=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof es(i).HTMLInputElement&&!LD(i,n)||i instanceof es(i).HTMLTextAreaElement||i.isContentEditable)&&!((s==="link"||!s&&$w(i))&&n!=="Enter")}function E8(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function nC(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function Us(t,e){let n=0,r=0;return e.targetTouches&&e.targetTouches.length===1&&(n=e.targetTouches[0].clientX,r=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function ms(t,e){let n=e.clientX,r=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:n,clientY:r}}function b8(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function S8(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Ja(t,e){let n=e.getBoundingClientRect(),r=b8(t);return S8(n,r)}function vy(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function VD(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!$w(t)}function rC(t,e){return t instanceof HTMLInputElement?!LD(t,e):VD(t)}const C8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function LD(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":C8.has(t.type)}class P8{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=e}}function OD(t){let e=N.useRef({isFocused:!1,observer:null});Ow(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=sl(r=>{t==null||t(r)});return N.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,s=o=>{e.current.isFocused=!1,i.disabled&&n(new P8("blur",o)),e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",s,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var o;(o=e.current.observer)===null||o===void 0||o.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function A8(t){let{isDisabled:e,onFocus:n,onBlur:r,onFocusChange:i}=t;const s=N.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),o=OD(s),a=N.useCallback(l=>{const u=mi(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),o(l))},[i,n,o]);return{focusProps:{onFocus:!e&&(n||i||r)?a:void 0,onBlur:!e&&(r||i)?s:void 0}}}let uf=null,Vv=new Set,Zc=new Map,Va=!1,Lv=!1;const R8={Tab:!0,Escape:!0};function zw(t,e){for(let n of Vv)n(t,e)}function I8(t){return!(t.metaKey||!Hh()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Zp(t){Va=!0,I8(t)&&(uf="keyboard",zw("keyboard",t))}function pi(t){uf="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(Va=!0,zw("pointer",t))}function FD(t){Mv(t)&&(Va=!0,uf="virtual")}function jD(t){t.target===window||t.target===document||(!Va&&!Lv&&(uf="virtual",zw("virtual",t)),Va=!1,Lv=!1)}function $D(){Va=!1,Lv=!0}function Ov(t){if(typeof window>"u"||Zc.get(es(t)))return;const e=es(t),n=mi(t);let r=e.HTMLElement.prototype.focus;e.HTMLElement.prototype.focus=function(){Va=!0,r.apply(this,arguments)},n.addEventListener("keydown",Zp,!0),n.addEventListener("keyup",Zp,!0),n.addEventListener("click",FD,!0),e.addEventListener("focus",jD,!0),e.addEventListener("blur",$D,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",pi,!0),n.addEventListener("pointermove",pi,!0),n.addEventListener("pointerup",pi,!0)):(n.addEventListener("mousedown",pi,!0),n.addEventListener("mousemove",pi,!0),n.addEventListener("mouseup",pi,!0)),e.addEventListener("beforeunload",()=>{zD(t)},{once:!0}),Zc.set(e,{focus:r})}const zD=(t,e)=>{const n=es(t),r=mi(t);e&&r.removeEventListener("DOMContentLoaded",e),Zc.has(n)&&(n.HTMLElement.prototype.focus=Zc.get(n).focus,r.removeEventListener("keydown",Zp,!0),r.removeEventListener("keyup",Zp,!0),r.removeEventListener("click",FD,!0),n.removeEventListener("focus",jD,!0),n.removeEventListener("blur",$D,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",pi,!0),r.removeEventListener("pointermove",pi,!0),r.removeEventListener("pointerup",pi,!0)):(r.removeEventListener("mousedown",pi,!0),r.removeEventListener("mousemove",pi,!0),r.removeEventListener("mouseup",pi,!0)),Zc.delete(n))};function k8(t){const e=mi(t);let n;return e.readyState!=="loading"?Ov(t):(n=()=>{Ov(t)},e.addEventListener("DOMContentLoaded",n)),()=>zD(t,n)}typeof document<"u"&&k8();function BD(){return uf!=="pointer"}const D8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function M8(t,e,n){var r;const i=typeof window<"u"?es(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,s=typeof window<"u"?es(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<"u"?es(n==null?void 0:n.target).HTMLElement:HTMLElement,a=typeof window<"u"?es(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return t=t||(n==null?void 0:n.target)instanceof i&&!D8.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof s||(n==null?void 0:n.target)instanceof o&&(n==null?void 0:n.target.isContentEditable),!(t&&e==="keyboard"&&n instanceof a&&!R8[n.key])}function N8(t,e,n){Ov(),N.useEffect(()=>{let r=(i,s)=>{M8(!!(n!=null&&n.isTextInput),i,s)&&t(BD())};return Vv.add(r),()=>{Vv.delete(r)}},e)}function V8(t){let{isDisabled:e,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=t,s=N.useRef({isFocusWithin:!1}),o=N.useCallback(u=>{s.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(s.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,s]),a=OD(o),l=N.useCallback(u=>{!s.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),s.current.isFocusWithin=!0,a(u))},[r,i,a]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:o}}}function L8(t={}){let{autoFocus:e=!1,isTextInput:n,within:r}=t,i=N.useRef({isFocused:!1,isFocusVisible:e||BD()}),[s,o]=N.useState(!1),[a,l]=N.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=N.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),h=N.useCallback(p=>{i.current.isFocused=p,o(p),u()},[u]);N8(p=>{i.current.isFocusVisible=p,u()},[],{isTextInput:n});let{focusProps:f}=A8({isDisabled:r,onFocusChange:h}),{focusWithinProps:d}=V8({isDisabled:!r,onFocusWithinChange:h});return{isFocused:s,isFocusVisible:a,focusProps:r?d:f}}function O8(t){return N.forwardRef(t)}var F8=(t,e,n=!0)=>{if(!e)return[t,{}];const r=e.reduce((i,s)=>s in t?{...i,[s]:t[s]}:i,{});return n?[Object.keys(t).filter(s=>!e.includes(s)).reduce((s,o)=>({...s,[o]:t[o]}),{}),r]:[t,r]},pd=["small","medium","large"],iC={theme:{opacity:["disabled"],spacing:["divider"],borderWidth:pd,borderRadius:pd},classGroups:{shadow:[{shadow:pd}],"font-size":[{text:["tiny",...pd]}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"]}},sC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Br=t=>!t||typeof t!="object"||Object.keys(t).length===0,j8=(t,e)=>JSON.stringify(t)===JSON.stringify(e);function UD(t,e){t.forEach(function(n){Array.isArray(n)?UD(n,e):e.push(n)})}function HD(t){let e=[];return UD(t,e),e}var WD=(...t)=>HD(t).filter(Boolean),qD=(t,e)=>{let n={},r=Object.keys(t),i=Object.keys(e);for(let s of r)if(i.includes(s)){let o=t[s],a=e[s];typeof o=="object"&&typeof a=="object"?n[s]=qD(o,a):Array.isArray(o)||Array.isArray(a)?n[s]=WD(a,o):n[s]=a+" "+o}else n[s]=t[s];for(let s of i)r.includes(s)||(n[s]=e[s]);return n},oC=t=>!t||typeof t!="string"?t:t.replace(/\s+/g," ").trim();function $8(){for(var t=0,e,n,r="";t<arguments.length;)(e=arguments[t++])&&(n=KD(e))&&(r&&(r+=" "),r+=n);return r}function KD(t){if(typeof t=="string")return t;for(var e,n="",r=0;r<t.length;r++)t[r]&&(e=KD(t[r]))&&(n&&(n+=" "),n+=e);return n}var Bw="-";function z8(t){var e=U8(t),n=t.conflictingClassGroups,r=t.conflictingClassGroupModifiers,i=r===void 0?{}:r;function s(a){var l=a.split(Bw);return l[0]===""&&l.length!==1&&l.shift(),GD(l,e)||B8(a)}function o(a,l){var u=n[a]||[];return l&&i[a]?[].concat(u,i[a]):u}return{getClassGroupId:s,getConflictingClassGroupIds:o}}function GD(t,e){var o;if(t.length===0)return e.classGroupId;var n=t[0],r=e.nextPart.get(n),i=r?GD(t.slice(1),r):void 0;if(i)return i;if(e.validators.length!==0){var s=t.join(Bw);return(o=e.validators.find(function(a){var l=a.validator;return l(s)}))==null?void 0:o.classGroupId}}var aC=/^\[(.+)\]$/;function B8(t){if(aC.test(t)){var e=aC.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}}function U8(t){var e=t.theme,n=t.prefix,r={nextPart:new Map,validators:[]},i=W8(Object.entries(t.classGroups),n);return i.forEach(function(s){var o=s[0],a=s[1];Fv(a,r,o,e)}),r}function Fv(t,e,n,r){t.forEach(function(i){if(typeof i=="string"){var s=i===""?e:lC(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(H8(i)){Fv(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(function(o){var a=o[0],l=o[1];Fv(l,lC(e,a),n,r)})})}function lC(t,e){var n=t;return e.split(Bw).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function H8(t){return t.isThemeGetter}function W8(t,e){return e?t.map(function(n){var r=n[0],i=n[1],s=i.map(function(o){return typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(function(a){var l=a[0],u=a[1];return[e+l,u]})):o});return[r,s]}):t}function q8(t){if(t<1)return{get:function(){},set:function(){}};var e=0,n=new Map,r=new Map;function i(s,o){n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)}return{get:function(o){var a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set:function(o,a){n.has(o)?n.set(o,a):i(o,a)}}}var YD="!";function K8(t){var e=t.separator||":",n=e.length===1,r=e[0],i=e.length;return function(o){for(var a=[],l=0,u=0,h,f=0;f<o.length;f++){var d=o[f];if(l===0){if(d===r&&(n||o.slice(f,f+i)===e)){a.push(o.slice(u,f)),u=f+i;continue}if(d==="/"){h=f;continue}}d==="["?l++:d==="]"&&l--}var p=a.length===0?o:o.substring(u),v=p.startsWith(YD),y=v?p.substring(1):p,C=h&&h>u?h-u:void 0;return{modifiers:a,hasImportantModifier:v,baseClassName:y,maybePostfixModifierPosition:C}}}function G8(t){if(t.length<=1)return t;var e=[],n=[];return t.forEach(function(r){var i=r[0]==="[";i?(e.push.apply(e,n.sort().concat([r])),n=[]):n.push(r)}),e.push.apply(e,n.sort()),e}function Y8(t){return{cache:q8(t.cacheSize),splitModifiers:K8(t),...z8(t)}}var Q8=/\s+/;function X8(t,e){var n=e.splitModifiers,r=e.getClassGroupId,i=e.getConflictingClassGroupIds,s=new Set;return t.trim().split(Q8).map(function(o){var a=n(o),l=a.modifiers,u=a.hasImportantModifier,h=a.baseClassName,f=a.maybePostfixModifierPosition,d=r(f?h.substring(0,f):h),p=!!f;if(!d){if(!f)return{isTailwindClass:!1,originalClassName:o};if(d=r(h),!d)return{isTailwindClass:!1,originalClassName:o};p=!1}var v=G8(l).join(":"),y=u?v+YD:v;return{isTailwindClass:!0,modifierId:y,classGroupId:d,originalClassName:o,hasPostfixModifier:p}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var a=o.modifierId,l=o.classGroupId,u=o.hasPostfixModifier,h=a+l;return s.has(h)?!1:(s.add(h),i(l,u).forEach(function(f){return s.add(a+f)}),!0)}).reverse().map(function(o){return o.originalClassName}).join(" ")}function jv(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i,s,o=a;function a(u){var h=e[0],f=e.slice(1),d=f.reduce(function(p,v){return v(p)},h());return r=Y8(d),i=r.cache.get,s=r.cache.set,o=l,l(u)}function l(u){var h=i(u);if(h)return h;var f=X8(u,r);return s(u,f),f}return function(){return o($8.apply(null,arguments))}}function yt(t){var e=function(r){return r[t]||[]};return e.isThemeGetter=!0,e}var QD=/^\[(?:([a-z-]+):)?(.+)\]$/i,J8=/^\d+\/\d+$/,Z8=new Set(["px","full","screen"]),eH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tH=/\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$/,nH=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Ai(t){return ca(t)||Z8.has(t)||J8.test(t)||$v(t)}function $v(t){return Ua(t,"length",lH)}function rH(t){return Ua(t,"size",XD)}function iH(t){return Ua(t,"position",XD)}function sH(t){return Ua(t,"url",uH)}function md(t){return Ua(t,"number",ca)}function ca(t){return!Number.isNaN(Number(t))}function oH(t){return t.endsWith("%")&&ca(t.slice(0,-1))}function nc(t){return uC(t)||Ua(t,"number",uC)}function $e(t){return QD.test(t)}function rc(){return!0}function Hs(t){return eH.test(t)}function aH(t){return Ua(t,"",cH)}function Ua(t,e,n){var r=QD.exec(t);return r?r[1]?r[1]===e:n(r[2]):!1}function lH(t){return tH.test(t)}function XD(){return!1}function uH(t){return t.startsWith("url(")}function uC(t){return Number.isInteger(Number(t))}function cH(t){return nH.test(t)}function zv(){var t=yt("colors"),e=yt("spacing"),n=yt("blur"),r=yt("brightness"),i=yt("borderColor"),s=yt("borderRadius"),o=yt("borderSpacing"),a=yt("borderWidth"),l=yt("contrast"),u=yt("grayscale"),h=yt("hueRotate"),f=yt("invert"),d=yt("gap"),p=yt("gradientColorStops"),v=yt("gradientColorStopPositions"),y=yt("inset"),C=yt("margin"),_=yt("opacity"),w=yt("padding"),T=yt("saturate"),k=yt("scale"),P=yt("sepia"),V=yt("skew"),S=yt("space"),m=yt("translate"),E=function(){return["auto","contain","none"]},A=function(){return["auto","hidden","clip","visible","scroll"]},D=function(){return["auto",$e,e]},R=function(){return[$e,e]},b=function(){return["",Ai]},q=function(){return["auto",ca,$e]},z=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},ee=function(){return["solid","dashed","dotted","double","none"]},J=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},B=function(){return["start","end","center","between","around","evenly","stretch"]},Q=function(){return["","0",$e]},L=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},O=function(){return[ca,md]},H=function(){return[ca,$e]};return{cacheSize:500,theme:{colors:[rc],spacing:[Ai],blur:["none","",Hs,$e],brightness:O(),borderColor:[t],borderRadius:["none","","full",Hs,$e],borderSpacing:R(),borderWidth:b(),contrast:O(),grayscale:Q(),hueRotate:H(),invert:Q(),gap:R(),gradientColorStops:[t],gradientColorStopPositions:[oH,$v],inset:D(),margin:D(),opacity:O(),padding:R(),saturate:O(),scale:O(),sepia:Q(),skew:H(),space:R(),translate:R()},classGroups:{aspect:[{aspect:["auto","square","video",$e]}],container:["container"],columns:[{columns:[Hs]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(z(),[$e])}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",nc]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$e]}],grow:[{grow:Q()}],shrink:[{shrink:Q()}],order:[{order:["first","last","none",nc]}],"grid-cols":[{"grid-cols":[rc]}],"col-start-end":[{col:["auto",{span:["full",nc]},$e]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[rc]}],"row-start-end":[{row:["auto",{span:[nc]},$e]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$e]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$e]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal"].concat(B())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(B(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(B(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",$e,e]}],"min-w":[{"min-w":["min","max","fit",$e,Ai]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Hs]},Hs,$e]}],h:[{h:[$e,e,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",$e,Ai]}],"max-h":[{"max-h":[$e,e,"min","max","fit"]}],"font-size":[{text:["base",Hs,$v]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",md]}],"font-family":[{font:[rc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$e]}],"line-clamp":[{"line-clamp":["none",ca,md]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,Ai]}],"list-image":[{"list-image":["none",$e]}],"list-style-type":[{list:["none","disc","decimal",$e]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(ee(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Ai]}],"underline-offset":[{"underline-offset":["auto",$e,Ai]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(z(),[iH])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",rH]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sH]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[_]}],"border-style":[{border:[].concat(ee(),["hidden"])}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[_]}],"divide-style":[{divide:ee()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:[""].concat(ee())}],"outline-offset":[{"outline-offset":[$e,Ai]}],"outline-w":[{outline:[Ai]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:b()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ai]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Hs,aH]}],"shadow-color":[{shadow:[rc]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":J()}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Hs,$e]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[f]}],saturate:[{saturate:[T]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$e]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",$e]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",$e]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[nc,$e]}],"translate-x":[{"translate-x":[m]}],"translate-y":[{"translate-y":[m]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$e]}],accent:[{accent:["auto",t]}],appearance:["appearance-none"],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",$e]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$e]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Ai,md]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"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"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function hH(t,e){for(var n in e)JD(t,n,e[n]);return t}var fH=Object.prototype.hasOwnProperty,dH=new Set(["string","number","boolean"]);function JD(t,e,n){if(!fH.call(t,e)||dH.has(typeof n)||n===null){t[e]=n;return}if(Array.isArray(n)&&Array.isArray(t[e])){t[e]=t[e].concat(n);return}if(typeof n=="object"&&typeof t[e]=="object"){if(t[e]===null){t[e]=n;return}for(var r in n)JD(t[e],r,n[r])}}function pH(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return typeof t=="function"?jv.apply(void 0,[zv,t].concat(n)):jv.apply(void 0,[function(){return hH(zv(),t)}].concat(n))}var mH=jv(zv),gH={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},ZD=t=>t||void 0,qh=(...t)=>ZD(HD(t).filter(Boolean).join(" ")),_y=null,em={},Bv=!1,ic=(...t)=>e=>e.twMerge?((!_y||Bv)&&(Bv=!1,_y=Br(em)?mH:pH(em)),ZD(_y(qh(t)))):qh(t),cC=(t,e)=>{for(let n in e)t.hasOwnProperty(n)?t[n]=qh(t[n],e[n]):t[n]=e[n];return t},yH=(t,e)=>{let{extend:n=null,slots:r={},variants:i={},compoundVariants:s=[],compoundSlots:o=[],defaultVariants:a={}}=t,l={...gH,...e},u=n!=null&&n.base?qh(n.base,t==null?void 0:t.base):t==null?void 0:t.base,h=n!=null&&n.variants&&!Br(n.variants)?qD(i,n.variants):i,f=n!=null&&n.defaultVariants&&!Br(n.defaultVariants)?{...n.defaultVariants,...a}:a;!Br(l.twMergeConfig)&&!j8(l.twMergeConfig,em)&&(Bv=!0,em=l.twMergeConfig);let d=Br(n==null?void 0:n.slots),p=Br(r)?{}:{base:qh(t==null?void 0:t.base,d&&(n==null?void 0:n.base)),...r},v=d?p:cC({...n==null?void 0:n.slots},Br(p)?{base:t==null?void 0:t.base}:p),y=_=>{if(Br(h)&&Br(r)&&d)return ic(u,_==null?void 0:_.class,_==null?void 0:_.className)(l);if(s&&!Array.isArray(s))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof s}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let w=(R,b,q=[],z)=>{let ee=q;if(typeof b=="string")ee=ee.concat(oC(b).split(" ").map(J=>`${R}:${J}`));else if(Array.isArray(b))ee=ee.concat(b.reduce((J,B)=>J.concat(`${R}:${B}`),[]));else if(typeof b=="object"&&typeof z=="string"){for(let J in b)if(b.hasOwnProperty(J)&&J===z){let B=b[J];if(B&&typeof B=="string"){let Q=oC(B);ee[z]?ee[z]=ee[z].concat(Q.split(" ").map(L=>`${R}:${L}`)):ee[z]=Q.split(" ").map(L=>`${R}:${L}`)}else Array.isArray(B)&&B.length>0&&(ee[z]=B.reduce((Q,L)=>Q.concat(`${R}:${L}`),[]))}}return ee},T=(R,b=h,q=null,z=null)=>{var ee;let J=b[R];if(!J||Br(J))return null;let B=(ee=z==null?void 0:z[R])!=null?ee:_==null?void 0:_[R];if(B===null)return null;let Q=sC(B),L=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,O=f==null?void 0:f[R],H=[];if(typeof Q=="object"&&L)for(let[ue,he]of Object.entries(Q)){let be=J[he];if(ue==="initial"){O=he;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(ue)||(H=w(ue,be,H,q))}let se=J[Q]||J[sC(O)];return typeof H=="object"&&typeof q=="string"&&H[q]?cC(H,se):H.length>0?(H.push(se),H):se},k=()=>h?Object.keys(h).map(R=>T(R,h)):null,P=(R,b)=>{if(!h||typeof h!="object")return null;let q=new Array;for(let z in h){let ee=T(z,h,R,b),J=R==="base"&&typeof ee=="string"?ee:ee&&ee[R];J&&(q[q.length]=J)}return q},V={};for(let R in _)_[R]!==void 0&&(V[R]=_[R]);let S=(R,b)=>{var q;let z=typeof(_==null?void 0:_[R])=="object"?{[R]:(q=_[R])==null?void 0:q.initial}:{};return{...f,...V,...z,...b}},m=(R=[],b)=>{let q=[];for(let{class:z,className:ee,...J}of R){let B=!0;for(let[Q,L]of Object.entries(J)){let O=S(Q,b);if(Array.isArray(L)){if(!L.includes(O[Q])){B=!1;break}}else if(O[Q]!==L){B=!1;break}}B&&(z&&q.push(z),ee&&q.push(ee))}return q},E=R=>{let b=m(s,R),q=m(n==null?void 0:n.compoundVariants,R);return WD(q,b)},A=R=>{let b=E(R);if(!Array.isArray(b))return b;let q={};for(let z of b)if(typeof z=="string"&&(q.base=ic(q.base,z)(l)),typeof z=="object")for(let[ee,J]of Object.entries(z))q[ee]=ic(q[ee],J)(l);return q},D=R=>{if(o.length<1)return null;let b={};for(let{slots:q=[],class:z,className:ee,...J}of o){if(!Br(J)){let B=!0;for(let Q of Object.keys(J)){let L=S(Q,R)[Q];if(L===void 0||(Array.isArray(J[Q])?!J[Q].includes(L):J[Q]!==L)){B=!1;break}}if(!B)continue}for(let B of q)b[B]=b[B]||[],b[B].push([z,ee])}return b};if(!Br(r)||!d){let R={};if(typeof v=="object"&&!Br(v))for(let b of Object.keys(v))R[b]=q=>{var z,ee;return ic(v[b],P(b,q),((z=A(q))!=null?z:[])[b],((ee=D(q))!=null?ee:[])[b],q==null?void 0:q.class,q==null?void 0:q.className)(l)};return R}return ic(u,k(),E(),_==null?void 0:_.class,_==null?void 0:_.className)(l)},C=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return y.variantKeys=C(),y.extend=n,y.base=u,y.slots=v,y.variants=h,y.defaultVariants=f,y.compoundSlots=o,y.compoundVariants=s,y},vH=(t,e)=>{var n,r,i;return yH(t,{...e,twMerge:(n=void 0)!=null?n:!0,twMergeConfig:{theme:{...(r=void 0)==null?void 0:r.theme,...iC.theme},classGroups:{...(i=void 0)==null?void 0:i.classGroups,...iC.classGroups}}})},_H=["outline-none","ring-2","ring-focus","ring-offset-2","ring-offset-background"],wH={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground",foreground:"bg-foreground text-background"},xH={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground",foreground:"shadow-lg shadow-foreground/40 bg-foreground text-background"},TH={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger",foreground:"bg-transparent border-foreground text-foreground"},EH={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500",foreground:"bg-foreground/10 text-foreground"},bH={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger",foreground:"border-default bg-default-100 text-foreground"},SH={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger",foreground:"bg-transparent text-foreground"},CH={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger",foreground:"border-foreground text-foreground hover:!bg-foreground"},ze={solid:wH,shadow:xH,bordered:TH,flat:EH,faded:bH,light:SH,ghost:CH},hC=vH({slots:{base:["relative","max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap"],content:"flex-1 text-inherit font-normal",dot:["w-2","h-2","ml-1","rounded-full"],avatar:"flex-shrink-0",closeButton:["z-10","appearance-none","outline-none","select-none","transition-opacity","opacity-70","hover:opacity-100","cursor-pointer","active:opacity-disabled","tap-highlight-transparent"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-medium"},shadow:{},dot:{base:"border-medium border-default text-foreground bg-transparent"}},color:{default:{dot:"bg-default-400"},primary:{dot:"bg-primary"},secondary:{dot:"bg-secondary"},success:{dot:"bg-success"},warning:{dot:"bg-warning"},danger:{dot:"bg-danger"}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"text-medium",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"text-large",avatar:"w-5 h-5"},lg:{base:"px-2 h-8 text-medium",content:"px-2",closeButton:"text-xl",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isOneChar:{true:{},false:{}},isCloseable:{true:{},false:{}},hasStartContent:{true:{}},hasEndContent:{true:{}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"}},isCloseButtonFocusVisible:{true:{closeButton:[..._H,"ring-1","rounded-full"]}}},defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1},compoundVariants:[{variant:"solid",color:"default",class:{base:ze.solid.default}},{variant:"solid",color:"primary",class:{base:ze.solid.primary}},{variant:"solid",color:"secondary",class:{base:ze.solid.secondary}},{variant:"solid",color:"success",class:{base:ze.solid.success}},{variant:"solid",color:"warning",class:{base:ze.solid.warning}},{variant:"solid",color:"danger",class:{base:ze.solid.danger}},{variant:"shadow",color:"default",class:{base:ze.shadow.default}},{variant:"shadow",color:"primary",class:{base:ze.shadow.primary}},{variant:"shadow",color:"secondary",class:{base:ze.shadow.secondary}},{variant:"shadow",color:"success",class:{base:ze.shadow.success}},{variant:"shadow",color:"warning",class:{base:ze.shadow.warning}},{variant:"shadow",color:"danger",class:{base:ze.shadow.danger}},{variant:"bordered",color:"default",class:{base:ze.bordered.default}},{variant:"bordered",color:"primary",class:{base:ze.bordered.primary}},{variant:"bordered",color:"secondary",class:{base:ze.bordered.secondary}},{variant:"bordered",color:"success",class:{base:ze.bordered.success}},{variant:"bordered",color:"warning",class:{base:ze.bordered.warning}},{variant:"bordered",color:"danger",class:{base:ze.bordered.danger}},{variant:"flat",color:"default",class:{base:ze.flat.default}},{variant:"flat",color:"primary",class:{base:ze.flat.primary}},{variant:"flat",color:"secondary",class:{base:ze.flat.secondary}},{variant:"flat",color:"success",class:{base:ze.flat.success}},{variant:"flat",color:"warning",class:{base:ze.flat.warning}},{variant:"flat",color:"danger",class:{base:ze.flat.danger}},{variant:"faded",color:"default",class:{base:ze.faded.default}},{variant:"faded",color:"primary",class:{base:ze.faded.primary}},{variant:"faded",color:"secondary",class:{base:ze.faded.secondary}},{variant:"faded",color:"success",class:{base:ze.faded.success}},{variant:"faded",color:"warning",class:{base:ze.faded.warning}},{variant:"faded",color:"danger",class:{base:ze.faded.danger}},{variant:"light",color:"default",class:{base:ze.light.default}},{variant:"light",color:"primary",class:{base:ze.light.primary}},{variant:"light",color:"secondary",class:{base:ze.light.secondary}},{variant:"light",color:"success",class:{base:ze.light.success}},{variant:"light",color:"warning",class:{base:ze.light.warning}},{variant:"light",color:"danger",class:{base:ze.light.danger}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"sm",class:{base:"w-5 h-5 min-w-5 min-h-5"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"md",class:{base:"w-6 h-6 min-w-6 min-h-6"}},{isOneChar:!0,hasStartContent:!1,hasEndContent:!1,size:"lg",class:{base:"w-7 h-7 min-w-7 min-h-7"}},{isOneChar:!0,isCloseable:!1,hasStartContent:!1,hasEndContent:!1,class:{base:"px-0 justify-center",content:"px-0 flex-none"}},{isOneChar:!0,isCloseable:!0,hasStartContent:!1,hasEndContent:!1,class:{base:"w-auto"}},{isOneChar:!0,variant:"dot",class:{base:"w-auto h-7 px-1 items-center",content:"px-2"}},{hasStartContent:!0,size:"sm",class:{content:"pl-0.5"}},{hasStartContent:!0,size:["md","lg"],class:{content:"pl-1"}},{hasEndContent:!0,size:"sm",class:{content:"pr-0.5"}},{hasEndContent:!0,size:["md","lg"],class:{content:"pr-1"}}]}),PH=t=>I.jsx("svg",{"aria-hidden":"true",focusable:"false",height:"1em",role:"presentation",viewBox:"0 0 24 24",width:"1em",...t,children:I.jsx("path",{d:"M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",fill:"currentColor"})});function AH(t){const[e,n]=F8(t,hC.variantKeys),{ref:r,as:i,children:s,avatar:o,startContent:a,endContent:l,onClose:u,classNames:h,className:f,...d}=e,p=i||"div",v=K7(r),y=QS(h==null?void 0:h.base,f),C=!!u,_=t.variant==="dot",{focusProps:w,isFocusVisible:T}=L8(),k=N.useMemo(()=>typeof s=="string"&&(s==null?void 0:s.length)===1,[s]),P=N.useMemo(()=>!!o||!!a,[o,a]),V=N.useMemo(()=>!!l||C,[l,C]),S=N.useMemo(()=>hC({...n,hasStartContent:P,hasEndContent:V,isOneChar:k,isCloseable:C,isCloseButtonFocusVisible:T}),[n8(n),T,P,V,k,C]),{pressProps:m}=T8({isDisabled:!!(t!=null&&t.isDisabled),onPress:u}),E=()=>({ref:v,className:S.base({class:y}),...d}),A=()=>({role:"button",tabIndex:0,className:S.closeButton({class:h==null?void 0:h.closeButton}),"aria-label":"close chip",...Fw(m,w)}),D=b=>N.isValidElement(b)?N.cloneElement(b,{className:S.avatar({class:h==null?void 0:h.avatar})}):null,R=b=>N.isValidElement(b)?N.cloneElement(b,{className:QS("max-h-[80%]",b.props.className)}):null;return{Component:p,children:s,slots:S,classNames:h,isDot:_,isCloseable:C,startContent:D(o)||R(a),endContent:R(l),getCloseButtonProps:A,getChipProps:E}}var eM=O8((t,e)=>{const{Component:n,children:r,slots:i,classNames:s,isDot:o,isCloseable:a,startContent:l,endContent:u,getCloseButtonProps:h,getChipProps:f}=AH({...t,ref:e}),d=N.useMemo(()=>o&&!l?I.jsx("span",{className:i.dot({class:s==null?void 0:s.dot})}):l,[i,l,o]),p=N.useMemo(()=>a?I.jsx("span",{...h(),children:u||I.jsx(PH,{})}):u,[u,a,h]);return I.jsxs(n,{...f(),children:[d,I.jsx("span",{className:i.content({class:s==null?void 0:s.content}),children:r}),p]})});eM.displayName="NextUI.Chip";var RH=eM;function gu(){return gu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gu.apply(null,arguments)}function IH(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}const kH={hidden:{opacity:0,y:20,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:"easeOut"}}};async function DH(){try{return await zm("projects")}catch(t){throw console.error("Error fetching projects:",t),new Error("Failed to load projects.")}}function MH(){const[t,e]=N.useState([]),[n,r]=N.useState(!0),[i,s]=N.useState(null);return N.useEffect(()=>{DH().then(o=>{if(Array.isArray(o))e(o);else if(Array.isArray(o[0]))e(o[0]);else throw new Error("Unexpected data format");r(!1)}).catch(o=>{s(o.message),r(!1)})},[]),n?I.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-950",children:I.jsx(me.p,{className:"text-white text-xl",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},children:"Loading projects..."})}):i?I.jsx("p",{className:"text-center text-red-500 mt-20",children:i}):I.jsxs("div",{className:"relative min-h-screen text-white font-sans py-16 px-6 md:px-16 lg:px-24 overflow-hidden",children:[I.jsx(me.div,{className:"absolute inset-0 z-0",style:{background:"radial-gradient(circle at 50% 50%, #1a3c34 0%, #0a0a0a 70%)"},animate:{background:["radial-gradient(circle at 50% 50%, #1a3c34 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 30%, #2a5e52 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 60%, #1a3c34 0%, #0a0a0a 70%)"]},transition:{duration:15,repeat:1/0,ease:"linear"},children:I.jsx(me.div,{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.1) 1px, transparent 0)",backgroundSize:"40px 40px"},animate:{opacity:[.3,.5,.3]},transition:{duration:5,repeat:1/0,ease:"easeInOut"}})}),I.jsxs("header",{className:"relative z-10 text-center my-24",children:[I.jsx(me.h1,{className:"text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-white to-green-400",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.6},children:"Projects"}),I.jsx(me.p,{className:"mt-4 text-lg md:text-2xl text-gray-300",initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.5},children:"Take a look at our projects"})]}),I.jsx("div",{className:"relative z-10 flex flex-wrap gap-4 justify-center mb-12",children:Array.isArray(t)&&t.map((o,a)=>I.jsx(me.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3,delay:a*.1},children:I.jsx(RH,{color:"default",variant:"bordered",className:"cursor-pointer bg-white/5 backdrop-blur-lg border border-white/10 text-white hover:bg-green-500/10 hover:border-green-500/30 transition-all duration-300 hover:scale-110",children:o.Title})},a))}),I.jsx("div",{className:"relative z-10 grid grid-cols-1 md:grid-cols-2 gap-8 mx-auto max-w-5xl",children:Array.isArray(t)&&t.map((o,a)=>I.jsx(me.div,{variants:kH,initial:"hidden",animate:"visible",className:"flex flex-col bg-white/5 backdrop-blur-lg border border-white/10 rounded-2xl p-6 md:p-8 shadow-lg hover:shadow-xl hover:border-green-500/30 transition-all duration-300",children:I.jsxs("div",{className:"flex-1 text-center",children:[I.jsx("h3",{className:"text-2xl font-semibold mb-4 bg-clip-text text-transparent bg-gradient-to-r from-green-300 to-teal-400",children:o.Title}),I.jsxs("p",{className:"text-gray-300 mb-3 text-base leading-relaxed",children:[I.jsx("strong",{className:"text-white",children:"Description:"})," ",o.Description]}),I.jsxs("p",{className:"text-gray-300 mb-3 text-base",children:[I.jsx("strong",{className:"text-white",children:"Status:"})," ",o.Status]}),o.Picture&&I.jsx("img",{src:o.Picture,alt:`${o.Title} illustration`,className:"mt-4 w-full rounded-xl object-cover border border-white/10"})]})},a))})]})}function NH(){const[t,e]=N.useState(!1),n=N.useRef(null);return N.useEffect(()=>{const r=n.current;if(!r)return;const i=()=>e(!0),s=()=>e(!1);return r.addEventListener("mouseenter",i),r.addEventListener("mouseleave",s),()=>{r.removeEventListener("mouseenter",i),r.removeEventListener("mouseleave",s)}},[]),[n,t]}const VH=({profile:t})=>{const[e,n]=NH();return I.jsxs("div",{ref:e,className:"relative overflow-hidden bg-gray-900 rounded-2xl shadow-xl transition-all duration-500 ease-in-out max-w-xs w-full h-[440px]",children:[I.jsxs("div",{className:"absolute inset-0 w-full h-full",children:[I.jsx("img",{src:t.imageUrl,alt:t.name,className:`w-full h-full object-cover transition-all duration-500 ease-in-out ${n?"scale-110":"scale-100"}`}),I.jsx("div",{className:`absolute inset-0 bg-gradient-to-t from-gray-900 via-gray-900/40 to-transparent transition-opacity duration-500 ${n?"opacity-90":"opacity-0"}`})]}),I.jsxs("div",{className:`absolute bottom-0 left-0 right-0 p-5 transition-all duration-500 ease-in-out ${n?"translate-y-0 bg-transparent":"bg-gray-900"}`,children:[I.jsxs("div",{className:"flex items-center mb-2",children:[I.jsx("h2",{className:"text-white text-2xl font-bold mr-2",children:t.name}),t.verified&&I.jsx(M7,{className:"w-5 h-5 text-green-400",fill:"currentColor"})]}),I.jsx("p",{className:"text-gray-300 mb-4",children:t.description}),I.jsxs("div",{className:"flex items-center justify-end gap-4",children:[t.linkedin&&I.jsx("a",{href:t.linkedin,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline text-lg",children:"LinkedIn"}),t.instagram&&I.jsx("a",{href:t.instagram,target:"_blank",rel:"noopener noreferrer",className:"text-pink-400 hover:underline text-lg",children:"Instagram"})]})]})]})},LH={hidden:{opacity:0,y:20,scale:.95},visible:{opacity:1,y:0,scale:1,transition:{duration:.5,ease:"easeOut"}}},tM={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.1}}},fC=()=>I.jsxs(me.section,{variants:tM,initial:"hidden",animate:"visible",className:"mb-20",children:[I.jsx("div",{className:"h-10 w-1/3 mx-auto bg-white/10 rounded animate-pulse mb-10"}),I.jsx("div",{className:"flex flex-wrap -mx-2",children:[...Array(4)].map((t,e)=>I.jsx("div",{className:"px-2 w-full sm:w-1/2 md:w-1/3 lg:w-1/4",children:I.jsxs(me.div,{variants:LH,className:"flex flex-col items-center text-center p-6 bg-white/10 backdrop-blur-lg border border-white/10 rounded-2xl shadow-lg animate-pulse h-96",children:[I.jsx("div",{className:"w-32 h-32 rounded-full bg-white/10 mb-4"}),I.jsx("div",{className:"h-6 w-1/2 bg-white/10 rounded mb-2"}),I.jsx("div",{className:"h-4 w-3/4 bg-white/10 rounded mb-2"}),I.jsx("div",{className:"h-4 w-1/3 bg-white/10 rounded mb-2"}),I.jsx("div",{className:"h-4 w-1/3 bg-white/10 rounded"})]})},e))})]});async function OH(){try{const t=await zm("team_details");return console.log("Fetched team data:",t),t}catch(t){throw console.error("Error fetching team:",t),new Error("Failed to load team.")}}const nM=({section:t,members:e})=>{const n=t.replace(/([A-Z])/g," $1").toUpperCase();return I.jsxs(me.section,{variants:tM,initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},className:"mb-20",children:[I.jsx("h2",{className:"text-4xl font-bold mb-10 text-center",children:n}),I.jsx("div",{className:"flex flex-wrap -mx-2 items-center justify-center",children:e.map((r,i)=>{const s={name:r.name,imageUrl:r.photo||"https://via.placeholder.com/150",description:r.quote,...r};return I.jsx("div",{className:"px-2 w-full sm:w-1/2 md:w-1/3 lg:w-1/4 pb-4 flex justify-center",children:I.jsx(VH,{profile:s})},i)})})]})};nM.propTypes={section:Lt.string.isRequired,members:Lt.arrayOf(Lt.shape({name:Lt.string.isRequired,photo:Lt.string,linkedin:Lt.string,instagram:Lt.string,quote:Lt.string})).isRequired};function FH(){const[t,e]=N.useState({coordinators:[],events:[],pr:[],content:[],creatives:[],development:[],design:[]}),[n,r]=N.useState(!0),[i,s]=N.useState(null);N.useEffect(()=>{OH().then(a=>{if(Array.isArray(a)){const l=a.reduce((u,h)=>{var p;const f=(p=h.team_name)==null?void 0:p.toLowerCase(),d={name:h.Name,photo:h.Picture,linkedin:h.Linkedin,instagram:h.Instagram,quote:h.Quote};return u[f]&&u[f].push(d),u},{coordinators:[],events:[],pr:[],content:[],creatives:[],development:[],design:[]});e(l)}else throw new Error("Unexpected data format")}).catch(a=>s(a.message)).finally(()=>r(!1))},[]);const o=["coordinators","events","pr","content","creatives","development","design"];return n?I.jsx(fC,{}):i?I.jsx("div",{className:"text-red-500 text-center",children:i}):I.jsxs("div",{className:"relative min-h-screen text-white font-sans py-16 px-6 md:px-16 lg:px-24 overflow-hidden",children:[I.jsx(me.div,{className:"absolute inset-0 z-0",style:{background:"radial-gradient(circle at 50% 50%, #1e3c72 0%, #0a0a0a 70%)"},animate:{background:["radial-gradient(circle at 50% 50%, #1e3c72 0%, #0a0a0a 70%)","radial-gradient(circle at 70% 30%, #2a5298 0%, #0a0a0a 70%)","radial-gradient(circle at 30% 60%, #1e3c72 0%, #0a0a0a 70%)"]},transition:{duration:15,repeat:1/0,ease:"linear"},children:I.jsx(me.div,{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.1) 1px, transparent 0)",backgroundSize:"40px 40px"},animate:{opacity:[.3,.5,.3]},transition:{duration:5,repeat:1/0,ease:"easeInOut"}})}),I.jsxs("header",{className:"relative z-10 text-center mb-16 mt-16",children:[I.jsx(me.h1,{className:"text-5xl md:text-7xl font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-white to-blue-400 pt-10",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.6},children:"Meet the Team"}),I.jsx(me.p,{className:"mt-4 text-lg md:text-2xl text-gray-300",initial:{opacity:0},animate:{opacity:1},transition:{delay:.3,duration:.5},children:"We believe in investing in people and forming meaningful bonds"})]}),I.jsx("div",{className:"relative z-10",children:I.jsx(N.Suspense,{fallback:I.jsx(fC,{}),children:o.map(a=>{var l;return((l=t[a])==null?void 0:l.length)>0?I.jsx(nM,{section:a,members:t[a]},a):null})})})]})}const rM="/assets/CyFuseLogo-CXVBZQBc.png";var iM=N.createContext({});function jH(t){if(Array.isArray(t))return t}function $H(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,o,a=[],l=!0,u=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(h){u=!0,i=h}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}}function dC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function zH(t,e){if(t){if(typeof t=="string")return dC(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dC(t,e):void 0}}function BH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sM(t,e){return jH(t)||$H(t,e)||zH(t,e)||BH()}function La(t){"@babel/helpers - typeof";return La=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},La(t)}function UH(t,e){if(La(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(La(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function HH(t){var e=UH(t,"string");return La(e)=="symbol"?e:e+""}function or(t,e,n){return(e=HH(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oM(t,e){if(t==null)return{};var n,r,i=IH(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.includes(n)||{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var aM={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var s="",o=0;o<arguments.length;o++){var a=arguments[o];a&&(s=i(s,r(a)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var o="";for(var a in s)e.call(s,a)&&s[a]&&(o=i(o,a));return o}function i(s,o){return o?s?s+" "+o:s+o:s}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})(aM);var WH=aM.exports;const qH=tm(WH),dn=Math.round;function wy(t,e){const n=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=e(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const pC=(t,e,n)=>n===0?t:t/100;function sc(t,e){const n=e||255;return t>n?n:t<0?0:t}class Al{constructor(e){or(this,"isValid",!0),or(this,"r",0),or(this,"g",0),or(this,"b",0),or(this,"a",1),or(this,"_h",void 0),or(this,"_s",void 0),or(this,"_l",void 0),or(this,"_v",void 0),or(this,"_max",void 0),or(this,"_min",void 0),or(this,"_brightness",void 0);function n(i){return i[0]in e&&i[1]in e&&i[2]in e}if(e)if(typeof e=="string"){let s=function(o){return i.startsWith(o)};var r=s;const i=e.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):s("rgb")?this.fromRgbString(i):s("hsl")?this.fromHslString(i):(s("hsv")||s("hsb"))&&this.fromHsvString(i)}else if(e instanceof Al)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(n("rgb"))this.r=sc(e.r),this.g=sc(e.g),this.b=sc(e.b),this.a=typeof e.a=="number"?sc(e.a,1):1;else if(n("hsl"))this.fromHsl(e);else if(n("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const n=this.toHsv();return n.h=e,this._c(n)}getLuminance(){function e(s){const o=s/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}const n=e(this.r),r=e(this.g),i=e(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=dn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(e=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(e,n=50){const r=this._c(e),i=n/100,s=a=>(r[a]-this[a])*i+this[a],o={r:dn(s("r")),g:dn(s("g")),b:dn(s("b")),a:dn(s("a")*100)/100};return this._c(o)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const n=this._c(e),r=this.a+n.a*(1-this.a),i=s=>dn((this[s]*this.a+n[s]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const n=(this.r||0).toString(16);e+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);e+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const s=dn(this.a*255).toString(16);e+=s.length===2?s:"0"+s}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),n=dn(this.getSaturation()*100),r=dn(this.getLightness()*100);return this.a!==1?`hsla(${e},${n}%,${r}%,${this.a})`:`hsl(${e},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,n,r){const i=this.clone();return i[e]=sc(n,r),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const n=e.replace("#","");function r(i,s){return parseInt(n[i]+n[s||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:e,s:n,l:r,a:i}){if(this._h=e%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const d=dn(r*255);this.r=d,this.g=d,this.b=d}let s=0,o=0,a=0;const l=e/60,u=(1-Math.abs(2*r-1))*n,h=u*(1-Math.abs(l%2-1));l>=0&&l<1?(s=u,o=h):l>=1&&l<2?(s=h,o=u):l>=2&&l<3?(o=u,a=h):l>=3&&l<4?(o=h,a=u):l>=4&&l<5?(s=h,a=u):l>=5&&l<6&&(s=u,a=h);const f=r-u/2;this.r=dn((s+f)*255),this.g=dn((o+f)*255),this.b=dn((a+f)*255)}fromHsv({h:e,s:n,v:r,a:i}){this._h=e%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const s=dn(r*255);if(this.r=s,this.g=s,this.b=s,n<=0)return;const o=e/60,a=Math.floor(o),l=o-a,u=dn(r*(1-n)*255),h=dn(r*(1-n*l)*255),f=dn(r*(1-n*(1-l))*255);switch(a){case 0:this.g=f,this.b=u;break;case 1:this.r=h,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=h;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=h;break}}fromHsvString(e){const n=wy(e,pC);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(e){const n=wy(e,pC);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(e){const n=wy(e,(r,i)=>i.includes("%")?dn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var gd=2,mC=.16,KH=.05,GH=.05,YH=.15,lM=5,uM=4,QH=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function gC(t,e,n){var r;return Math.round(t.h)>=60&&Math.round(t.h)<=240?r=n?Math.round(t.h)-gd*e:Math.round(t.h)+gd*e:r=n?Math.round(t.h)+gd*e:Math.round(t.h)-gd*e,r<0?r+=360:r>=360&&(r-=360),r}function yC(t,e,n){if(t.h===0&&t.s===0)return t.s;var r;return n?r=t.s-mC*e:e===uM?r=t.s+mC:r=t.s+KH*e,r>1&&(r=1),n&&e===lM&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function vC(t,e,n){var r;return n?r=t.v+GH*e:r=t.v-YH*e,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function XH(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Al(t),i=r.toHsv(),s=lM;s>0;s-=1){var o=new Al({h:gC(i,s,!0),s:yC(i,s,!0),v:vC(i,s,!0)});n.push(o)}n.push(r);for(var a=1;a<=uM;a+=1){var l=new Al({h:gC(i,a),s:yC(i,a),v:vC(i,a)});n.push(l)}return e.theme==="dark"?QH.map(function(u){var h=u.index,f=u.amount;return new Al(e.backgroundColor||"#141414").mix(n[h],f).toHexString()}):n.map(function(u){return u.toHexString()})}var Uv=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Uv.primary=Uv[5];function _C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?_C(Object(n),!0).forEach(function(r){or(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_C(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function JH(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ZH(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var n=e;n;){if(n===t)return!0;n=n.parentNode}return!1}var wC="data-rc-order",xC="data-rc-priority",eW="rc-util-key",Hv=new Map;function cM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):eW}function Uw(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function tW(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function Hw(t){return Array.from((Hv.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function hM(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!JH())return null;var n=e.csp,r=e.prepend,i=e.priority,s=i===void 0?0:i,o=tW(r),a=o==="prependQueue",l=document.createElement("style");l.setAttribute(wC,o),a&&s&&l.setAttribute(xC,"".concat(s)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=t;var u=Uw(e),h=u.firstChild;if(r){if(a){var f=(e.styles||Hw(u)).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(wC)))return!1;var p=Number(d.getAttribute(xC)||0);return s>=p});if(f.length)return u.insertBefore(l,f[f.length-1].nextSibling),l}u.insertBefore(l,h)}else u.appendChild(l);return l}function nW(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Uw(e);return(e.styles||Hw(n)).find(function(r){return r.getAttribute(cM(e))===t})}function rW(t,e){var n=Hv.get(t);if(!n||!ZH(document,n)){var r=hM("",e),i=r.parentNode;Hv.set(t,i),t.removeChild(r)}}function iW(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Uw(n),i=Hw(r),s=ts(ts({},n),{},{styles:i});rW(r,s);var o=nW(e,s);if(o){var a,l;if((a=s.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((l=s.csp)===null||l===void 0?void 0:l.nonce)){var u;o.nonce=(u=s.csp)===null||u===void 0?void 0:u.nonce}return o.innerHTML!==t&&(o.innerHTML=t),o}var h=hM(t,s);return h.setAttribute(cM(s),e),h}function fM(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function sW(t){return fM(t)instanceof ShadowRoot}function oW(t){return sW(t)?fM(t):null}var Wv={},aW=function(e){};function lW(t,e){}function uW(t,e){}function cW(){Wv={}}function dM(t,e,n){!e&&!Wv[n]&&(t(!1,n),Wv[n]=!0)}function Km(t,e){dM(lW,t,e)}function hW(t,e){dM(uW,t,e)}Km.preMessage=aW;Km.resetWarned=cW;Km.noteOnce=hW;function fW(t){return t.replace(/-(.)/g,function(e,n){return n.toUpperCase()})}function dW(t,e){Km(t,"[@ant-design/icons] ".concat(e))}function TC(t){return La(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(La(t.icon)==="object"||typeof t.icon=="function")}function EC(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,n){var r=t[n];switch(n){case"class":e.className=r,delete e.class;break;default:delete e[n],e[fW(n)]=r}return e},{})}function qv(t,e,n){return n?th.createElement(t.tag,ts(ts({key:e},EC(t.attrs)),n),(t.children||[]).map(function(r,i){return qv(r,"".concat(e,"-").concat(t.tag,"-").concat(i))})):th.createElement(t.tag,ts({key:e},EC(t.attrs)),(t.children||[]).map(function(r,i){return qv(r,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function pM(t){return XH(t)[0]}function mM(t){return t?Array.isArray(t)?t:[t]:[]}var pW=` .anticon { display: inline-flex; align-items: center; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,mW=function(e){var n=N.useContext(iM),r=n.csp,i=n.prefixCls,s=n.layer,o=pW;i&&(o=o.replace(/anticon/g,i)),s&&(o="@layer ".concat(s,` { `).concat(o,` }`)),N.useEffect(function(){var a=e.current,l=oW(a);iW(o,"@ant-design-icons",{prepend:!s,csp:r,attachTo:l})},[])},gW=["icon","className","onClick","style","primaryColor","secondaryColor"],eh={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function yW(t){var e=t.primaryColor,n=t.secondaryColor;eh.primaryColor=e,eh.secondaryColor=n||pM(e),eh.calculated=!!n}function vW(){return ts({},eh)}var Iu=function(e){var n=e.icon,r=e.className,i=e.onClick,s=e.style,o=e.primaryColor,a=e.secondaryColor,l=oM(e,gW),u=N.useRef(),h=eh;if(o&&(h={primaryColor:o,secondaryColor:a||pM(o)}),mW(u),dW(TC(n),"icon should be icon definiton, but got ".concat(n)),!TC(n))return null;var f=n;return f&&typeof f.icon=="function"&&(f=ts(ts({},f),{},{icon:f.icon(h.primaryColor,h.secondaryColor)})),qv(f.icon,"svg-".concat(f.name),ts(ts({className:r,onClick:i,style:s,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:u}))};Iu.displayName="IconReact";Iu.getTwoToneColors=vW;Iu.setTwoToneColors=yW;function gM(t){var e=mM(t),n=sM(e,2),r=n[0],i=n[1];return Iu.setTwoToneColors({primaryColor:r,secondaryColor:i})}function _W(){var t=Iu.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var wW=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];gM(Uv.primary);var ku=N.forwardRef(function(t,e){var n=t.className,r=t.icon,i=t.spin,s=t.rotate,o=t.tabIndex,a=t.onClick,l=t.twoToneColor,u=oM(t,wW),h=N.useContext(iM),f=h.prefixCls,d=f===void 0?"anticon":f,p=h.rootClassName,v=qH(p,d,or(or({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!i||r.name==="loading"),n),y=o;y===void 0&&a&&(y=-1);var C=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,_=mM(l),w=sM(_,2),T=w[0],k=w[1];return N.createElement("span",gu({role:"img","aria-label":r.name},u,{ref:e,tabIndex:y,onClick:a,className:v}),N.createElement(Iu,{icon:r,primaryColor:T,secondaryColor:k,style:C}))});ku.displayName="AntdIcon";ku.getTwoToneColor=_W;ku.setTwoToneColor=gM;var xW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 306.9c-113.5 0-205.1 91.6-205.1 205.1S398.5 717.1 512 717.1 717.1 625.5 717.1 512 625.5 306.9 512 306.9zm0 338.4c-73.4 0-133.3-59.9-133.3-133.3S438.6 378.7 512 378.7 645.3 438.6 645.3 512 585.4 645.3 512 645.3zm213.5-394.6c-26.5 0-47.9 21.4-47.9 47.9s21.4 47.9 47.9 47.9 47.9-21.3 47.9-47.9a47.84 47.84 0 00-47.9-47.9zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zm-88 235.8c-7.3 18.2-16.1 31.8-30.2 45.8-14.1 14.1-27.6 22.9-45.8 30.2C695.2 844.7 570.3 840 512 840c-58.3 0-183.3 4.7-235.9-16.1-18.2-7.3-31.8-16.1-45.8-30.2-14.1-14.1-22.9-27.6-30.2-45.8C179.3 695.2 184 570.3 184 512c0-58.3-4.7-183.3 16.1-235.9 7.3-18.2 16.1-31.8 30.2-45.8s27.6-22.9 45.8-30.2C328.7 179.3 453.7 184 512 184s183.3-4.7 235.9 16.1c18.2 7.3 31.8 16.1 45.8 30.2 14.1 14.1 22.9 27.6 30.2 45.8C844.7 328.7 840 453.7 840 512c0 58.3 4.7 183.2-16.2 235.8z"}}]},name:"instagram",theme:"outlined"},TW=function(e,n){return N.createElement(ku,gu({},e,{ref:n,icon:xW}))},EW=N.forwardRef(TW),bW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zM349.3 793.7H230.6V411.9h118.7v381.8zm-59.3-434a68.8 68.8 0 1168.8-68.8c-.1 38-30.9 68.8-68.8 68.8zm503.7 434H675.1V608c0-44.3-.8-101.2-61.7-101.2-61.7 0-71.2 48.2-71.2 98v188.9H423.7V411.9h113.8v52.2h1.6c15.8-30 54.5-61.7 112.3-61.7 120.2 0 142.3 79.1 142.3 181.9v209.4z"}}]},name:"linkedin",theme:"filled"},SW=function(e,n){return N.createElement(ku,gu({},e,{ref:n,icon:bW}))},CW=N.forwardRef(SW),PW={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M713.5 599.9c-10.9-5.6-65.2-32.2-75.3-35.8-10.1-3.8-17.5-5.6-24.8 5.6-7.4 11.1-28.4 35.8-35 43.3-6.4 7.4-12.9 8.3-23.8 2.8-64.8-32.4-107.3-57.8-150-131.1-11.3-19.5 11.3-18.1 32.4-60.2 3.6-7.4 1.8-13.7-1-19.3-2.8-5.6-24.8-59.8-34-81.9-8.9-21.5-18.1-18.5-24.8-18.9-6.4-.4-13.7-.4-21.1-.4-7.4 0-19.3 2.8-29.4 13.7-10.1 11.1-38.6 37.8-38.6 92s39.5 106.7 44.9 114.1c5.6 7.4 77.7 118.6 188.4 166.5 70 30.2 97.4 32.8 132.4 27.6 21.3-3.2 65.2-26.6 74.3-52.5 9.1-25.8 9.1-47.9 6.4-52.5-2.7-4.9-10.1-7.7-21-13z"}},{tag:"path",attrs:{d:"M925.2 338.4c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"whats-app",theme:"outlined"},AW=function(e,n){return N.createElement(ku,gu({},e,{ref:n,icon:PW}))},RW=N.forwardRef(AW);const oc={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}};function IW(){return I.jsx(me.footer,{className:"bg-gradient-to-b from-gray-900 to-gray-950 text-white font-sans py-14 border-t border-white/10",initial:"hidden",whileInView:"visible",viewport:{once:!0,amount:.2},children:I.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[I.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 mb-12",children:[I.jsxs(me.div,{variants:oc,className:"space-y-4",children:[I.jsxs("div",{className:"flex items-center mb-4",children:[I.jsx("img",{src:rM,alt:"CyFuse logo",className:"w-12 h-12 object-contain mr-3"}),I.jsx("h1",{className:"text-2xl font-bold text-white",children:"CyFuse"})]}),I.jsx("p",{className:"text-gray-400 text-sm",children:"Technology Innovation Club at IIIT Delhi"}),I.jsx("p",{className:"text-gray-400 text-sm",children:"Fostering innovation through interdisciplinary collaboration"})]}),I.jsxs(me.div,{variants:oc,className:"space-y-4",children:[I.jsx("h2",{className:"text-lg font-semibold text-white mb-2",children:"Contact"}),I.jsx("p",{className:"text-gray-400 text-sm hover:text-indigo-400 transition-colors",children:"cyfuse@sc.iiitd.ac.in"}),I.jsxs("p",{className:"text-gray-400 text-sm",children:["IIIT Delhi",I.jsx("br",{}),"Okhla Industrial Estate, Phase III",I.jsx("br",{}),"New Delhi - 110020"]})]}),I.jsxs(me.div,{variants:oc,className:"space-y-4",children:[I.jsx("h2",{className:"text-lg font-semibold text-white mb-2",children:"Explore"}),I.jsxs("ul",{className:"space-y-2",children:[I.jsx("li",{children:I.jsx(hr,{to:"/aboutus",className:"text-gray-400 text-sm hover:text-indigo-400 transition-colors",children:"About Us"})}),I.jsx("li",{children:I.jsx(hr,{to:"/projects",className:"text-gray-400 text-sm hover:text-indigo-400 transition-colors",children:"Projects"})}),I.jsx("li",{children:I.jsx(hr,{to:"/events",className:"text-gray-400 text-sm hover:text-indigo-400 transition-colors",children:"Events"})}),I.jsx("li",{children:I.jsx(hr,{to:"/team",className:"text-gray-400 text-sm hover:text-indigo-400 transition-colors",children:"Team"})})]})]}),I.jsxs(me.div,{variants:oc,className:"space-y-4",children:[I.jsx("h2",{className:"text-lg font-semibold text-white mb-2",children:"Connect"}),I.jsxs("div",{className:"flex space-x-4",children:[I.jsx(hr,{to:"https://www.instagram.com/cyfuse_iiitd/",className:"text-gray-400 hover:text-indigo-400 transition-colors",children:I.jsx(EW,{className:"text-xl"})}),I.jsx(hr,{to:"#",className:"text-gray-400 hover:text-indigo-400 transition-colors",children:I.jsx(RW,{className:"text-xl"})}),I.jsx(hr,{to:"https://in.linkedin.com/company/cyfuse",className:"text-gray-400 hover:text-indigo-400 transition-colors",children:I.jsx(CW,{className:"text-xl"})})]}),I.jsx("p",{className:"text-gray-400 text-sm mt-4",children:"Follow our latest updates and innovations"})]})]}),I.jsxs(me.div,{variants:oc,className:"border-t border-white/10 pt-8 text-center text-gray-500 text-sm",children:[I.jsxs("p",{children:["© ",new Date().getFullYear()," CyFuse - IIIT Delhi. All rights reserved."]}),I.jsx("p",{className:"mt-2",children:"Building tomorrow's technology today"})]})]})})}function kW(){const[t,e]=N.useState(!1),[n,r]=N.useState(!1);N.useEffect(()=>{const o=()=>r(window.scrollY>0);return window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[]);const i=n?"fixed top-0 w-full bg-black/60 shadow-lg z-50":"absolute top-8 left-0 w-full z-50",s=`mx-auto max-w-7xl px-4 md:px-6 lg:px-8 flex items-center justify-between py-4 ${n?"text-white":"bg-white/20 text-gray-100"} backdrop-blur-lg rounded-full transition-all duration-300 ease-in-out`;return I.jsx("header",{className:i,children:I.jsxs("div",{className:s,children:[I.jsx(hr,{to:"/",className:"flex items-center space-x-2 px-3",children:I.jsx("img",{src:rM,alt:"CyFuse Logo",className:"w-6 h-auto md:w-auto md:h-10",style:{objectFit:"cover"}})}),I.jsx("nav",{className:"hidden md:flex space-x-6",children:[{label:"Home",to:"/"},{label:"Events",to:"/events"},{label:"Projects",to:"/projects"},{label:"Team",to:"/team"},{label:"About Us",to:"/aboutus"}].map(({label:o,to:a})=>I.jsx(hr,{to:a,className:"px-4 py-2 rounded-full font-medium hover:opacity-80 transition-opacity duration-200 text-lg",children:o},o))}),I.jsxs("div",{className:"md:hidden relative",children:[I.jsx("button",{onClick:()=>e(o=>!o),"aria-label":"Toggle nav",children:I.jsxs("div",{className:"space-y-1.5",children:[I.jsx("span",{className:`block w-6 h-0.5 transition-transform duration-300 ${t?"rotate-45 translate-y-2 bg-white":"bg-gray-100"}`}),I.jsx("span",{className:`block w-6 h-0.5 transition-opacity duration-300 ${t?"opacity-0":"bg-gray-100"}`}),I.jsx("span",{className:`block w-6 h-0.5 transition-transform duration-300 ${t?"-rotate-45 -translate-y-2 bg-white":"bg-gray-100"}`})]})}),t&&I.jsx("div",{className:"absolute right-0 mt-2 w-48 bg-black/70 backdrop-blur-md rounded-xl p-4 flex flex-col space-y-3",children:[{label:"Home",to:"/"},{label:"Events",to:"/events"},{label:"Projects",to:"/projects"},{label:"Team",to:"/team"},{label:"About Us",to:"/aboutus"}].map(({label:o,to:a})=>I.jsx(hr,{to:a,className:"text-white px-3 py-2 rounded-full hover:opacity-80 transition-opacity duration-200 ",onClick:()=>e(!1),children:o},o))})]})]})})}function DW(){return I.jsxs(I.Fragment,{children:[I.jsx(kW,{}),I.jsx(VL,{}),I.jsx(IW,{})]})}const MW=oO([{path:"/",element:I.jsx(DW,{}),children:[{index:!0,element:I.jsx(NL,{to:"home",replace:!0})},{path:"home",element:I.jsx(W7,{})},{path:"aboutus",element:I.jsx(a6,{})},{path:"projects",children:[{index:!0,element:I.jsx(MH,{})},{path:":projectId",element:I.jsx(q7,{})}]},{path:"team",element:I.jsx(FH,{})},{path:"events",children:[{index:!0,element:I.jsx($B,{})},{path:":eventId",element:I.jsx(zB,{})}]}]}]);s4.createRoot(document.getElementById("root")).render(I.jsx(th.StrictMode,{children:I.jsx(vO,{router:MW})}));
Close