@lacrous/omnicloud 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/server/index.js +133 -5
- package/server/prisma/migrations/6_api_tokens/migration.sql +19 -0
- package/server/prisma/schema.prisma +16 -0
- package/server/web/assets/index-Cw_OGTa3.js +361 -0
- package/server/web/assets/index-j7HzBSRq.css +1 -0
- package/server/web/index.html +2 -2
- package/server/web/assets/index-Cimv9hDI.js +0 -346
- package/server/web/assets/index-DZrY56Sp.css +0 -1
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
var C2=Object.defineProperty;var ey=e=>{throw TypeError(e)};var E2=(e,t,s)=>t in e?C2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Qc=(e,t,s)=>E2(e,typeof t!="symbol"?t+"":t,s),Gc=(e,t,s)=>t.has(e)||ey("Cannot "+s);var R=(e,t,s)=>(Gc(e,t,"read from private field"),s?s.call(e):t.get(e)),ce=(e,t,s)=>t.has(e)?ey("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),te=(e,t,s,i)=>(Gc(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),ve=(e,t,s)=>(Gc(e,t,"access private method"),s);var tl=(e,t,s,i)=>({set _(o){te(e,t,o,s)},get _(){return R(e,t,i)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function T2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yc={exports:{}},uo={},Xc={exports:{}},Se={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ty;function N2(){if(ty)return Se;ty=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function x(V){return V===null||typeof V!="object"?null:(V=v&&V[v]||V["@@iterator"],typeof V=="function"?V:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,T={};function E(V,F,ne){this.props=V,this.context=F,this.refs=T,this.updater=ne||C}E.prototype.isReactComponent={},E.prototype.setState=function(V,F){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,F,"setState")},E.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function N(){}N.prototype=E.prototype;function L(V,F,ne){this.props=V,this.context=F,this.refs=T,this.updater=ne||C}var b=L.prototype=new N;b.constructor=L,k(b,E.prototype),b.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,I={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function D(V,F,ne){var ye,Ce={},Ne=null,Ee=null;if(F!=null)for(ye in F.ref!==void 0&&(Ee=F.ref),F.key!==void 0&&(Ne=""+F.key),F)_.call(F,ye)&&!j.hasOwnProperty(ye)&&(Ce[ye]=F[ye]);var we=arguments.length-2;if(we===1)Ce.children=ne;else if(1<we){for(var Re=Array(we),it=0;it<we;it++)Re[it]=arguments[it+2];Ce.children=Re}if(V&&V.defaultProps)for(ye in we=V.defaultProps,we)Ce[ye]===void 0&&(Ce[ye]=we[ye]);return{$$typeof:e,type:V,key:Ne,ref:Ee,props:Ce,_owner:I.current}}function B(V,F){return{$$typeof:e,type:V.type,key:F,ref:V.ref,props:V.props,_owner:V._owner}}function W(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function G(V){var F={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(ne){return F[ne]})}var K=/\/+/g;function U(V,F){return typeof V=="object"&&V!==null&&V.key!=null?G(""+V.key):F.toString(36)}function X(V,F,ne,ye,Ce){var Ne=typeof V;(Ne==="undefined"||Ne==="boolean")&&(V=null);var Ee=!1;if(V===null)Ee=!0;else switch(Ne){case"string":case"number":Ee=!0;break;case"object":switch(V.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=V,Ce=Ce(Ee),V=ye===""?"."+U(Ee,0):ye,M(Ce)?(ne="",V!=null&&(ne=V.replace(K,"$&/")+"/"),X(Ce,F,ne,"",function(it){return it})):Ce!=null&&(W(Ce)&&(Ce=B(Ce,ne+(!Ce.key||Ee&&Ee.key===Ce.key?"":(""+Ce.key).replace(K,"$&/")+"/")+V)),F.push(Ce)),1;if(Ee=0,ye=ye===""?".":ye+":",M(V))for(var we=0;we<V.length;we++){Ne=V[we];var Re=ye+U(Ne,we);Ee+=X(Ne,F,ne,Re,Ce)}else if(Re=x(V),typeof Re=="function")for(V=Re.call(V),we=0;!(Ne=V.next()).done;)Ne=Ne.value,Re=ye+U(Ne,we++),Ee+=X(Ne,F,ne,Re,Ce);else if(Ne==="object")throw F=String(V),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return Ee}function ge(V,F,ne){if(V==null)return V;var ye=[],Ce=0;return X(V,ye,"","",function(Ne){return F.call(ne,Ne,Ce++)}),ye}function me(V){if(V._status===-1){var F=V._result;F=F(),F.then(function(ne){(V._status===0||V._status===-1)&&(V._status=1,V._result=ne)},function(ne){(V._status===0||V._status===-1)&&(V._status=2,V._result=ne)}),V._status===-1&&(V._status=0,V._result=F)}if(V._status===1)return V._result.default;throw V._result}var Te={current:null},ee={transition:null},ue={ReactCurrentDispatcher:Te,ReactCurrentBatchConfig:ee,ReactCurrentOwner:I};function J(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:ge,forEach:function(V,F,ne){ge(V,function(){F.apply(this,arguments)},ne)},count:function(V){var F=0;return ge(V,function(){F++}),F},toArray:function(V){return ge(V,function(F){return F})||[]},only:function(V){if(!W(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},Se.Component=E,Se.Fragment=s,Se.Profiler=o,Se.PureComponent=L,Se.StrictMode=i,Se.Suspense=p,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,Se.act=J,Se.cloneElement=function(V,F,ne){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var ye=k({},V.props),Ce=V.key,Ne=V.ref,Ee=V._owner;if(F!=null){if(F.ref!==void 0&&(Ne=F.ref,Ee=I.current),F.key!==void 0&&(Ce=""+F.key),V.type&&V.type.defaultProps)var we=V.type.defaultProps;for(Re in F)_.call(F,Re)&&!j.hasOwnProperty(Re)&&(ye[Re]=F[Re]===void 0&&we!==void 0?we[Re]:F[Re])}var Re=arguments.length-2;if(Re===1)ye.children=ne;else if(1<Re){we=Array(Re);for(var it=0;it<Re;it++)we[it]=arguments[it+2];ye.children=we}return{$$typeof:e,type:V.type,key:Ce,ref:Ne,props:ye,_owner:Ee}},Se.createContext=function(V){return V={$$typeof:u,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:l,_context:V},V.Consumer=V},Se.createElement=D,Se.createFactory=function(V){var F=D.bind(null,V);return F.type=V,F},Se.createRef=function(){return{current:null}},Se.forwardRef=function(V){return{$$typeof:d,render:V}},Se.isValidElement=W,Se.lazy=function(V){return{$$typeof:g,_payload:{_status:-1,_result:V},_init:me}},Se.memo=function(V,F){return{$$typeof:m,type:V,compare:F===void 0?null:F}},Se.startTransition=function(V){var F=ee.transition;ee.transition={};try{V()}finally{ee.transition=F}},Se.unstable_act=J,Se.useCallback=function(V,F){return Te.current.useCallback(V,F)},Se.useContext=function(V){return Te.current.useContext(V)},Se.useDebugValue=function(){},Se.useDeferredValue=function(V){return Te.current.useDeferredValue(V)},Se.useEffect=function(V,F){return Te.current.useEffect(V,F)},Se.useId=function(){return Te.current.useId()},Se.useImperativeHandle=function(V,F,ne){return Te.current.useImperativeHandle(V,F,ne)},Se.useInsertionEffect=function(V,F){return Te.current.useInsertionEffect(V,F)},Se.useLayoutEffect=function(V,F){return Te.current.useLayoutEffect(V,F)},Se.useMemo=function(V,F){return Te.current.useMemo(V,F)},Se.useReducer=function(V,F,ne){return Te.current.useReducer(V,F,ne)},Se.useRef=function(V){return Te.current.useRef(V)},Se.useState=function(V){return Te.current.useState(V)},Se.useSyncExternalStore=function(V,F,ne){return Te.current.useSyncExternalStore(V,F,ne)},Se.useTransition=function(){return Te.current.useTransition()},Se.version="18.3.1",Se}var ny;function Uf(){return ny||(ny=1,Xc.exports=N2()),Xc.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ry;function P2(){if(ry)return uo;ry=1;var e=Uf(),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,p,m){var g,v={},x=null,C=null;m!==void 0&&(x=""+m),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(C=p.ref);for(g in p)i.call(p,g)&&!l.hasOwnProperty(g)&&(v[g]=p[g]);if(d&&d.defaultProps)for(g in p=d.defaultProps,p)v[g]===void 0&&(v[g]=p[g]);return{$$typeof:t,type:d,key:x,ref:C,props:v,_owner:o.current}}return uo.Fragment=s,uo.jsx=u,uo.jsxs=u,uo}var sy;function b2(){return sy||(sy=1,Yc.exports=P2()),Yc.exports}var f=b2(),S=Uf();const qv=S.createContext(void 0),Gt=e=>{const t=S.useContext(qv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},j2=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(qv.Provider,{value:e,children:t})),R2={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var kr,zf,Fv,M2=(Fv=class{constructor(){ce(this,kr,R2);ce(this,zf,!1)}setTimeoutProvider(e){te(this,kr,e)}setTimeout(e,t){return R(this,kr).setTimeout(e,t)}clearTimeout(e){R(this,kr).clearTimeout(e)}setInterval(e,t){return R(this,kr).setInterval(e,t)}clearInterval(e){R(this,kr).clearInterval(e)}},kr=new WeakMap,zf=new WeakMap,Fv);const Jr=new M2;function D2(e){setTimeout(e,0)}const A2=typeof window>"u"||"Deno"in globalThis;function St(){}function L2(e,t){return typeof e=="function"?e(t):e}function Qv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Gv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Be(e,t){return typeof e=="function"?e(t):e}function iy(e,t){const{type:s="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(i){if(t.queryHash!==$f(u,t.options))return!1}else if(!fi(t.queryKey,u))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function oy(e,t){const{exact:s,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(s){if(ps(t.options.mutationKey)!==ps(l))return!1}else if(!fi(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function $f(e,t){return((t==null?void 0:t.queryKeyHashFn)||ps)(e)}function ps(e){return JSON.stringify(e,(t,s)=>Xd(s)?Object.keys(s).sort().reduce((i,o)=>(i[o]=s[o],i),{}):s)}function fi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let i=0;i<t.length;i++)if(!fi(e[i],t[i]))return!1;return!0}const s=Object.keys(t);for(const i of s)if(!fi(e[i],t[i]))return!1;return!0}return!1}const I2=Object.prototype.hasOwnProperty;function Yv(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=ay(e)&&ay(t);if(!i&&!(Xd(e)&&Xd(t)))return t;const o=(i?e:Object.keys(e)).length,l=i?t:Object.keys(t),u=l.length,d=i?new Array(u):{};let p=0;for(let m=0;m<u;m++){const g=i?m:l[m],v=e[g],x=t[g];if(v===x){d[g]=v,(i?m<o:I2.call(e,g))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){d[g]=x;continue}const C=Yv(v,x,s+1);d[g]=C,C===v&&p++}return o===u&&p===o?e:d}function pl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function ay(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Xd(e){if(!ly(e))return!1;const t=Object.getPrototypeOf(e),s=t==null?void 0:t.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const i=s.prototype;return!(!ly(i)||!i.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function ly(e){return Object.prototype.toString.call(e)==="[object Object]"}function F2(e){return new Promise(t=>{Jr.setTimeout(t,e)})}function Jd(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Yv(e,t):t}function _2(e){return e}function O2(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function V2(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}const Hf=Symbol();function Xv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Hf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kf(e,t){return typeof e=="function"?e(...t):!!e}function B2(e,t,s){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}let z2=()=>A2;const Wf=()=>z2();var mi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ts,Cr,Zs,_v,U2=(_v=class extends mi{constructor(){super();ce(this,ts);ce(this,Cr);ce(this,Zs);te(this,Zs,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,Cr)||this.setEventListener(R(this,Zs))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Cr))==null||t.call(this),te(this,Cr,void 0))}setEventListener(t){var s;te(this,Zs,t),(s=R(this,Cr))==null||s.call(this),te(this,Cr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){R(this,ts)!==t&&(te(this,ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,ts)=="boolean"?R(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,Cr=new WeakMap,Zs=new WeakMap,_v);const qf=new U2,$2=D2;function H2(){let e=[],t=0,s=d=>{d()},i=d=>{d()},o=$2;const l=d=>{t?e.push(d):o(()=>{s(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{i(()=>{d.forEach(p=>{s(p)})})})};return{batch:d=>{let p;t++;try{p=d()}finally{t--,t||u()}return p},batchCalls:d=>(...p)=>{l(()=>{d(...p)})},schedule:l,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}const tt=H2();var ei,Er,ti,Ov,K2=(Ov=class extends mi{constructor(){super();ce(this,ei,!0);ce(this,Er);ce(this,ti);te(this,ti,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){R(this,Er)||this.setEventListener(R(this,ti))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Er))==null||t.call(this),te(this,Er,void 0))}setEventListener(t){var s;te(this,ti,t),(s=R(this,Er))==null||s.call(this),te(this,Er,t(this.setOnline.bind(this)))}setOnline(t){R(this,ei)!==t&&(te(this,ei,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return R(this,ei)}},ei=new WeakMap,Er=new WeakMap,ti=new WeakMap,Ov);const Tl=new K2;function W2(e){return Math.min(1e3*2**e,3e4)}function Jv(e){return(e??"online")==="online"?Tl.isOnline():!0}var Zd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zv(e){let t=!1,s=0,i,o="pending",l,u;const d=new Promise((L,b)=>{l=L,u=b});d.catch(St);const p=()=>o!=="pending",m=L=>{var b;if(!p()){const M=new Zd(L);T(M),(b=e.onCancel)==null||b.call(e,M)}},g=()=>{t=!0},v=()=>{t=!1},x=()=>qf.isFocused()&&(e.networkMode==="always"||Tl.isOnline())&&e.canRun(),C=()=>Jv(e.networkMode)&&e.canRun(),k=L=>{p()||(i==null||i(),o="resolved",l(L))},T=L=>{p()||(i==null||i(),o="rejected",u(L))},E=()=>new Promise(L=>{var b;i=M=>{(p()||x())&&L(M)},(b=e.onPause)==null||b.call(e)}).then(()=>{var L;i=void 0,p()||(L=e.onContinue)==null||L.call(e)}),N=()=>{if(p())return;let L;const b=s===0?e.initialPromise:void 0;try{L=b??e.fn()}catch(M){L=Promise.reject(M)}Promise.resolve(L).then(k).catch(M=>{var B;if(p())return;const _=e.retry??(Wf()?0:3),I=e.retryDelay??W2,j=typeof I=="function"?I(s,M):I,D=_===!0||typeof _=="number"&&s<_||typeof _=="function"&&_(s,M);if(t||!D){T(M);return}s++,(B=e.onFail)==null||B.call(e,s,M),F2(j).then(()=>x()?void 0:E()).then(()=>{t?T(M):N()})})};return{promise:d,status:()=>o,cancel:m,continue:()=>(i==null||i(),d),cancelRetry:g,continueRetry:v,canStart:C,start:()=>(C()?N():E().then(N),d)}}var ns,Vv,ex=(Vv=class{constructor(){ce(this,ns)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qv(this.gcTime)&&te(this,ns,Jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wf()?1/0:3e5))}clearGcTimeout(){R(this,ns)!==void 0&&(Jr.clearTimeout(R(this,ns)),te(this,ns,void 0))}},ns=new WeakMap,Vv);function q2(e){return{onFetch:(t,s)=>{var g,v,x,C,k;const i=t.options,o=(x=(v=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,l=((C=t.state.data)==null?void 0:C.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let d={pages:[],pageParams:[]},p=0;const m=async()=>{let T=!1;const E=b=>{B2(b,()=>t.signal,()=>T=!0)},N=Xv(t.options,t.fetchOptions),L=async(b,M,_)=>{if(T)return Promise.reject(t.signal.reason);if(M==null&&b.pages.length)return Promise.resolve(b);const j=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:M,direction:_?"backward":"forward",meta:t.options.meta};return E(G),G})(),D=await N(j),{maxPages:B}=t.options,W=_?V2:O2;return{pages:W(b.pages,D,B),pageParams:W(b.pageParams,M,B)}};if(o&&l.length){const b=o==="backward",M=b?tx:ef,_={pages:l,pageParams:u};d=await L(_,M(i,_),b)}else{const b=e??l.length;do{const M=p===0?u[0]??i.initialPageParam:ef(i,d);if(p>0&&M==null)break;d=await L(d,M),p++}while(p<b)}return d};t.options.persister?t.fetchFn=()=>{var T,E;return(E=(T=t.options).persister)==null?void 0:E.call(T,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function ef(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function tx(e,{pages:t,pageParams:s}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,s[0],s):void 0}function Q2(e,t){return t?ef(e,t)!=null:!1}function G2(e,t){return!t||!e.getPreviousPageParam?!1:tx(e,t)!=null}var ni,rs,ri,Ht,ss,Xe,Do,is,an,Vn,Bv,Y2=(Bv=class extends ex{constructor(t){super();ce(this,an);ce(this,ni);ce(this,rs);ce(this,ri);ce(this,Ht);ce(this,ss);ce(this,Xe);ce(this,Do);ce(this,is);te(this,is,!1),te(this,Do,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,ss,t.client),te(this,Ht,R(this,ss).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,rs,cy(this.options)),this.state=t.state??R(this,rs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return R(this,ni)}get promise(){var t;return(t=R(this,Xe))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,Do),...t},t!=null&&t._type&&te(this,ni,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=cy(this.options);s.data!==void 0&&(this.setState(uy(s.data,s.dataUpdatedAt)),te(this,rs,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Ht).remove(this)}setData(t,s){const i=Jd(this.state.data,t,this.options);return ve(this,an,Vn).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t){ve(this,an,Vn).call(this,{type:"setState",state:t})}cancel(t){var i,o;const s=(i=R(this,Xe))==null?void 0:i.promise;return(o=R(this,Xe))==null||o.cancel(t),s?s.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return R(this,rs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Be(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Hf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Be(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Gv(this.state.dataUpdatedAt,t)}onFocus(){var t,s;(t=this.observers.find(i=>i.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(s=R(this,Xe))==null||s.continue()}onOnline(){var t,s;(t=this.observers.find(i=>i.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(s=R(this,Xe))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Ht).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const s=this.observers.indexOf(t);s!==-1&&(this.observers.splice(s,1),this.observers.length||(R(this,Xe)&&(R(this,is)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?R(this,Xe).cancel({revert:!0}):R(this,Xe).cancelRetry()),this.scheduleGc()),R(this,Ht).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,an,Vn).call(this,{type:"invalidate"})}async fetch(t,s){var m,g,v,x,C,k,T,E,N,L,b,M;if(this.state.fetchStatus!=="idle"&&((m=R(this,Xe))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,Xe))return R(this,Xe).continueRetry(),R(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(I=>I.options.queryFn);_&&this.setOptions(_.options)}const i=new AbortController,o=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(te(this,is,!0),i.signal)})},l=()=>{const _=Xv(this.options,s),j=(()=>{const D={client:R(this,ss),queryKey:this.queryKey,meta:this.meta};return o(D),D})();return te(this,is,!1),this.options.persister?this.options.persister(_,j,this):_(j)},d=(()=>{const _={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,ss),state:this.state,fetchFn:l};return o(_),_})();(g=R(this,ni)==="infinite"?q2(this.options.pages):this.options.behavior)==null||g.onFetch(d,this),te(this,ri,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=d.fetchOptions)==null?void 0:v.meta))&&ve(this,an,Vn).call(this,{type:"fetch",meta:(x=d.fetchOptions)==null?void 0:x.meta});const p=te(this,Xe,Zv({initialPromise:s==null?void 0:s.initialPromise,fn:d.fetchFn,onCancel:_=>{_ instanceof Zd&&_.revert&&this.setState({...R(this,ri),fetchStatus:"idle"}),i.abort()},onFail:(_,I)=>{ve(this,an,Vn).call(this,{type:"failed",failureCount:_,error:I})},onPause:()=>{ve(this,an,Vn).call(this,{type:"pause"})},onContinue:()=>{ve(this,an,Vn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const _=await p.start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(k=(C=R(this,Ht).config).onSuccess)==null||k.call(C,_,this),(E=(T=R(this,Ht).config).onSettled)==null||E.call(T,_,this.state.error,this),_}catch(_){if(_ instanceof Zd){if(_.silent)return R(this,Xe).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw ve(this,an,Vn).call(this,{type:"error",error:_}),(L=(N=R(this,Ht).config).onError)==null||L.call(N,_,this),(M=(b=R(this,Ht).config).onSettled)==null||M.call(b,this.state.data,_,this),_}finally{R(this,Xe)===p&&te(this,Xe,void 0),this.scheduleGc()}}},ni=new WeakMap,rs=new WeakMap,ri=new WeakMap,Ht=new WeakMap,ss=new WeakMap,Xe=new WeakMap,Do=new WeakMap,is=new WeakMap,an=new WeakSet,Vn=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...nx(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...uy(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,ri,t.manual?o:void 0),o;case"error":const l=t.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),tt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),R(this,Ht).notify({query:this,type:"updated",action:t})})},Bv);function nx(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Jv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function uy(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cy(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var xt,Pe,Ao,wt,os,si,zn,Lo,ii,oi,as,ls,Tr,ai,Me,go,tf,nf,rf,sf,of,af,lf,uf,zv,rx=(zv=class extends mi{constructor(t,s){super();ce(this,Me);ce(this,xt);ce(this,Pe);ce(this,Ao);ce(this,wt);ce(this,os);ce(this,si);ce(this,zn);ce(this,Lo);ce(this,ii);ce(this,oi);ce(this,as);ce(this,ls);ce(this,Tr);ce(this,ai,new Set);this.options=s,te(this,xt,t),te(this,zn,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Pe).addObserver(this),dy(R(this,Pe),this.options)?ve(this,Me,go).call(this):this.updateResult(),ve(this,Me,of).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cf(R(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cf(R(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Me,af).call(this),ve(this,Me,lf).call(this),R(this,Pe).removeObserver(this)}setOptions(t){const s=this.options,i=R(this,Pe);if(this.options=R(this,xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Be(this.options.enabled,R(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Me,uf).call(this),R(this,Pe).setOptions(this.options),s._defaulted&&!pl(this.options,s)&&R(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Pe),observer:this});const o=this.hasListeners();o&&fy(R(this,Pe),i,this.options,s)&&ve(this,Me,go).call(this),this.updateResult(),o&&(R(this,Pe)!==i||Be(this.options.enabled,R(this,Pe))!==Be(s.enabled,R(this,Pe))||Be(this.options.staleTime,R(this,Pe))!==Be(s.staleTime,R(this,Pe)))&&ve(this,Me,nf).call(this);const l=ve(this,Me,rf).call(this);o&&(R(this,Pe)!==i||Be(this.options.enabled,R(this,Pe))!==Be(s.enabled,R(this,Pe))||l!==R(this,Tr))&&ve(this,Me,sf).call(this,l)}getOptimisticResult(t){const s=R(this,xt).getQueryCache().build(R(this,xt),t),i=this.createResult(s,t);return pl(this.getCurrentResult(),i)||(te(this,wt,i),te(this,si,this.options),te(this,os,R(this,Pe).state)),i}getCurrentResult(){return R(this,wt)}trackResult(t,s){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),s==null||s(o),Reflect.get(i,o))})}trackProp(t){R(this,ai).add(t)}getCurrentQuery(){return R(this,Pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,xt).defaultQueryOptions(t),i=R(this,xt).getQueryCache().build(R(this,xt),s);let o=()=>{},l;const u=new Promise(d=>{l=d,o=R(this,xt).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===i.queryHash&&i.state.data!==void 0&&(o(),d(this.createResult(i,s)))})});return Promise.race([i.fetch().then(()=>{const d=this.createResult(i,s);return l==null||l(d),d}).finally(()=>{o()}),u])}fetch(t){return ve(this,Me,go).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,wt)))}createResult(t,s){var I;const i=R(this,Pe),o=this.options,l=R(this,wt),u=R(this,os),d=R(this,si),p=t!==i?t.state:R(this,Ao),{state:m}=t;let g={...m},v=!1,x;if(s._optimisticResults){const j=this.hasListeners(),D=!j&&dy(t,s),B=j&&fy(t,i,s,o);(D||B)&&(g={...g,...nx(m.data,t.options)}),s._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:T}=g;x=g.data;let E=!1;if(s.placeholderData!==void 0&&x===void 0&&T==="pending"){let j;l!=null&&l.isPlaceholderData&&s.placeholderData===(d==null?void 0:d.placeholderData)?(j=l.data,E=!0):j=typeof s.placeholderData=="function"?s.placeholderData((I=R(this,oi))==null?void 0:I.state.data,R(this,oi)):s.placeholderData,j!==void 0&&(T="success",x=Jd(l==null?void 0:l.data,j,s),v=!0)}if(s.select&&x!==void 0&&!E)if(l&&x===(u==null?void 0:u.data)&&s.select===R(this,Lo))x=R(this,ii);else try{te(this,Lo,s.select),x=s.select(x),x=Jd(l==null?void 0:l.data,x,s),te(this,ii,x),te(this,zn,null)}catch(j){te(this,zn,j)}else x===void 0&&te(this,zn,null);R(this,zn)&&(C=R(this,zn),x=R(this,ii),k=Date.now(),T="error",v=!1);const N=g.fetchStatus==="fetching",L=T==="pending",b=T==="error",M=L&&N,_=x!==void 0;return{status:T,fetchStatus:g.fetchStatus,isPending:L,isSuccess:T==="success",isError:b,isInitialLoading:M,isLoading:M,data:x,dataUpdatedAt:g.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:N,isRefetching:N&&!L,isLoadingError:b&&!_,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:b&&_,isStale:Qf(t,s),refetch:this.refetch,isEnabled:Be(s.enabled,t)!==!1}}updateResult(){const t=R(this,wt),s=this.createResult(R(this,Pe),this.options);if(te(this,os,R(this,Pe).state),te(this,si,this.options),R(this,os).data!==void 0&&te(this,oi,R(this,Pe)),pl(s,t))return;te(this,wt,s);const o=(()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!R(this,ai).size)return!0;const d=new Set(u??R(this,ai));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,wt)).some(p=>{const m=p;return R(this,wt)[m]!==t[m]&&d.has(m)})})();tt.batch(()=>{o&&this.listeners.forEach(l=>{l(R(this,wt))}),R(this,xt).getQueryCache().notify({query:R(this,Pe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Me,of).call(this)}},xt=new WeakMap,Pe=new WeakMap,Ao=new WeakMap,wt=new WeakMap,os=new WeakMap,si=new WeakMap,zn=new WeakMap,Lo=new WeakMap,ii=new WeakMap,oi=new WeakMap,as=new WeakMap,ls=new WeakMap,Tr=new WeakMap,ai=new WeakMap,Me=new WeakSet,go=function(t){ve(this,Me,uf).call(this);let s=R(this,Pe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(St)),s},tf=function(t){return!Wf()&&Be(this.options.enabled,R(this,Pe))!==!1&&Qv(t)},nf=function(){ve(this,Me,af).call(this);const t=Be(this.options.staleTime,R(this,Pe));if(R(this,wt).isStale||!ve(this,Me,tf).call(this,t))return;const s=Gv(R(this,wt).dataUpdatedAt,t)+1;te(this,as,Jr.setTimeout(()=>{R(this,wt).isStale||this.updateResult()},s))},rf=function(){return Be(this.options.refetchInterval,R(this,Pe))??!1},sf=function(t){ve(this,Me,lf).call(this),te(this,Tr,t),!(R(this,Tr)===0||!ve(this,Me,tf).call(this,R(this,Tr)))&&te(this,ls,Jr.setInterval(()=>{(this.options.refetchIntervalInBackground||qf.isFocused())&&ve(this,Me,go).call(this)},R(this,Tr)))},of=function(){ve(this,Me,nf).call(this),ve(this,Me,sf).call(this,ve(this,Me,rf).call(this))},af=function(){R(this,as)!==void 0&&(Jr.clearTimeout(R(this,as)),te(this,as,void 0))},lf=function(){R(this,ls)!==void 0&&(Jr.clearInterval(R(this,ls)),te(this,ls,void 0))},uf=function(){const t=R(this,xt).getQueryCache().build(R(this,xt),this.options);if(t===R(this,Pe))return;const s=R(this,Pe);te(this,Pe,t),te(this,Ao,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},zv);function X2(e,t){return Be(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Be(t.retryOnMount,e)===!1)}function dy(e,t){return X2(e,t)||e.state.data!==void 0&&cf(e,t,t.refetchOnMount)}function cf(e,t,s){if(Be(t.enabled,e)!==!1&&Be(t.staleTime,e)!=="static"){const i=Be(s,e);return i==="always"||i!==!1&&Qf(e,t)}return!1}function fy(e,t,s,i){return(e!==t||Be(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Qf(e,s)}function Qf(e,t){return Be(t.enabled,e)!==!1&&e.isStaleByTime(Be(t.staleTime,e))}var J2=class extends rx{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var C,k;const{state:s}=e,i=super.createResult(e,t),{isFetching:o,isRefetching:l,isError:u,isRefetchError:d}=i,p=(k=(C=s.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:k.direction,m=u&&p==="forward",g=o&&p==="forward",v=u&&p==="backward",x=o&&p==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Q2(t,s.data),hasPreviousPage:G2(t,s.data),isFetchNextPageError:m,isFetchingNextPage:g,isFetchPreviousPageError:v,isFetchingPreviousPage:x,isRefetchError:d&&!m&&!v,isRefetching:l&&!g&&!x}}},Io,En,mt,us,Tn,wr,Uv,Z2=(Uv=class extends ex{constructor(t){super();ce(this,Tn);ce(this,Io);ce(this,En);ce(this,mt);ce(this,us);te(this,Io,t.client),this.mutationId=t.mutationId,te(this,mt,t.mutationCache),te(this,En,[]),this.state=t.state||sx(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,En).includes(t)||(R(this,En).push(t),this.clearGcTimeout(),R(this,mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,En,R(this,En).filter(s=>s!==t)),this.scheduleGc(),R(this,mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,En).length||(this.state.status==="pending"?this.scheduleGc():R(this,mt).remove(this))}continue(){var t;return((t=R(this,us))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var d,p,m,g,v,x,C,k,T,E,N,L,b,M,_,I,j,D;const s=()=>{ve(this,Tn,wr).call(this,{type:"continue"})},i={client:R(this,Io),meta:this.options.meta,mutationKey:this.options.mutationKey},o=te(this,us,Zv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,W)=>{ve(this,Tn,wr).call(this,{type:"failed",failureCount:B,error:W})},onPause:()=>{ve(this,Tn,wr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,mt).canRun(this)})),l=this.state.status==="pending",u=!o.canStart();try{if(l)s();else{ve(this,Tn,wr).call(this,{type:"pending",variables:t,isPaused:u}),R(this,mt).config.onMutate&&await R(this,mt).config.onMutate(t,this,i);const W=await((p=(d=this.options).onMutate)==null?void 0:p.call(d,t,i));W!==this.state.context&&ve(this,Tn,wr).call(this,{type:"pending",context:W,variables:t,isPaused:u})}const B=await o.start();return await((g=(m=R(this,mt).config).onSuccess)==null?void 0:g.call(m,B,t,this.state.context,this,i)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,B,t,this.state.context,i)),await((k=(C=R(this,mt).config).onSettled)==null?void 0:k.call(C,B,null,this.state.variables,this.state.context,this,i)),await((E=(T=this.options).onSettled)==null?void 0:E.call(T,B,null,t,this.state.context,i)),ve(this,Tn,wr).call(this,{type:"success",data:B}),B}catch(B){try{await((L=(N=R(this,mt).config).onError)==null?void 0:L.call(N,B,t,this.state.context,this,i))}catch(W){Promise.reject(W)}try{await((M=(b=this.options).onError)==null?void 0:M.call(b,B,t,this.state.context,i))}catch(W){Promise.reject(W)}try{await((I=(_=R(this,mt).config).onSettled)==null?void 0:I.call(_,void 0,B,this.state.variables,this.state.context,this,i))}catch(W){Promise.reject(W)}try{await((D=(j=this.options).onSettled)==null?void 0:D.call(j,void 0,B,t,this.state.context,i))}catch(W){Promise.reject(W)}throw ve(this,Tn,wr).call(this,{type:"error",error:B}),B}finally{R(this,us)===o&&te(this,us,void 0),R(this,mt).runNext(this)}}},Io=new WeakMap,En=new WeakMap,mt=new WeakMap,us=new WeakMap,Tn=new WeakSet,wr=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),tt.batch(()=>{R(this,En).forEach(i=>{i.onMutationUpdate(t)}),R(this,mt).notify({mutation:this,type:"updated",action:t})})},Uv);function sx(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Un,ln,Fo,$v,eC=($v=class extends mi{constructor(t={}){super();ce(this,Un);ce(this,ln);ce(this,Fo);this.config=t,te(this,Un,new Set),te(this,ln,new Map),te(this,Fo,0)}build(t,s,i){const o=new Z2({client:t,mutationCache:this,mutationId:++tl(this,Fo)._,options:t.defaultMutationOptions(s),state:i});return this.add(o),o}add(t){R(this,Un).add(t);const s=nl(t);if(typeof s=="string"){const i=R(this,ln).get(s);i?i.push(t):R(this,ln).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Un).delete(t)){const s=nl(t);if(typeof s=="string"){const i=R(this,ln).get(s);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&R(this,ln).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){var i;const s=nl(t);if(typeof s=="string"){const o=(i=R(this,ln).get(s))==null?void 0:i.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i,o;const s=nl(t);return typeof s=="string"?((o=(i=R(this,ln).get(s))==null?void 0:i.find(l=>l!==t&&l.state.isPaused))==null?void 0:o.continue())??Promise.resolve():Promise.resolve()}clear(){tt.batch(()=>{R(this,Un).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Un).clear(),R(this,ln).clear()})}getAll(){return Array.from(R(this,Un))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>oy(s,i))}findAll(t={}){return this.getAll().filter(s=>oy(t,s))}notify(t){tt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return tt.batch(()=>Promise.all(t.map(s=>s.continue().catch(St))))}},Un=new WeakMap,ln=new WeakMap,Fo=new WeakMap,$v);function nl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,Nr,gt,Hn,jn,yo,df,Hv,tC=(Hv=class extends mi{constructor(s,i){super();ce(this,jn);ce(this,$n);ce(this,Nr);ce(this,gt);ce(this,Hn);te(this,$n,s),this.setOptions(i),this.bindMethods(),ve(this,jn,yo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var o;const i=this.options;this.options=R(this,$n).defaultMutationOptions(s),pl(this.options,i)||R(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,gt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&ps(i.mutationKey)!==ps(this.options.mutationKey)?this.reset():((o=R(this,gt))==null?void 0:o.state.status)==="pending"&&R(this,gt).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&R(this,gt)&&(R(this,gt).addObserver(this),ve(this,jn,yo).call(this))}onUnsubscribe(){var s;this.hasListeners()||(s=R(this,gt))==null||s.removeObserver(this)}onMutationUpdate(s){ve(this,jn,yo).call(this),ve(this,jn,df).call(this,s)}getCurrentResult(){return R(this,Nr)}reset(){var s;(s=R(this,gt))==null||s.removeObserver(this),te(this,gt,void 0),ve(this,jn,yo).call(this),ve(this,jn,df).call(this)}mutate(s,i){var o;return te(this,Hn,i),(o=R(this,gt))==null||o.removeObserver(this),te(this,gt,R(this,$n).getMutationCache().build(R(this,$n),this.options)),R(this,gt).addObserver(this),R(this,gt).execute(s)}},$n=new WeakMap,Nr=new WeakMap,gt=new WeakMap,Hn=new WeakMap,jn=new WeakSet,yo=function(){var i;const s=((i=R(this,gt))==null?void 0:i.state)??sx();te(this,Nr,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},df=function(s){tt.batch(()=>{var i,o,l,u,d,p,m,g;if(R(this,Hn)&&this.hasListeners()){const v=R(this,Nr).variables,x=R(this,Nr).context,C={client:R(this,$n),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(o=(i=R(this,Hn)).onSuccess)==null||o.call(i,s.data,v,x,C)}catch(k){Promise.reject(k)}try{(u=(l=R(this,Hn)).onSettled)==null||u.call(l,s.data,null,v,x,C)}catch(k){Promise.reject(k)}}else if((s==null?void 0:s.type)==="error"){try{(p=(d=R(this,Hn)).onError)==null||p.call(d,s.error,v,x,C)}catch(k){Promise.reject(k)}try{(g=(m=R(this,Hn)).onSettled)==null||g.call(m,void 0,s.error,v,x,C)}catch(k){Promise.reject(k)}}}this.listeners.forEach(v=>{v(R(this,Nr))})})},Hv),Nn,Kv,nC=(Kv=class extends mi{constructor(t={}){super();ce(this,Nn);this.config=t,te(this,Nn,new Map)}build(t,s,i){const o=s.queryKey,l=s.queryHash??$f(o,s);let u=this.get(l);return u||(u=new Y2({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){R(this,Nn).has(t.queryHash)||(R(this,Nn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){R(this,Nn).get(t.queryHash)===t&&(t.destroy(),R(this,Nn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,Nn).get(t)}getAll(){return[...R(this,Nn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>iy(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>iy(t,i)):s}notify(t){tt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Nn=new WeakMap,Kv),He,Pr,br,li,ui,jr,ci,di,Wv,rC=(Wv=class{constructor(e={}){ce(this,He);ce(this,Pr);ce(this,br);ce(this,li);ce(this,ui);ce(this,jr);ce(this,ci);ce(this,di);te(this,He,e.queryCache||new nC),te(this,Pr,e.mutationCache||new eC),te(this,br,e.defaultOptions||{}),te(this,li,new Map),te(this,ui,new Map),te(this,jr,0)}mount(){tl(this,jr)._++,R(this,jr)===1&&(te(this,ci,qf.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,He).onFocus())})),te(this,di,Tl.subscribe(async e=>{e&&(await this.resumePausedMutations(),R(this,He).onOnline())})))}unmount(){var e,t;tl(this,jr)._--,R(this,jr)===0&&((e=R(this,ci))==null||e.call(this),te(this,ci,void 0),(t=R(this,di))==null||t.call(this),te(this,di,void 0))}isFetching(e){return R(this,He).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return R(this,Pr).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=R(this,He).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Be(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return R(this,He).findAll(e).map(({queryKey:t,state:s})=>[t,s.data])}setQueryData(e,t,s){var u;const i=this.defaultQueryOptions({queryKey:e}),o=(u=R(this,He).get(i.queryHash))==null?void 0:u.state.data,l=L2(t,o);if(l!==void 0)return R(this,He).build(this,i).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return tt.batch(()=>R(this,He).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=R(this,He);tt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=R(this,He);return tt.batch(()=>{const i=s.findAll(e),o=new Set(i);return i.forEach(l=>{l.reset()}),this.refetchQueries({type:"active",predicate:l=>o.has(l)},t)})}cancelQueries(e,t={}){const s={revert:!0,...t},i=tt.batch(()=>R(this,He).findAll(e).map(o=>o.cancel(s)));return Promise.all(i).then(St).catch(St)}invalidateQueries(e,t={}){return tt.batch(()=>(R(this,He).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=tt.batch(()=>R(this,He).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,s);return s.throwOnError||(l=l.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(St)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=R(this,He).build(this,t),i=s.isStaleByTime(Be(t.staleTime,s))?await s.fetch(t):s.state.data,o=t.select;return o?o(i):i}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=R(this,He).build(this,t);return s.isStaleByTime(Be(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(St).catch(St)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Tl.isOnline()?R(this,Pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,He)}getMutationCache(){return R(this,Pr)}getDefaultOptions(){return R(this,br)}setDefaultOptions(e){te(this,br,e)}setQueryDefaults(e,t){R(this,li).set(ps(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...R(this,li).values()],s={};return t.forEach(i=>{fi(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){R(this,ui).set(ps(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...R(this,ui).values()],s={};return t.forEach(i=>{fi(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...R(this,br).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=$f(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Hf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...R(this,br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){R(this,He).clear(),R(this,Pr).clear()}},He=new WeakMap,Pr=new WeakMap,br=new WeakMap,li=new WeakMap,ui=new WeakMap,jr=new WeakMap,ci=new WeakMap,di=new WeakMap,Wv);const ix=S.createContext(!1),sC=()=>S.useContext(ix);ix.Provider;function iC(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const oC=S.createContext(iC()),aC=()=>S.useContext(oC),lC=(e,t,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?Kf(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||i)&&(t.isReset()||(e.retryOnMount=!1))},uC=e=>{S.useEffect(()=>{e.clearReset()},[e])},cC=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||Kf(s,[e.error,i])),dC=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>s(i(...o)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,hC=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function ox(e,t,s){const i=sC(),o=aC(),l=Gt(),u=l.defaultQueryOptions(e),d=l.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=i?"isRestoring":p?"optimistic":void 0,dC(u),lC(u,o,d),uC(o);const[m]=S.useState(()=>new t(l,u)),g=m.getOptimisticResult(u),v=!i&&p;if(S.useSyncExternalStore(S.useCallback(x=>{const C=v?m.subscribe(tt.batchCalls(x)):St;return m.updateResult(),C},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),S.useEffect(()=>{m.setOptions(u)},[u,m]),fC(u,g))throw hC(u,m,o);if(cC({result:g,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw g.error;return u.notifyOnChangeProps?g:m.trackResult(g)}function Gn(e,t){return ox(e,rx)}function Mt(e,t){const s=Gt(),[i]=S.useState(()=>new tC(s,e));S.useEffect(()=>{i.setOptions(e)},[i,e]);const o=S.useSyncExternalStore(S.useCallback(u=>i.subscribe(tt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=S.useCallback((...u)=>{i.mutate(u[0],u[1]).catch(St)},[i]);if(o.error&&Kf(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}function pC(e,t){return ox(e,J2)}var rl={},Jc={exports:{}},jt={},Zc={exports:{}},ed={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var hy;function mC(){return hy||(hy=1,(function(e){function t(ee,ue){var J=ee.length;ee.push(ue);e:for(;0<J;){var V=J-1>>>1,F=ee[V];if(0<o(F,ue))ee[V]=ue,ee[J]=F,J=V;else break e}}function s(ee){return ee.length===0?null:ee[0]}function i(ee){if(ee.length===0)return null;var ue=ee[0],J=ee.pop();if(J!==ue){ee[0]=J;e:for(var V=0,F=ee.length,ne=F>>>1;V<ne;){var ye=2*(V+1)-1,Ce=ee[ye],Ne=ye+1,Ee=ee[Ne];if(0>o(Ce,J))Ne<F&&0>o(Ee,Ce)?(ee[V]=Ee,ee[Ne]=J,V=Ne):(ee[V]=Ce,ee[ye]=J,V=ye);else if(Ne<F&&0>o(Ee,J))ee[V]=Ee,ee[Ne]=J,V=Ne;else break e}}return ue}function o(ee,ue){var J=ee.sortIndex-ue.sortIndex;return J!==0?J:ee.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var p=[],m=[],g=1,v=null,x=3,C=!1,k=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(ee){for(var ue=s(m);ue!==null;){if(ue.callback===null)i(m);else if(ue.startTime<=ee)i(m),ue.sortIndex=ue.expirationTime,t(p,ue);else break;ue=s(m)}}function M(ee){if(T=!1,b(ee),!k)if(s(p)!==null)k=!0,me(_);else{var ue=s(m);ue!==null&&Te(M,ue.startTime-ee)}}function _(ee,ue){k=!1,T&&(T=!1,N(D),D=-1),C=!0;var J=x;try{for(b(ue),v=s(p);v!==null&&(!(v.expirationTime>ue)||ee&&!G());){var V=v.callback;if(typeof V=="function"){v.callback=null,x=v.priorityLevel;var F=V(v.expirationTime<=ue);ue=e.unstable_now(),typeof F=="function"?v.callback=F:v===s(p)&&i(p),b(ue)}else i(p);v=s(p)}if(v!==null)var ne=!0;else{var ye=s(m);ye!==null&&Te(M,ye.startTime-ue),ne=!1}return ne}finally{v=null,x=J,C=!1}}var I=!1,j=null,D=-1,B=5,W=-1;function G(){return!(e.unstable_now()-W<B)}function K(){if(j!==null){var ee=e.unstable_now();W=ee;var ue=!0;try{ue=j(!0,ee)}finally{ue?U():(I=!1,j=null)}}else I=!1}var U;if(typeof L=="function")U=function(){L(K)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ge=X.port2;X.port1.onmessage=K,U=function(){ge.postMessage(null)}}else U=function(){E(K,0)};function me(ee){j=ee,I||(I=!0,U())}function Te(ee,ue){D=E(function(){ee(e.unstable_now())},ue)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ee){ee.callback=null},e.unstable_continueExecution=function(){k||C||(k=!0,me(_))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(p)},e.unstable_next=function(ee){switch(x){case 1:case 2:case 3:var ue=3;break;default:ue=x}var J=x;x=ue;try{return ee()}finally{x=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,ue){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var J=x;x=ee;try{return ue()}finally{x=J}},e.unstable_scheduleCallback=function(ee,ue,J){var V=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?V+J:V):J=V,ee){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=J+F,ee={id:g++,callback:ue,priorityLevel:ee,startTime:J,expirationTime:F,sortIndex:-1},J>V?(ee.sortIndex=J,t(m,ee),s(p)===null&&ee===s(m)&&(T?(N(D),D=-1):T=!0,Te(M,J-V))):(ee.sortIndex=F,t(p,ee),k||C||(k=!0,me(_))),ee},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(ee){var ue=x;return function(){var J=x;x=ue;try{return ee.apply(this,arguments)}finally{x=J}}}})(ed)),ed}var py;function gC(){return py||(py=1,Zc.exports=mC()),Zc.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var my;function yC(){if(my)return jt;my=1;var e=Uf(),t=gC();function s(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(n,r){u(n,r),u(n+"Capture",r)}function u(n,r){for(o[n]=r,n=0;n<r.length;n++)i.add(r[n])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function x(n){return p.call(v,n)?!0:p.call(g,n)?!1:m.test(n)?v[n]=!0:(g[n]=!0,!1)}function C(n,r,a,c){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,r,a,c){if(r===null||typeof r>"u"||C(n,r,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function T(n,r,a,c,h,y,w){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=n,this.type=r,this.sanitizeURL=y,this.removeEmptyString=w}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){E[n]=new T(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];E[r]=new T(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){E[n]=new T(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){E[n]=new T(n,2,!1,n,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(n){E[n]=new T(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){E[n]=new T(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){E[n]=new T(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){E[n]=new T(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){E[n]=new T(n,5,!1,n.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function L(n){return n[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(n){var r=n.replace(N,L);E[r]=new T(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(N,L);E[r]=new T(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(N,L);E[r]=new T(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){E[n]=new T(n,1,!1,n.toLowerCase(),null,!1,!1)}),E.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){E[n]=new T(n,1,!1,n.toLowerCase(),null,!0,!0)});function b(n,r,a,c){var h=E.hasOwnProperty(r)?E[r]:null;(h!==null?h.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(k(r,a,h,c)&&(a=null),c||h===null?x(r)&&(a===null?n.removeAttribute(r):n.setAttribute(r,""+a)):h.mustUseProperty?n[h.propertyName]=a===null?h.type===3?!1:"":a:(r=h.attributeName,c=h.attributeNamespace,a===null?n.removeAttribute(r):(h=h.type,a=h===3||h===4&&a===!0?"":""+a,c?n.setAttributeNS(c,r,a):n.setAttribute(r,a))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),I=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),G=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),ee=Symbol.iterator;function ue(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var J=Object.assign,V;function F(n){if(V===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);V=r&&r[1]||""}return`
|
|
34
|
+
`+V+n}var ne=!1;function ye(n,r){if(!n||ne)return"";ne=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(H){var c=H}Reflect.construct(n,[],r)}else{try{r.call()}catch(H){c=H}n.call(r.prototype)}else{try{throw Error()}catch(H){c=H}n()}}catch(H){if(H&&c&&typeof H.stack=="string"){for(var h=H.stack.split(`
|
|
35
|
+
`),y=c.stack.split(`
|
|
36
|
+
`),w=h.length-1,P=y.length-1;1<=w&&0<=P&&h[w]!==y[P];)P--;for(;1<=w&&0<=P;w--,P--)if(h[w]!==y[P]){if(w!==1||P!==1)do if(w--,P--,0>P||h[w]!==y[P]){var A=`
|
|
37
|
+
`+h[w].replace(" at new "," at ");return n.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",n.displayName)),A}while(1<=w&&0<=P);break}}}finally{ne=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?F(n):""}function Ce(n){switch(n.tag){case 5:return F(n.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return n=ye(n.type,!1),n;case 11:return n=ye(n.type.render,!1),n;case 1:return n=ye(n.type,!0),n;default:return""}}function Ne(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case j:return"Fragment";case I:return"Portal";case B:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case X:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case G:return(n.displayName||"Context")+".Consumer";case W:return(n._context.displayName||"Context")+".Provider";case K:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case ge:return r=n.displayName||null,r!==null?r:Ne(n.type)||"Memo";case me:r=n._payload,n=n._init;try{return Ne(n(r))}catch{}}return null}function Ee(n){var r=n.type;switch(n.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ne(r);case 8:return r===D?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function we(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Re(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function it(n){var r=Re(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),c=""+n[r];if(!n.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,y=a.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return h.call(this)},set:function(w){c=""+w,y.call(this,w)}}),Object.defineProperty(n,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ko(n){n._valueTracker||(n._valueTracker=it(n))}function op(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return n&&(c=Re(n)?n.checked?"true":"false":n.value),n=c,n!==a?(r.setValue(n),!0):!1}function Wo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function tu(n,r){var a=r.checked;return J({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function ap(n,r){var a=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;a=we(r.value!=null?r.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function lp(n,r){r=r.checked,r!=null&&b(n,"checked",r,!1)}function nu(n,r){lp(n,r);var a=we(r.value),c=r.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?ru(n,r.type,a):r.hasOwnProperty("defaultValue")&&ru(n,r.type,we(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function up(n,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,a||r===n.value||(n.value=r),n.defaultValue=r}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function ru(n,r,a){(r!=="number"||Wo(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var Ei=Array.isArray;function ks(n,r,a,c){if(n=n.options,r){r={};for(var h=0;h<a.length;h++)r["$"+a[h]]=!0;for(a=0;a<n.length;a++)h=r.hasOwnProperty("$"+n[a].value),n[a].selected!==h&&(n[a].selected=h),h&&c&&(n[a].defaultSelected=!0)}else{for(a=""+we(a),r=null,h=0;h<n.length;h++){if(n[h].value===a){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}r!==null||n[h].disabled||(r=n[h])}r!==null&&(r.selected=!0)}}function su(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(s(91));return J({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function cp(n,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(s(92));if(Ei(a)){if(1<a.length)throw Error(s(93));a=a[0]}r=a}r==null&&(r=""),a=r}n._wrapperState={initialValue:we(a)}}function dp(n,r){var a=we(r.value),c=we(r.defaultValue);a!=null&&(a=""+a,a!==n.value&&(n.value=a),r.defaultValue==null&&n.defaultValue!==a&&(n.defaultValue=a)),c!=null&&(n.defaultValue=""+c)}function fp(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function hp(n){switch(n){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 iu(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?hp(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var qo,pp=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,c,h){MSApp.execUnsafeLocalFunction(function(){return n(r,a,c,h)})}:n})(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(qo=qo||document.createElement("div"),qo.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=qo.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function Ti(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var Ni={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},PS=["Webkit","ms","Moz","O"];Object.keys(Ni).forEach(function(n){PS.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),Ni[r]=Ni[n]})});function mp(n,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||Ni.hasOwnProperty(n)&&Ni[n]?(""+r).trim():r+"px"}function gp(n,r){n=n.style;for(var a in r)if(r.hasOwnProperty(a)){var c=a.indexOf("--")===0,h=mp(a,r[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,h):n[a]=h}}var bS=J({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 ou(n,r){if(r){if(bS[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,n));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function au(n,r){if(n.indexOf("-")===-1)return typeof r.is=="string";switch(n){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 lu=null;function uu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var cu=null,Cs=null,Es=null;function yp(n){if(n=Qi(n)){if(typeof cu!="function")throw Error(s(280));var r=n.stateNode;r&&(r=ga(r),cu(n.stateNode,n.type,r))}}function vp(n){Cs?Es?Es.push(n):Es=[n]:Cs=n}function xp(){if(Cs){var n=Cs,r=Es;if(Es=Cs=null,yp(n),r)for(n=0;n<r.length;n++)yp(r[n])}}function wp(n,r){return n(r)}function Sp(){}var du=!1;function kp(n,r,a){if(du)return n(r,a);du=!0;try{return wp(n,r,a)}finally{du=!1,(Cs!==null||Es!==null)&&(Sp(),xp())}}function Pi(n,r){var a=n.stateNode;if(a===null)return null;var c=ga(a);if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var fu=!1;if(d)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){fu=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{fu=!1}function jS(n,r,a,c,h,y,w,P,A){var H=Array.prototype.slice.call(arguments,3);try{r.apply(a,H)}catch(Q){this.onError(Q)}}var ji=!1,Qo=null,Go=!1,hu=null,RS={onError:function(n){ji=!0,Qo=n}};function MS(n,r,a,c,h,y,w,P,A){ji=!1,Qo=null,jS.apply(RS,arguments)}function DS(n,r,a,c,h,y,w,P,A){if(MS.apply(this,arguments),ji){if(ji){var H=Qo;ji=!1,Qo=null}else throw Error(s(198));Go||(Go=!0,hu=H)}}function Fr(n){var r=n,a=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(a=r.return),n=r.return;while(n)}return r.tag===3?a:null}function Cp(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function Ep(n){if(Fr(n)!==n)throw Error(s(188))}function AS(n){var r=n.alternate;if(!r){if(r=Fr(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,c=r;;){var h=a.return;if(h===null)break;var y=h.alternate;if(y===null){if(c=h.return,c!==null){a=c;continue}break}if(h.child===y.child){for(y=h.child;y;){if(y===a)return Ep(h),n;if(y===c)return Ep(h),r;y=y.sibling}throw Error(s(188))}if(a.return!==c.return)a=h,c=y;else{for(var w=!1,P=h.child;P;){if(P===a){w=!0,a=h,c=y;break}if(P===c){w=!0,c=h,a=y;break}P=P.sibling}if(!w){for(P=y.child;P;){if(P===a){w=!0,a=y,c=h;break}if(P===c){w=!0,c=y,a=h;break}P=P.sibling}if(!w)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function Tp(n){return n=AS(n),n!==null?Np(n):null}function Np(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=Np(n);if(r!==null)return r;n=n.sibling}return null}var Pp=t.unstable_scheduleCallback,bp=t.unstable_cancelCallback,LS=t.unstable_shouldYield,IS=t.unstable_requestPaint,We=t.unstable_now,FS=t.unstable_getCurrentPriorityLevel,pu=t.unstable_ImmediatePriority,jp=t.unstable_UserBlockingPriority,Yo=t.unstable_NormalPriority,_S=t.unstable_LowPriority,Rp=t.unstable_IdlePriority,Xo=null,gn=null;function OS(n){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(Xo,n,void 0,(n.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:zS,VS=Math.log,BS=Math.LN2;function zS(n){return n>>>=0,n===0?32:31-(VS(n)/BS|0)|0}var Jo=64,Zo=4194304;function Ri(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ea(n,r){var a=n.pendingLanes;if(a===0)return 0;var c=0,h=n.suspendedLanes,y=n.pingedLanes,w=a&268435455;if(w!==0){var P=w&~h;P!==0?c=Ri(P):(y&=w,y!==0&&(c=Ri(y)))}else w=a&~h,w!==0?c=Ri(w):y!==0&&(c=Ri(y));if(c===0)return 0;if(r!==0&&r!==c&&(r&h)===0&&(h=c&-c,y=r&-r,h>=y||h===16&&(y&4194240)!==0))return r;if((c&4)!==0&&(c|=a&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=c;0<r;)a=31-Yt(r),h=1<<a,c|=n[a],r&=~h;return c}function US(n,r){switch(n){case 1:case 2:case 4:return r+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 r+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 $S(n,r){for(var a=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,y=n.pendingLanes;0<y;){var w=31-Yt(y),P=1<<w,A=h[w];A===-1?((P&a)===0||(P&c)!==0)&&(h[w]=US(P,r)):A<=r&&(n.expiredLanes|=P),y&=~P}}function mu(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Mp(){var n=Jo;return Jo<<=1,(Jo&4194240)===0&&(Jo=64),n}function gu(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function Mi(n,r,a){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-Yt(r),n[r]=a}function HS(n,r){var a=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<a;){var h=31-Yt(a),y=1<<h;r[h]=0,c[h]=-1,n[h]=-1,a&=~y}}function yu(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var c=31-Yt(a),h=1<<c;h&r|n[c]&r&&(n[c]|=r),a&=~h}}var De=0;function Dp(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Ap,vu,Lp,Ip,Fp,xu=!1,ta=[],Xn=null,Jn=null,Zn=null,Di=new Map,Ai=new Map,er=[],KS="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 _p(n,r){switch(n){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":Zn=null;break;case"pointerover":case"pointerout":Di.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ai.delete(r.pointerId)}}function Li(n,r,a,c,h,y){return n===null||n.nativeEvent!==y?(n={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:y,targetContainers:[h]},r!==null&&(r=Qi(r),r!==null&&vu(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,h!==null&&r.indexOf(h)===-1&&r.push(h),n)}function WS(n,r,a,c,h){switch(r){case"focusin":return Xn=Li(Xn,n,r,a,c,h),!0;case"dragenter":return Jn=Li(Jn,n,r,a,c,h),!0;case"mouseover":return Zn=Li(Zn,n,r,a,c,h),!0;case"pointerover":var y=h.pointerId;return Di.set(y,Li(Di.get(y)||null,n,r,a,c,h)),!0;case"gotpointercapture":return y=h.pointerId,Ai.set(y,Li(Ai.get(y)||null,n,r,a,c,h)),!0}return!1}function Op(n){var r=_r(n.target);if(r!==null){var a=Fr(r);if(a!==null){if(r=a.tag,r===13){if(r=Cp(a),r!==null){n.blockedOn=r,Fp(n.priority,function(){Lp(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function na(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=Su(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);lu=c,a.target.dispatchEvent(c),lu=null}else return r=Qi(a),r!==null&&vu(r),n.blockedOn=a,!1;r.shift()}return!0}function Vp(n,r,a){na(n)&&a.delete(r)}function qS(){xu=!1,Xn!==null&&na(Xn)&&(Xn=null),Jn!==null&&na(Jn)&&(Jn=null),Zn!==null&&na(Zn)&&(Zn=null),Di.forEach(Vp),Ai.forEach(Vp)}function Ii(n,r){n.blockedOn===r&&(n.blockedOn=null,xu||(xu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qS)))}function Fi(n){function r(h){return Ii(h,n)}if(0<ta.length){Ii(ta[0],n);for(var a=1;a<ta.length;a++){var c=ta[a];c.blockedOn===n&&(c.blockedOn=null)}}for(Xn!==null&&Ii(Xn,n),Jn!==null&&Ii(Jn,n),Zn!==null&&Ii(Zn,n),Di.forEach(r),Ai.forEach(r),a=0;a<er.length;a++)c=er[a],c.blockedOn===n&&(c.blockedOn=null);for(;0<er.length&&(a=er[0],a.blockedOn===null);)Op(a),a.blockedOn===null&&er.shift()}var Ts=M.ReactCurrentBatchConfig,ra=!0;function QS(n,r,a,c){var h=De,y=Ts.transition;Ts.transition=null;try{De=1,wu(n,r,a,c)}finally{De=h,Ts.transition=y}}function GS(n,r,a,c){var h=De,y=Ts.transition;Ts.transition=null;try{De=4,wu(n,r,a,c)}finally{De=h,Ts.transition=y}}function wu(n,r,a,c){if(ra){var h=Su(n,r,a,c);if(h===null)Ou(n,r,c,sa,a),_p(n,c);else if(WS(h,n,r,a,c))c.stopPropagation();else if(_p(n,c),r&4&&-1<KS.indexOf(n)){for(;h!==null;){var y=Qi(h);if(y!==null&&Ap(y),y=Su(n,r,a,c),y===null&&Ou(n,r,c,sa,a),y===h)break;h=y}h!==null&&c.stopPropagation()}else Ou(n,r,c,null,a)}}var sa=null;function Su(n,r,a,c){if(sa=null,n=uu(c),n=_r(n),n!==null)if(r=Fr(n),r===null)n=null;else if(a=r.tag,a===13){if(n=Cp(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return sa=n,null}function Bp(n){switch(n){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(FS()){case pu:return 1;case jp:return 4;case Yo:case _S:return 16;case Rp:return 536870912;default:return 16}default:return 16}}var tr=null,ku=null,ia=null;function zp(){if(ia)return ia;var n,r=ku,a=r.length,c,h="value"in tr?tr.value:tr.textContent,y=h.length;for(n=0;n<a&&r[n]===h[n];n++);var w=a-n;for(c=1;c<=w&&r[a-c]===h[y-c];c++);return ia=h.slice(n,1<c?1-c:void 0)}function oa(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function aa(){return!0}function Up(){return!1}function Dt(n){function r(a,c,h,y,w){this._reactName=a,this._targetInst=h,this.type=c,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var P in n)n.hasOwnProperty(P)&&(a=n[P],this[P]=a?a(y):y[P]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?aa:Up,this.isPropagationStopped=Up,this}return J(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=aa)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=aa)},persist:function(){},isPersistent:aa}),r}var Ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cu=Dt(Ns),_i=J({},Ns,{view:0,detail:0}),YS=Dt(_i),Eu,Tu,Oi,la=J({},_i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Oi&&(Oi&&n.type==="mousemove"?(Eu=n.screenX-Oi.screenX,Tu=n.screenY-Oi.screenY):Tu=Eu=0,Oi=n),Eu)},movementY:function(n){return"movementY"in n?n.movementY:Tu}}),$p=Dt(la),XS=J({},la,{dataTransfer:0}),JS=Dt(XS),ZS=J({},_i,{relatedTarget:0}),Nu=Dt(ZS),ek=J({},Ns,{animationName:0,elapsedTime:0,pseudoElement:0}),tk=Dt(ek),nk=J({},Ns,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),rk=Dt(nk),sk=J({},Ns,{data:0}),Hp=Dt(sk),ik={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ok={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"},ak={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lk(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=ak[n])?!!r[n]:!1}function Pu(){return lk}var uk=J({},_i,{key:function(n){if(n.key){var r=ik[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=oa(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ok[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pu,charCode:function(n){return n.type==="keypress"?oa(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?oa(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),ck=Dt(uk),dk=J({},la,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kp=Dt(dk),fk=J({},_i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pu}),hk=Dt(fk),pk=J({},Ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),mk=Dt(pk),gk=J({},la,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),yk=Dt(gk),vk=[9,13,27,32],bu=d&&"CompositionEvent"in window,Vi=null;d&&"documentMode"in document&&(Vi=document.documentMode);var xk=d&&"TextEvent"in window&&!Vi,Wp=d&&(!bu||Vi&&8<Vi&&11>=Vi),qp=" ",Qp=!1;function Gp(n,r){switch(n){case"keyup":return vk.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ps=!1;function wk(n,r){switch(n){case"compositionend":return Yp(r);case"keypress":return r.which!==32?null:(Qp=!0,qp);case"textInput":return n=r.data,n===qp&&Qp?null:n;default:return null}}function Sk(n,r){if(Ps)return n==="compositionend"||!bu&&Gp(n,r)?(n=zp(),ia=ku=tr=null,Ps=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Wp&&r.locale!=="ko"?null:r.data;default:return null}}var kk={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 Xp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!kk[n.type]:r==="textarea"}function Jp(n,r,a,c){vp(c),r=ha(r,"onChange"),0<r.length&&(a=new Cu("onChange","change",null,a,c),n.push({event:a,listeners:r}))}var Bi=null,zi=null;function Ck(n){gm(n,0)}function ua(n){var r=Ds(n);if(op(r))return n}function Ek(n,r){if(n==="change")return r}var Zp=!1;if(d){var ju;if(d){var Ru="oninput"in document;if(!Ru){var em=document.createElement("div");em.setAttribute("oninput","return;"),Ru=typeof em.oninput=="function"}ju=Ru}else ju=!1;Zp=ju&&(!document.documentMode||9<document.documentMode)}function tm(){Bi&&(Bi.detachEvent("onpropertychange",nm),zi=Bi=null)}function nm(n){if(n.propertyName==="value"&&ua(zi)){var r=[];Jp(r,zi,n,uu(n)),kp(Ck,r)}}function Tk(n,r,a){n==="focusin"?(tm(),Bi=r,zi=a,Bi.attachEvent("onpropertychange",nm)):n==="focusout"&&tm()}function Nk(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ua(zi)}function Pk(n,r){if(n==="click")return ua(r)}function bk(n,r){if(n==="input"||n==="change")return ua(r)}function jk(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Xt=typeof Object.is=="function"?Object.is:jk;function Ui(n,r){if(Xt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var h=a[c];if(!p.call(r,h)||!Xt(n[h],r[h]))return!1}return!0}function rm(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function sm(n,r){var a=rm(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=r&&c>=r)return{node:a,offset:r-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=rm(a)}}function im(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?im(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function om(){for(var n=window,r=Wo();r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Wo(n.document)}return r}function Mu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function Rk(n){var r=om(),a=n.focusedElem,c=n.selectionRange;if(r!==a&&a&&a.ownerDocument&&im(a.ownerDocument.documentElement,a)){if(c!==null&&Mu(a)){if(r=c.start,n=c.end,n===void 0&&(n=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(n,a.value.length);else if(n=(r=a.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var h=a.textContent.length,y=Math.min(c.start,h);c=c.end===void 0?y:Math.min(c.end,h),!n.extend&&y>c&&(h=c,c=y,y=h),h=sm(a,y);var w=sm(a,c);h&&w&&(n.rangeCount!==1||n.anchorNode!==h.node||n.anchorOffset!==h.offset||n.focusNode!==w.node||n.focusOffset!==w.offset)&&(r=r.createRange(),r.setStart(h.node,h.offset),n.removeAllRanges(),y>c?(n.addRange(r),n.extend(w.node,w.offset)):(r.setEnd(w.node,w.offset),n.addRange(r)))}}for(r=[],n=a;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)n=r[a],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var Mk=d&&"documentMode"in document&&11>=document.documentMode,bs=null,Du=null,$i=null,Au=!1;function am(n,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Au||bs==null||bs!==Wo(c)||(c=bs,"selectionStart"in c&&Mu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),$i&&Ui($i,c)||($i=c,c=ha(Du,"onSelect"),0<c.length&&(r=new Cu("onSelect","select",null,r,a),n.push({event:r,listeners:c}),r.target=bs)))}function ca(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var js={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionend:ca("Transition","TransitionEnd")},Lu={},lm={};d&&(lm=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function da(n){if(Lu[n])return Lu[n];if(!js[n])return n;var r=js[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in lm)return Lu[n]=r[a];return n}var um=da("animationend"),cm=da("animationiteration"),dm=da("animationstart"),fm=da("transitionend"),hm=new Map,pm="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 nr(n,r){hm.set(n,r),l(r,[n])}for(var Iu=0;Iu<pm.length;Iu++){var Fu=pm[Iu],Dk=Fu.toLowerCase(),Ak=Fu[0].toUpperCase()+Fu.slice(1);nr(Dk,"on"+Ak)}nr(um,"onAnimationEnd"),nr(cm,"onAnimationIteration"),nr(dm,"onAnimationStart"),nr("dblclick","onDoubleClick"),nr("focusin","onFocus"),nr("focusout","onBlur"),nr(fm,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),Lk=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hi));function mm(n,r,a){var c=n.type||"unknown-event";n.currentTarget=a,DS(c,r,void 0,n),n.currentTarget=null}function gm(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],h=c.event;c=c.listeners;e:{var y=void 0;if(r)for(var w=c.length-1;0<=w;w--){var P=c[w],A=P.instance,H=P.currentTarget;if(P=P.listener,A!==y&&h.isPropagationStopped())break e;mm(h,P,H),y=A}else for(w=0;w<c.length;w++){if(P=c[w],A=P.instance,H=P.currentTarget,P=P.listener,A!==y&&h.isPropagationStopped())break e;mm(h,P,H),y=A}}}if(Go)throw n=hu,Go=!1,hu=null,n}function _e(n,r){var a=r[Hu];a===void 0&&(a=r[Hu]=new Set);var c=n+"__bubble";a.has(c)||(ym(r,n,2,!1),a.add(c))}function _u(n,r,a){var c=0;r&&(c|=4),ym(a,n,c,r)}var fa="_reactListening"+Math.random().toString(36).slice(2);function Ki(n){if(!n[fa]){n[fa]=!0,i.forEach(function(a){a!=="selectionchange"&&(Lk.has(a)||_u(a,!1,n),_u(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[fa]||(r[fa]=!0,_u("selectionchange",!1,r))}}function ym(n,r,a,c){switch(Bp(r)){case 1:var h=QS;break;case 4:h=GS;break;default:h=wu}a=h.bind(null,r,a,n),h=void 0,!fu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(r,a,{capture:!0,passive:h}):n.addEventListener(r,a,!0):h!==void 0?n.addEventListener(r,a,{passive:h}):n.addEventListener(r,a,!1)}function Ou(n,r,a,c,h){var y=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var P=c.stateNode.containerInfo;if(P===h||P.nodeType===8&&P.parentNode===h)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&(A=w.stateNode.containerInfo,A===h||A.nodeType===8&&A.parentNode===h))return;w=w.return}for(;P!==null;){if(w=_r(P),w===null)return;if(A=w.tag,A===5||A===6){c=y=w;continue e}P=P.parentNode}}c=c.return}kp(function(){var H=y,Q=uu(a),Y=[];e:{var q=hm.get(n);if(q!==void 0){var re=Cu,ie=n;switch(n){case"keypress":if(oa(a)===0)break e;case"keydown":case"keyup":re=ck;break;case"focusin":ie="focus",re=Nu;break;case"focusout":ie="blur",re=Nu;break;case"beforeblur":case"afterblur":re=Nu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=$p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=JS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=hk;break;case um:case cm:case dm:re=tk;break;case fm:re=mk;break;case"scroll":re=YS;break;case"wheel":re=yk;break;case"copy":case"cut":case"paste":re=rk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Kp}var ae=(r&4)!==0,qe=!ae&&n==="scroll",z=ae?q!==null?q+"Capture":null:q;ae=[];for(var O=H,$;O!==null;){$=O;var Z=$.stateNode;if($.tag===5&&Z!==null&&($=Z,z!==null&&(Z=Pi(O,z),Z!=null&&ae.push(Wi(O,Z,$)))),qe)break;O=O.return}0<ae.length&&(q=new re(q,ie,null,a,Q),Y.push({event:q,listeners:ae}))}}if((r&7)===0){e:{if(q=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",q&&a!==lu&&(ie=a.relatedTarget||a.fromElement)&&(_r(ie)||ie[Mn]))break e;if((re||q)&&(q=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,re?(ie=a.relatedTarget||a.toElement,re=H,ie=ie?_r(ie):null,ie!==null&&(qe=Fr(ie),ie!==qe||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(re=null,ie=H),re!==ie)){if(ae=$p,Z="onMouseLeave",z="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(ae=Kp,Z="onPointerLeave",z="onPointerEnter",O="pointer"),qe=re==null?q:Ds(re),$=ie==null?q:Ds(ie),q=new ae(Z,O+"leave",re,a,Q),q.target=qe,q.relatedTarget=$,Z=null,_r(Q)===H&&(ae=new ae(z,O+"enter",ie,a,Q),ae.target=$,ae.relatedTarget=qe,Z=ae),qe=Z,re&&ie)t:{for(ae=re,z=ie,O=0,$=ae;$;$=Rs($))O++;for($=0,Z=z;Z;Z=Rs(Z))$++;for(;0<O-$;)ae=Rs(ae),O--;for(;0<$-O;)z=Rs(z),$--;for(;O--;){if(ae===z||z!==null&&ae===z.alternate)break t;ae=Rs(ae),z=Rs(z)}ae=null}else ae=null;re!==null&&vm(Y,q,re,ae,!1),ie!==null&&qe!==null&&vm(Y,qe,ie,ae,!0)}}e:{if(q=H?Ds(H):window,re=q.nodeName&&q.nodeName.toLowerCase(),re==="select"||re==="input"&&q.type==="file")var le=Ek;else if(Xp(q))if(Zp)le=bk;else{le=Nk;var de=Tk}else(re=q.nodeName)&&re.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(le=Pk);if(le&&(le=le(n,H))){Jp(Y,le,a,Q);break e}de&&de(n,q,H),n==="focusout"&&(de=q._wrapperState)&&de.controlled&&q.type==="number"&&ru(q,"number",q.value)}switch(de=H?Ds(H):window,n){case"focusin":(Xp(de)||de.contentEditable==="true")&&(bs=de,Du=H,$i=null);break;case"focusout":$i=Du=bs=null;break;case"mousedown":Au=!0;break;case"contextmenu":case"mouseup":case"dragend":Au=!1,am(Y,a,Q);break;case"selectionchange":if(Mk)break;case"keydown":case"keyup":am(Y,a,Q)}var fe;if(bu)e:{switch(n){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else Ps?Gp(n,a)&&(pe="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(pe="onCompositionStart");pe&&(Wp&&a.locale!=="ko"&&(Ps||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&Ps&&(fe=zp()):(tr=Q,ku="value"in tr?tr.value:tr.textContent,Ps=!0)),de=ha(H,pe),0<de.length&&(pe=new Hp(pe,n,null,a,Q),Y.push({event:pe,listeners:de}),fe?pe.data=fe:(fe=Yp(a),fe!==null&&(pe.data=fe)))),(fe=xk?wk(n,a):Sk(n,a))&&(H=ha(H,"onBeforeInput"),0<H.length&&(Q=new Hp("onBeforeInput","beforeinput",null,a,Q),Y.push({event:Q,listeners:H}),Q.data=fe))}gm(Y,r)})}function Wi(n,r,a){return{instance:n,listener:r,currentTarget:a}}function ha(n,r){for(var a=r+"Capture",c=[];n!==null;){var h=n,y=h.stateNode;h.tag===5&&y!==null&&(h=y,y=Pi(n,a),y!=null&&c.unshift(Wi(n,y,h)),y=Pi(n,r),y!=null&&c.push(Wi(n,y,h))),n=n.return}return c}function Rs(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function vm(n,r,a,c,h){for(var y=r._reactName,w=[];a!==null&&a!==c;){var P=a,A=P.alternate,H=P.stateNode;if(A!==null&&A===c)break;P.tag===5&&H!==null&&(P=H,h?(A=Pi(a,y),A!=null&&w.unshift(Wi(a,A,P))):h||(A=Pi(a,y),A!=null&&w.push(Wi(a,A,P)))),a=a.return}w.length!==0&&n.push({event:r,listeners:w})}var Ik=/\r\n?/g,Fk=/\u0000|\uFFFD/g;function xm(n){return(typeof n=="string"?n:""+n).replace(Ik,`
|
|
38
|
+
`).replace(Fk,"")}function pa(n,r,a){if(r=xm(r),xm(n)!==r&&a)throw Error(s(425))}function ma(){}var Vu=null,Bu=null;function zu(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Uu=typeof setTimeout=="function"?setTimeout:void 0,_k=typeof clearTimeout=="function"?clearTimeout:void 0,wm=typeof Promise=="function"?Promise:void 0,Ok=typeof queueMicrotask=="function"?queueMicrotask:typeof wm<"u"?function(n){return wm.resolve(null).then(n).catch(Vk)}:Uu;function Vk(n){setTimeout(function(){throw n})}function $u(n,r){var a=r,c=0;do{var h=a.nextSibling;if(n.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(c===0){n.removeChild(h),Fi(r);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=h}while(a);Fi(r)}function rr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function Sm(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return n;r--}else a==="/$"&&r++}n=n.previousSibling}return null}var Ms=Math.random().toString(36).slice(2),yn="__reactFiber$"+Ms,qi="__reactProps$"+Ms,Mn="__reactContainer$"+Ms,Hu="__reactEvents$"+Ms,Bk="__reactListeners$"+Ms,zk="__reactHandles$"+Ms;function _r(n){var r=n[yn];if(r)return r;for(var a=n.parentNode;a;){if(r=a[Mn]||a[yn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=Sm(n);n!==null;){if(a=n[yn])return a;n=Sm(n)}return r}n=a,a=n.parentNode}return null}function Qi(n){return n=n[yn]||n[Mn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Ds(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(s(33))}function ga(n){return n[qi]||null}var Ku=[],As=-1;function sr(n){return{current:n}}function Oe(n){0>As||(n.current=Ku[As],Ku[As]=null,As--)}function Fe(n,r){As++,Ku[As]=n.current,n.current=r}var ir={},dt=sr(ir),Et=sr(!1),Or=ir;function Ls(n,r){var a=n.type.contextTypes;if(!a)return ir;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var h={},y;for(y in a)h[y]=r[y];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=h),h}function Tt(n){return n=n.childContextTypes,n!=null}function ya(){Oe(Et),Oe(dt)}function km(n,r,a){if(dt.current!==ir)throw Error(s(168));Fe(dt,r),Fe(Et,a)}function Cm(n,r,a){var c=n.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var h in c)if(!(h in r))throw Error(s(108,Ee(n)||"Unknown",h));return J({},a,c)}function va(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ir,Or=dt.current,Fe(dt,n),Fe(Et,Et.current),!0}function Em(n,r,a){var c=n.stateNode;if(!c)throw Error(s(169));a?(n=Cm(n,r,Or),c.__reactInternalMemoizedMergedChildContext=n,Oe(Et),Oe(dt),Fe(dt,n)):Oe(Et),Fe(Et,a)}var Dn=null,xa=!1,Wu=!1;function Tm(n){Dn===null?Dn=[n]:Dn.push(n)}function Uk(n){xa=!0,Tm(n)}function or(){if(!Wu&&Dn!==null){Wu=!0;var n=0,r=De;try{var a=Dn;for(De=1;n<a.length;n++){var c=a[n];do c=c(!0);while(c!==null)}Dn=null,xa=!1}catch(h){throw Dn!==null&&(Dn=Dn.slice(n+1)),Pp(pu,or),h}finally{De=r,Wu=!1}}return null}var Is=[],Fs=0,wa=null,Sa=0,Ot=[],Vt=0,Vr=null,An=1,Ln="";function Br(n,r){Is[Fs++]=Sa,Is[Fs++]=wa,wa=n,Sa=r}function Nm(n,r,a){Ot[Vt++]=An,Ot[Vt++]=Ln,Ot[Vt++]=Vr,Vr=n;var c=An;n=Ln;var h=32-Yt(c)-1;c&=~(1<<h),a+=1;var y=32-Yt(r)+h;if(30<y){var w=h-h%5;y=(c&(1<<w)-1).toString(32),c>>=w,h-=w,An=1<<32-Yt(r)+h|a<<h|c,Ln=y+n}else An=1<<y|a<<h|c,Ln=n}function qu(n){n.return!==null&&(Br(n,1),Nm(n,1,0))}function Qu(n){for(;n===wa;)wa=Is[--Fs],Is[Fs]=null,Sa=Is[--Fs],Is[Fs]=null;for(;n===Vr;)Vr=Ot[--Vt],Ot[Vt]=null,Ln=Ot[--Vt],Ot[Vt]=null,An=Ot[--Vt],Ot[Vt]=null}var At=null,Lt=null,Ve=!1,Jt=null;function Pm(n,r){var a=$t(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=n,r=n.deletions,r===null?(n.deletions=[a],n.flags|=16):r.push(a)}function bm(n,r){switch(n.tag){case 5:var a=n.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,At=n,Lt=rr(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,At=n,Lt=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Vr!==null?{id:An,overflow:Ln}:null,n.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=$t(18,null,null,0),a.stateNode=r,a.return=n,n.child=a,At=n,Lt=null,!0):!1;default:return!1}}function Gu(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Yu(n){if(Ve){var r=Lt;if(r){var a=r;if(!bm(n,r)){if(Gu(n))throw Error(s(418));r=rr(a.nextSibling);var c=At;r&&bm(n,r)?Pm(c,a):(n.flags=n.flags&-4097|2,Ve=!1,At=n)}}else{if(Gu(n))throw Error(s(418));n.flags=n.flags&-4097|2,Ve=!1,At=n}}}function jm(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;At=n}function ka(n){if(n!==At)return!1;if(!Ve)return jm(n),Ve=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!zu(n.type,n.memoizedProps)),r&&(r=Lt)){if(Gu(n))throw Rm(),Error(s(418));for(;r;)Pm(n,r),r=rr(r.nextSibling)}if(jm(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));e:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(r===0){Lt=rr(n.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}n=n.nextSibling}Lt=null}}else Lt=At?rr(n.stateNode.nextSibling):null;return!0}function Rm(){for(var n=Lt;n;)n=rr(n.nextSibling)}function _s(){Lt=At=null,Ve=!1}function Xu(n){Jt===null?Jt=[n]:Jt.push(n)}var $k=M.ReactCurrentBatchConfig;function Gi(n,r,a){if(n=a.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(s(309));var c=a.stateNode}if(!c)throw Error(s(147,n));var h=c,y=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===y?r.ref:(r=function(w){var P=h.refs;w===null?delete P[y]:P[y]=w},r._stringRef=y,r)}if(typeof n!="string")throw Error(s(284));if(!a._owner)throw Error(s(290,n))}return n}function Ca(n,r){throw n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function Mm(n){var r=n._init;return r(n._payload)}function Dm(n){function r(z,O){if(n){var $=z.deletions;$===null?(z.deletions=[O],z.flags|=16):$.push(O)}}function a(z,O){if(!n)return null;for(;O!==null;)r(z,O),O=O.sibling;return null}function c(z,O){for(z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function h(z,O){return z=pr(z,O),z.index=0,z.sibling=null,z}function y(z,O,$){return z.index=$,n?($=z.alternate,$!==null?($=$.index,$<O?(z.flags|=2,O):$):(z.flags|=2,O)):(z.flags|=1048576,O)}function w(z){return n&&z.alternate===null&&(z.flags|=2),z}function P(z,O,$,Z){return O===null||O.tag!==6?(O=Uc($,z.mode,Z),O.return=z,O):(O=h(O,$),O.return=z,O)}function A(z,O,$,Z){var le=$.type;return le===j?Q(z,O,$.props.children,Z,$.key):O!==null&&(O.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===me&&Mm(le)===O.type)?(Z=h(O,$.props),Z.ref=Gi(z,O,$),Z.return=z,Z):(Z=qa($.type,$.key,$.props,null,z.mode,Z),Z.ref=Gi(z,O,$),Z.return=z,Z)}function H(z,O,$,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==$.containerInfo||O.stateNode.implementation!==$.implementation?(O=$c($,z.mode,Z),O.return=z,O):(O=h(O,$.children||[]),O.return=z,O)}function Q(z,O,$,Z,le){return O===null||O.tag!==7?(O=Qr($,z.mode,Z,le),O.return=z,O):(O=h(O,$),O.return=z,O)}function Y(z,O,$){if(typeof O=="string"&&O!==""||typeof O=="number")return O=Uc(""+O,z.mode,$),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return $=qa(O.type,O.key,O.props,null,z.mode,$),$.ref=Gi(z,null,O),$.return=z,$;case I:return O=$c(O,z.mode,$),O.return=z,O;case me:var Z=O._init;return Y(z,Z(O._payload),$)}if(Ei(O)||ue(O))return O=Qr(O,z.mode,$,null),O.return=z,O;Ca(z,O)}return null}function q(z,O,$,Z){var le=O!==null?O.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return le!==null?null:P(z,O,""+$,Z);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return $.key===le?A(z,O,$,Z):null;case I:return $.key===le?H(z,O,$,Z):null;case me:return le=$._init,q(z,O,le($._payload),Z)}if(Ei($)||ue($))return le!==null?null:Q(z,O,$,Z,null);Ca(z,$)}return null}function re(z,O,$,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return z=z.get($)||null,P(O,z,""+Z,le);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case _:return z=z.get(Z.key===null?$:Z.key)||null,A(O,z,Z,le);case I:return z=z.get(Z.key===null?$:Z.key)||null,H(O,z,Z,le);case me:var de=Z._init;return re(z,O,$,de(Z._payload),le)}if(Ei(Z)||ue(Z))return z=z.get($)||null,Q(O,z,Z,le,null);Ca(O,Z)}return null}function ie(z,O,$,Z){for(var le=null,de=null,fe=O,pe=O=0,st=null;fe!==null&&pe<$.length;pe++){fe.index>pe?(st=fe,fe=null):st=fe.sibling;var je=q(z,fe,$[pe],Z);if(je===null){fe===null&&(fe=st);break}n&&fe&&je.alternate===null&&r(z,fe),O=y(je,O,pe),de===null?le=je:de.sibling=je,de=je,fe=st}if(pe===$.length)return a(z,fe),Ve&&Br(z,pe),le;if(fe===null){for(;pe<$.length;pe++)fe=Y(z,$[pe],Z),fe!==null&&(O=y(fe,O,pe),de===null?le=fe:de.sibling=fe,de=fe);return Ve&&Br(z,pe),le}for(fe=c(z,fe);pe<$.length;pe++)st=re(fe,z,pe,$[pe],Z),st!==null&&(n&&st.alternate!==null&&fe.delete(st.key===null?pe:st.key),O=y(st,O,pe),de===null?le=st:de.sibling=st,de=st);return n&&fe.forEach(function(mr){return r(z,mr)}),Ve&&Br(z,pe),le}function ae(z,O,$,Z){var le=ue($);if(typeof le!="function")throw Error(s(150));if($=le.call($),$==null)throw Error(s(151));for(var de=le=null,fe=O,pe=O=0,st=null,je=$.next();fe!==null&&!je.done;pe++,je=$.next()){fe.index>pe?(st=fe,fe=null):st=fe.sibling;var mr=q(z,fe,je.value,Z);if(mr===null){fe===null&&(fe=st);break}n&&fe&&mr.alternate===null&&r(z,fe),O=y(mr,O,pe),de===null?le=mr:de.sibling=mr,de=mr,fe=st}if(je.done)return a(z,fe),Ve&&Br(z,pe),le;if(fe===null){for(;!je.done;pe++,je=$.next())je=Y(z,je.value,Z),je!==null&&(O=y(je,O,pe),de===null?le=je:de.sibling=je,de=je);return Ve&&Br(z,pe),le}for(fe=c(z,fe);!je.done;pe++,je=$.next())je=re(fe,z,pe,je.value,Z),je!==null&&(n&&je.alternate!==null&&fe.delete(je.key===null?pe:je.key),O=y(je,O,pe),de===null?le=je:de.sibling=je,de=je);return n&&fe.forEach(function(k2){return r(z,k2)}),Ve&&Br(z,pe),le}function qe(z,O,$,Z){if(typeof $=="object"&&$!==null&&$.type===j&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case _:e:{for(var le=$.key,de=O;de!==null;){if(de.key===le){if(le=$.type,le===j){if(de.tag===7){a(z,de.sibling),O=h(de,$.props.children),O.return=z,z=O;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===me&&Mm(le)===de.type){a(z,de.sibling),O=h(de,$.props),O.ref=Gi(z,de,$),O.return=z,z=O;break e}a(z,de);break}else r(z,de);de=de.sibling}$.type===j?(O=Qr($.props.children,z.mode,Z,$.key),O.return=z,z=O):(Z=qa($.type,$.key,$.props,null,z.mode,Z),Z.ref=Gi(z,O,$),Z.return=z,z=Z)}return w(z);case I:e:{for(de=$.key;O!==null;){if(O.key===de)if(O.tag===4&&O.stateNode.containerInfo===$.containerInfo&&O.stateNode.implementation===$.implementation){a(z,O.sibling),O=h(O,$.children||[]),O.return=z,z=O;break e}else{a(z,O);break}else r(z,O);O=O.sibling}O=$c($,z.mode,Z),O.return=z,z=O}return w(z);case me:return de=$._init,qe(z,O,de($._payload),Z)}if(Ei($))return ie(z,O,$,Z);if(ue($))return ae(z,O,$,Z);Ca(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,O!==null&&O.tag===6?(a(z,O.sibling),O=h(O,$),O.return=z,z=O):(a(z,O),O=Uc($,z.mode,Z),O.return=z,z=O),w(z)):a(z,O)}return qe}var Os=Dm(!0),Am=Dm(!1),Ea=sr(null),Ta=null,Vs=null,Ju=null;function Zu(){Ju=Vs=Ta=null}function ec(n){var r=Ea.current;Oe(Ea),n._currentValue=r}function tc(n,r,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===a)break;n=n.return}}function Bs(n,r){Ta=n,Ju=Vs=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&r)!==0&&(Nt=!0),n.firstContext=null)}function Bt(n){var r=n._currentValue;if(Ju!==n)if(n={context:n,memoizedValue:r,next:null},Vs===null){if(Ta===null)throw Error(s(308));Vs=n,Ta.dependencies={lanes:0,firstContext:n}}else Vs=Vs.next=n;return r}var zr=null;function nc(n){zr===null?zr=[n]:zr.push(n)}function Lm(n,r,a,c){var h=r.interleaved;return h===null?(a.next=a,nc(r)):(a.next=h.next,h.next=a),r.interleaved=a,In(n,c)}function In(n,r){n.lanes|=r;var a=n.alternate;for(a!==null&&(a.lanes|=r),a=n,n=n.return;n!==null;)n.childLanes|=r,a=n.alternate,a!==null&&(a.childLanes|=r),a=n,n=n.return;return a.tag===3?a.stateNode:null}var ar=!1;function rc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Im(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Fn(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function lr(n,r,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(be&2)!==0){var h=c.pending;return h===null?r.next=r:(r.next=h.next,h.next=r),c.pending=r,In(n,a)}return h=c.interleaved,h===null?(r.next=r,nc(c)):(r.next=h.next,h.next=r),c.interleaved=r,In(n,a)}function Na(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,yu(n,a)}}function Fm(n,r){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var h=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};y===null?h=y=w:y=y.next=w,a=a.next}while(a!==null);y===null?h=y=r:y=y.next=r}else h=y=r;a={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:y,shared:c.shared,effects:c.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}function Pa(n,r,a,c){var h=n.updateQueue;ar=!1;var y=h.firstBaseUpdate,w=h.lastBaseUpdate,P=h.shared.pending;if(P!==null){h.shared.pending=null;var A=P,H=A.next;A.next=null,w===null?y=H:w.next=H,w=A;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,P=Q.lastBaseUpdate,P!==w&&(P===null?Q.firstBaseUpdate=H:P.next=H,Q.lastBaseUpdate=A))}if(y!==null){var Y=h.baseState;w=0,Q=H=A=null,P=y;do{var q=P.lane,re=P.eventTime;if((c&q)===q){Q!==null&&(Q=Q.next={eventTime:re,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var ie=n,ae=P;switch(q=r,re=a,ae.tag){case 1:if(ie=ae.payload,typeof ie=="function"){Y=ie.call(re,Y,q);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ae.payload,q=typeof ie=="function"?ie.call(re,Y,q):ie,q==null)break e;Y=J({},Y,q);break e;case 2:ar=!0}}P.callback!==null&&P.lane!==0&&(n.flags|=64,q=h.effects,q===null?h.effects=[P]:q.push(P))}else re={eventTime:re,lane:q,tag:P.tag,payload:P.payload,callback:P.callback,next:null},Q===null?(H=Q=re,A=Y):Q=Q.next=re,w|=q;if(P=P.next,P===null){if(P=h.shared.pending,P===null)break;q=P,P=q.next,q.next=null,h.lastBaseUpdate=q,h.shared.pending=null}}while(!0);if(Q===null&&(A=Y),h.baseState=A,h.firstBaseUpdate=H,h.lastBaseUpdate=Q,r=h.shared.interleaved,r!==null){h=r;do w|=h.lane,h=h.next;while(h!==r)}else y===null&&(h.shared.lanes=0);Hr|=w,n.lanes=w,n.memoizedState=Y}}function _m(n,r,a){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var c=n[r],h=c.callback;if(h!==null){if(c.callback=null,c=a,typeof h!="function")throw Error(s(191,h));h.call(c)}}}var Yi={},vn=sr(Yi),Xi=sr(Yi),Ji=sr(Yi);function Ur(n){if(n===Yi)throw Error(s(174));return n}function sc(n,r){switch(Fe(Ji,r),Fe(Xi,n),Fe(vn,Yi),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:iu(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=iu(r,n)}Oe(vn),Fe(vn,r)}function zs(){Oe(vn),Oe(Xi),Oe(Ji)}function Om(n){Ur(Ji.current);var r=Ur(vn.current),a=iu(r,n.type);r!==a&&(Fe(Xi,n),Fe(vn,a))}function ic(n){Xi.current===n&&(Oe(vn),Oe(Xi))}var Ue=sr(0);function ba(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var oc=[];function ac(){for(var n=0;n<oc.length;n++)oc[n]._workInProgressVersionPrimary=null;oc.length=0}var ja=M.ReactCurrentDispatcher,lc=M.ReactCurrentBatchConfig,$r=0,$e=null,Ge=null,nt=null,Ra=!1,Zi=!1,eo=0,Hk=0;function ft(){throw Error(s(321))}function uc(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!Xt(n[a],r[a]))return!1;return!0}function cc(n,r,a,c,h,y){if($r=y,$e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,ja.current=n===null||n.memoizedState===null?Qk:Gk,n=a(c,h),Zi){y=0;do{if(Zi=!1,eo=0,25<=y)throw Error(s(301));y+=1,nt=Ge=null,r.updateQueue=null,ja.current=Yk,n=a(c,h)}while(Zi)}if(ja.current=Aa,r=Ge!==null&&Ge.next!==null,$r=0,nt=Ge=$e=null,Ra=!1,r)throw Error(s(300));return n}function dc(){var n=eo!==0;return eo=0,n}function xn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?$e.memoizedState=nt=n:nt=nt.next=n,nt}function zt(){if(Ge===null){var n=$e.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var r=nt===null?$e.memoizedState:nt.next;if(r!==null)nt=r,Ge=n;else{if(n===null)throw Error(s(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?$e.memoizedState=nt=n:nt=nt.next=n}return nt}function to(n,r){return typeof r=="function"?r(n):r}function fc(n){var r=zt(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var c=Ge,h=c.baseQueue,y=a.pending;if(y!==null){if(h!==null){var w=h.next;h.next=y.next,y.next=w}c.baseQueue=h=y,a.pending=null}if(h!==null){y=h.next,c=c.baseState;var P=w=null,A=null,H=y;do{var Q=H.lane;if(($r&Q)===Q)A!==null&&(A=A.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),c=H.hasEagerState?H.eagerState:n(c,H.action);else{var Y={lane:Q,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};A===null?(P=A=Y,w=c):A=A.next=Y,$e.lanes|=Q,Hr|=Q}H=H.next}while(H!==null&&H!==y);A===null?w=c:A.next=P,Xt(c,r.memoizedState)||(Nt=!0),r.memoizedState=c,r.baseState=w,r.baseQueue=A,a.lastRenderedState=c}if(n=a.interleaved,n!==null){h=n;do y=h.lane,$e.lanes|=y,Hr|=y,h=h.next;while(h!==n)}else h===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function hc(n){var r=zt(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var c=a.dispatch,h=a.pending,y=r.memoizedState;if(h!==null){a.pending=null;var w=h=h.next;do y=n(y,w.action),w=w.next;while(w!==h);Xt(y,r.memoizedState)||(Nt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),a.lastRenderedState=y}return[y,c]}function Vm(){}function Bm(n,r){var a=$e,c=zt(),h=r(),y=!Xt(c.memoizedState,h);if(y&&(c.memoizedState=h,Nt=!0),c=c.queue,pc($m.bind(null,a,c,n),[n]),c.getSnapshot!==r||y||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,no(9,Um.bind(null,a,c,h,r),void 0,null),rt===null)throw Error(s(349));($r&30)!==0||zm(a,r,h)}return h}function zm(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=$e.updateQueue,r===null?(r={lastEffect:null,stores:null},$e.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function Um(n,r,a,c){r.value=a,r.getSnapshot=c,Hm(r)&&Km(n)}function $m(n,r,a){return a(function(){Hm(r)&&Km(n)})}function Hm(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!Xt(n,a)}catch{return!0}}function Km(n){var r=In(n,1);r!==null&&nn(r,n,1,-1)}function Wm(n){var r=xn();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:to,lastRenderedState:n},r.queue=n,n=n.dispatch=qk.bind(null,$e,n),[r.memoizedState,n]}function no(n,r,a,c){return n={tag:n,create:r,destroy:a,deps:c,next:null},r=$e.updateQueue,r===null?(r={lastEffect:null,stores:null},$e.updateQueue=r,r.lastEffect=n.next=n):(a=r.lastEffect,a===null?r.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,r.lastEffect=n)),n}function qm(){return zt().memoizedState}function Ma(n,r,a,c){var h=xn();$e.flags|=n,h.memoizedState=no(1|r,a,void 0,c===void 0?null:c)}function Da(n,r,a,c){var h=zt();c=c===void 0?null:c;var y=void 0;if(Ge!==null){var w=Ge.memoizedState;if(y=w.destroy,c!==null&&uc(c,w.deps)){h.memoizedState=no(r,a,y,c);return}}$e.flags|=n,h.memoizedState=no(1|r,a,y,c)}function Qm(n,r){return Ma(8390656,8,n,r)}function pc(n,r){return Da(2048,8,n,r)}function Gm(n,r){return Da(4,2,n,r)}function Ym(n,r){return Da(4,4,n,r)}function Xm(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Jm(n,r,a){return a=a!=null?a.concat([n]):null,Da(4,4,Xm.bind(null,r,n),a)}function mc(){}function Zm(n,r){var a=zt();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&uc(r,c[1])?c[0]:(a.memoizedState=[n,r],n)}function eg(n,r){var a=zt();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&uc(r,c[1])?c[0]:(n=n(),a.memoizedState=[n,r],n)}function tg(n,r,a){return($r&21)===0?(n.baseState&&(n.baseState=!1,Nt=!0),n.memoizedState=a):(Xt(a,r)||(a=Mp(),$e.lanes|=a,Hr|=a,n.baseState=!0),r)}function Kk(n,r){var a=De;De=a!==0&&4>a?a:4,n(!0);var c=lc.transition;lc.transition={};try{n(!1),r()}finally{De=a,lc.transition=c}}function ng(){return zt().memoizedState}function Wk(n,r,a){var c=fr(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},rg(n))sg(r,a);else if(a=Lm(n,r,a,c),a!==null){var h=vt();nn(a,n,c,h),ig(a,r,c)}}function qk(n,r,a){var c=fr(n),h={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(rg(n))sg(r,h);else{var y=n.alternate;if(n.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var w=r.lastRenderedState,P=y(w,a);if(h.hasEagerState=!0,h.eagerState=P,Xt(P,w)){var A=r.interleaved;A===null?(h.next=h,nc(r)):(h.next=A.next,A.next=h),r.interleaved=h;return}}catch{}finally{}a=Lm(n,r,h,c),a!==null&&(h=vt(),nn(a,n,c,h),ig(a,r,c))}}function rg(n){var r=n.alternate;return n===$e||r!==null&&r===$e}function sg(n,r){Zi=Ra=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function ig(n,r,a){if((a&4194240)!==0){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,yu(n,a)}}var Aa={readContext:Bt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},Qk={readContext:Bt,useCallback:function(n,r){return xn().memoizedState=[n,r===void 0?null:r],n},useContext:Bt,useEffect:Qm,useImperativeHandle:function(n,r,a){return a=a!=null?a.concat([n]):null,Ma(4194308,4,Xm.bind(null,r,n),a)},useLayoutEffect:function(n,r){return Ma(4194308,4,n,r)},useInsertionEffect:function(n,r){return Ma(4,2,n,r)},useMemo:function(n,r){var a=xn();return r=r===void 0?null:r,n=n(),a.memoizedState=[n,r],n},useReducer:function(n,r,a){var c=xn();return r=a!==void 0?a(r):r,c.memoizedState=c.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},c.queue=n,n=n.dispatch=Wk.bind(null,$e,n),[c.memoizedState,n]},useRef:function(n){var r=xn();return n={current:n},r.memoizedState=n},useState:Wm,useDebugValue:mc,useDeferredValue:function(n){return xn().memoizedState=n},useTransition:function(){var n=Wm(!1),r=n[0];return n=Kk.bind(null,n[1]),xn().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,a){var c=$e,h=xn();if(Ve){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),rt===null)throw Error(s(349));($r&30)!==0||zm(c,r,a)}h.memoizedState=a;var y={value:a,getSnapshot:r};return h.queue=y,Qm($m.bind(null,c,y,n),[n]),c.flags|=2048,no(9,Um.bind(null,c,y,a,r),void 0,null),a},useId:function(){var n=xn(),r=rt.identifierPrefix;if(Ve){var a=Ln,c=An;a=(c&~(1<<32-Yt(c)-1)).toString(32)+a,r=":"+r+"R"+a,a=eo++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=Hk++,r=":"+r+"r"+a.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},Gk={readContext:Bt,useCallback:Zm,useContext:Bt,useEffect:pc,useImperativeHandle:Jm,useInsertionEffect:Gm,useLayoutEffect:Ym,useMemo:eg,useReducer:fc,useRef:qm,useState:function(){return fc(to)},useDebugValue:mc,useDeferredValue:function(n){var r=zt();return tg(r,Ge.memoizedState,n)},useTransition:function(){var n=fc(to)[0],r=zt().memoizedState;return[n,r]},useMutableSource:Vm,useSyncExternalStore:Bm,useId:ng,unstable_isNewReconciler:!1},Yk={readContext:Bt,useCallback:Zm,useContext:Bt,useEffect:pc,useImperativeHandle:Jm,useInsertionEffect:Gm,useLayoutEffect:Ym,useMemo:eg,useReducer:hc,useRef:qm,useState:function(){return hc(to)},useDebugValue:mc,useDeferredValue:function(n){var r=zt();return Ge===null?r.memoizedState=n:tg(r,Ge.memoizedState,n)},useTransition:function(){var n=hc(to)[0],r=zt().memoizedState;return[n,r]},useMutableSource:Vm,useSyncExternalStore:Bm,useId:ng,unstable_isNewReconciler:!1};function Zt(n,r){if(n&&n.defaultProps){r=J({},r),n=n.defaultProps;for(var a in n)r[a]===void 0&&(r[a]=n[a]);return r}return r}function gc(n,r,a,c){r=n.memoizedState,a=a(c,r),a=a==null?r:J({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var La={isMounted:function(n){return(n=n._reactInternals)?Fr(n)===n:!1},enqueueSetState:function(n,r,a){n=n._reactInternals;var c=vt(),h=fr(n),y=Fn(c,h);y.payload=r,a!=null&&(y.callback=a),r=lr(n,y,h),r!==null&&(nn(r,n,h,c),Na(r,n,h))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var c=vt(),h=fr(n),y=Fn(c,h);y.tag=1,y.payload=r,a!=null&&(y.callback=a),r=lr(n,y,h),r!==null&&(nn(r,n,h,c),Na(r,n,h))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=vt(),c=fr(n),h=Fn(a,c);h.tag=2,r!=null&&(h.callback=r),r=lr(n,h,c),r!==null&&(nn(r,n,c,a),Na(r,n,c))}};function og(n,r,a,c,h,y,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,y,w):r.prototype&&r.prototype.isPureReactComponent?!Ui(a,c)||!Ui(h,y):!0}function ag(n,r,a){var c=!1,h=ir,y=r.contextType;return typeof y=="object"&&y!==null?y=Bt(y):(h=Tt(r)?Or:dt.current,c=r.contextTypes,y=(c=c!=null)?Ls(n,h):ir),r=new r(a,y),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=La,n.stateNode=r,r._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=h,n.__reactInternalMemoizedMaskedChildContext=y),r}function lg(n,r,a,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==n&&La.enqueueReplaceState(r,r.state,null)}function yc(n,r,a,c){var h=n.stateNode;h.props=a,h.state=n.memoizedState,h.refs={},rc(n);var y=r.contextType;typeof y=="object"&&y!==null?h.context=Bt(y):(y=Tt(r)?Or:dt.current,h.context=Ls(n,y)),h.state=n.memoizedState,y=r.getDerivedStateFromProps,typeof y=="function"&&(gc(n,r,y,a),h.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(r=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),r!==h.state&&La.enqueueReplaceState(h,h.state,null),Pa(n,a,h,c),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308)}function Us(n,r){try{var a="",c=r;do a+=Ce(c),c=c.return;while(c);var h=a}catch(y){h=`
|
|
39
|
+
Error generating stack: `+y.message+`
|
|
40
|
+
`+y.stack}return{value:n,source:r,stack:h,digest:null}}function vc(n,r,a){return{value:n,source:null,stack:a??null,digest:r??null}}function xc(n,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var Xk=typeof WeakMap=="function"?WeakMap:Map;function ug(n,r,a){a=Fn(-1,a),a.tag=3,a.payload={element:null};var c=r.value;return a.callback=function(){za||(za=!0,Lc=c),xc(n,r)},a}function cg(n,r,a){a=Fn(-1,a),a.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var h=r.value;a.payload=function(){return c(h)},a.callback=function(){xc(n,r)}}var y=n.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(a.callback=function(){xc(n,r),typeof c!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),a}function dg(n,r,a){var c=n.pingCache;if(c===null){c=n.pingCache=new Xk;var h=new Set;c.set(r,h)}else h=c.get(r),h===void 0&&(h=new Set,c.set(r,h));h.has(a)||(h.add(a),n=d2.bind(null,n,r,a),r.then(n,n))}function fg(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function hg(n,r,a,c,h){return(n.mode&1)===0?(n===r?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=Fn(-1,1),r.tag=2,lr(a,r,1))),a.lanes|=1),n):(n.flags|=65536,n.lanes=h,n)}var Jk=M.ReactCurrentOwner,Nt=!1;function yt(n,r,a,c){r.child=n===null?Am(r,null,a,c):Os(r,n.child,a,c)}function pg(n,r,a,c,h){a=a.render;var y=r.ref;return Bs(r,h),c=cc(n,r,a,c,y,h),a=dc(),n!==null&&!Nt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~h,_n(n,r,h)):(Ve&&a&&qu(r),r.flags|=1,yt(n,r,c,h),r.child)}function mg(n,r,a,c,h){if(n===null){var y=a.type;return typeof y=="function"&&!zc(y)&&y.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=y,gg(n,r,y,c,h)):(n=qa(a.type,null,c,r,r.mode,h),n.ref=r.ref,n.return=r,r.child=n)}if(y=n.child,(n.lanes&h)===0){var w=y.memoizedProps;if(a=a.compare,a=a!==null?a:Ui,a(w,c)&&n.ref===r.ref)return _n(n,r,h)}return r.flags|=1,n=pr(y,c),n.ref=r.ref,n.return=r,r.child=n}function gg(n,r,a,c,h){if(n!==null){var y=n.memoizedProps;if(Ui(y,c)&&n.ref===r.ref)if(Nt=!1,r.pendingProps=c=y,(n.lanes&h)!==0)(n.flags&131072)!==0&&(Nt=!0);else return r.lanes=n.lanes,_n(n,r,h)}return wc(n,r,a,c,h)}function yg(n,r,a){var c=r.pendingProps,h=c.children,y=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(Hs,It),It|=a;else{if((a&1073741824)===0)return n=y!==null?y.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,Fe(Hs,It),It|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=y!==null?y.baseLanes:a,Fe(Hs,It),It|=c}else y!==null?(c=y.baseLanes|a,r.memoizedState=null):c=a,Fe(Hs,It),It|=c;return yt(n,r,h,a),r.child}function vg(n,r){var a=r.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function wc(n,r,a,c,h){var y=Tt(a)?Or:dt.current;return y=Ls(r,y),Bs(r,h),a=cc(n,r,a,c,y,h),c=dc(),n!==null&&!Nt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~h,_n(n,r,h)):(Ve&&c&&qu(r),r.flags|=1,yt(n,r,a,h),r.child)}function xg(n,r,a,c,h){if(Tt(a)){var y=!0;va(r)}else y=!1;if(Bs(r,h),r.stateNode===null)Fa(n,r),ag(r,a,c),yc(r,a,c,h),c=!0;else if(n===null){var w=r.stateNode,P=r.memoizedProps;w.props=P;var A=w.context,H=a.contextType;typeof H=="object"&&H!==null?H=Bt(H):(H=Tt(a)?Or:dt.current,H=Ls(r,H));var Q=a.getDerivedStateFromProps,Y=typeof Q=="function"||typeof w.getSnapshotBeforeUpdate=="function";Y||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P!==c||A!==H)&&lg(r,w,c,H),ar=!1;var q=r.memoizedState;w.state=q,Pa(r,c,w,h),A=r.memoizedState,P!==c||q!==A||Et.current||ar?(typeof Q=="function"&&(gc(r,a,Q,c),A=r.memoizedState),(P=ar||og(r,a,P,c,q,A,H))?(Y||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(r.flags|=4194308)):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=A),w.props=c,w.state=A,w.context=H,c=P):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{w=r.stateNode,Im(n,r),P=r.memoizedProps,H=r.type===r.elementType?P:Zt(r.type,P),w.props=H,Y=r.pendingProps,q=w.context,A=a.contextType,typeof A=="object"&&A!==null?A=Bt(A):(A=Tt(a)?Or:dt.current,A=Ls(r,A));var re=a.getDerivedStateFromProps;(Q=typeof re=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P!==Y||q!==A)&&lg(r,w,c,A),ar=!1,q=r.memoizedState,w.state=q,Pa(r,c,w,h);var ie=r.memoizedState;P!==Y||q!==ie||Et.current||ar?(typeof re=="function"&&(gc(r,a,re,c),ie=r.memoizedState),(H=ar||og(r,a,H,c,q,ie,A)||!1)?(Q||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,ie,A),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,ie,A)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||P===n.memoizedProps&&q===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&q===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=ie),w.props=c,w.state=ie,w.context=A,c=H):(typeof w.componentDidUpdate!="function"||P===n.memoizedProps&&q===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===n.memoizedProps&&q===n.memoizedState||(r.flags|=1024),c=!1)}return Sc(n,r,a,c,y,h)}function Sc(n,r,a,c,h,y){vg(n,r);var w=(r.flags&128)!==0;if(!c&&!w)return h&&Em(r,a,!1),_n(n,r,y);c=r.stateNode,Jk.current=r;var P=w&&typeof a.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,n!==null&&w?(r.child=Os(r,n.child,null,y),r.child=Os(r,null,P,y)):yt(n,r,P,y),r.memoizedState=c.state,h&&Em(r,a,!0),r.child}function wg(n){var r=n.stateNode;r.pendingContext?km(n,r.pendingContext,r.pendingContext!==r.context):r.context&&km(n,r.context,!1),sc(n,r.containerInfo)}function Sg(n,r,a,c,h){return _s(),Xu(h),r.flags|=256,yt(n,r,a,c),r.child}var kc={dehydrated:null,treeContext:null,retryLane:0};function Cc(n){return{baseLanes:n,cachePool:null,transitions:null}}function kg(n,r,a){var c=r.pendingProps,h=Ue.current,y=!1,w=(r.flags&128)!==0,P;if((P=w)||(P=n!==null&&n.memoizedState===null?!1:(h&2)!==0),P?(y=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(h|=1),Fe(Ue,h&1),n===null)return Yu(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((r.mode&1)===0?r.lanes=1:n.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(w=c.children,n=c.fallback,y?(c=r.mode,y=r.child,w={mode:"hidden",children:w},(c&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=w):y=Qa(w,c,0,null),n=Qr(n,c,a,null),y.return=r,n.return=r,y.sibling=n,r.child=y,r.child.memoizedState=Cc(a),r.memoizedState=kc,n):Ec(r,w));if(h=n.memoizedState,h!==null&&(P=h.dehydrated,P!==null))return Zk(n,r,w,c,P,h,a);if(y){y=c.fallback,w=r.mode,h=n.child,P=h.sibling;var A={mode:"hidden",children:c.children};return(w&1)===0&&r.child!==h?(c=r.child,c.childLanes=0,c.pendingProps=A,r.deletions=null):(c=pr(h,A),c.subtreeFlags=h.subtreeFlags&14680064),P!==null?y=pr(P,y):(y=Qr(y,w,a,null),y.flags|=2),y.return=r,c.return=r,c.sibling=y,r.child=c,c=y,y=r.child,w=n.child.memoizedState,w=w===null?Cc(a):{baseLanes:w.baseLanes|a,cachePool:null,transitions:w.transitions},y.memoizedState=w,y.childLanes=n.childLanes&~a,r.memoizedState=kc,c}return y=n.child,n=y.sibling,c=pr(y,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=a),c.return=r,c.sibling=null,n!==null&&(a=r.deletions,a===null?(r.deletions=[n],r.flags|=16):a.push(n)),r.child=c,r.memoizedState=null,c}function Ec(n,r){return r=Qa({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function Ia(n,r,a,c){return c!==null&&Xu(c),Os(r,n.child,null,a),n=Ec(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Zk(n,r,a,c,h,y,w){if(a)return r.flags&256?(r.flags&=-257,c=vc(Error(s(422))),Ia(n,r,w,c)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(y=c.fallback,h=r.mode,c=Qa({mode:"visible",children:c.children},h,0,null),y=Qr(y,h,w,null),y.flags|=2,c.return=r,y.return=r,c.sibling=y,r.child=c,(r.mode&1)!==0&&Os(r,n.child,null,w),r.child.memoizedState=Cc(w),r.memoizedState=kc,y);if((r.mode&1)===0)return Ia(n,r,w,null);if(h.data==="$!"){if(c=h.nextSibling&&h.nextSibling.dataset,c)var P=c.dgst;return c=P,y=Error(s(419)),c=vc(y,c,void 0),Ia(n,r,w,c)}if(P=(w&n.childLanes)!==0,Nt||P){if(c=rt,c!==null){switch(w&-w){case 4:h=2;break;case 16:h=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:h=32;break;case 536870912:h=268435456;break;default:h=0}h=(h&(c.suspendedLanes|w))!==0?0:h,h!==0&&h!==y.retryLane&&(y.retryLane=h,In(n,h),nn(c,n,h,-1))}return Bc(),c=vc(Error(s(421))),Ia(n,r,w,c)}return h.data==="$?"?(r.flags|=128,r.child=n.child,r=f2.bind(null,n),h._reactRetry=r,null):(n=y.treeContext,Lt=rr(h.nextSibling),At=r,Ve=!0,Jt=null,n!==null&&(Ot[Vt++]=An,Ot[Vt++]=Ln,Ot[Vt++]=Vr,An=n.id,Ln=n.overflow,Vr=r),r=Ec(r,c.children),r.flags|=4096,r)}function Cg(n,r,a){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),tc(n.return,r,a)}function Tc(n,r,a,c,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:h}:(y.isBackwards=r,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=a,y.tailMode=h)}function Eg(n,r,a){var c=r.pendingProps,h=c.revealOrder,y=c.tail;if(yt(n,r,c.children,a),c=Ue.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Cg(n,a,r);else if(n.tag===19)Cg(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Fe(Ue,c),(r.mode&1)===0)r.memoizedState=null;else switch(h){case"forwards":for(a=r.child,h=null;a!==null;)n=a.alternate,n!==null&&ba(n)===null&&(h=a),a=a.sibling;a=h,a===null?(h=r.child,r.child=null):(h=a.sibling,a.sibling=null),Tc(r,!1,h,a,y);break;case"backwards":for(a=null,h=r.child,r.child=null;h!==null;){if(n=h.alternate,n!==null&&ba(n)===null){r.child=h;break}n=h.sibling,h.sibling=a,a=h,h=n}Tc(r,!0,a,null,y);break;case"together":Tc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Fa(n,r){(r.mode&1)===0&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function _n(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Hr|=r.lanes,(a&r.childLanes)===0)return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,a=pr(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=pr(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function e2(n,r,a){switch(r.tag){case 3:wg(r),_s();break;case 5:Om(r);break;case 1:Tt(r.type)&&va(r);break;case 4:sc(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,h=r.memoizedProps.value;Fe(Ea,c._currentValue),c._currentValue=h;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(Fe(Ue,Ue.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?kg(n,r,a):(Fe(Ue,Ue.current&1),n=_n(n,r,a),n!==null?n.sibling:null);Fe(Ue,Ue.current&1);break;case 19:if(c=(a&r.childLanes)!==0,(n.flags&128)!==0){if(c)return Eg(n,r,a);r.flags|=128}if(h=r.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),Fe(Ue,Ue.current),c)break;return null;case 22:case 23:return r.lanes=0,yg(n,r,a)}return _n(n,r,a)}var Tg,Nc,Ng,Pg;Tg=function(n,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)n.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Nc=function(){},Ng=function(n,r,a,c){var h=n.memoizedProps;if(h!==c){n=r.stateNode,Ur(vn.current);var y=null;switch(a){case"input":h=tu(n,h),c=tu(n,c),y=[];break;case"select":h=J({},h,{value:void 0}),c=J({},c,{value:void 0}),y=[];break;case"textarea":h=su(n,h),c=su(n,c),y=[];break;default:typeof h.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=ma)}ou(a,c);var w;a=null;for(H in h)if(!c.hasOwnProperty(H)&&h.hasOwnProperty(H)&&h[H]!=null)if(H==="style"){var P=h[H];for(w in P)P.hasOwnProperty(w)&&(a||(a={}),a[w]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(o.hasOwnProperty(H)?y||(y=[]):(y=y||[]).push(H,null));for(H in c){var A=c[H];if(P=h!=null?h[H]:void 0,c.hasOwnProperty(H)&&A!==P&&(A!=null||P!=null))if(H==="style")if(P){for(w in P)!P.hasOwnProperty(w)||A&&A.hasOwnProperty(w)||(a||(a={}),a[w]="");for(w in A)A.hasOwnProperty(w)&&P[w]!==A[w]&&(a||(a={}),a[w]=A[w])}else a||(y||(y=[]),y.push(H,a)),a=A;else H==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,P=P?P.__html:void 0,A!=null&&P!==A&&(y=y||[]).push(H,A)):H==="children"?typeof A!="string"&&typeof A!="number"||(y=y||[]).push(H,""+A):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(o.hasOwnProperty(H)?(A!=null&&H==="onScroll"&&_e("scroll",n),y||P===A||(y=[])):(y=y||[]).push(H,A))}a&&(y=y||[]).push("style",a);var H=y;(r.updateQueue=H)&&(r.flags|=4)}},Pg=function(n,r,a,c){a!==c&&(r.flags|=4)};function ro(n,r){if(!Ve)switch(n.tailMode){case"hidden":r=n.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function ht(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(r)for(var h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags&14680064,c|=h.flags&14680064,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)a|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=a,r}function t2(n,r,a){var c=r.pendingProps;switch(Qu(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(r),null;case 1:return Tt(r.type)&&ya(),ht(r),null;case 3:return c=r.stateNode,zs(),Oe(Et),Oe(dt),ac(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(ka(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Jt!==null&&(_c(Jt),Jt=null))),Nc(n,r),ht(r),null;case 5:ic(r);var h=Ur(Ji.current);if(a=r.type,n!==null&&r.stateNode!=null)Ng(n,r,a,c,h),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(s(166));return ht(r),null}if(n=Ur(vn.current),ka(r)){c=r.stateNode,a=r.type;var y=r.memoizedProps;switch(c[yn]=r,c[qi]=y,n=(r.mode&1)!==0,a){case"dialog":_e("cancel",c),_e("close",c);break;case"iframe":case"object":case"embed":_e("load",c);break;case"video":case"audio":for(h=0;h<Hi.length;h++)_e(Hi[h],c);break;case"source":_e("error",c);break;case"img":case"image":case"link":_e("error",c),_e("load",c);break;case"details":_e("toggle",c);break;case"input":ap(c,y),_e("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!y.multiple},_e("invalid",c);break;case"textarea":cp(c,y),_e("invalid",c)}ou(a,y),h=null;for(var w in y)if(y.hasOwnProperty(w)){var P=y[w];w==="children"?typeof P=="string"?c.textContent!==P&&(y.suppressHydrationWarning!==!0&&pa(c.textContent,P,n),h=["children",P]):typeof P=="number"&&c.textContent!==""+P&&(y.suppressHydrationWarning!==!0&&pa(c.textContent,P,n),h=["children",""+P]):o.hasOwnProperty(w)&&P!=null&&w==="onScroll"&&_e("scroll",c)}switch(a){case"input":Ko(c),up(c,y,!0);break;case"textarea":Ko(c),fp(c);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(c.onclick=ma)}c=h,r.updateQueue=c,c!==null&&(r.flags|=4)}else{w=h.nodeType===9?h:h.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=hp(a)),n==="http://www.w3.org/1999/xhtml"?a==="script"?(n=w.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=w.createElement(a,{is:c.is}):(n=w.createElement(a),a==="select"&&(w=n,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):n=w.createElementNS(n,a),n[yn]=r,n[qi]=c,Tg(n,r,!1,!1),r.stateNode=n;e:{switch(w=au(a,c),a){case"dialog":_e("cancel",n),_e("close",n),h=c;break;case"iframe":case"object":case"embed":_e("load",n),h=c;break;case"video":case"audio":for(h=0;h<Hi.length;h++)_e(Hi[h],n);h=c;break;case"source":_e("error",n),h=c;break;case"img":case"image":case"link":_e("error",n),_e("load",n),h=c;break;case"details":_e("toggle",n),h=c;break;case"input":ap(n,c),h=tu(n,c),_e("invalid",n);break;case"option":h=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},h=J({},c,{value:void 0}),_e("invalid",n);break;case"textarea":cp(n,c),h=su(n,c),_e("invalid",n);break;default:h=c}ou(a,h),P=h;for(y in P)if(P.hasOwnProperty(y)){var A=P[y];y==="style"?gp(n,A):y==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&pp(n,A)):y==="children"?typeof A=="string"?(a!=="textarea"||A!=="")&&Ti(n,A):typeof A=="number"&&Ti(n,""+A):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?A!=null&&y==="onScroll"&&_e("scroll",n):A!=null&&b(n,y,A,w))}switch(a){case"input":Ko(n),up(n,c,!1);break;case"textarea":Ko(n),fp(n);break;case"option":c.value!=null&&n.setAttribute("value",""+we(c.value));break;case"select":n.multiple=!!c.multiple,y=c.value,y!=null?ks(n,!!c.multiple,y,!1):c.defaultValue!=null&&ks(n,!!c.multiple,c.defaultValue,!0);break;default:typeof h.onClick=="function"&&(n.onclick=ma)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return ht(r),null;case 6:if(n&&r.stateNode!=null)Pg(n,r,n.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(a=Ur(Ji.current),Ur(vn.current),ka(r)){if(c=r.stateNode,a=r.memoizedProps,c[yn]=r,(y=c.nodeValue!==a)&&(n=At,n!==null))switch(n.tag){case 3:pa(c.nodeValue,a,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&pa(c.nodeValue,a,(n.mode&1)!==0)}y&&(r.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[yn]=r,r.stateNode=c}return ht(r),null;case 13:if(Oe(Ue),c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Ve&&Lt!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Rm(),_s(),r.flags|=98560,y=!1;else if(y=ka(r),c!==null&&c.dehydrated!==null){if(n===null){if(!y)throw Error(s(318));if(y=r.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(s(317));y[yn]=r}else _s(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ht(r),y=!1}else Jt!==null&&(_c(Jt),Jt=null),y=!0;if(!y)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=a,r):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(n===null||(Ue.current&1)!==0?Ye===0&&(Ye=3):Bc())),r.updateQueue!==null&&(r.flags|=4),ht(r),null);case 4:return zs(),Nc(n,r),n===null&&Ki(r.stateNode.containerInfo),ht(r),null;case 10:return ec(r.type._context),ht(r),null;case 17:return Tt(r.type)&&ya(),ht(r),null;case 19:if(Oe(Ue),y=r.memoizedState,y===null)return ht(r),null;if(c=(r.flags&128)!==0,w=y.rendering,w===null)if(c)ro(y,!1);else{if(Ye!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(w=ba(n),w!==null){for(r.flags|=128,ro(y,!1),c=w.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=a,a=r.child;a!==null;)y=a,n=c,y.flags&=14680066,w=y.alternate,w===null?(y.childLanes=0,y.lanes=n,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=w.childLanes,y.lanes=w.lanes,y.child=w.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=w.memoizedProps,y.memoizedState=w.memoizedState,y.updateQueue=w.updateQueue,y.type=w.type,n=w.dependencies,y.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a=a.sibling;return Fe(Ue,Ue.current&1|2),r.child}n=n.sibling}y.tail!==null&&We()>Ks&&(r.flags|=128,c=!0,ro(y,!1),r.lanes=4194304)}else{if(!c)if(n=ba(w),n!==null){if(r.flags|=128,c=!0,a=n.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ro(y,!0),y.tail===null&&y.tailMode==="hidden"&&!w.alternate&&!Ve)return ht(r),null}else 2*We()-y.renderingStartTime>Ks&&a!==1073741824&&(r.flags|=128,c=!0,ro(y,!1),r.lanes=4194304);y.isBackwards?(w.sibling=r.child,r.child=w):(a=y.last,a!==null?a.sibling=w:r.child=w,y.last=w)}return y.tail!==null?(r=y.tail,y.rendering=r,y.tail=r.sibling,y.renderingStartTime=We(),r.sibling=null,a=Ue.current,Fe(Ue,c?a&1|2:a&1),r):(ht(r),null);case 22:case 23:return Vc(),c=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(It&1073741824)!==0&&(ht(r),r.subtreeFlags&6&&(r.flags|=8192)):ht(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function n2(n,r){switch(Qu(r),r.tag){case 1:return Tt(r.type)&&ya(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return zs(),Oe(Et),Oe(dt),ac(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 5:return ic(r),null;case 13:if(Oe(Ue),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));_s()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Oe(Ue),null;case 4:return zs(),null;case 10:return ec(r.type._context),null;case 22:case 23:return Vc(),null;case 24:return null;default:return null}}var _a=!1,pt=!1,r2=typeof WeakSet=="function"?WeakSet:Set,se=null;function $s(n,r){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Ke(n,r,c)}else a.current=null}function Pc(n,r,a){try{a()}catch(c){Ke(n,r,c)}}var bg=!1;function s2(n,r){if(Vu=ra,n=om(),Mu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var h=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var w=0,P=-1,A=-1,H=0,Q=0,Y=n,q=null;t:for(;;){for(var re;Y!==a||h!==0&&Y.nodeType!==3||(P=w+h),Y!==y||c!==0&&Y.nodeType!==3||(A=w+c),Y.nodeType===3&&(w+=Y.nodeValue.length),(re=Y.firstChild)!==null;)q=Y,Y=re;for(;;){if(Y===n)break t;if(q===a&&++H===h&&(P=w),q===y&&++Q===c&&(A=w),(re=Y.nextSibling)!==null)break;Y=q,q=Y.parentNode}Y=re}a=P===-1||A===-1?null:{start:P,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Bu={focusedElem:n,selectionRange:a},ra=!1,se=r;se!==null;)if(r=se,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,se=n;else for(;se!==null;){r=se;try{var ie=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var ae=ie.memoizedProps,qe=ie.memoizedState,z=r.stateNode,O=z.getSnapshotBeforeUpdate(r.elementType===r.type?ae:Zt(r.type,ae),qe);z.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var $=r.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Z){Ke(r,r.return,Z)}if(n=r.sibling,n!==null){n.return=r.return,se=n;break}se=r.return}return ie=bg,bg=!1,ie}function so(n,r,a){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var h=c=c.next;do{if((h.tag&n)===n){var y=h.destroy;h.destroy=void 0,y!==void 0&&Pc(r,a,y)}h=h.next}while(h!==c)}}function Oa(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==r)}}function bc(n){var r=n.ref;if(r!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof r=="function"?r(n):r.current=n}}function jg(n){var r=n.alternate;r!==null&&(n.alternate=null,jg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[yn],delete r[qi],delete r[Hu],delete r[Bk],delete r[zk])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Rg(n){return n.tag===5||n.tag===3||n.tag===4}function Mg(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Rg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function jc(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(n,r):a.insertBefore(n,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(n,a)):(r=a,r.appendChild(n)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=ma));else if(c!==4&&(n=n.child,n!==null))for(jc(n,r,a),n=n.sibling;n!==null;)jc(n,r,a),n=n.sibling}function Rc(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.insertBefore(n,r):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Rc(n,r,a),n=n.sibling;n!==null;)Rc(n,r,a),n=n.sibling}var ot=null,en=!1;function ur(n,r,a){for(a=a.child;a!==null;)Dg(n,r,a),a=a.sibling}function Dg(n,r,a){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(Xo,a)}catch{}switch(a.tag){case 5:pt||$s(a,r);case 6:var c=ot,h=en;ot=null,ur(n,r,a),ot=c,en=h,ot!==null&&(en?(n=ot,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):ot.removeChild(a.stateNode));break;case 18:ot!==null&&(en?(n=ot,a=a.stateNode,n.nodeType===8?$u(n.parentNode,a):n.nodeType===1&&$u(n,a),Fi(n)):$u(ot,a.stateNode));break;case 4:c=ot,h=en,ot=a.stateNode.containerInfo,en=!0,ur(n,r,a),ot=c,en=h;break;case 0:case 11:case 14:case 15:if(!pt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){h=c=c.next;do{var y=h,w=y.destroy;y=y.tag,w!==void 0&&((y&2)!==0||(y&4)!==0)&&Pc(a,r,w),h=h.next}while(h!==c)}ur(n,r,a);break;case 1:if(!pt&&($s(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(P){Ke(a,r,P)}ur(n,r,a);break;case 21:ur(n,r,a);break;case 22:a.mode&1?(pt=(c=pt)||a.memoizedState!==null,ur(n,r,a),pt=c):ur(n,r,a);break;default:ur(n,r,a)}}function Ag(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new r2),r.forEach(function(c){var h=h2.bind(null,n,c);a.has(c)||(a.add(c),c.then(h,h))})}}function tn(n,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var h=a[c];try{var y=n,w=r,P=w;e:for(;P!==null;){switch(P.tag){case 5:ot=P.stateNode,en=!1;break e;case 3:ot=P.stateNode.containerInfo,en=!0;break e;case 4:ot=P.stateNode.containerInfo,en=!0;break e}P=P.return}if(ot===null)throw Error(s(160));Dg(y,w,h),ot=null,en=!1;var A=h.alternate;A!==null&&(A.return=null),h.return=null}catch(H){Ke(h,r,H)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Lg(r,n),r=r.sibling}function Lg(n,r){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(tn(r,n),wn(n),c&4){try{so(3,n,n.return),Oa(3,n)}catch(ae){Ke(n,n.return,ae)}try{so(5,n,n.return)}catch(ae){Ke(n,n.return,ae)}}break;case 1:tn(r,n),wn(n),c&512&&a!==null&&$s(a,a.return);break;case 5:if(tn(r,n),wn(n),c&512&&a!==null&&$s(a,a.return),n.flags&32){var h=n.stateNode;try{Ti(h,"")}catch(ae){Ke(n,n.return,ae)}}if(c&4&&(h=n.stateNode,h!=null)){var y=n.memoizedProps,w=a!==null?a.memoizedProps:y,P=n.type,A=n.updateQueue;if(n.updateQueue=null,A!==null)try{P==="input"&&y.type==="radio"&&y.name!=null&&lp(h,y),au(P,w);var H=au(P,y);for(w=0;w<A.length;w+=2){var Q=A[w],Y=A[w+1];Q==="style"?gp(h,Y):Q==="dangerouslySetInnerHTML"?pp(h,Y):Q==="children"?Ti(h,Y):b(h,Q,Y,H)}switch(P){case"input":nu(h,y);break;case"textarea":dp(h,y);break;case"select":var q=h._wrapperState.wasMultiple;h._wrapperState.wasMultiple=!!y.multiple;var re=y.value;re!=null?ks(h,!!y.multiple,re,!1):q!==!!y.multiple&&(y.defaultValue!=null?ks(h,!!y.multiple,y.defaultValue,!0):ks(h,!!y.multiple,y.multiple?[]:"",!1))}h[qi]=y}catch(ae){Ke(n,n.return,ae)}}break;case 6:if(tn(r,n),wn(n),c&4){if(n.stateNode===null)throw Error(s(162));h=n.stateNode,y=n.memoizedProps;try{h.nodeValue=y}catch(ae){Ke(n,n.return,ae)}}break;case 3:if(tn(r,n),wn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{Fi(r.containerInfo)}catch(ae){Ke(n,n.return,ae)}break;case 4:tn(r,n),wn(n);break;case 13:tn(r,n),wn(n),h=n.child,h.flags&8192&&(y=h.memoizedState!==null,h.stateNode.isHidden=y,!y||h.alternate!==null&&h.alternate.memoizedState!==null||(Ac=We())),c&4&&Ag(n);break;case 22:if(Q=a!==null&&a.memoizedState!==null,n.mode&1?(pt=(H=pt)||Q,tn(r,n),pt=H):tn(r,n),wn(n),c&8192){if(H=n.memoizedState!==null,(n.stateNode.isHidden=H)&&!Q&&(n.mode&1)!==0)for(se=n,Q=n.child;Q!==null;){for(Y=se=Q;se!==null;){switch(q=se,re=q.child,q.tag){case 0:case 11:case 14:case 15:so(4,q,q.return);break;case 1:$s(q,q.return);var ie=q.stateNode;if(typeof ie.componentWillUnmount=="function"){c=q,a=q.return;try{r=c,ie.props=r.memoizedProps,ie.state=r.memoizedState,ie.componentWillUnmount()}catch(ae){Ke(c,a,ae)}}break;case 5:$s(q,q.return);break;case 22:if(q.memoizedState!==null){_g(Y);continue}}re!==null?(re.return=q,se=re):_g(Y)}Q=Q.sibling}e:for(Q=null,Y=n;;){if(Y.tag===5){if(Q===null){Q=Y;try{h=Y.stateNode,H?(y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(P=Y.stateNode,A=Y.memoizedProps.style,w=A!=null&&A.hasOwnProperty("display")?A.display:null,P.style.display=mp("display",w))}catch(ae){Ke(n,n.return,ae)}}}else if(Y.tag===6){if(Q===null)try{Y.stateNode.nodeValue=H?"":Y.memoizedProps}catch(ae){Ke(n,n.return,ae)}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===n)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===n)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===n)break e;Q===Y&&(Q=null),Y=Y.return}Q===Y&&(Q=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:tn(r,n),wn(n),c&4&&Ag(n);break;case 21:break;default:tn(r,n),wn(n)}}function wn(n){var r=n.flags;if(r&2){try{e:{for(var a=n.return;a!==null;){if(Rg(a)){var c=a;break e}a=a.return}throw Error(s(160))}switch(c.tag){case 5:var h=c.stateNode;c.flags&32&&(Ti(h,""),c.flags&=-33);var y=Mg(n);Rc(n,y,h);break;case 3:case 4:var w=c.stateNode.containerInfo,P=Mg(n);jc(n,P,w);break;default:throw Error(s(161))}}catch(A){Ke(n,n.return,A)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function i2(n,r,a){se=n,Ig(n)}function Ig(n,r,a){for(var c=(n.mode&1)!==0;se!==null;){var h=se,y=h.child;if(h.tag===22&&c){var w=h.memoizedState!==null||_a;if(!w){var P=h.alternate,A=P!==null&&P.memoizedState!==null||pt;P=_a;var H=pt;if(_a=w,(pt=A)&&!H)for(se=h;se!==null;)w=se,A=w.child,w.tag===22&&w.memoizedState!==null?Og(h):A!==null?(A.return=w,se=A):Og(h);for(;y!==null;)se=y,Ig(y),y=y.sibling;se=h,_a=P,pt=H}Fg(n)}else(h.subtreeFlags&8772)!==0&&y!==null?(y.return=h,se=y):Fg(n)}}function Fg(n){for(;se!==null;){var r=se;if((r.flags&8772)!==0){var a=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:pt||Oa(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!pt)if(a===null)c.componentDidMount();else{var h=r.elementType===r.type?a.memoizedProps:Zt(r.type,a.memoizedProps);c.componentDidUpdate(h,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var y=r.updateQueue;y!==null&&_m(r,y,c);break;case 3:var w=r.updateQueue;if(w!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}_m(r,w,a)}break;case 5:var P=r.stateNode;if(a===null&&r.flags&4){a=P;var A=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&a.focus();break;case"img":A.src&&(a.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var H=r.alternate;if(H!==null){var Q=H.memoizedState;if(Q!==null){var Y=Q.dehydrated;Y!==null&&Fi(Y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}pt||r.flags&512&&bc(r)}catch(q){Ke(r,r.return,q)}}if(r===n){se=null;break}if(a=r.sibling,a!==null){a.return=r.return,se=a;break}se=r.return}}function _g(n){for(;se!==null;){var r=se;if(r===n){se=null;break}var a=r.sibling;if(a!==null){a.return=r.return,se=a;break}se=r.return}}function Og(n){for(;se!==null;){var r=se;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{Oa(4,r)}catch(A){Ke(r,a,A)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var h=r.return;try{c.componentDidMount()}catch(A){Ke(r,h,A)}}var y=r.return;try{bc(r)}catch(A){Ke(r,y,A)}break;case 5:var w=r.return;try{bc(r)}catch(A){Ke(r,w,A)}}}catch(A){Ke(r,r.return,A)}if(r===n){se=null;break}var P=r.sibling;if(P!==null){P.return=r.return,se=P;break}se=r.return}}var o2=Math.ceil,Va=M.ReactCurrentDispatcher,Mc=M.ReactCurrentOwner,Ut=M.ReactCurrentBatchConfig,be=0,rt=null,Qe=null,at=0,It=0,Hs=sr(0),Ye=0,io=null,Hr=0,Ba=0,Dc=0,oo=null,Pt=null,Ac=0,Ks=1/0,On=null,za=!1,Lc=null,cr=null,Ua=!1,dr=null,$a=0,ao=0,Ic=null,Ha=-1,Ka=0;function vt(){return(be&6)!==0?We():Ha!==-1?Ha:Ha=We()}function fr(n){return(n.mode&1)===0?1:(be&2)!==0&&at!==0?at&-at:$k.transition!==null?(Ka===0&&(Ka=Mp()),Ka):(n=De,n!==0||(n=window.event,n=n===void 0?16:Bp(n.type)),n)}function nn(n,r,a,c){if(50<ao)throw ao=0,Ic=null,Error(s(185));Mi(n,a,c),((be&2)===0||n!==rt)&&(n===rt&&((be&2)===0&&(Ba|=a),Ye===4&&hr(n,at)),bt(n,c),a===1&&be===0&&(r.mode&1)===0&&(Ks=We()+500,xa&&or()))}function bt(n,r){var a=n.callbackNode;$S(n,r);var c=ea(n,n===rt?at:0);if(c===0)a!==null&&bp(a),n.callbackNode=null,n.callbackPriority=0;else if(r=c&-c,n.callbackPriority!==r){if(a!=null&&bp(a),r===1)n.tag===0?Uk(Bg.bind(null,n)):Tm(Bg.bind(null,n)),Ok(function(){(be&6)===0&&or()}),a=null;else{switch(Dp(c)){case 1:a=pu;break;case 4:a=jp;break;case 16:a=Yo;break;case 536870912:a=Rp;break;default:a=Yo}a=Qg(a,Vg.bind(null,n))}n.callbackPriority=r,n.callbackNode=a}}function Vg(n,r){if(Ha=-1,Ka=0,(be&6)!==0)throw Error(s(327));var a=n.callbackNode;if(Ws()&&n.callbackNode!==a)return null;var c=ea(n,n===rt?at:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||r)r=Wa(n,c);else{r=c;var h=be;be|=2;var y=Ug();(rt!==n||at!==r)&&(On=null,Ks=We()+500,Wr(n,r));do try{u2();break}catch(P){zg(n,P)}while(!0);Zu(),Va.current=y,be=h,Qe!==null?r=0:(rt=null,at=0,r=Ye)}if(r!==0){if(r===2&&(h=mu(n),h!==0&&(c=h,r=Fc(n,h))),r===1)throw a=io,Wr(n,0),hr(n,c),bt(n,We()),a;if(r===6)hr(n,c);else{if(h=n.current.alternate,(c&30)===0&&!a2(h)&&(r=Wa(n,c),r===2&&(y=mu(n),y!==0&&(c=y,r=Fc(n,y))),r===1))throw a=io,Wr(n,0),hr(n,c),bt(n,We()),a;switch(n.finishedWork=h,n.finishedLanes=c,r){case 0:case 1:throw Error(s(345));case 2:qr(n,Pt,On);break;case 3:if(hr(n,c),(c&130023424)===c&&(r=Ac+500-We(),10<r)){if(ea(n,0)!==0)break;if(h=n.suspendedLanes,(h&c)!==c){vt(),n.pingedLanes|=n.suspendedLanes&h;break}n.timeoutHandle=Uu(qr.bind(null,n,Pt,On),r);break}qr(n,Pt,On);break;case 4:if(hr(n,c),(c&4194240)===c)break;for(r=n.eventTimes,h=-1;0<c;){var w=31-Yt(c);y=1<<w,w=r[w],w>h&&(h=w),c&=~y}if(c=h,c=We()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*o2(c/1960))-c,10<c){n.timeoutHandle=Uu(qr.bind(null,n,Pt,On),c);break}qr(n,Pt,On);break;case 5:qr(n,Pt,On);break;default:throw Error(s(329))}}}return bt(n,We()),n.callbackNode===a?Vg.bind(null,n):null}function Fc(n,r){var a=oo;return n.current.memoizedState.isDehydrated&&(Wr(n,r).flags|=256),n=Wa(n,r),n!==2&&(r=Pt,Pt=a,r!==null&&_c(r)),n}function _c(n){Pt===null?Pt=n:Pt.push.apply(Pt,n)}function a2(n){for(var r=n;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var h=a[c],y=h.getSnapshot;h=h.value;try{if(!Xt(y(),h))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function hr(n,r){for(r&=~Dc,r&=~Ba,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var a=31-Yt(r),c=1<<a;n[a]=-1,r&=~c}}function Bg(n){if((be&6)!==0)throw Error(s(327));Ws();var r=ea(n,0);if((r&1)===0)return bt(n,We()),null;var a=Wa(n,r);if(n.tag!==0&&a===2){var c=mu(n);c!==0&&(r=c,a=Fc(n,c))}if(a===1)throw a=io,Wr(n,0),hr(n,r),bt(n,We()),a;if(a===6)throw Error(s(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,qr(n,Pt,On),bt(n,We()),null}function Oc(n,r){var a=be;be|=1;try{return n(r)}finally{be=a,be===0&&(Ks=We()+500,xa&&or())}}function Kr(n){dr!==null&&dr.tag===0&&(be&6)===0&&Ws();var r=be;be|=1;var a=Ut.transition,c=De;try{if(Ut.transition=null,De=1,n)return n()}finally{De=c,Ut.transition=a,be=r,(be&6)===0&&or()}}function Vc(){It=Hs.current,Oe(Hs)}function Wr(n,r){n.finishedWork=null,n.finishedLanes=0;var a=n.timeoutHandle;if(a!==-1&&(n.timeoutHandle=-1,_k(a)),Qe!==null)for(a=Qe.return;a!==null;){var c=a;switch(Qu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&ya();break;case 3:zs(),Oe(Et),Oe(dt),ac();break;case 5:ic(c);break;case 4:zs();break;case 13:Oe(Ue);break;case 19:Oe(Ue);break;case 10:ec(c.type._context);break;case 22:case 23:Vc()}a=a.return}if(rt=n,Qe=n=pr(n.current,null),at=It=r,Ye=0,io=null,Dc=Ba=Hr=0,Pt=oo=null,zr!==null){for(r=0;r<zr.length;r++)if(a=zr[r],c=a.interleaved,c!==null){a.interleaved=null;var h=c.next,y=a.pending;if(y!==null){var w=y.next;y.next=h,c.next=w}a.pending=c}zr=null}return n}function zg(n,r){do{var a=Qe;try{if(Zu(),ja.current=Aa,Ra){for(var c=$e.memoizedState;c!==null;){var h=c.queue;h!==null&&(h.pending=null),c=c.next}Ra=!1}if($r=0,nt=Ge=$e=null,Zi=!1,eo=0,Mc.current=null,a===null||a.return===null){Ye=1,io=r,Qe=null;break}e:{var y=n,w=a.return,P=a,A=r;if(r=at,P.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var H=A,Q=P,Y=Q.tag;if((Q.mode&1)===0&&(Y===0||Y===11||Y===15)){var q=Q.alternate;q?(Q.updateQueue=q.updateQueue,Q.memoizedState=q.memoizedState,Q.lanes=q.lanes):(Q.updateQueue=null,Q.memoizedState=null)}var re=fg(w);if(re!==null){re.flags&=-257,hg(re,w,P,y,r),re.mode&1&&dg(y,H,r),r=re,A=H;var ie=r.updateQueue;if(ie===null){var ae=new Set;ae.add(A),r.updateQueue=ae}else ie.add(A);break e}else{if((r&1)===0){dg(y,H,r),Bc();break e}A=Error(s(426))}}else if(Ve&&P.mode&1){var qe=fg(w);if(qe!==null){(qe.flags&65536)===0&&(qe.flags|=256),hg(qe,w,P,y,r),Xu(Us(A,P));break e}}y=A=Us(A,P),Ye!==4&&(Ye=2),oo===null?oo=[y]:oo.push(y),y=w;do{switch(y.tag){case 3:y.flags|=65536,r&=-r,y.lanes|=r;var z=ug(y,A,r);Fm(y,z);break e;case 1:P=A;var O=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(cr===null||!cr.has($)))){y.flags|=65536,r&=-r,y.lanes|=r;var Z=cg(y,P,r);Fm(y,Z);break e}}y=y.return}while(y!==null)}Hg(a)}catch(le){r=le,Qe===a&&a!==null&&(Qe=a=a.return);continue}break}while(!0)}function Ug(){var n=Va.current;return Va.current=Aa,n===null?Aa:n}function Bc(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),rt===null||(Hr&268435455)===0&&(Ba&268435455)===0||hr(rt,at)}function Wa(n,r){var a=be;be|=2;var c=Ug();(rt!==n||at!==r)&&(On=null,Wr(n,r));do try{l2();break}catch(h){zg(n,h)}while(!0);if(Zu(),be=a,Va.current=c,Qe!==null)throw Error(s(261));return rt=null,at=0,Ye}function l2(){for(;Qe!==null;)$g(Qe)}function u2(){for(;Qe!==null&&!LS();)$g(Qe)}function $g(n){var r=qg(n.alternate,n,It);n.memoizedProps=n.pendingProps,r===null?Hg(n):Qe=r,Mc.current=null}function Hg(n){var r=n;do{var a=r.alternate;if(n=r.return,(r.flags&32768)===0){if(a=t2(a,r,It),a!==null){Qe=a;return}}else{if(a=n2(a,r),a!==null){a.flags&=32767,Qe=a;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{Ye=6,Qe=null;return}}if(r=r.sibling,r!==null){Qe=r;return}Qe=r=n}while(r!==null);Ye===0&&(Ye=5)}function qr(n,r,a){var c=De,h=Ut.transition;try{Ut.transition=null,De=1,c2(n,r,a,c)}finally{Ut.transition=h,De=c}return null}function c2(n,r,a,c){do Ws();while(dr!==null);if((be&6)!==0)throw Error(s(327));a=n.finishedWork;var h=n.finishedLanes;if(a===null)return null;if(n.finishedWork=null,n.finishedLanes=0,a===n.current)throw Error(s(177));n.callbackNode=null,n.callbackPriority=0;var y=a.lanes|a.childLanes;if(HS(n,y),n===rt&&(Qe=rt=null,at=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Ua||(Ua=!0,Qg(Yo,function(){return Ws(),null})),y=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||y){y=Ut.transition,Ut.transition=null;var w=De;De=1;var P=be;be|=4,Mc.current=null,s2(n,a),Lg(a,n),Rk(Bu),ra=!!Vu,Bu=Vu=null,n.current=a,i2(a),IS(),be=P,De=w,Ut.transition=y}else n.current=a;if(Ua&&(Ua=!1,dr=n,$a=h),y=n.pendingLanes,y===0&&(cr=null),OS(a.stateNode),bt(n,We()),r!==null)for(c=n.onRecoverableError,a=0;a<r.length;a++)h=r[a],c(h.value,{componentStack:h.stack,digest:h.digest});if(za)throw za=!1,n=Lc,Lc=null,n;return($a&1)!==0&&n.tag!==0&&Ws(),y=n.pendingLanes,(y&1)!==0?n===Ic?ao++:(ao=0,Ic=n):ao=0,or(),null}function Ws(){if(dr!==null){var n=Dp($a),r=Ut.transition,a=De;try{if(Ut.transition=null,De=16>n?16:n,dr===null)var c=!1;else{if(n=dr,dr=null,$a=0,(be&6)!==0)throw Error(s(331));var h=be;for(be|=4,se=n.current;se!==null;){var y=se,w=y.child;if((se.flags&16)!==0){var P=y.deletions;if(P!==null){for(var A=0;A<P.length;A++){var H=P[A];for(se=H;se!==null;){var Q=se;switch(Q.tag){case 0:case 11:case 15:so(8,Q,y)}var Y=Q.child;if(Y!==null)Y.return=Q,se=Y;else for(;se!==null;){Q=se;var q=Q.sibling,re=Q.return;if(jg(Q),Q===H){se=null;break}if(q!==null){q.return=re,se=q;break}se=re}}}var ie=y.alternate;if(ie!==null){var ae=ie.child;if(ae!==null){ie.child=null;do{var qe=ae.sibling;ae.sibling=null,ae=qe}while(ae!==null)}}se=y}}if((y.subtreeFlags&2064)!==0&&w!==null)w.return=y,se=w;else e:for(;se!==null;){if(y=se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:so(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,se=z;break e}se=y.return}}var O=n.current;for(se=O;se!==null;){w=se;var $=w.child;if((w.subtreeFlags&2064)!==0&&$!==null)$.return=w,se=$;else e:for(w=O;se!==null;){if(P=se,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Oa(9,P)}}catch(le){Ke(P,P.return,le)}if(P===w){se=null;break e}var Z=P.sibling;if(Z!==null){Z.return=P.return,se=Z;break e}se=P.return}}if(be=h,or(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(Xo,n)}catch{}c=!0}return c}finally{De=a,Ut.transition=r}}return!1}function Kg(n,r,a){r=Us(a,r),r=ug(n,r,1),n=lr(n,r,1),r=vt(),n!==null&&(Mi(n,1,r),bt(n,r))}function Ke(n,r,a){if(n.tag===3)Kg(n,n,a);else for(;r!==null;){if(r.tag===3){Kg(r,n,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(cr===null||!cr.has(c))){n=Us(a,n),n=cg(r,n,1),r=lr(r,n,1),n=vt(),r!==null&&(Mi(r,1,n),bt(r,n));break}}r=r.return}}function d2(n,r,a){var c=n.pingCache;c!==null&&c.delete(r),r=vt(),n.pingedLanes|=n.suspendedLanes&a,rt===n&&(at&a)===a&&(Ye===4||Ye===3&&(at&130023424)===at&&500>We()-Ac?Wr(n,0):Dc|=a),bt(n,r)}function Wg(n,r){r===0&&((n.mode&1)===0?r=1:(r=Zo,Zo<<=1,(Zo&130023424)===0&&(Zo=4194304)));var a=vt();n=In(n,r),n!==null&&(Mi(n,r,a),bt(n,a))}function f2(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),Wg(n,a)}function h2(n,r){var a=0;switch(n.tag){case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(a=h.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(s(314))}c!==null&&c.delete(r),Wg(n,a)}var qg;qg=function(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps||Et.current)Nt=!0;else{if((n.lanes&a)===0&&(r.flags&128)===0)return Nt=!1,e2(n,r,a);Nt=(n.flags&131072)!==0}else Nt=!1,Ve&&(r.flags&1048576)!==0&&Nm(r,Sa,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;Fa(n,r),n=r.pendingProps;var h=Ls(r,dt.current);Bs(r,a),h=cc(null,r,c,n,h,a);var y=dc();return r.flags|=1,typeof h=="object"&&h!==null&&typeof h.render=="function"&&h.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Tt(c)?(y=!0,va(r)):y=!1,r.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,rc(r),h.updater=La,r.stateNode=h,h._reactInternals=r,yc(r,c,n,a),r=Sc(null,r,c,!0,y,a)):(r.tag=0,Ve&&y&&qu(r),yt(null,r,h,a),r=r.child),r;case 16:c=r.elementType;e:{switch(Fa(n,r),n=r.pendingProps,h=c._init,c=h(c._payload),r.type=c,h=r.tag=m2(c),n=Zt(c,n),h){case 0:r=wc(null,r,c,n,a);break e;case 1:r=xg(null,r,c,n,a);break e;case 11:r=pg(null,r,c,n,a);break e;case 14:r=mg(null,r,c,Zt(c.type,n),a);break e}throw Error(s(306,c,""))}return r;case 0:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:Zt(c,h),wc(n,r,c,h,a);case 1:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:Zt(c,h),xg(n,r,c,h,a);case 3:e:{if(wg(r),n===null)throw Error(s(387));c=r.pendingProps,y=r.memoizedState,h=y.element,Im(n,r),Pa(r,c,null,a);var w=r.memoizedState;if(c=w.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){h=Us(Error(s(423)),r),r=Sg(n,r,c,a,h);break e}else if(c!==h){h=Us(Error(s(424)),r),r=Sg(n,r,c,a,h);break e}else for(Lt=rr(r.stateNode.containerInfo.firstChild),At=r,Ve=!0,Jt=null,a=Am(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(_s(),c===h){r=_n(n,r,a);break e}yt(n,r,c,a)}r=r.child}return r;case 5:return Om(r),n===null&&Yu(r),c=r.type,h=r.pendingProps,y=n!==null?n.memoizedProps:null,w=h.children,zu(c,h)?w=null:y!==null&&zu(c,y)&&(r.flags|=32),vg(n,r),yt(n,r,w,a),r.child;case 6:return n===null&&Yu(r),null;case 13:return kg(n,r,a);case 4:return sc(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=Os(r,null,c,a):yt(n,r,c,a),r.child;case 11:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:Zt(c,h),pg(n,r,c,h,a);case 7:return yt(n,r,r.pendingProps,a),r.child;case 8:return yt(n,r,r.pendingProps.children,a),r.child;case 12:return yt(n,r,r.pendingProps.children,a),r.child;case 10:e:{if(c=r.type._context,h=r.pendingProps,y=r.memoizedProps,w=h.value,Fe(Ea,c._currentValue),c._currentValue=w,y!==null)if(Xt(y.value,w)){if(y.children===h.children&&!Et.current){r=_n(n,r,a);break e}}else for(y=r.child,y!==null&&(y.return=r);y!==null;){var P=y.dependencies;if(P!==null){w=y.child;for(var A=P.firstContext;A!==null;){if(A.context===c){if(y.tag===1){A=Fn(-1,a&-a),A.tag=2;var H=y.updateQueue;if(H!==null){H=H.shared;var Q=H.pending;Q===null?A.next=A:(A.next=Q.next,Q.next=A),H.pending=A}}y.lanes|=a,A=y.alternate,A!==null&&(A.lanes|=a),tc(y.return,a,r),P.lanes|=a;break}A=A.next}}else if(y.tag===10)w=y.type===r.type?null:y.child;else if(y.tag===18){if(w=y.return,w===null)throw Error(s(341));w.lanes|=a,P=w.alternate,P!==null&&(P.lanes|=a),tc(w,a,r),w=y.sibling}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===r){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}yt(n,r,h.children,a),r=r.child}return r;case 9:return h=r.type,c=r.pendingProps.children,Bs(r,a),h=Bt(h),c=c(h),r.flags|=1,yt(n,r,c,a),r.child;case 14:return c=r.type,h=Zt(c,r.pendingProps),h=Zt(c.type,h),mg(n,r,c,h,a);case 15:return gg(n,r,r.type,r.pendingProps,a);case 17:return c=r.type,h=r.pendingProps,h=r.elementType===c?h:Zt(c,h),Fa(n,r),r.tag=1,Tt(c)?(n=!0,va(r)):n=!1,Bs(r,a),ag(r,c,h),yc(r,c,h,a),Sc(null,r,c,!0,n,a);case 19:return Eg(n,r,a);case 22:return yg(n,r,a)}throw Error(s(156,r.tag))};function Qg(n,r){return Pp(n,r)}function p2(n,r,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(n,r,a,c){return new p2(n,r,a,c)}function zc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function m2(n){if(typeof n=="function")return zc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===K)return 11;if(n===ge)return 14}return 2}function pr(n,r){var a=n.alternate;return a===null?(a=$t(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function qa(n,r,a,c,h,y){var w=2;if(c=n,typeof n=="function")zc(n)&&(w=1);else if(typeof n=="string")w=5;else e:switch(n){case j:return Qr(a.children,h,y,r);case D:w=8,h|=8;break;case B:return n=$t(12,a,r,h|2),n.elementType=B,n.lanes=y,n;case U:return n=$t(13,a,r,h),n.elementType=U,n.lanes=y,n;case X:return n=$t(19,a,r,h),n.elementType=X,n.lanes=y,n;case Te:return Qa(a,h,y,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case W:w=10;break e;case G:w=9;break e;case K:w=11;break e;case ge:w=14;break e;case me:w=16,c=null;break e}throw Error(s(130,n==null?n:typeof n,""))}return r=$t(w,a,r,h),r.elementType=n,r.type=c,r.lanes=y,r}function Qr(n,r,a,c){return n=$t(7,n,c,r),n.lanes=a,n}function Qa(n,r,a,c){return n=$t(22,n,c,r),n.elementType=Te,n.lanes=a,n.stateNode={isHidden:!1},n}function Uc(n,r,a){return n=$t(6,n,null,r),n.lanes=a,n}function $c(n,r,a){return r=$t(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function g2(n,r,a,c,h){this.tag=r,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gu(0),this.expirationTimes=gu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gu(0),this.identifierPrefix=c,this.onRecoverableError=h,this.mutableSourceEagerHydrationData=null}function Hc(n,r,a,c,h,y,w,P,A){return n=new g2(n,r,a,P,A),r===1?(r=1,y===!0&&(r|=8)):r=0,y=$t(3,null,null,r),n.current=y,y.stateNode=n,y.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},rc(y),n}function y2(n,r,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:c==null?null:""+c,children:n,containerInfo:r,implementation:a}}function Gg(n){if(!n)return ir;n=n._reactInternals;e:{if(Fr(n)!==n||n.tag!==1)throw Error(s(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Tt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(s(171))}if(n.tag===1){var a=n.type;if(Tt(a))return Cm(n,a,r)}return r}function Yg(n,r,a,c,h,y,w,P,A){return n=Hc(a,c,!0,n,h,y,w,P,A),n.context=Gg(null),a=n.current,c=vt(),h=fr(a),y=Fn(c,h),y.callback=r??null,lr(a,y,h),n.current.lanes=h,Mi(n,h,c),bt(n,c),n}function Ga(n,r,a,c){var h=r.current,y=vt(),w=fr(h);return a=Gg(a),r.context===null?r.context=a:r.pendingContext=a,r=Fn(y,w),r.payload={element:n},c=c===void 0?null:c,c!==null&&(r.callback=c),n=lr(h,r,w),n!==null&&(nn(n,h,w,y),Na(n,h,w)),w}function Ya(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Xg(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function Kc(n,r){Xg(n,r),(n=n.alternate)&&Xg(n,r)}function v2(){return null}var Jg=typeof reportError=="function"?reportError:function(n){console.error(n)};function Wc(n){this._internalRoot=n}Xa.prototype.render=Wc.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));Ga(n,r,null,null)},Xa.prototype.unmount=Wc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Kr(function(){Ga(null,n,null,null)}),r[Mn]=null}};function Xa(n){this._internalRoot=n}Xa.prototype.unstable_scheduleHydration=function(n){if(n){var r=Ip();n={blockedOn:null,target:n,priority:r};for(var a=0;a<er.length&&r!==0&&r<er[a].priority;a++);er.splice(a,0,n),a===0&&Op(n)}};function qc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Ja(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Zg(){}function x2(n,r,a,c,h){if(h){if(typeof c=="function"){var y=c;c=function(){var H=Ya(w);y.call(H)}}var w=Yg(r,c,n,0,null,!1,!1,"",Zg);return n._reactRootContainer=w,n[Mn]=w.current,Ki(n.nodeType===8?n.parentNode:n),Kr(),w}for(;h=n.lastChild;)n.removeChild(h);if(typeof c=="function"){var P=c;c=function(){var H=Ya(A);P.call(H)}}var A=Hc(n,0,!1,null,null,!1,!1,"",Zg);return n._reactRootContainer=A,n[Mn]=A.current,Ki(n.nodeType===8?n.parentNode:n),Kr(function(){Ga(r,A,a,c)}),A}function Za(n,r,a,c,h){var y=a._reactRootContainer;if(y){var w=y;if(typeof h=="function"){var P=h;h=function(){var A=Ya(w);P.call(A)}}Ga(r,w,n,h)}else w=x2(a,r,n,h,c);return Ya(w)}Ap=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var a=Ri(r.pendingLanes);a!==0&&(yu(r,a|1),bt(r,We()),(be&6)===0&&(Ks=We()+500,or()))}break;case 13:Kr(function(){var c=In(n,1);if(c!==null){var h=vt();nn(c,n,1,h)}}),Kc(n,1)}},vu=function(n){if(n.tag===13){var r=In(n,134217728);if(r!==null){var a=vt();nn(r,n,134217728,a)}Kc(n,134217728)}},Lp=function(n){if(n.tag===13){var r=fr(n),a=In(n,r);if(a!==null){var c=vt();nn(a,n,r,c)}Kc(n,r)}},Ip=function(){return De},Fp=function(n,r){var a=De;try{return De=n,r()}finally{De=a}},cu=function(n,r,a){switch(r){case"input":if(nu(n,a),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==n&&c.form===n.form){var h=ga(c);if(!h)throw Error(s(90));op(c),nu(c,h)}}}break;case"textarea":dp(n,a);break;case"select":r=a.value,r!=null&&ks(n,!!a.multiple,r,!1)}},wp=Oc,Sp=Kr;var w2={usingClientEntryPoint:!1,Events:[Qi,Ds,ga,vp,xp,Oc]},lo={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S2={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Tp(n),n===null?null:n.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||v2,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 el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{Xo=el.inject(S2),gn=el}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=w2,jt.createPortal=function(n,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qc(r))throw Error(s(200));return y2(n,r,null,a)},jt.createRoot=function(n,r){if(!qc(n))throw Error(s(299));var a=!1,c="",h=Jg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(h=r.onRecoverableError)),r=Hc(n,1,!1,null,null,a,!1,c,h),n[Mn]=r.current,Ki(n.nodeType===8?n.parentNode:n),new Wc(r)},jt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=Tp(r),n=n===null?null:n.stateNode,n},jt.flushSync=function(n){return Kr(n)},jt.hydrate=function(n,r,a){if(!Ja(r))throw Error(s(200));return Za(null,n,r,!0,a)},jt.hydrateRoot=function(n,r,a){if(!qc(n))throw Error(s(405));var c=a!=null&&a.hydratedSources||null,h=!1,y="",w=Jg;if(a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(y=a.identifierPrefix),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),r=Yg(r,null,n,1,a??null,h,!1,y,w),n[Mn]=r.current,Ki(n),c)for(n=0;n<c.length;n++)a=c[n],h=a._getVersion,h=h(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,h]:r.mutableSourceEagerHydrationData.push(a,h);return new Xa(r)},jt.render=function(n,r,a){if(!Ja(r))throw Error(s(200));return Za(null,n,r,!1,a)},jt.unmountComponentAtNode=function(n){if(!Ja(n))throw Error(s(40));return n._reactRootContainer?(Kr(function(){Za(null,null,n,!1,function(){n._reactRootContainer=null,n[Mn]=null})}),!0):!1},jt.unstable_batchedUpdates=Oc,jt.unstable_renderSubtreeIntoContainer=function(n,r,a,c){if(!Ja(a))throw Error(s(200));if(n==null||n._reactInternals===void 0)throw Error(s(38));return Za(n,r,a,!1,c)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var gy;function vC(){if(gy)return Jc.exports;gy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Jc.exports=yC(),Jc.exports}var yy;function xC(){if(yy)return rl;yy=1;var e=vC();return rl.createRoot=e.createRoot,rl.hydrateRoot=e.hydrateRoot,rl}var wC=xC();/**
|
|
41
|
+
* react-router v7.18.4
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var Gf=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ax=/^[\\/]{2}/;function SC(e,t){return t+e.replace(/\\/g,"/")}var vy="popstate";function xy(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function kC(e={}){function t(i,o){var m;let l=(m=o.state)==null?void 0:m.masked,{pathname:u,search:d,hash:p}=l||i.location;return ff("",{pathname:u,search:d,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",l?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function s(i,o){return typeof o=="string"?o:ms(o)}return EC(t,s,null,e)}function ze(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function CC(){return Math.random().toString(36).substring(2,10)}function wy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ff(e,t,s=null,i,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?gi(t):t,state:s,key:t&&t.key||i||CC(),mask:o}}function ms({pathname:e="/",search:t="",hash:s=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function gi(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function EC(e,t,s,i={}){let{window:o=document.defaultView,v5Compat:l=!1}=i,u=o.history,d="POP",p=null,m=g();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function g(){return(u.state||{idx:null}).idx}function v(){d="POP";let E=g(),N=E==null?null:E-m;m=E,p&&p({action:d,location:T.location,delta:N})}function x(E,N){d="PUSH";let L=xy(E)?E:ff(T.location,E,N);m=g()+1;let b=wy(L,m),M=T.createHref(L.mask||L);try{u.pushState(b,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(M)}l&&p&&p({action:d,location:T.location,delta:1})}function C(E,N){d="REPLACE";let L=xy(E)?E:ff(T.location,E,N);m=g();let b=wy(L,m),M=T.createHref(L.mask||L);u.replaceState(b,"",M),l&&p&&p({action:d,location:T.location,delta:0})}function k(E){return TC(o,E)}let T={get action(){return d},get location(){return e(o,u)},listen(E){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(vy,v),p=E,()=>{o.removeEventListener(vy,v),p=null}},createHref(E){return t(o,E)},createURL:k,encodeLocation(E){let N=k(E);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:x,replace:C,go(E){return u.go(E)}};return T}function TC(e,t,s=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),ze(i,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:ms(t);return o=o.replace(/ $/,"%20"),!s&&ax.test(o)&&(o=i+o),new URL(o,i)}function lx(e,t,s="/"){return NC(e,t,s,!1)}function NC(e,t,s,i,o){let l=typeof t=="string"?gi(t):t,u=qn(l.pathname||"/",s);if(u==null)return null;let d=PC(e),p=null,m=OC(u);for(let g=0;p==null&&g<d.length;++g)p=_C(d[g],m,i);return p}function PC(e){let t=ux(e);return bC(t),t}function ux(e,t=[],s=[],i="",o=!1){let l=(u,d,p=o,m)=>{let g={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&p)return;ze(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let v=cn([i,g.relativePath]),x=s.concat(g);u.children&&u.children.length>0&&(ze(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),ux(u.children,t,x,v,p)),!(u.path==null&&!u.index)&&t.push({path:v,score:IC(v,u.index),routesMeta:x.map((C,k)=>{let[T,E]=fx(C.relativePath,C.caseSensitive,k===x.length-1);return{...C,matcher:T,compiledParams:E}})})};return e.forEach((u,d)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))l(u,d);else for(let m of cx(u.path))l(u,d,!0,m)}),t}function cx(e){let t=e.split("/");if(t.length===0)return[];let[s,...i]=t,o=s.endsWith("?"),l=s.replace(/\?$/,"");if(i.length===0)return o?[l,""]:[l];let u=cx(i.join("/")),d=[];return d.push(...u.map(p=>p===""?l:[l,p].join("/"))),o&&d.push(...u),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function bC(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:FC(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var jC=/^:[\w-]+$/,RC=3,MC=2,DC=1,AC=10,LC=-2,Sy=e=>e==="*";function IC(e,t){let s=e.split("/"),i=s.length;return s.some(Sy)&&(i+=LC),t&&(i+=MC),s.filter(o=>!Sy(o)).reduce((o,l)=>o+(jC.test(l)?RC:l===""?DC:AC),i)}function FC(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function _C(e,t,s=!1){let{routesMeta:i}=e,o={},l="/",u=[];for(let d=0;d<i.length;++d){let p=i[d],m=d===i.length-1,g=l==="/"?t:t.slice(l.length)||"/",v={path:p.relativePath,caseSensitive:p.caseSensitive,end:m},x=p.matcher&&p.compiledParams?dx(v,g,p.matcher,p.compiledParams):Nl(v,g),C=p.route;if(!x&&m&&s&&!i[i.length-1].route.index&&(x=Nl({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(o,x.params),u.push({params:o,pathname:cn([l,x.pathname]),pathnameBase:zC(cn([l,x.pathnameBase])),route:C}),x.pathnameBase!=="/"&&(l=cn([l,x.pathnameBase]))}return u}function Nl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=fx(e.path,e.caseSensitive,e.end);return dx(e,t,s,i)}function dx(e,t,s,i){let o=t.match(s);if(!o)return null;let l=o[0],u=hi(l,1),d=o.slice(1);return{params:i.reduce((m,{paramName:g,isOptional:v},x)=>{if(g==="*"){let k=d[x]||"";u=hi(l.slice(0,l.length-k.length),1)}const C=d[x];return v&&!C?m[g]=void 0:m[g]=(C||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function fx(e,t=!1,s=!0){qt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,p,m,g)=>{if(i.push({paramName:d,isOptional:p!=null}),p){let v=g.charAt(m+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function OC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function qn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}function VC(e,t="/"){let{pathname:s,search:i="",hash:o=""}=typeof e=="string"?gi(e):e,l;return s?(s=hx(s),s.startsWith("/")||s.startsWith("\\")?l=ky(s.substring(1),"/"):l=ky(s,t)):l=t,{pathname:l,search:UC(i),hash:$C(o)}}function ky(e,t){let s=hi(t).split("/");return e.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function td(e,t,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function BC(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function Yf(e){let t=BC(e);return t.map((s,i)=>i===t.length-1?s.pathname:s.pathnameBase)}function zl(e,t,s,i=!1){let o;typeof e=="string"?o=gi(e):(o={...e},ze(!o.pathname||!o.pathname.includes("?"),td("?","pathname","search",o)),ze(!o.pathname||!o.pathname.includes("#"),td("#","pathname","hash",o)),ze(!o.search||!o.search.includes("#"),td("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=s;else{let v=t.length-1;if(!i&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),v-=1;o.pathname=x.join("/")}d=v>=0?t[v]:"/"}let p=VC(o,d),m=u&&u!=="/"&&u.endsWith("/"),g=(l||u===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}var hx=e=>e.replace(/[\\/]{2,}/g,"/"),cn=e=>hx(e.join("/"));function hi(e,t=0){let s=e.length;for(;s>t&&e.charCodeAt(s-1)===47;)s--;return s===e.length?e:e.slice(0,s)}var zC=e=>hi(e).replace(/^\/*/,"/"),UC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$C=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,HC=class{constructor(e,t,s,i=!1){this.status=e,this.statusText=t||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function KC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function WC(e){let t=e.map(s=>s.route.path).filter(Boolean);return cn(t)||"/"}var px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function mx(e,t){let s=e;if(typeof s!="string"||!Gf.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,o=!1;if(px)try{let l=new URL(window.location.href),u=ax.test(s)?new URL(SC(s,l.protocol)):new URL(s),d=qn(u.pathname,t);u.origin===l.origin&&d!=null?s=d+u.search+u.hash:o=!0}catch{qt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Cy=new URL("http://localhost");function Xf(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Cy)}catch{return Cy}}function nd(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function qC(e,t){if(e.startsWith("//"))return!0;let s=t.protocol.toLowerCase();return e.toLowerCase().startsWith(s)?t.host===""||e.slice(s.length).startsWith("//"):!1}function Jf(e,t,s,i){let o=null;try{o=e==null?null:new URL(e,s)}catch{}let l=new URL(t,s),u=o!=null&&!nd(o,s),d=!nd(l,s);if(i==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!qC(e,o)||!nd(o,l)))throw new Error("External navigation is not allowed")}var gx=["POST","PUT","PATCH","DELETE"];new Set(gx);var QC=["GET",...gx];new Set(QC);var GC=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function YC(e){try{return GC.includes(new URL(e).protocol)}catch{return!1}}var yi=S.createContext(null);yi.displayName="DataRouter";var Ul=S.createContext(null);Ul.displayName="DataRouterState";var yx=S.createContext(!1);function XC(){return S.useContext(yx)}var vx=S.createContext({isTransitioning:!1});vx.displayName="ViewTransition";var JC=S.createContext(new Map);JC.displayName="Fetchers";var ZC=S.createContext(null);ZC.displayName="Await";var _t=S.createContext(null);_t.displayName="Navigation";var _o=S.createContext(null);_o.displayName="Location";var hn=S.createContext({outlet:null,matches:[],isDataRoute:!1});hn.displayName="Route";var Zf=S.createContext(null);Zf.displayName="RouteError";var xx="REACT_ROUTER_ERROR",eE="REDIRECT",tE="ROUTE_ERROR_RESPONSE";function nE(e){if(e.startsWith(`${xx}:${eE}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function rE(e){if(e.startsWith(`${xx}:${tE}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new HC(t.status,t.statusText,t.data)}catch{}}function sE(e,{relative:t}={}){ze(vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(_t),{hash:o,pathname:l,search:u}=Oo(e,{relative:t}),d=l;return s!=="/"&&(d=l==="/"?s:cn([s,l])),i.createHref({pathname:d,search:u,hash:o})}function vi(){return S.useContext(_o)!=null}function pn(){return ze(vi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(_o).location}var wx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Sx(e){S.useContext(_t).static||S.useLayoutEffect(e)}function xi(){let{isDataRoute:e}=S.useContext(hn);return e?xE():iE()}function iE(){ze(vi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(yi),{basename:t,navigator:s}=S.useContext(_t),{matches:i}=S.useContext(hn),{pathname:o}=pn(),l=JSON.stringify(Yf(i)),u=S.useRef(!1);return Sx(()=>{u.current=!0}),S.useCallback((p,m={})=>{if(qt(u.current,wx),!u.current)return;if(typeof p=="number"){s.go(p);return}let g=zl(p,JSON.parse(l),o,m.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:cn([t,g.pathname])),Jf(typeof p=="string"?p:ms(p),s.createHref(g),Xf(s),"reject"),(m.replace?s.replace:s.push)(g,m.state,m)},[t,s,l,o,e])}var oE=S.createContext(null);function aE(e){let t=S.useContext(hn).outlet;return S.useMemo(()=>t&&S.createElement(oE.Provider,{value:e},t),[t,e])}function Oo(e,{relative:t}={}){let{matches:s}=S.useContext(hn),{pathname:i}=pn(),o=JSON.stringify(Yf(s));return S.useMemo(()=>zl(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function lE(e,t){return kx(e,t)}function kx(e,t,s){var E;ze(vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(_t),{matches:o}=S.useContext(hn),l=o[o.length-1],u=l?l.params:{},d=l?l.pathname:"/",p=l?l.pathnameBase:"/",m=l&&l.route;{let N=m&&m.path||"";Ex(d,!m||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=pn(),v;if(t){let N=typeof t=="string"?gi(t):t;ze(p==="/"||((E=N.pathname)==null?void 0:E.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${N.pathname}" was given in the \`location\` prop.`),v=N}else v=g;let x=v.pathname||"/",C=x;if(p!=="/"){let N=p.replace(/^\//,"").split("/");C="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let k=s&&s.state.matches.length?s.state.matches.map(N=>Object.assign(N,{route:s.manifest[N.route.id]||N.route})):lx(e,{pathname:C});qt(m||k!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qt(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=hE(k&&k.map(N=>Object.assign({},N,{params:Object.assign({},u,N.params),pathname:cn([p,i.encodeLocation?i.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?p:cn([p,i.encodeLocation?i.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),o,s);return t&&T?S.createElement(_o.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},T):T}function uE(){let e=vE(),t=KC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:l},"ErrorBoundary")," or"," ",S.createElement("code",{style:l},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),s?S.createElement("pre",{style:o},s):null,u)}var cE=S.createElement(uE,null),Cx=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=rE(e.digest);s&&(e=s)}let t=e!==void 0?S.createElement(hn.Provider,{value:this.props.routeContext},S.createElement(Zf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(dE,{error:e},t):t}};Cx.contextType=yx;var rd=new WeakMap;function dE({children:e,error:t}){let{basename:s,navigator:i}=S.useContext(_t);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=nE(t.digest);if(o){let l=rd.get(t);if(l)throw l;let u=mx(o.location,s),d=u.absoluteURL||u.to;if(Jf(o.location,d,Xf(i),"allow-explicit"),YC(d))throw new Error("Invalid redirect location");if(px&&!rd.get(t))if(u.isExternal||o.reloadDocument)window.location.href=d;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw rd.set(t,p),p}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function fE({routeContext:e,match:t,children:s}){let i=S.useContext(yi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(hn.Provider,{value:e},s)}function hE(e,t=[],s){let i=s==null?void 0:s.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,l=i==null?void 0:i.errors;if(l!=null){let g=o.findIndex(v=>v.route.id&&(l==null?void 0:l[v.route.id])!==void 0);ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let u=!1,d=-1;if(s&&i){u=i.renderFallback;for(let g=0;g<o.length;g++){let v=o[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=g),v.route.id){let{loaderData:x,errors:C}=i,k=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!C||C[v.route.id]===void 0);if(v.route.lazy||k){s.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let p=s==null?void 0:s.onError,m=i&&p?(g,v)=>{var x,C;p(g,{location:i.location,params:((C=(x=i.matches)==null?void 0:x[0])==null?void 0:C.params)??{},pattern:WC(i.matches),errorInfo:v})}:void 0;return o.reduceRight((g,v,x)=>{let C,k=!1,T=null,E=null;i&&(C=l&&v.route.id?l[v.route.id]:void 0,T=v.route.errorElement||cE,u&&(d<0&&x===0?(Ex("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,E=null):d===x&&(k=!0,E=v.route.hydrateFallbackElement||null)));let N=t.concat(o.slice(0,x+1)),L=()=>{let b;return C?b=T:k?b=E:v.route.Component?b=S.createElement(v.route.Component,null):v.route.element?b=v.route.element:b=g,S.createElement(fE,{match:v,routeContext:{outlet:g,matches:N,isDataRoute:i!=null},children:b})};return i&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?S.createElement(Cx,{location:i.location,revalidation:i.revalidation,component:T,error:C,children:L(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:m}):L()},null)}function eh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pE(e){let t=S.useContext(yi);return ze(t,eh(e)),t}function mE(e){let t=S.useContext(Ul);return ze(t,eh(e)),t}function gE(e){let t=S.useContext(hn);return ze(t,eh(e)),t}function th(e){let t=gE(e),s=t.matches[t.matches.length-1];return ze(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function yE(){return th("useRouteId")}function vE(){var i;let e=S.useContext(Zf),t=mE("useRouteError"),s=th("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[s]}function xE(){let{router:e}=pE("useNavigate"),t=th("useNavigate"),s=S.useRef(!1);return Sx(()=>{s.current=!0}),S.useCallback(async(o,l={})=>{qt(s.current,wx),s.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var Ey={};function Ex(e,t,s){!t&&!Ey[e]&&(Ey[e]=!0,qt(!1,s))}S.memo(wE);function wE({routes:e,manifest:t,future:s,state:i,isStatic:o,onError:l}){return kx(e,void 0,{manifest:t,state:i,isStatic:o,onError:l})}function nh({to:e,replace:t,state:s,relative:i}){ze(vi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:l}=S.useContext(_t);qt(!o,"<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:u}=S.useContext(hn),{pathname:d}=pn(),p=xi(),m=zl(e,Yf(u),d,i==="path");Jf(typeof e=="string"?e:ms(e),l.createHref(m),Xf(l),"reject");let g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:t,state:s,relative:i})},[p,g,i,t,s]),null}function SE(e){return aE(e.context)}function kn(e){ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function kE({basename:e="/",children:t=null,location:s,navigationType:i="POP",navigator:o,static:l=!1,useTransitions:u}){ze(!vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:d,navigator:o,static:l,useTransitions:u,future:{}}),[d,o,l,u]);typeof s=="string"&&(s=gi(s));let{pathname:m="/",search:g="",hash:v="",state:x=null,key:C="default",mask:k}=s,T=S.useMemo(()=>{let E=qn(m,d);return E==null?null:{location:{pathname:E,search:g,hash:v,state:x,key:C,mask:k},navigationType:i}},[d,m,g,v,x,C,i,k]);return qt(T!=null,`<Router basename="${d}"> is not able to match the URL "${m}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:S.createElement(_t.Provider,{value:p},S.createElement(_o.Provider,{children:t,value:T}))}function CE({children:e,location:t}){return lE(hf(e),t)}function hf(e,t=[]){let s=[];return S.Children.forEach(e,(i,o)=>{if(!S.isValidElement(i))return;let l=[...t,o];if(i.type===S.Fragment){s.push.apply(s,hf(i.props.children,l));return}ze(i.type===kn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ze(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=hf(i.props.children,l)),s.push(u)}),s}var ml="get",gl="application/x-www-form-urlencoded";function $l(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function EE(e){return $l(e)&&e.tagName.toLowerCase()==="button"}function TE(e){return $l(e)&&e.tagName.toLowerCase()==="form"}function NE(e){return $l(e)&&e.tagName.toLowerCase()==="input"}function PE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bE(e,t){return e.button===0&&(!t||t==="_self")&&!PE(e)}function pf(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,s)=>{let i=e[s];return t.concat(Array.isArray(i)?i.map(o=>[s,o]):[[s,i]])},[]))}function jE(e,t){let s=pf(e);return t&&t.forEach((i,o)=>{s.has(o)||t.getAll(o).forEach(l=>{s.append(o,l)})}),s}var sl=null;function RE(){if(sl===null)try{new FormData(document.createElement("form"),0),sl=!1}catch{sl=!0}return sl}var ME=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sd(e){return e!=null&&!ME.has(e)?(qt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gl}"`),null):e}function DE(e,t){let s,i,o,l,u;if(TE(e)){let d=e.getAttribute("action");i=d?qn(d,t):null,s=e.getAttribute("method")||ml,o=sd(e.getAttribute("enctype"))||gl,l=new FormData(e)}else if(EE(e)||NE(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(i=p?qn(p,t):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||ml,o=sd(e.getAttribute("formenctype"))||sd(d.getAttribute("enctype"))||gl,l=new FormData(d,e),!RE()){let{name:m,type:g,value:v}=e;if(g==="image"){let x=m?`${m}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else m&&l.append(m,v)}}else{if($l(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=ml,i=null,o=gl,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:i,method:s.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rh(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tx(e,t,s,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&qn(o.pathname,t)==="/"?o.pathname=`${hi(t)}/_root.${i}`:o.pathname=`${hi(o.pathname)}.${i}`,o}async function AE(e,t){if(e.id in t)return t[e.id];try{let s=await import(e.module);return t[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function LE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function IE(e,t,s){let i=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await AE(l,s);return u.links?u.links():[]}return[]}));return VE(i.flat(1).filter(LE).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ty(e,t,s,i,o,l){let u=(p,m)=>s[m]?p.route.id!==s[m].route.id:!0,d=(p,m)=>{var g;return s[m].pathname!==p.pathname||((g=s[m].route.path)==null?void 0:g.endsWith("*"))&&s[m].params["*"]!==p.params["*"]};return l==="assets"?t.filter((p,m)=>u(p,m)||d(p,m)):l==="data"?t.filter((p,m)=>{var v;let g=i.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(u(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=s[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function FE(e,t,{includeHydrateFallback:s}={}){return _E(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),s&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function _E(e){return[...new Set(e)]}function OE(e){let t={},s=Object.keys(e).sort();for(let i of s)t[i]=e[i];return t}function VE(e,t){let s=new Set;return new Set(t),e.reduce((i,o)=>{let l=JSON.stringify(OE(o));return s.has(l)||(s.add(l),i.push({key:l,link:o})),i},[])}function sh(){let e=S.useContext(yi);return rh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function BE(){let e=S.useContext(Ul);return rh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ih=S.createContext(void 0);ih.displayName="FrameworkContext";function Hl(){let e=S.useContext(ih);return rh(e,"You must render this element inside a <HydratedRouter> element"),e}function zE(e,t){let s=S.useContext(ih),[i,o]=S.useState(!1),[l,u]=S.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:g,onTouchStart:v}=t,x=S.useRef(null);S.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let T=N=>{N.forEach(L=>{u(L.isIntersecting)})},E=new IntersectionObserver(T,{threshold:.5});return x.current&&E.observe(x.current),()=>{E.disconnect()}}},[e]),S.useEffect(()=>{if(i){let T=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(T)}}},[i]);let C=()=>{o(!0)},k=()=>{o(!1),u(!1)};return s?e!=="intent"?[l,x,{}]:[l,x,{onFocus:co(d,C),onBlur:co(p,k),onMouseEnter:co(m,C),onMouseLeave:co(g,k),onTouchStart:co(v,C)}]:[!1,x,{}]}function co(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function UE({page:e,...t}){let s=XC(),{nonce:i}=Hl(),{router:o}=sh(),l=S.useMemo(()=>lx(o.routes,e,o.basename),[o.routes,e,o.basename]);return l?(t.nonce==null&&i&&(t={...t,nonce:i}),s?S.createElement(HE,{page:e,matches:l,...t}):S.createElement(KE,{page:e,matches:l,...t})):null}function $E(e){let{manifest:t,routeModules:s}=Hl(),[i,o]=S.useState([]);return S.useEffect(()=>{let l=!1;return IE(e,t,s).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,s]),i}function HE({page:e,matches:t,...s}){let i=pn(),{future:o}=Hl(),{basename:l}=sh(),u=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let d=Tx(e,l,o.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,m=[];for(let g of t)typeof g.route.shouldRevalidate=="function"?p=!0:m.push(g.route.id);return p&&m.length>0&&d.searchParams.set("_routes",m.join(",")),[d.pathname+d.search]},[l,o.v8_trailingSlashAwareDataRequests,e,i,t]);return S.createElement(S.Fragment,null,u.map(d=>S.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...s})))}function KE({page:e,matches:t,...s}){let i=pn(),{future:o,manifest:l,routeModules:u}=Hl(),{basename:d}=sh(),{loaderData:p,matches:m}=BE(),g=S.useMemo(()=>Ty(e,t,m,l,i,"data"),[e,t,m,l,i]),v=S.useMemo(()=>Ty(e,t,m,l,i,"assets"),[e,t,m,l,i]),x=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let T=new Set,E=!1;if(t.forEach(L=>{var M;let b=l.routes[L.route.id];!b||!b.hasLoader||(!g.some(_=>_.route.id===L.route.id)&&L.route.id in p&&((M=u[L.route.id])!=null&&M.shouldRevalidate)||b.hasClientLoader?E=!0:T.add(L.route.id))}),T.size===0)return[];let N=Tx(e,d,o.v8_trailingSlashAwareDataRequests,"data");return E&&T.size>0&&N.searchParams.set("_routes",t.filter(L=>T.has(L.route.id)).map(L=>L.route.id).join(",")),[N.pathname+N.search]},[d,o.v8_trailingSlashAwareDataRequests,p,i,l,g,t,e,u]),C=S.useMemo(()=>FE(v,l),[v,l]),k=$E(v);return S.createElement(S.Fragment,null,x.map(T=>S.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...s})),C.map(T=>S.createElement("link",{key:T,rel:"modulepreload",href:T,...s})),k.map(({key:T,link:E})=>S.createElement("link",{key:T,nonce:s.nonce,...E,crossOrigin:E.crossOrigin??s.crossOrigin})))}function WE(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var qE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{qE&&(window.__reactRouterVersion="7.18.4")}catch{}function QE({basename:e,children:t,useTransitions:s,window:i}){let o=S.useRef();o.current==null&&(o.current=kC({window:i,v5Compat:!0}));let l=o.current,[u,d]=S.useState({action:l.action,location:l.location}),p=S.useCallback(m=>{s===!1?d(m):S.startTransition(()=>d(m))},[s]);return S.useLayoutEffect(()=>l.listen(p),[l,p]),S.createElement(kE,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l,useTransitions:s})}var oh=S.forwardRef(function({onClick:t,discover:s="render",prefetch:i="none",relative:o,reloadDocument:l,replace:u,mask:d,state:p,target:m,to:g,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:C,...k},T){let{basename:E,navigator:N,useTransitions:L}=S.useContext(_t),b=typeof g=="string"&&Gf.test(g),M=mx(g,E);g=M.to;let _=sE(g,{relative:o}),I=pn(),j=null;if(d){let ge=zl(d,[],I.mask?I.mask.pathname:"/",!0);E!=="/"&&(ge.pathname=ge.pathname==="/"?E:cn([E,ge.pathname])),j=N.createHref(ge)}let[D,B,W]=zE(i,k),G=XE(g,{replace:u,mask:d,state:p,target:m,preventScrollReset:v,relative:o,viewTransition:x,defaultShouldRevalidate:C,useTransitions:L});function K(ge){t&&t(ge),ge.defaultPrevented||G(ge)}let U=!(M.isExternal||l),X=S.createElement("a",{...k,...W,href:(U?j:void 0)||M.absoluteURL||_,onClick:U?K:t,ref:WE(T,B),target:m,"data-discover":!b&&s==="render"?"true":void 0});return D&&!b?S.createElement(S.Fragment,null,X,S.createElement(UE,{page:_})):X});oh.displayName="Link";var Nx=S.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:d,children:p,...m},g){let v=Oo(u,{relative:m.relative}),x=pn(),C=S.useContext(Ul),{navigator:k,basename:T}=S.useContext(_t),E=C!=null&&rT(v)&&d===!0,N=k.encodeLocation?k.encodeLocation(v).pathname:v.pathname,L=x.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;s||(L=L.toLowerCase(),b=b?b.toLowerCase():null,N=N.toLowerCase()),b&&T&&(b=qn(b,T)||b);const M=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let _=L===N||!o&&L.startsWith(N)&&L.charAt(M)==="/",I=b!=null&&(b===N||!o&&b.startsWith(N)&&b.charAt(N.length)==="/"),j={isActive:_,isPending:I,isTransitioning:E},D=_?t:void 0,B;typeof i=="function"?B=i(j):B=[i,_?"active":null,I?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let W=typeof l=="function"?l(j):l;return S.createElement(oh,{...m,"aria-current":D,className:B,ref:g,style:W,to:u,viewTransition:d},typeof p=="function"?p(j):p)});Nx.displayName="NavLink";var GE=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:i,replace:o,state:l,method:u=ml,action:d,onSubmit:p,relative:m,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:x,...C},k)=>{let{useTransitions:T}=S.useContext(_t),E=tT(),N=nT(d,{relative:m}),L=u.toLowerCase()==="get"?"get":"post",b=typeof d=="string"&&Gf.test(d),M=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let I=_.nativeEvent.submitter,j=(I==null?void 0:I.getAttribute("formmethod"))||u,D=()=>E(I||_.currentTarget,{fetcherKey:t,method:j,navigate:s,replace:o,state:l,relative:m,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:x});T&&s!==!1?S.startTransition(()=>D()):D()};return S.createElement("form",{ref:k,method:L,action:N,onSubmit:i?p:M,...C,"data-discover":!b&&e==="render"?"true":void 0})});GE.displayName="Form";function YE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Px(e){let t=S.useContext(yi);return ze(t,YE(e)),t}function XE(e,{target:t,replace:s,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:p,useTransitions:m}={}){let g=xi(),v=pn(),x=Oo(e,{relative:u});return S.useCallback(C=>{if(bE(C,t)){C.preventDefault();let k=s!==void 0?s:ms(v)===ms(x),T=()=>g(e,{replace:k,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:p});m?S.startTransition(()=>T()):T()}},[v,g,x,s,i,o,t,e,l,u,d,p,m])}function JE(e){qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(pf(e)),s=S.useRef(!1),i=pn(),o=S.useMemo(()=>jE(i.search,s.current?null:t.current),[i.search]),l=xi(),u=S.useCallback((d,p)=>{const m=pf(typeof d=="function"?d(new URLSearchParams(o)):d);s.current=!0,l("?"+m,p)},[l,o]);return[o,u]}var ZE=0,eT=()=>`__${String(++ZE)}__`;function tT(){let{router:e}=Px("useSubmit"),{basename:t}=S.useContext(_t),s=yE(),i=e.fetch,o=e.navigate;return S.useCallback(async(l,u={})=>{let{action:d,method:p,encType:m,formData:g,body:v}=DE(l,t);if(u.navigate===!1){let x=u.fetcherKey||eT();await i(x,s,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:v,formMethod:u.method||p,formEncType:u.encType||m,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:g,body:v,formMethod:u.method||p,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,o,t,s])}function nT(e,{relative:t}={}){let{basename:s}=S.useContext(_t),i=S.useContext(hn);ze(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...Oo(e||".",{relative:t})},u=pn();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),p=d.getAll("index");if(p.some(g=>g==="")){d.delete("index"),p.filter(v=>v).forEach(v=>d.append("index",v));let g=d.toString();l.search=g?`?${g}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(l.pathname=l.pathname==="/"?s:cn([s,l.pathname])),ms(l)}function rT(e,{relative:t}={}){let s=S.useContext(vx);ze(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Px("useViewTransitionState"),o=Oo(e,{relative:t});if(!s.isTransitioning)return!1;let l=qn(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=qn(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Nl(o.pathname,u)!=null||Nl(o.pathname,l)!=null}/**
|
|
52
|
+
* @license lucide-react v1.52.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const sT=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
57
|
+
* @license lucide-react v1.52.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/function iT(e,t,s=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:sT(e),size:24,node:t,...s.length>0?{aliases:s}:{}}}/**
|
|
62
|
+
* @license lucide-react v1.52.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const oT=e=>{let t="",s=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){s=t.length>0;continue}t.length===0?t+=i.toLowerCase():t+=s?i.toUpperCase():i,s=!1}return t};/**
|
|
67
|
+
* @license lucide-react v1.52.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const aT=e=>{const t=oT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
72
|
+
* @license lucide-react v1.52.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const mf=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/**
|
|
77
|
+
* @license lucide-react v1.52.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Gr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
82
|
+
* @license lucide-react v1.52.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/function id(e){return e!=null}function lT(e,t={}){var x,C;const s=t.attributeNames??{},i=k=>s[k]??k,o=e.size??e.width??Gr.width,l=e.size??e.height??Gr.height,u=((x=e.aliases)==null?void 0:x.filter(k=>typeof k=="string"&&k.trim()!=="").map(k=>`lucide-${k}`))??[],d=[...e.name?[`lucide-${e.name}`]:[],...u],p=((C=t.className)==null?void 0:C.split(" ").filter(Boolean))??[],m=t.includeDefaultClasses===!1?mf(...p):mf("lucide",...d,...p),g=t.absoluteStrokeWidth?Number(t.strokeWidth??Gr["stroke-width"])*Number(e.size??e.width??Gr.width)/Number(t.size??t.width??Gr.width):t.strokeWidth??Gr["stroke-width"];return["svg",{...Object.entries(Gr).reduce((k,[T,E])=>(k[i(T)]=E,k),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&id(t.size)&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&id(t.width)&&{[i("width")]:t.width},..."height"in t&&id(t.height)&&{[i("height")]:t.height},[i("stroke-width")]:g,...m&&{[i("class")]:m},[i("viewBox")]:`0 0 ${o} ${l}`,...t.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(k=>{const[T,E,N]=k,L=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...E}:E;return N?[T,L,N]:[T,L]})]}/**
|
|
87
|
+
* @license lucide-react v1.52.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/function uT(e,t={}){return lT(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
92
|
+
* @license lucide-react v1.52.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const cT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},dT=S.createContext({}),fT=()=>S.useContext(dT),hT=S.forwardRef(({color:e,size:t,width:s,height:i,strokeWidth:o,absoluteStrokeWidth:l,nonScalingStroke:u,className:d="",children:p,iconNode:m=[],icon:g={node:m,aliases:[],size:24},...v},x)=>{const{size:C=24,strokeWidth:k=2,absoluteStrokeWidth:T=!1,nonScalingStroke:E=!1,color:N="currentColor",className:L=""}=fT()??{},b=!!p||cT(v),[M,_,I=[]]=uT(g,{color:e??N,width:s??t??C,height:i??t??C,strokeWidth:o??k,absoluteStrokeWidth:l??T,nonScalingStroke:u??E,className:mf(L,d),hasA11yProp:b,attributes:v});return S.createElement(M,{ref:x,..._},[...I.map(([j,D])=>S.createElement(j,D)),...Array.isArray(p)?p:[p]])});/**
|
|
97
|
+
* @license lucide-react v1.52.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/function he(e,t=[],s=[]){const i=typeof e=="string"?iT(e,t,s):e,o=S.forwardRef(({className:l,...u},d)=>S.createElement(hT,{ref:d,icon:i,className:l,...u}));return i.name&&(o.displayName=aT(i.name)),o}/**
|
|
102
|
+
* @license lucide-react v1.52.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const bx={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};bx.node;const pT=he(bx);/**
|
|
107
|
+
* @license lucide-react v1.52.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const jx={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};jx.node;const Ny=he(jx);/**
|
|
112
|
+
* @license lucide-react v1.52.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Rx={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};Rx.node;const mT=he(Rx);/**
|
|
117
|
+
* @license lucide-react v1.52.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Mx={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Mx.node;const Py=he(Mx);/**
|
|
122
|
+
* @license lucide-react v1.52.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Dx={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};Dx.node;const gT=he(Dx);/**
|
|
127
|
+
* @license lucide-react v1.52.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Ax={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Ax.node;const ah=he(Ax);/**
|
|
132
|
+
* @license lucide-react v1.52.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const Lx={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Lx.node;const yT=he(Lx);/**
|
|
137
|
+
* @license lucide-react v1.52.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const Ix={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Ix.node;const vT=he(Ix);/**
|
|
142
|
+
* @license lucide-react v1.52.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Fx={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};Fx.node;const xT=he(Fx);/**
|
|
147
|
+
* @license lucide-react v1.52.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const _x={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};_x.node;const wT=he(_x);/**
|
|
152
|
+
* @license lucide-react v1.52.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Ox={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Ox.node;const Vx=he(Ox);/**
|
|
157
|
+
* @license lucide-react v1.52.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Bx={name:"cloud-upload",size:24,node:[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],aliases:["upload-cloud"]};Bx.node;const ST=he(Bx);/**
|
|
162
|
+
* @license lucide-react v1.52.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const zx={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};zx.node;const Ux=he(zx);/**
|
|
167
|
+
* @license lucide-react v1.52.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const $x={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};$x.node;const kT=he($x);/**
|
|
172
|
+
* @license lucide-react v1.52.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Hx={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Hx.node;const lh=he(Hx);/**
|
|
177
|
+
* @license lucide-react v1.52.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const Kx={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};Kx.node;const CT=he(Kx);/**
|
|
182
|
+
* @license lucide-react v1.52.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Wx={name:"file-archive",size:24,node:[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]};Wx.node;const ET=he(Wx);/**
|
|
187
|
+
* @license lucide-react v1.52.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const qx={name:"file-stack",size:24,node:[["path",{d:"M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1",key:"likhh7"}],["path",{d:"M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1",key:"17ky3x"}],["path",{d:"M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z",key:"1hyeo0"}]]};qx.node;const by=he(qx);/**
|
|
192
|
+
* @license lucide-react v1.52.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const Qx={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};Qx.node;const od=he(Qx);/**
|
|
197
|
+
* @license lucide-react v1.52.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const Gx={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};Gx.node;const TT=he(Gx);/**
|
|
202
|
+
* @license lucide-react v1.52.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const Yx={name:"film",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]};Yx.node;const NT=he(Yx);/**
|
|
207
|
+
* @license lucide-react v1.52.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const Xx={name:"folder-input",size:24,node:[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]]};Xx.node;const gf=he(Xx);/**
|
|
212
|
+
* @license lucide-react v1.52.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const Jx={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};Jx.node;const PT=he(Jx);/**
|
|
217
|
+
* @license lucide-react v1.52.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const Zx={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Zx.node;const e1=he(Zx);/**
|
|
222
|
+
* @license lucide-react v1.52.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const t1={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};t1.node;const wi=he(t1);/**
|
|
227
|
+
* @license lucide-react v1.52.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const n1={name:"hard-drive",size:24,node:[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]};n1.node;const ko=he(n1);/**
|
|
232
|
+
* @license lucide-react v1.52.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const r1={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};r1.node;const bT=he(r1);/**
|
|
237
|
+
* @license lucide-react v1.52.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const s1={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};s1.node;const jT=he(s1);/**
|
|
242
|
+
* @license lucide-react v1.52.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const i1={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};i1.node;const o1=he(i1);/**
|
|
247
|
+
* @license lucide-react v1.52.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const a1={name:"keyboard",size:24,node:[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]};a1.node;const RT=he(a1);/**
|
|
252
|
+
* @license lucide-react v1.52.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const l1={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};l1.node;const MT=he(l1);/**
|
|
257
|
+
* @license lucide-react v1.52.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const u1={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};u1.node;const DT=he(u1);/**
|
|
262
|
+
* @license lucide-react v1.52.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const c1={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};c1.node;const kt=he(c1);/**
|
|
267
|
+
* @license lucide-react v1.52.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const d1={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};d1.node;const AT=he(d1);/**
|
|
272
|
+
* @license lucide-react v1.52.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const f1={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};f1.node;const LT=he(f1);/**
|
|
277
|
+
* @license lucide-react v1.52.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const h1={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};h1.node;const IT=he(h1);/**
|
|
282
|
+
* @license lucide-react v1.52.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const p1={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};p1.node;const FT=he(p1);/**
|
|
287
|
+
* @license lucide-react v1.52.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const m1={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};m1.node;const _T=he(m1);/**
|
|
292
|
+
* @license lucide-react v1.52.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const g1={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};g1.node;const y1=he(g1);/**
|
|
297
|
+
* @license lucide-react v1.52.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const v1={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};v1.node;const uh=he(v1);/**
|
|
302
|
+
* @license lucide-react v1.52.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const x1={name:"search-x",size:24,node:[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]};x1.node;const OT=he(x1);/**
|
|
307
|
+
* @license lucide-react v1.52.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const w1={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};w1.node;const S1=he(w1);/**
|
|
312
|
+
* @license lucide-react v1.52.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const k1={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};k1.node;const VT=he(k1);/**
|
|
317
|
+
* @license lucide-react v1.52.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const C1={name:"star-off",size:24,node:[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};C1.node;const ch=he(C1);/**
|
|
322
|
+
* @license lucide-react v1.52.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const E1={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};E1.node;const gs=he(E1);/**
|
|
327
|
+
* @license lucide-react v1.52.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const T1={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};T1.node;const Kn=he(T1);/**
|
|
332
|
+
* @license lucide-react v1.52.0 - ISC
|
|
333
|
+
*
|
|
334
|
+
* This source code is licensed under the ISC license.
|
|
335
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
+
*/const N1={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};N1.node;const Pl=he(N1);/**
|
|
337
|
+
* @license lucide-react v1.52.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*/const P1={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};P1.node;const bl=he(P1);/**
|
|
342
|
+
* @license lucide-react v1.52.0 - ISC
|
|
343
|
+
*
|
|
344
|
+
* This source code is licensed under the ISC license.
|
|
345
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
346
|
+
*/const b1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};b1.node;const dn=he(b1),BT=[["image/","image"],["video/","video"],["audio/","audio"],["application/pdf","pdf"],["application/zip","archive"],["application/x-tar","archive"],["application/gzip","archive"],["application/x-7z-compressed","archive"],["application/vnd.rar","archive"],["application/x-bzip2","archive"],["application/x-xz","archive"],["text/","text"],["application/json","text"],["application/xml","text"],["application/yaml","text"],["application/javascript","text"],["text/markdown","text"]],j1=new Set(["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/rtf","application/epub+zip"]);function zT(e){for(const[t,s]of BT)if(e.startsWith(t))return s;return j1.has(e)?"document":"other"}[...j1];const sn={NOT_FOUND:"NOT_FOUND",FOLDER_NOT_FOUND:"FOLDER_NOT_FOUND",STORAGE_NOT_INITIALIZED:"STORAGE_NOT_INITIALIZED",STORAGE_UNAVAILABLE:"STORAGE_UNAVAILABLE",TELEGRAM_AUTH_REQUIRED:"TELEGRAM_AUTH_REQUIRED"};class Rr extends Error{constructor(s,i,o){super(o);Qc(this,"status");Qc(this,"code");this.name="ApiError",this.status=s,this.code=i}}function Ie(e,t){return e instanceof Error&&e.message!==""?e.message:t}function gr(e,...t){return e instanceof Rr&&t.includes(e.code)}const yf=new Set;function UT(e){return yf.add(e),()=>{yf.delete(e)}}function R1(){for(const e of yf)e()}function jy(e){return typeof e=="object"&&e!==null}function $T(e){if(!jy(e)||!jy(e.error))return!1;const t=e.error;return typeof t.code=="string"&&typeof t.message=="string"}function M1(e,t){let s=null;try{s=JSON.parse(t)}catch{}return $T(s)?new Rr(e,s.error.code,s.error.message):new Rr(e,"UNKNOWN",`Request failed with status ${e}`)}function Yr(e){const t=new URLSearchParams;for(const[i,o]of Object.entries(e))o==null||o===""||t.set(i,String(o));const s=t.toString();return s===""?"":`?${s}`}function yr(e,t=""){return`/api/files/${encodeURIComponent(e)}${t}`}function fo(e,t=""){return`/api/folders/${encodeURIComponent(e)}${t}`}async function D1(e,t,s){const i={};s!==void 0&&(i["content-type"]="application/json");let o;try{o=await fetch(t,{method:e,credentials:"same-origin",headers:i,body:s!==void 0?JSON.stringify(s):void 0})}catch{throw new Rr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again.")}if(!o.ok){const l=await o.text().catch(()=>""),u=M1(o.status,l);throw o.status===401&&u.code!==sn.TELEGRAM_AUTH_REQUIRED&&R1(),u}return o}async function ke(e,t,s){return await(await D1(e,t,s)).json()}async function Ry(e,t,s){await D1(e,t,s)}const xe={auth:{me(){return ke("GET","/api/auth/me")},startLogin(e){return ke("POST","/api/auth/telegram/start",{phone:e})},verifyCode(e,t){return ke("POST","/api/auth/telegram/verify",{phone:e,code:t})},verifyPassword(e,t){return ke("POST","/api/auth/telegram/password",{phone:e,password:t})},startQrLogin(){return ke("POST","/api/auth/telegram/qr/start",{})},pollQrLogin(e){return ke("GET",`/api/auth/telegram/qr/status?flowId=${encodeURIComponent(e)}`)},submitQrPassword(e,t){return ke("POST","/api/auth/telegram/qr/password",{flowId:e,password:t})},logout(){return ke("POST","/api/auth/logout")}},tokens:{list(){return ke("GET","/api/tokens")},create(e){return ke("POST","/api/tokens",{name:e})},revoke(e){return Ry("DELETE",`/api/tokens/${encodeURIComponent(e)}`)}},storage:{ensure(){return ke("POST","/api/storage/ensure")},health(){return ke("GET","/api/storage/health")},stats(){return ke("GET","/api/storage/stats")},integrityCheck(e=!1){return ke("POST","/api/storage/integrity/check",e?{deep:!0}:{})}},files:{list(e){return ke("GET",`/api/files${Yr({...e})}`)},get(e){return ke("GET",yr(e))},versions(e){return ke("GET",yr(e,"/versions"))},update(e,t){return ke("PATCH",yr(e),t)},move(e,t){return ke("POST",yr(e,"/move"),{folderId:t})},trash(e){return ke("POST",yr(e,"/trash"))},restore(e){return ke("POST",yr(e,"/restore"))},delete(e){return Ry("DELETE",yr(e))},batch(e){return ke("POST","/api/files/batch",e)},download(e){const t=document.createElement("a");t.href=yr(e,"/download"),t.rel="noopener",document.body.appendChild(t),t.click(),t.remove()}},folders:{list(e){return ke("GET",`/api/folders${Yr({...e})}`)},tree(){return ke("GET","/api/folders/tree")},create(e,t){return ke("POST","/api/folders",{name:e,parentId:t})},update(e,t){return ke("PATCH",fo(e),t)},move(e,t){return ke("POST",fo(e,"/move"),{parentId:t})},trash(e){return ke("POST",fo(e,"/trash"))},restore(e){return ke("POST",fo(e,"/restore"))},delete(e){return ke("DELETE",fo(e))},batch(e){return ke("POST","/api/folders/batch",e)}},trash:{list(e){return ke("GET",`/api/trash${Yr({...e})}`)},empty(){return ke("POST","/api/trash/empty")}},starred:{list(e){return ke("GET",`/api/starred${Yr({...e})}`)}},recent:{list(e){return ke("GET",`/api/recent${Yr({...e})}`)}},search:{query(e,t={}){return ke("GET",`/api/search${Yr({q:e,...t})}`)}},activity:{list(e){return ke("GET",`/api/activity${Yr({...e})}`)}}},dh=S.createContext({});function fh(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const HT=typeof window<"u",Co=HT?S.useLayoutEffect:S.useEffect,Kl=S.createContext(null);function hh(e,t){e.indexOf(t)===-1&&e.push(t)}function jl(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const Yn=(e,t,s)=>s>t?t:s<e?e:s;let Wl=()=>{};const Qn={},ph=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),A1=e=>typeof e=="object"&&e!==null,mh=e=>/^0[^.\s]+$/u.test(e);function L1(e){let t;return()=>(t===void 0&&(t=e()),t)}const fn=e=>e,Vo=(...e)=>e.reduce((t,s)=>i=>s(t(i))),Eo=(e,t,s)=>{const i=t-e;return i?(s-e)/i:1};class Rl{constructor(){this.subscriptions=[]}add(t){return hh(this.subscriptions,t),()=>this.remove(t)}remove(t){jl(this.subscriptions,t)}notify(t,s,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,s,i);else for(let l=0;l<o;l++){const u=this.subscriptions[l];u&&u(t,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wt=e=>e*1e3,Kt=e=>e/1e3,I1=(e,t)=>t?e*(1e3/t):0,F1=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,KT=1e-7,WT=12;function qT(e,t,s,i,o){let l,u,d=0;do u=t+(s-t)/2,l=F1(u,i,o)-e,l>0?s=u:t=u;while(Math.abs(l)>KT&&++d<WT);return u}function Bo(e,t,s,i){if(e===t&&s===i)return fn;const o=l=>qT(l,0,1,e,s);return l=>l===0||l===1?l:F1(o(l),t,i)}const _1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,O1=e=>t=>1-e(1-t),V1=Bo(.33,1.53,.69,.99),gh=O1(V1),B1=_1(gh),z1=e=>e>=1?1:(e*=2)<1?.5*gh(e):.5*(2-Math.pow(2,-10*(e-1))),yh=e=>1-Math.sin(Math.acos(e)),U1=O1(yh),$1=_1(yh),QT=Bo(.42,0,1,1),GT=Bo(0,0,.58,1),vh=Bo(.42,0,.58,1),YT=e=>Array.isArray(e)&&typeof e[0]!="number",H1=e=>Array.isArray(e)&&typeof e[0]=="number",XT={linear:fn,easeIn:QT,easeInOut:vh,easeOut:GT,circIn:yh,circInOut:$1,circOut:U1,backIn:gh,backInOut:B1,backOut:V1,anticipate:z1},JT=e=>typeof e=="string",My=e=>{if(H1(e)){Wl(e.length===4);const[t,s,i,o]=e;return Bo(t,s,i,o)}else if(JT(e))return XT[e];return e},Ze={delta:0,timestamp:0,isProcessing:!1};let yl;function ZT(){yl=void 0}const ut={now:()=>(yl===void 0&&ut.set(Ze.isProcessing||Qn.useManualTiming?Ze.timestamp:performance.now()),yl),set:e=>{yl=e,queueMicrotask(ZT)}},Js=e=>Math.round(e*1e5)/1e5,K1=e=>t=>typeof t=="string"&&t.startsWith(e),W1=K1("--"),eN=K1("var(--"),xh=e=>eN(e)?tN.test(e.split("/*")[0].trim()):!1,tN=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Dy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},To={...Si,transform:e=>Yn(0,1,e)},il={...Si,default:1},wh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function nN(e){return e==null}const rN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Sh=(e,t)=>s=>!!(typeof s=="string"&&rN.test(s)&&s.startsWith(e)||t&&!nN(s)&&Object.prototype.hasOwnProperty.call(s,t)),q1=(e,t,s)=>i=>{if(typeof i!="string")return i;const[o,l,u,d]=i.match(wh);return{[e]:parseFloat(o),[t]:parseFloat(l),[s]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},sN=e=>Yn(0,255,e),ad={...Si,transform:e=>Math.round(sN(e))},Zr={test:Sh("rgb","red"),parse:q1("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:i=1})=>"rgba("+ad.transform(e)+", "+ad.transform(t)+", "+ad.transform(s)+", "+Js(To.transform(i))+")"};function iN(e){let t="",s="",i="",o="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,s+=s,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const vf={test:Sh("#"),parse:iN,transform:Zr.transform},zo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bn=zo("deg"),Rn=zo("%"),oe=zo("px"),oN=zo("vh"),aN=zo("vw"),Ay={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},Gs={test:Sh("hsl","hue"),parse:q1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Js(t))+", "+Rn.transform(Js(s))+", "+Js(To.transform(i))+")"},et={test:e=>Zr.test(e)||vf.test(e)||Gs.test(e),parse:e=>Zr.test(e)?Zr.parse(e):Gs.test(e)?Gs.parse(e):vf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Zr.transform(e):Gs.transform(e),getAnimatableNone:e=>{const t=et.parse(e);return t.alpha=0,et.transform(t)}},lN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Q1=new RegExp(wh.source),G1=new RegExp(lN.source,"i");function uN(e){return isNaN(e)&&typeof e=="string"&&(Q1.test(e)||G1.test(e))}const Y1="number",X1="color",cN="var",dN="var(",Ly="${}",fN=/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 hN(e){const t=e.toString();return Q1.test(t)||G1.test(t)}function No(e){const t=e.toString(),s=[],i={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(fN,p=>(et.test(p)?(i.color.push(l),o.push(X1),s.push(et.parse(p))):p.startsWith(dN)?(i.var.push(l),o.push(cN),s.push(p)):(i.number.push(l),o.push(Y1),s.push(parseFloat(p))),++l,Ly)).split(Ly);return{values:s,split:d,indexes:i,types:o}}function pN(e){return No(e).values}function J1({split:e,types:t}){const s=e.length;return i=>{let o="";for(let l=0;l<s;l++)if(o+=e[l],i[l]!==void 0){const u=t[l];u===Y1?o+=Js(i[l]):u===X1?o+=et.transform(i[l]):o+=i[l]}return o}}function mN(e){return J1(No(e))}const gN=e=>typeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e,yN=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:gN(e);function vN(e){const t=No(e);return J1(t)(t.values.map((i,o)=>yN(i,t.split[o])))}const Ft={test:uN,parse:pN,createTransformer:mN,getAnimatableNone:vN};function ld(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function xN({hue:e,saturation:t,lightness:s,alpha:i}){e/=360,t/=100,s/=100;let o=0,l=0,u=0;if(!t)o=l=u=s;else{const d=s<.5?s*(1+t):s+t-s*t,p=2*s-d;o=ld(p,d,e+1/3),l=ld(p,d,e),u=ld(p,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function Ml(e,t){return s=>s>0?t:e}const Ae=(e,t,s)=>e+(t-e)*s,ud=(e,t,s)=>{const i=e*e,o=s*(t*t-i)+i;return o<0?0:Math.sqrt(o)},wN=[vf,Zr,Gs],SN=e=>wN.find(t=>t.test(e));function Iy(e){const t=SN(e);if(!t)return!1;let s=t.parse(e);return t===Gs&&(s=xN(s)),s}const Fy=(e,t)=>{const s=Iy(e),i=Iy(t);if(!s||!i)return Ml(e,t);const o={...s};return l=>(o.red=ud(s.red,i.red,l),o.green=ud(s.green,i.green,l),o.blue=ud(s.blue,i.blue,l),o.alpha=Ae(s.alpha,i.alpha,l),Zr.transform(o))},xf=new Set(["none","hidden"]);function kN(e,t){return xf.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function CN(e,t){return s=>Ae(e,t,s)}function kh(e){return typeof e=="number"?CN:typeof e=="string"?xh(e)?Ml:et.test(e)?Fy:NN:Array.isArray(e)?Z1:typeof e=="object"?et.test(e)?Fy:EN:Ml}function Z1(e,t){const s=[...e],i=s.length,o=e.map((l,u)=>kh(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)s[u]=o[u](l);return s}}function EN(e,t){const s={...e,...t},i={};for(const o in s)e[o]!==void 0&&t[o]!==void 0&&(i[o]=kh(e[o])(e[o],t[o]));return o=>{for(const l in i)s[l]=i[l](o);return s}}function TN(e,t){const s=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][i[l]],d=e.values[u]??0;s[o]=d,i[l]++}return s}const NN=(e,t)=>{const s=Ft.createTransformer(t),i=No(e),o=No(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?xf.has(e)&&!o.values.length||xf.has(t)&&!i.values.length?kN(e,t):Vo(Z1(TN(i,o),o.values),s):Ml(e,t)},_y=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function PN(e,t){const s=_y.exec(e);if(!s)return;const i=_y.exec(t);if(!i||s[2]!==i[2])return;const o=s[2],l=parseFloat(s[1]),u=parseFloat(i[1]);return d=>Js(Ae(l,u,d))+o}function Ch(e,t,s){if(typeof e=="number"&&typeof t=="number"&&typeof s=="number")return Ae(e,t,s);if(typeof e=="string"&&typeof t=="string"){const o=PN(e,t);if(o)return o}return kh(e)(e,t)}const ol=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function bN(e){let t=new Set,s=new Set,i=!1,o=!1;const l=new Set;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(s.add(m),e()),m(u)}const p={schedule:(m,g=!1,v=!1)=>{const C=v&&i?t:s;return g&&l.add(m),C.add(m),m},cancel:m=>{s.delete(m),l.delete(m)},process:m=>{if(u=m,i){o=!0;return}i=!0;const g=t;t=s,s=g,t.forEach(d),t.clear(),i=!1,o&&(o=!1,p.process(m))}};return p}const jN=40;function ew(e,t,s={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const l=()=>i=!0,u=ol.reduce((b,M)=>(b[M]=bN(l),b),{}),{setup:d,read:p,resolveKeyframes:m,preUpdate:g,update:v,preRender:x,render:C,postRender:k}=u,T=()=>{const b=Qn.useManualTiming,M=b?s.timestamp:performance.now();i=!1,b||(s.delta=o?1e3/60:Math.max(Math.min(M-s.timestamp,jN),1)),s.timestamp=M,s.isProcessing=!0,d.process(s),p.process(s),m.process(s),g.process(s),v.process(s),x.process(s),C.process(s),k.process(s),s.isProcessing=!1,i&&t&&(o=!1,e(T))},E=()=>{i=!0,o=!0,s.isProcessing||e(T)};return{schedule:ol.reduce((b,M)=>{const _=u[M];return b[M]=(I,j=!1,D=!1)=>(i||E(),_.schedule(I,j,D)),b},{}),cancel:b=>{for(let M=0;M<ol.length;M++)u[ol[M]].cancel(b)},state:s,steps:u}}const{schedule:Le,cancel:Dr,steps:cd}=ew(typeof requestAnimationFrame<"u"?requestAnimationFrame:fn,!0,Ze),RN=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>Le.update(t,s),stop:()=>Dr(t),now:()=>Ze.isProcessing?Ze.timestamp:ut.now()}},tw=(e,t,s=10)=>{let i="";const o=Math.max(Math.round(t/s),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Eh=2e4;function Th(e,t=50,s=Eh,i){let o=0,l=e.next(o);for(;!l.done&&o<s;)o+=t,l=e.next(o);return o>=s?1/0:o}function MN(e,t=100,s){const i=s({...e,keyframes:[0,t]}),o=Math.min(Th(i),Eh);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:Kt(o)}}const lt={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},nw=e=>e<0?1/Math.max(1+e,lt.minDamping):Math.max(1-e,lt.minDamping);function rw(e,t){if(!(e>1))return 1;const s=Math.sqrt(e*e-1),i=e-s,o=e+s,l=2*s*Math.exp(-t)*(1+t);return sw(u=>o*Math.exp(-i*u)-i*Math.exp(-o*u)-l,u=>Math.exp(-o*u)-Math.exp(-i*u),t)/t}function wf(e,t){return e*Math.sqrt(1-t*t)}const DN=12;function sw(e,t,s){let i=s;for(let o=1;o<DN;o++)i=i-e(i)/t(i);return i}const dd=.001;function AN({duration:e=lt.duration,bounce:t=lt.bounce}){let s,i;const o=nw(t);e=Yn(lt.minDuration,lt.maxDuration,Kt(e)),o<1?(s=m=>{const g=m*o,v=g*e,x=wf(m,o),C=Math.exp(-v);return dd-g/x*C},i=m=>{const v=m*o*e,x=o*o*m*m*e,C=Math.exp(-v),k=wf(m*m,o);return(-s(m)+dd>0?-1:1)*-x*C/k}):(s=m=>{const g=Math.exp(-m*e),v=m*e+1;return-dd+g*v},i=m=>{const g=Math.exp(-m*e),v=-m*(e*e);return g*v});const l=5/e,u=sw(s,i,l),d=u*rw(o,u*e),p=d*d;return{stiffness:p,damping:o*2*Math.sqrt(p),duration:Wt(e)}}const Sf=(e,t)=>(t?e>=0:e>0)&&e<1/0;function fd(e,t){if(Sf(e,t))return e}function LN(e){const t=fd(e.stiffness),s=fd(e.damping,!0),i=fd(e.mass),o={...e,stiffness:t??lt.stiffness,damping:s??lt.damping,mass:i??lt.mass,isResolvedFromDuration:!1,isTimeDefined:(t??s??i)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(o.isTimeDefined){if(e.visualDuration){const l=nw(e.bounce||0),u=2*Math.PI/(e.visualDuration*1.2)*rw(l,2*Math.PI/1.2);o.stiffness=u*u,o.damping=2*l*Math.sqrt(o.stiffness)}else Object.assign(o,AN(o)),o.isResolvedFromDuration=!0;(!Sf(o.stiffness)||!Sf(o.damping,!0))&&(o.stiffness=lt.stiffness,o.damping=lt.damping)}return o}function Dl(e=lt.visualDuration,t=lt.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],l={done:!1,value:i},{stiffness:u,damping:d,mass:p,duration:m,isResolvedFromDuration:g,isTimeDefined:v}=LN({...s}),x=j=>v?0:-Kt(j),C=d/(2*Math.sqrt(u*p)),k=Kt(Math.sqrt(u/p)),T=C*k,E={target:o,delta:o-i,velocity:x(s.velocity||0)||0,restSpeed:0,restDelta:0},N=()=>{const j=Math.abs(E.delta)<5;E.restSpeed=s.restSpeed||(j?lt.restSpeed.granular:lt.restSpeed.default),E.restDelta=s.restDelta||(j?lt.restDelta.granular:lt.restDelta.default)};N();let L,b,M;if(C<1){const j=wf(k,C),D={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};M=()=>{D.A=(E.velocity+T*E.delta)/j,D.sinC=T*D.A+E.delta*j,D.cosC=T*E.delta-D.A*j};const B=W=>{W!==D.t&&(D.t=W,D.env=Math.exp(-T*W),D.sin=Math.sin(j*W),D.cos=Math.cos(j*W))};L=W=>(B(W),E.target-D.env*(D.A*D.sin+E.delta*D.cos)),b=W=>(B(W),D.env*(D.sinC*D.sin+D.cosC*D.cos))}else if(C===1){L=D=>E.target-Math.exp(-k*D)*(E.delta+(E.velocity+k*E.delta)*D);const j={C:0};M=()=>{j.C=E.velocity+k*E.delta},b=D=>Math.exp(-k*D)*(k*j.C*D-E.velocity)}else{const j=k*Math.sqrt(C*C-1),D=T-j,B=T+j,W=v?1/0:300/j,G=(U,X)=>Math.exp(X>W?-U*W-T*(X-W):-U*X),K={S:0,F:0};M=()=>{const U=(E.velocity+T*E.delta)/j;K.S=(E.delta+U)/2,K.F=(E.delta-U)/2},L=U=>E.target-K.S*G(D,U)-K.F*G(B,U),b=U=>D*K.S*G(D,U)+B*K.F*G(B,U)}M();const _=g&&m||null,I={calculatedDuration:_,retarget:(j,D)=>{E.target=j[j.length-1],E.delta=E.target-j[0],E.velocity=x(D),s.restSpeed&&s.restDelta||N(),I.calculatedDuration=_,l.done=!1,M()},velocity:j=>Wt(b(j)),next:j=>{const D=L(j);if(g)l.done=j>=m;else{const B=Wt(b(j));l.done=Math.abs(B)<=E.restSpeed&&Math.abs(E.target-D)<=E.restDelta}return l.value=l.done?E.target:D,l},toString:()=>{const j=Math.min(Th(I),Eh),D=tw(B=>I.next(j*B).value,j,30);return j+"ms "+D},toTransition:()=>{}};return I}Dl.applyToOptions=e=>{const t=MN(e,100,Dl);return e.ease=t.ease,e.duration=Wt(t.duration),e.type="keyframes",e};function kf({keyframes:e,velocity:t=0,power:s=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:p,restDelta:m=.5,restSpeed:g}){const v=e[0],x={done:!1,value:v},C=j=>j<d||j>p,k=j=>d===void 0?p:p===void 0||Math.abs(d-j)<Math.abs(p-j)?d:p;let T=s*t;const E=v+T,N=u===void 0?E:u(E);N!==E&&(T=N-v);const L=j=>-T*Math.exp(-j/i),b=j=>{const D=L(j);x.done=Math.abs(D)<=m,x.value=x.done?N:N+D};let M,_;const I=j=>{C(x.value)&&(M=j,_=Dl({keyframes:[x.value,k(x.value)],velocity:-L(j)/i*1e3,damping:o,stiffness:l,restDelta:m,restSpeed:g}))};return I(0),{calculatedDuration:null,next:j=>{let D=!1;return!_&&M===void 0&&(D=!0,b(j),I(j)),M!==void 0&&j>=M?_.next(j-M):(!D&&b(j),x)}}}function IN(e,t,s){const i=[],o=s||Qn.mix||Ch,l=e.length-1;for(let u=0;u<l;u++){let d=o(e[u],e[u+1]);if(t){const p=Array.isArray(t)?t[u]||fn:t;d=Vo(p,d)}i.push(d)}return i}function FN(e,t,{clamp:s=!0,ease:i,mixer:o}={}){const l=e.length;if(Wl(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=IN(t,i,o),p=d.length,m=g=>{if(u&&g<e[0])return t[0];let v=0;if(p>1)for(;v<e.length-2&&!(g<e[v+1]);v++);const x=Eo(e[v],e[v+1],g);return d[v](x)};return s?g=>m(Yn(e[0],e[l-1],g)):m}function _N(e,t){const s=e[e.length-1];for(let i=1;i<=t;i++){const o=Eo(0,t,i);e.push(Ae(s,1,o))}}function ON(e){const t=[0];return _N(t,e.length-1),t}function VN(e,t){return e.map(s=>s*t)}function BN(e,t){return e.map(()=>t||vh).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:s,ease:i="easeInOut"}){const o=YT(i)?i.map(My):My(i)||vh,l={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(o)&&(!s||s.length!==2||s[0]===0&&s[1]===1)){const[p,m]=t,g=p===m?void 0:(Qn.mix||Ch)(p,m);return{calculatedDuration:e,next:v=>(l.value=g?g(o(e>0?Yn(0,1,v/e):1)):m,l.done=v>=e,l)}}const u=VN(s&&s.length===t.length?s:ON(t),e),d=FN(u,t,{ease:Array.isArray(o)?o:BN(t,o)});return{calculatedDuration:e,next:p=>(l.value=d(p),l.done=p>=e,l)}}const zN=5;function UN(e,t,s){const i=Math.max(t-zN,0);return I1(s-e(i),t-i)}function $N(e,t,s=0){return t<=0?s:e.velocity?e.velocity(t):UN(i=>e.next(i).value,t,e.next(t).value)}const HN=e=>e!==null;function ql(e,{repeat:t,repeatType:s="loop"},i,o=1){const l=e.filter(HN),d=o<0||t&&s!=="loop"&&t%2===1?0:l.length-1;return!d||i===void 0?l[d]:i}const KN={decay:kf,inertia:kf,tween:xo,keyframes:xo,spring:Dl};function iw(e){typeof e.type=="string"&&(e.type=KN[e.type])}function ow(e,t){return{kind:e,animation:t,timestamp:ut.now(),frameTimestamp:Ze.timestamp,frameIsProcessing:Ze.isProcessing}}function aw(e,t,s){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...ow("animation-start",e),options:s?{...t,...s}:t})}catch{}}function WN(e,t){const s=globalThis.__MOTION_INSPECT__;if(s)try{s({...ow("layout-animation-start",e),node:t})}catch{}}class Nh{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){var t;this.isResolved=!0,(t=this._resolve)==null||t.call(this)}then(t,s){return this.finished.then(t,s)}}const qN=e=>e/100;class Al extends Nh{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var i,o;const{motionValue:s}=this.options;s&&s.updatedAt!==ut.now()&&this.tick(ut.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(i=this.options).onStop)==null||o.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause(),aw(this,this.options)}initAnimation(){const{options:t}=this;iw(t);const{type:s=xo,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:d}=t;const p=s||xo;p!==xo&&typeof d[0]!="number"&&(this.mixKeyframes=Vo(qN,Ch(d[0],d[1])),d=[0,100]);const m=p(d===t.keyframes?t:{...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=p({...t,keyframes:[...d].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=Th(m));const{calculatedDuration:g}=m;this.calculatedDuration=g,this.resolvedDuration=g+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=m}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:d,calculatedDuration:p}=this;if(this.startTime===null)return i.next(0);const{delay:m=0,keyframes:g,repeat:v,repeatType:x,repeatDelay:C,type:k,onUpdate:T,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const N=this.currentTime-m*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?N<0:N>o;this.currentTime=Math.max(N,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,M=i;if(v){const D=Math.min(this.currentTime,o)/d;let B=Math.floor(D),W=D%1;!W&&D>=1&&(W=1),W===1&&B--,B=Math.min(B,v+1),!!(B%2)&&(x==="reverse"?(W=1-W,C&&(W-=C/d)):x==="mirror"&&(M=u)),b=Yn(0,1,W)*d}let _;L?(this.delayState.value=g[0],_=this.delayState):_=M.next(b),l&&!L&&(_.value=l(_.value));let{done:I}=_;!L&&p!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const j=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return j&&k!==kf&&(_.value=ql(g,this.options,E,this.speed)),T&&T(_.value),j&&this.finish(),_}then(t,s){return this.finished.then(t,s)}get duration(){return Kt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Kt(t)}get time(){return Kt(this.currentTime)}set time(t){t=Wt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return $N(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const s=this.playbackSpeed!==t;s&&this.driver&&this.updateTime(ut.now()),this.playbackSpeed=t,s&&this.driver&&(this.time=Kt(this.currentTime))}play(){var o,l;if(this.isStopped)return;const{driver:t=RN,startTime:s}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),(l=(o=this.options).onPlay)==null||l.call(o);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),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(ut.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(t=this.options).onComplete)==null||s.call(t)}cancel(){var t,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(t=this.options).onCancel)==null||s.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),t.observe(this)}}const QN=new Set(["brightness","contrast","saturate","opacity"]);function GN(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=s.match(wh)||[];if(!i)return e;const o=s.replace(i,"");let l=QN.has(t)?1:0;return i!==s&&(l*=100),t+"("+l+o+")"}const YN=/\b([a-z-]*)\(.*?\)/gu,Cf={...Ft,getAnimatableNone:e=>{const t=e.match(YN);return t?t.map(GN).join(" "):e}},Ef={...Ft,getAnimatableNone:e=>{const t=Ft.parse(e);return Ft.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Oy={...Si,transform:Math.round},XN={rotate:Bn,pathRotation:Bn,rotateX:Bn,rotateY:Bn,rotateZ:Bn,scale:il,scaleX:il,scaleY:il,scaleZ:il,skew:Bn,skewX:Bn,skewY:Bn,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:To,originX:Ay,originY:Ay,originZ:oe},Ll={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,inset:oe,insetBlock:oe,insetBlockStart:oe,insetBlockEnd:oe,insetInline:oe,insetInlineStart:oe,insetInlineEnd:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,paddingBlock:oe,paddingBlockStart:oe,paddingBlockEnd:oe,paddingInline:oe,paddingInlineStart:oe,paddingInlineEnd:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,marginBlock:oe,marginBlockStart:oe,marginBlockEnd:oe,marginInline:oe,marginInlineStart:oe,marginInlineEnd:oe,fontSize:oe,backgroundPositionX:oe,backgroundPositionY:oe,...XN,zIndex:Oy,fillOpacity:To,strokeOpacity:To,numOctaves:Oy},JN={...Ll,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Cf,WebkitFilter:Cf,mask:Ef,WebkitMask:Ef},lw=e=>JN[e],ZN=new Set([Cf,Ef]);function Ph(e,t){let s=lw(e);return ZN.has(s)||(s=Ft),s.getAnimatableNone?s.getAnimatableNone(t):void 0}function eP(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const es=e=>e*180/Math.PI,Tf=e=>{const t=es(Math.atan2(e[1],e[0]));return Nf(t)},tP={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Tf,rotateZ:Tf,skewX:e=>es(Math.atan(e[1])),skewY:e=>es(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Nf=e=>(e=e%360,e<0&&(e+=360),e),Vy=Tf,By=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),nP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:By,scaleY:zy,scale:e=>(By(e)+zy(e))/2,rotateX:e=>Nf(es(Math.atan2(e[6],e[5]))),rotateY:e=>Nf(es(Math.atan2(-e[2],e[0]))),rotateZ:Vy,rotate:Vy,skewX:e=>es(Math.atan(e[4])),skewY:e=>es(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Po(e){return e.includes("scale")?1:0}function Pf(e,t){if(!e||e==="none")return Po(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(s)i=nP,o=s;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=tP,o=d}if(!o)return Po(t);const l=i[t],u=o[1].split(",").map(sP);return typeof l=="function"?l(u):u[l]}const rP=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Pf(s,t)};function sP(e){return parseFloat(e.trim())}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Mr=new Set([...ki,"pathRotation"]),Uy=e=>e===Si||e===oe,iP=new Set(["x","y","z"]),oP=ki.filter(e=>!iP.has(e));function aP(e){const t=[];return oP.forEach(s=>{const i=e.getValue(s);if(i!==void 0){const o=i.get(),l=s.startsWith("scale")?1:0;if(o===l)return;t.push([s,o]),i.set(l)}}),t}const lP=new Set(["bottom","right"]);function $y(e,t,s,i,o,l){const u=parseFloat(e);if(!isNaN(u))return u;const{min:d,max:p}=t()[s],m=p-d;return l==="border-box"?m:m-parseFloat(i)-parseFloat(o)}const cs={width:({width:e,paddingLeft:t="0",paddingRight:s="0",boxSizing:i},o)=>$y(e,o,"x",t,s,i),height:({height:e,paddingTop:t="0",paddingBottom:s="0",boxSizing:i},o)=>$y(e,o,"y",t,s,i),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{const{y:s}=t();return parseFloat(e)+(s.max-s.min)},right:({left:e},t)=>{const{x:s}=t();return parseFloat(e)+(s.max-s.min)},x:({transform:e})=>Pf(e,"x"),y:({transform:e})=>Pf(e,"y")};cs.translateX=cs.x;cs.translateY=cs.y;const ds=new Set;let bf=!1,jf=!1,Rf=!1;function uw(){if(jf){const e=[],t=new Set,s=new Set;ds.forEach(o=>{o.needsMeasurement&&(e.push(o),t.add(o.element),lP.has(o.name)&&s.add(o.element))});const i=new Map;s.forEach(o=>{const l=aP(o);l.length&&(i.set(o,l),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const l=i.get(o);l&&l.forEach(([u,d])=>{var p;(p=o.getValue(u))==null||p.set(d)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}jf=!1,bf=!1,ds.forEach(e=>e.complete(Rf)),ds.clear()}function cw(){ds.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jf=!0)})}function uP(){Rf=!0,cw(),uw(),Rf=!1}function cP(e,t,s){if(typeof e=="string"){if(ph(e)||mh(e))return parseFloat(e);if(!Ft.test(e)&&Ft.test(s))return Ph(t,s)}return e??void 0}class bh{constructor(t,s,i,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=i,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(ds.add(this),bf||(bf=!0,Le.read(cw),Le.resolveKeyframes(uw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:i,motionValue:o}=this;if(t[0]===null){const l=o==null?void 0:o.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&s){const d=cP(i.readValue(s,u),s,u);d!==void 0&&(t[0]=d)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}eP(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ds.delete(this)}cancel(){this.state==="scheduled"&&(ds.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dP=e=>e.startsWith("--");function dw(e,t,s){dP(t)?e.style.setProperty(t,s):e.style[t]=s}const fP={};function fw(e,t){const s=L1(e);return()=>fP[t]??s()}const hP=fw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),hw=fw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vo=([e,t,s,i])=>`cubic-bezier(${e}, ${t}, ${s}, ${i})`,Hy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function pw(e,t){if(e)return typeof e=="function"?hw()?tw(e,t):"ease-out":H1(e)?vo(e):Array.isArray(e)?e.map(s=>pw(s,t)||Hy.easeOut):Hy[e]}function pP(e,t,s,{delay:i=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeOut",times:p}={},m=void 0){const g={[t]:s};p&&(g.offset=p);const v=pw(d,o);Array.isArray(v)&&(g.easing=v);const x={delay:i,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return m&&(x.pseudoElement=m),e.animate(g,x)}function mw(e){return typeof e=="function"&&"applyToOptions"in e}function mP({type:e,...t}){return mw(e)&&hw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class gw extends Nh{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:i,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:d,onComplete:p}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,Wl(typeof t.type!="string");const m=mP(t);this.animation=pP(s,i,o,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const g=ql(o,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(g),dw(s,i,g),this.animation.cancel()}p==null||p(),this.notifyFinished()},aw(this,t,m)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,s;(s=(t=this.animation).finish)==null||s.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,i,o;const t=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(i=this.animation).commitStyles)==null||o.call(i))}get duration(){var s,i;const t=((i=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:i.call(s).duration)||0;return Kt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Kt(t)}get time(){return Kt(Number(this.animation.currentTime)||0)}set time(t){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wt(t),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:s,observe:i,...o}){var l;return this.allowFlatten&&((l=this.animation.effect)==null||l.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&hP()?(this.animation.timeline=t,Object.assign(this.animation,o),s==null||s(this.animation),fn):i(this)}}const yw={anticipate:z1,backInOut:B1,circInOut:$1};function gP(e){return e in yw}function yP(e){typeof e.ease=="string"&&gP(e.ease)&&(e.ease=yw[e.ease])}const hd=10;class vP extends gw{constructor(t){yP(t),iw(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:i,onComplete:o,element:l,...u}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const d=new Al({...u,autoplay:!1}),p=Math.max(hd,ut.now()-this.startTime),m=Yn(0,hd,p-hd),g=d.sample(p).value,{name:v}=this.options;l&&v&&dw(l,v,g),s.setWithVelocity(d.sample(Math.max(0,p-m)).value,g,m),d.stop()}}const Ky=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ft.test(e)||e==="0")&&!e.startsWith("url("));function xP(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function wP(e,t,s,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=Ky(o,t),d=Ky(l,t);return!u||!d?!1:xP(e)||(s==="spring"||mw(s))&&i}function Mf(e){e.duration=0,e.type="keyframes"}const Df=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),SP=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function kP(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&SP.test(e[t]))return!0;return!1}const Wy=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),CP=L1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function EP(e){var v;const{motionValue:t,name:s,repeatDelay:i,repeatType:o,damping:l,type:u,keyframes:d}=e;if(!s||!(Df.has(s)||Wy.has(s)))return!1;const p=(v=t==null?void 0:t.owner)==null?void 0:v.current;if(!(p instanceof HTMLElement)&&!(p instanceof SVGElement))return!1;const{onUpdate:m,transformTemplate:g}=t.owner.getProps();return CP()&&(Df.has(s)||Wy.has(s)&&kP(d))&&(s!=="transform"||!g)&&!m&&!i&&o!=="mirror"&&l!==0&&u!=="inertia"}const TP=40;class NP extends Nh{constructor(t){var p;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=ut.now();const{keyframes:s,name:i,motionValue:o,element:l}=t,u=t;u.autoplay??(u.autoplay=!0),u.delay??(u.delay=0),u.type??(u.type="keyframes"),u.repeat??(u.repeat=0),u.repeatDelay??(u.repeatDelay=0),u.repeatType??(u.repeatType="loop");const d=(l==null?void 0:l.KeyframeResolver)||bh;this.keyframeResolver=new d(s,(m,g,v)=>this.onKeyframesResolved(m,g,u,!v),i,o,l),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(t,s,i,o){var E,N;this.keyframeResolver=void 0;const{name:l,type:u,velocity:d,delay:p,isHandoff:m,onUpdate:g}=i;this.resolvedAt=ut.now();let v=!0;wP(t,l,u,d)||(v=!1,(Qn.instantAnimations||!p)&&(g==null||g(ql(t,i,s))),t[0]=t[t.length-1],Mf(i),i.repeat=0);const x=o?this.resolvedAt?this.resolvedAt-this.createdAt>TP?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:C}=i;i.startTime??(i.startTime=x),i.finalKeyframe=s,i.keyframes=t,i.onComplete=()=>{C==null||C(),this.notifyFinished()};const k=v&&!m&&EP(i);let T;if(k){i.element=(N=(E=i.motionValue)==null?void 0:E.owner)==null?void 0:N.current;try{T=new vP(i)}catch{T=new Al(i)}}else T=new Al(i);this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this._animation.finished:super.finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),uP()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function vw(e,t,s,i=0,o=1){const l=Array.from(e).sort((m,g)=>m.sortNodePosition(g)).indexOf(t),u=e.size,d=(u-1)*i;return typeof s=="function"?s(l,u):o===1?l*i:d-l*i}const qy=30,PP=e=>!isNaN(parseFloat(e));class bP{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=ut.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=ut.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=PP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){var i;return t==="change"?this.onChangeSubscribe(s):((i=this.events)[t]||(i[t]=new Rl)).add(s)}onChangeSubscribe(t){const{events:s}=this;return!s.change&&!this.changeSubscriber?this.changeSubscriber=t:(s.change||(s.change=new Rl,s.change.add(this.changeSubscriber),this.changeSubscriber=void 0),s.change.add(t)),()=>{var i;this.changeSubscriber===t?this.changeSubscriber=void 0:(i=s.change)==null||i.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Le.read(()=>{var t;!this.changeSubscriber&&!((t=this.events.change)!=null&&t.getSize())&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){var i;const{current:t,changeSubscriber:s}=this;s?s(t):(i=this.events.change)==null||i.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>qy)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,qy);return I1(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{var l;this.hasAnimated=!0;let i=!1,o;o=t(()=>{var u;i=!0,(u=this.events.animationComplete)==null||u.notify(),this.animation===o&&this.clearAnimation(),s()}),i||(this.animation=o),(l=this.events.animationStart)==null||l.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){var t,s;(t=this.dependents)==null||t.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pi(e,t){return new bP(e,t)}function xw(e,t){if(e!=null&&e.inherit&&t){const{inherit:s,...i}=e;return{...t,...i}}return e}function jh(e,t){const s=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return s!==e?xw(s,e):s}const jP={type:"spring",stiffness:500,damping:25,restSpeed:10},RP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),MP={type:"keyframes",duration:.8},DP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},AP=(e,{keyframes:t})=>t.length>2?MP:Mr.has(e)?e.startsWith("scale")?RP(t[1]):jP:DP,LP=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function IP(e){for(const t in e)if(!LP.has(t))return!0;return!1}const Rh=(e,t,s,i={},o,l)=>u=>{const d=jh(i,e)||{},p=d.delay||i.delay||0;let{elapsed:m=0}=i;m=m-Wt(p);const g={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-m,onUpdate:x=>{t.set(x),d.onUpdate&&d.onUpdate(x)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};IP(d)||Object.assign(g,AP(e,g)),g.duration&&(g.duration=Wt(g.duration)),g.repeatDelay&&(g.repeatDelay=Wt(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let v=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(Mf(g),g.delay===0&&(v=!0)),(Qn.instantAnimations||Qn.skipAnimations||o!=null&&o.shouldSkipAnimations||d.skipAnimations)&&(v=!0,Mf(g),g.delay=0),g.allowFlatten=!d.type&&!d.ease,v&&!l&&t.get()!==void 0){const x=ql(g.keyframes,d);if(x!==void 0){Le.update(()=>{g.onUpdate(x),g.onComplete()});return}}return d.isSync?new Al(g):new NP(g)},FP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _P(e){const t=FP.exec(e);if(!t)return[,];const[,s,i,o]=t;return[`--${s??i}`,o]}function ww(e,t,s=1){const[i,o]=_P(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return ph(u)?parseFloat(u):u}return xh(o)?ww(o,t,s+1):o}function OP(e){const t=[{},{}];return e==null||e.values.forEach((s,i)=>{t[0][i]=s.get(),t[1][i]=s.getVelocity()}),t}function Sw(e,t,s,i){const o=l=>typeof l=="function"?l(s!==void 0?s:e.custom,...OP(i)):l;return t=o(t),typeof t=="string"&&(t=e.variants&&e.variants[t]),o(t)}function fs(e,t,s){return Sw(e.getProps(),t,s,e)}const kw=(e,t)=>{var s;return t==="exit"?(s=e.presenceContext)==null?void 0:s.custom:void 0},Cw=new Set(["width","height","top","left","right","bottom",...ki]),VP=e=>Array.isArray(e);function BP(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,pi(s))}function zP(e){return VP(e)?e[e.length-1]||0:e}function UP(e,t){const s=fs(e,t);let{transitionEnd:i={},transition:o={},...l}=s||{};l={...l,...i};for(const u in l){const d=zP(l[u]);BP(e,u,d)}}const ct=e=>!!(e&&e.getVelocity);function $P(e){return!!(ct(e)&&e.add)}function Af(e,t){const s=e.getValue("willChange");if($P(s))return s.add(t);if(!s&&Qn.WillChange){const i=new Qn.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Mh(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const HP="framerAppearId",Ew="data-"+Mh(HP);function Tw(e){return e.props[Ew]}const KP=typeof window<"u";function WP({protectedKeys:e,needsAnimating:t},s){const i=s in e&&!t[s];return t[s]=!1,i}function Nw(e,t,{delay:s=0,transitionOverride:i,type:o}={}){var k;let{transition:l,transitionEnd:u,...d}=t;const p=e.getDefaultTransition();l=l?xw(l,p):p;const m=l==null?void 0:l.reduceMotion,g=l==null?void 0:l.skipAnimations;i&&(l=i);const v=[],x=o&&((k=e.animationState)==null?void 0:k.getState()[o]),C=l==null?void 0:l.path;C&&C.animateVisualElement(e,d,l,s,v);for(const T in d){const E=e.getValue(T,e.latestValues[T]??null),N=d[T];if(N===void 0||x&&WP(x,T))continue;const L={delay:s,...jh(l||{},T)};g&&(L.skipAnimations=!0);const b=E.get();if(b!==void 0&&!E.isAnimating()&&!Array.isArray(N)&&N===b&&!L.velocity){Le.update(()=>E.set(N));continue}let M=!1;if(KP&&window.MotionHandoffAnimation){const j=Tw(e);if(j){const D=window.MotionHandoffAnimation(j,T,Le);D!==null&&(L.startTime=D,M=!0)}}Af(e,T);const _=m??e.shouldReduceMotion;E.start(Rh(T,E,N,_&&Cw.has(T)?{type:!1}:L,e,M));const I=E.animation;I&&v.push(I)}if(u){const T=()=>Le.update(()=>{u&&UP(e,u)});v.length?Promise.all(v).then(T):T()}return v}function Lf(e,t,s={}){const i=fs(e,t,kw(e,s.type)),o=s.transitionOverride||((i==null?void 0:i.transition)??(e.getDefaultTransition()||{})),l=()=>Promise.all(i?Nw(e,i,s):[]),u=(p=0)=>{const{variantChildren:m}=e,{delayChildren:g=0,staggerChildren:v,staggerDirection:x}=o,C=[];return m==null||m.forEach(k=>{k.notify("AnimationStart",t),C.push(Lf(k,t,{...s,delay:p+(typeof g=="function"?0:g)+vw(m,k,g,v,x)}).then(()=>k.notify("AnimationComplete",t)))}),Promise.all(C)},{when:d}=o;return d?d==="beforeChildren"?l().then(()=>u()):u().then(l):Promise.all([l(),u(s.delay)])}function qP(e,t,s={}){return e.notify("AnimationStart",t),(Array.isArray(t)?Promise.all(t.map(o=>Lf(e,o,s))):typeof t=="string"?Lf(e,t,s):Promise.all(Nw(e,fs(e,t,s.custom),s))).then(()=>{e.notify("AnimationComplete",t)})}const QP={test:e=>e==="auto",parse:e=>e},GP=e=>t=>t.test(e),YP=[Si,oe,Rn,Bn,aN,oN,QP],Qy=e=>YP.find(GP(e));function XP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||mh(e):!0}const JP=new Set(["auto","none","0"]);function ZP(e,t,s){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!JP.has(l)&&hN(l)&&(o=e[i]),i++}if(o&&s)for(const l of t)e[l]!==o&&(e[l]=Ph(s,o))}class eb extends bh{constructor(t,s,i,o,l){super(t,s,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let g=0;g<t.length;g++){let v=t[g];if(typeof v=="string"&&(v=v.trim(),xh(v))){const x=ww(v,s.current);x!==void 0&&(t[g]=x),g===t.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!Cw.has(i)||t.length!==2)return;const[o,l]=t;if(typeof o=="number"&&typeof l=="number")return;const u=Qy(o),d=Qy(l),p=Dy(o),m=Dy(l);if(p!==m&&cs[i]){this.needsMeasurement=!0;return}if(u!==d)if(Uy(u)&&Uy(d))for(let g=0;g<t.length;g++){const v=t[g];typeof v=="string"&&(t[g]=parseFloat(v))}else cs[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||XP(t[o]))&&i.push(o);i.length&&ZP(t,i,s)}measure(){const{element:t,name:s}=this;return cs[s](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){var l;const{element:t,unresolvedKeyframes:s,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const o=s[s.length-1];o!==void 0&&((l=this.motionValue)==null||l.jump(o,!1))}measureEndState(){var l,u;const{element:t,unresolvedKeyframes:s}=this;if(!t||!t.current)return;(l=this.motionValue)==null||l.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=this.measure(),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,p])=>{t.getValue(d).set(p)}),this.resolveNoneKeyframes()}}const Dh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function vl(e){return A1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function Ah(e){return A1(e)&&"ownerSVGElement"in e}const If=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pw(e,t,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=(s==null?void 0:s[e])??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(i=>i!=null)}const tb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nb=ki.length;function rb(e,t,s){let i="",o=!0;for(let u=0;u<nb;u++){const d=ki[u],p=e[d];if(p===void 0)continue;let m=!0;if(typeof p=="number")m=p===(d.startsWith("scale")?1:0);else{const g=parseFloat(p);m=d.startsWith("scale")?g===1:g===0}if(!m||s){const g=If(p,Ll[d]);if(!m){o=!1;const v=tb[d]||d;i+=`${v}(${g}) `}s&&(t[d]=g)}}const l=e.pathRotation;return l&&(o=!1,i+=`rotate(${If(l,Ll.pathRotation)}) `),i=i.trim(),s?i=s(t,o?"":i):o&&(i="none"),i}function Lh(e,t,s){const{style:i,vars:o,transformOrigin:l}=e;let u=!1,d=!1;for(const p in t){const m=t[p];if(Mr.has(p)){u=!0;continue}else if(W1(p)){o[p]=m;continue}else{const g=If(m,Ll[p]);p.startsWith("origin")?(d=!0,l[p]=g):i[p]=g}}if(t.transform||(u||s?i.transform=rb(t,e.transform,s):i.transform&&(i.transform="none")),d){const{originX:p="50%",originY:m="50%",originZ:g=0}=l;i.transformOrigin=`${p} ${m} ${g}`}}const sb={offset:"stroke-dashoffset",array:"stroke-dasharray"},ib={offset:"strokeDashoffset",array:"strokeDasharray"};function ob(e,t,s=1,i=0,o=!0){e.pathLength=1;const l=o?sb:ib;e[l.offset]=`${-i}`,e[l.array]=`${t} ${s}`}const bw=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function jw(e,{attrX:t,attrY:s,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:u=0,...d},p,m,g){if(Lh(e,d,m),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:x}=e;for(const C of bw)v[C]!==void 0&&(x[C]=v[C],delete v[C]);(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete v.transformBox),t!==void 0&&(v.x=t),s!==void 0&&(v.y=s),i!==void 0&&(v.scale=i),o!==void 0&&ob(v,o,l,u,!1)}function Rw({top:e,left:t,right:s,bottom:i}){return{x:{min:t,max:s},y:{min:e,max:i}}}function ab({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function lb(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function pd(e){return e===void 0||e===1}function Ff({scale:e,scaleX:t,scaleY:s}){return!pd(e)||!pd(t)||!pd(s)}function Xr(e){return Ff(e)||Mw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mw(e){return Gy(e.x)||Gy(e.y)}function Gy(e){return e&&e!=="0%"}function Il(e,t,s){const i=e-s,o=t*i;return s+o}function Yy(e,t,s,i,o){return o!==void 0&&(e=Il(e,o,i)),Il(e,s,i)+t}function _f(e,t=0,s=1,i,o){e.min=Yy(e.min,t,s,i,o),e.max=Yy(e.max,t,s,i,o)}function Dw(e,{x:t,y:s}){_f(e.x,t.translate,t.scale,t.originPoint),_f(e.y,s.translate,s.scale,s.originPoint)}const Xy=.999999999999,Jy=1.0000000000001;function ub(e,t,s,i=!1){var d;const o=s.length;if(!o)return;t.x=t.y=1;let l,u;for(let p=0;p<o;p++){l=s[p],u=l.projectionDelta;const{visualElement:m}=l.options;m&&m.props.style&&m.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Pn(e.x,-l.scroll.offset.x),Pn(e.y,-l.scroll.offset.y)),u&&(t.x*=u.x.scale,t.y*=u.y.scale,Dw(e,u)),i&&Xr(l.latestValues)&&xl(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<Jy&&t.x>Xy&&(t.x=1),t.y<Jy&&t.y>Xy&&(t.y=1)}function Pn(e,t){e.min+=t,e.max+=t}function Zy(e,t,s,i,o=.5){const l=Ae(e.min,e.max,o);_f(e,t,s,l,i)}function e0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function xl(e,t,s){const i=s??e;Zy(e.x,e0(t.x,i.x),t.scaleX,t.scale,t.originX),Zy(e.y,e0(t.y,i.y),t.scaleY,t.scale,t.originY)}function Aw(e,t){return Rw(lb(e.getBoundingClientRect(),t))}function cb(e,t,s){const i=Aw(e,s),{scroll:o}=t;return o&&(Pn(i.x,o.offset.x),Pn(i.y,o.offset.y)),i}const{schedule:Ih}=ew(queueMicrotask,!1),on={x:!1,y:!1};function Lw(){return on.x||on.y}function db(e){return e==="x"||e==="y"?on[e]?null:(on[e]=!0,()=>{on[e]=!1}):on.x||on.y?null:(on.x=on.y=!0,()=>{on.x=on.y=!1})}function Iw(e,t){const s=Pw(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[s,o,()=>i.abort()]}function fb(e){return!(e.pointerType==="touch"||Lw())}function hb(e,t,s={}){const[i,o,l]=Iw(e,s);return i.forEach(u=>{let d=!1,p=!1,m;const g=()=>{u.removeEventListener("pointerleave",k)},v=E=>{m&&(m(E),m=void 0),g()},x=E=>{d=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),p&&(p=!1,v(E))},C=()=>{d=!0,window.addEventListener("pointerup",x,o),window.addEventListener("pointercancel",x,o)},k=E=>{if(E.pointerType!=="touch"){if(d){p=!0;return}v(E)}},T=E=>{if(!fb(E))return;p=!1;const N=t(u,E);typeof N=="function"&&(m=N,u.addEventListener("pointerleave",k,o))};u.addEventListener("pointerenter",T,o),u.addEventListener("pointerdown",C,o)}),l}const Fw=(e,t)=>t?e===t?!0:Fw(e,t.parentElement):!1,Fh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,pb=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function mb(e){return pb.has(e.tagName)||e.isContentEditable===!0}const gb=new Set(["INPUT","SELECT","TEXTAREA"]);function yb(e){return gb.has(e.tagName)||e.isContentEditable===!0}const wl=new WeakSet;function t0(e){return t=>{t.key==="Enter"&&e(t)}}function md(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vb=(e,t)=>{const s=e.currentTarget;if(!s)return;const i=t0(()=>{if(wl.has(s))return;md(s,"down");const o=t0(()=>{md(s,"up")}),l=()=>md(s,"cancel");s.addEventListener("keyup",o,t),s.addEventListener("blur",l,t)});s.addEventListener("keydown",i,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),t)};function n0(e){return Fh(e)&&!Lw()}const r0=new WeakSet;function xb(e,t,s={}){const[i,o,l]=Iw(e,s),u=d=>{const p=d.currentTarget;if(!n0(d)||r0.has(d))return;wl.add(p),s.stopPropagation&&r0.add(d);const m=t(p,d),g={...o,capture:!0},v=(k,T)=>{window.removeEventListener("pointerup",x,g),window.removeEventListener("pointercancel",C,g),wl.has(p)&&wl.delete(p),n0(k)&&typeof m=="function"&&m(k,{success:T})},x=k=>{v(k,p===window||p===document||s.useGlobalTarget||Fw(p,k.target))},C=k=>{v(k,!1)};window.addEventListener("pointerup",x,g),window.addEventListener("pointercancel",C,g)};return i.forEach(d=>{(s.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),vl(d)&&(d.addEventListener("focus",m=>vb(m,o)),!mb(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}const Sl=new WeakMap;let Sr;const _w=(e,t,s)=>(i,o)=>o&&o[0]?o[0][e+"Size"]:Ah(i)&&"getBBox"in i?i.getBBox()[t]:i[s],wb=_w("inline","width","offsetWidth"),Sb=_w("block","height","offsetHeight");function kb({target:e,borderBoxSize:t}){var s;(s=Sl.get(e))==null||s.forEach(i=>{i(e,{get width(){return wb(e,t)},get height(){return Sb(e,t)}})})}function Cb(e){e.forEach(kb)}function Eb(){typeof ResizeObserver>"u"||(Sr=new ResizeObserver(Cb))}function Tb(e,t){Sr||Eb();const s=Pw(e);return s.forEach(i=>{let o=Sl.get(i);o||(o=new Set,Sl.set(i,o)),o.add(t),Sr==null||Sr.observe(i)}),()=>{s.forEach(i=>{const o=Sl.get(i);o==null||o.delete(t),o!=null&&o.size||Sr==null||Sr.unobserve(i)})}}const kl=new Set;let Ys;function Nb(){Ys=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};kl.forEach(t=>t(e))},window.addEventListener("resize",Ys)}function Pb(e){return kl.add(e),Ys||Nb(),()=>{kl.delete(e),!kl.size&&typeof Ys=="function"&&(window.removeEventListener("resize",Ys),Ys=void 0)}}function s0(e,t){return typeof e=="function"?Pb(e):Tb(e,t)}function bb(e){return Ah(e)&&e.tagName==="svg"}const i0=e=>typeof e=="number"?e:parseFloat(e),o0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xs=()=>({x:o0(),y:o0()}),a0=()=>({min:0,max:0}),Je=()=>({x:a0(),y:a0()}),jb=new WeakMap;function Ql(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bo(e){return typeof e=="string"||Array.isArray(e)}const _h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],l0=["initial",..._h];function Gl(e){if(Ql(e.animate))return!0;for(let t=0;t<l0.length;t++)if(bo(e[l0[t]]))return!0;return!1}function Ow(e){return!!(Gl(e)||e.variants)}function Rb(e,t,s){for(const i in t){const o=t[i],l=s[i];if(ct(o))e.addValue(i,o);else if(ct(l))e.addValue(i,pi(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=e.getStaticValue(i);e.addValue(i,pi(u!==void 0?u:o,{owner:e}))}}for(const i in s)t[i]===void 0&&e.removeValue(i);return t}const Fl={current:null},Oh={current:!1},Mb=typeof window<"u";function Vw(){if(Oh.current=!0,!!Mb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addEventListener("change",t),t()}else Fl.current=!1}const u0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _l={};function Bw(e){_l=e}function Db(){return _l}class Ab{scrapeMotionValuesFromProps(t,s,i){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:u,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 C=ut.now();this.renderScheduledAt<C&&(this.renderScheduledAt=C,Le.render(this.render,!1,!0))};const{latestValues:m,renderState:g}=d;this.latestValues=m,this.baseTarget={...m},this.initialValues=s.initial?{...m}:{},this.renderState=g,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=l,this.options=p,this.blockInitialAnimation=!!u,this.isControllingVariants=Gl(s),this.isVariantNode=Ow(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const C in x){const k=x[C];m[C]!==void 0&&ct(k)&&k.set(m[C])}}mount(t){var s,i;if(this.hasBeenMounted)for(const o in this.initialValues)(s=this.values.get(o))==null||s.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];if(this.current=t,jb.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.isVariantNode&&!this.isControllingVariants){let o=this;do o=o.props.inherit!==!1&&o.parent;while(o&&!o.isVariantNode);if(o){const{variantChildren:l}=o;l.add(this),this.removeFromVariantTree=()=>l.delete(this)}}this.values.forEach((o,l)=>this.bindToMotionValue(l,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Oh.current||Vw(),this.shouldReduceMotion=Fl.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Dr(this.notifyUpdate),Dr(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const i=this.features[s];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),s.accelerate&&Df.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:d,times:p,ease:m,duration:g}=s.accelerate,v=new gw({element:this.current,name:t,keyframes:d,times:p,ease:m,duration:Wt(g)}),x=u(v);this.valueSubscriptions.set(t,()=>{x(),v.cancel()});return}const i=Mr.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=s.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Le.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{o(),l&&l()})}sortNodePosition(t){return!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _l){const s=_l[t];if(!s)continue;const{isEnabled:i,Feature:o}=s;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<u0.length;i++){const o=u0[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,u=t[l];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=Rb(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,s){const i=this.values.get(t);if(s!==i){i&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s);const o=s.get();o!==void 0&&(this.latestValues[t]=o)}}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){var o;if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&s!==void 0&&(i=pi(s??((o=this.getDefaultValue)==null?void 0:o.call(this,t)),{owner:this}),this.addValue(t,i)),i}readValue(t,s){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(ph(i)||mh(i))?i=parseFloat(i):typeof i!="number"&&!Ft.test(i)&&Ft.test(s)&&(i=Ph(t,s)),this.setBaseTarget(t,ct(i)?i.get():i)),ct(i)?i.get():i}setBaseTarget(t,s){this.baseTarget[t]=s}on(t,s){return this.events[t]||(this.events[t]=new Rl),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){Ih.render(this.render)}}class zw extends Ab{constructor(){super(...arguments),this.KeyframeResolver=eb}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){const i=t.style;return i?i[s]:void 0}removeValueFromRenderState(t,{vars:s,style:i}){delete s[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ct(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Ar{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Uw(e,{style:t,vars:s},i,o){const l=e.style;let u;for(u in t)l[u]=t[u];o==null||o.applyProjectionStyles(l,i);for(u in s)l.setProperty(u,s[u])}const jo={};function $w(e,{layout:t,layoutId:s}){return Mr.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!jo[e]||e==="opacity")}function Vh(e,t,s){var u;const i=e.style,o=t==null?void 0:t.style,l={};if(!i)return l;for(const d in i)(ct(i[d])||o&&ct(o[d])||$w(d,e)||((u=s==null?void 0:s.getValue(d))==null?void 0:u.liveStyle)!==void 0)&&(l[d]=i[d]);return l}function Lb(e){return window.getComputedStyle(e)}class Ib extends zw{constructor(){super(...arguments),this.type="html",this.renderInstance=Uw}mount(t){Wl(!!t.style),super.mount(t)}readValueFromInstance(t,s){var i;if(Mr.has(s))return(i=this.projection)!=null&&i.isProjecting?Po(s):rP(t,s);{const o=Lb(t),l=(W1(s)?o.getPropertyValue(s):o[s])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:s}){return Aw(t,s)}build(t,s,i){Lh(t,s,i.transformTemplate)}scrapeMotionValuesFromProps(t,s,i){return Vh(t,s,i)}}const Hw=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"]),Kw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Fb(e,t,s,i){Uw(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(Hw.has(o)?o:Mh(o),t.attrs[o])}function Ww(e,t,s){const i=Vh(e,t,s);for(const o in e)if(ct(e[o])||ct(t[o])){const l=ki.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}class _b extends zw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,s){return Mr.has(s)?super.getBaseTargetFromProps(t,s)??Po(s):t[s]}getDefaultValue(t){return Mr.has(t)?this.latestValues[t]??Po(t):void 0}readValueFromInstance(t,s){if(Mr.has(s)){const i=lw(s);return i&&i.default||0}if(bw.includes(s)){const o=getComputedStyle(t)[s];if(typeof o=="string"&&o)return o.trim()}return s=Hw.has(s)?s:Mh(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,i){return Ww(t,s,i)}build(t,s,i){jw(t,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,s,i,o){Fb(t,s,i,o)}mount(t){this.isSVGTag=Kw(t.tagName),super.mount(t)}}function qw(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(t[i]!==e[i])return!1;return!0}const Ob=[..._h].reverse();function Vb(e){let t=d=>Promise.all(d.map(({animation:p,options:m})=>qP(e,p,m))),s=c0(),i=!0,o=!1;function l(d){var L;const{props:p,parent:m,manuallyAnimateOnMount:g}=e,v=i||o,x=[],C=new Set;let k={},T=1/0,E=e;do E=E.props.inherit!==!1&&E.parent;while(E&&!E.isControllingVariants);if(Ob.forEach((b,M)=>{var ee,ue;const _=s[b],I=p[b],j=E&&E.props[b],D=I!==void 0?I:bo(j)||j===!1?j:void 0,B=bo(D),W=b===d?_.isActive:null;W===!1&&(T=M);const G=B&&I===void 0&&!(v&&g);if(_.protectedKeys={...k},!_.isActive&&W===null||!D&&!_.prevProp||Ql(D)||typeof D=="boolean")return;if(b==="exit"&&_.isActive&&W!==!0){k={...k,..._.prevResolvedValues};return}const K=Bb(_.prevProp,D);let U=K||B&&(W&&!G||M>T),X=!1;const ge=Array.isArray(D)?D:[D];let me={};if(W!==!1)for(const J of ge){const{transition:V,transitionEnd:F,...ne}=fs(e,J,kw(e,b))||{};me={...me,...ne,...F}}const{prevResolvedValues:Te}=_;for(const J in{...Te,...me}){if(J in k)continue;const V=me[J],F=Te[J],ne=Array.isArray(V)&&Array.isArray(F)?!qw(V,F)||K:V!==F;if(ne&&V==null)C.add(J);else if(ne||V!==void 0&&C.has(J)){U=!0,C.delete(J)&&(X=!0),_.needsAnimating[J]=!0;const ye=e.getValue(J);ye&&(ye.liveStyle=!1)}else _.protectedKeys[J]=!0}if(_.prevProp=D,_.prevResolvedValues=me,_.isActive&&(k={...k,...me}),U&&(!(G&&K)||X))for(const J of ge){const V={type:b};if(typeof J=="string"&&v&&g&&(m!=null&&m.enteringChildren)){const F=(ue=(ee=fs(m,J))==null?void 0:ee.transition)==null?void 0:ue.delayChildren;V.delay=vw(m.enteringChildren,e,F)}x.push({animation:J,options:V})}}),C.size){const{initial:b}=p,M={},_=typeof b!="boolean"&&fs(e,Array.isArray(b)?b[0]:b,(L=e.presenceContext)==null?void 0:L.custom);_&&_.transition&&(M.transition=_.transition),C.forEach(I=>{const j=e.getValue(I);j&&(j.liveStyle=!0);const D=_&&!Array.isArray(b)?_[I]:void 0,B=e.getBaseTargetFromProps(p,I);M[I]=(D!==void 0?D:B!==void 0&&!ct(B)?B:e.initialValues[I]===void 0?e.baseTarget[I]:void 0)??null}),x.push({animation:M})}const N=v&&e.blockInitialAnimation||i&&!g&&(p.initial===!1||p.initial===p.animate);return i=o=!1,!N&&x.length?t(x):Promise.resolve()}function u(d,p){var g;if(s[d].isActive===p)return Promise.resolve();(g=e.variantChildren)==null||g.forEach(v=>{var x;return(x=v.animationState)==null?void 0:x.setActive(d,p)}),s[d].isActive=p;const m=l(d);for(const v in s)s[v].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:d=>{t=d(e)},getState:()=>s,reset:()=>{s=c0(),o=!0}}}function Bb(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!qw(t,e):!1}function c0(){const e={};for(const t of _h)e[t]={isActive:t==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Of(e,t){e.min=t.min,e.max=t.max}function rn(e,t){Of(e.x,t.x),Of(e.y,t.y)}function d0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Qw=1e-4,zb=1-Qw,Ub=1+Qw,Gw=.01,$b=0-Gw,Hb=0+Gw;function Ct(e){return e.max-e.min}function Kb(e,t,s){return Math.abs(e-t)<=s}function f0(e,t,s,i=.5){e.origin=i,e.originPoint=Ae(t.min,t.max,e.origin),e.scale=Ct(s)/Ct(t),e.translate=Ae(s.min,s.max,e.origin)-e.originPoint,(e.scale>=zb&&e.scale<=Ub||isNaN(e.scale))&&(e.scale=1),(e.translate>=$b&&e.translate<=Hb||isNaN(e.translate))&&(e.translate=0)}function wo(e,t,s,i){f0(e.x,t.x,s.x,i?i.originX:void 0),f0(e.y,t.y,s.y,i?i.originY:void 0)}function h0(e,t,s,i=0){const o=i?Ae(s.min,s.max,i):s.min;e.min=o+t.min,e.max=e.min+Ct(t)}function Wb(e,t,s,i){h0(e.x,t.x,s.x,i==null?void 0:i.x),h0(e.y,t.y,s.y,i==null?void 0:i.y)}function p0(e,t,s,i=0){const o=i?Ae(s.min,s.max,i):s.min;e.min=t.min-o,e.max=e.min+Ct(t)}function Ol(e,t,s,i){p0(e.x,t.x,s.x,i==null?void 0:i.x),p0(e.y,t.y,s.y,i==null?void 0:i.y)}function m0(e,t,s,i,o){return e-=t,e=Il(e,1/s,i),o!==void 0&&(e=Il(e,1/o,i)),e}function qb(e,t=0,s=1,i=.5,o,l=e,u=e){if(Rn.test(t)&&(t=parseFloat(t),t=Ae(u.min,u.max,t/100)-u.min),typeof t!="number")return;let d=Ae(l.min,l.max,i);e===l&&(d-=t),e.min=m0(e.min,t,s,d,o),e.max=m0(e.max,t,s,d,o)}function g0(e,t,[s,i,o],l,u){qb(e,t[s],t[i],t[o],t.scale,l,u)}const Qb=["x","scaleX","originX"],Gb=["y","scaleY","originY"];function y0(e,t,s,i){g0(e.x,t,Qb,s?s.x:void 0,i?i.x:void 0),g0(e.y,t,Gb,s?s.y:void 0,i?i.y:void 0)}function v0(e){return e.translate===0&&e.scale===1}function Yw(e){return v0(e.x)&&v0(e.y)}function x0(e,t){return e.min===t.min&&e.max===t.max}function Yb(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function w0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xw(e,t){return w0(e.x,t.x)&&w0(e.y,t.y)}function S0(e){return Ct(e.x)/Ct(e.y)}function k0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Cn(e){return[e("x"),e("y")]}function C0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const s=C0(e,t.target.x),i=C0(e,t.target.y);return`${s}% ${i}%`}},Xb={correct:(e,{treeScale:t,projectionDelta:s})=>{const i=e,o=Ft.parse(e);if(o.length>5)return i;const l=Ft.createTransformer(e),u=typeof o[0]!="number"?1:0,d=s.x.scale*t.x,p=s.y.scale*t.y;o[0+u]/=d,o[1+u]/=p;const m=Ae(d,p,.5);return typeof o[2+u]=="number"&&(o[2+u]/=m),typeof o[3+u]=="number"&&(o[3+u]/=m),l(o)}};function Jb(e,t,s){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,u=(s==null?void 0:s.z)||0;if((o||l||u)&&(i=`translate3d(${o}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:m,rotate:g,pathRotation:v,rotateX:x,rotateY:C,skewX:k,skewY:T}=s;m&&(i=`perspective(${m}px) ${i}`),g&&(i+=`rotate(${g}deg) `),v&&(i+=`rotate(${v}deg) `),x&&(i+=`rotateX(${x}deg) `),C&&(i+=`rotateY(${C}deg) `),k&&(i+=`skewX(${k}deg) `),T&&(i+=`skewY(${T}deg) `)}const d=e.x.scale*t.x,p=e.y.scale*t.y;return(d!==1||p!==1)&&(i+=`scale(${d}, ${p})`),i||"none"}const Zb=Dh.length,E0=e=>typeof e=="number"||oe.test(e);function ej(e,t,s,i,o,l){o?(e.opacity=Ae(0,s.opacity??1,tj(i)),e.opacityExit=Ae(t.opacity??1,0,nj(i))):l&&(e.opacity=Ae(t.opacity??1,s.opacity??1,i));for(let u=0;u<Zb;u++){const d=Dh[u];let p=T0(t,d),m=T0(s,d);if(p===void 0&&m===void 0)continue;p||(p=0),m||(m=0),p===0||m===0||E0(p)===E0(m)?(e[d]=Math.max(Ae(i0(p),i0(m),i),0),(Rn.test(m)||Rn.test(p))&&(e[d]+="%")):e[d]=m}(t.rotate||s.rotate)&&(e.rotate=Ae(t.rotate||0,s.rotate||0,i))}function T0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const tj=Jw(0,.5,U1),nj=Jw(.5,.95,fn);function Jw(e,t,s){return i=>i<e?0:i>t?1:s(Eo(e,t,i))}function rj(e,t,s){const i=ct(e)?e:pi(e);return i.start(Rh("",i,t,s)),i.animation}function Ro(e,t,s,i={passive:!0}){return e.addEventListener(t,s,i),()=>e.removeEventListener(t,s,i)}const sj=(e,t)=>e.depth-t.depth;class ij{constructor(){this.children=[],this.isDirty=!1}add(t){hh(this.children,t),this.isDirty=!0}remove(t){jl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sj),this.isDirty=!1,this.children.forEach(t)}}function oj(e,t){const s=ut.now(),i=({timestamp:o})=>{const l=o-s;l>=t&&(Dr(i),e(l-t))};return Le.setup(i,!0),()=>Dr(i)}function Cl(e){return ct(e)?e.get():e}class aj{constructor(){this.members=[]}add(t){hh(this.members,t);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===t||i===this.lead||i===this.prevLead)continue;const o=i.instance;(!o||o.isConnected===!1)&&!i.snapshot&&(jl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(jl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){var s;for(let i=this.members.indexOf(t)-1;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1&&((s=o.instance)==null?void 0:s.isConnected)!==!1)return this.promote(o),!0}return!1}promote(t,s){var o;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:l}=i.options,{layoutDependency:u}=t.options;(l===void 0||l!==u)&&(t.resumeFrom=i,s&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(o=t.root)!=null&&o.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var s,i,o,l,u;(i=(s=t.options).onExitComplete)==null||i.call(s),(u=(o=t.resumingFrom)==null?void 0:(l=o.options).onExitComplete)==null||u.call(l)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const lj={borderRadius:{...ho,applyTo:[...Dh]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:Xb},El={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(jo,{...lj,...jo});const gd=["","X","Y","Z"],uj=1e3;let cj=0;function yd(e,t,s,i){const{latestValues:o}=t;o[e]&&(s[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Zw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=Tw(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Le,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Zw(i)}function eS({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(u={},d=t==null?void 0:t()){this.id=cj++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(hj),this.nodes.forEach(wj),this.nodes.forEach(Sj),this.nodes.forEach(pj)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new ij)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new Rl),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const p=this.eventHandlers.get(u);p&&p.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=Ah(u)&&!bb(u),this.instance=u;const{layoutId:d,layout:p,visualElement:m}=this.options;if(m&&!m.current&&m.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(p||d)&&(this.isLayoutDirty=!0),e){let g,v=0;const x=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{v=window.innerWidth}),e(u,()=>{const C=window.innerWidth;C!==v&&(v=C,this.root.updateBlockedByResize=!0,g&&g(),g=oj(x,250),El.hasAnimatedSinceResize&&(El.hasAnimatedSinceResize=!1,this.nodes.forEach(b0)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||p)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:v,hasRelativeLayoutChanged:x,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||m.getDefaultTransition()||Nj,{onLayoutAnimationStart:T,onLayoutAnimationComplete:E}=m.getProps(),N=!this.targetLayout||!Xw(this.targetLayout,C),L=!v&&x;if(this.options.layoutRoot||this.resumeFrom||L||v&&(N||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...jh(k,"layout"),onPlay:T,onComplete:E};(m.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(g,L,b.path)}else v||b0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Dr(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(kj),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Zw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const v=this.path[g];v.shouldResetTransform=!0,(typeof v.latestValues.x=="string"||typeof v.latestValues.y=="string")&&(v.isLayoutDirty=!0),v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:d,layout:p}=this.options;if(d===void 0&&!p)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const p=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),p&&this.nodes.forEach(gj),this.nodes.forEach(N0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(P0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(yj),this.nodes.forEach(vj),this.nodes.forEach(xj),this.nodes.forEach(dj),this.nodes.forEach(fj)):this.nodes.forEach(P0),this.clearAllSnapshots();const d=ut.now();Ze.delta=Yn(0,1e3/60,d-Ze.timestamp),Ze.timestamp=d,Ze.isProcessing=!0,cd.update.process(Ze),cd.preRender.process(Ze),cd.render.process(Ze),Ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ih.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mj),this.sharedNodes.forEach(Cj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ct(this.snapshot.measuredBox.x)&&!Ct(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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=Je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const p=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:p,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!o)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!Yw(this.projectionDelta),p=this.getTransformTemplate(),m=p?p(this.latestValues,""):void 0,g=m!==this.prevTransformTemplateValue;u&&this.instance&&(d||Xr(this.latestValues)||g)&&(o(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let p=this.removeElementScroll(d);return u&&(p=this.removeTransform(p)),Pj(p),{animationId:this.root.animationId,measuredBox:d,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:u}=this.options;if(!u)return Je();const d=u.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(bj))){const{scroll:g}=this.root;g&&(Pn(d.x,g.offset.x),Pn(d.y,g.offset.y))}return d}removeElementScroll(u){var p;const d=Je();if(rn(d,u),(p=this.scroll)!=null&&p.wasRoot)return d;for(let m=0;m<this.path.length;m++){const g=this.path[m],{scroll:v,options:x}=g;g!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&rn(d,u),Pn(d.x,v.offset.x),Pn(d.y,v.offset.y))}return d}applyTransform(u,d=!1,p){var g,v;const m=p||Je();rn(m,u);for(let x=0;x<this.path.length;x++){const C=this.path[x];!d&&C.options.layoutScroll&&C.scroll&&C!==C.root&&(Pn(m.x,-C.scroll.offset.x),Pn(m.y,-C.scroll.offset.y)),Xr(C.latestValues)&&xl(m,C.latestValues,(g=C.layout)==null?void 0:g.layoutBox)}return Xr(this.latestValues)&&xl(m,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),m}removeTransform(u){var p;const d=Je();rn(d,u);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!Xr(g.latestValues))continue;let v;g.instance&&(Ff(g.latestValues)&&g.updateSnapshot(),v=Je(),rn(v,g.measurePageBox())),y0(d,g.latestValues,(p=g.snapshot)==null?void 0:p.layoutBox,v)}return Xr(this.latestValues)&&y0(d,this.latestValues),d}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==Ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var C;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==d;if(!(u||p&&this.isSharedProjectionDirty||this.isProjectionDirty||(C=this.parent)!=null&&C.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:v}=this.options;if(!this.layout||!(g||v))return;this.resolvedRelativeTargetAt=Ze.timestamp;const x=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wb(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):rn(this.target,this.layout.layoutBox),Dw(this.target,this.targetDelta)):rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ff(this.parent.latestValues)||Mw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,d,p){this.relativeParent=u,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Ol(this.relativeTargetOrigin,d,p,this.options.layoutAnchor||void 0),rn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var k;const u=this.getLead(),d=!!this.resumingFrom||this!==u;let p=!0;if((this.isProjectionDirty||(k=this.parent)!=null&&k.isProjectionDirty)&&(p=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===Ze.timestamp&&(p=!1),p)return;const{layout:m,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||g))return;rn(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;ub(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Je());const{target:C}=u;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(d0(this.prevProjectionDelta.x,this.projectionDelta.x),d0(this.prevProjectionDelta.y,this.projectionDelta.y)),wo(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!k0(this.projectionDelta.x,this.prevProjectionDelta.x)||!k0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var d;if((d=this.options.visualElement)==null||d.scheduleRender(),u){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xs(),this.projectionDelta=Xs(),this.projectionDeltaWithTransform=Xs()}setAnimationOrigin(u,d=!1,p){const m=this.snapshot,g=m?m.latestValues:{},v={...this.latestValues},x=Xs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const C=Je(),k=m?m.source:void 0,T=this.layout?this.layout.source:void 0,E=k!==T,N=this.getStack(),L=!N||N.members.length<=1,b=!!(E&&!L&&this.options.crossfade===!0&&!this.path.some(Tj));this.animationProgress=0;let M;const _=p==null?void 0:p.interpolateProjection(u);this.mixTargetDelta=I=>{const j=I/1e3,D=_==null?void 0:_(j);D?(x.x.translate=D.x,x.x.scale=Ae(u.x.scale,1,j),x.x.origin=u.x.origin,x.x.originPoint=u.x.originPoint,x.y.translate=D.y,x.y.scale=Ae(u.y.scale,1,j),x.y.origin=u.y.origin,x.y.originPoint=u.y.originPoint):(j0(x.x,u.x,j),j0(x.y,u.y,j)),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ol(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ej(this.relativeTarget,this.relativeTargetOrigin,C,j),M&&Yb(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Je()),rn(M,this.relativeTarget)),E&&(this.animationValues=v,ej(v,g,this.latestValues,j,b,L)),D&&D.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=D.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var d,p,m;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(m=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||m.stop(),this.pendingAnimation&&(Dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{El.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pi(0)),this.motionValue.jump(0,!1),this.currentAnimation=rj(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),u.onUpdate&&u.onUpdate(g)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),WN(this.currentAnimation,this),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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uj),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead(),{targetWithTransforms:d,layout:p,latestValues:m}=u;let{target:g}=u;if(!(!d||!g||!p)){if(this!==u&&this.layout&&p&&tS(this.options.animationType,this.layout.layoutBox,p.layoutBox)){g=this.target||Je();const v=Ct(this.layout.layoutBox.x);g.x.min=u.target.x.min,g.x.max=g.x.min+v;const x=Ct(this.layout.layoutBox.y);g.y.min=u.target.y.min,g.y.max=g.y.min+x}rn(d,g),xl(d,m),wo(this.projectionDeltaWithTransform,this.layoutCorrected,d,m)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new aj),this.sharedNodes.get(u).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var d;const{layoutId:u}=this.options;return u?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:u}=this.options;return u?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:p}={}){const m=this.getStack();m&&m.promote(this,p),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:p}=u;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(d=!0),!d)return;const m={};p.z&&yd("z",u,m,this.animationValues);for(let g=0;g<gd.length;g++)yd(`rotate${gd[g]}`,u,m,this.animationValues),yd(`skew${gd[g]}`,u,m,this.animationValues);u.render();for(const g in m)u.setStaticValue(g,m[g]),this.animationValues&&(this.animationValues[g]=m[g]);u.scheduleRender()}applyProjectionStyles(u,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Cl(d==null?void 0:d.pointerEvents)||"",u.transform=p?p(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Cl(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Xr(this.latestValues)&&(u.transform=p?p({},""):"none",this.hasProjected=!1);return}u.visibility="";const g=m.animationValues||m.latestValues;this.applyTransformsToTarget();let v=Jb(this.projectionDeltaWithTransform,this.treeScale,g);p&&(v=p(g,v)),u.transform=v;const{x,y:C}=this.projectionDelta;u.transformOrigin=`${x.origin*100}% ${C.origin*100}% 0`,m.animationValues?u.opacity=m===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:u.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const k in jo){if(g[k]===void 0)continue;const{correct:T,applyTo:E,isCSSVariable:N}=jo[k],L=v==="none"?g[k]:T(g[k],m);if(E){const b=E.length;for(let M=0;M<b;M++)u[E[M]]=L}else N?this.options.visualElement.renderState.vars[k]=L:u[k]=L}this.options.layoutId&&(u.pointerEvents=m===this?Cl(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var d;return(d=u.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(N0),this.root.sharedNodes.clear()}}}function dj(e){e.updateLayout()}function fj(e){var s;const t=((s=e.resumeFrom)==null?void 0:s.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=e.layout,{animationType:l}=e.options,u=t.source!==e.layout.source;if(l==="size")Cn(v=>{const x=u?t.measuredBox[v]:t.layoutBox[v],C=Ct(x);x.min=i[v].min,x.max=x.min+C});else if(l==="x"||l==="y"){const v=l==="x"?"y":"x";Of(u?t.measuredBox[v]:t.layoutBox[v],i[v])}else tS(l,t.layoutBox,i)&&Cn(v=>{const x=u?t.measuredBox[v]:t.layoutBox[v],C=Ct(i[v]);x.max=x.min+C,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+C)});const d=Xs();wo(d,i,t.layoutBox);const p=Xs();u?wo(p,e.applyTransform(o,!0),t.measuredBox):wo(p,i,t.layoutBox);const m=!Yw(d);let g=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:C}=v;if(x&&C){const k=e.options.layoutAnchor||void 0,T=Je();Ol(T,t.layoutBox,x.layoutBox,k);const E=Je();Ol(E,i,C.layoutBox,k),Xw(T,E)||(g=!0),v.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=T,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:p,layoutDelta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function hj(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function pj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mj(e){e.clearSnapshot()}function N0(e){e.clearMeasurements()}function gj(e){e.isLayoutDirty=!0,e.updateLayout()}function P0(e){e.isLayoutDirty=!1}function yj(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function vj(e){var t;e.relativeTarget&&((t=e.relativeParent)!=null&&t.isLayoutDirty)&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function xj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function b0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wj(e){e.resolveTargetDelta()}function Sj(e){e.calcProjection()}function kj(e){e.resetSkewAndRotation()}function Cj(e){e.removeLeadSnapshot()}function j0(e,t,s){e.translate=Ae(t.translate,0,s),e.scale=Ae(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function R0(e,t,s,i){e.min=Ae(t.min,s.min,i),e.max=Ae(t.max,s.max,i)}function Ej(e,t,s,i){R0(e.x,t.x,s.x,i),R0(e.y,t.y,s.y,i)}function Tj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Nj={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),D0=M0("applewebkit/")&&!M0("chrome/")?Math.round:fn;function A0(e){e.min=D0(e.min),e.max=D0(e.max)}function Pj(e){A0(e.x),A0(e.y)}function tS(e,t,s){return e==="position"||e==="preserve-aspect"&&!Kb(S0(t),S0(s),.2)}function bj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const jj=eS({attachResizeListener:(e,t)=>Ro(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),vd={current:void 0},nS=eS({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!vd.current){const e=new jj({});e.mount(window),e.setOptions({layoutScroll:!0}),vd.current=e}return vd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Bh=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function L0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Rj(...e){return t=>{let s=!1;const i=e.map(o=>{const l=L0(o,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():L0(e[o],null)}}}}function Mj(...e){return S.useCallback(Rj(...e),e)}class Dj extends S.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(vl(s)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=s.offsetParent,o=vl(i)&&i.offsetWidth||0,l=vl(i)&&i.offsetHeight||0,u=getComputedStyle(s),d=this.props.sizeRef.current;d.height=parseFloat(u.height),d.width=parseFloat(u.width),d.top=s.offsetTop,d.left=s.offsetLeft,d.right=o-d.width-d.left,d.bottom=l-d.height-d.top,d.direction=u.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Aj({children:e,isPresent:t,anchorX:s,anchorY:i,root:o,pop:l}){var x;const u=S.useId(),d=S.useRef(null),p=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=S.useContext(Bh),g=l!==!1?((x=e.props)==null?void 0:x.ref)??(e==null?void 0:e.ref):void 0,v=Mj(d,g);return S.useInsertionEffect(()=>{const{width:C,height:k,top:T,left:E,right:N,bottom:L,direction:b}=p.current;if(t||l===!1||!d.current||!C||!k)return;const M=b==="rtl",_=s==="left"?M?`right: ${N}`:`left: ${E}`:M?`left: ${E}`:`right: ${N}`,I=i==="bottom"?`bottom: ${L}`:`top: ${T}`;d.current.dataset.motionPopId=u;const j=document.createElement("style");m&&(j.nonce=m);const D=o??document.head;return D.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
|
347
|
+
[data-motion-pop-id="${u}"] {
|
|
348
|
+
position: absolute !important;
|
|
349
|
+
width: ${C}px !important;
|
|
350
|
+
height: ${k}px !important;
|
|
351
|
+
${_}px !important;
|
|
352
|
+
${I}px !important;
|
|
353
|
+
}
|
|
354
|
+
`),()=>{var B;(B=d.current)==null||B.removeAttribute("data-motion-pop-id"),D.contains(j)&&D.removeChild(j)}},[t]),f.jsx(Dj,{isPresent:t,childRef:d,sizeRef:p,pop:l,children:l===!1?e:S.cloneElement(e,{ref:v})})}const Lj=({children:e,initial:t,isPresent:s,onExitComplete:i,custom:o,presenceAffectsLayout:l,mode:u,anchorX:d,anchorY:p,root:m})=>{const g=fh(Ij),v=S.useId(),x=S.useRef(s),C=S.useRef(i);Co(()=>{x.current=s,C.current=i});let k=!0,T=S.useMemo(()=>(k=!1,{id:v,initial:t,isPresent:s,custom:o,onExitComplete:E=>{g.set(E,!0);for(const N of g.values())if(!N)return;i&&i()},register:E=>(g.set(E,!1),()=>{var N;g.delete(E),!x.current&&!g.size&&((N=C.current)==null||N.call(C))})}),[s,g,i]);return l&&k&&(T={...T}),S.useMemo(()=>{g.forEach((E,N)=>g.set(N,!1))},[s]),S.useEffect(()=>{!s&&!g.size&&i&&i()},[s]),e=f.jsx(Aj,{pop:u==="popLayout",isPresent:s,anchorX:d,anchorY:p,root:m,children:e}),f.jsx(Kl.Provider,{value:T,children:e})};function Ij(){return new Map}function rS(e=!0){const t=S.useContext(Kl);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:o}=t,l=S.useId();S.useEffect(()=>{if(e)return o(l)},[e]);const u=S.useCallback(()=>e&&i&&i(l),[l,i,e]);return!s&&i?[!1,u]:[!0]}const po=e=>e.key||"";function I0(e){const t=[];return S.Children.forEach(e,s=>{S.isValidElement(s)&&t.push(s)}),t}const Lr=({children:e,custom:t,initial:s=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:l="sync",propagate:u=!1,anchorX:d="left",anchorY:p="top",root:m})=>{const[g,v]=rS(u),x=S.useMemo(()=>I0(e),[e]),C=u&&!g?[]:x.map(po),k=S.useRef(!0),T=fh(()=>new Map),E=S.useRef(new Set),[N,L]=S.useState(x),[b,M]=S.useState(x);Co(()=>{u&&!g&&!b.length&&(v==null||v())},[g,u,b.length,v]),Co(()=>{k.current=!1;for(let j=0;j<b.length;j++){const D=po(b[j]);C.includes(D)?(T.delete(D),E.current.delete(D)):T.get(D)!==!0&&T.set(D,!1)}},[b,C.length,C.join("-")]);const _=[];if(x!==N){let j=[...x],D=0;for(const B of b){const W=C.indexOf(po(B));W===-1?(j.splice(D++,0,B),_.push(B)):D=W+_.length+1}return _.every(B=>T.get(po(B)))?j=x:l==="wait"&&(j=_),M(I0(j)),L(x),null}const{forceRender:I}=S.useContext(dh);return f.jsx(f.Fragment,{children:b.map(j=>{const D=po(j),B=u&&!g?!1:x===b||C.includes(D),W=()=>{if(E.current.has(D))return;if(T.has(D))E.current.add(D),T.set(D,!0);else return;let G=!0;T.forEach(K=>{K||(G=!1)}),G&&(I==null||I(),L([]),u&&(v==null||v()),i&&i())};return f.jsx(Lj,{isPresent:B,initial:!k.current||s?void 0:!1,custom:t,presenceAffectsLayout:o,mode:l,root:m,onExitComplete:B?void 0:W,anchorX:d,anchorY:p,children:j},D)})})},sS=S.createContext({strict:!1}),F0={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"]};let _0=!1;function Fj(){if(_0)return;const e={};for(const t in F0)e[t]={isEnabled:s=>F0[t].some(i=>!!s[i])};Bw(e),_0=!0}function iS(){return Fj(),Db()}function _j(e){const t=iS();for(const s in e)t[s]={...t[s],...e[s]};Bw(t)}const Yl=S.createContext({});function Oj(e,t){if(Gl(e)){const{initial:s,animate:i}=e;return{initial:s===!1||bo(s)?s:void 0,animate:bo(i)?i:void 0}}return e.inherit!==!1?t:{}}function Vj(e){const{initial:t,animate:s}=Oj(e,S.useContext(Yl));return S.useMemo(()=>({initial:t,animate:s}),[O0(t),O0(s)])}function O0(e){return Array.isArray(e)?e.join(" "):e}const zh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function oS(e,t,s){for(const i in t)!ct(t[i])&&!$w(i,s)&&(e[i]=t[i])}function Bj({transformTemplate:e},t){return S.useMemo(()=>{const s=zh();return Lh(s,t,e),Object.assign({},s.vars,s.style)},[t])}function zj(e,t){const s=e.style||{},i={};return oS(i,s,e),Object.assign(i,Bj(e,t)),i}function Uj(e,t){const s={},i=zj(e,t);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=i,s}const aS=()=>({...zh(),attrs:{}});function $j(e,t,s,i){const o=S.useMemo(()=>{const l=aS();return jw(l,t,Kw(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};oS(l,e.style,e),o.style={...l,...o.style}}return o}const Hj=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Vl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Hj.has(e)}function Kj(e,t){return e.startsWith("on")?!Vl(e):(t==null?void 0:t(e))??!Vl(e)}function Wj(e,t,s,i){const o={};for(const l in e)l==="values"&&typeof e.values=="object"||ct(e[l])||(Kj(l,i)||s===!0&&Vl(l)||!t&&!Vl(l)||e.draggable&&l.startsWith("onDrag"))&&(o[l]=e[l]);return o}const qj=["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 Uh(e){return typeof e!="string"||e.includes("-")?!1:!!(qj.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qj(e,t,s,{latestValues:i},o,l=!1,u,d){const m=(u??Uh(e)?$j:Uj)(t,i,o,e),g=Wj(t,typeof e=="string",l,d),v=e!==S.Fragment?{...g,...m,ref:s}:{},{children:x}=t,C=S.useMemo(()=>ct(x)?x.get():x,[x]);return S.createElement(e,{...v,children:C})}function Gj({scrapeMotionValuesFromProps:e,createRenderState:t},s,i,o){return{latestValues:Yj(s,i,o,e),renderState:t()}}function Yj(e,t,s,i){const o={},l=i(e,{});for(const x in l)o[x]=Cl(l[x]);let{initial:u,animate:d}=e;const p=Gl(e),m=Ow(e);t&&m&&!p&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let g=s?s.initial===!1:!1;g=g||u===!1;const v=g?d:u;if(v&&typeof v!="boolean"&&!Ql(v)){const x=Array.isArray(v)?v:[v];for(let C=0;C<x.length;C++){const k=Sw(e,x[C]);if(k){const{transitionEnd:T,transition:E,...N}=k;for(const L in N){let b=N[L];if(Array.isArray(b)){const M=g?b.length-1:0;b=b[M]}b!==null&&(o[L]=b)}for(const L in T)o[L]=T[L]}}}return o}const lS=e=>(t,s)=>{const i=S.useContext(Yl),o=S.useContext(Kl),l=()=>Gj(e,t,i,o);return s?l():fh(l)},Xj=lS({scrapeMotionValuesFromProps:Vh,createRenderState:zh}),Jj=lS({scrapeMotionValuesFromProps:Ww,createRenderState:aS}),Zj=Symbol.for("motionComponentSymbol");function eR(e,t,s){const i=S.useRef(s);S.useInsertionEffect(()=>{i.current=s});const o=S.useRef(null);return S.useCallback(l=>{var d;l&&((d=e.onMount)==null||d.call(e,l)),t&&(l?t.mount(l):t.unmount());const u=i.current;if(typeof u=="function")if(l){const p=u(l);typeof p=="function"&&(o.current=p)}else o.current?(o.current(),o.current=null):u(l);else u&&(u.current=l)},[t])}const uS=S.createContext({});function Qs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tR(e,t,s,i,o,l){var b,M;const{visualElement:u}=S.useContext(Yl),d=S.useContext(sS),p=S.useContext(Kl),m=S.useContext(Bh),g=m.reducedMotion,v=m.skipAnimations,x=S.useRef(null),C=S.useRef(!1);i=i||d.renderer,!x.current&&i&&(x.current=i(e,{visualState:t,parent:u,props:s,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g,skipAnimations:v,isSVG:l}),C.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const k=x.current,T=S.useContext(uS);k&&!k.projection&&o&&(k.type==="html"||k.type==="svg")&&nR(x.current,s,o,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{k&&E.current&&k.update(s,p)});const N=s[Ew],L=S.useRef(!!N&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,N))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,N)));return Co(()=>{var _;!C.current||!k||((_=k.animationState)==null||_.animateChanges(),k.enteringChildren=void 0)},[]),Co(()=>{C.current=!0,k&&(E.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),L.current&&k.animationState&&k.animationState.animateChanges())}),S.useEffect(()=>{k&&(!L.current&&k.animationState&&k.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,N)}),L.current=!1),k.enteringChildren=void 0)}),k}function nR(e,t,s,i){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:p,layoutRoot:m,layoutAnchor:g,layoutCrossfade:v}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:cS(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&Qs(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:v,layoutScroll:p,layoutRoot:m,layoutAnchor:g})}function cS(e){if(e)return e.options.allowProjection!==!1?e.projection:cS(e.parent)}function xd(e,{forwardMotionProps:t=!1,type:s}={},i,o){i&&_j(i);const l=s?s==="svg":Uh(e),u=l?Jj:Xj;function d(m,g){let v;const x={...S.useContext(Bh),...m,layoutId:rR(m)},{isStatic:C,isValidProp:k}=x,T=Vj(m),E=u(m,C);if(!C&&typeof window<"u"){sR();const N=iR(x);v=N.MeasureLayout,T.visualElement=tR(e,E,x,o,N.ProjectionNode,l)}return f.jsxs(Yl.Provider,{value:T,children:[v&&T.visualElement?f.jsx(v,{visualElement:T.visualElement,...x}):null,Qj(e,m,eR(E,T.visualElement,g),E,C,t,l,k)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const p=S.forwardRef(d);return p[Zj]=e,p}function rR({layoutId:e}){const t=S.useContext(dh).id;return t&&e!==void 0?t+"-"+e:e}function sR(e,t){S.useContext(sS).strict}function iR(e){const t=iS(),{drag:s,layout:i}=t;if(!s&&!i)return{};const o={...s,...i};return{MeasureLayout:s!=null&&s.isEnabled(e)||i!=null&&i.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function oR(e,t){if(typeof Proxy>"u")return xd;const s=new Map,i=(l,u)=>xd(l,u,e,t),o=(l,u)=>i(l,u);return new Proxy(o,{get:(l,u)=>u==="create"?i:(s.has(u)||s.set(u,xd(u,void 0,e,t)),s.get(u))})}const aR=(e,t)=>t.isSVG??Uh(e)?new _b(t):new Ib(t,{allowProjection:e!==S.Fragment});class lR extends Ar{constructor(t){super(t),t.animationState||(t.animationState=Vb(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ql(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let uR=0;class cR extends Ar{constructor(){super(...arguments),this.id=uR++}update(){var p;const{presenceContext:t,prevPresenceContext:s,animationState:i}=this.node;if(!t||!i)return;const{isPresent:o,onExitComplete:l}=t,u=s==null?void 0:s.isPresent;if(o===u)return;if(o&&u===!1){if(this.exit===!0){const{initial:m}=this.node.getProps();if(m&&!Array.isArray(m)){const{transition:g,transitionEnd:v,...x}=fs(this.node,m)||{};for(const C in x)(p=this.node.getValue(C))==null||p.jump(x[C])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const d=this.exit=i.setActive("exit",!o);l&&!o&&d.then(()=>{this.exit===d&&(this.exit=!0,l(this.id))})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const dR={animation:{Feature:lR},exit:{Feature:cR}};function Xl(e){return{point:{x:e.pageX,y:e.pageY}}}const fR=e=>t=>Fh(t)&&e(t,Xl(t));function So(e,t,s,i){return Ro(e,t,fR(s),i)}const dS=({current:e})=>e?e.ownerDocument.defaultView:null,V0=(e,t)=>Math.abs(e-t);function hR(e,t){const s=V0(e.x,t.x),i=V0(e.y,t.y);return Math.sqrt(s**2+i**2)}const B0=new Set(["auto","scroll"]);class fS{constructor(t,s,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3,element:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=al(this.lastRawMoveEventInfo,this.transformPagePoint));const k=wd(this.lastMoveEventInfo,this.history),T=this.startEvent!==null,E=hR(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!T&&!E)return;const{point:N}=k;this.history.push({...N,timestamp:ut.now()});const{onStart:L,onMove:b}=this.handlers;T||(L&&L(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,k)},this.handlePointerMove=(k,T)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=T,this.lastMoveEventInfo=al(T,this.transformPagePoint),this.hasPendingMove=!0,Le.update(this.updatePoint,!0)},this.handlePointerUp=(k,T)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:E,onSessionEnd:N,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=wd(k.type==="pointercancel"?this.lastMoveEventInfo:al(T,this.transformPagePoint),this.history);this.startEvent&&E&&E(k,b),N&&N(k,b)},!Fh(t))return;this.dragSnapToOrigin=l,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=o||window;const p=Xl(t),m=al(p,this.transformPagePoint),{point:g}=m,{timestamp:v}=Ze;this.history=[{...g,timestamp:v}];const{onSessionStart:x}=s;x&&x(t,wd(m,this.history));const C={passive:!0,capture:!0};this.removeListeners=Vo(So(this.contextWindow,"pointermove",this.handlePointerMove,C),So(this.contextWindow,"pointerup",this.handlePointerUp,C),So(this.contextWindow,"pointercancel",this.handlePointerUp,C)),d&&this.startScrollTracking(d)}startScrollTracking(t){let s=t.parentElement;for(;s;){const i=getComputedStyle(s);(B0.has(i.overflowX)||B0.has(i.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const s=this.scrollPositions.get(t);if(!s)return;const i=t===window,o=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:o.x-s.x,y:o.y-s.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,o),Le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Dr(this.updatePoint)}}function al(e,t){return t?{point:t(e.point)}:e}function z0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wd({point:e},t){return{point:e,delta:z0(e,hS(t)),offset:z0(e,pR(t)),velocity:mR(t,.1)}}function pR(e){return e[0]}function hS(e){return e[e.length-1]}function mR(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const o=hS(e);for(;s>=0&&(i=e[s],!(o.timestamp-i.timestamp>Wt(t)));)s--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&o.timestamp-i.timestamp>Wt(t)*2&&(i=e[1]);const l=Kt(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function gR(e,{min:t,max:s},i){return t!==void 0&&e<t?e=i?Ae(t,e,i.min):Math.max(e,t):s!==void 0&&e>s&&(e=i?Ae(s,e,i.max):Math.min(e,s)),e}function U0(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function yR(e,{top:t,left:s,bottom:i,right:o}){return{x:U0(e.x,s,o),y:U0(e.y,t,i)}}function $0(e,t){let s=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,i]=[i,s]),{min:s,max:i}}function vR(e,t){return{x:$0(e.x,t.x),y:$0(e.y,t.y)}}function xR(e,t){let s=.5;const i=Ct(e),o=Ct(t);return o>i?s=Eo(t.min,t.max-i,e.min):i>o&&(s=Eo(e.min,e.max-o,t.min)),Yn(0,1,s)}function wR(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Vf=.35;function SR(e=Vf){return e===!1?e=0:e===!0&&(e=Vf),{x:H0(e,"left","right"),y:H0(e,"top","bottom")}}function H0(e,t,s){return{min:K0(e,t),max:K0(e,s)}}function K0(e,t){return typeof e=="number"?e:e[t]||0}const kR=new WeakMap;class CR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=v=>{s&&this.snapToCursor(v),this.stopAnimation()},u=(v,x)=>{const{drag:C,dragPropagation:k,onDragStart:T}=this.getProps();if(C&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=db(C),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cn(N=>{let L=this.getAxisMotionValue(N).get()||0;if(Rn.test(L)){const{projection:b}=this.visualElement;if(b&&b.layout){const M=b.layout.layoutBox[N];M&&(L=Ct(M)*(parseFloat(L)/100))}}this.originPoint[N]=L}),T&&Le.update(()=>T(v,x),!1,!0),Af(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},d=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:C,dragDirectionLock:k,onDirectionLock:T,onDrag:E}=this.getProps();if(!C&&!this.openDragLock)return;const{offset:N}=x;if(k&&this.currentDirection===null){this.currentDirection=TR(N),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",x.point,N),this.updateAxis("y",x.point,N),this.visualElement.render(),E&&Le.update(()=>E(v,x),!1,!0)},p=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new fS(t,{onSessionStart:l,onStart:u,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:i,contextWindow:dS(this.visualElement),element:this.visualElement.current})}stop(t,s){const i=t||this.latestPointerEvent,o=s||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:d}=this.getProps();d&&Le.postRender(()=>d(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,s,i){const{drag:o}=this.getProps();if(!i||!ll(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(u=gR(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){var l;const{dragConstraints:t,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,o=this.constraints;t&&Qs(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=yR(i.layoutBox,t):this.constraints=!1,this.elastic=SR(s),o!==this.constraints&&!Qs(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&Cn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=wR(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!Qs(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const l=cb(i,o.root,this.visualElement.getTransformPagePoint());let u=vR(o.layout.layoutBox,l);if(s){const d=s(ab(u));this.hasMutatedConstraints=!!d,d&&(u=Rw(d))}return u}startAnimation(t){const{drag:s,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),p=this.constraints||{},m=Cn(g=>{if(!ll(g,s,this.currentDirection))return;let v=p&&p[g]||{};(u===!0||u===g)&&(v={min:0,max:0});const x=o?200:1e6,C=o?40:1e7,k={type:"inertia",velocity:i?t[g]:0,bounceStiffness:x,bounceDamping:C,timeConstant:750,restDelta:1,restSpeed:10,...l,...v};return this.startAxisValueAnimation(g,k)});return Promise.all(m).then(d)}startAxisValueAnimation(t,s){const i=this.getAxisMotionValue(t);return Af(this.visualElement,t),i.start(Rh(t,i,0,s,this.visualElement,!1))}stopAnimation(){Cn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps()[s];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:s}){var d;const{drag:i}=this.getProps(),o={x:t,y:s},l=((d=this.visualElement.getTransformPagePoint())==null?void 0:d(o))||o,u=this.visualElement.measureViewportBox();Cn(p=>{if(!ll(p,i,this.currentDirection))return;const m=this.getAxisMotionValue(p),{min:g,max:v}=u[p];m.set((m.get()||0)+l[p]-Ae(g,v,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!Qs(s)||!i||!this.constraints)return;this.stopAnimation();const o=this.constraints,l={x:0,y:0};Cn(d=>{const p=this.getAxisMotionValue(d).get();l[d]=xR({min:p,max:p},o[d])});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Cn(d=>{const p=this.getAxisMotionValue(d);if(!ll(d,t,null)||!p.get())return;const{min:m,max:g}=this.constraints[d];p.set(Ae(m,g,l[d]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;kR.set(this.visualElement,this);const t=this.visualElement.current,s=So(t,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps(),x=m.target,C=x!==t&&yb(x);g&&v&&!C&&this.start(m)});let i;const o=()=>{const{dragConstraints:m}=this.getProps();Qs(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ER(t,m.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,u=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Le.read(o);const d=Ro(window,"resize",()=>this.scalePositionWithinConstraints()),p=l.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Cn(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=m[v].translate,x.set(x.get()+m[v].translate))}),this.visualElement.render())}));return()=>{d(),s(),u(),p&&p(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Vf,dragMomentum:d=!0}=t;return{...t,drag:s,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function W0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function ER(e,t,s){const i=s0(e,W0(s)),o=s0(t,W0(s));return()=>{i(),o()}}function ll(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function TR(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class NR extends Ar{constructor(t){super(t),this.removeGroupControls=fn,this.removeListeners=fn,this.controls=new CR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Sd=e=>(t,s)=>{e&&Le.update(()=>e(t,s),!1,!0)};class PR extends Ar{constructor(){super(...arguments),this.removePointerDownListener=fn}onPointerDown(t){this.session=new fS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:dS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:Sd(t),onStart:Sd(s),onMove:Sd(i),onEnd:(l,u)=>{delete this.session,o&&Le.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=So(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let kd=!1;class bR extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(s.group&&s.group.add(l),i&&i.register&&o&&i.register(l),kd&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),El.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:i,drag:o,isPresent:l}=this.props,{projection:u}=i;return u&&(u.isPresent=l,t.layoutDependency!==s&&u.setOptions({...u.options,layoutDependency:s}),kd=!0,o||t.layoutDependency!==s||s===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||Le.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:s}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=s,i.root.didUpdate(),Ih.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:o}=t;kd=!0,o&&(o.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function pS(e){const[t,s]=rS(),i=S.useContext(dh);return f.jsx(bR,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(uS),isPresent:t,safeToRemove:s})}const jR={pan:{Feature:PR},drag:{Feature:NR,ProjectionNode:nS,MeasureLayout:pS}};function q0(e,t,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const o="onHover"+s,l=i[o];l&&Le.postRender(()=>l(t,Xl(t)))}class RR extends Ar{mount(){const{current:t}=this.node;t&&(this.unmount=hb(t,(s,i)=>(q0(this.node,i,"Start"),o=>q0(this.node,o,"End"))))}unmount(){}}class MR extends Ar{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vo(Ro(this.node.current,"focus",()=>this.onFocus()),Ro(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Q0(e,t,s){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",s==="Start");const o="onTap"+(s==="End"?"":s),l=i[o];l&&Le.postRender(()=>l(t,Xl(t)))}class DR extends Ar{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:s,propagate:i}=this.node.props;this.unmount=xb(t,(o,l)=>(Q0(this.node,l,"Start"),(u,{success:d})=>Q0(this.node,u,d?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const Bf=new WeakMap,Cd=new WeakMap,AR=e=>{const t=Bf.get(e.target);t&&t(e)},LR=e=>{e.forEach(AR)};function IR({root:e,...t}){const s=e||document;Cd.has(s)||Cd.set(s,{});const i=Cd.get(s),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(LR,{root:e,...t})),i[o]}function FR(e,t,s){const i=IR(t);return Bf.set(e,s),i.observe(e),()=>{Bf.delete(e),i.unobserve(e)}}const _R={some:0,all:1};class OR extends Ar{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var p;(p=this.stopObserver)==null||p.call(this);const{viewport:t={}}=this.node.getProps(),{root:s,margin:i,amount:o="some",once:l}=t,u={root:s?s.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:_R[o]},d=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,l&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),C=g?v:x;C&&C(m)};this.stopObserver=FR(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(VR(t,s))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function VR({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const BR={inView:{Feature:OR},tap:{Feature:DR},focus:{Feature:MR},hover:{Feature:RR}},zR={layout:{ProjectionNode:nS,MeasureLayout:pS}},UR={...dR,...BR,...jR,...zR},$R=oR(UR,aR);function mn(){!Oh.current&&Vw();const[e]=S.useState(Fl.current);return e}const Qt=$R;function HR(e,t){const[s,i]=S.useState(e);return S.useEffect(()=>{const o=window.setTimeout(()=>i(e),t);return()=>window.clearTimeout(o)},[e,t]),s}const mS=S.createContext(null);function Jl(){const e=S.useContext(mS);if(e===null)throw new Error("useDriveShell must be used within the drive layout");return e}function KR(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function WR(e,t=!0){const s=S.useRef(e);s.current=e,S.useEffect(()=>{if(!t)return;const i=o=>{const l=o.ctrlKey||o.metaKey,u=KR(o.target),d=s.current;if(l&&o.key.toLowerCase()==="k"){o.preventDefault(),d.onSearch();return}if(l&&o.key.toLowerCase()==="a"){if(u)return;o.preventDefault(),d.onSelectAll();return}if(o.key==="Escape"){d.onEscape();return}if(!u){if(o.key==="Delete"||o.key==="Backspace"){o.preventDefault(),d.onDelete();return}if(o.key==="Enter"){d.onEnter();return}o.key==="?"&&(o.preventDefault(),d.onHelp())}};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t])}const Uo=["me"],$h=["folders","tree"],qR=["storage","stats"],gS={user:null,storage:null,health:null};function ys(e){e.invalidateQueries({queryKey:["files"]}),e.invalidateQueries({queryKey:["folders"]}),e.invalidateQueries({queryKey:["trash"]}),e.invalidateQueries({queryKey:["starred"]}),e.invalidateQueries({queryKey:["recent"]}),e.invalidateQueries({queryKey:["search"]}),e.invalidateQueries({queryKey:["activity"]}),e.invalidateQueries({queryKey:["subtree-files"]}),e.invalidateQueries({queryKey:["storage"]})}function QR(e,t){e.invalidateQueries({queryKey:["versions",t]})}function Hh(){return Gn({queryKey:Uo,queryFn:xe.auth.me})}function G0(e){return typeof e=="object"&&e!==null}function GR(e,t){let s=null;try{s=JSON.parse(t)}catch{}if(G0(s)&&G0(s.file)){const i=s.file;if(typeof i.id=="string"&&typeof i.name=="string")return i}throw new Rr(e,"UNKNOWN","The server returned an unexpected response")}function yS(e,t,s,i){return new Promise((o,l)=>{const u=new XMLHttpRequest;u.open("POST",e);const d=new FormData;s!==null&&d.append("folderId",s),i.operationId&&d.append("operationId",i.operationId),d.append("file",t,t.name),u.upload.addEventListener("progress",m=>{var v;if(!m.lengthComputable)return;const g=Math.min(100,Math.round(m.loaded/m.total*100));(v=i.onProgress)==null||v.call(i,{loaded:m.loaded,total:m.total,percent:g})}),u.addEventListener("load",()=>{if(u.status>=200&&u.status<300){try{o(GR(u.status,u.responseText))}catch(g){l(g)}return}const m=M1(u.status,u.responseText);u.status===401&&m.code!=="TELEGRAM_AUTH_REQUIRED"&&R1(),l(m)}),u.addEventListener("error",()=>{l(new Rr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again."))}),u.addEventListener("abort",()=>{l(new Rr(0,"ABORTED","Upload cancelled"))});const p=i.signal;if(p!==void 0){if(p.aborted){l(new Rr(0,"ABORTED","Upload cancelled"));return}p.addEventListener("abort",()=>u.abort(),{once:!0})}u.send(d)})}function YR(e,t,s={}){return yS("/api/files",e,t,s)}function XR(e,t,s={}){return yS(`/api/files/${encodeURIComponent(t)}/replace`,e,null,s)}const vS=S.createContext(null),JR=4e3;function ZR({children:e}){const[t,s]=S.useState([]),i=mn(),o=S.useRef(new Set),l=S.useRef(0);S.useEffect(()=>{const g=o.current;return()=>{for(const v of g)window.clearTimeout(v)}},[]);const u=S.useCallback(g=>{s(v=>v.filter(x=>x.id!==g))},[]),d=S.useCallback((g,v)=>{const x=l.current;l.current+=1,s(k=>[...k,{id:x,kind:g,message:v}]);const C=window.setTimeout(()=>{o.current.delete(C),u(x)},JR);o.current.add(C)},[u]),p=S.useMemo(()=>({success:g=>d("success",g),error:g=>d("error",g)}),[d]),m=i?0:16;return f.jsxs(vS.Provider,{value:p,children:[e,f.jsx("div",{"aria-live":"polite",className:"pointer-events-none fixed top-4 right-4 z-[200] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:f.jsx(Lr,{children:t.map(g=>f.jsxs(Qt.div,{role:g.kind==="error"?"alert":"status",initial:{opacity:0,x:m},animate:{opacity:1,x:0},exit:{opacity:0,x:m},transition:{duration:.18,ease:"easeOut"},className:"glass-strong pointer-events-auto flex items-start gap-2.5 rounded-xl border border-line px-4 py-3 text-[13px]",children:[g.kind==="error"?f.jsx(xT,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}):f.jsx(ah,{className:"mt-0.5 h-4 w-4 shrink-0 text-gold-text","aria-hidden":"true"}),f.jsx("p",{className:"min-w-0 flex-1 break-words",children:g.message}),f.jsx("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>u(g.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},g.id))})})]})}function Ir(){const e=S.useContext(vS);if(e===null)throw new Error("useToast must be used within a ToastProvider");return e}let ul=0;function Y0(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`op-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}function eM(){const e=Gt(),t=Ir(),[s,i]=S.useState([]),o=S.useRef(new Map),l=S.useRef(new Map),u=S.useRef(Promise.resolve()),d=S.useRef(new Set),p=S.useRef(!0),m=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{const I=d.current,j=l.current;return()=>{p.current=!1;for(const D of I)window.clearTimeout(D);for(const D of j.values())D.abort()}},[]);const v=S.useCallback(I=>{const j=window.setTimeout(()=>{d.current.delete(j),i(D=>D.filter(B=>B.id!==I)),o.current.delete(I)},5e3);d.current.add(j)},[]),x=S.useCallback(async I=>{const j=new AbortController;l.current.set(I.id,j);try{const D={signal:j.signal,onProgress:({loaded:W,total:G,percent:K})=>{i(U=>U.map(X=>X.id===I.id?{...X,loaded:W,size:G||X.size,percent:K}:X))}},B=I.replaceId===null?await YR(I.file,I.folderId,{...D,operationId:I.operationId}):await XR(I.file,I.replaceId,{...D,operationId:I.operationId});if(!p.current)return;i(W=>W.map(G=>G.id===I.id?{...G,status:"done",percent:100}:G)),ys(e),I.replaceId!==null&&QR(e,I.replaceId),t.success(I.replaceId===null?`Uploaded "${B.name}"`:`Replaced "${B.name}"`),v(I.id)}catch(D){if(!p.current)return;const B=Ie(D,"Upload failed"),W=B==="Upload cancelled";i(G=>G.map(K=>K.id===I.id?{...K,status:W?"cancelled":"error",message:B}:K)),W||t.error(`Could not upload "${I.file.name}": ${B}`)}finally{l.current.delete(I.id)}},[e,v,t]),C=S.useCallback(I=>{o.current.set(I.id,I),i(j=>[...j,{id:I.id,name:I.file.name,size:I.file.size,loaded:0,percent:0,status:"uploading"}]),u.current=u.current.then(()=>x(I))},[x]),k=S.useCallback((I,j)=>{for(const D of I)ul+=1,C({id:ul,file:D,replaceId:null,folderId:j,operationId:Y0()})},[C]),T=S.useCallback((I,j)=>{ul+=1,C({id:ul,file:I,replaceId:j,folderId:null,operationId:Y0()})},[C]),E=S.useCallback(I=>{var j;(j=l.current.get(I))==null||j.abort()},[]),N=S.useCallback(I=>{const j=o.current.get(I);j!==void 0&&(i(D=>D.map(B=>B.id===I?{...B,status:"uploading",percent:0,loaded:0,message:void 0}:B)),u.current=u.current.then(()=>x(j)))},[x]),L=S.useCallback(I=>{var j;(j=l.current.get(I))==null||j.abort(),o.current.delete(I),i(D=>D.filter(B=>B.id!==I))},[]),b=S.useCallback(()=>{i(I=>{for(const j of I)j.status!=="uploading"&&o.current.delete(j.id);return I.filter(j=>j.status==="uploading")})},[]),M=S.useCallback(I=>{var j;g.current=I,(j=m.current)==null||j.click()},[]),_=S.useCallback(()=>{const I=m.current;if(I===null)return;const j=Array.from(I.files??[]);I.value="",j.length>0&&k(j,g.current)},[k]);return{uploads:s,enqueue:k,replace:T,cancel:E,retry:N,dismiss:L,clearFinished:b,openPicker:M,pickerInputRef:m,onPickerChange:_}}function $o({title:e,onClose:t,children:s}){const i=S.useRef(null),o=S.useId(),l=mn();return S.useEffect(()=>{const u=d=>{d.key==="Escape"&&t()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t]),S.useEffect(()=>{const u=i.current;u!==null&&(u.contains(document.activeElement)||u.focus())},[]),f.jsx("div",{className:"fixed inset-0 z-[150] flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onMouseDown:u=>{u.target===u.currentTarget&&t()},children:f.jsxs(Qt.div,{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":o,tabIndex:-1,initial:l?{opacity:0}:{opacity:0,y:-12,scale:.97},animate:{opacity:1,y:0,scale:1},transition:{duration:.18,ease:"easeOut"},className:"glass-strong w-full max-w-md rounded-2xl border border-line p-6 outline-none",children:[f.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[f.jsx("h2",{id:o,className:"text-[15px] font-semibold",children:e}),f.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-4 w-4","aria-hidden":"true"})})]}),s]})})}function Kh({title:e,label:t,confirmLabel:s,initialValue:i,pending:o,onSubmit:l,onClose:u}){const[d,p]=S.useState(i),m=S.useId(),g=d.trim(),v=g===i.trim(),x=C=>{C.preventDefault(),!(o||g===""||v)&&l(g)};return f.jsx($o,{title:e,onClose:u,children:f.jsxs("form",{onSubmit:x,noValidate:!0,children:[f.jsxs("label",{htmlFor:m,className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:t}),f.jsx("input",{id:m,type:"text",autoFocus:!0,value:d,maxLength:255,disabled:o,onFocus:C=>C.target.select(),onChange:C=>p(C.target.value),className:"input"})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:o,children:"Cancel"}),f.jsxs("button",{type:"submit",className:"btn-gold",disabled:o||g===""||v,children:[o&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),o?"Saving…":s]})]})]})})}const X0=["B","KB","MB","GB","TB","PB"];function Rt(e){if(!Number.isFinite(e)||e<=0)return"0 B";let t=e,s=0;for(;t>=1024&&s<X0.length-1;)t/=1024,s+=1;const i=X0[s]??"B";return s===0?`${Math.round(t)} ${i}`:`${t.toFixed(1)} ${i}`}function tM(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function hs(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}const nM=[{limit:60,divisor:1,unit:"second"},{limit:3600,divisor:60,unit:"minute"},{limit:86400,divisor:3600,unit:"hour"},{limit:604800,divisor:86400,unit:"day"},{limit:2629800,divisor:604800,unit:"week"},{limit:31557600,divisor:2629800,unit:"month"}];function Bl(e,t=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"";const i=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),o=(s.getTime()-t.getTime())/1e3,l=Math.abs(o);for(const{limit:u,divisor:d,unit:p}of nM)if(l<u)return i.format(Math.round(o/d),p);return i.format(Math.round(o/31557600),"year")}function bn(e,t){return`${e} ${t}${e===1?"":"s"}`}function rM(e,t=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"Unknown";const i=l=>new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),o=Math.round((i(t)-i(s))/864e5);return o<=0?"Today":o===1?"Yesterday":s.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}const sM={image:bT,video:NT,audio:IT,archive:ET,pdf:od,text:od,document:od,other:TT},iM={image:"Image",video:"Video",audio:"Audio",archive:"Archive",pdf:"PDF",text:"Text",document:"Document",other:"File"},oM={image:"text-gold-text",video:"muted",audio:"muted",archive:"muted",pdf:"muted",text:"muted",document:"muted",other:"muted"};function Wn(e){const t=zT(e);return{Icon:sM[t],label:iM[t],color:oM[t]}}function Ci(e){return{kind:"file",id:e.id,name:e.name,size:e.size,mimeType:e.mimeType,starred:e.starred,trashed:e.trashed,deletedAt:e.deletedAt,createdAt:e.createdAt,updatedAt:e.updatedAt,versionCount:e.versionCount,file:e,folder:null}}function Wh(e){return{kind:"folder",id:e.id,name:e.name,size:0,mimeType:"",starred:e.starred,trashed:e.trashed,deletedAt:e.deletedAt,createdAt:e.createdAt,updatedAt:e.updatedAt,versionCount:0,file:null,folder:e}}function cl(e){return{kind:e.kind,id:e.id}}function un(e){return`${e.kind}:${e.id}`}function qh(e){return e==="list"||e==="grid"}function Zl({label:e="Loading"}){return f.jsx("div",{role:"status","aria-label":e,className:"mt-10 flex justify-center",children:f.jsx(kt,{className:"h-6 w-6 animate-spin text-gold","aria-hidden":"true"})})}const aM="Try type:pdf size:>100MB folder:Projects starred:true after:2026-01-01";function J0({icon:e,label:t,meta:s,onSelect:i}){return f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 rounded-xl border border-transparent px-3 py-2.5 text-left transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[e,f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:t,children:t}),f.jsx("span",{className:"muted shrink-0 text-[12px]",children:s})]})})}function lM({query:e,onClose:t,onOpenFolder:s,onOpenFile:i}){var m,g;const o=mn(),l=Gn({queryKey:["search",e],queryFn:()=>xe.search.query(e),enabled:e!=="",placeholderData:_2});S.useEffect(()=>{const v=x=>{x.key==="Escape"&&t()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[t]);const u=((m=l.data)==null?void 0:m.folders)??[],d=((g=l.data)==null?void 0:g.files)??[],p=u.length===0&&d.length===0;return f.jsx("div",{className:"fixed inset-0 z-[95] flex justify-center bg-black/40 p-4 pt-20",onMouseDown:v=>{v.target===v.currentTarget&&t()},children:f.jsxs(Qt.div,{role:"dialog","aria-modal":"true","aria-label":`Search results for ${e}`,initial:o?{opacity:0}:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},className:"glass-strong flex max-h-[70dvh] w-full max-w-2xl flex-col overflow-hidden rounded-2xl border border-line",children:[f.jsxs("header",{className:"flex items-center gap-3 border-b border-line/70 px-5 py-4",children:[f.jsx(S1,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsxs("h2",{className:"min-w-0 flex-1 truncate text-[14px] font-semibold",children:["Results for “",e,"”"]}),f.jsx("button",{type:"button","aria-label":"Close search",onClick:t,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-4 w-4","aria-hidden":"true"})})]}),f.jsx("p",{className:"muted border-b border-line/70 px-5 py-2 font-mono text-[11.5px]",children:aM}),f.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:l.isPending?f.jsx(Zl,{label:"Searching"}):l.error!==null?f.jsx("p",{role:"alert",className:"notice notice-error",children:Ie(l.error,"The search failed.")}):p?f.jsxs("div",{className:"flex flex-col items-center py-12 text-center",children:[f.jsx(OT,{className:"h-7 w-7 text-gold","aria-hidden":"true"}),f.jsxs("p",{className:"muted mt-3 text-sm",children:["No matches for “",e,"”."]})]}):f.jsxs(f.Fragment,{children:[u.length>0?f.jsxs("section",{className:"mb-3",children:[f.jsx("h3",{className:"eyebrow mb-2",children:"Folders"}),f.jsx("ul",{className:"grid gap-0.5",children:u.map(v=>f.jsx(J0,{icon:f.jsx(wi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),label:v.name,meta:"Folder",onSelect:()=>s(v)},v.id))})]}):null,d.length>0?f.jsxs("section",{children:[f.jsx("h3",{className:"eyebrow mb-2",children:"Files"}),f.jsx("ul",{className:"grid gap-0.5",children:d.map(v=>{const{Icon:x,color:C,label:k}=Wn(v.mimeType);return f.jsx(J0,{icon:f.jsx(x,{className:`h-4 w-4 shrink-0 ${C}`,"aria-hidden":"true"}),label:v.name,meta:`${Rt(v.size)} · ${k}`,onSelect:()=>i(Ci(v))},v.id)})})]}):null]})})]})})}const uM=[{keys:"Ctrl/⌘ K",label:"Focus search"},{keys:"Enter",label:"Open the focused item"},{keys:"Delete",label:"Move selection to Trash"},{keys:"Ctrl/⌘ A",label:"Select all visible items"},{keys:"Esc",label:"Clear selection / close panels"},{keys:"Shift-click",label:"Select a range of items"},{keys:"Ctrl/⌘-click",label:"Add or remove one item"},{keys:"Click the ⋯",label:"Item actions menu"},{keys:"Right-click",label:"Context menu"},{keys:"?",label:"Show this help"}];function cM({onClose:e}){return f.jsx($o,{title:"Keyboard shortcuts",onClose:e,children:f.jsx("dl",{className:"grid gap-2",children:uM.map(t=>f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"muted text-[13px]",children:t.label}),f.jsx("dd",{children:f.jsx("kbd",{className:"rounded-md border border-line-strong bg-surface px-2 py-1 font-mono text-[12px]",children:t.keys})})]},t.keys))})})}const dM={DISCONNECTED:"Disconnected",CONNECTING:"Connecting",CONNECTED:"Connected",RECONNECTING:"Reconnecting",ERROR:"Connection error",AUTH_REQUIRED:"Reconnect required"};function fM(e){if(e===null)return{tone:"text-muted",label:"Unknown",usable:!1,hint:null};const t=dM[e.state];return e.state==="AUTH_REQUIRED"?{tone:"text-bad",label:t,usable:!1,hint:e.message??"Reconnect Telegram in Settings to keep syncing."}:e.state==="ERROR"||e.status==="unavailable"?{tone:"text-bad",label:t,usable:!1,hint:e.message??"The storage backend is unavailable right now."}:e.state==="CONNECTED"&&e.status==="healthy"?{tone:"text-ok",label:t,usable:!0,hint:null}:{tone:"text-gold-text",label:t,usable:e.state==="CONNECTED"||e.state==="CONNECTING"||e.state==="RECONNECTING",hint:e.message}}const hM=[{id:"drive",label:"My Drive",path:"/",icon:PT,regionLabel:"My Drive"},{id:"recent",label:"Recent",path:"/recent",icon:Vx,regionLabel:"Recent files"},{id:"starred",label:"Starred",path:"/starred",icon:gs,regionLabel:"Starred items"},{id:"trash",label:"Trash",path:"/trash",icon:Kn,regionLabel:"Trash"},{id:"storage",label:"Storage",path:"/storage",icon:ko,regionLabel:"Storage"}];function pM({tone:e,label:t}){return f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full bg-current ${e}`,"aria-hidden":"true"}),f.jsx("span",{className:`text-[11px] font-medium ${e}`,children:t})]})}function Z0({storage:e,health:t,username:s,onCreateFolder:i,onClose:o}){const l=fM(t);return f.jsxs("div",{className:"flex h-full flex-col bg-bg-soft",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[f.jsx("span",{className:"eyebrow",children:"Drive"}),o!==void 0?f.jsx("button",{type:"button","aria-label":"Close navigation",onClick:o,className:"muted grid h-8 w-8 place-items-center rounded-lg transition-colors hover:bg-surface hover:text-gold-text md:hidden",children:f.jsx(dn,{className:"h-4 w-4","aria-hidden":"true"})}):null]}),f.jsx("nav",{"aria-label":"Main",className:"px-3",children:f.jsx("ul",{className:"grid gap-0.5",children:hM.map(u=>{const d=u.icon;return f.jsx("li",{children:f.jsxs(Nx,{to:u.path,end:u.path==="/",onClick:()=>o==null?void 0:o(),className:({isActive:p})=>`flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${p?"bg-surface font-medium text-gold-text":"muted hover:bg-surface hover:text-gold-text"}`,children:[f.jsx(d,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),u.label]})},u.id)})})}),f.jsx("div",{className:"px-3 pt-3",children:f.jsxs("button",{type:"button",className:"btn-secondary w-full justify-center",onClick:i,children:[f.jsx(e1,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})}),f.jsx("div",{className:"mt-auto p-3",children:f.jsxs("div",{className:"rounded-2xl border border-line bg-surface p-4",children:[f.jsxs("div",{className:"flex items-center gap-2.5",children:[f.jsx(Ux,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"}),f.jsx("span",{className:"min-w-0 truncate text-sm font-medium",title:(e==null?void 0:e.title)??void 0,children:(e==null?void 0:e.title)??"No storage"})]}),f.jsx("div",{className:"mt-2",children:t!==null?f.jsx(pM,{tone:l.tone,label:l.label}):f.jsx("span",{className:"muted text-[11px]",children:"Status unknown"})}),l.hint!==null?f.jsx("p",{className:`mt-1.5 text-[11px] leading-snug ${l.tone}`,children:l.hint}):null,f.jsxs("p",{className:"muted mt-2 flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wide",children:[f.jsx(ko,{className:"h-3 w-3","aria-hidden":"true"}),(e==null?void 0:e.provider)??"—"]}),f.jsx("div",{className:"hairline mt-3"}),s!==null&&s!==""?f.jsxs("p",{className:"muted mt-2.5 truncate font-mono text-[11px] select-all",children:["@",s]}):null]})})]})}const ev="omnicloud:theme-changed";function mM(e){const t=s=>e(s.detail);return window.addEventListener(ev,t),()=>window.removeEventListener(ev,t)}const gM=450;function yM(){return document.documentElement.dataset.theme==="light"?"light":"dark"}function vM({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[f.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}),f.jsx("path",{d:"M20 2 21.1 3.9 23 5 21.1 6.1 20 8 18.9 6.1 17 5 18.9 3.9Z"})]})}function xM({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[f.jsx("circle",{cx:"12",cy:"12",r:"3.6"}),f.jsx("path",{d:"M12 1.6 13.6 4.6 12 7.6 10.4 4.6Z"}),f.jsx("path",{d:"M12 16.4 13.6 19.4 12 22.4 10.4 19.4Z"}),f.jsx("path",{d:"M1.6 12 4.6 10.4 7.6 12 4.6 13.6Z"}),f.jsx("path",{d:"M16.4 12 19.4 10.4 22.4 12 19.4 13.6Z"})]})}function xS({compact:e=!1}){const[t,s]=S.useState(yM),i=mn();S.useEffect(()=>mM(s),[]);const o=S.useRef(void 0);S.useEffect(()=>{document.documentElement.dataset.theme=t;try{localStorage.setItem("omnicloud-theme",t)}catch{}},[t]),S.useEffect(()=>()=>window.clearTimeout(o.current),[]);const l=t==="dark"?"light":"dark";function u(){if(!i){const m=document.documentElement;m.classList.add("theme-anim"),window.clearTimeout(o.current),o.current=window.setTimeout(()=>m.classList.remove("theme-anim"),gM)}s(l)}const d=e?15:16,p=t==="light"?f.jsx(vM,{size:d}):f.jsx(xM,{size:d});return f.jsx("button",{type:"button",onClick:u,"aria-label":`Switch to ${l} theme`,title:`Switch to ${l} theme`,className:`theme-toggle relative grid place-items-center rounded-full ${e?"h-7 w-7":"h-9 w-9"}`,children:i?p:f.jsx(Lr,{mode:"wait",initial:!1,children:f.jsx(Qt.span,{className:"grid place-items-center",initial:{opacity:0,scale:.4,rotate:-120},animate:{opacity:1,scale:1,rotate:0,transition:{duration:.3,ease:[.34,1.56,.64,1]}},exit:{opacity:0,scale:.4,rotate:120,transition:{duration:.15,ease:"easeIn"}},children:p},t)})})}function wM({storage:e,displayName:t,username:s,search:i,onUpload:o,onToggleSidebar:l,onOpenHelp:u,onSignOut:d,signingOut:p}){const[m,g]=S.useState(!1),v=mn(),x=t.charAt(0).toUpperCase()||"?",C=S.useCallback(()=>g(!1),[]);S.useEffect(()=>{if(!m)return;const E=L=>{var b,M;(M=(b=L.target).closest)!=null&&M.call(b,"[data-account-menu]")||g(!1)},N=L=>{L.key==="Escape"&&g(!1)};return document.addEventListener("pointerdown",E),document.addEventListener("keydown",N),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("keydown",N)}},[m]);const k=v?0:-6,T=S.useId();return f.jsxs("header",{className:"nav-blur sticky top-0 z-50 flex h-14 shrink-0 items-center gap-3 border-b border-line/70 px-4 md:px-6",children:[f.jsx("button",{type:"button","aria-label":"Open navigation",onClick:l,className:"muted grid h-9 w-9 shrink-0 place-items-center rounded-lg transition-colors hover:bg-surface hover:text-gold-text md:hidden",children:f.jsx(LT,{className:"h-5 w-5","aria-hidden":"true"})}),f.jsxs("a",{href:"/",className:"flex shrink-0 items-center gap-2.5 text-[15px] font-semibold tracking-tight",children:[f.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"}),f.jsxs("span",{className:"hidden sm:inline",children:["Omni",f.jsx("span",{className:"muted font-normal",children:"Cloud"})]})]}),f.jsxs("div",{className:"relative ml-1 min-w-0 max-w-md flex-1",children:[f.jsx("label",{htmlFor:T,className:"sr-only",children:"Search files and folders"}),f.jsx(S1,{className:"muted pointer-events-none absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2","aria-hidden":"true"}),f.jsx("input",{id:T,ref:i.inputRef,type:"search",placeholder:"Search (Ctrl/⌘K)",value:i.value,onChange:E=>i.onChange(E.target.value),className:"input h-9 rounded-full py-0 pl-9"})]}),f.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:[f.jsx("button",{type:"button",onClick:u,"aria-label":"Keyboard shortcuts",title:"Keyboard shortcuts (?)",className:"muted hidden h-9 w-9 place-items-center rounded-full border border-line-strong bg-surface transition-colors hover:border-gold hover:text-gold-text sm:grid",children:f.jsx(RT,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsxs("button",{type:"button",className:"btn-gold hidden px-3.5 py-2 text-[13px] sm:inline-flex",onClick:o,children:[f.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]}),f.jsx(xS,{}),f.jsxs("div",{className:"relative","data-account-menu":!0,children:[f.jsx("button",{type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":m,onClick:()=>g(E=>!E),className:"muted flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-line-strong bg-surface text-sm font-semibold transition-colors hover:border-gold hover:text-gold-text",children:x}),f.jsx(Lr,{children:m?f.jsxs(Qt.div,{initial:{opacity:0,y:k},animate:{opacity:1,y:0},exit:{opacity:0,y:k},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-50 mt-2 w-60",children:[f.jsxs("div",{className:"border-b border-line/70 px-3 py-2.5",children:[f.jsx("p",{className:"truncate text-[13px] font-semibold",children:t}),f.jsx("p",{className:"muted truncate text-[12px]",children:s!==null&&s!==""?`@${s}`:"Telegram account"})]}),f.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[f.jsx(ko,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[13px] font-medium",title:(e==null?void 0:e.title)??void 0,children:(e==null?void 0:e.title)??"No storage"}),f.jsx("span",{className:"muted block truncate text-[11px] uppercase tracking-wide",children:(e==null?void 0:e.provider)??"—"})]})]}),f.jsxs("button",{type:"button",onClick:()=>{C(),d()},disabled:p,className:"menu-item menu-item-danger",children:[f.jsx(AT,{className:"h-4 w-4","aria-hidden":"true"}),p?"Signing out...":"Sign out"]})]},"account-menu"):null})]})]})]})}function SM(e){return e==="uploading"?f.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}):e==="done"?f.jsx(ah,{className:"h-4 w-4 shrink-0 text-ok","aria-hidden":"true"}):e==="cancelled"?f.jsx(dn,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}):f.jsx(dn,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"})}function kM({uploads:e,onCancel:t,onRetry:s,onDismiss:i,onClearFinished:o}){if(e.length===0)return null;const l=e.some(u=>u.status!=="uploading");return f.jsxs("section",{"aria-label":"Upload progress",className:"glass-strong fixed bottom-4 left-4 z-40 w-80 max-w-[calc(100vw-2rem)] overflow-hidden rounded-2xl border border-line",children:[f.jsxs("header",{className:"flex items-center justify-between border-b border-line/70 px-4 py-3",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-[13px] font-semibold",children:[f.jsx(bl,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Uploads"]}),l?f.jsx("button",{type:"button",onClick:o,className:"muted rounded px-1.5 py-0.5 text-xs transition-colors hover:bg-bg-soft hover:text-gold-text",children:"Clear finished"}):null]}),f.jsx("ul",{className:"max-h-72 divide-y divide-line/70 overflow-y-auto p-1.5",children:e.map(u=>f.jsxs("li",{className:"px-2.5 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[SM(u.status),f.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px]",title:u.name,children:u.name}),u.status==="uploading"?f.jsxs("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:[Rt(u.loaded)," / ",Rt(u.size)]}):f.jsx("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:Rt(u.size)})]}),u.status==="uploading"?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:`${u.percent}%`}})}),f.jsxs("span",{className:"muted w-9 shrink-0 text-right text-[11px] tabular-nums",children:[u.percent,"%"]}),f.jsx("button",{type:"button","aria-label":`Cancel upload of ${u.name}`,onClick:()=>t(u.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-bad",children:f.jsx(dn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):u.status==="error"||u.status==="cancelled"?f.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[f.jsx("p",{className:`min-w-0 flex-1 text-xs ${u.status==="error"?"text-bad":"muted"}`,children:u.message??"Cancelled"}),f.jsxs("button",{type:"button",className:"muted inline-flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors hover:bg-bg-soft hover:text-gold-text",onClick:()=>s(u.id),children:[f.jsx(uh,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Retry"]}),f.jsx("button",{type:"button","aria-label":`Dismiss upload of ${u.name}`,onClick:()=>i(u.id),className:"muted shrink-0 rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):f.jsx("div",{className:"mt-1.5 flex justify-end",children:f.jsx("button",{type:"button","aria-label":`Dismiss upload of ${u.name}`,onClick:()=>i(u.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})})]},u.id))})]})}function CM(){var ue,J,V;const e=Hh(),t=Gt(),s=xi(),i=Ir(),o=eM(),l=mn(),u=((ue=e.data)==null?void 0:ue.storage)??null,d=((J=e.data)==null?void 0:J.health)??null,p=S.useRef(null),[m,g]=S.useState(""),x=HR(m,300).trim(),[C,k]=S.useState(!1),[T,E]=S.useState(!1),[N,L]=S.useState(!1),[b,M]=S.useState(null),[_,I]=S.useState(null),j=S.useRef(null);j.current=_;const D=Mt({mutationFn:F=>xe.folders.create(F,b),onSuccess:F=>{ys(t),L(!1),i.success(`Created "${F.folder.name}"`)},onError:F=>i.error(Ie(F,"Could not create folder"))}),B=Mt({mutationFn:xe.auth.logout,onSuccess:()=>{t.setQueryData(Uo,gS),t.removeQueries({predicate:F=>F.queryKey[0]!=="me"})},onError:F=>i.error(Ie(F,"Could not sign out"))}),W=S.useCallback(()=>{var F,ne;(F=p.current)==null||F.focus(),(ne=p.current)==null||ne.select()},[]),G=S.useCallback(()=>g(""),[]);WR({onSearch:W,onDelete:()=>{var F,ne;return(ne=(F=j.current)==null?void 0:F.onDelete)==null?void 0:ne.call(F)},onEnter:()=>{var F,ne;return(ne=(F=j.current)==null?void 0:F.onEnter)==null?void 0:ne.call(F)},onSelectAll:()=>{var F,ne;return(ne=(F=j.current)==null?void 0:F.onSelectAll)==null?void 0:ne.call(F)},onEscape:()=>{var F,ne;(ne=(F=j.current)==null?void 0:F.onEscape)==null||ne.call(F),T?E(!1):C?k(!1):x!==""&&g("")},onHelp:()=>E(F=>!F)},!0),S.useEffect(()=>{if(C)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[C]);const K=((V=e.data)==null?void 0:V.user)??null,U=K!==null?K.firstName??K.username??"Account":"Account",X=(K==null?void 0:K.username)??null,ge={uploads:o,activeFolderId:b,setActiveFolderId:M,openCreateFolder:()=>L(!0),clearSearch:G,openShortcuts:()=>E(!0),searchInputRef:p,registerPageShortcuts:I},me=F=>{g(""),s(`/?folder=${encodeURIComponent(F)}`)},Te=F=>{F.file!==null&&xe.files.download(F.file.id),G()},ee=l?0:-20;return f.jsx(mS.Provider,{value:ge,children:f.jsxs("div",{className:"flex h-dvh",children:[f.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),f.jsx("aside",{className:"hidden w-60 shrink-0 border-r border-line md:block",children:f.jsx(Z0,{storage:u,health:d,username:X,onCreateFolder:()=>L(!0)})}),f.jsx(Lr,{children:C?f.jsxs("div",{className:"fixed inset-0 z-[80] md:hidden",children:[f.jsx(Qt.div,{className:"absolute inset-0 bg-black/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>k(!1),"aria-hidden":"true"}),f.jsx(Qt.div,{initial:{x:ee,opacity:0},animate:{x:0,opacity:1},exit:{x:ee,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute top-0 bottom-0 left-0 w-64 border-r border-line",children:f.jsx(Z0,{storage:u,health:d,username:X,onCreateFolder:()=>{k(!1),L(!0)},onClose:()=>k(!1)})})]}):null}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsx(wM,{storage:u,displayName:U,username:X,search:{value:m,onChange:g,inputRef:p},onUpload:()=>o.openPicker(b),onToggleSidebar:()=>k(!0),onOpenHelp:()=>E(!0),onSignOut:()=>B.mutate(),signingOut:B.isPending}),f.jsx("main",{id:"main",className:"relative flex-1 overflow-y-auto",children:f.jsx(SE,{})})]}),f.jsx("input",{ref:o.pickerInputRef,type:"file",multiple:!0,className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:o.onPickerChange}),f.jsx(kM,{uploads:o.uploads,onCancel:o.cancel,onRetry:o.retry,onDismiss:o.dismiss,onClearFinished:o.clearFinished}),N?f.jsx(Kh,{title:"Create folder",label:"Folder name",confirmLabel:"Create",initialValue:"",pending:D.isPending,onSubmit:F=>D.mutate(F),onClose:()=>L(!1)}):null,T?f.jsx(cM,{onClose:()=>E(!1)}):null,x!==""?f.jsx(lM,{query:x,onClose:G,onOpenFolder:F=>me(F.id),onOpenFile:Te}):null]})})}function Qh(e){const t=new Map;for(const o of e)t.set(o.id,{folder:o,children:[]});const s=[];for(const o of t.values()){const l=o.folder.parentId===null?void 0:t.get(o.folder.parentId);l===void 0?s.push(o):l.children.push(o)}const i=o=>{o.sort((l,u)=>l.folder.name.localeCompare(u.folder.name));for(const l of o)i(l.children);return o};return i(s)}function wS(e,t){for(const s of e){if(s.folder.id===t)return s.folder;const i=wS(s.children,t);if(i!==null)return i}return null}function EM(e,t){if(t===null)return[];const s=[],i=new Set;let o=t;for(;o!==null&&!i.has(o);){i.add(o);const l=wS(e,o);if(l===null)break;s.unshift(l),o=l.parentId}return s}function Gh(e,t){const s=[],i=l=>{s.push(l.folder.id);for(const u of l.children)i(u)},o=l=>{for(const u of l){if(u.folder.id===t)return i(u),!0;if(o(u.children))return!0}return!1};return o(e),s}function Mo({queryKey:e,queryFn:t,enabled:s=!0}){var d;const i=pC({queryKey:e,enabled:s,initialPageParam:1,queryFn:({pageParam:p})=>t(p),getNextPageParam:p=>p.pagination.hasMore?p.pagination.page+1:void 0}),o=((d=i.data)==null?void 0:d.pages)??[],l=o.flatMap(p=>p.items),u=o[o.length-1];return{items:l,pagination:(u==null?void 0:u.pagination)??null,isLoading:i.isPending,isLoadingMore:i.isFetchingNextPage,isFetching:i.isFetching,isError:i.isError,error:i.error,hasMore:i.hasNextPage,loadMore:()=>{i.fetchNextPage()},refetch:()=>{i.refetch()}}}function Yh({title:e,message:t,confirmLabel:s="Confirm",destructive:i=!1,busy:o=!1,onConfirm:l,onClose:u}){return f.jsxs($o,{title:e,onClose:u,children:[f.jsxs("div",{className:"flex items-start gap-3",children:[i?f.jsx(Pl,{className:"mt-0.5 h-5 w-5 shrink-0 text-bad","aria-hidden":"true"}):null,f.jsx("div",{className:"text-[13.5px] leading-relaxed",children:t})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:o,children:"Cancel"}),f.jsx("button",{type:"button",autoFocus:!0,className:i?"btn-danger":"btn-gold",onClick:l,disabled:o,children:o?"Working…":s})]})]})}function TM(e,t){const s=Gh(t,e);return Promise.all(s.map(i=>xe.files.list({folderId:i,limit:200}))).then(i=>i.reduce((o,l)=>o+l.files.length,0))}function NM({folder:e,tree:t,onClose:s}){const i=Gt(),o=Ir(),l=Gn({queryKey:["subtree-files",e.id],queryFn:()=>TM(e.id,t),staleTime:0}),u=Mt({mutationFn:()=>xe.folders.delete(e.id),onSuccess:g=>{ys(i),o.success(`Deleted ${bn(g.affectedFolders,"folder")} and ${bn(g.affectedFiles,"file")}`),s()},onError:g=>o.error(Ie(g,"Could not delete folder"))}),d=Gh(t,e.id).length-1,p=l.data;let m=`the folder "${e.name}"`;return d>0&&(m+=` and its ${bn(d,"subfolder")}`),p!==void 0?m+=` and ${bn(p,"file")}`:m+=" and all files inside it",f.jsxs($o,{title:`Delete "${e.name}"?`,onClose:s,children:[f.jsxs("section",{className:"rounded-2xl border border-bad/40 p-5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(Pl,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),f.jsx("h3",{className:"text-[15px] font-semibold",children:"Danger zone"})]}),f.jsxs("p",{className:"muted mt-1.5 text-[13px] leading-relaxed",children:["This will permanently delete ",m,". This action cannot be undone."]})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:s,disabled:u.isPending,children:"Cancel"}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Delete"]})]})]})}function tv(e){var t,s;return e.kind==="file"?((t=e.file)==null?void 0:t.folderId)??null:((s=e.folder)==null?void 0:s.parentId)??null}function SS({nodes:e,depth:t,groupName:s,selectedId:i,disabledIds:o,collapsedIds:l,onToggle:u,onSelect:d}){return f.jsx("ul",{className:"space-y-0.5",children:e.map(p=>{const m=p.folder.id,g=o.has(m),v=p.children.length>0,x=l.has(m);return f.jsxs("li",{children:[f.jsxs("div",{className:`flex items-center gap-1 rounded-lg pr-2 transition-colors ${g?"":"hover:bg-surface"}`,style:{paddingLeft:`${t*1.25+.375}rem`},children:[v?f.jsx("button",{type:"button","aria-label":x?`Expand ${p.folder.name}`:`Collapse ${p.folder.name}`,"aria-expanded":!x,onClick:()=>u(m),className:"muted shrink-0 rounded p-0.5 transition-colors hover:text-gold-text",children:f.jsx(yT,{className:`h-3.5 w-3.5 transition-transform ${x?"-rotate-90":""}`,"aria-hidden":"true"})}):f.jsx("span",{className:"w-[1.125rem] shrink-0","aria-hidden":"true"}),f.jsxs("label",{className:`flex min-w-0 flex-1 items-center gap-2.5 py-1.5 text-sm ${g?"cursor-not-allowed":"cursor-pointer"}`,children:[f.jsx("input",{type:"radio",name:s,value:m,checked:i===m,disabled:g,onChange:()=>d(m),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),f.jsx(wi,{className:`h-4 w-4 shrink-0 ${g?"muted":"text-gold"}`,"aria-hidden":"true"}),f.jsx("span",{className:`min-w-0 truncate ${g?"muted opacity-60":""}`,children:p.folder.name})]})]}),v&&!x?f.jsx(SS,{nodes:p.children,depth:t+1,groupName:s,selectedId:i,disabledIds:o,collapsedIds:l,onToggle:u,onSelect:d}):null]},m)})})}function PM({targets:e,onClose:t,onMoved:s}){const i=Gt(),o=Ir(),l=Gn({queryKey:$h,queryFn:xe.folders.tree}),u=S.useMemo(()=>{var N;return Qh(((N=l.data)==null?void 0:N.folders)??[])},[l.data]),d=e[0],[p,m]=S.useState(()=>d===void 0?null:tv(d)),[g,v]=S.useState(new Set),x=e.length===1&&d!==void 0?`"${d.name}"`:`${e.length} items`,C=S.useMemo(()=>{var L;const N=new Set;for(const b of e)if(b.kind==="folder")for(const M of Gh(u,((L=b.folder)==null?void 0:L.id)??b.id))N.add(M);return N},[u,e]),k=Mt({mutationFn:async()=>{await Promise.all(e.map(N=>N.kind==="file"?xe.files.move(N.id,p):xe.folders.move(N.id,p)))},onSuccess:()=>{ys(i),o.success(`Moved ${x}`),s==null||s(),t()},onError:N=>o.error(Ie(N,"Could not move item"))}),T=e.every(N=>tv(N)===p),E=N=>{v(L=>{const b=new Set(L);return b.has(N)?b.delete(N):b.add(N),b})};return f.jsxs($o,{title:`Move ${x}`,onClose:t,children:[f.jsx("p",{className:"muted text-[13px]",children:"Choose a destination folder."}),f.jsxs("fieldset",{"aria-label":"Destination folder",className:"mt-3 max-h-72 overflow-y-auto rounded-xl border border-line bg-bg-soft p-2",children:[f.jsxs("label",{className:`flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-sm transition-colors ${p===null?"bg-surface":"hover:bg-surface"}`,children:[f.jsx("input",{type:"radio",name:"move-target",checked:p===null,onChange:()=>m(null),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),f.jsx(wi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsx("span",{children:"My Drive (root)"})]}),f.jsx(SS,{nodes:u,depth:0,groupName:"move-target",selectedId:p,disabledIds:C,collapsedIds:g,onToggle:E,onSelect:m})]}),l.isPending?f.jsx("p",{className:"muted mt-2 text-[13px]",children:"Loading folders..."}):null,f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:t,disabled:k.isPending,children:"Cancel"}),f.jsxs("button",{type:"button",className:"btn-gold",disabled:T||k.isPending,onClick:()=>k.mutate(),children:[k.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),k.isPending?"Moving...":"Move"]})]})]})}function nv(e){const t=e[0];return e.length===1&&t!==void 0?`"${t.name}"`:`${e.length} items`}function Xh({onOpenItem:e,onShowDetails:t,onReplaceFile:s}){var G;const i=Gt(),o=Ir(),[l,u]=S.useState(null),[d,p]=S.useState(null),[m,g]=S.useState(null),[v,x]=S.useState(null),C=S.useRef(null),k=S.useRef(null),T=Gn({queryKey:$h,queryFn:xe.folders.tree}),E=S.useCallback(K=>{ys(i),o.success(K)},[i,o]),N=Mt({mutationFn:async K=>{if(K.item.kind==="file"){const{file:X}=await xe.files.update(K.item.id,{name:K.name});return{name:X.name}}const{folder:U}=await xe.folders.update(K.item.id,{name:K.name});return{name:U.name}},onSuccess:(K,U)=>{u(null),E(`Renamed to "${U.name}"`)},onError:K=>o.error(Ie(K,"Could not rename item"))}),L=Mt({mutationFn:async K=>{const U=[],X=[];for(const me of K.items)me.kind==="file"?U.push(me.id):X.push(me.id);const ge=[];return U.length>0&&ge.push(await xe.files.batch({operation:K.operation,ids:U,...K.folderId!==void 0?{folderId:K.folderId}:{}})),X.length>0&&ge.push(await xe.folders.batch({operation:K.operation,ids:X,...K.folderId!==void 0?{folderId:K.folderId}:{}})),ge.reduce((me,Te)=>({requested:me.requested+Te.requested,succeeded:me.succeeded+Te.succeeded,failed:me.failed+Te.failed}),{requested:0,succeeded:0,failed:0})},onSuccess:(K,U)=>{ys(i);const X=nv(U.items);K.failed>0?o.error(`${K.succeeded} of ${K.requested} succeeded — ${K.failed} failed`):o.success(`Updated ${X}`),g(null),p(null)},onError:K=>o.error(Ie(K,"The operation failed"))}),b=S.useCallback(K=>{K.length>0&&p(K)},[]),M=S.useCallback(K=>{if(K.length===0)return;const U=K.length===1?K[0]:void 0;if(U!==void 0&&U.kind==="folder"){x(U);return}g(K)},[]),_=S.useCallback((K,U,X)=>{U.length!==0&&L.mutate({operation:K,items:U,...X!==void 0?{folderId:X}:{}})},[L]),I=S.useCallback(K=>{var U;k.current=K,(U=C.current)==null||U.click()},[]),j=S.useCallback((K,U)=>{switch(K){case"open":e(U);return;case"download":U.kind==="file"&&xe.files.download(U.id);return;case"rename":u(U);return;case"move":b([U]);return;case"star":_("star",[U]);return;case"unstar":_("unstar",[U]);return;case"replace":I(U);return;case"details":t(U);return;case"trash":_("trash",[U]);return;case"restore":_("restore",[U]);return;case"delete":M([U]);return;default:return}},[e,t,b,I,M,_]),D=Qh(((G=T.data)==null?void 0:G.folders)??[]),B=m!==null?nv(m):"",W=f.jsxs(f.Fragment,{children:[f.jsx("input",{ref:C,type:"file",className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:K=>{var me;const U=K.currentTarget,X=(me=U.files)==null?void 0:me[0],ge=k.current;U.value="",X!==void 0&&ge!==null&&s(X,ge.id),k.current=null}}),l!==null?f.jsx(Kh,{title:l.kind==="file"?"Rename file":"Rename folder",label:"Name",confirmLabel:"Rename",initialValue:l.name,pending:N.isPending,onSubmit:K=>N.mutate({item:l,name:K}),onClose:()=>u(null)}):null,d!==null?f.jsx(PM,{targets:d,onClose:()=>p(null)}):null,v!==null&&v.folder!==null?f.jsx(NM,{folder:v.folder,tree:D,onClose:()=>x(null)}):null,m!==null?f.jsx(Yh,{title:`Delete ${B}?`,message:`This will permanently delete ${B}. This action cannot be undone.`,confirmLabel:"Delete permanently",destructive:!0,busy:L.isPending,onConfirm:()=>_("delete",m),onClose:()=>g(null)}):null]});return{handleAction:j,openMove:b,requestDelete:M,runBatch:_,pendingBatch:L.isPending,dialogs:W}}function Jh(e,t,s){const[i,o]=S.useState(()=>{try{const u=localStorage.getItem(e);if(u!==null&&(s===void 0||s(u)))return u}catch{}return t});S.useEffect(()=>{try{localStorage.setItem(e,i)}catch{}},[e,i]);const l=S.useCallback(u=>o(u),[]);return[i,l]}function Zh(e,t=!0){const{registerPageShortcuts:s}=Jl();S.useEffect(()=>{if(!t){s(null);return}return s(e),()=>s(null)})}function Ed(e){return`${e.kind}:${e.id}`}function ep(){const[e,t]=S.useState(()=>new Set),s=S.useRef(null),i=S.useCallback(g=>e.has(g),[e]),o=S.useCallback(()=>{t(new Set),s.current=null},[]),l=S.useCallback(g=>{const v=Ed(g);t(new Set([v])),s.current=v},[]),u=S.useCallback((g,v={})=>{const x=Ed(g),{orderedKeys:C,range:k}=v;if(k===!0&&s.current!==null&&C!==void 0){const T=C.indexOf(s.current),E=C.indexOf(x);if(T!==-1&&E!==-1){const[N,L]=T<E?[T,E]:[E,T];t(b=>{const M=new Set(b);for(let _=N;_<=L;_+=1){const I=C[_];I!==void 0&&M.add(I)}return M});return}}t(T=>{const E=new Set(T);return E.has(x)?E.delete(x):E.add(x),E}),s.current=x},[]),d=S.useCallback(g=>{t(new Set(g)),s.current=g[0]??null},[]),p=S.useCallback(g=>{const v=new Set(g);t(x=>{let C=!1;const k=new Set;for(const T of x)v.has(T)?k.add(T):C=!0;return C?k:x})},[]),m=S.useCallback(g=>e.has(Ed(g)),[e]);return S.useMemo(()=>({selected:e,count:e.size,isSelected:i,has:m,select:l,toggle:u,clear:o,selectAll:d,prune:p}),[e,i,m,l,u,o,d,p])}function bM({path:e,onNavigate:t}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:f.jsxs("ol",{className:"flex items-center gap-0.5 text-sm",children:[f.jsx("li",{className:"shrink-0",children:f.jsx("button",{type:"button",onClick:()=>t(null),"aria-current":e.length===0?"page":void 0,className:`rounded px-1.5 py-1 transition-colors ${e.length===0?"font-medium text-gold-text":"muted hover:text-gold-text"}`,children:"My Drive"})}),e.map((s,i)=>{const o=i===e.length-1;return f.jsxs("li",{className:"flex min-w-0 items-center gap-0.5",children:[f.jsx(vT,{className:"muted h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),f.jsx("button",{type:"button",onClick:()=>t(s.id),"aria-current":o?"page":void 0,title:s.name,className:`max-w-[14rem] truncate rounded px-1.5 py-1 transition-colors ${o?"font-medium text-gold-text":"muted hover:text-gold-text"}`,children:s.name})]},s.id)})]})})}function tp({menu:e,onClose:t}){const s=mn(),i=S.useRef(null);S.useEffect(()=>{if(e===null)return;const d=m=>{var g;m.target instanceof Node&&((g=i.current)==null?void 0:g.contains(m.target))===!1&&t()},p=m=>{m.key==="Escape"&&t()};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",p),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",p),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[e,t]);const o=s?0:-4,u=e===null?void 0:{left:Math.min(e.x,Math.max(0,window.innerWidth-224-8)),top:Math.min(e.y,Math.max(0,window.innerHeight-240))};return f.jsx(Lr,{children:e!==null?f.jsx(Qt.div,{ref:i,role:"menu","aria-label":e.label,initial:{opacity:0,y:o},animate:{opacity:1,y:0},exit:{opacity:0,y:o},transition:{duration:.13,ease:"easeOut"},style:u,className:"menu-panel fixed z-[120] w-56",children:e.items.map(d=>f.jsxs("button",{role:"menuitem",type:"button",disabled:d.disabled===!0,onClick:()=>{t(),d.onSelect()},className:`menu-item text-left ${d.danger===!0?"menu-item-danger":""}`,children:[d.icon,d.label]},d.label))}):null})}function vr({label:e,children:t}){return f.jsxs("div",{children:[f.jsx("dt",{className:"muted text-[11px] font-semibold tracking-wide uppercase",children:e}),f.jsx("dd",{className:"mt-1 text-[13.5px] break-words",children:t})]})}function jM({item:e}){if(e.kind==="folder")return f.jsx(wi,{className:"h-6 w-6 shrink-0 text-gold","aria-hidden":"true"});const{Icon:t,color:s}=Wn(e.mimeType);return f.jsx(t,{className:`h-6 w-6 shrink-0 ${s}`,"aria-hidden":"true"})}function Ho({item:e,onClose:t,onAction:s}){var o,l,u;const i=mn();return S.useEffect(()=>{if(e===null)return;const d=p=>{p.key==="Escape"&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,t]),e===null?null:f.jsxs("div",{className:"fixed inset-0 z-[100] flex items-end justify-end sm:items-stretch",children:[f.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:t,"aria-hidden":"true"}),f.jsxs(Qt.aside,{role:"dialog","aria-modal":"true","aria-label":`Details for ${e.name}`,initial:i?{opacity:0}:{x:"100%"},animate:i?{opacity:1}:{x:0},transition:{duration:.22,ease:"easeOut"},className:"glass-strong relative flex max-h-[85dvh] w-full flex-col rounded-t-2xl border border-line sm:h-full sm:max-h-none sm:w-96 sm:rounded-none sm:border-r-0",children:[f.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-line/70 px-5 py-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(jM,{item:e}),f.jsx("h2",{className:"min-w-0 text-[15px] font-semibold break-words",children:e.name})]}),f.jsx("button",{type:"button","aria-label":"Close details",onClick:t,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(dn,{className:"h-4 w-4","aria-hidden":"true"})})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[e.trashed?null:f.jsx("div",{className:"flex flex-wrap gap-2",children:e.kind==="file"?f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("download",e),children:[f.jsx(lh,{className:"h-4 w-4","aria-hidden":"true"}),"Download"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("replace",e),children:[f.jsx(y1,{className:"h-4 w-4","aria-hidden":"true"}),"New version"]})]}):null}),f.jsxs("dl",{className:"mt-5 grid gap-4",children:[f.jsxs(vr,{label:"Type",children:[e.kind==="folder"?"Folder":Wn(e.mimeType).label,e.kind==="file"?f.jsxs("span",{className:"muted",children:[" · ",e.mimeType]}):null]}),e.kind==="file"?f.jsx(vr,{label:"Size",children:Rt(e.size)}):null,e.kind==="file"?f.jsx(vr,{label:"SHA-256",children:f.jsx("code",{className:"font-mono text-[12px] break-all select-all",children:((o=e.file)==null?void 0:o.sha256)??""})}):null,f.jsx(vr,{label:"Folder",children:e.kind==="file"?((l=e.file)==null?void 0:l.folderId)??"My Drive":((u=e.folder)==null?void 0:u.parentId)??"My Drive"}),f.jsx(vr,{label:"Created",children:hs(e.createdAt)}),f.jsx(vr,{label:"Modified",children:hs(e.updatedAt)}),e.trashed&&e.deletedAt!==null?f.jsx(vr,{label:"Deleted",children:hs(e.deletedAt)}):null,e.kind==="file"?f.jsx(vr,{label:"Versions",children:bn(e.versionCount,"version")}):null]}),e.kind==="file"?f.jsx(RM,{fileId:e.id,versionCount:e.versionCount}):null]})]})]})}function RM({fileId:e,versionCount:t}){var i,o;const s=Gn({queryKey:["versions",e],queryFn:()=>xe.files.versions(e)});return f.jsxs("section",{className:"mt-6",children:[f.jsx("h3",{className:"eyebrow",children:"Version history"}),s.isPending?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"Loading versions..."}):s.error!==null?f.jsx("p",{className:"mt-3 text-[13px] text-bad",children:Ie(s.error,"Could not load versions")}):(((i=s.data)==null?void 0:i.versions.length)??0)===0?f.jsx("p",{className:"muted mt-3 text-[13px]",children:t>1?"Version history is unavailable.":"No earlier versions."}):f.jsx("ul",{className:"mt-3 grid gap-2",children:(((o=s.data)==null?void 0:o.versions)??[]).map(l=>f.jsxs("li",{className:"flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2",children:[f.jsxs("span",{className:"muted w-9 shrink-0 font-mono text-[12px]",children:["v",l.versionNumber]}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block text-[12.5px]",children:Rt(l.size)}),f.jsx("span",{className:"muted block text-[11px]",children:hs(l.createdAt)})]}),l.isCurrent?f.jsx("span",{className:"shrink-0 rounded-full border border-gold/50 bg-gold-soft px-2 py-0.5 text-[11px] font-medium text-gold-text",children:"Current"}):null]},l.id))})]})}function eu({icon:e,title:t,description:s,children:i}){return f.jsxs("div",{className:"mt-16 flex flex-col items-center px-4 text-center",children:[f.jsx("span",{className:"grid h-16 w-16 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:f.jsx(e,{className:"h-7 w-7 text-gold","aria-hidden":"true"})}),f.jsx("h2",{className:"mt-4 text-base font-semibold",children:t}),s!==void 0?f.jsx("p",{className:"muted mt-1 max-w-sm text-sm",children:s}):null,i!==void 0?f.jsx("div",{className:"mt-5 flex flex-wrap justify-center gap-2.5",children:i}):null]})}function rv({label:e,items:t,trigger:s,triggerClassName:i,align:o="end"}){const[l,u]=S.useState(!1),d=mn(),p=S.useRef(null),m=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{if(!l)return;const k=E=>{var N;E.target instanceof Node&&((N=p.current)==null?void 0:N.contains(E.target))===!1&&u(!1)},T=E=>{var N;E.key==="Escape"&&(u(!1),(N=m.current)==null||N.focus())};return document.addEventListener("pointerdown",k),document.addEventListener("keydown",T),()=>{document.removeEventListener("pointerdown",k),document.removeEventListener("keydown",T)}},[l]);const v=k=>{var E,N;const T=(E=g.current)==null?void 0:E.querySelectorAll("[role='menuitem']");(N=T==null?void 0:T[k])==null||N.focus()},x=(k,T)=>{var b,M;const E=Array.from(((b=g.current)==null?void 0:b.querySelectorAll("[role='menuitem']"))??[]);if(E.length===0)return;const L=(E.indexOf(k)+T+E.length)%E.length;(M=E[L])==null||M.focus()},C=d?0:-6;return f.jsxs("div",{ref:p,className:"relative",children:[f.jsx("button",{ref:m,type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":l,onClick:()=>u(k=>!k),onKeyDown:k=>{k.key==="ArrowDown"&&(k.preventDefault(),l?v(0):(u(!0),window.requestAnimationFrame(()=>v(0))))},className:i??"muted grid h-8 w-8 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:s??f.jsx(CT,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(Lr,{children:l?f.jsx(Qt.div,{ref:g,role:"menu","aria-label":e,initial:{opacity:0,y:C},animate:{opacity:1,y:0},exit:{opacity:0,y:C},transition:{duration:.15,ease:"easeOut"},className:`menu-panel absolute top-full z-20 mt-1.5 w-48 ${o==="end"?"right-0":"left-0"}`,children:t.map(k=>f.jsxs("button",{role:"menuitem",type:"button",disabled:k.disabled===!0,onClick:()=>{u(!1),k.onSelect()},onKeyDown:T=>{T.key==="ArrowDown"?(T.preventDefault(),x(T.currentTarget,1)):T.key==="ArrowUp"&&(T.preventDefault(),x(T.currentTarget,-1))},className:`menu-item text-left ${k.danger===!0?"menu-item-danger":""}`,children:[k.icon,k.label]},k.label))},"item-menu"):null})]})}function sv({checked:e,visible:t,label:s,onToggle:i}){return f.jsx("button",{type:"button",role:"checkbox","aria-checked":e,"aria-label":s,onClick:o=>{o.stopPropagation(),i({shiftKey:o.shiftKey,metaKey:o.metaKey,ctrlKey:o.ctrlKey})},onPointerDown:o=>o.stopPropagation(),className:`grid h-5 w-5 shrink-0 place-items-center rounded-md border transition-all ${e?"border-gold bg-gold text-gold-ink opacity-100":`border-line-strong bg-surface text-transparent hover:border-gold ${t?"opacity-100":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`}`,children:f.jsx(ah,{className:"h-3 w-3","aria-hidden":"true"})})}function Td(e,t,s={}){const i=e.kind==="file",o=[];return e.trashed?(o.push({label:"Restore",icon:f.jsx(uh,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("restore",e)}),o.push({label:"Delete permanently",icon:f.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>t("delete",e)})):(o.push({label:i?"Download":"Open",icon:i?f.jsx(lh,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(gf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t(i?"download":"open",e)}),i&&o.push({label:"Details",icon:f.jsx(jT,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("details",e)}),o.push({label:"Rename",icon:f.jsx(FT,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("rename",e)}),o.push({label:"Move",icon:f.jsx(gf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("move",e)}),o.push({label:e.starred?"Unstar":"Star",icon:e.starred?f.jsx(ch,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(gs,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t(e.starred?"unstar":"star",e)}),i&&s.canReplace===!0&&o.push({label:"Upload new version",icon:f.jsx(y1,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("replace",e)}),o.push({label:"Move to trash",icon:f.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>t("trash",e)})),o}function MM({item:e}){if(e.kind==="folder")return f.jsx(wi,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"});const{Icon:t,color:s}=Wn(e.mimeType);return f.jsx(t,{className:`h-5 w-5 shrink-0 ${s}`,"aria-hidden":"true"})}function DM({view:e}){const t=[0,1,2,3,4];return e==="grid"?f.jsx("div",{"aria-hidden":"true",className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:t.map(s=>f.jsx("div",{className:"card h-40 animate-pulse bg-bg-soft"},s))}):f.jsx("div",{"aria-hidden":"true",className:"grid gap-2",children:t.map(s=>f.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-line bg-bg-soft"},s))})}function AM({items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,menuContext:u={},loading:d=!1}){const p=e.map(un),m=(v,x)=>{if(v.metaKey||v.ctrlKey){s.toggle(cl(x));return}if(v.shiftKey){s.toggle(cl(x),{orderedKeys:p,range:!0});return}i(x)},g=(v,x)=>{v.preventDefault(),l({x:v.clientX,y:v.clientY,label:`Actions for ${x.name}`,items:Td(x,o,u)})};return d?f.jsx(DM,{view:t}):e.length===0?null:t==="grid"?f.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:e.map(v=>{const x=s.isSelected(un(v));return f.jsxs("li",{onClick:C=>m(C,v),onContextMenu:C=>g(C,v),className:`group relative flex cursor-pointer flex-col gap-3 rounded-2xl border bg-surface p-4 transition-colors ${x?"border-gold bg-gold-soft":"border-line hover:border-gold/40 hover:bg-bg-soft"} ${v.trashed?"opacity-70":""}`,children:[f.jsx("div",{className:"absolute top-3 left-3",onClick:C=>C.stopPropagation(),children:f.jsx(sv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(cl(v),{orderedKeys:p,range:C.shiftKey})})}),f.jsx("div",{className:"absolute top-3 right-3",onClick:C=>C.stopPropagation(),children:f.jsx(rv,{label:`Actions for ${v.name}`,items:Td(v,o,u)})}),f.jsx("div",{className:"mt-6 flex flex-1 items-center justify-center",children:v.kind==="folder"?f.jsx(wi,{className:"h-10 w-10 text-gold","aria-hidden":"true"}):(()=>{const{Icon:C,color:k}=Wn(v.mimeType);return f.jsx(C,{className:`h-10 w-10 ${k}`,"aria-hidden":"true"})})()}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"line-clamp-2 text-[13px] leading-snug font-medium",title:v.name,children:v.name}),f.jsxs("p",{className:"muted mt-1 truncate text-[12px]",children:[v.starred?f.jsx(gs,{className:"mr-1 inline h-3 w-3 -translate-y-px text-gold","aria-hidden":"true"}):null,v.kind==="folder"?"Folder":`${Rt(v.size)} · ${Wn(v.mimeType).label}`]}),v.deletedAt!==null?f.jsxs("p",{className:"muted mt-0.5 text-[11px]",children:["Deleted ",Bl(v.deletedAt)]}):null]})]},un(v))})}):f.jsx("ul",{className:"grid gap-1.5",children:e.map(v=>{const x=s.isSelected(un(v));return f.jsxs("li",{onClick:C=>m(C,v),onContextMenu:C=>g(C,v),className:`group flex cursor-pointer items-center gap-3 rounded-xl border bg-surface px-3 py-2.5 transition-colors ${x?"border-gold bg-gold-soft":"border-line hover:border-gold/40 hover:bg-bg-soft"} ${v.trashed?"opacity-70":""}`,children:[f.jsx("div",{onClick:C=>C.stopPropagation(),children:f.jsx(sv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(cl(v),{orderedKeys:p,range:C.shiftKey})})}),f.jsx(MM,{item:v}),f.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:v.name,children:[v.starred?f.jsx(gs,{className:"mr-1.5 inline h-3.5 w-3.5 -translate-y-px text-gold","aria-hidden":"true"}):null,v.name]}),v.deletedAt!==null?f.jsxs("span",{className:"muted hidden shrink-0 text-[12px] sm:block",children:["Deleted ",Bl(v.deletedAt)]}):null,f.jsx("span",{className:"muted hidden w-40 shrink-0 truncate text-[12.5px] md:block",children:v.kind==="folder"?"Folder":Wn(v.mimeType).label}),f.jsx("span",{className:"muted hidden w-28 shrink-0 text-right text-[12.5px] lg:block",children:tM(v.updatedAt)}),f.jsx("span",{className:"muted w-16 shrink-0 text-right text-[12.5px] tabular-nums",children:v.kind==="folder"?"—":Rt(v.size)}),f.jsx("div",{onClick:C=>C.stopPropagation(),children:f.jsx(rv,{label:`Actions for ${v.name}`,items:Td(v,o,u)})})]},un(v))})})}function np({items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,menuContext:u,loading:d=!1,error:p=null,onRetry:m,emptyState:g,hasMore:v=!1,loadingMore:x=!1,onLoadMore:C}){return p!==null?f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),f.jsx("p",{className:"muted mt-1 text-sm",children:p}),m!==void 0?f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:m,children:"Try again"}):null]}):e.length===0&&g!==void 0?f.jsx(f.Fragment,{children:g}):f.jsxs(f.Fragment,{children:[f.jsx(AM,{items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,...u!==void 0?{menuContext:u}:{},loading:d}),v&&C!==void 0?f.jsx("div",{className:"mt-6 flex justify-center",children:f.jsx("button",{type:"button",className:"btn-secondary",onClick:C,disabled:x,children:x?"Loading...":"Load more"})}):null]})}function vs({title:e,actions:t,children:s}){return f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("div",{className:"min-w-0",children:e}),t!==void 0?f.jsx("div",{className:"flex flex-wrap items-center gap-2.5",children:t}):null,s!==void 0?f.jsx("div",{className:"w-full",children:s}):null]})}function xs({children:e}){return f.jsx("h1",{className:"min-w-0 truncate text-lg font-semibold tracking-[-0.01em]",children:e})}function rp({count:e,onClear:t,onSelectAll:s,children:i}){const o=mn(),l=e>0;return f.jsx(Lr,{children:l?f.jsxs(Qt.div,{role:"toolbar","aria-label":`${e} items selected`,initial:{opacity:0,y:o?0:20},animate:{opacity:1,y:0},exit:{opacity:0,y:o?0:20},transition:{duration:.18,ease:"easeOut"},className:"glass-strong fixed bottom-4 left-1/2 z-[90] flex max-w-[calc(100vw-2rem)] -translate-x-1/2 flex-wrap items-center gap-1.5 rounded-2xl border border-line px-3 py-2",children:[f.jsxs("span",{className:"px-2 text-[13px] font-medium tabular-nums",children:[e," selected"]}),f.jsx("span",{className:"text-line-strong","aria-hidden":"true",children:"·"}),s!==void 0?f.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[f.jsx(gT,{className:"h-4 w-4","aria-hidden":"true"}),"Select all"]}):null,i,f.jsxs("button",{type:"button",className:"btn-ghost",onClick:t,"aria-label":"Clear selection",children:[f.jsx(dn,{className:"h-4 w-4","aria-hidden":"true"}),"Clear"]})]},"selection-bar"):null})}const Nd={name:"Name",size:"Size",createdAt:"Date created",updatedAt:"Last modified",type:"Type"};function LM({sort:e,order:t,onChange:s}){const[i,o]=S.useState(!1),l=mn(),u=S.useRef(null);S.useEffect(()=>{if(!i)return;const m=v=>{var x;v.target instanceof Node&&((x=u.current)==null?void 0:x.contains(v.target))===!1&&o(!1)},g=v=>{v.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",g),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",g)}},[i]);const d=Object.keys(Nd),p=l?0:-6;return f.jsxs("div",{ref:u,className:"relative shrink-0",children:[f.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(m=>!m),className:"btn-secondary",children:[f.jsx(mT,{className:"h-4 w-4","aria-hidden":"true"}),f.jsx("span",{className:"hidden sm:inline",children:Nd[e]}),t==="asc"?f.jsx(Py,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(Ny,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),f.jsx(Lr,{children:i?f.jsx(Qt.div,{role:"menu","aria-label":"Sort by",initial:{opacity:0,y:p},animate:{opacity:1,y:0},exit:{opacity:0,y:p},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-30 mt-1.5 w-52",children:d.map(m=>f.jsxs("button",{role:"menuitemradio","aria-checked":e===m,type:"button",onClick:()=>{e===m?s(m,t==="asc"?"desc":"asc"):s(m,"asc")},className:"menu-item justify-between text-left",children:[Nd[m],e===m?t==="asc"?f.jsx(Py,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(Ny,{className:"h-3.5 w-3.5","aria-hidden":"true"}):null]},m))}):null})]})}function sp({view:e,onChange:t}){const s=[{mode:"list",label:"List view",Icon:DT},{mode:"grid",label:"Grid view",Icon:MT}];return f.jsx("div",{role:"group","aria-label":"View mode",className:"inline-flex shrink-0 rounded-lg border border-line-strong bg-surface p-0.5",children:s.map(({mode:i,label:o,Icon:l})=>{const u=e===i;return f.jsx("button",{type:"button","aria-label":o,"aria-pressed":u,onClick:()=>t(i),className:`grid h-7 w-8 place-items-center rounded-md transition-colors ${u?"bg-gold-soft text-gold-text":"muted hover:text-gold-text"}`,children:f.jsx(l,{className:"h-4 w-4","aria-hidden":"true"})},i)})})}const iv=100;function dl(e){return e.dataTransfer.types.includes("Files")}function IM(){const{uploads:e,setActiveFolderId:t,openCreateFolder:s,clearSearch:i}=Jl(),[o,l]=JE(),u=o.get("folder"),[d,p]=Jh("omnicloud-view","list",qh),[m,g]=S.useState("name"),[v,x]=S.useState("asc"),[C,k]=S.useState(null),[T,E]=S.useState(null),N=ep(),[L,b]=S.useState(!1),M=S.useRef(0);S.useEffect(()=>{t(u)},[u,t]);const _=Gn({queryKey:$h,queryFn:xe.folders.tree}),I=S.useMemo(()=>{var F;return Qh(((F=_.data)==null?void 0:F.folders)??[])},[_.data]),j=S.useMemo(()=>EM(I,u),[I,u]),D=Mo({queryKey:["folders","children",u,m,v],queryFn:F=>xe.folders.list({parentId:u,page:F,limit:iv,sort:m,order:v,status:"active"}).then(ne=>({items:ne.folders,pagination:ne.pagination}))}),B=Mo({queryKey:["files","folder",u,m,v],queryFn:F=>xe.files.list({folderId:u,page:F,limit:iv,sort:m,order:v,status:"active"}).then(ne=>({items:ne.files,pagination:ne.pagination}))}),W=S.useMemo(()=>[...D.items.map(Wh),...B.items.map(Ci)],[D.items,B.items]),G=S.useMemo(()=>W.map(un),[W]);S.useEffect(()=>{N.prune(G)},[G,N]);const K=S.useCallback(F=>{i(),N.clear(),E(null),l(F===null?{}:{folder:F},{replace:!1})},[i,N,l]),U=Xh({onOpenItem:F=>{F.kind==="folder"?K(F.id):xe.files.download(F.id)},onShowDetails:E,onReplaceFile:e.replace}),X=S.useMemo(()=>W.filter(F=>N.isSelected(un(F))),[W,N]);S.useEffect(()=>{const F=gr(D.error,sn.NOT_FOUND,sn.FOLDER_NOT_FOUND)||gr(B.error,sn.NOT_FOUND,sn.FOLDER_NOT_FOUND);u!==null&&F&&l({},{replace:!0})},[u,D.error,B.error,l]),Zh({onDelete:()=>U.runBatch("trash",X),onEnter:()=>{const F=X[0];F!==void 0&&U.handleAction(F.kind==="folder"?"open":"download",F)},onSelectAll:()=>N.selectAll(G),onEscape:()=>E(null)});const ge=gr(D.error,sn.STORAGE_NOT_INITIALIZED)||gr(B.error,sn.STORAGE_NOT_INITIALIZED)||gr(D.error,sn.TELEGRAM_AUTH_REQUIRED)||gr(B.error,sn.TELEGRAM_AUTH_REQUIRED)||gr(D.error,sn.STORAGE_UNAVAILABLE)||gr(B.error,sn.STORAGE_UNAVAILABLE),me=D.error??B.error,Te=D.isLoading||B.isLoading,ee=F=>{dl(F)&&(F.preventDefault(),M.current+=1,b(!0))},ue=F=>{dl(F)&&(M.current-=1,M.current<=0&&(M.current=0,b(!1)))},J=F=>{dl(F)&&F.preventDefault()},V=F=>{if(!dl(F))return;F.preventDefault(),M.current=0,b(!1);const ne=Array.from(F.dataTransfer.files);ne.length>0&&e.enqueue(ne,u)};return f.jsxs("div",{className:"relative min-h-full",onDragEnter:ee,onDragLeave:ue,onDragOver:J,onDrop:V,children:[f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:u===null?f.jsx(xs,{children:"My Drive"}):f.jsx(bM,{path:j,onNavigate:K}),actions:f.jsxs(f.Fragment,{children:[f.jsx(sp,{view:d,onChange:p}),f.jsx(LM,{sort:m,order:v,onChange:(F,ne)=>{g(F),x(ne)}}),f.jsxs("button",{type:"button",className:"btn-secondary sm:hidden",onClick:()=>e.openPicker(u),children:[f.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]})]})}),ge?f.jsx("p",{role:"alert",className:"notice notice-error",children:Ie(me,"Your storage is unavailable right now.")}):null,f.jsx("div",{className:"mt-5",children:f.jsx(np,{items:W,view:d,selection:N,onOpen:F=>U.handleAction(F.kind==="folder"?"open":"download",F),onAction:U.handleAction,onContextMenu:k,loading:Te,error:ge||me===null?null:Ie(me,"Could not load this folder."),onRetry:()=>{D.refetch(),B.refetch()},hasMore:D.hasMore||B.hasMore,loadingMore:D.isLoadingMore||B.isLoadingMore,onLoadMore:()=>{D.hasMore&&D.loadMore(),B.hasMore&&B.loadMore()},emptyState:f.jsxs(eu,{icon:ST,title:"Nothing here yet",description:"Upload your first file or create a folder to get started.",children:[f.jsxs("button",{type:"button",className:"btn-gold",onClick:()=>e.openPicker(u),children:[f.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload files"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[f.jsx(e1,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})]})})})]}),L?f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-30 flex items-center justify-center bg-bg/70 p-6 backdrop-blur-sm",children:f.jsx("div",{className:"glass-strong rounded-2xl border-2 border-dashed border-gold/60 px-8 py-6 text-sm font-medium text-gold-text",children:"Drop files to upload"})}):null,f.jsxs(rp,{count:N.count,onClear:N.clear,onSelectAll:()=>N.selectAll(G),children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.openMove(X),children:[f.jsx(gf,{className:"h-4 w-4","aria-hidden":"true"}),"Move"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.runBatch("star",X),children:[f.jsx(gs,{className:"h-4 w-4","aria-hidden":"true"}),"Star"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.runBatch("unstar",X),children:[f.jsx(ch,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>U.runBatch("trash",X),children:[f.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}),"Trash"]})]}),f.jsx(tp,{menu:C,onClose:()=>k(null)}),f.jsx(Ho,{item:T,onClose:()=>E(null),onAction:U.handleAction}),U.dialogs]})}var qs={},Pd,ov;function FM(){return ov||(ov=1,Pd=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Pd}var bd={},xr={},av;function ws(){if(av)return xr;av=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return xr.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},xr.getSymbolTotalCodewords=function(i){return t[i]},xr.getBCHDigit=function(s){let i=0;for(;s!==0;)i++,s>>>=1;return i},xr.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');e=i},xr.isKanjiModeEnabled=function(){return typeof e<"u"},xr.toSJIS=function(i){return e(i)},xr}var jd={},lv;function ip(){return lv||(lv=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+s)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,o){if(e.isValid(i))return i;try{return t(i)}catch{return o}}})(jd)),jd}var Rd,uv;function _M(){if(uv)return Rd;uv=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const s=Math.floor(t/8);return(this.buffer[s]>>>7-t%8&1)===1},put:function(t,s){for(let i=0;i<s;i++)this.putBit((t>>>s-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const s=Math.floor(this.length/8);this.buffer.length<=s&&this.buffer.push(0),t&&(this.buffer[s]|=128>>>this.length%8),this.length++}},Rd=e,Rd}var Md,cv;function OM(){if(cv)return Md;cv=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,s,i,o){const l=t*this.size+s;this.data[l]=i,o&&(this.reservedBit[l]=!0)},e.prototype.get=function(t,s){return this.data[t*this.size+s]},e.prototype.xor=function(t,s,i){this.data[t*this.size+s]^=i},e.prototype.isReserved=function(t,s){return this.reservedBit[t*this.size+s]},Md=e,Md}var Dd={},dv;function VM(){return dv||(dv=1,(function(e){const t=ws().getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,l=t(i),u=l===145?26:Math.ceil((l-13)/(2*o-2))*2,d=[l-7];for(let p=1;p<o-1;p++)d[p]=d[p-1]-u;return d.push(6),d.reverse()},e.getPositions=function(i){const o=[],l=e.getRowColCoords(i),u=l.length;for(let d=0;d<u;d++)for(let p=0;p<u;p++)d===0&&p===0||d===0&&p===u-1||d===u-1&&p===0||o.push([l[d],l[p]]);return o}})(Dd)),Dd}var Ad={},fv;function BM(){if(fv)return Ad;fv=1;const e=ws().getSymbolSize,t=7;return Ad.getPositions=function(i){const o=e(i);return[[0,0],[o-t,0],[0,o-t]]},Ad}var Ld={},hv;function zM(){return hv||(hv=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const l=o.size;let u=0,d=0,p=0,m=null,g=null;for(let v=0;v<l;v++){d=p=0,m=g=null;for(let x=0;x<l;x++){let C=o.get(v,x);C===m?d++:(d>=5&&(u+=t.N1+(d-5)),m=C,d=1),C=o.get(x,v),C===g?p++:(p>=5&&(u+=t.N1+(p-5)),g=C,p=1)}d>=5&&(u+=t.N1+(d-5)),p>=5&&(u+=t.N1+(p-5))}return u},e.getPenaltyN2=function(o){const l=o.size;let u=0;for(let d=0;d<l-1;d++)for(let p=0;p<l-1;p++){const m=o.get(d,p)+o.get(d,p+1)+o.get(d+1,p)+o.get(d+1,p+1);(m===4||m===0)&&u++}return u*t.N2},e.getPenaltyN3=function(o){const l=o.size;let u=0,d=0,p=0;for(let m=0;m<l;m++){d=p=0;for(let g=0;g<l;g++)d=d<<1&2047|o.get(m,g),g>=10&&(d===1488||d===93)&&u++,p=p<<1&2047|o.get(g,m),g>=10&&(p===1488||p===93)&&u++}return u*t.N3},e.getPenaltyN4=function(o){let l=0;const u=o.data.length;for(let p=0;p<u;p++)l+=o.data[p];return Math.abs(Math.ceil(l*100/u/5)-10)*t.N4};function s(i,o,l){switch(i){case e.Patterns.PATTERN000:return(o+l)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return l%3===0;case e.Patterns.PATTERN011:return(o+l)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(l/3))%2===0;case e.Patterns.PATTERN101:return o*l%2+o*l%3===0;case e.Patterns.PATTERN110:return(o*l%2+o*l%3)%2===0;case e.Patterns.PATTERN111:return(o*l%3+(o+l)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(o,l){const u=l.size;for(let d=0;d<u;d++)for(let p=0;p<u;p++)l.isReserved(p,d)||l.xor(p,d,s(o,p,d))},e.getBestMask=function(o,l){const u=Object.keys(e.Patterns).length;let d=0,p=1/0;for(let m=0;m<u;m++){l(m),e.applyMask(m,o);const g=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),g<p&&(p=g,d=m)}return d}})(Ld)),Ld}var fl={},pv;function kS(){if(pv)return fl;pv=1;const e=ip(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return fl.getBlocksCount=function(o,l){switch(l){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},fl.getTotalCodewordsCount=function(o,l){switch(l){case e.L:return s[(o-1)*4+0];case e.M:return s[(o-1)*4+1];case e.Q:return s[(o-1)*4+2];case e.H:return s[(o-1)*4+3];default:return}},fl}var Id={},mo={},mv;function UM(){if(mv)return mo;mv=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let i=1;for(let o=0;o<255;o++)e[o]=i,t[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),mo.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},mo.exp=function(i){return e[i]},mo.mul=function(i,o){return i===0||o===0?0:e[t[i]+t[o]]},mo}var gv;function $M(){return gv||(gv=1,(function(e){const t=UM();e.mul=function(i,o){const l=new Uint8Array(i.length+o.length-1);for(let u=0;u<i.length;u++)for(let d=0;d<o.length;d++)l[u+d]^=t.mul(i[u],o[d]);return l},e.mod=function(i,o){let l=new Uint8Array(i);for(;l.length-o.length>=0;){const u=l[0];for(let p=0;p<o.length;p++)l[p]^=t.mul(o[p],u);let d=0;for(;d<l.length&&l[d]===0;)d++;l=l.slice(d)}return l},e.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let l=0;l<i;l++)o=e.mul(o,new Uint8Array([1,t.exp(l)]));return o}})(Id)),Id}var Fd,yv;function HM(){if(yv)return Fd;yv=1;const e=$M();function t(s){this.genPoly=void 0,this.degree=s,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(i.length+this.degree);o.set(i);const l=e.mod(o,this.genPoly),u=this.degree-l.length;if(u>0){const d=new Uint8Array(this.degree);return d.set(l,u),d}return l},Fd=t,Fd}var _d={},Od={},Vd={},vv;function CS(){return vv||(vv=1,Vd.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Vd}var Sn={},xv;function ES(){if(xv)return Sn;xv=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+`)(?:.|[\r
|
|
355
|
+
]))+`;Sn.KANJI=new RegExp(s,"g"),Sn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Sn.BYTE=new RegExp(i,"g"),Sn.NUMERIC=new RegExp(e,"g"),Sn.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+s+"$"),l=new RegExp("^"+e+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Sn.testKanji=function(p){return o.test(p)},Sn.testNumeric=function(p){return l.test(p)},Sn.testAlphanumeric=function(p){return u.test(p)},Sn}var wv;function Ss(){return wv||(wv=1,(function(e){const t=CS(),s=ES();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(l,u){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!t.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?l.ccBits[0]:u<27?l.ccBits[1]:l.ccBits[2]},e.getBestModeForData=function(l){return s.testNumeric(l)?e.NUMERIC:s.testAlphanumeric(l)?e.ALPHANUMERIC:s.testKanji(l)?e.KANJI:e.BYTE},e.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},e.isValid=function(l){return l&&l.bit&&l.ccBits};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(l,u){if(e.isValid(l))return l;try{return i(l)}catch{return u}}})(Od)),Od}var Sv;function KM(){return Sv||(Sv=1,(function(e){const t=ws(),s=kS(),i=ip(),o=Ss(),l=CS(),u=7973,d=t.getBCHDigit(u);function p(x,C,k){for(let T=1;T<=40;T++)if(C<=e.getCapacity(T,k,x))return T}function m(x,C){return o.getCharCountIndicator(x,C)+4}function g(x,C){let k=0;return x.forEach(function(T){const E=m(T.mode,C);k+=E+T.getBitsLength()}),k}function v(x,C){for(let k=1;k<=40;k++)if(g(x,k)<=e.getCapacity(k,C,o.MIXED))return k}e.from=function(C,k){return l.isValid(C)?parseInt(C,10):k},e.getCapacity=function(C,k,T){if(!l.isValid(C))throw new Error("Invalid QR Code version");typeof T>"u"&&(T=o.BYTE);const E=t.getSymbolTotalCodewords(C),N=s.getTotalCodewordsCount(C,k),L=(E-N)*8;if(T===o.MIXED)return L;const b=L-m(T,C);switch(T){case o.NUMERIC:return Math.floor(b/10*3);case o.ALPHANUMERIC:return Math.floor(b/11*2);case o.KANJI:return Math.floor(b/13);case o.BYTE:default:return Math.floor(b/8)}},e.getBestVersionForData=function(C,k){let T;const E=i.from(k,i.M);if(Array.isArray(C)){if(C.length>1)return v(C,E);if(C.length===0)return 1;T=C[0]}else T=C;return p(T.mode,T.getLength(),E)},e.getEncodedBits=function(C){if(!l.isValid(C)||C<7)throw new Error("Invalid QR Code version");let k=C<<12;for(;t.getBCHDigit(k)-d>=0;)k^=u<<t.getBCHDigit(k)-d;return C<<12|k}})(_d)),_d}var Bd={},kv;function WM(){if(kv)return Bd;kv=1;const e=ws(),t=1335,s=21522,i=e.getBCHDigit(t);return Bd.getEncodedBits=function(l,u){const d=l.bit<<3|u;let p=d<<10;for(;e.getBCHDigit(p)-i>=0;)p^=t<<e.getBCHDigit(p)-i;return(d<<10|p)^s},Bd}var zd={},Ud,Cv;function qM(){if(Cv)return Ud;Cv=1;const e=Ss();function t(s){this.mode=e.NUMERIC,this.data=s.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let o,l,u;for(o=0;o+3<=this.data.length;o+=3)l=this.data.substr(o,3),u=parseInt(l,10),i.put(u,10);const d=this.data.length-o;d>0&&(l=this.data.substr(o),u=parseInt(l,10),i.put(u,d*3+1))},Ud=t,Ud}var $d,Ev;function QM(){if(Ev)return $d;Ev=1;const e=Ss(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(i){this.mode=e.ALPHANUMERIC,this.data=i}return s.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(o){let l;for(l=0;l+2<=this.data.length;l+=2){let u=t.indexOf(this.data[l])*45;u+=t.indexOf(this.data[l+1]),o.put(u,11)}this.data.length%2&&o.put(t.indexOf(this.data[l]),6)},$d=s,$d}var Hd,Tv;function GM(){if(Tv)return Hd;Tv=1;const e=Ss();function t(s){this.mode=e.BYTE,typeof s=="string"?this.data=new TextEncoder().encode(s):this.data=new Uint8Array(s)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(s){for(let i=0,o=this.data.length;i<o;i++)s.put(this.data[i],8)},Hd=t,Hd}var Kd,Nv;function YM(){if(Nv)return Kd;Nv=1;const e=Ss(),t=ws();function s(i){this.mode=e.KANJI,this.data=i}return s.getBitsLength=function(o){return o*13},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(i){let o;for(o=0;o<this.data.length;o++){let l=t.toSJIS(this.data[o]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
|
|
356
|
+
Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),i.put(l,13)}},Kd=s,Kd}var Wd={exports:{}},Pv;function XM(){return Pv||(Pv=1,(function(e){var t={single_source_shortest_paths:function(s,i,o){var l={},u={};u[i]=0;var d=t.PriorityQueue.make();d.push(i,0);for(var p,m,g,v,x,C,k,T,E;!d.empty();){p=d.pop(),m=p.value,v=p.cost,x=s[m]||{};for(g in x)x.hasOwnProperty(g)&&(C=x[g],k=v+C,T=u[g],E=typeof u[g]>"u",(E||T>k)&&(u[g]=k,d.push(g,k),l[g]=m))}if(typeof o<"u"&&typeof u[o]>"u"){var N=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(N)}return l},extract_shortest_path_from_predecessor_list:function(s,i){for(var o=[],l=i;l;)o.push(l),s[l],l=s[l];return o.reverse(),o},find_path:function(s,i,o){var l=t.single_source_shortest_paths(s,i,o);return t.extract_shortest_path_from_predecessor_list(l,o)},PriorityQueue:{make:function(s){var i=t.PriorityQueue,o={},l;s=s||{};for(l in i)i.hasOwnProperty(l)&&(o[l]=i[l]);return o.queue=[],o.sorter=s.sorter||i.default_sorter,o},default_sorter:function(s,i){return s.cost-i.cost},push:function(s,i){var o={value:s,cost:i};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Wd)),Wd.exports}var bv;function JM(){return bv||(bv=1,(function(e){const t=Ss(),s=qM(),i=QM(),o=GM(),l=YM(),u=ES(),d=ws(),p=XM();function m(N){return unescape(encodeURIComponent(N)).length}function g(N,L,b){const M=[];let _;for(;(_=N.exec(b))!==null;)M.push({data:_[0],index:_.index,mode:L,length:_[0].length});return M}function v(N){const L=g(u.NUMERIC,t.NUMERIC,N),b=g(u.ALPHANUMERIC,t.ALPHANUMERIC,N);let M,_;return d.isKanjiModeEnabled()?(M=g(u.BYTE,t.BYTE,N),_=g(u.KANJI,t.KANJI,N)):(M=g(u.BYTE_KANJI,t.BYTE,N),_=[]),L.concat(b,M,_).sort(function(j,D){return j.index-D.index}).map(function(j){return{data:j.data,mode:j.mode,length:j.length}})}function x(N,L){switch(L){case t.NUMERIC:return s.getBitsLength(N);case t.ALPHANUMERIC:return i.getBitsLength(N);case t.KANJI:return l.getBitsLength(N);case t.BYTE:return o.getBitsLength(N)}}function C(N){return N.reduce(function(L,b){const M=L.length-1>=0?L[L.length-1]:null;return M&&M.mode===b.mode?(L[L.length-1].data+=b.data,L):(L.push(b),L)},[])}function k(N){const L=[];for(let b=0;b<N.length;b++){const M=N[b];switch(M.mode){case t.NUMERIC:L.push([M,{data:M.data,mode:t.ALPHANUMERIC,length:M.length},{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.ALPHANUMERIC:L.push([M,{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.KANJI:L.push([M,{data:M.data,mode:t.BYTE,length:m(M.data)}]);break;case t.BYTE:L.push([{data:M.data,mode:t.BYTE,length:m(M.data)}])}}return L}function T(N,L){const b={},M={start:{}};let _=["start"];for(let I=0;I<N.length;I++){const j=N[I],D=[];for(let B=0;B<j.length;B++){const W=j[B],G=""+I+B;D.push(G),b[G]={node:W,lastCount:0},M[G]={};for(let K=0;K<_.length;K++){const U=_[K];b[U]&&b[U].node.mode===W.mode?(M[U][G]=x(b[U].lastCount+W.length,W.mode)-x(b[U].lastCount,W.mode),b[U].lastCount+=W.length):(b[U]&&(b[U].lastCount=W.length),M[U][G]=x(W.length,W.mode)+4+t.getCharCountIndicator(W.mode,L))}}_=D}for(let I=0;I<_.length;I++)M[_[I]].end=0;return{map:M,table:b}}function E(N,L){let b;const M=t.getBestModeForData(N);if(b=t.from(L,M),b!==t.BYTE&&b.bit<M.bit)throw new Error('"'+N+'" cannot be encoded with mode '+t.toString(b)+`.
|
|
357
|
+
Suggested mode is: `+t.toString(M));switch(b===t.KANJI&&!d.isKanjiModeEnabled()&&(b=t.BYTE),b){case t.NUMERIC:return new s(N);case t.ALPHANUMERIC:return new i(N);case t.KANJI:return new l(N);case t.BYTE:return new o(N)}}e.fromArray=function(L){return L.reduce(function(b,M){return typeof M=="string"?b.push(E(M,null)):M.data&&b.push(E(M.data,M.mode)),b},[])},e.fromString=function(L,b){const M=v(L,d.isKanjiModeEnabled()),_=k(M),I=T(_,b),j=p.find_path(I.map,"start","end"),D=[];for(let B=1;B<j.length-1;B++)D.push(I.table[j[B]].node);return e.fromArray(C(D))},e.rawSplit=function(L){return e.fromArray(v(L,d.isKanjiModeEnabled()))}})(zd)),zd}var jv;function ZM(){if(jv)return bd;jv=1;const e=ws(),t=ip(),s=_M(),i=OM(),o=VM(),l=BM(),u=zM(),d=kS(),p=HM(),m=KM(),g=WM(),v=Ss(),x=JM();function C(I,j){const D=I.size,B=l.getPositions(j);for(let W=0;W<B.length;W++){const G=B[W][0],K=B[W][1];for(let U=-1;U<=7;U++)if(!(G+U<=-1||D<=G+U))for(let X=-1;X<=7;X++)K+X<=-1||D<=K+X||(U>=0&&U<=6&&(X===0||X===6)||X>=0&&X<=6&&(U===0||U===6)||U>=2&&U<=4&&X>=2&&X<=4?I.set(G+U,K+X,!0,!0):I.set(G+U,K+X,!1,!0))}}function k(I){const j=I.size;for(let D=8;D<j-8;D++){const B=D%2===0;I.set(D,6,B,!0),I.set(6,D,B,!0)}}function T(I,j){const D=o.getPositions(j);for(let B=0;B<D.length;B++){const W=D[B][0],G=D[B][1];for(let K=-2;K<=2;K++)for(let U=-2;U<=2;U++)K===-2||K===2||U===-2||U===2||K===0&&U===0?I.set(W+K,G+U,!0,!0):I.set(W+K,G+U,!1,!0)}}function E(I,j){const D=I.size,B=m.getEncodedBits(j);let W,G,K;for(let U=0;U<18;U++)W=Math.floor(U/3),G=U%3+D-8-3,K=(B>>U&1)===1,I.set(W,G,K,!0),I.set(G,W,K,!0)}function N(I,j,D){const B=I.size,W=g.getEncodedBits(j,D);let G,K;for(G=0;G<15;G++)K=(W>>G&1)===1,G<6?I.set(G,8,K,!0):G<8?I.set(G+1,8,K,!0):I.set(B-15+G,8,K,!0),G<8?I.set(8,B-G-1,K,!0):G<9?I.set(8,15-G-1+1,K,!0):I.set(8,15-G-1,K,!0);I.set(B-8,8,1,!0)}function L(I,j){const D=I.size;let B=-1,W=D-1,G=7,K=0;for(let U=D-1;U>0;U-=2)for(U===6&&U--;;){for(let X=0;X<2;X++)if(!I.isReserved(W,U-X)){let ge=!1;K<j.length&&(ge=(j[K]>>>G&1)===1),I.set(W,U-X,ge),G--,G===-1&&(K++,G=7)}if(W+=B,W<0||D<=W){W-=B,B=-B;break}}}function b(I,j,D){const B=new s;D.forEach(function(X){B.put(X.mode.bit,4),B.put(X.getLength(),v.getCharCountIndicator(X.mode,I)),X.write(B)});const W=e.getSymbolTotalCodewords(I),G=d.getTotalCodewordsCount(I,j),K=(W-G)*8;for(B.getLengthInBits()+4<=K&&B.put(0,4);B.getLengthInBits()%8!==0;)B.putBit(0);const U=(K-B.getLengthInBits())/8;for(let X=0;X<U;X++)B.put(X%2?17:236,8);return M(B,I,j)}function M(I,j,D){const B=e.getSymbolTotalCodewords(j),W=d.getTotalCodewordsCount(j,D),G=B-W,K=d.getBlocksCount(j,D),U=B%K,X=K-U,ge=Math.floor(B/K),me=Math.floor(G/K),Te=me+1,ee=ge-me,ue=new p(ee);let J=0;const V=new Array(K),F=new Array(K);let ne=0;const ye=new Uint8Array(I.buffer);for(let Re=0;Re<K;Re++){const it=Re<X?me:Te;V[Re]=ye.slice(J,J+it),F[Re]=ue.encode(V[Re]),J+=it,ne=Math.max(ne,it)}const Ce=new Uint8Array(B);let Ne=0,Ee,we;for(Ee=0;Ee<ne;Ee++)for(we=0;we<K;we++)Ee<V[we].length&&(Ce[Ne++]=V[we][Ee]);for(Ee=0;Ee<ee;Ee++)for(we=0;we<K;we++)Ce[Ne++]=F[we][Ee];return Ce}function _(I,j,D,B){let W;if(Array.isArray(I))W=x.fromArray(I);else if(typeof I=="string"){let ge=j;if(!ge){const me=x.rawSplit(I);ge=m.getBestVersionForData(me,D)}W=x.fromString(I,ge||40)}else throw new Error("Invalid data");const G=m.getBestVersionForData(W,D);if(!G)throw new Error("The amount of data is too big to be stored in a QR Code");if(!j)j=G;else if(j<G)throw new Error(`
|
|
358
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
359
|
+
Minimum version required to store current data is: `+G+`.
|
|
360
|
+
`);const K=b(j,D,W),U=e.getSymbolSize(j),X=new i(U);return C(X,j),k(X),T(X,j),N(X,D,0),j>=7&&E(X,j),L(X,K),isNaN(B)&&(B=u.getBestMask(X,N.bind(null,X,D))),u.applyMask(B,X),N(X,D,B),{modules:X,version:j,errorCorrectionLevel:D,maskPattern:B,segments:W}}return bd.create=function(j,D){if(typeof j>"u"||j==="")throw new Error("No input text");let B=t.M,W,G;return typeof D<"u"&&(B=t.from(D.errorCorrectionLevel,t.M),W=m.from(D.version),G=u.from(D.maskPattern),D.toSJISFunc&&e.setToSJISFunction(D.toSJISFunc)),_(j,W,B,G)},bd}var qd={},Qd={},Rv;function TS(){return Rv||(Rv=1,(function(e){function t(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let i=s.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+s);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(l){return[l,l]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,l=i.width&&i.width>=21?i.width:void 0,u=i.scale||4;return{width:l,scale:l?4:u,margin:o,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},e.getImageWidth=function(i,o){const l=e.getScale(i,o);return Math.floor((i+o.margin*2)*l)},e.qrToImageData=function(i,o,l){const u=o.modules.size,d=o.modules.data,p=e.getScale(u,l),m=Math.floor((u+l.margin*2)*p),g=l.margin*p,v=[l.color.light,l.color.dark];for(let x=0;x<m;x++)for(let C=0;C<m;C++){let k=(x*m+C)*4,T=l.color.light;if(x>=g&&C>=g&&x<m-g&&C<m-g){const E=Math.floor((x-g)/p),N=Math.floor((C-g)/p);T=v[d[E*u+N]?1:0]}i[k++]=T.r,i[k++]=T.g,i[k++]=T.b,i[k]=T.a}}})(Qd)),Qd}var Mv;function e4(){return Mv||(Mv=1,(function(e){const t=TS();function s(o,l,u){o.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=u,l.width=u,l.style.height=u+"px",l.style.width=u+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(l,u,d){let p=d,m=u;typeof p>"u"&&(!u||!u.getContext)&&(p=u,u=void 0),u||(m=i()),p=t.getOptions(p);const g=t.getImageWidth(l.modules.size,p),v=m.getContext("2d"),x=v.createImageData(g,g);return t.qrToImageData(x.data,l,p),s(v,m,g),v.putImageData(x,0,0),m},e.renderToDataURL=function(l,u,d){let p=d;typeof p>"u"&&(!u||!u.getContext)&&(p=u,u=void 0),p||(p={});const m=e.render(l,u,p),g=p.type||"image/png",v=p.rendererOpts||{};return m.toDataURL(g,v.quality)}})(qd)),qd}var Gd={},Dv;function t4(){if(Dv)return Gd;Dv=1;const e=TS();function t(o,l){const u=o.a/255,d=l+'="'+o.hex+'"';return u<1?d+" "+l+'-opacity="'+u.toFixed(2).slice(1)+'"':d}function s(o,l,u){let d=o+l;return typeof u<"u"&&(d+=" "+u),d}function i(o,l,u){let d="",p=0,m=!1,g=0;for(let v=0;v<o.length;v++){const x=Math.floor(v%l),C=Math.floor(v/l);!x&&!m&&(m=!0),o[v]?(g++,v>0&&x>0&&o[v-1]||(d+=m?s("M",x+u,.5+C+u):s("m",p,0),p=0,m=!1),x+1<l&&o[v+1]||(d+=s("h",g),g=0)):p++}return d}return Gd.render=function(l,u,d){const p=e.getOptions(u),m=l.modules.size,g=l.modules.data,v=m+p.margin*2,x=p.color.light.a?"<path "+t(p.color.light,"fill")+' d="M0 0h'+v+"v"+v+'H0z"/>':"",C="<path "+t(p.color.dark,"stroke")+' d="'+i(g,m,p.margin)+'"/>',k='viewBox="0 0 '+v+" "+v+'"',E='<svg xmlns="http://www.w3.org/2000/svg" '+(p.width?'width="'+p.width+'" height="'+p.width+'" ':"")+k+' shape-rendering="crispEdges">'+x+C+`</svg>
|
|
361
|
+
`;return typeof d=="function"&&d(null,E),E},Gd}var Av;function n4(){if(Av)return qs;Av=1;const e=FM(),t=ZM(),s=e4(),i=t4();function o(l,u,d,p,m){const g=[].slice.call(arguments,1),v=g.length,x=typeof g[v-1]=="function";if(!x&&!e())throw new Error("Callback required as last argument");if(x){if(v<2)throw new Error("Too few arguments provided");v===2?(m=d,d=u,u=p=void 0):v===3&&(u.getContext&&typeof m>"u"?(m=p,p=void 0):(m=p,p=d,d=u,u=void 0))}else{if(v<1)throw new Error("Too few arguments provided");return v===1?(d=u,u=p=void 0):v===2&&!u.getContext&&(p=d,d=u,u=void 0),new Promise(function(C,k){try{const T=t.create(d,p);C(l(T,u,p))}catch(T){k(T)}})}try{const C=t.create(d,p);m(null,l(C,u,p))}catch(C){m(C)}}return qs.create=t.create,qs.toCanvas=o.bind(null,s.render),qs.toDataURL=o.bind(null,s.renderToDataURL),qs.toString=o.bind(null,function(l,u,d){return i.render(l,d)}),qs}var r4=n4();const s4=T2(r4),Lv=2e3;function i4({onSignedIn:e,onPasswordRequired:t}){const[s,i]=S.useState(null),[o,l]=S.useState(null),[u,d]=S.useState(null),[p,m]=S.useState(null),[g,v]=S.useState(!1),x=S.useRef(!1);S.useEffect(()=>{let k=!1;return m(null),xe.auth.startQrLogin().then(T=>{k||(i(T),l(T.token))}).catch(T=>{k||m(Ie(T,"Could not start Telegram sign-in"))}),()=>{k=!0}},[]),S.useEffect(()=>{if(o===null)return;let k=!1;return s4.toDataURL(o.url,{margin:1,width:240}).then(T=>{k||d(T)}).catch(()=>{k||m("Could not draw the QR code. Use the phone form below.")}),()=>{k=!0}},[o]),S.useEffect(()=>{if(s===null)return;let k=!1,T;const E=async()=>{if(!(k||x.current)){try{const N=await xe.auth.pollQrLogin(s.flowId);if(k)return;if(N.status==="ok"){x.current=!0,v(!0),await e();return}if(N.status==="password_required"){t(s.flowId);return}if(N.status==="expired"){i(null),l(null);return}l(N.token)}catch(N){k||m(Ie(N,"Telegram sign-in ended. Try again."));return}T=setTimeout(E,Lv)}};return T=setTimeout(E,Lv),()=>{k=!0,T!==void 0&&clearTimeout(T)}},[s,e,t]);const C=()=>{x.current=!1,m(null),d(null),i(null),l(null),xe.auth.startQrLogin().then(k=>{i(k),l(k.token)}).catch(k=>m(Ie(k,"Could not start Telegram sign-in")))};return f.jsxs("section",{"aria-labelledby":"qr-login-heading",className:"grid gap-3",children:[f.jsxs("div",{children:[f.jsx("h2",{id:"qr-login-heading",className:"text-base font-semibold",children:"Connect with the Telegram app"}),f.jsx("p",{className:"muted mt-1 text-sm",children:"Open Telegram on your phone, go to Settings → Devices → Link Desktop Device, and scan this code."})]}),f.jsx("div",{className:"flex min-h-[248px] items-center justify-center rounded-lg border p-3",children:g?f.jsxs("div",{role:"status",className:"flex items-center gap-2.5 text-sm",children:[f.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),f.jsx("span",{children:"Approved. Preparing your private storage..."})]}):u!==null?f.jsx("img",{src:u,alt:"Telegram login QR code",width:240,height:240,className:"h-60 w-60"}):f.jsx(kt,{className:"h-6 w-6 animate-spin text-gold-text","aria-label":"Loading QR code"})}),p!==null?f.jsxs("div",{role:"alert",className:"notice notice-error",children:[p," ",f.jsx("button",{type:"button",className:"font-semibold underline",onClick:C,children:"Try again"})]}):null,o!==null&&!g?f.jsx("p",{className:"muted text-xs",children:"The code refreshes automatically while you wait."}):null]})}const o4=/^\d{3,10}$/,Iv="font-semibold text-gold-text transition-colors hover:underline";function a4(){const e=Hh(),t=Gt(),s=xi(),[i,o]=S.useState("phone"),[l,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState(""),[v,x]=S.useState(null),[C,k]=S.useState(null),[T,E]=S.useState(!1),N=S.useCallback(async()=>{try{const U=await xe.auth.me();t.setQueryData(Uo,U),s("/",{replace:!0})}catch{k("Signed in, but loading your drive failed. Please reload the page.")}finally{E(!1)}},[t,s]),L=Mt({mutationFn:()=>xe.auth.startLogin(l.trim()),onSuccess:()=>{k(null),o("code")},onError:U=>k(Ie(U,"Could not send the login code"))}),b=Mt({mutationFn:()=>xe.auth.verifyCode(l.trim(),d.trim()),onSuccess:async U=>{if(U.status==="password_required"){k(null),o("password");return}await N()},onError:U=>k(Ie(U,"The login code was rejected")),onSettled:()=>E(!1)}),M=Mt({mutationFn:()=>v!==null?xe.auth.submitQrPassword(v,m):xe.auth.verifyPassword(l.trim(),m),onSuccess:async()=>{await N()},onError:U=>k(Ie(U,"The password was rejected")),onSettled:()=>E(!1)});if(e.data!==void 0&&e.data.user!==null)return f.jsx(nh,{to:"/",replace:!0});const _=L.isPending||b.isPending||M.isPending||T,I=b.isPending||M.isPending||T,j=U=>{U.preventDefault(),!(_||l.trim()==="")&&(k(null),L.mutate())},D=U=>{if(U.preventDefault(),!_){if(!o4.test(d.trim())){k("Please enter the numeric code Telegram sent you");return}k(null),E(!0),b.mutate()}},B=U=>{U.preventDefault(),!(_||m==="")&&(k(null),E(!0),M.mutate())},W=()=>{o("phone"),p(""),k(null)},G=C!==null?f.jsx("div",{role:"alert",className:"notice notice-error",children:C}):null,K=I?f.jsxs("div",{role:"status",className:"notice flex items-center gap-2.5",children:[f.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),f.jsx("span",{children:"Preparing your private storage…"})]}):null;return f.jsxs("div",{className:"grid min-h-dvh lg:grid-cols-2",children:[f.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),f.jsxs("aside",{className:"relative hidden overflow-hidden lg:flex lg:flex-col lg:justify-between lg:p-10",style:{background:"linear-gradient(160deg, #c9a227 0%, #a8801a 55%, #8a6712 100%)"},children:[f.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -top-24 -right-24 h-80 w-80 rounded-full",style:{background:"radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%)"}}),f.jsxs("a",{href:"/",className:"relative flex items-center gap-2.5 text-[15px] font-semibold text-white",children:[f.jsx("span",{className:"text-lg leading-none",children:"◈"})," Omni",f.jsx("span",{className:"font-normal text-white/80",children:"Cloud"})]}),f.jsxs("div",{className:"relative",children:[f.jsxs("p",{className:"text-[clamp(34px,3.4vw,48px)] font-extrabold leading-[1.08] tracking-[-0.03em] text-white",children:["Your drive.",f.jsx("br",{}),"Powered by Telegram."]}),f.jsx("p",{className:"mt-4 max-w-sm text-[15px] leading-relaxed text-white/85",children:"Every file lands in a private Telegram channel that is created for your account on first sign-in — storage you already own, with no extra servers in the way."})]}),f.jsx("p",{className:"relative text-xs text-white/70",children:"© 2026 OmniCloud · self-hosted storage on your Telegram."})]}),f.jsxs("main",{id:"main",className:"flex min-h-dvh flex-col px-5 py-7",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-[15px] font-semibold lg:invisible",children:[f.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"})," Omni",f.jsx("span",{className:"muted font-normal",children:"Cloud"})]}),f.jsx(xS,{})]}),f.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:f.jsxs("div",{className:"w-full max-w-sm",children:[i==="phone"?f.jsxs(f.Fragment,{children:[f.jsx(i4,{onSignedIn:N,onPasswordRequired:U=>{x(U),o("password")}}),f.jsxs("div",{className:"my-6 flex items-center gap-3 text-xs muted","aria-hidden":"true",children:[f.jsx("span",{className:"h-px flex-1 bg-current opacity-20"}),"or use your phone number",f.jsx("span",{className:"h-px flex-1 bg-current opacity-20"})]}),f.jsxs("form",{onSubmit:j,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Sign in with Telegram"}),f.jsx("p",{className:"muted mt-1.5 text-sm",children:"Enter your phone number to receive a login code."})]}),f.jsxs("label",{htmlFor:"login-phone",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Phone number"}),f.jsx("input",{id:"login-phone",type:"tel",autoComplete:"tel",placeholder:"+15551234567",value:l,disabled:_,onChange:U=>u(U.target.value),className:"input"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||l.trim()==="",children:[L.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),L.isPending?"Sending code…":"Continue"]})]}),G]}):i==="code"?f.jsxs(f.Fragment,{children:[f.jsxs("form",{onSubmit:D,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Enter the code"}),f.jsxs("p",{className:"muted mt-1.5 text-sm",children:["Enter the code Telegram sent to ",f.jsx("span",{className:"font-medium",children:l}),"."]})]}),f.jsxs("label",{htmlFor:"login-code",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Login code"}),f.jsx("input",{id:"login-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",autoFocus:!0,value:d,disabled:_,onChange:U=>p(U.target.value),className:"input tracking-[0.3em]"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||d.trim()==="",children:[b.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),b.isPending?"Verifying…":"Verify"]})]}),K,G,f.jsx("button",{type:"button",onClick:W,disabled:_,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${Iv}`,children:"Use a different number →"})]}):f.jsxs(f.Fragment,{children:[f.jsxs("form",{onSubmit:B,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Two-factor password"}),f.jsx("p",{className:"muted mt-1.5 text-sm",children:"Your Telegram account is protected with a cloud password."})]}),f.jsxs("label",{htmlFor:"login-password",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Password"}),f.jsx("input",{id:"login-password",type:"password",autoComplete:"current-password",autoFocus:!0,value:m,disabled:_,onChange:U=>g(U.target.value),className:"input"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||m==="",children:[(M.isPending||T)&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),M.isPending||T?"Signing in…":"Sign in"]})]}),K,G,f.jsx("button",{type:"button",onClick:()=>{o("code"),g(""),k(null)},disabled:_,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${Iv}`,children:"Back to the code →"})]}),f.jsx("p",{className:"notice mt-6",children:"OmniCloud uses your Telegram account as its storage backend. Files are stored in a private Telegram channel that is created automatically."})]})})]})]})}const l4=100,u4={upload:"Uploaded",download:"Downloaded",open:"Opened",rename:"Renamed",move:"Moved",star:"Starred",unstar:"Unstarred",trash:"Trashed",restore:"Restored",delete:"Deleted",create_folder:"Created folder",replace:"New version"};function c4(){const[e,t]=S.useState(null),s=Mo({queryKey:["recent"],queryFn:o=>xe.recent.list({page:o,limit:l4}).then(l=>({items:l.items.map(u=>({key:`${u.file.id}:${u.lastActionAt}`,item:Ci(u.file),action:u.lastAction,at:u.lastActionAt,label:rM(u.lastActionAt)})),pagination:l.pagination}))}),i=S.useMemo(()=>{const o=new Map;for(const l of s.items){const u=o.get(l.label);u===void 0?o.set(l.label,[l]):u.push(l)}return Array.from(o.entries())},[s.items]);return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:f.jsxs("div",{children:[f.jsx(xs,{children:"Recent"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"What you have touched lately, newest first."})]})}),s.isLoading?f.jsx(Zl,{label:"Loading recent activity"}):s.isError?f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),f.jsx("p",{className:"muted mt-1 text-sm",children:Ie(s.error,"Could not load recent activity.")}),f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:s.refetch,children:"Try again"})]}):s.items.length===0?f.jsx(eu,{icon:Vx,title:"Nothing recent",description:"Uploads, downloads and edits will appear here."}):f.jsx("div",{className:"mt-5 grid gap-6",children:i.map(([o,l])=>f.jsxs("section",{children:[f.jsx("h2",{className:"eyebrow",children:o}),f.jsx("ul",{className:"mt-3 grid gap-1.5",children:l.map(u=>{const{Icon:d,color:p}=Wn(u.item.mimeType);return f.jsxs("li",{className:"group flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2.5 transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[f.jsxs("button",{type:"button",onClick:()=>t(u.item),className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[f.jsx(d,{className:`h-5 w-5 shrink-0 ${p}`,"aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-sm font-medium",title:u.item.name,children:u.item.name}),f.jsxs("span",{className:"muted block text-[12px]",children:[u4[u.action],f.jsx("span",{className:"mx-1.5","aria-hidden":"true",children:"·"}),hs(u.at)]})]}),f.jsx("span",{className:"muted hidden shrink-0 text-[12.5px] tabular-nums sm:block",children:Rt(u.item.size)})]}),f.jsx("button",{type:"button","aria-label":`Download ${u.item.name}`,onClick:()=>xe.files.download(u.item.id),className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(lh,{className:"h-4 w-4","aria-hidden":"true"})})]},u.key)})})]},o))}),s.hasMore?f.jsx("div",{className:"mt-6 flex justify-center",children:f.jsx("button",{type:"button",className:"btn-secondary",onClick:s.loadMore,disabled:s.isLoadingMore,children:s.isLoadingMore?"Loading...":"Load more"})}):null,f.jsx(Ho,{item:e,onClose:()=>t(null),onAction:(o,l)=>{o==="download"&&xe.files.download(l.id)}})]})}const d4=100;function f4(){const{uploads:e}=Jl(),t=xi(),[s,i]=Jh("omnicloud-view","list",qh),[o,l]=S.useState(null),[u,d]=S.useState(null),p=ep(),m=Mo({queryKey:["starred"],queryFn:k=>xe.starred.list({page:k,limit:d4,status:"active"}).then(T=>({items:[...T.folders.map(Wh),...T.files.map(Ci)],pagination:T.pagination}))}),g=m.items,v=S.useMemo(()=>g.map(un),[g]);S.useEffect(()=>{p.prune(v)},[v,p]);const x=Xh({onOpenItem:k=>{k.kind==="folder"?t(`/?folder=${encodeURIComponent(k.id)}`):xe.files.download(k.id)},onShowDetails:d,onReplaceFile:e.replace}),C=S.useMemo(()=>g.filter(k=>p.isSelected(un(k))),[g,p]);return Zh({onDelete:()=>x.runBatch("trash",C),onSelectAll:()=>p.selectAll(v),onEscape:()=>d(null)}),f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:f.jsxs("div",{children:[f.jsx(xs,{children:"Starred"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Files and folders you marked for quick access."})]}),actions:f.jsx(sp,{view:s,onChange:i})}),f.jsx("div",{className:"mt-5",children:f.jsx(np,{items:g,view:s,selection:p,onOpen:k=>x.handleAction(k.kind==="folder"?"open":"download",k),onAction:x.handleAction,onContextMenu:l,loading:m.isLoading,error:m.isError?Ie(m.error,"Could not load starred items."):null,onRetry:m.refetch,hasMore:m.hasMore,loadingMore:m.isLoadingMore,onLoadMore:m.loadMore,emptyState:f.jsx(eu,{icon:gs,title:"No starred items",description:"Star files and folders from My Drive to find them here."})})}),f.jsx(rp,{count:p.count,onClear:p.clear,onSelectAll:()=>p.selectAll(v),children:f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>x.runBatch("unstar",C),children:[f.jsx(ch,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]})}),f.jsx(tp,{menu:o,onClose:()=>l(null)}),f.jsx(Ho,{item:u,onClose:()=>d(null),onAction:x.handleAction}),x.dialogs]})}function hl({icon:e,label:t,value:s}){return f.jsxs("div",{className:"card flex items-center gap-3 p-4",children:[f.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl border border-gold/40 bg-gold-soft text-gold-text",children:e}),f.jsxs("span",{className:"min-w-0",children:[f.jsx("span",{className:"muted block text-[12px]",children:t}),f.jsx("span",{className:"block truncate text-[15px] font-semibold tabular-nums",children:s})]})]})}function h4(){var x,C;const e=Ir(),[t,s]=S.useState(null),[i,o]=S.useState(!1),l=Gn({queryKey:qR,queryFn:xe.storage.stats}),u=Mt({mutationFn:()=>xe.storage.integrityCheck(i),onError:k=>e.error(Ie(k,"The integrity check failed"))}),d=(x=l.data)==null?void 0:x.stats,p=S.useMemo(()=>{if(d===void 0)return[];const k=Math.max(1,...d.byType.map(T=>T.bytes));return[...d.byType].sort((T,E)=>E.bytes-T.bytes).map(T=>({...T,percent:Math.round(T.bytes/k*100)}))},[d]);if(l.isPending)return f.jsx(Zl,{label:"Loading storage statistics"});if(l.isError||d===void 0)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:f.jsx(xs,{children:"Storage"}),actions:f.jsxs(oh,{to:"/settings/tokens",className:"btn-ghost",children:[f.jsx(o1,{className:"h-4 w-4"})," API tokens"]})}),f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Could not load storage statistics."}),f.jsx("p",{className:"muted mt-1 text-sm",children:Ie(l.error,"The storage backend may be unavailable.")}),f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:()=>void l.refetch(),children:"Try again"})]})]});const m=d.quotaBytes,g=m!==null&&m>0?Math.min(100,d.totalBytes/m*100):null,v=(C=u.data)==null?void 0:C.report;return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:f.jsxs("div",{children:[f.jsx(xs,{children:"Storage"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Keep an eye on usage, file types and storage health."})]})}),f.jsxs("section",{className:"card mt-5 p-5","aria-label":"Usage",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(ko,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Usage"]}),f.jsxs("p",{className:"muted text-[13px] tabular-nums",children:[Rt(d.totalBytes),m!==null?` of ${Rt(m)}`:" used"]})]}),f.jsx("div",{className:"mt-3 h-2.5 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:g===null?d.totalBytes>0?"100%":"0%":`${g}%`}})}),g!==null?f.jsxs("p",{className:"muted mt-2 text-[12px] tabular-nums",children:[Math.round(g),"% of quota used"]}):f.jsx("p",{className:"muted mt-2 text-[12px]",children:"No quota set on this account."})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3",children:[f.jsx(hl,{icon:f.jsx(by,{className:"h-5 w-5","aria-hidden":"true"}),label:"Files",value:d.fileCount.toLocaleString()}),f.jsx(hl,{icon:f.jsx(ko,{className:"h-5 w-5","aria-hidden":"true"}),label:"Folders",value:d.folderCount.toLocaleString()}),f.jsx(hl,{icon:f.jsx(gs,{className:"h-5 w-5","aria-hidden":"true"}),label:"Starred",value:d.starredCount.toLocaleString()}),f.jsx(hl,{icon:f.jsx(Kn,{className:"h-5 w-5","aria-hidden":"true"}),label:"In trash",value:`${Rt(d.trashBytes)} · ${d.trashFileCount}`})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Breakdown by type",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(pT,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"By file type"]}),p.length===0?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):f.jsx("ul",{className:"mt-4 grid gap-3",children:p.map(k=>f.jsxs("li",{children:[f.jsxs("div",{className:"flex items-center justify-between gap-3 text-[13px]",children:[f.jsx("span",{className:"font-medium capitalize",children:k.category}),f.jsxs("span",{className:"muted tabular-nums",children:[Rt(k.bytes)," · ",bn(k.count,"file")]})]}),f.jsx("div",{className:"mt-1.5 h-2 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:`${k.percent}%`}})})]},k.category))})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Largest files",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(by,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Largest files"]}),d.largestFiles.length===0?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):f.jsx("ul",{className:"mt-3 grid gap-1.5",children:d.largestFiles.map(k=>{const{Icon:T,color:E}=Wn(k.mimeType);return f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>s(Ci(k)),className:"flex w-full items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2.5 text-left transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[f.jsx(T,{className:`h-5 w-5 shrink-0 ${E}`,"aria-hidden":"true"}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:k.name,children:k.name}),f.jsx("span",{className:"muted shrink-0 text-[12.5px] tabular-nums",children:Rt(k.size)})]})},k.id)})})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Integrity check",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(VT,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Integrity check"]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("label",{className:"muted flex items-center gap-2 text-[12.5px]",children:[f.jsx("input",{type:"checkbox",checked:i,onChange:k=>o(k.target.checked),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),"Deep scan"]}),f.jsxs("button",{type:"button",className:"btn-gold px-3.5 py-2 text-[13px]",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),u.isPending?"Checking...":"Run check"]})]})]}),f.jsx("p",{className:"muted mt-2 text-[12.5px]",children:"A deep scan re-downloads and hashes every file — slower, but catches silent corruption."}),u.isPending?f.jsxs("p",{className:"muted mt-4 flex items-center gap-2 text-[13px]",children:[f.jsx(kt,{className:"h-4 w-4 animate-spin text-gold-text","aria-hidden":"true"}),"Scanning your storage..."]}):v!==void 0?f.jsx(p4,{report:v}):null]}),f.jsx(Ho,{item:t,onClose:()=>s(null),onAction:()=>{}})]})}function p4({report:e}){const t=e.issues.length===0;return f.jsxs("div",{className:"mt-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-[13px]",children:[f.jsxs("span",{className:"flex items-center gap-1.5 font-medium",children:[t?f.jsx(wT,{className:"h-4 w-4 text-ok","aria-hidden":"true"}):f.jsx(Pl,{className:"h-4 w-4 text-bad","aria-hidden":"true"}),t?"All files healthy":`${bn(e.issues.length,"issue")} found`]}),f.jsxs("span",{className:"muted tabular-nums",children:[bn(e.filesChecked,"file")," checked"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.healthy," healthy"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.missing," missing"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.inconsistent," inconsistent"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.unreadable," unreadable"]}),f.jsxs("span",{className:"muted",children:["checked ",Bl(e.checkedAt)]})]}),e.issues.length>0?f.jsx("ul",{className:"mt-3 grid gap-1.5",children:e.issues.map(s=>f.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-line bg-bg-soft px-3 py-2.5",children:[f.jsx(Pl,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[13px] font-medium",title:s.name,children:s.name}),f.jsxs("span",{className:"muted block text-[12px]",children:[s.kind.replace(/_/g," "),s.detail!==null?` · ${s.detail}`:""]})]}),f.jsx("span",{className:"muted shrink-0 text-[11px]",children:hs(e.checkedAt)})]},`${s.fileId}:${s.kind}`))}):null]})}const Yd=["tokens"];function m4(){var T;const e=Ir(),t=Gt(),[s,i]=S.useState(!1),[o,l]=S.useState(null),[u,d]=S.useState(null),p=Gn({queryKey:Yd,queryFn:()=>xe.tokens.list()}),m=Mt({mutationFn:E=>xe.tokens.create(E),onSuccess:E=>{i(!1),d(E),t.invalidateQueries({queryKey:Yd})},onError:E=>e.error(Ie(E,"Could not create the token"))}),g=Mt({mutationFn:E=>xe.tokens.revoke(E),onSuccess:()=>{l(null),e.success("Token revoked"),t.invalidateQueries({queryKey:Yd})},onError:E=>e.error(Ie(E,"Could not revoke the token"))}),v=((T=p.data)==null?void 0:T.tokens)??[],x=v.filter(E=>E.revokedAt===null),C=v.find(E=>E.id===o),k=async()=>{if(u)try{await navigator.clipboard.writeText(u.token),e.success("Token copied")}catch{e.error("Could not copy. Select the token and copy it manually.")}};return f.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 px-5 py-8",children:[f.jsx(vs,{title:f.jsx(xs,{children:"API tokens"}),actions:f.jsxs("button",{type:"button",className:"btn-gold",onClick:()=>i(!0),children:[f.jsx(_T,{className:"h-4 w-4"})," New token"]}),children:f.jsx("p",{className:"muted text-sm",children:"Tokens let scripts and the SDK use your account. Each token has full access, the same as your signed-in browser, so revoke any token you no longer use."})}),u&&f.jsxs("div",{className:"card space-y-3 p-5",children:[f.jsx("p",{className:"text-sm font-semibold",children:"Copy your new token now"}),f.jsx("p",{className:"muted text-sm",children:"This is the only time the token is shown. Store it somewhere safe."}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("code",{className:"min-w-0 flex-1 truncate rounded-lg border border-line bg-bg-soft px-3 py-2 font-mono text-sm",children:u.token}),f.jsxs("button",{type:"button",className:"btn-ghost",onClick:k,children:[f.jsx(kT,{className:"h-4 w-4"})," Copy"]})]}),f.jsx("button",{type:"button",className:"muted text-sm underline",onClick:()=>d(null),children:"I have copied it"})]}),f.jsxs("section",{className:"card divide-y divide-line",children:[p.isPending&&f.jsx("div",{className:"flex justify-center p-8",children:f.jsx(Zl,{})}),p.isError&&f.jsx("p",{className:"p-5 text-sm text-bad",children:Ie(p.error,"Could not load tokens")}),p.isSuccess&&x.length===0&&f.jsxs("div",{className:"flex flex-col items-center gap-2 p-8 text-center",children:[f.jsx(o1,{className:"h-6 w-6 text-gold-text","aria-hidden":!0}),f.jsx("p",{className:"text-sm font-semibold",children:"No active tokens"}),f.jsx("p",{className:"muted text-sm",children:"Create one to use the SDK or a script."})]}),x.map(E=>f.jsxs("div",{className:"flex items-center gap-4 p-4",children:[f.jsxs("div",{className:"min-w-0 flex-1",children:[f.jsx("p",{className:"truncate text-sm font-semibold",children:E.name}),f.jsxs("p",{className:"muted text-xs",children:["Created ",hs(E.createdAt),E.lastUsedAt?` · last used ${Bl(E.lastUsedAt)}`:" · not used yet"]})]}),f.jsxs("button",{type:"button",className:"btn-ghost","aria-label":`Revoke ${E.name}`,onClick:()=>l(E.id),children:[f.jsx(Kn,{className:"h-4 w-4"})," Revoke"]})]},E.id))]}),s&&f.jsx(Kh,{title:"New API token",label:"Token name",confirmLabel:"Create token",initialValue:"",pending:m.isPending,onSubmit:E=>m.mutate(E),onClose:()=>i(!1)}),C&&f.jsx(Yh,{title:"Revoke this token?",message:`"${C.name}" will stop working immediately. Any script using it will fail.`,confirmLabel:"Revoke",destructive:!0,busy:g.isPending,onConfirm:()=>g.mutate(C.id),onClose:()=>l(null)})]})}const g4=100;function y4(){const{uploads:e}=Jl(),t=Gt(),s=Ir(),[i,o]=Jh("omnicloud-view","list",qh),[l,u]=S.useState(null),[d,p]=S.useState(null),[m,g]=S.useState(!1),v=ep(),x=Mo({queryKey:["trash"],queryFn:M=>xe.trash.list({page:M,limit:g4}).then(_=>({items:[..._.folders.map(Wh),..._.files.map(Ci)],pagination:_.pagination}))}),C=x.items,k=S.useMemo(()=>C.map(un),[C]);S.useEffect(()=>{v.prune(k)},[k,v]);const T=Xh({onOpenItem:()=>{},onShowDetails:p,onReplaceFile:e.replace}),E=S.useMemo(()=>C.filter(M=>v.isSelected(un(M))),[C,v]),N=Mt({mutationFn:xe.trash.empty,onSuccess:M=>{ys(t),g(!1),s.success(`Emptied trash: ${bn(M.deletedFiles,"file")}, ${bn(M.deletedFolders,"folder")}`+(M.failedFiles>0?`, ${M.failedFiles} failed`:""))},onError:M=>s.error(Ie(M,"Could not empty the trash"))});Zh({onDelete:()=>T.requestDelete(E),onSelectAll:()=>v.selectAll(k),onEscape:()=>p(null)});const L=S.useCallback(M=>{M(),v.clear()},[v]),b=f.jsx(eu,{icon:Kn,title:"Trash is empty",description:"Items you move to the trash will show up here until you delete them permanently."});return f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(vs,{title:f.jsxs("div",{children:[f.jsx(xs,{children:"Trash"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Items here keep counting toward nothing until you empty the trash."})]}),actions:f.jsxs(f.Fragment,{children:[f.jsx(sp,{view:i,onChange:o}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>g(!0),disabled:C.length===0,children:[f.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}),"Empty trash"]})]})}),f.jsx("div",{className:"mt-5",children:f.jsx(np,{items:C,view:i,selection:v,onOpen:M=>p(M),onAction:T.handleAction,onContextMenu:u,menuContext:{trashed:!0,onTrashPage:!0},loading:x.isLoading,error:x.isError?Ie(x.error,"Could not load the trash."):null,onRetry:x.refetch,hasMore:x.hasMore,loadingMore:x.isLoadingMore,onLoadMore:x.loadMore,emptyState:b})}),f.jsxs(rp,{count:v.count,onClear:v.clear,onSelectAll:()=>v.selectAll(k),children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>L(()=>T.runBatch("restore",E)),children:[f.jsx(uh,{className:"h-4 w-4","aria-hidden":"true"}),"Restore"]}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>T.requestDelete(E),children:[f.jsx(Kn,{className:"h-4 w-4","aria-hidden":"true"}),"Delete permanently"]})]}),f.jsx(tp,{menu:l,onClose:()=>u(null)}),f.jsx(Ho,{item:d,onClose:()=>p(null),onAction:T.handleAction}),T.dialogs,m?f.jsx(Yh,{title:"Empty the trash?",message:"Every item in the trash will be permanently deleted. This action cannot be undone.",confirmLabel:"Empty trash",destructive:!0,busy:N.isPending,onConfirm:()=>N.mutate(),onClose:()=>g(!1)}):null]})}function v4(){const e=Gt(),[t,s]=S.useState(null),i=Mt({mutationFn:xe.storage.ensure,onSuccess:o=>{e.setQueryData(Uo,l=>l===void 0?l:{...l,storage:o.storage})},onError:o=>s(Ie(o,"Could not create your storage channel"))});return f.jsx("main",{id:"main",className:"flex min-h-dvh items-center justify-center p-4",children:f.jsxs("div",{className:"card w-full max-w-md p-8 text-center",children:[f.jsx("span",{className:"mx-auto grid h-14 w-14 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:f.jsx(Ux,{className:"h-6 w-6 text-gold","aria-hidden":"true"})}),f.jsx("span",{className:"eyebrow mt-5",children:"Finish setup"}),f.jsx("h1",{className:"mt-4 text-2xl font-bold tracking-[-0.02em]",children:"Finish setting up your storage"}),f.jsx("p",{className:"muted mt-2 text-sm leading-relaxed",children:"OmniCloud stores your files in a private Telegram channel. Create it now to start uploading."}),f.jsxs("button",{type:"button",className:"btn-gold mt-6 justify-center",disabled:i.isPending,onClick:()=>{s(null),i.mutate()},children:[i.isPending&&f.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),i.isPending?"Creating your private storage channel…":"Create private storage channel"]}),t!==null&&!i.isPending?f.jsx("div",{role:"alert",className:"notice notice-error",children:t}):null]})})}function x4(){return f.jsx("div",{role:"status","aria-label":"Loading",className:"flex h-dvh items-center justify-center bg-bg",children:f.jsx(kt,{className:"h-7 w-7 animate-spin text-gold","aria-hidden":"true"})})}function w4({children:e}){const t=Hh();return t.isPending?f.jsx(x4,{}):t.data===void 0||t.data.user===null?f.jsx(nh,{to:"/login",replace:!0}):t.data.storage===null?f.jsx(v4,{}):e}function S4(){const e=Gt();return S.useEffect(()=>UT(()=>{e.setQueryData(Uo,gS),e.removeQueries({predicate:t=>t.queryKey[0]!=="me"})}),[e]),f.jsxs(CE,{children:[f.jsx(kn,{path:"/login",element:f.jsx(a4,{})}),f.jsxs(kn,{element:f.jsx(w4,{children:f.jsx(CM,{})}),children:[f.jsx(kn,{path:"/",element:f.jsx(IM,{})}),f.jsx(kn,{path:"/recent",element:f.jsx(c4,{})}),f.jsx(kn,{path:"/starred",element:f.jsx(f4,{})}),f.jsx(kn,{path:"/trash",element:f.jsx(y4,{})}),f.jsx(kn,{path:"/storage",element:f.jsx(h4,{})}),f.jsx(kn,{path:"/settings/tokens",element:f.jsx(m4,{})})]}),f.jsx(kn,{path:"*",element:f.jsx(nh,{to:"/",replace:!0})})]})}const k4=new rC({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1,retry:1}}}),NS=document.getElementById("root");if(NS===null)throw new Error("Root element is missing from index.html");wC.createRoot(NS).render(f.jsx(S.StrictMode,{children:f.jsx(j2,{client:k4,children:f.jsx(ZR,{children:f.jsx(QE,{children:f.jsx(S4,{})})})})}));
|