PageSourceSearch

https://voloai.lovable.app/assets/index-DahzmP8s.js

js voloai.lovable.app collected 2026-10-03 03:45:41 UTC 962,128 bytes, 557 lines download raw bytes

vendor: 4,140 bytes, lines 1-9
1var My=e=>{throw TypeError(e)};var Lh=(e,t,n)=>t.has(e)||My("Cannot "+n);var D=(e,t,n)=>(Lh(e,t,"read from private field"),n?n.call(e):t.get(e)),xe=(e,t,n)=>t.has(e)?My("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ae=(e,t,n,r)=>(Lh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),mt=(e,t,n)=>(Lh(e,t,"access private method"),n);var fc=(e,t,n,r)=>({set _(s){ae(e,t,s,n)},get _(){return D(e,t,r)}});function dP(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function l1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c1={exports:{}},Ed={},u1={exports:{}},ve={};/**
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 Wl=Symbol.for("react.element"),hP=Symbol.for("react.portal"),fP=Symbol.for("react.fragment"),pP=Symbol.for("react.strict_mode"),mP=Symbol.for("react.profiler"),gP=Symbol.for("react.provider"),vP=Symbol.for("react.context"),yP=Symbol.for("react.forward_ref"),xP=Symbol.for("react.suspense"),wP=Symbol.for("react.memo"),bP=Symbol.for("react.lazy"),Dy=Symbol.iterator;function SP(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var d1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h1=Object.assign,f1={};function Go(e,t,n){this.props=e,this.context=t,this.refs=f1,this.updater=n||d1}Go.prototype.isReactComponent={};Go.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function p1(){}p1.prototype=Go.prototype;function ag(e,t,n){this.props=e,this.context=t,this.refs=f1,this.updater=n||d1}var lg=ag.prototype=new p1;lg.constructor=ag;h1(lg,Go.prototype);lg.isPureReactComponent=!0;var Oy=Array.isArray,m1=Object.prototype.hasOwnProperty,cg={current:null},g1={key:!0,ref:!0,__self:!0,__source:!0};function v1(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)m1.call(t,r)&&!g1.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Wl,type:e,key:i,ref:o,props:s,_owner:cg.current}}function jP(e,t){return{$$typeof:Wl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ug(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wl}function kP(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Iy=/\/+/g;function $h(e,t){return typeof e=="object"&&e!==null&&e.key!=null?kP(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Xc(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Wl:case hP:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+$h(o,0):r,Oy(s)?(n="",e!=null&&(n=e.replace(Iy,"$&/")+"/"),Xc(s,t,n,"",function(u){return u})):s!=null&&(ug(s)&&(s=jP(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Iy,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Oy(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+$h(i,l);o+=Xc(i,t,n,c,s)}else if(c=SP(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+$h(i,l++),o+=Xc(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function pc(e,t,n){if(e==null)return e;var r=[],s=0;return Xc(e,r,"","",function(i){return t.call(n,i,s++)}),r}function CP(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Et={current:null},Zc={transition:null},NP={ReactCurrentDispatcher:Et,ReactCurrentBatchConfig:Zc,ReactCurrentOwner:cg};function y1(){throw Error("act(...) is not supported in production builds of React.")}ve.Children={map:pc,forEach:function(e,t,n){pc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return pc(e,function(){t++}),t},toArray:function(e){return pc(e,function(t){return t})||[]},only:function(e){if(!ug(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ve.Component=Go;ve.Fragment=fP;ve.Profiler=mP;ve.PureComponent=ag;ve.StrictMode=pP;ve.Suspense=xP;ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NP;ve.act=y1;ve.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=h1({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=cg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)m1.call(t,c)&&!g1.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Wl,type:e.type,key:s,ref:i,props:r,_owner:o}};ve.createContext=function(e){return e={$$typeof:vP,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:gP,_context:e},e.Consumer=e};ve.createElement=v1;ve.createFactory=function(e){var t=v1.bind(null,e);return t.type=e,t};ve.createRef=function(){return{current:null}};ve.forwardRef=function(e){return{$$typeof:yP,render:e}};ve.isValidElement=ug;ve.lazy=function(e){return{$$typeof:bP,_payload:{_status:-1,_result:e},_init:CP}};ve.memo=function(e,t){return{$$typeof:wP,type:e,compare:t===void 0?null:t}};ve.startTransition=function(e){var t=Zc.transition;Zc.transition={};try{e()}finally{Zc.transition=t}};ve.unstable_act=y1;ve.useCallback=function(e,t){return Et.current.useCallback(e,t)};ve.useContext=function(e){return Et.current.useContext(e)};ve.useDebugValue=function(){};ve.useDeferredValue=function(e){return Et.current.useDeferredValue(e)};ve.useEffect=function(e,t){return Et.current.useEffect(e,t)};ve.useId=function(){return Et.current.useId()};ve.useImperativeHandle=function(e,t,n){return Et.current.useImperativeHandle(e,t,n)};ve.useInsertionEffect=function(e,t){return Et.current.useInsertionEffect(e,t)};ve.useLayoutEffect=function(e,t){return Et.current.useLayoutEffect(e,t)};ve.useMemo=function(e,t){return Et.current.useMemo(e,t)};ve.useReducer=function(e,t,n){return Et.current.useReducer(e,t,n)};ve.useRef=function(e){return Et.current.useRef(e)};ve.useState=function(e){return Et.current.useState(e)};ve.useSyncExternalStore=function(e,t,n){return Et.current.useSyncExternalStore(e,t,n)};ve.useTransition=function(){return Et.current.useTransition()};ve.version="18.3.1";u1.exports=ve;var m=u1.exports;const F=l1(m),dg=dP({__proto__:null,default:F},[m]);/**
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 EP=m,TP=Symbol.for("react.element"),_P=Symbol.for("react.fragment"),PP=Object.prototype.hasOwnProperty,RP=EP.__SECRET_INT
vendor: 11,408 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,AP={key:!0,ref:!0,__self:!0,__source:!0};function x1(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)PP.call(t,r)&&!AP.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:TP,type:e,key:i,ref:o,props:s,_owner:RP.current}}Ed.Fragment=_P;Ed.jsx=x1;Ed.jsxs=x1;c1.exports=Ed;var a=c1.exports,w1={exports:{}},Gt={},b1={exports:{}},S1={};/**
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 */(function(e){function t(P,T){var R=P.length;P.push(T);e:for(;0<R;){var V=R-1>>>1,B=P[V];if(0<s(B,T))P[V]=T,P[R]=B,R=V;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var T=P[0],R=P.pop();if(R!==T){P[0]=R;e:for(var V=0,B=P.length,z=B>>>1;V<z;){var ee=2*(V+1)-1,de=P[ee],ce=ee+1,U=P[ce];if(0>s(de,R))ce<B&&0>s(U,de)?(P[V]=U,P[ce]=R,V=ce):(P[V]=de,P[ee]=R,V=ee);else if(ce<B&&0>s(U,R))P[V]=U,P[ce]=R,V=ce;else break e}}return T}function s(P,T){var R=P.sortIndex-T.sortIndex;return R!==0?R:P.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,v=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(P){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=P)r(u),T.sortIndex=T.expirationTime,t(c,T);else break;T=n(u)}}function S(P){if(g=!1,x(P),!v)if(n(c)!==null)v=!0,$(j);else{var T=n(u);T!==null&&Q(S,T.startTime-P)}}function j(P,T){v=!1,g&&(g=!1,b(N),N=-1),p=!0;var R=f;try{for(x(T),h=n(c);h!==null&&(!(h.expirationTime>T)||P&&!M());){var V=h.callback;if(typeof V=="function"){h.callback=null,f=h.priorityLevel;var B=V(h.expirationTime<=T);T=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(c)&&r(c),x(T)}else r(c);h=n(c)}if(h!==null)var z=!0;else{var ee=n(u);ee!==null&&Q(S,ee.startTime-T),z=!1}return z}finally{h=null,f=R,p=!1}}var k=!1,C=null,N=-1,_=5,E=-1;function M(){return!(e.unstable_now()-E<_)}function O(){if(C!==null){var P=e.unstable_now();E=P;var T=!0;try{T=C(!0,P)}finally{T?H():(k=!1,C=null)}}else k=!1}var H;if(typeof w=="function")H=function(){w(O)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,K=I.port2;I.port1.onmessage=O,H=function(){K.postMessage(null)}}else H=function(){y(O,0)};function $(P){C=P,k||(k=!0,H())}function Q(P,T){N=y(function(){P(e.unstable_now())},T)}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(P){P.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,$(j))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(P){switch(f){case 1:case 2:case 3:var T=3;break;default:T=f}var R=f;f=T;try{return P()}finally{f=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,T){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var R=f;f=P;try{return T()}finally{f=R}},e.unstable_scheduleCallback=function(P,T,R){var V=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?V+R:V):R=V,P){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=R+B,P={id:d++,callback:T,priorityLevel:P,startTime:R,expirationTime:B,sortIndex:-1},R>V?(P.sortIndex=R,t(u,P),n(c)===null&&P===n(u)&&(g?(b(N),N=-1):g=!0,Q(S,R-V))):(P.sortIndex=B,t(c,P),v||p||(v=!0,$(j))),P},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(P){var T=f;return function(){var R=f;f=T;try{return P.apply(this,arguments)}finally{f=R}}}})(S1);b1.exports=S1;var MP=b1.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 DP=m,Kt=MP;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var j1=new Set,rl={};function ji(e,t){Ao(e,t),Ao(e+"Capture",t)}function Ao(e,t){for(rl[e]=t,e=0;e<t.length;e++)j1.add(t[e])}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rp=Object.prototype.hasOwnProperty,OP=/^[: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]*$/,Ly={},$y={};function IP(e){return rp.call($y,e)?!0:rp.call(Ly,e)?!1:OP.test(e)?$y[e]=!0:(Ly[e]=!0,!1)}function LP(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function $P(e,t,n,r){if(t===null||typeof t>"u"||LP(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ft[e]=new Tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ft[t]=new Tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ft[e]=new Tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ft[e]=new Tt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ft[e]=new Tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ft[e]=new Tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ft[e]=new Tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ft[e]=new Tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ft[e]=new Tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var hg=/[\-:]([a-z])/g;function fg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hg,fg);ft[t]=new Tt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hg,fg);ft[t]=new Tt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hg,fg);ft[t]=new Tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ft[e]=new Tt(e,1,!1,e.toLowerCase(),null,!1,!1)});ft.xlinkHref=new Tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ft[e]=new Tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function pg(e,t,n,r){var s=ft.hasOwnProperty(t)?ft[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&($P(t,n,s,r)&&(n=null),r||s===null?IP(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Rr=DP.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mc=Symbol.for("react.element"),Ji=Symbol.for("react.portal"),Qi=Symbol.for("react.fragment"),mg=Symbol.for("react.strict_mode"),sp=Symbol.for("react.profiler"),k1=Symbol.for("react.provider"),C1=Symbol.for("react.context"),gg=Symbol.for("react.forward_ref"),ip=Symbol.for("react.suspense"),op=Symbol.for("react.suspense_list"),vg=Symbol.for("react.memo"),Yr=Symbol.for("react.lazy"),N1=Symbol.for("react.offscreen"),Fy=Symbol.iterator;function ma(e){return e===null||typeof e!="object"?null:(e=Fy&&e[Fy]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,Fh;function Pa(e){if(Fh===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fh=t&&t[1]||""}return`
34`+Fh+e}var Uh=!1;function Vh(e,t){if(!e||Uh)return"";Uh=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 5,039 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35`),i=r.stack.split(`
36`),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var c=`
37`+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Uh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pa(e):""}function FP(e){switch(e.tag){case 5:return Pa(e.type);case 16:return Pa("Lazy");case 13:return Pa("Suspense");case 19:return Pa("SuspenseList");case 0:case 2:case 15:return e=Vh(e.type,!1),e;case 11:return e=Vh(e.type.render,!1),e;case 1:return e=Vh(e.type,!0),e;default:return""}}function ap(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Qi:return"Fragment";case Ji:return"Portal";case sp:return"Profiler";case mg:return"StrictMode";case ip:return"Suspense";case op:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C1:return(e.displayName||"Context")+".Consumer";case k1:return(e._context.displayName||"Context")+".Provider";case gg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vg:return t=e.displayName||null,t!==null?t:ap(e.type)||"Memo";case Yr:t=e._payload,e=e._init;try{return ap(e(t))}catch{}}return null}function UP(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ap(t);case 8:return t===mg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function E1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function VP(e){var t=E1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gc(e){e._valueTracker||(e._valueTracker=VP(e))}function T1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=E1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function lp(e,t){var n=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Uy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _1(e,t){t=t.checked,t!=null&&pg(e,"checked",t,!1)}function cp(e,t){_1(e,t);var n=xs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?up(e,t.type,n):t.hasOwnProperty("defaultValue")&&up(e,t.type,xs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Vy(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function up(e,t,n){(t!=="number"||Nu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ra=Array.isArray;function fo(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}
vendor: 10,558 bytes, line 37
37else{for(n=""+xs(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function dp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function By(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(Ra(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:xs(n)}}function P1(e,t){var n=xs(t.value),r=xs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function zy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function R1(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function hp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?R1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var vc,A1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(vc=vc||document.createElement("div"),vc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=vc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ua={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},BP=["Webkit","ms","Moz","O"];Object.keys(Ua).forEach(function(e){BP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ua[t]=Ua[e]})});function M1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ua.hasOwnProperty(e)&&Ua[e]?(""+t).trim():t+"px"}function D1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=M1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var zP=Le({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 fp(e,t){if(t){if(zP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function pp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mp=null;function yg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gp=null,po=null,mo=null;function Hy(e){if(e=Gl(e)){if(typeof gp!="function")throw Error(L(280));var t=e.stateNode;t&&(t=Ad(t),gp(e.stateNode,e.type,t))}}function O1(e){po?mo?mo.push(e):mo=[e]:po=e}function I1(){if(po){var e=po,t=mo;if(mo=po=null,Hy(e),t)for(e=0;e<t.length;e++)Hy(t[e])}}function L1(e,t){return e(t)}function $1(){}var Bh=!1;function F1(e,t,n){if(Bh)return e(t,n);Bh=!0;try{return L1(e,t,n)}finally{Bh=!1,(po!==null||mo!==null)&&($1(),I1())}}function il(e,t){var n=e.stateNode;if(n===null)return null;var r=Ad(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var vp=!1;if(kr)try{var ga={};Object.defineProperty(ga,"passive",{get:function(){vp=!0}}),window.addEventListener("test",ga,ga),window.removeEventListener("test",ga,ga)}catch{vp=!1}function HP(e,t,n,r,s,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Va=!1,Eu=null,Tu=!1,yp=null,WP={onError:function(e){Va=!0,Eu=e}};function qP(e,t,n,r,s,i,o,l,c){Va=!1,Eu=null,HP.apply(WP,arguments)}function KP(e,t,n,r,s,i,o,l,c){if(qP.apply(this,arguments),Va){if(Va){var u=Eu;Va=!1,Eu=null}else throw Error(L(198));Tu||(Tu=!0,yp=u)}}function ki(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function U1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Wy(e){if(ki(e)!==e)throw Error(L(188))}function GP(e){var t=e.alternate;if(!t){if(t=ki(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Wy(s),e;if(i===r)return Wy(s),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function V1(e){return e=GP(e),e!==null?B1(e):null}function B1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=B1(e);if(t!==null)return t;e=e.sibling}return null}var z1=Kt.unstable_scheduleCallback,qy=Kt.unstable_cancelCallback,YP=Kt.unstable_shouldYield,JP=Kt.unstable_requestPaint,ze=Kt.unstable_now,QP=Kt.unstable_getCurrentPriorityLevel,xg=Kt.unstable_ImmediatePriority,H1=Kt.unstable_UserBlockingPriority,_u=Kt.unstable_NormalPriority,XP=Kt.unstable_LowPriority,W1=Kt.unstable_IdlePriority,Td=null,Zn=null;function ZP(e){if(Zn&&typeof Zn.onCommitFiberRoot=="function")try{Zn.onCommitFiberRoot(Td,e,void 0,(e.current.flags&128)===128)}catch{}}var _n=Math.clz32?Math.clz32:nR,eR=Math.log,tR=Math.LN2;function nR(e){return e>>>=0,e===0?32:31-(eR(e)/tR|0)|0}var yc=64,xc=4194304;function Aa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Pu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Aa(l):(i&=o,i!==0&&(r=Aa(i)))}else o=n&~s,o!==0?r=Aa(o):i!==0&&(r=Aa(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-_n(t),s=1<<n,r|=e[n],t&=~s;return r}function rR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;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 sR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-_n(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=rR(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function xp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function q1(){var e=yc;return yc<<=1,!(yc&4194240)&&(yc=64),e}function zh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ql(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_n(t),e[t]=n}function iR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-_n(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function wg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_n(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Se=0;function K1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var G1,bg,Y1,J1,Q1,wp=!1,wc=[],us=null,ds=null,hs=null,ol=new Map,al=new Map,Qr=[],oR="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 Ky(e,t){switch(e){case"focusin":case"focusout":us=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":ol.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":al.delete(t.pointerId)}}function va(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Gl(t),t!==null&&bg(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 11,707 bytes, line 37
37function aR(e,t,n,r,s){switch(t){case"focusin":return us=va(us,e,t,n,r,s),!0;case"dragenter":return ds=va(ds,e,t,n,r,s),!0;case"mouseover":return hs=va(hs,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ol.set(i,va(ol.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,al.set(i,va(al.get(i)||null,e,t,n,r,s)),!0}return!1}function X1(e){var t=Gs(e.target);if(t!==null){var n=ki(t);if(n!==null){if(t=n.tag,t===13){if(t=U1(n),t!==null){e.blockedOn=t,Q1(e.priority,function(){Y1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mp=r,n.target.dispatchEvent(r),mp=null}else return t=Gl(n),t!==null&&bg(t),e.blockedOn=n,!1;t.shift()}return!0}function Gy(e,t,n){eu(e)&&n.delete(t)}function lR(){wp=!1,us!==null&&eu(us)&&(us=null),ds!==null&&eu(ds)&&(ds=null),hs!==null&&eu(hs)&&(hs=null),ol.forEach(Gy),al.forEach(Gy)}function ya(e,t){e.blockedOn===t&&(e.blockedOn=null,wp||(wp=!0,Kt.unstable_scheduleCallback(Kt.unstable_NormalPriority,lR)))}function ll(e){function t(s){return ya(s,e)}if(0<wc.length){ya(wc[0],e);for(var n=1;n<wc.length;n++){var r=wc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(us!==null&&ya(us,e),ds!==null&&ya(ds,e),hs!==null&&ya(hs,e),ol.forEach(t),al.forEach(t),n=0;n<Qr.length;n++)r=Qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)X1(n),n.blockedOn===null&&Qr.shift()}var go=Rr.ReactCurrentBatchConfig,Ru=!0;function cR(e,t,n,r){var s=Se,i=go.transition;go.transition=null;try{Se=1,Sg(e,t,n,r)}finally{Se=s,go.transition=i}}function uR(e,t,n,r){var s=Se,i=go.transition;go.transition=null;try{Se=4,Sg(e,t,n,r)}finally{Se=s,go.transition=i}}function Sg(e,t,n,r){if(Ru){var s=bp(e,t,n,r);if(s===null)Zh(e,t,r,Au,n),Ky(e,r);else if(aR(s,e,t,n,r))r.stopPropagation();else if(Ky(e,r),t&4&&-1<oR.indexOf(e)){for(;s!==null;){var i=Gl(s);if(i!==null&&G1(i),i=bp(e,t,n,r),i===null&&Zh(e,t,r,Au,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Zh(e,t,r,null,n)}}var Au=null;function bp(e,t,n,r){if(Au=null,e=yg(r),e=Gs(e),e!==null)if(t=ki(e),t===null)e=null;else if(n=t.tag,n===13){if(e=U1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Au=e,null}function Z1(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(QP()){case xg:return 1;case H1:return 4;case _u:case XP:return 16;case W1:return 536870912;default:return 16}default:return 16}}var os=null,jg=null,tu=null;function eS(){if(tu)return tu;var e,t=jg,n=t.length,r,s="value"in os?os.value:os.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return tu=s.slice(e,1<r?1-r:void 0)}function nu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bc(){return!0}function Yy(){return!1}function Yt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bc:Yy,this.isPropagationStopped=Yy,this}return Le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bc)},persist:function(){},isPersistent:bc}),t}var Yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kg=Yt(Yo),Kl=Le({},Yo,{view:0,detail:0}),dR=Yt(Kl),Hh,Wh,xa,_d=Le({},Kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==xa&&(xa&&e.type==="mousemove"?(Hh=e.screenX-xa.screenX,Wh=e.screenY-xa.screenY):Wh=Hh=0,xa=e),Hh)},movementY:function(e){return"movementY"in e?e.movementY:Wh}}),Jy=Yt(_d),hR=Le({},_d,{dataTransfer:0}),fR=Yt(hR),pR=Le({},Kl,{relatedTarget:0}),qh=Yt(pR),mR=Le({},Yo,{animationName:0,elapsedTime:0,pseudoElement:0}),gR=Yt(mR),vR=Le({},Yo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yR=Yt(vR),xR=Le({},Yo,{data:0}),Qy=Yt(xR),wR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bR={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"},SR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=SR[e])?!!t[e]:!1}function Cg(){return jR}var kR=Le({},Kl,{key:function(e){if(e.key){var t=wR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?bR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cg,charCode:function(e){return e.type==="keypress"?nu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CR=Yt(kR),NR=Le({},_d,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xy=Yt(NR),ER=Le({},Kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cg}),TR=Yt(ER),_R=Le({},Yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),PR=Yt(_R),RR=Le({},_d,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),AR=Yt(RR),MR=[9,13,27,32],Ng=kr&&"CompositionEvent"in window,Ba=null;kr&&"documentMode"in document&&(Ba=document.documentMode);var DR=kr&&"TextEvent"in window&&!Ba,tS=kr&&(!Ng||Ba&&8<Ba&&11>=Ba),Zy=" ",ex=!1;function nS(e,t){switch(e){case"keyup":return MR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xi=!1;function OR(e,t){switch(e){case"compositionend":return rS(t);case"keypress":return t.which!==32?null:(ex=!0,Zy);case"textInput":return e=t.data,e===Zy&&ex?null:e;default:return null}}function IR(e,t){if(Xi)return e==="compositionend"||!Ng&&nS(e,t)?(e=eS(),tu=jg=os=null,Xi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return tS&&t.locale!=="ko"?null:t.data;default:return null}}var LR={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 tx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!LR[e.type]:t==="textarea"}function sS(e,t,n,r){O1(r),t=Mu(t,"onChange"),0<t.length&&(n=new kg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var za=null,cl=null;function $R(e){mS(e,0)}function Pd(e){var t=to(e);if(T1(t))return e}function FR(e,t){if(e==="change")return t}var iS=!1;if(kr){var Kh;if(kr){var Gh="oninput"in document;if(!Gh){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),Gh=typeof nx.oninput=="function"}Kh=Gh}else Kh=!1;iS=Kh&&(!document.documentMode||9<document.documentMode)}function rx(){za&&(za.detachEvent("onpropertychange",oS),cl=za=null)}function oS(e){if(e.propertyName==="value"&&Pd(cl)){var t=[];sS(t,cl,e,yg(e)),F1($R,t)}}function UR(e,t,n){e==="focusin"?(rx(),za=t,cl=n,za.attachEvent("onpropertychange",oS)):e==="focusout"&&rx()}function VR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pd(cl)}function BR(e,t){if(e==="click")return Pd(t)}function zR(e,t){if(e==="input"||e==="change")return Pd(t)}function HR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var An=typeof Object.is=="function"?Object.is:HR;function ul(e,t){if(An(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!rp.call(t,s)||!An(e[s],t[s]))return!1}return!0}function sx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ix(e,t){var n=sx(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=sx(n)}}function aS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?aS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lS(){for(var e=window,t=Nu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nu(e.document)}return t}function Eg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WR(e){var t=lS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&aS(n.ownerDocument.documentElement,n)){if(r!==null&&Eg(n)){if
vendor: 4,424 bytes, line 37
37(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=ix(n,i);var o=ix(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var qR=kr&&"documentMode"in document&&11>=document.documentMode,Zi=null,Sp=null,Ha=null,jp=!1;function ox(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jp||Zi==null||Zi!==Nu(r)||(r=Zi,"selectionStart"in r&&Eg(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ha&&ul(Ha,r)||(Ha=r,r=Mu(Sp,"onSelect"),0<r.length&&(t=new kg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zi)))}function Sc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var eo={animationend:Sc("Animation","AnimationEnd"),animationiteration:Sc("Animation","AnimationIteration"),animationstart:Sc("Animation","AnimationStart"),transitionend:Sc("Transition","TransitionEnd")},Yh={},cS={};kr&&(cS=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function Rd(e){if(Yh[e])return Yh[e];if(!eo[e])return e;var t=eo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cS)return Yh[e]=t[n];return e}var uS=Rd("animationend"),dS=Rd("animationiteration"),hS=Rd("animationstart"),fS=Rd("transitionend"),pS=new Map,ax="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 Ns(e,t){pS.set(e,t),ji(t,[e])}for(var Jh=0;Jh<ax.length;Jh++){var Qh=ax[Jh],KR=Qh.toLowerCase(),GR=Qh[0].toUpperCase()+Qh.slice(1);Ns(KR,"on"+GR)}Ns(uS,"onAnimationEnd");Ns(dS,"onAnimationIteration");Ns(hS,"onAnimationStart");Ns("dblclick","onDoubleClick");Ns("focusin","onFocus");Ns("focusout","onBlur");Ns(fS,"onTransitionEnd");Ao("onMouseEnter",["mouseout","mouseover"]);Ao("onMouseLeave",["mouseout","mouseover"]);Ao("onPointerEnter",["pointerout","pointerover"]);Ao("onPointerLeave",["pointerout","pointerover"]);ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ji("onBeforeInput",["compositionend","keypress","textInput","paste"]);ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ma="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(" "),YR=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ma));function lx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,KP(r,t,void 0,e),e.currentTarget=null}
vendor: 3,878 bytes, line 37
37function mS(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;lx(s,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;lx(s,l,u),i=c}}}if(Tu)throw e=yp,Tu=!1,yp=null,e}function Te(e,t){var n=t[Tp];n===void 0&&(n=t[Tp]=new Set);var r=e+"__bubble";n.has(r)||(gS(t,e,2,!1),n.add(r))}function Xh(e,t,n){var r=0;t&&(r|=4),gS(n,e,r,t)}var jc="_reactListening"+Math.random().toString(36).slice(2);function dl(e){if(!e[jc]){e[jc]=!0,j1.forEach(function(n){n!=="selectionchange"&&(YR.has(n)||Xh(n,!1,e),Xh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jc]||(t[jc]=!0,Xh("selectionchange",!1,t))}}function gS(e,t,n,r){switch(Z1(t)){case 1:var s=cR;break;case 4:s=uR;break;default:s=Sg}n=s.bind(null,t,n,e),s=void 0,!vp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Zh(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Gs(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}F1(function(){var u=i,d=yg(n),h=[];e:{var f=pS.get(e);if(f!==void 0){var p=kg,v=e;switch(e){case"keypress":if(nu(n)===0)break e;case"keydown":case"keyup":p=CR;break;case"focusin":v="focus",p=qh;break;case"focusout":v="blur",p=qh;break;case"beforeblur":case"afterblur":p=qh;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=Jy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=fR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=TR;break;case uS:case dS:case hS:p=gR;break;case fS:p=PR;break;case"scroll":p=dR;break;case"wheel":p=AR;break;case"copy":case"cut":case"paste":p=yR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Xy}var g=(t&4)!==0,y=!g&&e==="scroll",b=g?f!==null?f+"Capture":null:f;g=[];for(var w=u,x;w!==null;){x=w;var S=x.stateNode;if(x.tag===5&&S!==null&&(x=S,b!==null&&(S=il(w,b),S!=null&&g.push(hl(w,S,x)))),y)break;w=w.return}0<g.length&&(f=new p(f,v,null,n,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==mp&&(v=n.relatedTarget||n.fromElement)&&(Gs(v)||v[Cr]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?Gs(v):null,v!==null&&(y=ki(v),v!==y||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=u),p!==v)){if(g=Jy,S="onMouseLeave",b="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(g=Xy,S="onPointerLeave",b="onPointerEnter",w="pointer"),y=p==null?f:to(p),x=v==null?f:to(v),f=new g(S,w+"leave",p,n,d),f.target=y,f.relatedTarget=x,S=null,Gs(d)===u&&(g=new g(b,w+"enter",v,n,d),g.target=x,g.relatedTarget=y,S=g),y=S,p&&v)t:{for(g=p,b=v,w=0,x=g;x;x=Mi(x))w++;for(x=0,S=b;S;S=Mi(S))x++;for(;0<w-x;)g=Mi(g),w--;for(;0<x-w;)b=Mi(b),x--;for(;w--;){if(g===b||b!==null&&g===b.alternate)break t;g=Mi(g),b=Mi(b)}g=null}else g=null;p!==null&&cx(h,f,p,g,!1),v!==null&&y!==null&&cx(h,y,v,g,!0)}}
vendor: 4,734 bytes, lines 37-38
37e:{if(f=u?to(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var j=FR;else if(tx(f))if(iS)j=zR;else{j=VR;var k=UR}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(j=BR);if(j&&(j=j(e,u))){sS(h,j,n,d);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&up(f,"number",f.value)}switch(k=u?to(u):window,e){case"focusin":(tx(k)||k.contentEditable==="true")&&(Zi=k,Sp=u,Ha=null);break;case"focusout":Ha=Sp=Zi=null;break;case"mousedown":jp=!0;break;case"contextmenu":case"mouseup":case"dragend":jp=!1,ox(h,n,d);break;case"selectionchange":if(qR)break;case"keydown":case"keyup":ox(h,n,d)}var C;if(Ng)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Xi?nS(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(tS&&n.locale!=="ko"&&(Xi||N!=="onCompositionStart"?N==="onCompositionEnd"&&Xi&&(C=eS()):(os=d,jg="value"in os?os.value:os.textContent,Xi=!0)),k=Mu(u,N),0<k.length&&(N=new Qy(N,e,null,n,d),h.push({event:N,listeners:k}),C?N.data=C:(C=rS(n),C!==null&&(N.data=C)))),(C=DR?OR(e,n):IR(e,n))&&(u=Mu(u,"onBeforeInput"),0<u.length&&(d=new Qy("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}mS(h,t)})}function hl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Mu(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=il(e,n),i!=null&&r.unshift(hl(e,i,s)),i=il(e,t),i!=null&&r.push(hl(e,i,s))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function cx(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=il(n,i),c!=null&&o.unshift(hl(n,c,l))):s||(c=il(n,i),c!=null&&o.push(hl(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var JR=/\r\n?/g,QR=/\u0000|\uFFFD/g;function ux(e){return(typeof e=="string"?e:""+e).replace(JR,`
38`).replace(QR,"")}function kc(e,t,n){if(t=ux(t),ux(e)!==t&&n)throw Error(L(425))}function Du(){}var kp=null,Cp=null;function Np(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ep=typeof setTimeout=="function"?setTimeout:void 0,XR=typeof clearTimeout=="function"?clearTimeout:void 0,dx=typeof Promise=="function"?Promise:void 0,ZR=typeof queueMicrotask=="function"?queueMicrotask:typeof dx<"u"?function(e){return dx.resolve(null).then(e).catch(eA)}:Ep;function eA(e){setTimeout(function(){throw e})}function ef(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ll(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ll(t)}function fs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function hx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Jo=Math.random().toString(36).slice(2),Yn="__reactFiber$"+Jo,fl="__reactProps$"+Jo,Cr="__reactContainer$"+Jo,Tp="__reactEvents$"+Jo,tA="__reactListeners$"+Jo,nA="__reactHandles$"+Jo;function Gs(e){var t=e[Yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[Yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hx(e);e!==null;){if(n=e[Yn])return n;e=hx(e)}return t}e=n,n=e.parentNode}return null}function Gl(e){return e=e[Yn]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function to(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function Ad(e){return e[fl]||null}var _p=[],no=-1;function Es(e){return{current:e}}function Pe(e){0>no||(e.current=_p[no],_p[no]=null,no--)}function Ne(e,t){no++,_p[no]=e.current,e.current=t}var ws={},wt=Es(ws),Dt=Es(!1),hi=ws;function Mo(e,t){var n=e.type.contextTypes;if(!n)return ws;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ot(e){return e=e.childContextTypes,e!=null}function Ou(){Pe(Dt),Pe(wt)}function fx(e,t,n){if(wt.current!==ws)throw Error(L(168));Ne(wt,t),Ne(Dt,n)}
vendor: 16,840 bytes, line 38
38function vS(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,UP(e)||"Unknown",s));return Le({},n,r)}function Iu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ws,hi=wt.current,Ne(wt,e),Ne(Dt,Dt.current),!0}function px(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=vS(e,t,hi),r.__reactInternalMemoizedMergedChildContext=e,Pe(Dt),Pe(wt),Ne(wt,e)):Pe(Dt),Ne(Dt,n)}var yr=null,Md=!1,tf=!1;function yS(e){yr===null?yr=[e]:yr.push(e)}function rA(e){Md=!0,yS(e)}function Ts(){if(!tf&&yr!==null){tf=!0;var e=0,t=Se;try{var n=yr;for(Se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}yr=null,Md=!1}catch(s){throw yr!==null&&(yr=yr.slice(e+1)),z1(xg,Ts),s}finally{Se=t,tf=!1}}return null}var ro=[],so=0,Lu=null,$u=0,en=[],tn=0,fi=null,wr=1,br="";function Bs(e,t){ro[so++]=$u,ro[so++]=Lu,Lu=e,$u=t}function xS(e,t,n){en[tn++]=wr,en[tn++]=br,en[tn++]=fi,fi=e;var r=wr;e=br;var s=32-_n(r)-1;r&=~(1<<s),n+=1;var i=32-_n(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,wr=1<<32-_n(t)+s|n<<s|r,br=i+e}else wr=1<<i|n<<s|r,br=e}function Tg(e){e.return!==null&&(Bs(e,1),xS(e,1,0))}function _g(e){for(;e===Lu;)Lu=ro[--so],ro[so]=null,$u=ro[--so],ro[so]=null;for(;e===fi;)fi=en[--tn],en[tn]=null,br=en[--tn],en[tn]=null,wr=en[--tn],en[tn]=null}var Wt=null,Ht=null,Ae=!1,Tn=null;function wS(e,t){var n=nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mx(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=fs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Ht=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=fi!==null?{id:wr,overflow:br}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Ht=null,!0):!1;default:return!1}}function Pp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Rp(e){if(Ae){var t=Ht;if(t){var n=t;if(!mx(e,t)){if(Pp(e))throw Error(L(418));t=fs(n.nextSibling);var r=Wt;t&&mx(e,t)?wS(r,n):(e.flags=e.flags&-4097|2,Ae=!1,Wt=e)}}else{if(Pp(e))throw Error(L(418));e.flags=e.flags&-4097|2,Ae=!1,Wt=e}}}function gx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function Cc(e){if(e!==Wt)return!1;if(!Ae)return gx(e),Ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Np(e.type,e.memoizedProps)),t&&(t=Ht)){if(Pp(e))throw bS(),Error(L(418));for(;t;)wS(e,t),t=fs(t.nextSibling)}if(gx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ht=fs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ht=null}}else Ht=Wt?fs(e.stateNode.nextSibling):null;return!0}function bS(){for(var e=Ht;e;)e=fs(e.nextSibling)}function Do(){Ht=Wt=null,Ae=!1}function Pg(e){Tn===null?Tn=[e]:Tn.push(e)}var sA=Rr.ReactCurrentBatchConfig;function wa(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function Nc(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function vx(e){var t=e._init;return t(e._payload)}function SS(e){function t(b,w){if(e){var x=b.deletions;x===null?(b.deletions=[w],b.flags|=16):x.push(w)}}function n(b,w){if(!e)return null;for(;w!==null;)t(b,w),w=w.sibling;return null}function r(b,w){for(b=new Map;w!==null;)w.key!==null?b.set(w.key,w):b.set(w.index,w),w=w.sibling;return b}function s(b,w){return b=vs(b,w),b.index=0,b.sibling=null,b}function i(b,w,x){return b.index=x,e?(x=b.alternate,x!==null?(x=x.index,x<w?(b.flags|=2,w):x):(b.flags|=2,w)):(b.flags|=1048576,w)}function o(b){return e&&b.alternate===null&&(b.flags|=2),b}function l(b,w,x,S){return w===null||w.tag!==6?(w=cf(x,b.mode,S),w.return=b,w):(w=s(w,x),w.return=b,w)}function c(b,w,x,S){var j=x.type;return j===Qi?d(b,w,x.props.children,S,x.key):w!==null&&(w.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Yr&&vx(j)===w.type)?(S=s(w,x.props),S.ref=wa(b,w,x),S.return=b,S):(S=cu(x.type,x.key,x.props,null,b.mode,S),S.ref=wa(b,w,x),S.return=b,S)}function u(b,w,x,S){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=uf(x,b.mode,S),w.return=b,w):(w=s(w,x.children||[]),w.return=b,w)}function d(b,w,x,S,j){return w===null||w.tag!==7?(w=li(x,b.mode,S,j),w.return=b,w):(w=s(w,x),w.return=b,w)}function h(b,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=cf(""+w,b.mode,x),w.return=b,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case mc:return x=cu(w.type,w.key,w.props,null,b.mode,x),x.ref=wa(b,null,w),x.return=b,x;case Ji:return w=uf(w,b.mode,x),w.return=b,w;case Yr:var S=w._init;return h(b,S(w._payload),x)}if(Ra(w)||ma(w))return w=li(w,b.mode,x,null),w.return=b,w;Nc(b,w)}return null}function f(b,w,x,S){var j=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return j!==null?null:l(b,w,""+x,S);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case mc:return x.key===j?c(b,w,x,S):null;case Ji:return x.key===j?u(b,w,x,S):null;case Yr:return j=x._init,f(b,w,j(x._payload),S)}if(Ra(x)||ma(x))return j!==null?null:d(b,w,x,S,null);Nc(b,x)}return null}function p(b,w,x,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return b=b.get(x)||null,l(w,b,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case mc:return b=b.get(S.key===null?x:S.key)||null,c(w,b,S,j);case Ji:return b=b.get(S.key===null?x:S.key)||null,u(w,b,S,j);case Yr:var k=S._init;return p(b,w,x,k(S._payload),j)}if(Ra(S)||ma(S))return b=b.get(x)||null,d(w,b,S,j,null);Nc(w,S)}return null}function v(b,w,x,S){for(var j=null,k=null,C=w,N=w=0,_=null;C!==null&&N<x.length;N++){C.index>N?(_=C,C=null):_=C.sibling;var E=f(b,C,x[N],S);if(E===null){C===null&&(C=_);break}e&&C&&E.alternate===null&&t(b,C),w=i(E,w,N),k===null?j=E:k.sibling=E,k=E,C=_}if(N===x.length)return n(b,C),Ae&&Bs(b,N),j;if(C===null){for(;N<x.length;N++)C=h(b,x[N],S),C!==null&&(w=i(C,w,N),k===null?j=C:k.sibling=C,k=C);return Ae&&Bs(b,N),j}for(C=r(b,C);N<x.length;N++)_=p(C,b,N,x[N],S),_!==null&&(e&&_.alternate!==null&&C.delete(_.key===null?N:_.key),w=i(_,w,N),k===null?j=_:k.sibling=_,k=_);return e&&C.forEach(function(M){return t(b,M)}),Ae&&Bs(b,N),j}function g(b,w,x,S){var j=ma(x);if(typeof j!="function")throw Error(L(150));if(x=j.call(x),x==null)throw Error(L(151));for(var k=j=null,C=w,N=w=0,_=null,E=x.next();C!==null&&!E.done;N++,E=x.next()){C.index>N?(_=C,C=null):_=C.sibling;var M=f(b,C,E.value,S);if(M===null){C===null&&(C=_);break}e&&C&&M.alternate===null&&t(b,C),w=i(M,w,N),k===null?j=M:k.sibling=M,k=M,C=_}if(E.done)return n(b,C),Ae&&Bs(b,N),j;if(C===null){for(;!E.done;N++,E=x.next())E=h(b,E.value,S),E!==null&&(w=i(E,w,N),k===null?j=E:k.sibling=E,k=E);return Ae&&Bs(b,N),j}for(C=r(b,C);!E.done;N++,E=x.next())E=p(C,b,N,E.value,S),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?N:E.key),w=i(E,w,N),k===null?j=E:k.sibling=E,k=E);return e&&C.forEach(function(O){return t(b,O)}),Ae&&Bs(b,N),j}function y(b,w,x,S){if(typeof x=="object"&&x!==null&&x.type===Qi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case mc:e:{for(var j=x.key,k=w;k!==null;){if(k.key===j){if(j=x.type,j===Qi){if(k.tag===7){n(b,k.sibling),w=s(k,x.props.children),w.return=b,b=w;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Yr&&vx(j)===k.type){n(b,k.sibling),w=s(k,x.props),w.ref=wa(b,k,x),w.return=b,b=w;break e}n(b,k);break}else t(b,k);k=k.sibling}x.type===Qi?(w=li(x.props.children,b.mode,S,x.key),w.return=b,b=w):(S=cu(x.type,x.key,x.props,null,b.mode,S),S.ref=wa(b,w,x),S.return=b,b=S)}return o(b);case Ji:e:{for(k=x.key;w!==null;){if(w.key===k)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(b,w.sibling),w=s(w,x.children||[]),w.return=b,b=w;break e}else{n(b,w);break}else t(b,w);w=w.sibling}w=uf(x,b.mode,S),w.return=b,b=w}return o(b);case Yr:return k=x._init,y(b,w,k(x._payload),S)}if(Ra(x))return v(b,w,x,S);if(ma(x))return g(b,w,x,S);Nc(b,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(b,w.sibling),w=s(w,x),w.return=b,b=w):(n(b,w),w=cf(x,b.mode,S),w.return=b,b=w),o(b)):n(b,w)}return y}var Oo=SS(!0),jS=SS(!1),Fu=Es(null),Uu=null,io=null,Rg=null;function Ag(){Rg=io=Uu=null}function Mg(e){var t=Fu.current;Pe(Fu),e._currentValue=t}function Ap(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function vo(e,t){Uu=e,Rg=io=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Rg!==e)if(e={context:e,memoizedValue:t,next:null},io===null){if(Uu===null)throw Error(L(308));io=e,Uu.dependencies={lanes:0,firstContext:e}}else io=io.next=e;return t}var Ys=null;function Dg(e){Ys===null?Ys=[e]:Ys.push(e)}function kS(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Dg(t)):(n.next=s.next,s.next=n),t.interleaved=n,Nr(e,r)}function Nr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Jr=!1;function Og(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function CS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ps(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ye&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Nr(e,n)}return s=r.interleaved,s===null?(t.next=t,Dg(r)):(t.next=s.next,s.next=t),r.interleaved=t,Nr(e,n)}function ru(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wg(e,n)}}function yx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Vu(e,t,n,r){var s=e.updateQueue;Jr=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;o=0,d=u=c=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,g=l;switch(f=t,p=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){h=v.call(p,h,f);break e}h=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,h,f):v,f==null)break e;h=Le({},h,f);break e;case 2:Jr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);mi|=o,e.lanes=o,e.memoizedState=h}}function xx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var Yl={},er=Es(Yl),pl=Es(Yl),ml=Es(Yl);function Js(e){if(e===Yl)throw Error(L(174));return e}function Ig(e,t){switch(Ne(ml,t),Ne(pl,e),Ne(er,Yl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:hp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=hp(t,e)}Pe(er),Ne(er,t)}function Io(){Pe(er),Pe(pl),Pe(ml)}function NS(e){Js(ml.current);var t=Js(er.current),n=hp(t,e.type);t!==n&&(Ne(pl,e),Ne(er,n))}function Lg(e){pl.current===e&&(Pe(er),Pe(pl))}var De=Es(0);function Bu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nf=[];function $g(){for(var e=0;e<nf.length;e++)nf[e]._workInProgressVersionPrimary=null;nf.length=0}var su=Rr.ReactCurrentDispatcher,rf=Rr.ReactCurrentBatchConfig,pi=0,Oe=null,Qe=null,tt=null,zu=!1,Wa=!1,gl=0,iA=0;function gt(){throw Error(L(321))}function Fg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!An(e[n],t[n]))return!1;return!0}function Ug(e,t,n,r,s,i){if(pi=i,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,su.current=e===null||e.memoizedState===null?cA:uA,e=n(r,s),Wa){i=0;do{if(Wa=!1,gl=0,25<=i)throw Error(L(301));i+=1,tt=Qe=null,t.updateQueue=null,su.current=dA,e=n(r,s)}while(Wa)}if(su.current=Hu,t=Qe!==null&&Qe.next!==null,pi=0,tt=Qe=Oe=null,zu=!1,t)throw Error(L(300));return e}function Vg(){var e=gl!==0;return gl=0,e}function Un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?Oe.memoizedState=tt=e:tt=tt.next=e,tt}function un(){if(Qe===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var t=tt===null?Oe.memoizedState:tt.next;if(t!==null)tt=t,Qe=e;else{if(e===null)throw Error(L(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},tt===null?Oe.memoizedState=tt=e:tt=tt.next=e}return tt}function vl(e,t){return typeof t=="function"?t(e):t}function sf(e){var t=un(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Qe,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((pi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,Oe.lanes|=d,mi|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,An(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Oe.lanes|=i,mi|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function of(e){var t=un(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);An(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ES(){}function TS(e,t){var n=Oe,r=un(),s=t(),i=!An(r.memoizedState,s);if(i&&(r.memoizedState=s,Mt=!0),r=r.queue,Bg(RS.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||tt!==null&&tt.memoizedState.tag&1){if(n.flags|=2048,yl(9,PS.bind(null,n,r,s,t),void 0,null),rt===null)throw Error(L(349));pi&30||_S(n,t,s)}return s}
vendor: 4,204 bytes, line 38
38function _S(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function PS(e,t,n,r){t.value=n,t.getSnapshot=r,AS(t)&&MS(e)}function RS(e,t,n){return n(function(){AS(t)&&MS(e)})}function AS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!An(e,n)}catch{return!0}}function MS(e){var t=Nr(e,1);t!==null&&Pn(t,e,1,-1)}function wx(e){var t=Un();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:e},t.queue=e,e=e.dispatch=lA.bind(null,Oe,e),[t.memoizedState,e]}function yl(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function DS(){return un().memoizedState}function iu(e,t,n,r){var s=Un();Oe.flags|=e,s.memoizedState=yl(1|t,n,void 0,r===void 0?null:r)}function Dd(e,t,n,r){var s=un();r=r===void 0?null:r;var i=void 0;if(Qe!==null){var o=Qe.memoizedState;if(i=o.destroy,r!==null&&Fg(r,o.deps)){s.memoizedState=yl(t,n,i,r);return}}Oe.flags|=e,s.memoizedState=yl(1|t,n,i,r)}function bx(e,t){return iu(8390656,8,e,t)}function Bg(e,t){return Dd(2048,8,e,t)}function OS(e,t){return Dd(4,2,e,t)}function IS(e,t){return Dd(4,4,e,t)}function LS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $S(e,t,n){return n=n!=null?n.concat([e]):null,Dd(4,4,LS.bind(null,t,e),n)}function zg(){}function FS(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function US(e,t){var n=un();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function VS(e,t,n){return pi&21?(An(n,t)||(n=q1(),Oe.lanes|=n,mi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Mt=!0),e.memoizedState=n)}function oA(e,t){var n=Se;Se=n!==0&&4>n?n:4,e(!0);var r=rf.transition;rf.transition={};try{e(!1),t()}finally{Se=n,rf.transition=r}}function BS(){return un().memoizedState}function aA(e,t,n){var r=gs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zS(e))HS(t,n);else if(n=kS(e,t,n,r),n!==null){var s=Nt();Pn(n,e,r,s),WS(n,t,r)}}function lA(e,t,n){var r=gs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zS(e))HS(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,An(l,o)){var c=t.interleaved;c===null?(s.next=s,Dg(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=kS(e,t,s,r),n!==null&&(s=Nt(),Pn(n,e,r,s),WS(n,t,r))}}function zS(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function HS(e,t){Wa=zu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function WS(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wg(e,n)}}var Hu={readContext:cn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},cA={readContext:cn,useCallback:function(e,t){return Un().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:bx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,iu(4194308,4,LS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return iu(4194308,4,e,t)},useInsertionEffect:function(e,t){return iu(4,2,e,t)},useMemo:function(e,t){var n=Un();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Un();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=aA.bind(null,Oe,e),[r.memoizedState,e]}
vendor: 5,548 bytes, lines 38-40
38,useRef:function(e){var t=Un();return e={current:e},t.memoizedState=e},useState:wx,useDebugValue:zg,useDeferredValue:function(e){return Un().memoizedState=e},useTransition:function(){var e=wx(!1),t=e[0];return e=oA.bind(null,e[1]),Un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Oe,s=Un();if(Ae){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),rt===null)throw Error(L(349));pi&30||_S(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,bx(RS.bind(null,r,i,e),[e]),r.flags|=2048,yl(9,PS.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Un(),t=rt.identifierPrefix;if(Ae){var n=br,r=wr;n=(r&~(1<<32-_n(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=iA++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uA={readContext:cn,useCallback:FS,useContext:cn,useEffect:Bg,useImperativeHandle:$S,useInsertionEffect:OS,useLayoutEffect:IS,useMemo:US,useReducer:sf,useRef:DS,useState:function(){return sf(vl)},useDebugValue:zg,useDeferredValue:function(e){var t=un();return VS(t,Qe.memoizedState,e)},useTransition:function(){var e=sf(vl)[0],t=un().memoizedState;return[e,t]},useMutableSource:ES,useSyncExternalStore:TS,useId:BS,unstable_isNewReconciler:!1},dA={readContext:cn,useCallback:FS,useContext:cn,useEffect:Bg,useImperativeHandle:$S,useInsertionEffect:OS,useLayoutEffect:IS,useMemo:US,useReducer:of,useRef:DS,useState:function(){return of(vl)},useDebugValue:zg,useDeferredValue:function(e){var t=un();return Qe===null?t.memoizedState=e:VS(t,Qe.memoizedState,e)},useTransition:function(){var e=of(vl)[0],t=un().memoizedState;return[e,t]},useMutableSource:ES,useSyncExternalStore:TS,useId:BS,unstable_isNewReconciler:!1};function Sn(e,t){if(e&&e.defaultProps){t=Le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Mp(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Od={isMounted:function(e){return(e=e._reactInternals)?ki(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nt(),s=gs(e),i=Sr(r,s);i.payload=t,n!=null&&(i.callback=n),t=ps(e,i,s),t!==null&&(Pn(t,e,s,r),ru(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nt(),s=gs(e),i=Sr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ps(e,i,s),t!==null&&(Pn(t,e,s,r),ru(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nt(),r=gs(e),s=Sr(n,r);s.tag=2,t!=null&&(s.callback=t),t=ps(e,s,r),t!==null&&(Pn(t,e,r,n),ru(t,e,r))}};function Sx(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!ul(n,r)||!ul(s,i):!0}function qS(e,t,n){var r=!1,s=ws,i=t.contextType;return typeof i=="object"&&i!==null?i=cn(i):(s=Ot(t)?hi:wt.current,r=t.contextTypes,i=(r=r!=null)?Mo(e,s):ws),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Od,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function jx(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Od.enqueueReplaceState(t,t.state,null)}function Dp(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Og(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=cn(i):(i=Ot(t)?hi:wt.current,s.context=Mo(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Mp(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Od.enqueueReplaceState(s,s.state,null),Vu(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Lo(e,t){try{var n="",r=t;do n+=FP(r),r=r.return;while(r);var s=n}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:e,source:t,stack:s,digest:null}}function af(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Op(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var hA=typeof WeakMap=="function"?WeakMap:Map;function KS(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,Wp=r),Op(e,t)},n}function GS(e,t,n){n=Sr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Op(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Op(e,t),typeof r!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function kx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hA;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=NA.bind(null,e,t,n),t.then(e,e))}function Cx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}
vendor: 10,782 bytes, line 40
40function Nx(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Sr(-1,1),t.tag=2,ps(n,t,1))),n.lanes|=1),e)}var fA=Rr.ReactCurrentOwner,Mt=!1;function St(e,t,n,r){t.child=e===null?jS(t,null,n,r):Oo(t,e.child,n,r)}function Ex(e,t,n,r,s){n=n.render;var i=t.ref;return vo(t,s),r=Ug(e,t,n,r,i,s),n=Vg(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Er(e,t,s)):(Ae&&n&&Tg(t),t.flags|=1,St(e,t,r,s),t.child)}function Tx(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Qg(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,YS(e,t,i,r,s)):(e=cu(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:ul,n(o,r)&&e.ref===t.ref)return Er(e,t,s)}return t.flags|=1,e=vs(i,r),e.ref=t.ref,e.return=t,t.child=e}function YS(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(ul(i,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Mt=!0);else return t.lanes=e.lanes,Er(e,t,s)}return Ip(e,t,n,r,s)}function JS(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ne(ao,Vt),Vt|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ne(ao,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ne(ao,Vt),Vt|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ne(ao,Vt),Vt|=r;return St(e,t,s,n),t.child}function QS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ip(e,t,n,r,s){var i=Ot(n)?hi:wt.current;return i=Mo(t,i),vo(t,s),n=Ug(e,t,n,r,i,s),r=Vg(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Er(e,t,s)):(Ae&&r&&Tg(t),t.flags|=1,St(e,t,n,s),t.child)}function _x(e,t,n,r,s){if(Ot(n)){var i=!0;Iu(t)}else i=!1;if(vo(t,s),t.stateNode===null)ou(e,t),qS(t,n,r),Dp(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=cn(u):(u=Ot(n)?hi:wt.current,u=Mo(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&jx(t,o,r,u),Jr=!1;var f=t.memoizedState;o.state=f,Vu(t,r,o,s),c=t.memoizedState,l!==r||f!==c||Dt.current||Jr?(typeof d=="function"&&(Mp(t,n,d,r),c=t.memoizedState),(l=Jr||Sx(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,CS(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Sn(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=cn(c):(c=Ot(n)?hi:wt.current,c=Mo(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&jx(t,o,r,c),Jr=!1,f=t.memoizedState,o.state=f,Vu(t,r,o,s);var v=t.memoizedState;l!==h||f!==v||Dt.current||Jr?(typeof p=="function"&&(Mp(t,n,p,r),v=t.memoizedState),(u=Jr||Sx(t,n,u,r,f,v,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Lp(e,t,n,r,i,s)}function Lp(e,t,n,r,s,i){QS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&px(t,n,!1),Er(e,t,i);r=t.stateNode,fA.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Oo(t,e.child,null,i),t.child=Oo(t,null,l,i)):St(e,t,l,i),t.memoizedState=r.state,s&&px(t,n,!0),t.child}function XS(e){var t=e.stateNode;t.pendingContext?fx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fx(e,t.context,!1),Ig(e,t.containerInfo)}function Px(e,t,n,r,s){return Do(),Pg(s),t.flags|=256,St(e,t,n,r),t.child}var $p={dehydrated:null,treeContext:null,retryLane:0};function Fp(e){return{baseLanes:e,cachePool:null,transitions:null}}function ZS(e,t,n){var r=t.pendingProps,s=De.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ne(De,s&1),e===null)return Rp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=$d(o,r,0,null),e=li(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Fp(n),t.memoizedState=$p,e):Hg(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return pA(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=vs(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=vs(l,i):(i=li(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Fp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=$p,r}return i=e.child,e=i.sibling,r=vs(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Hg(e,t){return t=$d({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ec(e,t,n,r){return r!==null&&Pg(r),Oo(t,e.child,null,n),e=Hg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pA(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=af(Error(L(422))),Ec(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=$d({mode:"visible",children:r.children},s,0,null),i=li(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Oo(t,e.child,null,o),t.child.memoizedState=Fp(o),t.memoizedState=$p,i);if(!(t.mode&1))return Ec(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(L(419)),r=af(i,r,void 0),Ec(e,t,o,r)}if(l=(o&e.childLanes)!==0,Mt||l){if(r=rt,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Nr(e,s),Pn(r,e,s,-1))}return Jg(),r=af(Error(L(421))),Ec(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=EA.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ht=fs(s.nextSibling),Wt=t,Ae=!0,Tn=null,e!==null&&(en[tn++]=wr,en[tn++]=br,en[tn++]=fi,wr=e.id,br=e.overflow,fi=t),t=Hg(t,r.children),t.flags|=4096,t)}function Rx(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ap(e.return,t,n)}function lf(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function ej(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(St(e,t,r.children,n),r=De.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rx(e,n,t);else if(e.tag===19)Rx(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ne(De,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Bu(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),lf(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Bu(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}lf(t,!0,n,null,i);break;case"together":lf(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ou(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=vs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mA(e,t,n){switch(t.tag){case 3:XS(t),Do();break;case 5:NS(t);break;case 1:Ot(t.type)&&Iu(t);break;case 4:Ig(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Ne(Fu,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ne(De,De.current&1),t.flags|=128,null):n&t.child.childLanes?ZS(e,t,n):(Ne(De,De.current&1),e=Er(e,t,n),e!==null?e.sibling:null);Ne(De,De.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ej(e,t,n
vendor: 4,730 bytes, line 40
40);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ne(De,De.current),r)break;return null;case 22:case 23:return t.lanes=0,JS(e,t,n)}return Er(e,t,n)}var tj,Up,nj,rj;tj=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Up=function(){};nj=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Js(er.current);var i=null;switch(n){case"input":s=lp(e,s),r=lp(e,r),i=[];break;case"select":s=Le({},s,{value:void 0}),r=Le({},r,{value:void 0}),i=[];break;case"textarea":s=dp(e,s),r=dp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Du)}fp(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(rl.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(rl.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Te("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};rj=function(e,t,n,r){n!==r&&(t.flags|=4)};function ba(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gA(e,t,n){var r=t.pendingProps;switch(_g(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return Ot(t.type)&&Ou(),vt(t),null;case 3:return r=t.stateNode,Io(),Pe(Dt),Pe(wt),$g(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Cc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tn!==null&&(Gp(Tn),Tn=null))),Up(e,t),vt(t),null;case 5:Lg(t);var s=Js(ml.current);if(n=t.type,e!==null&&t.stateNode!=null)nj(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return vt(t),null}if(e=Js(er.current),Cc(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Yn]=t,r[fl]=i,e=(t.mode&1)!==0,n){case"dialog":Te("cancel",r),Te("close",r);break;case"iframe":case"object":case"embed":Te("load",r);break;case"video":case"audio":for(s=0;s<Ma.length;s++)Te(Ma[s],r);break;case"source":Te("error",r);break;case"img":case"image":case"link":Te("error",r),Te("load",r);break;case"details":Te("toggle",r);break;case"input":Uy(r,i),Te("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Te("invalid",r);break;case"textarea":By(r,i),Te("invalid",r)}fp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&kc(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&kc(r.textContent,l,e),s=["children",""+l]):rl.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Te("scroll",r)}switch(n){case"input":gc(r),Vy(r,i,!0);break;case"textarea":gc(r),zy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Du)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=R1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Yn]=t,e[fl]=r,tj(e,t,!1,!1),t.stateNode=e;e:{switch(o=pp(n,r),n){case"dialog":Te("cancel",e),Te("close",e),s=r;break;case"iframe":case"object":case"embed":Te("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ma.length;s++)Te(Ma[s],e);s=r;break;case"source":Te("error",e),s=r;break;case"img":case"image":case"link":Te("error",e),Te("load",e),s=r;break;case"details":Te("toggle",e),s=r;break;case"input":Uy(e,r),s=lp(e,r),Te("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Le({},r,{value:void 0}),Te("invalid",e);break;case"textarea":By(e,r),s=dp(e,r),Te("invalid",e);break;default:s=r}fp(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?D1(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&A1(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&sl(e,c):typeof c=="number"&&sl(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(rl.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Te("scroll",e):c!=null&&pg(e,i,c,o))}switch(n){case"input":gc(e),Vy(e,r,!1);break;case"textarea":gc(e),zy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+xs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?fo(e,!!r.multiple,i,!1):r.defaultValue!=null&&fo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Du)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vt(t),null;case 6:if(e&&t.stateNode!=null)rj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Js(ml.current),Js(er.current),Cc(t)){if(r=t.stateNode,n=t.memoizedProps,r[Yn]=t,(i=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:kc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&kc(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Yn]=t,t.stateNode=r}return vt(t),null;case 13:if(Pe(De),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ae&&Ht!==null&&t.mode&1&&!(t.flags&128))bS(),Do(),t.flags|=98560,i=!1;else if(i=Cc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[Yn]=t}else Do(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;vt(t),i=!1}else Tn!==null&&(Gp(Tn),Tn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||De.current&1?Xe===0&&(Xe=3):Jg())),t.updateQueue!==null&&(t.flags|=4),vt(t),null);case 4:return Io(),Up(e,t),e===null&&dl(t.stateNode.containerInfo),vt(t),null;case 10:return Mg(t.type._context),vt(t),null;case 17:return Ot(t.type)&&Ou(),vt(t),null;case 19:if(Pe(De),i=t.memoizedState,i===null)return vt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)ba(i,!1);else{if(Xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Bu(e),o!==null){for(t.flags|=128,ba(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ne(De,De.current&1|2),t.child}e=e.sibling}i.tail!==null&&ze()>$o&&(t.flags|=128,r=!0,ba(i,!1),t.lanes=4194304)}else{if(!r)if(e=Bu(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ba(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ae)return vt(t),null}else 2*ze()-i.renderingStartTime>$o&&n!==1073741824&&(t.flags|=128,r=!0,ba(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ze(),t.sibling=null,n=De.current,Ne(De,r?n&1|2:n&1),t):(vt(t),null);case 22:case 23:return Yg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function vA(e,t){switch(_g(t),t.tag){case 1:return Ot(t.type)&&Ou(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 23,907 bytes, line 40
40case 3:return Io(),Pe(Dt),Pe(wt),$g(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lg(t),null;case 13:if(Pe(De),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Do()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(De),null;case 4:return Io(),null;case 10:return Mg(t.type._context),null;case 22:case 23:return Yg(),null;case 24:return null;default:return null}}var Tc=!1,xt=!1,yA=typeof WeakSet=="function"?WeakSet:Set,Y=null;function oo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ue(e,t,r)}else n.current=null}function Vp(e,t,n){try{n()}catch(r){Ue(e,t,r)}}var Ax=!1;function xA(e,t){if(kp=Ru,e=lS(),Eg(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(l=o+s),h!==i||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++d===r&&(c=o),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cp={focusedElem:e,selectionRange:n},Ru=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,y=v.memoizedState,b=t.stateNode,w=b.getSnapshotBeforeUpdate(t.elementType===t.type?g:Sn(t.type,g),y);b.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(S){Ue(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return v=Ax,Ax=!1,v}function qa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Vp(t,n,i)}s=s.next}while(s!==r)}}function Id(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Bp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function sj(e){var t=e.alternate;t!==null&&(e.alternate=null,sj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yn],delete t[fl],delete t[Tp],delete t[tA],delete t[nA])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ij(e){return e.tag===5||e.tag===3||e.tag===4}function Mx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ij(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Du));else if(r!==4&&(e=e.child,e!==null))for(zp(e,t,n),e=e.sibling;e!==null;)zp(e,t,n),e=e.sibling}function Hp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Hp(e,t,n),e=e.sibling;e!==null;)Hp(e,t,n),e=e.sibling}var ct=null,En=!1;function Vr(e,t,n){for(n=n.child;n!==null;)oj(e,t,n),n=n.sibling}function oj(e,t,n){if(Zn&&typeof Zn.onCommitFiberUnmount=="function")try{Zn.onCommitFiberUnmount(Td,n)}catch{}switch(n.tag){case 5:xt||oo(n,t);case 6:var r=ct,s=En;ct=null,Vr(e,t,n),ct=r,En=s,ct!==null&&(En?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(En?(e=ct,n=n.stateNode,e.nodeType===8?ef(e.parentNode,n):e.nodeType===1&&ef(e,n),ll(e)):ef(ct,n.stateNode));break;case 4:r=ct,s=En,ct=n.stateNode.containerInfo,En=!0,Vr(e,t,n),ct=r,En=s;break;case 0:case 11:case 14:case 15:if(!xt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Vp(n,t,o),s=s.next}while(s!==r)}Vr(e,t,n);break;case 1:if(!xt&&(oo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ue(n,t,l)}Vr(e,t,n);break;case 21:Vr(e,t,n);break;case 22:n.mode&1?(xt=(r=xt)||n.memoizedState!==null,Vr(e,t,n),xt=r):Vr(e,t,n);break;default:Vr(e,t,n)}}function Dx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yA),t.forEach(function(r){var s=TA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:ct=l.stateNode,En=!1;break e;case 3:ct=l.stateNode.containerInfo,En=!0;break e;case 4:ct=l.stateNode.containerInfo,En=!0;break e}l=l.return}if(ct===null)throw Error(L(160));oj(i,o,s),ct=null,En=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Ue(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)aj(t,e),t=t.sibling}function aj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mn(t,e),$n(e),r&4){try{qa(3,e,e.return),Id(3,e)}catch(g){Ue(e,e.return,g)}try{qa(5,e,e.return)}catch(g){Ue(e,e.return,g)}}break;case 1:mn(t,e),$n(e),r&512&&n!==null&&oo(n,n.return);break;case 5:if(mn(t,e),$n(e),r&512&&n!==null&&oo(n,n.return),e.flags&32){var s=e.stateNode;try{sl(s,"")}catch(g){Ue(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&_1(s,i),pp(l,o);var u=pp(l,i);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?D1(s,h):d==="dangerouslySetInnerHTML"?A1(s,h):d==="children"?sl(s,h):pg(s,d,h,u)}switch(l){case"input":cp(s,i);break;case"textarea":P1(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?fo(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?fo(s,!!i.multiple,i.defaultValue,!0):fo(s,!!i.multiple,i.multiple?[]:"",!1))}s[fl]=i}catch(g){Ue(e,e.return,g)}}break;case 6:if(mn(t,e),$n(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){Ue(e,e.return,g)}}break;case 3:if(mn(t,e),$n(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ll(t.containerInfo)}catch(g){Ue(e,e.return,g)}break;case 4:mn(t,e),$n(e);break;case 13:mn(t,e),$n(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Kg=ze())),r&4&&Dx(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(xt=(u=xt)||d,mn(t,e),xt=u):mn(t,e),$n(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Y=e,d=e.child;d!==null;){for(h=Y=d;Y!==null;){switch(f=Y,p=f.child,f.tag){case 0:case 11:case 14:case 15:qa(4,f,f.return);break;case 1:oo(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Ue(r,n,g)}}break;case 5:oo(f,f.return);break;case 22:if(f.memoizedState!==null){Ix(h);continue}}p!==null?(p.return=f,Y=p):Ix(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=M1("display",o))}catch(g){Ue(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){Ue(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:mn(t,e),$n(e),r&4&&Dx(e);break;case 21:break;default:mn(t,e),$n(e)}}function $n(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(ij(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(sl(s,""),r.flags&=-33);var i=Mx(e);Hp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=Mx(e);zp(e,l,o);break;default:throw Error(L(161))}}catch(c){Ue(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wA(e,t,n){Y=e,lj(e)}function lj(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var s=Y,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Tc;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||xt;l=Tc;var u=xt;if(Tc=o,(xt=c)&&!u)for(Y=s;Y!==null;)o=Y,c=o.child,o.tag===22&&o.memoizedState!==null?Lx(s):c!==null?(c.return=o,Y=c):Lx(s);for(;i!==null;)Y=i,lj(i),i=i.sibling;Y=s,Tc=l,xt=u}Ox(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,Y=i):Ox(e)}}function Ox(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xt||Id(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!xt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Sn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&xx(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xx(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&ll(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}xt||t.flags&512&&Bp(t)}catch(f){Ue(t,t.return,f)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Ix(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function Lx(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Id(4,t)}catch(c){Ue(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){Ue(t,s,c)}}var i=t.return;try{Bp(t)}catch(c){Ue(t,i,c)}break;case 5:var o=t.return;try{Bp(t)}catch(c){Ue(t,o,c)}}}catch(c){Ue(t,t.return,c)}if(t===e){Y=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Y=l;break}Y=t.return}}var bA=Math.ceil,Wu=Rr.ReactCurrentDispatcher,Wg=Rr.ReactCurrentOwner,on=Rr.ReactCurrentBatchConfig,ye=0,rt=null,Ye=null,ht=0,Vt=0,ao=Es(0),Xe=0,xl=null,mi=0,Ld=0,qg=0,Ka=null,At=null,Kg=0,$o=1/0,mr=null,qu=!1,Wp=null,ms=null,_c=!1,as=null,Ku=0,Ga=0,qp=null,au=-1,lu=0;function Nt(){return ye&6?ze():au!==-1?au:au=ze()}function gs(e){return e.mode&1?ye&2&&ht!==0?ht&-ht:sA.transition!==null?(lu===0&&(lu=q1()),lu):(e=Se,e!==0||(e=window.event,e=e===void 0?16:Z1(e.type)),e):1}function Pn(e,t,n,r){if(50<Ga)throw Ga=0,qp=null,Error(L(185));ql(e,n,r),(!(ye&2)||e!==rt)&&(e===rt&&(!(ye&2)&&(Ld|=n),Xe===4&&Xr(e,ht)),It(e,r),n===1&&ye===0&&!(t.mode&1)&&($o=ze()+500,Md&&Ts()))}function It(e,t){var n=e.callbackNode;sR(e,t);var r=Pu(e,e===rt?ht:0);if(r===0)n!==null&&qy(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&qy(n),t===1)e.tag===0?rA($x.bind(null,e)):yS($x.bind(null,e)),ZR(function(){!(ye&6)&&Ts()}),n=null;else{switch(K1(r)){case 1:n=xg;break;case 4:n=H1;break;case 16:n=_u;break;case 536870912:n=W1;break;default:n=_u}n=gj(n,cj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function cj(e,t){if(au=-1,lu=0,ye&6)throw Error(L(327));var n=e.callbackNode;if(yo()&&e.callbackNode!==n)return null;var r=Pu(e,e===rt?ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Gu(e,r);else{t=r;var s=ye;ye|=2;var i=dj();(rt!==e||ht!==t)&&(mr=null,$o=ze()+500,ai(e,t));do try{kA();break}catch(l){uj(e,l)}while(!0);Ag(),Wu.current=i,ye=s,Ye!==null?t=0:(rt=null,ht=0,t=Xe)}if(t!==0){if(t===2&&(s=xp(e),s!==0&&(r=s,t=Kp(e,s))),t===1)throw n=xl,ai(e,0),Xr(e,r),It(e,ze()),n;if(t===6)Xr(e,r);else{if(s=e.current.alternate,!(r&30)&&!SA(s)&&(t=Gu(e,r),t===2&&(i=xp(e),i!==0&&(r=i,t=Kp(e,i))),t===1))throw n=xl,ai(e,0),Xr(e,r),It(e,ze()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:zs(e,At,mr);break;case 3:if(Xr(e,r),(r&130023424)===r&&(t=Kg+500-ze(),10<t)){if(Pu(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Nt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Ep(zs.bind(null,e,At,mr),t);break}zs(e,At,mr);break;case 4:if(Xr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-_n(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*bA(r/1960))-r,10<r){e.timeoutHandle=Ep(zs.bind(null,e,At,mr),r);break}zs(e,At,mr);break;case 5:zs(e,At,mr);break;default:throw Error(L(329))}}}return It(e,ze()),e.callbackNode===n?cj.bind(null,e):null}function Kp(e,t){var n=Ka;return e.current.memoizedState.isDehydrated&&(ai(e,t).flags|=256),e=Gu(e,t),e!==2&&(t=At,At=n,t!==null&&Gp(t)),e}function Gp(e){At===null?At=e:At.push.apply(At,e)}function SA(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!An(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xr(e,t){for(t&=~qg,t&=~Ld,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_n(t),r=1<<n;e[n]=-1,t&=~r}}function $x(e){if(ye&6)throw Error(L(327));yo();var t=Pu(e,0);if(!(t&1))return It(e,ze()),null;var n=Gu(e,t);if(e.tag!==0&&n===2){var r=xp(e);r!==0&&(t=r,n=Kp(e,r))}if(n===1)throw n=xl,ai(e,0),Xr(e,t),It(e,ze()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zs(e,At,mr),It(e,ze()),null}function Gg(e,t){var n=ye;ye|=1;try{return e(t)}finally{ye=n,ye===0&&($o=ze()+500,Md&&Ts())}}function gi(e){as!==null&&as.tag===0&&!(ye&6)&&yo();var t=ye;ye|=1;var n=on.transition,r=Se;try{if(on.transition=null,Se=1,e)return e()}finally{Se=r,on.transition=n,ye=t,!(ye&6)&&Ts()}}function Yg(){Vt=ao.current,Pe(ao)}function ai(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XR(n)),Ye!==null)for(n=Ye.return;n!==null;){var r=n;switch(_g(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ou();break;case 3:Io(),Pe(Dt),Pe(wt),$g();break;case 5:Lg(r);break;case 4:Io();break;case 13:Pe(De);break;case 19:Pe(De);break;case 10:Mg(r.type._context);break;case 22:case 23:Yg()}n=n.return}if(rt=e,Ye=e=vs(e.current,null),ht=Vt=t,Xe=0,xl=null,qg=Ld=mi=0,At=Ka=null,Ys!==null){for(t=0;t<Ys.length;t++)if(n=Ys[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Ys=null}return e}function uj(e,t){do{var n=Ye;try{if(Ag(),su.current=Hu,zu){for(var r=Oe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}zu=!1}if(pi=0,tt=Qe=Oe=null,Wa=!1,gl=0,Wg.current=null,n===null||n.return===null){Xe=1,xl=t,Ye=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=ht,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Cx(o);if(p!==null){p.flags&=-257,Nx(p,o,l,i,t),p.mode&1&&kx(i,u,t),t=p,c=u;var v=t.updateQueue;if(v===null){var g=new Set;g.add(c),t.updateQueue=g}else v.add(c);break e}else{if(!(t&1)){kx(i,u,t),Jg();break e}c=Error(L(426))}}else if(Ae&&l.mode&1){var y=Cx(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),Nx(y,o,l,i,t),Pg(Lo(c,l));break e}}i=c=Lo(c,l),Xe!==4&&(Xe=2),Ka===null?Ka=[i]:Ka.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var b=KS(i,c,t);yx(i,b);break e;case 1:l=c;var w=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(ms===null||!ms.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=GS(i,l,t);yx(i,S);break e}}i=i.return}while(i!==null)}fj(n)}catch(j){t=j,Ye===n&&n!==null&&(Ye=n=n.return);continue}break}while(!0)}function dj(){var e=Wu.current;return Wu.current=Hu,e===null?Hu:e}function Jg(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),rt===null||!(mi&268435455)&&!(Ld&268435455)||Xr(rt,ht)}function Gu(e,t){var n=ye;ye|=2;var r=dj();(rt!==e||ht!==t)&&(mr=null,ai(e,t));do try{jA();break}catch(s){uj(e,s)}while(!0);if(Ag(),ye=n,Wu.current=r,Ye!==null)throw Error(L(261));return rt=null,ht=0,Xe}function jA(){for(;Ye!==null;)hj(Ye)}function kA(){for(;Ye!==null&&!YP();)hj(Ye)}function hj(e){var t=mj(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?fj(e):Ye=t,Wg.current=null}function fj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=vA(n,t),n!==null){n.flags&=32767,Ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ye=null;return}}else if(n=gA(n,t,Vt),n!==null){Ye=n;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Xe===0&&(Xe=5)}function zs(e,t,n){var r=Se,s=on.transition;try{on.transition=null,Se=1,CA(e,t,n,r)}finally{on.transition=s,Se=r}return null}function CA(e,t,n,r){do yo();while(as!==null);if(ye&6)throw Error(L(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(iR(e,i),e===rt&&(Ye=rt=null,ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||_c||(_c=!0,gj(_u,function(){return yo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=on.transition,on.transition=null;var o=Se;Se=1;var l=ye;ye|=4,Wg.current=null,xA(e,n),aj(n,e),WR(Cp),Ru=!!kp,Cp=kp=null,e.current=n,wA(n),JP(),ye=l,Se=o,on.transition=i}else e.current=n;if(_c&&(_c=!1,as=e,Ku=s),i=e.pendingLanes,i===0&&(ms=null),ZP(n.stateNode),It(e,ze()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(qu)throw qu=!1,e=Wp,Wp=null,e;return Ku&1&&e.tag!==0&&yo(),i=e.pendingLanes,i&1?e===qp?Ga++:(Ga=0,qp=e):Ga=0,Ts(),null}function yo(){if(as!==null){var e=K1(Ku),t=on.transition,n=Se;try{if(on.transition=null,Se=16>e?16:e,as===null)var r=!1;else{if(e=as,as=null,Ku=0,ye&6)throw Error(L(331));var s=ye;for(ye|=4,Y=e.current;Y!==null;){var i=Y,o=i.child;if(Y.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Y=u;Y!==null;){var d=Y;switch(d.tag){case 0:case 11:case 15:qa(8,d,i)}var h=d.child;if(h!==null)h.return=d,Y=h;else for(;Y!==null;){d=Y;var f=d.sibling,p=d.return;if(sj(d),d===u){Y=null;break}if(f!==null){f.return=p,Y=f;break}Y=p}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}Y=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Y=o;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:qa(9,i,i.return)}var b=i.sibling;if(b!==null){b.return=i.return,Y=b;break e}Y=i.return}}var w=e.current;for(Y=w;Y!==null;){o=Y;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,Y=x;else e:for(o=w;Y!==null;){if(l=Y,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Id(9,l)}}catch(j){Ue(l,l.return,j)}if(l===o){Y=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,Y=S;break e}Y=l.return}}if(ye=s,Ts(),Zn&&typeof Zn.onPostCommitFiberRoot=="function")try{Zn.onPostCommitFiberRoot(Td,e)}catch{}r=!0}return r}finally{Se=n,on.transition=t}}return!1}function Fx(e,t,n){t=Lo(n,t),t=KS(e,t,1),e=ps(e,t,1),t=Nt(),e!==null&&(ql(e,1,t),It(e,t))}function Ue(e,t,n){if(e.tag===3)Fx(e,e,n);else for(;t!==null;){if(t.tag===3){Fx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ms===null||!ms.has(r))){e=Lo(n,e),e=GS(t,e,1),t=ps(t,e,1),e=Nt(),t!==null&&(ql(t,1,e),It(t,e));break}}t=t.return}}function NA(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Nt(),e.pingedLanes|=e.suspendedLanes&n,rt===e&&(ht&n)===n&&(Xe===4||Xe===3&&(ht&130023424)===ht&&500>ze()-Kg?ai(e,0):qg|=n),It(e,t)}function pj(e,t){t===0&&(e.mode&1?(t=xc,xc<<=1,!(xc&130023424)&&(xc=4194304)):t=1);var n=Nt();e=Nr(e,t),e!==null&&(ql(e,t,n),It(e,n))}function EA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pj(e,n)}function TA(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),pj(e,n)}var mj;mj=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dt.current)Mt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Mt=!1,mA(e,t,n);Mt=!!(e.flags&131072)}else Mt=!1,Ae&&t.flags&1048576&&xS(t,$u,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ou(e,t),e=t.pendingProps;var s=Mo(t,wt.current);vo(t,n),s=Ug(null,t,r,e,s,n);var i=Vg();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(r)?(i=!0,Iu(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Og(t),s.updater=Od,t.stateNode=s,s._reactInternals=t,Dp(t,r,e,n),t=Lp(null,t,r,!0,i,n)):(t.tag=0,Ae&&i&&Tg(t),St(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ou(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=PA(r),e=Sn(r,e),s){case 0:t=Ip(null,t,r,e,n);break e;case 1:t=_x(null,t,r,e,n);break e;case 11:t=Ex(null,t,r,e,n);break e;case 14:t=Tx(null,t,r,Sn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sn(r,s),Ip(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sn(r,s),_x(e,t,r,s,n);case 3:e:{if(XS(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,s=i.element,CS(e,t),Vu(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Lo(Error(L(423)),t),t=Px(e,t,r,n,s);break e}else if(r!==s){s=Lo(Error(L(424)),t),t=Px(e,t,r,n,s);break e}else for(Ht=fs(t.stateNode.containerInfo.firstChild),Wt=t,Ae=!0,Tn=null,n=jS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Do(),r===s){t=Er(e,t,n);break e}St(e,t,r,n)}t=t.child}return t;case 5:return NS(t),e===null&&Rp(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Np(r,s)?o=null:i!==null&&Np(r,i)&&
vendor: 4,149 bytes, line 40
40(t.flags|=32),QS(e,t),St(e,t,o,n),t.child;case 6:return e===null&&Rp(t),null;case 13:return ZS(e,t,n);case 4:return Ig(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Oo(t,null,r,n):St(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sn(r,s),Ex(e,t,r,s,n);case 7:return St(e,t,t.pendingProps,n),t.child;case 8:return St(e,t,t.pendingProps.children,n),t.child;case 12:return St(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Ne(Fu,r._currentValue),r._currentValue=o,i!==null)if(An(i.value,o)){if(i.children===s.children&&!Dt.current){t=Er(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Sr(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Ap(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ap(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}St(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,vo(t,n),s=cn(s),r=r(s),t.flags|=1,St(e,t,r,n),t.child;case 14:return r=t.type,s=Sn(r,t.pendingProps),s=Sn(r.type,s),Tx(e,t,r,s,n);case 15:return YS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Sn(r,s),ou(e,t),t.tag=1,Ot(r)?(e=!0,Iu(t)):e=!1,vo(t,n),qS(t,r,s),Dp(t,r,s,n),Lp(null,t,r,!0,e,n);case 19:return ej(e,t,n);case 22:return JS(e,t,n)}throw Error(L(156,t.tag))};function gj(e,t){return z1(e,t)}function _A(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,n,r){return new _A(e,t,n,r)}function Qg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PA(e){if(typeof e=="function")return Qg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gg)return 11;if(e===vg)return 14}return 2}function vs(e,t){var n=e.alternate;return n===null?(n=nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cu(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Qg(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Qi:return li(n.children,s,i,t);case mg:o=8,s|=8;break;case sp:return e=nn(12,n,t,s|2),e.elementType=sp,e.lanes=i,e;case ip:return e=nn(13,n,t,s),e.elementType=ip,e.lanes=i,e;case op:return e=nn(19,n,t,s),e.elementType=op,e.lanes=i,e;case N1:return $d(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k1:o=10;break e;case C1:o=9;break e;case gg:o=11;break e;case vg:o=14;break e;case Yr:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=nn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function li(e,t,n,r){return e=nn(7,e,r,t),e.lanes=n,e}function $d(e,t,n,r){return e=nn(22,e,r,t),e.elementType=N1,e.lanes=n,e.stateNode={isHidden:!1},e}function cf(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function uf(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}
vendor: 4,066 bytes, line 40
40function RA(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zh(0),this.expirationTimes=zh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xg(e,t,n,r,s,i,o,l,c){return e=new RA(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=nn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Og(i),e}function AA(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ji,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function vj(e){if(!e)return ws;e=e._reactInternals;e:{if(ki(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(Ot(n))return vS(e,n,t)}return t}function yj(e,t,n,r,s,i,o,l,c){return e=Xg(n,r,!0,e,s,i,o,l,c),e.context=vj(null),n=e.current,r=Nt(),s=gs(n),i=Sr(r,s),i.callback=t??null,ps(n,i,s),e.current.lanes=s,ql(e,s,r),It(e,r),e}function Fd(e,t,n,r){var s=t.current,i=Nt(),o=gs(s);return n=vj(n),t.context===null?t.context=n:t.pendingContext=n,t=Sr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ps(s,t,o),e!==null&&(Pn(e,s,o,i),ru(e,s,o)),o}function Yu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ux(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zg(e,t){Ux(e,t),(e=e.alternate)&&Ux(e,t)}function MA(){return null}var xj=typeof reportError=="function"?reportError:function(e){console.error(e)};function ev(e){this._internalRoot=e}Ud.prototype.render=ev.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));Fd(e,t,null,null)};Ud.prototype.unmount=ev.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gi(function(){Fd(null,e,null,null)}),t[Cr]=null}};function Ud(e){this._internalRoot=e}Ud.prototype.unstable_scheduleHydration=function(e){if(e){var t=J1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&X1(e)}};function tv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Vd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Vx(){}function DA(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Yu(o);i.call(u)}}var o=yj(t,r,e,0,null,!1,!1,"",Vx);return e._reactRootContainer=o,e[Cr]=o.current,dl(e.nodeType===8?e.parentNode:e),gi(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Yu(c);l.call(u)}}var c=Xg(e,0,!1,null,null,!1,!1,"",Vx);return e._reactRootContainer=c,e[Cr]=c.current,dl(e.nodeType===8?e.parentNode:e),gi(function(){Fd(t,c,n,r)}),c}function Bd(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var c=Yu(o);l.call(c)}}Fd(t,o,e,s)}else o=DA(n,t,e,s,r);return Yu(o)}G1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Aa(t.pendingLanes);n!==0&&(wg(t,n|1),It(t,ze()),!(ye&6)&&($o=ze()+500,Ts()))}break;case 13:gi(function(){var r=Nr(e,1);if(r!==null){var s=Nt();Pn(r,e,1,s)}}),Zg(e,1)}};bg=function(e){if(e.tag===13){var t=Nr(e,134217728);if(t!==null){var n=Nt();Pn(t,e,134217728,n)}Zg(e,134217728)}};Y1=function(e){if(e.tag===13){var t=gs(e),n=Nr(e,t);if(n!==null){var r=Nt();
40Pn(n,e,t,r)}Zg(e,t)}};J1=function(){return Se};Q1=function(e,t){var n=Se;try{return Se=e,t()}finally{Se=n}};gp=function(e,t,n){switch(t){case"input":if(cp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Ad(r);if(!s)throw Error(L(90));T1(r),cp(r,s)}}}break;case"textarea":P1(e,n);break;case"select":t=n.value,t!=null&&fo(e,!!n.multiple,t,!1)}};L1=Gg;$1=gi;var OA={usingClientEntryPoint:!1,Events:[Gl,to,Ad,O1,I1,Gg]},Sa={findFiberByHostInstance:Gs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},IA={bundleType:Sa.bundleType,version:Sa.version,rendererPackageName:Sa.rendererPackageName,rendererConfig:Sa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Rr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=V1(e),e===null?null:e.stateNode},findFiberByHostInstance:Sa.findFiberByHostInstance||MA,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 Pc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pc.isDisabled&&Pc.supportsFiber)try{Td=Pc.inject(IA),Zn=Pc}catch{}}Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OA;Gt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!tv(t))throw Error(L(200));return AA(e,t,null,n)};Gt.createRoot=function(e,t){if(!tv(e))throw Error(L(299));var n=!1,r="",s=xj;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Xg(e,1,!1,null,null,n,!1,r,s),e[Cr]=t.current,dl(e.nodeType===8?e.parentNode:e),new ev(t)};Gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=V1(t),e=e===null?null:e.stateNode,e};Gt.flushSync=function(e){return gi(e)};Gt.hydrate=function(e,t,n){if(!Vd(t))throw Error(L(200));return Bd(null,e,t,!0,n)};Gt.hydrateRoot=function(e,t,n){if(!tv(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=xj;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=yj(t,null,e,1,n??null,s,!1,i,o),e[Cr]=t.current,dl(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ud(t)};Gt.render=function(e,t,n){if(!Vd(t))throw Error(L(200));return Bd(null,e,t,!1,n)};Gt.unmountComponentAtNode=function(e){if(!Vd(e))throw Error(L(40));return e._reactRootContainer?(gi(function(){Bd(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};Gt.unstable_batchedUpdates=Gg;Gt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Vd(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return Bd(e,t,n,!1,r)};Gt.version="18.3.1-next-f1338f8080-20240426";function wj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wj)}catch(e){console.error(e)}}wj(),w1.exports=Gt;var Ci=w1.exports;const bj=l1(Ci);var Sj,Bx=Ci;Sj=Bx.createRoot,Bx.hydrateRoot;var zd=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(){}},Hd=typeof window>"u"||"Deno"in globalThis;function jn(){}function LA(e,t){return typeof e=="function"?e(t):e}function $A(e){return typeof e=="number"&&e>=0&&e!==1/0}function FA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yp(e,t){return typeof e=="function"?e(t):e}function UA(e,t){return typeof e=="function"?e(t):e}function zx(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==nv(o,t.options))return!1}else if(!bl(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function Hx(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(wl(t.options.mutationKey)!==wl(i))return!1}else if(!bl(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function nv(e,t){return((t==null?void 0:t.queryKeyHashFn)||wl)(e)}function wl(e){return JSON.stringify(e,(t,n)=>Jp(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function bl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>
vendor: 21,878 bytes, line 40
40bl(e[n],t[n])):!1}function jj(e,t){if(e===t)return e;const n=Wx(e)&&Wx(t);if(n||Jp(e)&&Jp(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:i[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=jj(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===o&&u===s?e:l}return t}function Wx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jp(e){if(!qx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!qx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function qx(e){return Object.prototype.toString.call(e)==="[object Object]"}function VA(e){return new Promise(t=>{setTimeout(t,e)})}function BA(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?jj(e,t):t}function zA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function HA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var rv=Symbol();function kj(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===rv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ti,ts,ko,e1,WA=(e1=class extends zd{constructor(){super();xe(this,ti);xe(this,ts);xe(this,ko);ae(this,ko,t=>{if(!Hd&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){D(this,ts)||this.setEventListener(D(this,ko))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,ts))==null||t.call(this),ae(this,ts,void 0))}setEventListener(t){var n;ae(this,ko,t),(n=D(this,ts))==null||n.call(this),ae(this,ts,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,ti)!==t&&(ae(this,ti,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,ti)=="boolean"?D(this,ti):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ti=new WeakMap,ts=new WeakMap,ko=new WeakMap,e1),Cj=new WA,Co,ns,No,t1,qA=(t1=class extends zd{constructor(){super();xe(this,Co,!0);xe(this,ns);xe(this,No);ae(this,No,t=>{if(!Hd&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,ns)||this.setEventListener(D(this,No))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,ns))==null||t.call(this),ae(this,ns,void 0))}setEventListener(t){var n;ae(this,No,t),(n=D(this,ns))==null||n.call(this),ae(this,ns,t(this.setOnline.bind(this)))}setOnline(t){D(this,Co)!==t&&(ae(this,Co,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,Co)}},Co=new WeakMap,ns=new WeakMap,No=new WeakMap,t1),Ju=new qA;function KA(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}function GA(e){return Math.min(1e3*2**e,3e4)}function Nj(e){return(e??"online")==="online"?Ju.isOnline():!0}var Ej=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function df(e){return e instanceof Ej}function Tj(e){let t=!1,n=0,r=!1,s;const i=KA(),o=g=>{var y;r||(f(new Ej(g)),(y=e.abort)==null||y.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Cj.isFocused()&&(e.networkMode==="always"||Ju.isOnline())&&e.canRun(),d=()=>Nj(e.networkMode)&&e.canRun(),h=g=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,g),s==null||s(),i.resolve(g))},f=g=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,g),s==null||s(),i.reject(g))},p=()=>new Promise(g=>{var y;s=b=>{(r||u())&&g(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(r)return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(h).catch(b=>{var k;if(r)return;const w=e.retry??(Hd?0:3),x=e.retryDelay??GA,S=typeof x=="function"?x(n,b):x,j=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,b);if(t||!j){f(b);return}n++,(k=e.onFail)==null||k.call(e,n,b),VA(S).then(()=>u()?void 0:p()).then(()=>{t?f(b):v()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?v():p().then(v),i)}}var YA=e=>setTimeout(e,0);function JA(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=YA;const i=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var jt=JA(),ni,n1,_j=(n1=class{constructor(){xe(this,ni)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$A(this.gcTime)&&ae(this,ni,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hd?1/0:5*60*1e3))}clearGcTimeout(){D(this,ni)&&(clearTimeout(D(this,ni)),ae(this,ni,void 0))}},ni=new WeakMap,n1),Eo,ri,Xt,si,yt,zl,ii,Cn,pr,r1,QA=(r1=class extends _j{constructor(t){super();xe(this,Cn);xe(this,Eo);xe(this,ri);xe(this,Xt);xe(this,si);xe(this,yt);xe(this,zl);xe(this,ii);ae(this,ii,!1),ae(this,zl,t.defaultOptions),this.setOptions(t.options),this.observers=[],ae(this,si,t.client),ae(this,Xt,D(this,si).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ae(this,Eo,ZA(this.options)),this.state=t.state??D(this,Eo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,yt))==null?void 0:t.promise}setOptions(t){this.options={...D(this,zl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,Xt).remove(this)}setData(t,n){const r=BA(this.state.data,t,this.options);return mt(this,Cn,pr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){mt(this,Cn,pr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=D(this,yt))==null?void 0:r.promise;return(s=D(this,yt))==null||s.cancel(t),n?n.then(jn).catch(jn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,Eo))}isActive(){return this.observers.some(t=>UA(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yp(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:!FA(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,yt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,yt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,Xt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,yt)&&(D(this,ii)?D(this,yt).cancel({revert:!0}):D(this,yt).cancelRetry()),this.scheduleGc()),D(this,Xt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||mt(this,Cn,pr).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,yt))return D(this,yt).continueRetry(),D(this,yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(p=>p.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ae(this,ii,!0),r.signal)})},i=()=>{const f=kj(this.options,n),v=(()=>{const g={client:D(this,si),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return ae(this,ii,!1),this.options.persister?this.options.persister(f,v,this):f(v)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,si),state:this.state,fetchFn:i};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),ae(this,ri,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&mt(this,Cn,pr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var p,v,g,y;df(f)&&f.silent||mt(this,Cn,pr).call(this,{type:"error",error:f}),df(f)||((v=(p=D(this,Xt).config).onError)==null||v.call(p,f,this),(y=(g=D(this,Xt).config).onSettled)==null||y.call(g,this.state.data,f,this)),this.scheduleGc()};return ae(this,yt,Tj({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var p,v,g,y;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(b){c(b);return}(v=(p=D(this,Xt).config).onSuccess)==null||v.call(p,f,this),(y=(g=D(this,Xt).config).onSettled)==null||y.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,p)=>{mt(this,Cn,pr).call(this,{type:"failed",failureCount:f,error:p})},onPause:()=>{mt(this,Cn,pr).call(this,{type:"pause"})},onContinue:()=>{mt(this,Cn,pr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),D(this,yt).start()}},Eo=new WeakMap,ri=new WeakMap,Xt=new WeakMap,si=new WeakMap,yt=new WeakMap,zl=new WeakMap,ii=new WeakMap,Cn=new WeakSet,pr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...XA(r.data,this.options),fetchMeta:t.meta??null};case"success":return ae(this,ri,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return df(s)&&s.revert&&D(this,ri)?{...D(this,ri),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,Xt).notify({query:this,type:"updated",action:t})})},r1);function XA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Hn,s1,e2=(s1=class extends zd{constructor(t={}){super();xe(this,Hn);this.config=t,ae(this,Hn,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??nv(s,n);let o=this.get(i);return o||(o=new QA({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){D(this,Hn).has(t.queryHash)||(D(this,Hn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,Hn).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,Hn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,Hn).get(t)}getAll(){return[...D(this,Hn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zx(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zx(t,r)):n}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Hn=new WeakMap,s1),Wn,bt,oi,qn,Wr,i1,t2=(i1=class extends _j{constructor(t){super();xe(this,qn);xe(this,Wn);xe(this,bt);xe(this,oi);this.mutationId=t.mutationId,ae(this,bt,t.mutationCache),ae(this,Wn,[]),this.state=t.state||n2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,Wn).includes(t)||(D(this,Wn).push(t),this.clearGcTimeout(),D(this,bt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ae(this,Wn,D(this,Wn).filter(n=>n!==t)),this.scheduleGc(),D(this,bt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,Wn).length||(this.state.status==="pending"?this.scheduleGc():D(this,bt).remove(this))}continue(){var t;return((t=D(this,oi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,d,h,f,p,v,g,y,b,w,x,S,j,k,C,N;const n=()=>{mt(this,qn,Wr).call(this,{type:"continue"})};ae(this,oi,Tj({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,E)=>{mt(this,qn,Wr).call(this,{type:"failed",failureCount:_,error:E})},onPause:()=>{mt(this,qn,Wr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,bt).canRun(this)}));const r=this.state.status==="pending",s=!D(this,oi).canStart();try{if(r)n();else{mt(this,qn,Wr).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(i=D(this,bt).config).onMutate)==null?void 0:o.call(i,t,this));const E=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));E!==this.state.context&&mt(this,qn,Wr).call(this,{type:"pending",context:E,variables:t,isPaused:s})}const _=await D(this,oi).start();return await((d=(u=D(this,bt).config).onSuccess)==null?void 0:d.call(u,_,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,_,t,this.state.context)),await((v=(p=D(this,bt).config).onSettled)==null?void 0:v.call(p,_,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,_,null,t,this.state.context)),mt(this,qn,Wr).call(this,{type:"success",data:_}),_}catch(_){try{throw await((w=(b=D(this,bt).config).onError)==null?void 0:w.call(b,_,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,_,t,this.state.context)),await((k=(j=D(this,bt).config).onSettled)==null?void 0:k.call(j,void 0,_,this.state.variables,this.state.context,this)),await((N=(C=this.options).onSettled)==null?void 0:N.call(C,void 0,_,t,this.state.context)),_}finally{mt(this,qn,Wr).call(this,{type:"error",error:_})}}finally{D(this,bt).runNext(this)}}},Wn=new WeakMap,bt=new WeakMap,oi=new WeakMap,qn=new WeakSet,Wr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jt.batch(()=>{D(this,Wn).forEach(r=>{r.onMutationUpdate(t)}),D(this,bt).notify({mutation:this,type:"updated",action:t})})},i1);function n2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xr,Nn,Hl,o1,r2=(o1=class extends zd{constructor(t={}){super();xe(this,xr);xe(this,Nn);xe(this,Hl);this.config=t,ae(this,xr,new Set),ae(this,Nn,new Map),ae(this,Hl,0)}build(t,n,r){const s=new t2({mutationCache:this,mutationId:++fc(this,Hl)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){D(this,xr).add(t);const n=Rc(t);if(typeof n=="string"){const r=D(this,Nn).get(n);r?r.push(t):D(this,Nn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,xr).delete(t)){const n=Rc(t);if(typeof n=="string"){const r=D(this,Nn).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&D(this,Nn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Rc(t);if(typeof n=="string"){const r=D(this,Nn).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Rc(t);if(typeof n=="string"){const s=(r=D(this,Nn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){jt.batch(()=>{D(this,xr).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,xr).clear(),D(this,Nn).clear()})}getAll(){return Array.from(D(this,xr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Hx(n,r))}findAll(t={}){return this.getAll().filter(n=>Hx(t,n))}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return jt.batch(()=>Promise.all(t.map(n=>n.continue().catch(jn))))}},xr=new WeakMap,Nn=new WeakMap,Hl=new WeakMap,o1);function Rc(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Kx(e){return{onFetch:(t,n)=>{var d,h,f,p,v;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},b=kj(t.options,t.fetchOptions),w=async(x,S,j)=>{if(g)return Promise.reject();if(S==null&&x.pages.length)return Promise.resolve(x);const C=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:S,direction:j?"backward":"forward",meta:t.options.meta};return y(M),M})(),N=await b(C),{maxPages:_}=t.options,E=j?HA:zA;return{pages:E(x.pages,N,_),pageParams:E(x.pageParams,S,_)}};if(s&&i.length){const x=s==="backward",S=x?s2:Gx,j={pages:i,pageParams:o},k=S(r,j);l=await w(j,k,x)}else{const x=e??i.length;do{const S=c===0?o[0]??r.initialPageParam:Gx(r,l);if(c>0&&S==null)break;l=await w(l,S),c++}while(c<x)}return l};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Gx(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function s2(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var $e,rs,ss,To,_o,is,Po,Ro,a1,i2=(a1=class{constructor(e={}){xe(this,$e);xe(this,rs);xe(this,ss);xe(this,To);xe(this,_o);xe(this,is);xe(this,Po);xe(this,Ro);ae(this,$e,e.queryCache||new e2),ae(this,rs,e.mutationCache||new r2),ae(this,ss,e.defaultOptions||{}),ae(this,To,new Map),ae(this,_o,new Map),ae(this,is,0)}mount(){fc(this,is)._++,D(this,is)===1&&(ae(this,Po,Cj.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,$e).onFocus())})),ae(this,Ro,Ju.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,$e).onOnline())})))}unmount(){var e,t;fc(this,is)._--,D(this,is)===0&&((e=D(this,Po))==null||e.call(this),ae(this,Po,void 0),(t=D(this,Ro))==null||t.call(this),ae(this,Ro,void 0))}isFetching(e){return D(this,$e).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,rs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,$e).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,$e).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Yp(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,$e).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=D(this,$e).get(r.queryHash),i=s==null?void 0:s.state.data,o=LA(t,i);if(o!==void 0)return D(this,$e).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return jt.batch(()=>D(this,$e).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,$e).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,$e);jt.batch(()=>
40{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,$e);return jt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=jt.batch(()=>D(this,$e).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(jn).catch(jn)}invalidateQueries(e,t={}){return jt.batch(()=>(D(this,$e).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},r=jt.batch(()=>D(this,$e).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(jn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(jn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,$e).build(this,t);return n.isStaleByTime(Yp(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(jn).catch(jn)}fetchInfiniteQuery(e){return e.behavior=Kx(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(jn).catch(jn)}ensureInfiniteQueryData(e){return e.behavior=Kx(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ju.isOnline()?D(this,rs).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,$e)}getMutationCache(){return D(this,rs)}getDefaultOptions(){return D(this,ss)}setDefaultOptions(e){ae(this,ss,e)}setQueryDefaults(e,t){D(this,To).set(wl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,To).values()],n={};return t.forEach(r=>{bl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,_o).set(wl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,_o).values()],n={};return t.forEach(r=>{bl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,ss).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=nv(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===rv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,ss).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,$e).clear(),D(this,rs).clear()}},$e=new WeakMap,rs=new WeakMap,ss=new WeakMap,To=new WeakMap,_o=new WeakMap,is=new WeakMap,Po=new WeakMap,Ro=new WeakMap,a1),o2=m.createContext(void 0),a2=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(o2.Provider,{value:e,children:t}));/**
41 * @remix-run/router v1.23.0
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 */function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(this,arguments)}var ls;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ls||(ls={}));const Yx="popstate";function l2(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:l}=r.location;return Qp("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Qu(s)}return u2(t,n,null,e)}function Ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Pj(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c2(){return Math.random().toString(36).substr(2,8)}function Jx(e,t){return{usr:e.state,key:e.key,idx:t}}function Qp(e,t,n,r){return n===void 0&&(n=null),Sl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Qo(t):t,{state:n,key:t&&t.key||r||c2()})}function Qu(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Qo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function u2(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,l=ls.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Sl({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=ls.Pop;let y=d(),b=y==null?null:y-u;u=y,c&&c({action:l,location:g.location,delta:b})}function f(y,b){l=ls.Push;let w=Qp(g.location,y,b);u=d()+1;let x=Jx(w,u),S=g.createHref(w);try{o.pushState(x,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;s.location.assign(S)}i&&c&&c({action:l,location:g.location,delta:1})}function p(y,b){l=ls.Replace;let w=Qp(g.location,y,b);u=d();let x=Jx(w,u),S=g.createHref(w);o.replaceState(x,"",S),i&&c&&c({action:l,location:g.location,delta:0})}function v(y){let b=s.location.origin!=="null"?s.location.origin:s.location.href,w=typeof y=="string"?y:Qu(y);return w=w.replace(/ $/,"%20"),Ie(b,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,b)}let g={get action(){return l},get location(){return e(s,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Yx,h),c=y,()=>{s.removeEventListener(Yx,h),c=null}},createHref(y){return t(s,y)},createURL:v,encodeLocation(y){let b=v(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(y){return o.go(y)}};return g}var Qx;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Qx||(Qx={}));function d2(e,t,n){return n===void 0&&(n="/"),h2(e,t,n,!1)}function h2(e,t,n,r){let s=typeof t=="string"?Qo(t):t,i=Fo(s.pathname||"/",n);if(i==null)return null;let o=Rj(e);f2(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=k2(i);l=S2(o[c],u,r)}return l}function Rj(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Ie(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
49id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=ys([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Rj(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:w2(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let c of Aj(i.path))s(i,o,c)}),t}function Aj(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Aj(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function f2(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:b2(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const p2=/^:[\w-]+$/,m2=3,g2=2,v2=1,y2=10,x2=-2,Xx=e=>e==="*";function w2(e,t){let n=e.split("/"),r=n.length;return n.some(Xx)&&(r+=x2),t&&(r+=g2),n.filter(s=>!Xx(s)).reduce((s,i)=>s+(p2.test(i)?m2:i===""?v2:y2),r)}function b2(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function S2(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=Xu({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Xu({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 10,384 bytes, lines 49-58
49Object.assign(s,h.params),o.push({params:s,pathname:ys([i,h.pathname]),pathnameBase:T2(ys([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=ys([i,h.pathnameBase]))}return o}function Xu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=j2(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let g=l[h]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const v=l[h];return p&&!v?u[f]=void 0:u[f]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function j2(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Pj(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function k2(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Pj(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Fo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function C2(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Qo(e):e;return{pathname:n?n.startsWith("/")?n:N2(n,t):t,search:_2(r),hash:P2(s)}}function N2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function E2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function sv(e,t){let n=E2(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function iv(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Qo(e):(s=Sl({},e),Ie(!s.pathname||!s.pathname.includes("?"),hf("?","pathname","search",s)),Ie(!s.pathname||!s.pathname.includes("#"),hf("#","pathname","hash",s)),Ie(!s.search||!s.search.includes("#"),hf("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=C2(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const ys=e=>e.join("/").replace(/\/\/+/g,"/"),T2=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,P2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function R2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Mj=["post","put","patch","delete"];new Set(Mj);const A2=["get",...Mj];new Set(A2);/**
50 * React Router v6.30.1
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}const Wd=m.createContext(null),Dj=m.createContext(null),Ar=m.createContext(null),qd=m.createContext(null),_s=m.createContext({outlet:null,matches:[],isDataRoute:!1}),Oj=m.createContext(null);function M2(e,t){let{relative:n}=t===void 0?{}:t;Xo()||Ie(!1);let{basename:r,navigator:s}=m.useContext(Ar),{hash:i,pathname:o,search:l}=Kd(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:ys([r,o])),s.createHref({pathname:c,search:l,hash:i})}function Xo(){return m.useContext(qd)!=null}function On(){return Xo()||Ie(!1),m.useContext(qd).location}function Ij(e){m.useContext(Ar).static||m.useLayoutEffect(e)}function Jt(){let{isDataRoute:e}=m.useContext(_s);return e?q2():D2()}function D2(){Xo()||Ie(!1);let e=m.useContext(Wd),{basename:t,future:n,navigator:r}=m.useContext(Ar),{matches:s}=m.useContext(_s),{pathname:i}=On(),o=JSON.stringify(sv(s,n.v7_relativeSplatPath)),l=m.useRef(!1);return Ij(()=>{l.current=!0}),m.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=iv(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ys([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function Kd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=m.useContext(Ar),{matches:s}=m.useContext(_s),{pathname:i}=On(),o=JSON.stringify(sv(s,r.v7_relativeSplatPath));return m.useMemo(()=>iv(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function O2(e,t){return I2(e,t)}function I2(e,t,n,r){Xo()||Ie(!1);let{navigator:s}=m.useContext(Ar),{matches:i}=m.useContext(_s),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=On(),d;if(t){var h;let y=typeof t=="string"?Qo(t):t;c==="/"||(h=y.pathname)!=null&&h.startsWith(c)||Ie(!1),d=y}else d=u;let f=d.pathname||"/",p=f;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=d2(e,{pathname:p}),g=V2(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:ys([c,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:ys([c,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&g?m.createElement(qd.Provider,{value:{location:jl({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ls.Pop}},g):g}function L2(){let e=W2(),t=R2(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const $2=m.createElement(L2,null);class F2 extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(_s.Provider,{value:this.props.routeContext},m.createElement(Oj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function U2(e){let{routeContext:t,match:n,children:r}=e,s=m.useContext(Wd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(_s.Provider,{value:t},r)}function V2(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||Ie(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,v=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let p,v=!1,g=null,y=null;n&&(p=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||$2,c&&(u<0&&f===0?(v=!0,y=null):u===f&&(v=!0,y=h.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,f+1)),w=()=>{let x;return p?x=g:v?x=y:h.route.Component?x=m.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,m.createElement(U2,{match:h,routeContext:{outlet:d,matches:b,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?m.createElement(F2,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}var Lj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Lj||{}),Zu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Zu||{});function B2(e){let t=m.useContext(Wd);return t||Ie(!1),t}function z2(e){let t=m.useContext(Dj);return t||Ie(!1),t}function H2(e){let t=m.useContext(_s);return t||Ie(!1),t}function $j(e){let t=H2(),n=t.matches[t.matches.length-1];return n.route.id||Ie(!1),n.route.id}function W2(){var e;let t=m.useContext(Oj),n=z2(Zu.UseRouteError),r=$j(Zu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function q2(){let{router:e}
58=B2(Lj.UseNavigateStable),t=$j(Zu.UseNavigateStable),n=m.useRef(!1);return Ij(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,jl({fromRouteId:t},i)))},[e,t])}function K2(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Fj(e){let{to:t,replace:n,state:r,relative:s}=e;Xo()||Ie(!1);let{future:i,static:o}=m.useContext(Ar),{matches:l}=m.useContext(_s),{pathname:c}=On(),u=Jt(),d=iv(t,sv(l,i.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return m.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function qe(e){Ie(!1)}function G2(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ls.Pop,navigator:i,static:o=!1,future:l}=e;Xo()&&Ie(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:o,future:jl({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=Qo(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:v="default"}=r,g=m.useMemo(()=>{let y=Fo(d,c);return y==null?null:{location:{pathname:y,search:h,hash:f,state:p,key:v},navigationType:s}},[c,d,h,f,p,v,s]);return g==null?null:m.createElement(Ar.Provider,{value:u},m.createElement(qd.Provider,{children:n,value:g}))}function Xp(e){let{children:t,location:n}=e;return O2(Zp(t),n)}new Promise(()=>{});function Zp(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(r,s)=>{if(!m.isValidElement(r))return;let i=[...t,s];if(r.type===m.Fragment){n.push.apply(n,Zp(r.props.children,i));return}r.type!==qe&&Ie(!1),!r.props.index||!r.props.children||Ie(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Zp(r.props.children,i)),n.push(o)}),n}/**
59 * React Router DOM v6.30.1
60 *
61 * Copyright (c) Remix Software Inc.
62 *
63 * This source code is licensed under the MIT license found in the
64 * LICENSE.md file in the root directory of this source tree.
65 *
66 * @license MIT
67 */function ed(){return ed=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ed.apply(this,arguments)}function Uj(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Y2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function J2(e,t){return e.button===0&&(!t||t==="_self")&&!Y2(e)}function em(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function Q2(e,t){let n=em(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const X2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Z2=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],eM="6";try{window.__reactRouterVersion=eM}catch{}const tM=m.createContext({isTransitioning:!1}),nM="startTransition",Zx=dg[nM];function rM(e){let{basename:t,children:n,future:r,window:s}=e,i=m.useRef();i.current==null&&(i.current=l2({window:s,v5Compat:!0}));let o=i.current,[l,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=m.useCallback(h=>{u&&Zx?Zx(()=>c(h)):c(h)},[c,u]);return m.useLayoutEffect(()=>o.listen(d),[o,d]),m.useEffect(()=>K2(r),[r]),m.createElement(G2,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const sM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oM=m.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}
67=t,f=Uj(t,X2),{basename:p}=m.useContext(Ar),v,g=!1;if(typeof u=="string"&&iM.test(u)&&(v=u,sM))try{let x=new URL(window.location.href),S=u.startsWith("//")?new URL(x.protocol+u):new URL(u),j=Fo(S.pathname,p);S.origin===x.origin&&j!=null?u=j+S.search+S.hash:g=!0}catch{}let y=M2(u,{relative:s}),b=cM(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function w(x){r&&r(x),x.defaultPrevented||b(x)}return m.createElement("a",ed({},f,{href:v||y,onClick:g||i?r:w,ref:n,target:c}))}),aM=m.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:c,viewTransition:u,children:d}=t,h=Uj(t,Z2),f=Kd(c,{relative:h.relative}),p=On(),v=m.useContext(Dj),{navigator:g,basename:y}=m.useContext(Ar),b=v!=null&&dM(f)&&u===!0,w=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,x=p.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(x=x.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&y&&(S=Fo(S,y)||S);const j=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=x===w||!o&&x.startsWith(w)&&x.charAt(j)==="/",C=S!=null&&(S===w||!o&&S.startsWith(w)&&S.charAt(w.length)==="/"),N={isActive:k,isPending:C,isTransitioning:b},_=k?r:void 0,E;typeof i=="function"?E=i(N):E=[i,k?"active":null,C?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let M=typeof l=="function"?l(N):l;return m.createElement(oM,ed({},h,{"aria-current":_,className:E,ref:n,style:M,to:c,viewTransition:u}),typeof d=="function"?d(N):d)});var tm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tm||(tm={}));var ew;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ew||(ew={}));function lM(e){let t=m.useContext(Wd);return t||Ie(!1),t}function cM(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=Jt(),u=On(),d=Kd(e,{relative:o});return m.useCallback(h=>{if(J2(h,n)){h.preventDefault();let f=r!==void 0?r:Qu(u)===Qu(d);c(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,s,n,e,i,o,l])}function uM(e){let t=m.useRef(em(e)),n=m.useRef(!1),r=On(),s=m.useMemo(()=>Q2(r.search,n.current?null:t.current),[r.search]),i=Jt(),o=m.useCallback((l,c)=>{const u=em(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}function dM(e,t){t===void 0&&(t={});let n=m.useContext(tM);n==null&&Ie(!1);let{basename:r}=lM(tm.useViewTransitionState),s=Kd(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Fo(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=F
67o(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Xu(s.pathname,o)!=null||Xu(s.pathname,i)!=null}var hM=(e,t,n,r,s,i,o,l)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(v=>{let g=v==="class",y=g&&i?s.map(b=>i[b]||b):s;g?(c.classList.remove(...y),c.classList.add(i&&i[p]?i[p]:p)):c.setAttribute(v,p)}),h(p)}function h(p){l&&u.includes(p)&&(c.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let p=localStorage.getItem(t)||n,v=o&&p==="system"?f():p;d(v)}catch{}},tw=["light","dark"],Vj="(prefers-color-scheme: dark)",fM=typeof window>"u",ov=m.createContext(void 0),pM={setTheme:e=>{},themes:[]},Bj=()=>{var e;return(e=m.useContext(ov))!=null?e:pM},mM=e=>m.useContext(ov)?m.createElement(m.Fragment,null,e.children):m.createElement(vM,{...e}),gM=["light","dark"],vM=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:s="theme",themes:i=gM,defaultTheme:o=n?"system":"light",attribute:l="data-theme",value:c,children:u,nonce:d,scriptProps:h})=>{let[f,p]=m.useState(()=>xM(s,o)),[v,g]=m.useState(()=>f==="system"?ff():f),y=c?Object.values(c):i,b=m.useCallback(j=>{let k=j;if(!k)return;j==="system"&&n&&(k=ff());let C=c?c[k]:k,N=t?wM(d):null,_=document.documentElement,E=M=>{M==="class"?(_.classList.remove(...y),C&&_.classList.add(C)):M.startsWith("data-")&&(C?_.setAttribute(M,C):_.removeAttribute(M))};if(Array.isArray(l)?l.forEach(E):E(l),r){let M=tw.includes(o)?o:null,O=tw.includes(k)?k:M;_.style.colorScheme=O}N==null||N()},[d]),w=m.useCallback(j=>{let k=typeof j=="function"?j(f):j;p(k);try{localStorage.setItem(s,k)}catch{}},[f]),x=m.useCallback(j=>{let k=ff(j);g(k),f==="system"&&n&&!e&&b("system")},[f,e]);m.useEffect(()=>{let j=window.matchMedia(Vj);return j.addListener(x),x(j),()=>j.removeListener(x)},[x]),m.useEffect(()=>{let j=k=>{k.key===s&&(k.newValue?p(k.newValue):w(o))};return window.addEventListener("storage",j),()=>window.removeEventListener("storage",j)},[w]),m.useEffect(()=>{b(e??f)},[e,f]);let S=m.useMemo(()=>({theme:f,setTheme:w,forcedTheme:e,resolvedTheme:f==="system"?v:f,themes:n?[...i,"system"]:i,systemTheme:n?v:void 0}),[f,w,e,v,n,i]);return m.createElement(ov.Provider,{value:S},m.createElement(yM,{forcedTheme:e,storageKey:s,attribute:l,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:i,nonce:d,scriptProps:h}),u)},yM=m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,themes:l,nonce:c,scriptProps:u})=>{let d=JSON.stringify([n,t,i,e,l,o,r,s]).slice(1,-1);return m.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${hM.toString()})(${d})`}})}),xM=(e,t)=>{if(fM)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},wM=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},ff=e=>(e||(e=window.matchMedia(Vj)),e.matches?"dark":"light"),bM=e=>{switch(e){case"success":return kM;case"info":return NM;case"warning":return CM;case"error":return EM;default:return null}},SM=Array(12).fill(0),jM=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},SM.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),kM=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),CM=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
67currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),NM=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),EM=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),TM=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),_M=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},nm=1,PM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:nm++,i=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
67this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],F.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(AM(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||nm++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Rt=new PM,RM=(e,t)=>{let n=(t==null?void 0:t.id)||nm++;return Rt.addToast({title:e,...t,id:n}),n},AM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",MM=RM,DM=()=>Rt.toasts,OM=()=>Rt.getActiveToasts();Object.assign(MM,{success:Rt.success,info:Rt.info,warning:Rt.warning,error:Rt.error,custom:Rt.custom,message:Rt.message,promise:Rt.promise,dismiss:Rt.dismiss,loading:Rt.loading},{getHistory:DM,getToasts:OM});function IM(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}IM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
67left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
67:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
67--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
68`);function Ac(e){return e.label!==void 0}var LM=3,$M="32px",FM="16px",nw=4e3,UM=356,VM=14,BM=20,zM=200;function gn(...e){return e.filter(Boolean).join(" ")}function HM(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var WM=e=>{var t,n,r,s,i,o,l,c,u,d,h;let{invert:f,toast:p,unstyled:v,interacting:g,setHeights:y,visibleToasts:b,heights:w,index:x,toasts:S,expanded:j,removeToast:k,defaultRichColors:C,closeButton:N,style:_,cancelButtonStyle:E,actionButtonStyle:M,className:O="",descriptionClassName:H="",duration:I,position:K,gap:$,loadingIcon:Q,expandByDefault:P,classNames:T,icons:R,closeButtonAriaLabel:V="Close toast",pauseWhenPageIsHidden:B}=e,[z,ee]=F.useState(null),[de,ce]=F.useState(null),[U,ge]=F.useState(!1),[pe,he]=F.useState(!1),[A,te]=F.useState(!1),[ie,et]=F.useState(!1),[Ms,Lr]=F.useState(!1),[Ds,fa]=F.useState(0),[_i,Ey]=F.useState(0),pa=F.useRef(p.duration||I||nw),Ty=F.useRef(null),Os=F.useRef(null),nP=x===0,rP=x+1<=b,Qt=p.type,Pi=p.dismissible!==!1,sP=p.className||"",iP=p.descriptionClassName||"",hc=F.useMemo(()=>w.findIndex(oe=>oe.toastId===p.id)||0,[w,p.id]),oP=F.useMemo(()=>{var oe;return(oe=p.closeButton)!=null?oe:N},[p.closeButton,N]),_y=F.useMemo(()=>p.duration||I||nw,[p.duration,I]),Oh=F.useRef(0),Ri=F.useRef(0),Py=F.useRef(0),Ai=F.useRef(null),[aP,lP]=K.split("-"),Ry=F.useMemo(()=>w.reduce((oe,je,Re)=>
68Re>=hc?oe:oe+je.height,0),[w,hc]),Ay=_M(),cP=p.invert||f,Ih=Qt==="loading";Ri.current=F.useMemo(()=>hc*$+Ry,[hc,Ry]),F.useEffect(()=>{pa.current=_y},[_y]),F.useEffect(()=>{ge(!0)},[]),F.useEffect(()=>{let oe=Os.current;if(oe){let je=oe.getBoundingClientRect().height;return Ey(je),y(Re=>[{toastId:p.id,height:je,position:p.position},...Re]),()=>y(Re=>Re.filter(hn=>hn.toastId!==p.id))}},[y,p.id]),F.useLayoutEffect(()=>{if(!U)return;let oe=Os.current,je=oe.style.height;oe.style.height="auto";let Re=oe.getBoundingClientRect().height;oe.style.height=je,Ey(Re),y(hn=>hn.find(fn=>fn.toastId===p.id)?hn.map(fn=>fn.toastId===p.id?{...fn,height:Re}:fn):[{toastId:p.id,height:Re,position:p.position},...hn])},[U,p.title,p.description,y,p.id]);let $r=F.useCallback(()=>{he(!0),fa(Ri.current),y(oe=>oe.filter(je=>je.toastId!==p.id)),setTimeout(()=>{k(p)},zM)},[p,k,y,Ri]);F.useEffect(()=>{if(p.promise&&Qt==="loading"||p.duration===1/0||p.type==="loading")return;let oe;return j||g||B&&Ay?(()=>{if(Py.current<Oh.current){let je=new Date().getTime()-Oh.current;pa.current=pa.current-je}Py.current=new Date().getTime()})():pa.current!==1/0&&(Oh.current=new Date().getTime(),oe=setTimeout(()=>{var je;(je=p.onAutoClose)==null||je.call(p,p),$r()},pa.current)),()=>clearTimeout(oe)},[j,g,p,Qt,B,Ay,$r]),F.useEffect(()=>{p.delete&&$r()},[$r,p.delete]);function uP(){var oe,je,Re;return R!=null&&R.loading?F.createElement("div",{className:gn(T==null?void 0:T.loader,(oe=p==null?void 0:p.classNames)==null?void 0:oe.loader,"sonner-loader"),"data-visible":Qt==="loading"},R.loading):Q?F.createElement("div",{className:gn(T==null?void 0:T.loader,(je=p==null?void 0:p.classNames)==null?void 0:je.loader,"sonner-loader"),"data-visible":Qt==="loading"},Q):F.createElement(jM,{className:gn(T==null?void 0:T.loader,(Re=p==null?void 0:p.classNames)==null?void 0:Re.loader),visible:Qt==="loading"})}return F.createElement("li",{tabIndex:0,ref:Os,className:gn(O,sP,T==null?void 0:T.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[Qt],(n=p==null?void 0:p.classNames)==null?void 0:n[Qt]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":U,"data-promise":!!p.promise,"data-swiped":Ms,"data-removed":pe,"data-visible":rP,"data-y-position":aP,"data-x-position":lP,"data-index":x,"data-front":nP,"data-swiping":A,"data-dismissible":Pi,"data-type":Qt,"data-invert":cP,"data-swipe-out":ie,"data-swipe-direction":de,"data-expanded":!!(j||P&&U),style:{"--index":x,"--toasts-before":x,"--z-index":S.length-x,"--offset":`${pe?Ds:Ri.current}px`,"--initial-height":P?"auto":`${_i}px`,..._,...p.style},onDragEnd:()=>{te(!1),ee(null),Ai.current=null},onPointerDown:oe=>{Ih||!Pi||(Ty.current=new Date,fa(Ri.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(te(!0),Ai.current={x:oe.clientX,y:oe.clientY}))},onPointerUp:()=>{var oe,je,Re,hn;if(ie||!Pi)return;Ai.current=null;let fn=Number(((oe=Os.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Fr=Number(((je=Os.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Is=new Date().getTime()-((Re=Ty.current)==null?void 0:Re.getTime()),pn=z==="x"?fn:Fr,Ur=Math.abs(pn)/Is;if(Math.abs(pn)>=BM||Ur>.11){fa(Ri.current),(hn=p.onDismiss)==null||hn.call(p,p),ce(z==="x"?fn>0?"right":"left":Fr>0?"down":"up"),$r(),et(!0),Lr(!1);return}te(!1),ee(null)},onPointerMove:oe=>{var je,Re,hn,fn;if(!Ai.current||!Pi||((je=window.getSelection())==null?void 0:je.toString().length)>0)return;let Fr=oe.clientY-Ai.current.y,Is=oe.clientX-Ai.current.x,pn=(Re=e.swipeDirections)!=null?Re:HM(K);!z&&(Math.abs(Is)>1||Math.abs(Fr)>1)&&ee(Math.abs(Is)>Math.abs(Fr)?"x":"y");let Ur={x:0,y:0};z==="y"?(pn.includes("top")||pn.includes("bottom"))&&(pn.includes("top")&&Fr<0||pn.includes("bottom")&&Fr>0)&&(Ur.y=Fr):z==="x"&&(pn.includes("left")||pn.includes("right"))&&(pn.includes("left")&&Is<0||pn.includes("right")&&Is>0)&&(Ur.x=Is),(Math.abs(Ur.x)>0||Math.abs(Ur.y)>0)&&Lr(!0),(hn=Os.current)==null||hn.style.setProperty("--swipe-amount-x",`${Ur.x}px`),(fn=Os.current)==null||fn.style.setProperty("--swipe-amount-y",`${Ur.y}px`)}},oP&&!p.jsx?F.createElement("button",{"aria-label":V,"data-disabled":Ih,"data-close-button":!0,onClick:Ih||!Pi?()=>{}:()=>{var oe;$r(),(oe=p.onDismiss)==null||oe.call(p,p)},className:gn(T==null?void 0:T.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=R==null?void 0:R.close)!=null?i:TM):null,p.jsx||m.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,Qt||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:gn(T==null?void 0:T.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)}
vendor: 5,435 bytes, line 68
68,p.promise||p.type==="loading"&&!p.icon?p.icon||uP():null,p.type!=="loading"?p.icon||(R==null?void 0:R[Qt])||bM(Qt):null):null,F.createElement("div",{"data-content":"",className:gn(T==null?void 0:T.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},F.createElement("div",{"data-title":"",className:gn(T==null?void 0:T.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:gn(H,iP,T==null?void 0:T.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),m.isValidElement(p.cancel)?p.cancel:p.cancel&&Ac(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||E,onClick:oe=>{var je,Re;Ac(p.cancel)&&Pi&&((Re=(je=p.cancel).onClick)==null||Re.call(je,oe),$r())},className:gn(T==null?void 0:T.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,m.isValidElement(p.action)?p.action:p.action&&Ac(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||M,onClick:oe=>{var je,Re;Ac(p.action)&&((Re=(je=p.action).onClick)==null||Re.call(je,oe),!oe.defaultPrevented&&$r())},className:gn(T==null?void 0:T.actionButton,(h=p==null?void 0:p.classNames)==null?void 0:h.actionButton)},p.action.label):null))};function rw(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function qM(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",l=i?FM:$M;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var KM=m.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:p,visibleToasts:v=LM,toastOptions:g,dir:y=rw(),gap:b=VM,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:j}=e,[k,C]=F.useState([]),N=F.useMemo(()=>Array.from(new Set([r].concat(k.filter(B=>B.position).map(B=>B.position)))),[k,r]),[_,E]=F.useState([]),[M,O]=F.useState(!1),[H,I]=F.useState(!1),[K,$]=F.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=F.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=F.useRef(null),R=F.useRef(!1),V=F.useCallback(B=>{C(z=>{var ee;return(ee=z.find(de=>de.id===B.id))!=null&&ee.delete||Rt.dismiss(B.id),z.filter(({id:de})=>de!==B.id)})},[]);return F.useEffect(()=>Rt.subscribe(B=>{if(B.dismiss){C(z=>z.map(ee=>ee.id===B.id?{...ee,delete:!0}:ee));return}setTimeout(()=>{bj.flushSync(()=>{C(z=>{let ee=z.findIndex(de=>de.id===B.id);return ee!==-1?[...z.slice(0,ee),{...z[ee],...B},...z.slice(ee+1)]:[B,...z]})})})}),[]),F.useEffect(()=>{if(d!=="system"){$(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;let B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:z})=>{$(z?"dark":"light")})}catch{B.addListener(({matches:ee})=>{try{$(ee?"dark":"light")}catch(de){console.error(de)}})}},[d]),F.useEffect(()=>{k.length<=1&&O(!1)},[k]),F.useEffect(()=>{let B=z=>{var ee,de;s.every(ce=>z[ce]||z.code===ce)&&(O(!0),(ee=Q.current)==null||ee.focus()),z.code==="Escape"&&(document.activeElement===Q.current||(de=Q.current)!=null&&de.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[s]),F.useEffect(()=>{if(Q.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,R.current=!1)}},[Q.current]),F.createElement("section",{ref:t,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((B,z)=>{var ee;let[de,ce]=B.split("-");return k.length?F.createElement("ol",{key:B,dir:y==="auto"?rw():y,tabIndex:-1,ref:Q,className:l,"data-sonner-toaster":!0,"data-theme":K,"data-y-position":de,"data-lifted":M&&k.length>1&&!i,"data-x-position":ce,style:{"--front-toast-height":`${((ee=_[0])==null?void 0:ee.height)||0}px`,"--width":`${UM}px`,"--gap":`${b}px`,...p,...qM(c,u)},onBlur:U=>{R.current&&!U.currentTarget.contains(U.relatedTarget)&&(R.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||R.current||(R.current=!0,T.current=U.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{H||O(!1)},onDragEnd:()=>O(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(U=>!U.position&&z===0||U.position===B).map((U,ge)=>{var pe,he;return F.createElement(WM,{key:U.id,icons:x,index:ge,toast:U,defaultRichColors:h,duration:(pe=g==null?void 0:g.duration)!=null?pe
68:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:v,closeButton:(he=g==null?void 0:g.closeButton)!=null?he:o,interacting:H,position:B,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:V,toasts:k.filter(A=>A.position==U.position),heights:_.filter(A=>A.position==U.position),setHeights:E,expandByDefault:i,gap:b,loadingIcon:w,expanded:M,pauseWhenPageIsHidden:j,swipeDirections:e.swipeDirections})})):null}))});const GM=({...e})=>{const{theme:t="system"}=Bj();return a.jsx(KM,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})},YM=1,JM=1e6;let pf=0;function QM(){return pf=(pf+1)%Number.MAX_SAFE_INTEGER,pf.toString()}const mf=new Map,sw=e=>{if(mf.has(e))return;const t=setTimeout(()=>{mf.delete(e),Ya({type:"REMOVE_TOAST",toastId:e})},JM);mf.set(e,t)},XM=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,YM)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?sw(n):e.toasts.forEach(r=>{sw(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},uu=[];let du={toasts:[]};function Ya(e){du=XM(du,e),uu.forEach(t=>{t(du)})}function ZM({...e}){const t=QM(),n=s=>Ya({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Ya({type:"DISMISS_TOAST",toastId:t});return Ya({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function cr(){const[e,t]=m.useState(du);return m.useEffect(()=>(uu.push(t),()=>{const n=uu.indexOf(t);n>-1&&uu.splice(n,1)}),[e]),{...e,toast:ZM,dismiss:n=>Ya({type:"DISMISS_TOAST",toastId:n})}}function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function iw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gd(...e){return t=>{let n=!1;const r=e.map(s=>{const i=iw(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():iw(e[s],null)}}}}function we(...e){return m.useCallback(Gd(...e),e)}function eD(e,t){const n=m.createContext(t),r=i=>{const{children:o,...l}=i,c=m.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function s(i){const o=m.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,s]}function Mr(e,t=[]){let n=[];function r(i,o){const l=m.createContext(o),c=n.length;n=[...n,o];const u=h=>{var b;const{scope:f,children:p,...v}=h,g=((b=f==null?void 0:f[e])==null?void 0:b[c])||l,y=m.useMemo(()=>v,Object.values(v));return a.jsx(g.Provider,{value:y,children:p})};u.displayName=i+"Provider";function d(h,f){var g;const p=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,v=m.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>m.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return m.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[r,tD(s,...t)]}function tD(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function vi(e){const t=nD(e),n=m.forwardRef((r,s)=>{const{children:i,...o}=r,l=m.Children.toArray(i),c=l.find(sD);if(c){const u=c.props.children,d=l.map(h=>h===c?m.Children.count(u)>1?m.Children.only(null):m.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...o,ref:s,children:m.isValidElement(u)?m.cloneElement(u,void 0,d):null})}return a.jsx(t,{...o,ref:s,children:i})});return n.displayName=`${e}.Slot`,n}var Zo=vi("Slot");function nD(e){const t=m.forwardRef((n,r)=>{const{children:s,...i}=n;
vendor: 9,979 bytes, line 68
68if(m.isValidElement(s)){const o=oD(s),l=iD(i,s.props);return s.type!==m.Fragment&&(l.ref=r?Gd(r,o):o),m.cloneElement(s,l)}return m.Children.count(s)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zj=Symbol("radix.slottable");function rD(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=zj,t}function sD(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zj}function iD(e,t){const n={...t};for(const r in t){const s=e[r],i=t[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...l)=>{const c=i(...l);return s(...l),c}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function oD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yd(e){const t=e+"CollectionProvider",[n,r]=Mr(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:y,children:b}=g,w=F.useRef(null),x=F.useRef(new Map).current;return a.jsx(s,{scope:y,itemMap:x,collectionRef:w,children:b})};o.displayName=t;const l=e+"CollectionSlot",c=vi(l),u=F.forwardRef((g,y)=>{const{scope:b,children:w}=g,x=i(l,b),S=we(y,x.collectionRef);return a.jsx(c,{ref:S,children:w})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=vi(d),p=F.forwardRef((g,y)=>{const{scope:b,children:w,...x}=g,S=F.useRef(null),j=we(y,S),k=i(d,b);return F.useEffect(()=>(k.itemMap.set(S,{ref:S,...x}),()=>void k.itemMap.delete(S))),a.jsx(f,{[h]:"",ref:j,children:w})});p.displayName=d;function v(g){const y=i(e+"CollectionConsumer",g);return F.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((k,C)=>x.indexOf(k.ref.current)-x.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},v,r]}var aD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=aD.reduce((e,t)=>{const n=vi(`Primitive.${t}`),r=m.forwardRef((s,i)=>{const{asChild:o,...l}=s,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function av(e,t){e&&Ci.flushSync(()=>e.dispatchEvent(t))}function Ft(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function lD(e,t=globalThis==null?void 0:globalThis.document){const n=Ft(e);m.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var cD="DismissableLayer",rm="dismissableLayer.update",uD="dismissableLayer.pointerDownOutside",dD="dismissableLayer.focusOutside",ow,Hj=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ea=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=m.useContext(Hj),[d,h]=m.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=m.useState({}),v=we(t,C=>h(C)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,j=fD(C=>{const N=C.target,_=[...u.branches].some(E=>E.contains(N));!S||_||(s==null||s(C),o==null||o(C),C.defaultPrevented||l==null||l())},f),k=pD(C=>{const N=C.target;[...u.branches].some(E=>E.contains(N))||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},f);return lD(C=>{w===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},f),m.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ow=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),aw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ow)}},[d,f,n,u]),m.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),aw())},[d,u]),m.useEffect(()=>{const C=()=>p({});return document.addEventListener(rm,C),()=>document.removeEventListener(rm,C)},[]),a.jsx(le.div,{...c,ref:v,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,k.onFocusCapture),onBlurCapture:q(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,j.onPointerDownCapture)})});ea.displayName=cD;var hD="DismissableLayerBranch",Wj=m.forwardRef((e,t)=>{const n=m.useContext(Hj),r=m.useRef(null),s=we(t,r);return m.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(le.div,{...e,ref:s})});Wj.displayName=hD;function fD(e,t=globalThis==null?void 0:globalThis.document){const n=Ft(e),r=m.useRef(!1),s=m.useRef(()=>{});return m.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){qj(uD,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pD(e,t=globalThis==null?void 0:globalThis.document){const n=Ft(e),r=m.useRef(!1);return m.useEffect(()=>{const s=i=>{i.target&&!r.current&&qj(dD,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function aw(){const e=new CustomEvent(rm);document.dispatchEvent(e)}function qj(e,t,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?av(s,i):s.dispatchEvent(i)}var mD=ea,gD=Wj,pt=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},vD="Portal",Jl=m.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[s,i]=m.useState(!1);pt(()=>i(!0),[]);const o=n||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?bj.createPortal(a.jsx(le.div,{...r,ref:t}),o):null});Jl.displayName=vD;function yD(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var ur=e=>{const{present:t,children:n}=e,r=xD(t),s=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),i=we(r.ref,wD(s));return typeof n=="function"||r.isPresent?m.cloneElement(s,{ref:i}):null};ur.displayName="Presence";function xD(e){const[t,n]=m.useState(),r=m.useRef(null),s=m.useRef(e),i=m.useRef("none"),o=e?"mounted":"unmounted",[l,c]=yD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const u=Mc(r.current);i.current=l==="mounted"?u:"none"},[l]),pt(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,p=Mc(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),pt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=p=>{const g=Mc(r.current).includes(p.animationName);if(p.target===t&&g&&(c("ANIMATION_END"),!s.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},f=p=>{p.target===t&&(i.current=Mc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:m.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Mc(e){return(e==null?void 0:e.animationName)||"none"}function wD(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bD=dg[" useInsertionEffect ".trim().toString()]||pt;function yi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,i,o]=SD({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:s;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=m.useCallback(d=>{var h;if(l){const f=jD(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else i(d)},[l,e,i,o]);return[c,u]}function SD({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),s=m.useRef(n),i=m.useRef(t);return bD(()=>{i.current=t},[t]),m.useEffect(()=>{var o;s.current!==n&&((o=i.current)==null||o.call(i,n),s.current=n)},[n,s]),[n,r,i]}function jD(e){return typeof e=="function"}var Kj=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),kD="VisuallyHidden",Jd=m.forwardRef((e,t)=>
68a.jsx(le.span,{...e,ref:t,style:{...Kj,...e.style}}));Jd.displayName=kD;var CD=Jd,lv="ToastProvider",[cv,ND,ED]=Yd("Toast"),[Gj,R7]=Mr("Toast",[ED]),[TD,Qd]=Gj(lv),Yj=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[l,c]=m.useState(null),[u,d]=m.useState(0),h=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${lv}\`. Expected non-empty \`string\`.`),a.jsx(cv.Provider,{scope:t,children:a.jsx(TD,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:m.useCallback(()=>d(p=>p+1),[]),onToastRemove:m.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};Yj.displayName=lv;var Jj="ToastViewport",_D=["F8"],sm="toast.viewportPause",im="toast.viewportResume",Qj=m.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=_D,label:s="Notifications ({hotkey})",...i}=e,o=Qd(Jj,n),l=ND(n),c=m.useRef(null),u=m.useRef(null),d=m.useRef(null),h=m.useRef(null),f=we(t,h,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;m.useEffect(()=>{const y=b=>{var x;r.length!==0&&r.every(S=>b[S]||b.code===S)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),m.useEffect(()=>{const y=c.current,b=h.current;if(v&&y&&b){const w=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(sm);b.dispatchEvent(k),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(im);b.dispatchEvent(k),o.isClosePausedRef.current=!1}},S=k=>{!y.contains(k.relatedTarget)&&x()},j=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",w),y.addEventListener("focusout",S),y.addEventListener("pointermove",w),y.addEventListener("pointerleave",j),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",w),y.removeEventListener("focusout",S),y.removeEventListener("pointermove",w),y.removeEventListener("pointerleave",j),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[v,o.isClosePausedRef]);const g=m.useCallback(({tabbingDirection:y})=>{const w=l().map(x=>{const S=x.ref.current,j=[S,...BD(S)];return y==="forwards"?j:j.reverse()});return(y==="forwards"?w.reverse():w).flat()},[l]);return m.useEffect(()=>{const y=h.current;if(y){const b=w=>{var j,k,C;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const N=document.activeElement,_=w.shiftKey;if(w.target===y&&_){(j=u.current)==null||j.focus();return}const O=g({tabbingDirection:_?"backwards":"forwards"}),H=O.findIndex(I=>I===N);gf(O.slice(H+1))?w.preventDefault():_?(k=u.current)==null||k.focus():(C=d.current)==null||C.focus()}};return y.addEventListener("keydown",b),()=>y.removeEventListener("keydown",b)}},[l,g]),a.jsxs(gD,{ref:c,role:"region","aria-label":s.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&a.jsx(om,{ref:u,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"forwards"});gf(y)}}),a.jsx(cv.Slot,{scope:n,children:a.jsx(le.ol,{tabIndex:-1,...i,ref:f})}),v&&a.jsx(om,{ref:d,onFocusFromOutsideViewport:()=>{const y=g({tabbingDirection:"backwards"});gf(y)}})]})});Qj.displayName=Jj;var Xj="ToastFocusProxy",om=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Qd(Xj,n);return a.jsx(Jd,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});om.displayName=Xj;var Ql="Toast",PD="toast.swipeStart",RD="toast.swipeMove",AD="toast.swipeCancel",MD="toast.swipeEnd",Zj=m.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[l,c]=yi({prop:r,defaultProp:s??!0,onChange:i,caller:Ql});return a.jsx(ur,{present:n||l,children:a.jsx(ID,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Ft(e.onPause),onResume:Ft(e.onResume),onSwipeStart:q(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:q(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:q(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:q(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Zj.displayName=Ql;var[DD,OD]=Gj(Ql,{onClose(){}}),ID=m.forwardRef((e,t)=>
68{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:p,...v}=e,g=Qd(Ql,n),[y,b]=m.useState(null),w=we(t,I=>b(I)),x=m.useRef(null),S=m.useRef(null),j=s||g.duration,k=m.useRef(0),C=m.useRef(j),N=m.useRef(0),{onToastAdd:_,onToastRemove:E}=g,M=Ft(()=>{var K;(y==null?void 0:y.contains(document.activeElement))&&((K=g.viewport)==null||K.focus()),o()}),O=m.useCallback(I=>{!I||I===1/0||(window.clearTimeout(N.current),k.current=new Date().getTime(),N.current=window.setTimeout(M,I))},[M]);m.useEffect(()=>{const I=g.viewport;if(I){const K=()=>{O(C.current),u==null||u()},$=()=>{const Q=new Date().getTime()-k.current;C.current=C.current-Q,window.clearTimeout(N.current),c==null||c()};return I.addEventListener(sm,$),I.addEventListener(im,K),()=>{I.removeEventListener(sm,$),I.removeEventListener(im,K)}}},[g.viewport,j,c,u,O]),m.useEffect(()=>{i&&!g.isClosePausedRef.current&&O(j)},[i,j,g.isClosePausedRef,O]),m.useEffect(()=>(_(),()=>E()),[_,E]);const H=m.useMemo(()=>y?ok(y):null,[y]);return g.viewport?a.jsxs(a.Fragment,{children:[H&&a.jsx(LD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:H}),a.jsx(DD,{scope:n,onClose:M,children:Ci.createPortal(a.jsx(cv.ItemSlot,{scope:n,children:a.jsx(mD,{asChild:!0,onEscapeKeyDown:q(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||M(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(le.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...v,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:q(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:q(e.onPointerDown,I=>{I.button===0&&(x.current={x:I.clientX,y:I.clientY})}),onPointerMove:q(e.onPointerMove,I=>{if(!x.current)return;const K=I.clientX-x.current.x,$=I.clientY-x.current.y,Q=!!S.current,P=["left","right"].includes(g.swipeDirection),T=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,R=P?T(0,K):0,V=P?0:T(0,$),B=I.pointerType==="touch"?10:2,z={x:R,y:V},ee={originalEvent:I,delta:z};Q?(S.current=z,Dc(RD,h,ee,{discrete:!1})):lw(z,g.swipeDirection,B)?(S.current=z,Dc(PD,d,ee,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(K)>B||Math.abs($)>B)&&(x.current=null)}),onPointerUp:q(e.onPointerUp,I=>{const K=S.current,$=I.target;if($.hasPointerCapture(I.pointerId)&&$.releasePointerCapture(I.pointerId),S.current=null,x.current=null,K){const Q=I.currentTarget,P={originalEvent:I,delta:K};lw(K,g.swipeDirection,g.swipeThreshold)?Dc(MD,p,P,{discrete:!0}):Dc(AD,f,P,{discrete:!0}),Q.addEventListener("click",T=>T.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),LD=e=>{const{__scopeToast:t,children:n,...r}=e,s=Qd(Ql,t),[i,o]=m.useState(!1),[l,c]=m.useState(!1);return UD(()=>o(!0)),m.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(Jl,{asChild:!0,children:a.jsx(Jd,{...r,children:i&&a.jsxs(a.Fragment,{children:[s.label," ",n]})})})},$D="ToastTitle",ek=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(le.div,{...r,ref:t})});ek.displayName=$D;var FD="ToastDescription",tk=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return a.jsx(le.div,{...r,ref:t})});tk.displayName=FD;var nk="ToastAction",rk=m.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?a.jsx(ik,{altText:n,asChild:!0,children:a.jsx(uv,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nk}\`. Expected non-empty \`string\`.`),null)});rk.displayName=nk;var sk="ToastClose",uv=m.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=OD(sk,n);return a.jsx(ik,{asChild:!0,children:a.jsx(le.button,{type:"button",...r,ref:t,onClick:q(e.onClick,s.onClose)})})});uv.displayName=sk;var ik=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return a.jsx(le.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function ok(e){const t=[];
vendor: 8,805 bytes, lines 68-163
68return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),VD(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...ok(r))}}),t}function Dc(e,t,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?av(s,i):s.dispatchEvent(i)}var lw=(e,t,n=0)=>{const r=Math.abs(e.x),s=Math.abs(e.y),i=r>s;return t==="left"||t==="right"?i&&r>n:!i&&s>n};function UD(e=()=>{}){const t=Ft(e);pt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function VD(e){return e.nodeType===e.ELEMENT_NODE}function BD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gf(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var zD=Yj,ak=Qj,lk=Zj,ck=ek,uk=tk,dk=rk,hk=uv;function fk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=fk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pk(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=fk(e))&&(r&&(r+=" "),r+=t);return r}const cw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,uw=pk,ta=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return uw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=cw(d)||cw(h);return s[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...p}=d;return Object.entries(p).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...i,...l}[g]):{...i,...l}[g]===y})?[...u,h,f]:u},[]);return uw(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
69 * @license lucide-react v0.462.0 - ISC
70 *
71 * This source code is licensed under the ISC license.
72 * See the LICENSE file in the root directory of this source tree.
73 */const HD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
74 * @license lucide-react v0.462.0 - ISC
75 *
76 * This source code is licensed under the ISC license.
77 * See the LICENSE file in the root directory of this source tree.
78 */var WD={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
79 * @license lucide-react v0.462.0 - ISC
80 *
81 * This source code is licensed under the ISC license.
82 * See the LICENSE file in the root directory of this source tree.
83 */const qD=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...l},c)=>m.createElement("svg",{ref:c,...WD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mk("lucide",s),...l},[...o.map(([u,d])=>m.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
84 * @license lucide-react v0.462.0 - ISC
85 *
86 * This source code is licensed under the ISC license.
87 * See the LICENSE file in the root directory of this source tree.
88 */const G=(e,t)=>{const n=m.forwardRef(({className:r,...s},i)=>m.createElement(qD,{ref:i,iconNode:t,className:mk(`lucide-${HD(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
89 * @license lucide-react v0.462.0 - ISC
90 *
91 * This source code is licensed under the ISC license.
92 * See the LICENSE file in the root directory of this source tree.
93 */const KD=G("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
94 * @license lucide-react v0.462.0 - ISC
95 *
96 * This source code is licensed under the ISC license.
97 * See the LICENSE file in the root directory of this source tree.
98 */const dw=G("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
99 * @license lucide-react v0.462.0 - ISC
100 *
101 * This source code is licensed under the ISC license.
102 * See the LICENSE file in the root directory of this source tree.
103 */const GD=G("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
104 * @license lucide-react v0.462.0 - ISC
105 *
106 * This source code is licensed under the ISC license.
107 * See the LICENSE file in the root directory of this source tree.
108 */const Xd=G("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
109 * @license lucide-react v0.462.0 - ISC
110 *
111 * This source code is licensed under the ISC license.
112 * See the LICENSE file in the root directory of this source tree.
113 */const kl=G("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
114 * @license lucide-react v0.462.0 - ISC
115 *
116 * This source code is licensed under the ISC license.
117 * See the LICENSE file in the root directory of this source tree.
118 */const YD=G("ArrowUpDown",[["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"}]]);/**
119 * @license lucide-react v0.462.0 - ISC
120 *
121 * This source code is licensed under the ISC license.
122 * See the LICENSE file in the root directory of this source tree.
123 */const JD=G("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
124 * @license lucide-react v0.462.0 - ISC
125 *
126 * This source code is licensed under the ISC license.
127 * See the LICENSE file in the root directory of this source tree.
128 */const QD=G("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
129 * @license lucide-react v0.462.0 - ISC
130 *
131 * This source code is licensed under the ISC license.
132 * See the LICENSE file in the root directory of this source tree.
133 */const XD=G("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/**
134 * @license lucide-react v0.462.0 - ISC
135 *
136 * This source code is licensed under the ISC license.
137 * See the LICENSE file in the root directory of this source tree.
138 */const gk=G("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
139 * @license lucide-react v0.462.0 - ISC
140 *
141 * This source code is licensed under the ISC license.
142 * See the LICENSE file in the root directory of this source tree.
143 */const ZD=G("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
144 * @license lucide-react v0.462.0 - ISC
145 *
146 * This source code is licensed under the ISC license.
147 * See the LICENSE file in the root directory of this source tree.
148 */const hw=G("BookmarkCheck",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z",key:"169p4p"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]]);/**
149 * @license lucide-react v0.462.0 - ISC
150 *
151 * This source code is licensed under the ISC license.
152 * See the LICENSE file in the root directory of this source tree.
153 */const td=G("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
154 * @license lucide-react v0.462.0 - ISC
155 *
156 * This source code is licensed under the ISC license.
157 * See the LICENSE file in the root directory of this source tree.
158 */const Lt=G("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
159 * @license lucide-react v0.462.0 - ISC
160 *
161 * This source code is licensed under the ISC license.
162 * See the LICENSE file in the root directory of this source tree.
163 */const vf=G("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
163],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
164 * @license lucide-react v0.462.0 - ISC
165 *
166 * This source code is licensed under the ISC license.
167 * See the LICENSE file in the root directory of this source tree.
168 */const dv=G("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
169 * @license lucide-react v0.462.0 - ISC
170 *
171 * This source code is licensed under the ISC license.
172 * See the LICENSE file in the root directory of this source tree.
173 */const fw=G("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
174 * @license lucide-react v0.462.0 - ISC
175 *
176 * This source code is licensed under the ISC license.
177 * See the LICENSE file in the root directory of this source tree.
178 */const Da=G("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
179 * @license lucide-react v0.462.0 - ISC
180 *
181 * This source code is licensed under the ISC license.
182 * See the LICENSE file in the root directory of this source tree.
183 */const hv=G("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
184 * @license lucide-react v0.462.0 - ISC
185 *
186 * This source code is licensed under the ISC license.
187 * See the LICENSE file in the root directory of this source tree.
188 */const Zd=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
189 * @license lucide-react v0.462.0 - ISC
190 *
191 * This source code is licensed under the ISC license.
192 * See the LICENSE file in the root directory of this source tree.
193 */const eO=G("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
194 * @license lucide-react v0.462.0 - ISC
195 *
196 * This source code is licensed under the ISC license.
197 * See the LICENSE file in the root directory of this source tree.
198 */const eh=G("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
199 * @license lucide-react v0.462.0 - ISC
200 *
201 * This source code is licensed under the ISC license.
202 * See the LICENSE file in the root directory of this source tree.
203 */const tO=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
204 * @license lucide-react v0.462.0 - ISC
205 *
206 * This source code is licensed under the ISC license.
207 * See the LICENSE file in the root directory of this source tree.
208 */const nO=G("CircleAlert",[["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"}]]);/**
209 * @license lucide-react v0.462.0 - ISC
210 *
211 * This source code is licensed under the ISC license.
212 * See the LICENSE file in the root directory of this source tree.
213 */const Uo=G("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
214 * @license lucide-react v0.462.0 - ISC
215 *
216 * This source code is licensed under the ISC license.
217 * See the LICENSE file in the root directory of this source tree.
218 */const rO=G("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
219 * @license lucide-react v0.462.0 - ISC
220 *
221 * This source code is licensed under the ISC license.
222 * See the LICENSE file in the root directory of this source tree.
223 */const fv=G("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
224 * @license lucide-react v0.462.0 - ISC
225 *
226 * This source code is licensed under the ISC license.
227 * See the LICENSE file in the root directory of this source tree.
228 */const sO=G("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
229 * @license lucide-react v0.462.0 - ISC
230 *
231 * This source code is licensed under the ISC license.
232 * See the LICENSE file in the root directory of this source tree.
233 */const iO=G("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
234 * @license lucide-react v0.462.0 - ISC
235 *
236 * This source code is licensed under the ISC license.
237 * See the LICENSE file in the root directory of this source tree.
238 */const na=G("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
239 * @license lucide-react v0.462.0 - ISC
240 *
241 * This source code is licensed under the ISC license.
242 * See the LICENSE file in the root directory of this source tree.
243 */const Xl=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
244 * @license lucide-react v0.462.0 - ISC
245 *
246 * This source code is licensed under the ISC license.
247 * See the LICENSE file in the root directory of this source tree.
248 */const vk=G("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
249 * @license lucide-react v0.462.0 - ISC
250 *
251 * This source code is licensed under the ISC license.
252 * See the LICENSE file in the root directory of this source tree.
253 */const oO=G("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
254 * @license lucide-react v0.462.0 - ISC
255 *
256 * This source code is licensed under the ISC license.
257 * See the LICENSE file in the root directory of this source tree.
258 */const yf=G("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
259 * @license lucide-react v0.462.0 - ISC
260 *
261 * This source code is licensed under the ISC license.
262 * See the LICENSE file in the root directory of this source tree.
263 */const pw=G("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
264 * @license lucide-react v0.462.0 - ISC
265 *
266 * This source code is licensed under the ISC license.
267 * See the LICENSE file in the root directory of this source tree.
268 */const ci=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
269 * @license lucide-react v0.462.0 - ISC
270 *
271 * This source code is licensed under the ISC license.
272 * See the LICENSE file in the root directory of this source tree.
273 */const pv=G("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
274 * @license lucide-react v0.462.0 - ISC
275 *
276 * This source code is licensed under the ISC license.
277 * See the LICENSE file in the root directory of this source tree.
278 */const aO=G("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
279 * @license lucide-react v0.462.0 - ISC
280 *
281 * This source code is licensed under the ISC license.
282 * See the LICENSE file in the root directory of this source tree.
283 */const Zl=G("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
284 * @license lucide-react v0.462.0 - ISC
285 *
286 * This source code is licensed under the ISC license.
287 * See the LICENSE file in the root directory of this source tree.
288 */const yk=G("LayoutGrid",[["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"}]]);/**
289 * @license lucide-react v0.462.0 - ISC
290 *
291 * This source code is licensed under the ISC license.
292 * See the LICENSE file in the root directory of this source tree.
293 */const am=G("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
294 * @license lucide-react v0.462.0 - ISC
295 *
296 * This source code is licensed under the ISC license.
297 * See the LICENSE file in the root directory of this source tree.
298 */const xk=G("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
299 * @license lucide-react v0.462.0 - ISC
300 *
301 * This source code is licensed under the ISC license.
302 * See the LICENSE file in the root directory of this source tree.
303 */const wk=G("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
304 * @license lucide-react v0.462.0 - ISC
305 *
306 * This source code is licensed under the ISC license.
307 * See the LICENSE file in the root directory of this source tree.
308 */const bk=G("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
309 * @license lucide-react v0.462.0 - ISC
310 *
311 * This source code is licensed under the ISC license.
312 * See the LICENSE file in the root directory of this source tree.
313 */const Ni=G("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
314 * @license lucide-react v0.462.0 - ISC
315 *
316 * This source code is licensed under the ISC license.
317 * See the LICENSE file in the root directory of this source tree.
318 */const Qs=G("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
319 * @license lucide-react v0.462.0 - ISC
320 *
321 * This source code is licensed under the ISC license.
322 * See the LICENSE file in the root directory of this source tree.
323 */const lO=G("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
324 * @license lucide-react v0.462.0 - ISC
325 *
326 * This source code is licensed under the ISC license.
327 * See the LICENSE file in the root directory of this source tree.
328 */const mv=G("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
329 * @license lucide-react v0.462.0 - ISC
330 *
331 * This source code is licensed under the ISC license.
332 * See the LICENSE file in the root directory of this source tree.
333 */const cO=G("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
334 * @license lucide-react v0.462.0 - ISC
335 *
336 * This source code is licensed under the ISC license.
337 * See the LICENSE file in the root directory of this source tree.
338 */const mw=G("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
339 * @license lucide-react v0.462.0 - ISC
340 *
341 * This source code is licensed under the ISC license.
342 * See the LICENSE file in the root directory of this source tree.
343 */const uO=G("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
344 * @license lucide-react v0.462.0 - ISC
345 *
346 * This source code is licensed under the ISC license.
347 * See the LICENSE file in the root directory of this source tree.
348 */const dO=G("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
349 * @license lucide-react v0.462.0 - ISC
350 *
351 * This source code is licensed under the ISC license.
352 * See the LICENSE file in the root directory of this source tree.
353 */const hu=G("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
354 * @license lucide-react v0.462.0 - ISC
355 *
356 * This source code is licensed under the ISC license.
357 * See the LICENSE file in the root directory of this source tree.
358 */const jr=G("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
359 * @license lucide-react v0.462.0 - ISC
360 *
361 * This source code is licensed under the ISC license.
362 * See the LICENSE file in the root directory of this source tree.
363 */const hO=G("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
364 * @license lucide-react v0.462.0 - ISC
365 *
366 * This source code is licensed under the ISC license.
367 * See the LICENSE file in the root directory of this source tree.
368 */const dr=G("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
369 * @license lucide-react v0.462.0 - ISC
370 *
371 * This source code is licensed under the ISC license.
372 * See the LICENSE file in the root directory of this source tree.
373 */const tr=G("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
374 * @license lucide-react v0.462.0 - ISC
375 *
376 * This source code is licensed under the ISC license.
377 * See the LICENSE file in the root directory of this source tree.
378 */const gv=G("Shield",[["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",ke
vendor: 5,207 bytes, lines 378-433
378y:"oel41y"}]]);/**
379 * @license lucide-react v0.462.0 - ISC
380 *
381 * This source code is licensed under the ISC license.
382 * See the LICENSE file in the root directory of this source tree.
383 */const Vo=G("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
384 * @license lucide-react v0.462.0 - ISC
385 *
386 * This source code is licensed under the ISC license.
387 * See the LICENSE file in the root directory of this source tree.
388 */const gw=G("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
389 * @license lucide-react v0.462.0 - ISC
390 *
391 * This source code is licensed under the ISC license.
392 * See the LICENSE file in the root directory of this source tree.
393 */const Sk=G("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
394 * @license lucide-react v0.462.0 - ISC
395 *
396 * This source code is licensed under the ISC license.
397 * See the LICENSE file in the root directory of this source tree.
398 */const nd=G("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
399 * @license lucide-react v0.462.0 - ISC
400 *
401 * This source code is licensed under the ISC license.
402 * See the LICENSE file in the root directory of this source tree.
403 */const fO=G("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
404 * @license lucide-react v0.462.0 - ISC
405 *
406 * This source code is licensed under the ISC license.
407 * See the LICENSE file in the root directory of this source tree.
408 */const vw=G("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
409 * @license lucide-react v0.462.0 - ISC
410 *
411 * This source code is licensed under the ISC license.
412 * See the LICENSE file in the root directory of this source tree.
413 */const th=G("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
414 * @license lucide-react v0.462.0 - ISC
415 *
416 * This source code is licensed under the ISC license.
417 * See the LICENSE file in the root directory of this source tree.
418 */const ec=G("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
419 * @license lucide-react v0.462.0 - ISC
420 *
421 * This source code is licensed under the ISC license.
422 * See the LICENSE file in the root directory of this source tree.
423 */const nr=G("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
424 * @license lucide-react v0.462.0 - ISC
425 *
426 * This source code is licensed under the ISC license.
427 * See the LICENSE file in the root directory of this source tree.
428 */const or=G("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
429 * @license lucide-react v0.462.0 - ISC
430 *
431 * This source code is licensed under the ISC license.
432 * See the LICENSE file in the root directory of this source tree.
433 */const pO=G("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),vv="-",mO=e=>{const t=vO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(vv);return l[0]===""&&l.length!==1&&l.shift(),jk(l,t)||gO(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},jk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?jk(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(vv);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},yw=/^\[(.+)\]$/,gO=e=>{if(yw.test(e)){const t=yw.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},vO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,120 bytes, line 433
433return xO(Object.entries(e.classGroups),n).forEach(([i,o])=>{lm(o,r,i,t)}),r},lm=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:xw(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(yO(s)){lm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{lm(o,xw(t,i),n,r)})})},xw=(e,t)=>{let n=e;return t.split(vv).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yO=e=>e.isThemeGetter,xO=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,s]}):e,wO=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return s(i,o),o},set(i,o){n.has(i)?n.set(i,o):s(i,o)}}},kk="!",bO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let y=0;y<l.length;y++){let b=l[y];if(u===0){if(b===s&&(r||l.slice(y,y+i)===t)){c.push(l.slice(d,y)),d=y+i;continue}if(b==="/"){h=y;continue}}b==="["?u++:b==="]"&&u--}const f=c.length===0?l:l.substring(d),p=f.startsWith(kk),v=p?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:g}};return n?l=>n({className:l,parseClassName:o}):o},SO=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},jO=e=>({cache:wO(e.cacheSize),parseClassName:bO(e),...mO(e)}),kO=/\s+/,CO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(kO);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let v=!!p,g=r(v?f.substring(0,p):f);if(!g){if(!v){l=u+(l.length>0?" "+l:l);continue}if(g=r(f),!g){l=u+(l.length>0?" "+l:l);continue}v=!1}const y=SO(d).join(":"),b=h?y+kk:y,w=b+g;if(i.includes(w))continue;i.push(w);const x=s(g,v);for(let S=0;S<x.length;++S){const j=x[S];i.push(b+j)}l=u+(l.length>0?" "+l:l)}return l};function NO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ck(t))&&(r&&(r+=" "),r+=n);return r}const Ck=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ck(e[r]))&&(n&&(n+=" "),n+=t);return n};function EO(e,...t){let n,r,s,i=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=jO(u),r=n.cache.get,s=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=CO(c,n);return s(c,d),d}return function(){return i(NO.apply(null,arguments))}}const Ee=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Nk=/^\[(?:([a-z-]+):)?(.+)\]$/i,TO=/^\d+\/\d+$/,_O=new Set(["px","full","screen"]),PO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,MO=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fr=e=>xo(e)||_O.has(e)||TO.test(e),Br=e=>ra(e,"length",BO),xo=e=>!!e&&!Number.isNaN(Number(e)),xf=e=>ra(e,"number",xo),ja=e=>!!e&&Number.isInteger(Number(e)),OO=e=>e.endsWith("%")&&xo(e.slice(0,-1)),ue=e=>Nk.test(e),zr=e=>PO.test(e),IO=new Set(["length","size","percentage"]),LO=e=>ra(e,IO,Ek),$O=e=>ra(e,"position",Ek),FO=new Set(["image","url"]),UO=e=>ra(e,FO,HO),VO=e=>ra(e,"",zO),ka=()=>!0,ra=(e,t,n)=>{const r=Nk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},BO=e=>RO.test(e)&&!AO.test(e),Ek=()=>!1,zO=e=>MO.test(e),HO=e=>DO.test(e),WO=()=>{const e=Ee("colors"),t=Ee("spacing"),n=Ee("blur"),r=Ee("brightness"),s=Ee("borderColor"),i=Ee("borderRadius"),o=Ee("borderSpacing"),l=Ee("borderWidth"),c=Ee("contrast"),u=Ee("grayscale"),d=Ee("hueRotate"),h=Ee("invert"),f=Ee("gap"),p=Ee("gradientColorStops"),v=Ee("gradientColorStopPositions"),g=Ee("inset"),y=Ee("margin"),b=Ee("opacity"),w=Ee("padding"),x=Ee("saturate"),S=Ee("scale"),j=Ee("sepia"),k=Ee("skew"),C=Ee("space"),N=Ee("translate"),_=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",ue,t],O=()=>[ue,t],H=()=>["",fr,Br],I=()=>["auto",xo,ue],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],$=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",ue],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[xo,ue];return{cacheSize:500,separator:":",theme:{colors:[ka],spacing:[fr,Br],blur:["none","",zr,ue],brightness:V(),borderColor:[e],borderRadius:["n
433one","","full",zr,ue],borderSpacing:O(),borderWidth:H(),contrast:V(),grayscale:T(),hueRotate:V(),invert:T(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[OO,Br],inset:M(),margin:M(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:T(),skew:V(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",ue]}],container:["container"],columns:[{columns:[zr]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...K(),ue]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ja,ue]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ue]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",ja,ue]}],"grid-cols":[{"grid-cols":[ka]}],"col-start-end":[{col:["auto",{span:["full",ja,ue]},ue]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ka]}],"row-start-end":[{row:["auto",{span:[ja,ue]},ue]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ue]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ue,t]}],"min-w":[{"min-w":[ue,t,"min","max","fit"]}],"max-w":[{"max-w":[ue,t,"none","full","min","max","fit","prose",{screen:[zr]},zr]}],h:[{h:[ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",zr,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xf]}],"font-family":[{font:[ka]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ue]}],"line-clamp":[{"line-clamp":["none",xo,xf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fr,ue]}],"list-image":[{"list-image":["none",ue]}],"list-style-type":[{list:["none","disc","decimal",ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...$(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fr,Br]}],"underline-offset":[{"underline-offset":["auto",fr,ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),$O]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},UO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}
vendor: 4,885 bytes, line 433
433],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...$(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:$()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...$()]}],"outline-offset":[{"outline-offset":[fr,ue]}],"outline-w":[{outline:[fr,Br]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[fr,Br]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",zr,VO]}],"shadow-color":[{shadow:[ka]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",zr,ue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[j]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[j]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ue]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",ue]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ja,ue]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
vendor: 4,937 bytes, line 433
433],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fr,Br,xf]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},qO=EO(WO);function J(...e){return qO(pk(e))}const KO=zD,Tk=m.forwardRef(({className:e,...t},n)=>a.jsx(ak,{ref:n,className:J("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Tk.displayName=ak.displayName;const GO=ta("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),_k=m.forwardRef(({className:e,variant:t,...n},r)=>a.jsx(lk,{ref:r,className:J(GO({variant:t}),e),...n}));_k.displayName=lk.displayName;const YO=m.forwardRef(({className:e,...t},n)=>a.jsx(dk,{ref:n,className:J("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));YO.displayName=dk.displayName;const Pk=m.forwardRef(({className:e,...t},n)=>a.jsx(hk,{ref:n,className:J("absolute right-2 top-2 rounded-md p-1 text-foreground
433/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(or,{className:"h-4 w-4"})}));Pk.displayName=hk.displayName;const Rk=m.forwardRef(({className:e,...t},n)=>a.jsx(ck,{ref:n,className:J("text-sm font-semibold",e),...t}));Rk.displayName=ck.displayName;const Ak=m.forwardRef(({className:e,...t},n)=>a.jsx(uk,{ref:n,className:J("text-sm opacity-90",e),...t}));Ak.displayName=uk.displayName;function JO(){const{toasts:e}=cr();return a.jsxs(KO,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return a.jsxs(_k,{...i,children:[a.jsxs("div",{className:"grid gap-1",children:[n&&a.jsx(Rk,{children:n}),r&&a.jsx(Ak,{children:r})]}),s,a.jsx(Pk,{})]},t)}),a.jsx(Tk,{})]})}var QO=dg[" useId ".trim().toString()]||(()=>{}),XO=0;function rr(e){const[t,n]=m.useState(QO());return pt(()=>{n(r=>r??String(XO++))},[e]),t?`radix-${t}`:""}const ZO=["top","right","bottom","left"],bs=Math.min,Bt=Math.max,rd=Math.round,Oc=Math.floor,sr=e=>({x:e,y:e}),eI={left:"right",right:"left",bottom:"top",top:"bottom"},tI={start:"end",end:"start"};function cm(e,t,n){return Bt(e,bs(t,n))}function Tr(e,t){return typeof e=="function"?e(t):e}function _r(e){return e.split("-")[0]}function sa(e){return e.split("-")[1]}function yv(e){return e==="x"?"y":"x"}function xv(e){return e==="y"?"height":"width"}const nI=new Set(["top","bottom"]);function Xn(e){return nI.has(_r(e))?"y":"x"}function wv(e){return yv(Xn(e))}function rI(e,t,n){n===void 0&&(n=!1);const r=sa(e),s=wv(e),i=xv(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=sd(o)),[o,sd(o)]}function sI(e){const t=sd(e);return[um(e),t,um(t)]}function um(e){return e.replace(/start|end/g,t=>tI[t])}const ww=["left","right"],bw=["right","left"],iI=["top","bottom"],oI=["bottom","top"];
vendor: 9,499 bytes, line 433
433function aI(e,t,n){switch(e){case"top":case"bottom":return n?t?bw:ww:t?ww:bw;case"left":case"right":return t?iI:oI;default:return[]}}function lI(e,t,n,r){const s=sa(e);let i=aI(_r(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(um)))),i}function sd(e){return e.replace(/left|right|bottom|top/g,t=>eI[t])}function cI(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mk(e){return typeof e!="number"?cI(e):{top:e,right:e,bottom:e,left:e}}function id(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function Sw(e,t,n){let{reference:r,floating:s}=e;const i=Xn(t),o=wv(t),l=xv(o),c=_r(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[l]/2-s[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-s.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-s.width,y:h};break;default:p={x:r.x,y:r.y}}switch(sa(t)){case"start":p[o]-=f*(n&&u?-1:1);break;case"end":p[o]+=f*(n&&u?-1:1);break}return p}const uI=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Sw(u,r,c),f=r,p={},v=0;for(let g=0;g<l.length;g++){const{name:y,fn:b}=l[g],{x:w,y:x,data:S,reset:j}=await b({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=w??d,h=x??h,p={...p,[y]:{...p[y],...S}},j&&v<=50&&(v++,typeof j=="object"&&(j.placement&&(f=j.placement),j.rects&&(u=j.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):j.rects),{x:d,y:h}=Sw(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:p}};async function Cl(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:p=0}=Tr(t,e),v=Mk(p),y=l[f?h==="floating"?"reference":"floating":h],b=id(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),w=h==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},j=id(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:w,offsetParent:x,strategy:c}):w);return{top:(b.top-j.top+v.top)/S.y,bottom:(j.bottom-b.bottom+v.bottom)/S.y,left:(b.left-j.left+v.left)/S.x,right:(j.right-b.right+v.right)/S.x}}const dI=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Tr(e,t)||{};if(u==null)return{};const h=Mk(d),f={x:n,y:r},p=wv(s),v=xv(p),g=await o.getDimensions(u),y=p==="y",b=y?"top":"left",w=y?"bottom":"right",x=y?"clientHeight":"clientWidth",S=i.reference[v]+i.reference[p]-f[p]-i.floating[v],j=f[p]-i.reference[p],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=l.floating[x]||i.floating[v]);const N=S/2-j/2,_=C/2-g[v]/2-1,E=bs(h[b],_),M=bs(h[w],_),O=E,H=C-g[v]-M,I=C/2-g[v]/2+N,K=cm(O,I,H),$=!c.arrow&&sa(s)!=null&&I!==K&&i.reference[v]/2-(I<O?E:M)-g[v]/2<0,Q=$?I<O?I-O:I-H:0;return{[p]:f[p]+Q,data:{[p]:K,centerOffset:I-K-Q,...$&&{alignmentOffset:Q}},reset:$}}}),hI=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=Tr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=_r(s),w=Xn(l),x=_r(l)===l,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),j=f||(x||!g?[sd(l)]:sI(l)),k=v!=="none";!f&&k&&j.push(...lI(l,g,v,S));const C=[l,...j],N=await Cl(t,y),_=[];let E=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&_.push(N[b]),h){const I=rI(s,o,S);_.push(N[I[0]],N[I[1]])}if(E=[...E,{placement:s,overflows:_}],!_.every(I=>I<=0)){var M,O;const I=(((M=i.flip)==null?void 0:M.index)||0)+1,K=C[I];if(K&&(!(h==="alignment"?w!==Xn(K):!1)||E.every(P=>P.overflows[0]>0&&Xn(P.placement)===w)))return{data:{index:I,overflows:E},reset:{placement:K}};let $=(O=E.filter(Q=>Q.overflows[0]<=0).sort((Q,P)=>Q.overflows[1]-P.overflows[1])[0])==null?void 0:O.placement;if(!$)switch(p){case"bestFit":{var H;const Q=(H=E.filter(P=>{if(k){const T=Xn(P.placement);return T===w||T==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(T=>T>0).reduce((T,R)=>T+R,0)]).sort((P,T)=>P[1]-T[1])[0])==null?void 0:H[0];Q&&($=Q);break}case"initialPlacement":$=l;break}if(s!==$)return{reset:{placement:$}}}return{}}}};function jw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function kw(e){return ZO.some(t=>e[t]>=0)}const fI=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Tr(e,t);switch(r){case"referenceHidden":{const i=await Cl(t,{...s,elementContext:"reference"}),o=jw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:kw(o)}}}case"escaped":{const i=await Cl(t,{...s,altBoundary:!0}),o=jw(i,n.floating);return{data:{escapedOffsets:o,escaped:kw(o)}}}default:return{}}}}},Dk=new Set(["left","top"]);async function pI(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=_r(n),l=sa(n),c=Xn(n)==="y",u=Dk.has(o)?-1:1,d=i&&c?-1:1,h=Tr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*d,y:f*u}:{x:f*u,y:p*d}}const mI=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:l}=t,c=await pI(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:o}}}}},gI=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...c}=Tr(e,t),u={x:n,y:r},d=await Cl(t,c),h=Xn(_r(s)),f=yv(h);let p=u[f],v=u[h];if(i){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=p+d[y],x=p-d[b];p=cm(w,p,x)}if(o){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=v+d[y],x=v-d[b];v=cm(w,v,x)}const g=l.fn({...t,[f]:p,[h]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[h]:o}}}}}},vI=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Tr(e,t),d={x:n,y:r},h=Xn(s),f=yv(h);let p=d[f],v=d[h];const g=Tr(l,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=f==="y"?"height":"width",S=i.reference[f]-i.floating[x]+y.mainAxis,j=i.reference[f]+i.reference[x]-y.mainAxis;p<S?p=S:p>j&&(p=j)}if(u){var b,w;const x=f==="y"?"width":"height",S=Dk.has(_r(s)),j=i.reference[h]-i.floating[x]+(S&&((b=o.offset)==null?void 0:b[h])||0)+(S?0:y.crossAxis),k=i.reference[h]+i.reference[x]+(S?0:((w=o.offset)==null?void 0:w[h])||0)-(S?y.crossAxis:0);v<j?v=j:v>k&&(v=k)}return{[f]:p,[h]:v}}}},yI=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:s,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Tr(e,t),d=await Cl(t,u),h=_r(s),f=sa(s),p=Xn(s)==="y",{width:v,height:g}=i.floating;let y,b;h==="top"||h==="bottom"?(y=h,b=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(b=h,y=f==="end"?"top":"bottom");const w=g-d.top-d.bottom,x=v-d.left-d.right,S=bs(g-d[y],w),j=bs(v-d[b],x),k=!t.middlewareData.shift;let C=S,N=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=w),k&&!f){const E=Bt(d.left,0),M=Bt(d.right,0),O=Bt(d.top,0),H=Bt(d.bottom,0);p?N=v-2*(E!==0||M!==0?E+M:Bt(d.left,d.right)):C=g-2*(O!==0||H!==0?O+H:Bt(d.top,d.bottom))}await c({...t,availableWidth:N,availableHeight:C});const _=await o.getDimensions(l.floating);return v!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function nh(){return typeof window<"u"}function ia(e){return Ok(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hr(e){var t;return(t=(Ok(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ok(e){return nh()?e instanceof Node||e instanceof qt(e).Node:!1}function Mn(e){return nh()?e instanceof Element||e instanceof qt(e).Element:!1}function ar(e){return nh()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Cw(e){return!nh()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const xI=new Set(["inline","contents"]);function tc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Dn(e);
vendor: 3,462 bytes, line 433
433return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xI.has(s)}const wI=new Set(["table","td","th"]);function bI(e){return wI.has(ia(e))}const SI=[":popover-open",":modal"];function rh(e){return SI.some(t=>{try{return e.matches(t)}catch{return!1}})}const jI=["transform","translate","scale","rotate","perspective"],kI=["transform","translate","scale","rotate","perspective","filter"],CI=["paint","layout","strict","content"];function bv(e){const t=Sv(),n=Mn(e)?Dn(e):e;return jI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kI.some(r=>(n.willChange||"").includes(r))||CI.some(r=>(n.contain||"").includes(r))}function NI(e){let t=Ss(e);for(;ar(t)&&!Bo(t);){if(bv(t))return t;if(rh(t))return null;t=Ss(t)}return null}function Sv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const EI=new Set(["html","body","#document"]);function Bo(e){return EI.has(ia(e))}function Dn(e){return qt(e).getComputedStyle(e)}function sh(e){return Mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ss(e){if(ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Cw(e)&&e.host||hr(e);return Cw(t)?t.host:t}function Ik(e){const t=Ss(e);return Bo(t)?e.ownerDocument?e.ownerDocument.body:e.body:ar(t)&&tc(t)?t:Ik(t)}function Nl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=Ik(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=qt(s);if(i){const l=dm(o);return t.concat(o,o.visualViewport||[],tc(s)?s:[],l&&n?Nl(l):[])}return t.concat(s,Nl(s,[],n))}function dm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lk(e){const t=Dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=ar(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,l=rd(n)!==i||rd(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function jv(e){return Mn(e)?e:e.contextElement}function wo(e){const t=jv(e);if(!ar(t))return sr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=Lk(t);let o=(i?rd(n.width):n.width)/r,l=(i?rd(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const TI=sr(0);function $k(e){const t=qt(e);return!Sv()||!t.visualViewport?TI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _I(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function xi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=jv(e);let o=sr(1);t&&(r?Mn(r)&&(o=wo(r)):o=wo(e));const l=_I(i,n,r)?$k(i):sr(0);let c=(s.left+l.x)/o.x,u=(s.top+l.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=qt(i),p=r&&Mn(r)?qt(r):r;let v=f,g=dm(v);for(;g&&r&&p!==v;){const y=wo(g),b=g.getBoundingClientRect(),w=Dn(g),x=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,h*=y.y,c+=x,u+=S,v=qt(g),g=dm(v)}}return id({width:d,height:h,x:c,y:u})}function kv(e,t){const n=sh(e).scrollLeft;return t?t.left+n:xi(hr(e)).left+n}function Fk(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=r.left+t.scrollLeft-(n?0:kv(e,r)),i=r.top+t.scrollTop;return{x:s,y:i}}function PI(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=hr(r),l=t?rh(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=sr(1);const d=sr(0),h=ar(r);
vendor: 5,509 bytes, line 433
433if((h||!h&&!i)&&((ia(r)!=="body"||tc(o))&&(c=sh(r)),ar(r))){const p=xi(r);u=wo(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const f=o&&!h&&!i?Fk(o,c,!0):sr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function RI(e){return Array.from(e.getClientRects())}function AI(e){const t=hr(e),n=sh(e),r=e.ownerDocument.body,s=Bt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Bt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+kv(e);const l=-n.scrollTop;return Dn(r).direction==="rtl"&&(o+=Bt(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:l}}function MI(e,t){const n=qt(e),r=hr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(s){i=s.width,o=s.height;const u=Sv();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:i,height:o,x:l,y:c}}const DI=new Set(["absolute","fixed"]);function OI(e,t){const n=xi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=ar(e)?wo(e):sr(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function Nw(e,t,n){let r;if(t==="viewport")r=MI(e,n);else if(t==="document")r=AI(hr(e));else if(Mn(t))r=OI(t,n);else{const s=$k(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return id(r)}function Uk(e,t){const n=Ss(e);return n===t||!Mn(n)||Bo(n)?!1:Dn(n).position==="fixed"||Uk(n,t)}function II(e,t){const n=t.get(e);if(n)return n;let r=Nl(e,[],!1).filter(l=>Mn(l)&&ia(l)!=="body"),s=null;const i=Dn(e).position==="fixed";let o=i?Ss(e):e;for(;Mn(o)&&!Bo(o);){const l=Dn(o),c=bv(o);!c&&l.position==="fixed"&&(s=null),(i?!c&&!s:!c&&l.position==="static"&&!!s&&DI.has(s.position)||tc(o)&&!c&&Uk(e,o))?r=r.filter(d=>d!==o):s=l,o=Ss(o)}return t.set(e,r),r}function LI(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?rh(t)?[]:II(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=Nw(t,d,s);return u.top=Bt(h.top,u.top),u.right=bs(h.right,u.right),u.bottom=bs(h.bottom,u.bottom),u.left=Bt(h.left,u.left),u},Nw(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function $I(e){const{width:t,height:n}=Lk(e);return{width:t,height:n}}function FI(e,t,n){const r=ar(t),s=hr(t),i=n==="fixed",o=xi(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=sr(0);function u(){c.x=kv(s)}if(r||!r&&!i)if((ia(t)!=="body"||tc(s))&&(l=sh(t)),r){const p=xi(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else s&&u();i&&!r&&s&&u();const d=s&&!r&&!i?Fk(s,l):sr(0),h=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function wf(e){return Dn(e).position==="static"}function Ew(e,t){if(!ar(e)||Dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return hr(e)===n&&(n=n.ownerDocument.body),n}function Vk(e,t){const n=qt(e);if(rh(e))return n;if(!ar(e)){let s=Ss(e);for(;s&&!Bo(s);){if(Mn(s)&&!wf(s))return s;s=Ss(s)}return n}let r=Ew(e,t);for(;r&&bI(r)&&wf(r);)r=Ew(r,t);return r&&Bo(r)&&wf(r)&&!bv(r)?n:r||NI(e)||n}const UI=async function(e){const t=this.getOffsetParent||Vk,n=this.getDimensions,r=await n(e.floating);return{reference:FI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function VI(e){return Dn(e).direction==="rtl"}const BI={convertOffsetParentRelativeRectToViewportRelativeRect:PI,getDocumentElement:hr,getClippingRect:LI,getOffsetParent:Vk,getElementRects:UI,getClientRects:RI,getDimensions:$I,getScale:wo,isElement:Mn,isRTL:VI};function Bk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zI(e,t){let n=null,r;const s=hr(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:p}=u;if(l||t(),!f||!p)return;const v=Oc(h),g=Oc(s.clientWidth-(d+f)),y=Oc(s.clientHeight-(h+p)),b=Oc(d),x={rootMargin:-v+"px "+-g+"px "+-y+"px "+-b+"px",threshold:Bt(0,bs(1,c))||1};let S=!0;function j(k){const C=k[0].intersectionRatio;if(C!==c){if(!S)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!Bk(u,e.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(j,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(j,x)}n.observe(e)}return o(!0),i}function HI(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=jv(e),d=s||i?[...u?Nl(u):[],...Nl(t)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const h=u&&l?zI(u,n):null;let f=-1,p=null;o&&(p=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,g=c?xi(e):null;c&&y();function y(){const b=xi(e);g&&!Bk(g,b)&&n(),g=b,v=requestAnimationFrame(y)}return n(),()=>{var b;d.forEach(w=>{s&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),h==null||h(),(b=p)==null||b.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const WI=mI,qI=gI,KI=hI,GI=yI,YI=fI,Tw=dI,JI=vI,QI=(e,t,n)=>{const r=new Map,s={platform:BI,...n},i={...s.platform,_c:r};return uI(e,t,{...s,platform:i})};var XI=typeof document<"u",ZI=function(){},fu=XI?m.useLayoutEffect:ZI;function od(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 433
433if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!od(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!od(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function zk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _w(e,t){const n=zk(e);return Math.round(t*n)/n}function bf(e){const t=m.useRef(e);return fu(()=>{t.current=e}),t}function eL(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);od(f,r)||p(r);const[v,g]=m.useState(null),[y,b]=m.useState(null),w=m.useCallback(P=>{P!==k.current&&(k.current=P,g(P))},[]),x=m.useCallback(P=>{P!==C.current&&(C.current=P,b(P))},[]),S=i||v,j=o||y,k=m.useRef(null),C=m.useRef(null),N=m.useRef(d),_=c!=null,E=bf(c),M=bf(s),O=bf(u),H=m.useCallback(()=>{if(!k.current||!C.current)return;const P={placement:t,strategy:n,middleware:f};M.current&&(P.platform=M.current),QI(k.current,C.current,P).then(T=>{const R={...T,isPositioned:O.current!==!1};I.current&&!od(N.current,R)&&(N.current=R,Ci.flushSync(()=>{h(R)}))})},[f,t,n,M,O]);fu(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,h(P=>({...P,isPositioned:!1})))},[u]);const I=m.useRef(!1);fu(()=>(I.current=!0,()=>{I.current=!1}),[]),fu(()=>{if(S&&(k.current=S),j&&(C.current=j),S&&j){if(E.current)return E.current(S,j,H);H()}},[S,j,H,E,_]);const K=m.useMemo(()=>({reference:k,floating:C,setReference:w,setFloating:x}),[w,x]),$=m.useMemo(()=>({reference:S,floating:j}),[S,j]),Q=m.useMemo(()=>{const P={position:n,left:0,top:0};if(!$.floating)return P;const T=_w($.floating,d.x),R=_w($.floating,d.y);return l?{...P,transform:"translate("+T+"px, "+R+"px)",...zk($.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:R}},[n,l,$.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:H,refs:K,elements:$,floatingStyles:Q}),[d,H,K,$,Q])}const tL=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Tw({element:r.current,padding:s}).fn(n):{}:r?Tw({element:r,padding:s}).fn(n):{}}}},nL=(e,t)=>({...WI(e),options:[e,t]}),rL=(e,t)=>({...qI(e),options:[e,t]}),sL=(e,t)=>({...JI(e),options:[e,t]}),iL=(e,t)=>({...KI(e),options:[e,t]}),oL=(e,t)=>({...GI(e),options:[e,t]}),aL=(e,t)=>({...YI(e),options:[e,t]}),lL=(e,t)=>({...tL(e),options:[e,t]});var cL="Arrow",Hk=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return a.jsx(le.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hk.displayName=cL;var uL=Hk;function dL(e){const[t,n]=m.useState(void 0);return pt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Cv="Popper",[Wk,oa]=Mr(Cv),[hL,qk]=Wk(Cv),Kk=e=>{const{__scopePopper:t,children:n}=e,[r,s]=m.useState(null);return a.jsx(hL,{scope:t,anchor:r,onAnchorChange:s,children:n})};Kk.displayName=Cv;var Gk="PopperAnchor",Yk=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=qk(Gk,n),o=m.useRef(null),l=we(t,o);return m.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:a.jsx(le.div,{...s,ref:l})});Yk.displayName=Gk;var Nv="PopperContent",[fL,pL]=Wk(Nv),Jk=m.forwardRef((e,t)=>
vendor: 4,210 bytes, line 433
433{var U,ge,pe,he,A,te;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,y=qk(Nv,n),[b,w]=m.useState(null),x=we(t,ie=>w(ie)),[S,j]=m.useState(null),k=dL(S),C=(k==null?void 0:k.width)??0,N=(k==null?void 0:k.height)??0,_=r+(i!=="center"?"-"+i:""),E=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],O=M.length>0,H={padding:E,boundary:M.filter(gL),altBoundary:O},{refs:I,floatingStyles:K,placement:$,isPositioned:Q,middlewareData:P}=eL({strategy:"fixed",placement:_,whileElementsMounted:(...ie)=>HI(...ie,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[nL({mainAxis:s+N,alignmentAxis:o}),c&&rL({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?sL():void 0,...H}),c&&iL({...H}),oL({...H,apply:({elements:ie,rects:et,availableWidth:Ms,availableHeight:Lr})=>{const{width:Ds,height:fa}=et.reference,_i=ie.floating.style;_i.setProperty("--radix-popper-available-width",`${Ms}px`),_i.setProperty("--radix-popper-available-height",`${Lr}px`),_i.setProperty("--radix-popper-anchor-width",`${Ds}px`),_i.setProperty("--radix-popper-anchor-height",`${fa}px`)}}),S&&lL({element:S,padding:l}),vL({arrowWidth:C,arrowHeight:N}),f&&aL({strategy:"referenceHidden",...H})]}),[T,R]=Zk($),V=Ft(v);pt(()=>{Q&&(V==null||V())},[Q,V]);const B=(U=P.arrow)==null?void 0:U.x,z=(ge=P.arrow)==null?void 0:ge.y,ee=((pe=P.arrow)==null?void 0:pe.centerOffset)!==0,[de,ce]=m.useState();return pt(()=>{b&&ce(window.getComputedStyle(b).zIndex)},[b]),a.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:Q?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(he=P.transformOrigin)==null?void 0:he.x,(A=P.transformOrigin)==null?void 0:A.y].join(" "),...((te=P.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(fL,{scope:n,placedSide:T,onArrowChange:j,arrowX:B,arrowY:z,shouldHideArrow:ee,children:a.jsx(le.div,{"data-side":T,"data-align":R,...g,ref:x,style:{...g.style,animation:Q?void 0:"none"}})})})});Jk.displayName=Nv;var Qk="PopperArrow",mL={top:"bottom",right:"left",bottom:"top",left:"right"},Xk=m.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=pL(Qk,r),o=mL[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:a.jsx(uL,{...s,ref:n,style:{...s.style,display:"block"}})})});Xk.displayName=Qk;function gL(e){return e!==null}var vL=e=>({name:"transformOrigin",options:e,fn(t){var y,b,w;const{placement:n,rects:r,middlewareData:s}=t,o=((y=s.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=Zk(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((b=s.arrow)==null?void 0:b.x)??0)+l/2,p=(((w=s.arrow)==null?void 0:w.y)??0)+c/2;let v="",g="";return u==="bottom"?(v=o?h:`${f}px`,g=`${-c}px`):u==="top"?(v=o?h:`${f}px`,g=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=o?h:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,g=o?h:`${p}px`),{data:{x:v,y:g}}}});function Zk(e){const[t,n="center"]=e.split("-");return[t,n]}var Ev=Kk,Tv=Yk,_v=Jk,Pv=Xk,[ih,A7]=Mr("Tooltip",[oa]),oh=oa(),eC="TooltipProvider",yL=700,hm="tooltip.open",[xL,Rv]=ih(eC),tC=e=>{const{__scopeTooltip:t,delayDuration:n=yL,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,o=m.useRef(!0),l=m.useRef(!1),c=m.useRef(0);return m.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(xL,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>
vendor: 5,043 bytes, line 433
433o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:m.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};tC.displayName=eC;var El="Tooltip",[wL,ah]=ih(El),nC=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=Rv(El,e.__scopeTooltip),u=oh(t),[d,h]=m.useState(null),f=rr(),p=m.useRef(0),v=o??c.disableHoverableContent,g=l??c.delayDuration,y=m.useRef(!1),[b,w]=yi({prop:r,defaultProp:s??!1,onChange:C=>{C?(c.onOpen(),document.dispatchEvent(new CustomEvent(hm))):c.onClose(),i==null||i(C)},caller:El}),x=m.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),S=m.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,w(!0)},[w]),j=m.useCallback(()=>{window.clearTimeout(p.current),p.current=0,w(!1)},[w]),k=m.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,w(!0),p.current=0},g)},[g,w]);return m.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),a.jsx(Ev,{...u,children:a.jsx(wL,{scope:t,contentId:f,open:b,stateAttribute:x,trigger:d,onTriggerChange:h,onTriggerEnter:m.useCallback(()=>{c.isOpenDelayedRef.current?k():S()},[c.isOpenDelayedRef,k,S]),onTriggerLeave:m.useCallback(()=>{v?j():(window.clearTimeout(p.current),p.current=0)},[j,v]),onOpen:S,onClose:j,disableHoverableContent:v,children:n})})};nC.displayName=El;var fm="TooltipTrigger",rC=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=ah(fm,n),i=Rv(fm,n),o=oh(n),l=m.useRef(null),c=we(t,l,s.onTriggerChange),u=m.useRef(!1),d=m.useRef(!1),h=m.useCallback(()=>u.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(Tv,{asChild:!0,...o,children:a.jsx(le.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:q(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:q(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:q(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:q(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:q(e.onBlur,s.onClose),onClick:q(e.onClick,s.onClose)})})});rC.displayName=fm;var bL="TooltipPortal",[M7,SL]=ih(bL,{forceMount:void 0}),zo="TooltipContent",sC=m.forwardRef((e,t)=>{const n=SL(zo,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=ah(zo,e.__scopeTooltip);return a.jsx(ur,{present:r||o.open,children:o.disableHoverableContent?a.jsx(iC,{side:s,...i,ref:t}):a.jsx(jL,{side:s,...i,ref:t})})}),jL=m.forwardRef((e,t)=>{const n=ah(zo,e.__scopeTooltip),r=Rv(zo,e.__scopeTooltip),s=m.useRef(null),i=we(t,s),[o,l]=m.useState(null),{trigger:c,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=m.useCallback(()=>{l(null),h(!1)},[h]),p=m.useCallback((v,g)=>{const y=v.currentTarget,b={x:v.clientX,y:v.clientY},w=TL(b,y.getBoundingClientRect()),x=_L(b,w),S=PL(g.getBoundingClientRect()),j=AL([...x,...S]);l(j),h(!0)},[h]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(c&&d){const v=y=>p(y,d),g=y=>p(y,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",g)}}},[c,d,p,f]),m.useEffect(()=>{if(o){const v=g=>{const y=g.target,b={x:g.clientX,y:g.clientY},w=(c==null?void 0:c.contains(y))||(d==null?void 0:d.contains(y)),x=!RL(b,o);w?f():x&&(f(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,f]),a.jsx(iC,{...e,ref:i})}),[kL,CL]=ih(El,{isInside:!1}),NL=rD("TooltipContent"),iC=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=ah(zo,n),u=oh(n),{onClose:d}=c;return m.useEffect(()=>(document.addEventListener(hm,d),()=>document.removeEventListener(hm,d)),[d]),m.useEffect(()=>{if(c.trigger){const h=f=>{const p=f.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(ea,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(_v,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(NL,{children:r}),a.jsx(kL,{scope:n,isInside:!0,children:a.jsx(CD,{id:c.contentId,role:"tooltip",children:s||r})})]})})});sC.displayName=zo;var oC="TooltipArrow",EL=m.forwardRef((e,t)=>
433{const{__scopeTooltip:n,...r}=e,s=oh(n);return CL(oC,n).isInside?null:a.jsx(Pv,{...s,...r,ref:t})});EL.displayName=oC;function TL(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function _L(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function PL(e){const{top:t,right:n,bottom:r,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:r},{x:s,y:r}]}function RL(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function AL(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),ML(t)}function ML(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const s=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const s=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var DL=tC,OL=nC,IL=rC,aC=sC;const lC=DL,cC=OL,uC=IL,Av=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(aC,{ref:r,sideOffset:t,className:J("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Av.displayName=aC.displayName;function LL(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}return new(n||(n=Promise))(function(i,o){function l(d){try{u(r.next(d))}catch(h){o(h)}}function c(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(l,c)}u((r=r.apply(e,t||[])).next())})}const $L=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Mv extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class FL extends Mv{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Pw extends Mv{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Rw extends Mv{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var pm;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(pm||(pm={}));class UL{constructor(t,{headers:n={},customFetch:r,region:s=pm.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=$L(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return LL(this,arguments,void 0,function*(n,r={}){var s;let i,o;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=r;let f={},{region:p}=r;p||(p=this.region);const v=new URL(`${this.url}/${n}`);p&&p!=="any"&&(f["x-region"]=p,v.searchParams.set("forceFunctionRegion",p));let g;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=u):typeof u=="string"?(f["Content-Type"]="text/plain",g=u):typeof FormData<"u"&&u instanceof FormData?g=u:(f["Content-Type"]="application/json",g=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?g=JSON.stringify(u):g=u;let y=d;h&&(o=new AbortController,i=setTimeout(()=>
433o.abort(),h),d?(y=o.signal,d.addEventListener("abort",()=>o.abort())):y=o.signal);const b=yield this.fetch(v.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),l),body:g,signal:y}).catch(j=>{throw new FL(j)}),w=b.headers.get("x-relay-error");if(w&&w==="true")throw new Pw(b);if(!b.ok)throw new Rw(b);let x=((s=b.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),S;return x==="application/json"?S=yield b.json():x==="application/octet-stream"||x==="application/pdf"?S=yield b.blob():x==="text/event-stream"?S=b:x==="multipart/form-data"?S=yield b.formData():S=yield b.text(),{data:S,error:null,response:b}}catch(l){return{data:null,error:l,response:l instanceof Rw||l instanceof Pw?l.context:void 0}}finally{i&&clearTimeout(i)}})}}var VL=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}},BL=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let s=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async i=>{let o=null,l=null,c=null,u=i.status,d=i.statusText;if(i.ok){var h,f;if(n.method!=="HEAD"){var p;const y=await i.text();y===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?l=y:l=JSON.parse(y))}const v=(h=n.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),g=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");v&&g&&g.length>1&&(c=parseInt(g[1])),n.isMaybeSingle&&Array.isArray(l)&&(l.length>1?(o={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{const v=await i.text();try{o=JSON.parse(v),Array.isArray(o)&&i.status===404&&(l=[],o=null,u=200,d="OK")}catch{i.status===404&&v===""?(u=204,d="No Content"):o={message:v}}if(o&&n.shouldThrowOnError)throw new VL(o)}return{error:o,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let l="",c="",u="";const d=i==null?void 0:i.cause;if(d){var h,f,p,v;const b=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",w=(f=d==null?void 0:d.code)!==null&&f!==void 0?f:"";l=`${(p=i==null?void 0:i.name)!==null&&p!==void 0?p:"FetchError"}: ${i==null?void 0:i.message}`,l+=`
434
435Caused by: ${(v=d==null?void 0:d.name)!==null&&v!==void 0?v:"Error"}: ${b}`,w&&(l+=` (${w})`),d!=null&&d.stack&&(l+=`
436${d.stack}`)}else{var g;l=(g=i==null?void 0:i.stack)!==null&&g!==void 0?g:""}const y=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
436)),s.then(e,t)}returns(){return this}overrideTypes(){return this}},zL=class extends BL{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const l=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const Aw=new RegExp("[,()]");var Wi=class extends zL{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Aw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&Aw.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${s}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([t,n])=>
436n!==void 0).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},HL=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},s=n?"HEAD":"GET";let i=!1;const o=(e??"*").split("").map(u=>/\s/.test(u)&&!i?"":(u==='"'&&(i=!i),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",o),r&&c.append("Prefer",`count=${r}`),new Wi({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(t&&o.append("Prefer",`count=${t}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);i.searchParams.set("columns",c.join(","))}}return new Wi({method:s,url:i,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:s=!0}={}){var i;const o="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);l.searchParams.set("columns",d.join(","))}}return new Wi({method:o,url:l,headers:c,schema:this.schema,body:e,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:s,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new Wi({method:r,url:s,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new Wi({method:n,url:r,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Tl(e){"@babel/helpers - typeof";return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function WL(e,t){if(Tl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qL(e){var t=WL(e,"string");return Tl(t)=="symbol"?t:t+""}function KL(e,t,n){return(t=qL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(n),!0).forEach(function(r){KL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var GL=class dC{constructor(t,{headers:n={},schema:r,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=o;const l=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(c,u)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),i),f=u==null?void 0:u.signal;if(f){if(f.aborted)return clearTimeout(h),l(c,u);const p=()=>{clearTimeout(h),d.abort()};return f.addEventListener("abort",p,{once:!0}),l(c,Ic(Ic({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(h),f.removeEventListener("abort",p)})}return l(c,Ic(Ic({},u),{},{signal:d.signal})).finally(()=>
436clearTimeout(h))}:this.fetch=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new HL(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new dC(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){var o;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(d)),h=r&&Object.values(n).some(d);h?(l="POST",u=n):r||s?(l=r?"HEAD":"GET",Object.entries(n).filter(([p,v])=>v!==void 0).map(([p,v])=>[p,Array.isArray(v)?`{${v.join(",")}}`:`${v}`]).forEach(([p,v])=>{c.searchParams.append(p,v)})):(l="POST",u=n);const f=new Headers(this.headers);return h?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new Wi({method:l,url:c,headers:f,schema:this.schemaName,body:u,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class YL{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const s=r.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
437import ws from "ws"
438new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
439
440Suggested solution: ${t.workaround}`),new Error(n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const JL="2.101.1",QL=`realtime-js/${JL}`,XL="1.0.0",hC="2.0.0",ZL=hC,e5=1e4,t5=100,Zr={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},fC={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},mm={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class n5{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var n,r;const s=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(t,n,r){var s,i;const o=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(i=t.join_ref)!==null&&i!==void 0?i:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+h.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let v=new DataView(p),g=0;v.setUint8(g++,this.KINDS.userBroadcastPush),v.setUint8(g++,c.length),v.setUint8(g++,l.length),v.setUint8(g++,o.length),v.setUint8(g++,u.length),v.setUint8(g++,h.length),v.setUint8(g++,n),Array.from(c,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(l,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(o,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(u,b=>v.setUint8(g++,b.charCodeAt(0))),Array.from(h,b=>v.setUint8(g++,b.charCodeAt(0)));var y=new Uint8Array(p.byteLength+r.byteLength);return y.set(new Uint8Array(p),0),y.set(new Uint8Array(r),p.byteLength),y.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[s,i,o,l,c]=r;
440return n({join_ref:s,ref:i,topic:o,event:l,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),s=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,s)}}_decodeUserBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2),o=n.getUint8(3),l=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+s));c=c+s;const d=r.decode(t.slice(c,c+i));c=c+i;const h=r.decode(t.slice(c,c+o));c=c+o;const f=t.slice(c,t.byteLength),p=l===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,v={type:this.BROADCAST_EVENT,event:d,payload:p};return o>0&&(v.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:v}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}var Ce;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(Ce||(Ce={}));const Dw=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((i,o)=>(i[o]=r5(o,e,t,s),i),{}):{}},r5=(e,t,n,r)=>{const s=t.find(l=>
440l.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?pC(i,o):gm(o)},pC=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return a5(t,n)}switch(e){case Ce.bool:return s5(t);case Ce.float4:case Ce.float8:case Ce.int2:case Ce.int4:case Ce.int8:case Ce.numeric:case Ce.oid:return i5(t);case Ce.json:case Ce.jsonb:return o5(t);case Ce.timestamp:return l5(t);case Ce.abstime:case Ce.date:case Ce.daterange:case Ce.int4range:case Ce.int8range:case Ce.money:case Ce.reltime:case Ce.text:case Ce.time:case Ce.timestamptz:case Ce.timetz:case Ce.tsrange:case Ce.tstzrange:return gm(t);default:return gm(t)}},gm=e=>e,s5=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},i5=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},o5=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},a5=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let i;const o=e.slice(1,n);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(l=>pC(t,l))}return e},l5=e=>typeof e=="string"?e.replace(" ","T"):e,mC=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};var Ja=e=>typeof e=="function"?e:function(){return e},c5=typeof self<"u"?self:null,qi=typeof window<"u"?window:null,z
vendor: 9,230 bytes, line 440
440n=c5||qi||globalThis,u5="2.0.0",d5=1e4,h5=1e3,Kn={connecting:0,open:1,closing:2,closed:3},Pt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},gr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},vm={longpoll:"longpoll",websocket:"websocket"},f5={complete:4},ym="base64url.bearer.phx.",Lc=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(r=>r.status===e).forEach(r=>r.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},gC=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},p5=class{constructor(e,t,n){this.state=Pt.closed,this.topic=e,this.params=Ja(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Lc(this,gr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new gC(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Pt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=Pt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=Pt.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=Pt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Lc(this,gr.leave,Ja({}),this.timeout).send(),this.state=Pt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(gr.reply,(r,s)=>{this.trigger(this.replyEventName(s),r)})}join(e=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Pt.closed,this.bindings=[]}onClose(e){this.on(gr.close,e)}onError(e){return this.on(gr.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>!(n.event===e&&(typeof t>"u"||t===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Lc(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Pt.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(gr.close,"leave")},n=new Lc(this,gr.leave,Ja({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}filterBindings(e,t,n){return!0}isMember(e,t,n,r){return this.topic!==e?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Pt.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let s=this.onMessage(e,t,n,r);if(t&&!s)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter(o=>o.event===e&&this.filterBindings(o,t,n));for(let o=0;o<i.length;o++)i[o].callback(s,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===Pt.closed}isErrored(){return this.state===Pt.errored}isJoined(){return this.state===Pt.joined}isJoining(){return this.state===Pt.joining}isLeaving(){return this.state===Pt.leaving}},ad=class{static request(e,t,n,r,s,i,o){if(zn.XDomainRequest){let l=new zn.XDomainRequest;return this.xdomainRequest(l,e,t,r,s,i,o)}else if(zn.XMLHttpRequest){let l=new zn.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,s,i,o)}else{if(zn.fetch&&zn.AbortController)return this.fetchRequest(e,t,n,r,s,i,o);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(e,t,n,r,s,i,o){let l={method:e,headers:n,body:r},c=null;return s&&(c=new AbortController,setTimeout(()=>c.abort(),s),l.signal=c.signal),zn.fetch(t,l).then(u=>u.text()).then(u=>this.parseJSON(u)).then(u=>o&&o(u)).catch(u=>{u.name==="AbortError"&&i?i():o&&o(null)}),c}static xdomainRequest(e,t,n,r,s,i,o){return e.timeout=s,e.open(t,n),e.onload=()=>{let l=this.parseJSON(e.responseText);o&&o(l)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,s,i,o,l){e.open(t,n,!0),e.timeout=i;for(let[c,u]of Object.entries(r))e.setRequestHeader(c,u);return e.onerror=()=>l&&l(null),e.onreadystatechange=()=>{if(e.readyState===f5.complete&&l){let c=this.parseJSON(e.responseText);l(c)}},o&&(e.ontimeout=o),e.send(s),e}static parseJSON(e){if(!e||e==="")return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let s=t?`${t}[${r}]`:r,i=e[r];typeof i=="object"?n.push(this.serialize(i,s)):n.push(encodeURIComponent(s)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(Object.keys(t).length===0)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},m5=e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let s=0;s<r;s++)t+=String.fromCharCode(n[s]);return btoa(t)},Di=class{constructor(e,t){t&&t.length===2&&t[1].startsWith(ym)&&(this.authToken=atob(t[1].slice(ym.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=Kn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+vm.websocket),"$1/"+vm.longpoll)}endpointURL(){return ad.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=Kn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Kn.open||this.readyState===Kn.connecting}poll(){const e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),t=>{if(t){var{status:n,token:r,messages:s}=t;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:s.forEach(i=>{setTimeout(()=>this.onmessage({data:i}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Kn.open,this.onopen({}),this.poll();break;
440case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(e){typeof e!="string"&&(e=m5(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e){this.awaitingBatchAck=!0,this.ajax("POST",{"Content-Type":"application/x-ndjson"},e.join(`
441`),()=>this.onerror("timeout"),t=>{this.awaitingBatchAck=!1,!t||t.status!==200?(this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(e,t,n){for(let s of this.reqs)s.abort();this.readyState=Kn.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,s){let i,o=()=>{this.reqs.delete(i),r()};i=ad.request(e,this.endpointURL(),t,n,this.timeout,o,l=>{this.reqs.delete(i),this.isActive()&&s(l)}),this.reqs.add(i)}},g5=class Oa{constructor(t,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,s=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Oa.syncState(this.state,s,i,o),this.pendingDiffs.forEach(c=>{this.state=Oa.syncDiff(this.state,c,i,o)}),this.pendingDiffs=[],l()}),this.channel.on(r.diff,s=>{let{onJoin:i,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Oa.syncDiff(this.state,s,i,o),l())})}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}list(t){return Oa.list(this.state,t)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(t,n,r,s){let i=this.clone(t),o={},l={};return this.map(i,(c,u)=>{n[c]||(l[c]=u)}),this.map(n,(c,u)=>{let d=i[c];if(d){let h=u.metas.map(g=>g.phx_ref),f=d.metas.map(g=>g.phx_ref),p=u.metas.filter(g=>f.indexOf(g.phx_ref)<0),v=d.metas.filter(g=>h.indexOf(g.phx_ref)<0);p.length>0&&(o[c]=u,o[c].metas=p),v.length>0&&(l[c]=this.clone(d),l[c].metas=v)}else o[c]=u}),this.syncDiff(i,{joins:o,leaves:l},r,s)}static syncDiff(t,n,r,s){let{joins:i,leaves:o}=this.clone(n);return r||(r=function(){}),s||(s=function(){}),this.map(i,(l,c)=>{let u=t[l];if(t[l]=this.clone(c),u){let d=t[l].metas.map(f=>f.phx_ref),h=u.metas.filter(f=>d.indexOf(f.phx_ref)<0);t[l].metas.unshift(...h)}r(l,u,c)}),this.map(o,(l,c)=>{let u=t[l];if(!u)return;let d=c.metas.map(h=>h.phx_ref);u.metas=u.metas.filter(h=>d.indexOf(h.phx_ref)<0),s(l,u,c),u.metas.length===0&&delete t[l]}),t}static list(t,n){return n||(n=function(r,s){return s}),this.map(t,(r,s)=>n(r,s))}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static clone(t){return JSON.parse(JSON.stringify(t))}},$c={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,s,i,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:s,event:i,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:s,payload:i}=e,o=this.META_LENGTH+t.length+n.length+s.length+r.length,l=new ArrayBuffer(this.HEADER_LENGTH+o),c=new DataView(l),u=0;c.setUint8(u++,this.KINDS.push),c.setUint8(u++,t.length),c.setUint8(u++,n.length),c.setUint8(u++,s.length),c.setUint8(u++,r.length),Array.from(t,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(n,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(s,h=>c.setUint8(u++,h.charCodeAt(0))),Array.from(r,h=>c.setUint8(u++,h.charCodeAt(0)));var d=new Uint8Array(l.byteLength+i.byteLength);return d.set(new Uint8Array(l),0),d.set(new Uint8Array(i),l.byteLength),d.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}}
vendor: 8,419 bytes, line 441
441,decodePush(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,l=n.decode(e.slice(o,o+r));o=o+r;let c=n.decode(e.slice(o,o+s));o=o+s;let u=n.decode(e.slice(o,o+i));o=o+i;let d=e.slice(o,e.byteLength);return{join_ref:l,ref:null,topic:c,event:u,payload:d}},decodeReply(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=t.getUint8(3),o=t.getUint8(4),l=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(l,l+r));l=l+r;let u=n.decode(e.slice(l,l+s));l=l+s;let d=n.decode(e.slice(l,l+i));l=l+i;let h=n.decode(e.slice(l,l+o));l=l+o;let f=e.slice(l,e.byteLength),p={status:h,response:f};return{join_ref:c,ref:u,topic:d,event:gr.reply,payload:p}},decodeBroadcast(e,t,n){let r=t.getUint8(1),s=t.getUint8(2),i=this.HEADER_LENGTH+2,o=n.decode(e.slice(i,i+r));i=i+r;let l=n.decode(e.slice(i,i+s));i=i+s;let c=e.slice(i,e.byteLength);return{join_ref:null,ref:null,topic:o,event:l,payload:c}}},v5=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||d5,this.transport=t.transport||zn.WebSocket||Di,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||zn&&zn.sessionStorage,this.establishedConnections=0,this.defaultEncoder=$c.encode.bind($c),this.defaultDecoder=$c.decode.bind($c),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==Di?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;qi&&qi.addEventListener&&(qi.addEventListener("pagehide",r=>{this.conn&&(this.disconnect(),n=this.connectClock)}),qi.addEventListener("pageshow",r=>{n===this.connectClock&&(n=null,this.connect())}),qi.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=t.autoSendHeartbeat??!0,this.heartbeatCallback=t.heartbeatCallback??(()=>{}),this.rejoinAfterMs=r=>t.rejoinAfterMs?t.rejoinAfterMs(r):[1e3,2e3,5e3][r-1]||1e4,this.reconnectAfterMs=r=>t.reconnectAfterMs?t.reconnectAfterMs(r):[10,50,100,150,200,250,500,1e3,2e3][r-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(r,s,i)=>{console.log(`${r}: ${s}`,i)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=Ja(t.params||{}),this.endPoint=`${e}/${vm.websocket}`,this.vsn=t.vsn||u5,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new gC(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{t.beforeReconnect&&await t.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return Di}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=ad.appendParams(ad.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return e.charAt(0)!=="/"?e:e.charAt(1)==="/"?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Ja(e)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==Di?this.connectWithFallback(Di,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return this.logger!==null}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}onHeartbeat(e){this.heartbeatCallback=e}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(s=>{s.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){switch(e){case Di:return"LongPoll";default:return e.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let e;this.authToken&&(e=["phoenix",`${ym}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,s,i,o=this.transportName(e),l=c=>{this.log("transport",`falling back to ${o}...`,c),this.off([s,i]),r=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return l("memorized");this.fallbackTimer=setTimeout(l,t),i=this.onError(c=>{this.log("transport","error",c),r&&!n&&(clearTimeout(this.fallbackTimer),l(c))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let c=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${c}`,"true"),this.log("transport",`established ${c} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(l,t),this.ping(c=>{this.log("transport","connected to primary after",c),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(e){this.log("error","error in heartbeat callback",e)}this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),h5,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();const r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(n===5||!e.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(n===5||e.readyState===Kn.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",e)}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",e,t,n),(t===this.transport||n>0)&&this.triggerChanError()}
441triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(gr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case Kn.connecting:return"connecting";case Kn.open:return"open";case Kn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([n])=>e.indexOf(n)===-1)}channel(e,t={}){let n=new p5(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:s,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${s})`,r)}this.isConnected()?this.encode(e,t=>this.conn.send(t)):this.sendBuffer.push(()=>this.encode(e,t=>this.conn.send(t)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(e){this.log("error","error in heartbeat callback",e)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(e){this.log("error","error in heartbeat callback",e)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,t=>{let{topic:n,event:r,payload:s,ref:i,join_ref:o}=t;if(i&&i===this.pendingHeartbeatRef){const l=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(s.status==="ok"?"ok":"error",l)}catch(c){this.log("error","error in heartbeat callback",c)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${s.status||""} ${n} ${r} ${i&&"("+i+")"||""}`.trim(),s);for(let l=0;l<this.channels.length;l++){const c=this.channels[l];c.isMember(n,r,s,o)&&c.trigger(r,s,i,o)}this.triggerStateCallbacks("message",t)})}triggerStateCallbacks(e,...t){try{this.stateChangeCallbacks[e].forEach(([n,r])=>{try{r(...t)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}leaveOpenTopic(e){let t=this.channels.find(n=>n.topic===e&&(n.isJoined()||n.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}};class Qa{constructor(t,n){const r=x5(n);this.presence=new g5(t.getChannel(),r),this.presence.onJoin((s,i,o)=>{const l=Qa.onJoinPayload(s,i,o);t.getChannel().trigger("presence",l)}),this.presence.onLeave((s,i,o)=>{const l=Qa.onLeavePayload(s,i,o);t.getChannel().trigger("presence",l)}),this.presence.onSync(()=>{t.getChannel().trigger("presence",{event:"sync"})})}get state(){return Qa.transformState(this.presence.state)}static transformState(t){return t=y5(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return n[r]=pu(s),n},{})}static onJoinPayload(t,n,r){const s=Ow(n),i=pu(r);return{event:"join",key:t,currentPresences:s,newPresences:i}}static onLeavePayload(t,n,r){const s=Ow(n),i=pu(r);return{event:"leave",key:t,currentPresences:s,leftPresences:i}}}function pu(e){return e.metas.map(t=>(t.presence_ref=t.phx_ref,delete t.phx_ref,delete t.phx_ref_prev,t))}function y5(e){return JSON.parse(JSON.stringify(e))}function x5(e){return(e==null?void 0:e.events)&&{events:e.events}}function Ow(e){return e!=null&&e.metas?pu(e):[]}var Iw;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Iw||(Iw={}));class w5{get state(){return this.presenceAdapter.state}constructor(t,n){this.channel=t,this.presenceAdapter=new Qa(this.channel.channelAdapter,n)}}class b5{constructor(t,n,r){const s=S5(r);this.channel=t.getSocket().channel(n,s),this.socket=t}get state(){return this.channel.state}set state(t){this.channel.state=t}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(t,n){return this.channel.on(t,n)}off(t,n){this.channel.off(t,n)}subscribe(t){return this.channel.join(t)}unsubscribe(t){return this.channel.leave(t)}teardown(){this.channel.teardown()}onClose(t){this.channel.onClose(t)}onError(t){return this.channel.onError(t)}push(t,n,r){let s;try{s=this.channel.push(t,n,r)}catch{throw`tried to push '${t}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`}if(this.channel.pushBuffer.length>t5){const i=this.channel.pushBuffer.shift();i.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${i.event}`,i.payload())}return s}updateJoinPayload(t){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),t)}canPush(){return this.socket.isConnected()&&this.state===Zr.joined}isJoined(){return this.state===Zr.joined}isJoining(){return this.state===Zr.joining}isClosed(){return this.state===Zr.closed}isLeaving(){return this.state===Zr.leaving}updateFilterBindings(t){this.channel.filterBindings=t}updatePayloadTransform(t){this.channel.onMessage=t}getChannel(){return this.channel}}function S5(e){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},e.config)}}var Lw;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Lw||(Lw={}));var lo;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(lo||(lo={}));var vr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(vr||(vr={}));class Xa{get state(){return this.channelAdapter.state}set state(t){this.channelAdapter.state=t}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(t,n={config:{}},r){var s,i;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new b5(this.socket.socketAdapter,t,this.params),this.presence=new w5(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=mC(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,s,i;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:o,presence:l,private:c}}=this.params,u=(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[lo.PRESENCE]&&this.bindings[lo.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,h={},f={broadcast:o,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(p=>{t==null||t(vr.CHANNEL_ERROR,p)}),this._onClose(()=>t==null?void 0:t(vr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},h)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:p})=>{if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(vr.SUBSCRIBED);return}this._updatePostgresBindings(p,t)}
441).receive("error",p=>{this.state=Zr.errored,t==null||t(vr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(vr.TIMED_OUT)})}return this}_updatePostgresBindings(t,n){var r;const s=this.bindings.postgres_changes,i=(r=s==null?void 0:s.length)!==null&&r!==void 0?r:0,o=[];for(let l=0;l<i;l++){const c=s[l],{filter:{event:u,schema:d,table:h,filter:f}}=c,p=t&&t[l];if(p&&p.event===u&&Xa.isFilterValueEqual(p.schema,d)&&Xa.isFilterValueEqual(p.table,h)&&Xa.isFilterValueEqual(p.filter,f))o.push(Object.assign(Object.assign({},c),{id:p.id}));else{this.unsubscribe(),this.state=Zr.errored,n==null||n(vr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=o,this.state!=Zr.errored&&n&&n(vr.SUBSCRIBED)}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){const s=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),i=t===lo.PRESENCE||t===lo.POSTGRES_CHANGES;if(s&&i)throw this.socket.log("channel",`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${t}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(t,n,r)}async httpSend(t,n,r={}){var s;if(n==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=r.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,s;if(!this.channelAdapter.canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
441in the future. Please use httpSend() explicitly for REST delivery.");const{event:i,payload:o}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,l,c;const u=this.channelAdapter.push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&i("ok"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.channelAdapter.updateJoinPayload(t)}async unsubscribe(t=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(t).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(t,n,r){const s=new AbortController,i=setTimeout(()=>s.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:s.signal}));return clearTimeout(i),o}_on(t,n,r){const s=t.toLocaleLowerCase(),i=this.channelAdapter.on(t,r),o={type:s,filter:n,callback:r,ref:i};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this._updateFilterMessage(),this}_onClose(t){this.channelAdapter.onClose(t)}_onError(t){this.channelAdapter.onError(t)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((t,n,r)=>{var s,i,o,l,c,u,d;const h=t.event.toLocaleLowerCase();if(this._notThisChannelEvent(h,r))return!1;const f=(s=this.bindings[h])===null||s===void 0?void 0:s.find(p=>p.ref===t.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(h))if("id"in f){const p=f.id,v=(i=f.filter)===null||i===void 0?void 0:i.event;return p&&((o=n.ids)===null||o===void 0?void 0:o.includes(p))&&(v==="*"||(v==null?void 0:v.toLocaleLowerCase())===((l=n.data)===null||l===void 0?void 0:l.type.toLocaleLowerCase()))}else{const p=(u=(c=f==null?void 0:f.filter)===null||c===void 0?void 0:c.event)===null||u===void 0?void 0:u.toLocaleLowerCase();return p==="*"||p===((d=n==null?void 0:n.event)===null||d===void 0?void 0:d.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===h})}_notThisChannelEvent(t,n){const{close:r,error:s,leave:i,join:o}=fC;return n&&[r,s,i,o].includes(t)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((t,n,r)=>{if(typeof n=="object"&&"ids"in n){const s=n.data,{schema:i,table:o,commit_timestamp:l,type:c,errors:u}=s;return Object.assign(Object.assign({},{schema:i,table:o,commit_timestamp:l,eventType:c,new:{},old:{},errors:u}),this._getPayloadRecords(s))}return n})}copyBindings(t){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in t.bindings)for(const r of t.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Dw(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Dw(t.columns,t.old_record)),n}}class j5{constructor(t,n){this.socket=new v5(t,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(t){this.socket.heartbeatCallback=t}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(t,n,r,s=1e4){return new Promise(i=>{setTimeout(()=>i("timeout"),s),this.socket.disconnect(()=>{t(),i("ok")},n,r)})}push(t){this.socket.push(t)}log(t,n,r){this.socket.log(t,n,r)}makeRef(){return this.socket.makeRef()}onOpen(t){this.socket.onOpen(t)}onClose(t){this.socket.onClose(t)}onError(t){this.socket.onError(t)}onMessage(t){this.socket.onMessage(t)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==mm.connecting}isDisconnecting(){return this.socket.connectionState()==mm.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const k5={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},C5=[1e3,2e3,5e3,1e4],N5=1e4,E5=`
442  addEventListener("message", (e) => {
443    if (e.data.event === "start") {
444      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
445    }
446  });`;class T5{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(t,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
446,this.ref=0,this.serializer=new n5,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._resolveFetch=i=>i?(...o)=>i(...o):(...o)=>fetch(...o),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const s=this._initializeOptions(n);this.socketAdapter=new j5(t,s),this.httpEndpoint=mC(t),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(t){const n=t.message;throw n.includes("Node.js")?new Error(`${n}
447
448To use Realtime in Node.js, you need to provide a WebSocket implementation:
449
450Option 1: Use Node.js 22+ which has native WebSocket support
451Option 2: Install and provide the "ws" package:
452
453  npm install ws
454
455  import ws from "ws"
456  const client = new RealtimeClient(url, {
457    ...options,
458    transport: ws
459  })`):new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(t,n){return this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},t,n)}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return n==="ok"&&t.teardown(),this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=this.channels.map(async r=>{const s=await r.unsubscribe();return r.teardown(),s}),n=await Promise.all(t);return this.disconnect(),n}log(t,n,r){this.socketAdapter.log(t,n,r)}connectionState(){return this.socketAdapter.connectionState()||mm.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(t,n={config:{}}){const r=`realtime:${t}`,s=this.getChannels().find(i=>i.topic===r);if(s)return s;{const i=new Xa(`realtime:${t}`,n,this);return this.channels.push(i),i}}push(t){this.socketAdapter.push(t)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(t){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(t)}_makeRef(){return this.socketAdapter.makeRef()}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(s=>{const i={access_token:n,version:QL};n&&s.updateJoinPayload(i),s.joinedOnce&&s.channelAdapter.isJoined()&&s.channelAdapter.push(fC.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(t=>{t.ref&&t.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(t){return(n,r)=>{n=="sent"&&this._setAuthSafely(),t&&t(n,r)}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([E5],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(t){var n,r,s,i,o,l,c,u,d;this.worker=(n=t==null?void 0:t.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=t==null?void 0:t.accessToken)!==null&&r!==void 0?r:null;const h={};
459h.timeout=(s=t==null?void 0:t.timeout)!==null&&s!==void 0?s:e5,h.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:k5.HEARTBEAT_INTERVAL,h.transport=(o=t==null?void 0:t.transport)!==null&&o!==void 0?o:YL.getWebSocketConstructor(),h.params=t==null?void 0:t.params,h.logger=t==null?void 0:t.logger,h.heartbeatCallback=this._wrapHeartbeatCallback(t==null?void 0:t.heartbeatCallback),h.reconnectAfterMs=(l=t==null?void 0:t.reconnectAfterMs)!==null&&l!==void 0?l:g=>C5[g-1]||N5;let f,p;const v=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:ZL;switch(v){case XL:f=(g,y)=>y(JSON.stringify(g)),p=(g,y)=>y(JSON.parse(g));break;case hC:f=this.serializer.encode.bind(this.serializer),p=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${h.vsn}`)}if(h.vsn=v,h.encode=(u=t==null?void 0:t.encode)!==null&&u!==void 0?u:f,h.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:p,h.beforeReconnect=this._reconnectAuth.bind(this),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,h.params=Object.assign(Object.assign({},h.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl,h.autoSendHeartbeat=!this.worker}return h}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var _l=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function _5(e,t,n){const r=new URL(t,e);if(n)for(const[s,i]of Object.entries(n))i!==void 0&&r.searchParams.set(s,i);return r.toString()}async function P5(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function R5(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:s,body:i,headers:o}){const l=_5(e.baseUrl,r,s),c=await P5(e.auth),u=await t(l,{method:n,headers:{...i?{"Content-Type":"application/json"}:{},...c,...o},body:i?JSON.stringify(i):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),f=h&&d?JSON.parse(d):d;if(!u.ok){const p=h?f:void 0,v=p==null?void 0:p.error;throw new _l((v==null?void 0:v.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:v==null?void 0:v.type,icebergCode:v==null?void 0:v.code,details:p})}return{status:u.status,headers:u.headers,data:f}}}}function Fc(e){return e.join("�")}var A5=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Fc(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Fc(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Fc(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Fc(e.namespace)}`}),!0}catch(t){if(t instanceof _l&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof _l&&n.status===409)return;throw n}}};function Oi(e){return e.join("�")}var M5=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Oi(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof _l&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof _l&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},D5=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=R5({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new A5(this.client,t),this.tableOps=new M5(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
459async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},lh=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function ch(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var xm=class extends lh{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},vC=class extends lh{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const O5=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),I5=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},wm=e=>{if(Array.isArray(e))return e.map(n=>wm(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const s=n.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));t[s]=wm(r)}),t},L5=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Pl(e){"@babel/helpers - typeof";return Pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pl(e)}function $5(e,t){if(Pl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Pl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function F5(e){var t=$5(e,"string");return Pl(t)=="symbol"?t:t+""}function U5(e,t,n){return(t=F5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$w(Object(n),!0).forEach(function(r){U5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$w(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Fw=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},V5=async(e,t,n,r)=>{if(e!==null&&typeof e=="object"&&typeof e.json=="function"){const s=e;let i=parseInt(s.status,10);Number.isFinite(i)||(i=500),s.json().then(o=>{const l=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";t(new xm(Fw(o),i,l,r))}).catch(()=>{const o=i+"";t(new xm(s.statusText||`HTTP ${i} error`,i,o,r))})}else t(new vC(Fw(e),e,r))},B5=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?se(se({},s),n):(I5(r)?(s.headers=se({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(r)):s.body=r,t!=null&&t.duplex&&(s.duplex=t.duplex),se(se({},s),n))};async function Ca(e,t,n,r,s,i,o){return new Promise((l,c)=>{e(n,B5(t,r,s,i)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(o==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>V5(u,c,r,o))})}function yC(e="storage"){return{get:async(t,n,r,s)=>
459Ca(t,"GET",n,r,s,void 0,e),post:async(t,n,r,s,i)=>Ca(t,"POST",n,s,i,r,e),put:async(t,n,r,s,i)=>Ca(t,"PUT",n,s,i,r,e),head:async(t,n,r,s)=>Ca(t,"HEAD",n,se(se({},r),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,n,r,s,i)=>Ca(t,"DELETE",n,s,i,r,e)}}const z5=yC("storage"),{get:Rl,post:kn,put:bm,head:H5,remove:Dv}=z5,zt=yC("vectors");var aa=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=O5(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=se(se({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(ch(n))return{data:null,error:n};throw n}}},W5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ch(t))return{data:null,error:t};throw t}}};let xC;xC=Symbol.toStringTag;var q5=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[xC]="BlobDownloadBuilder",this.promise=null}asStream(){return new W5(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(ch(t))return{data:null,error:t};throw t}}};const K5={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Uw={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var G5=class extends aa{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var s=this;return s.handleOperation(async()=>{let i;const o=se(se({},Uw),r);let l=se(se({},s.headers),e==="POST"&&{"x-upsert":String(o.upsert)});const c=o.metadata;typeof Blob<"u"&&n instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),c&&i.append("metadata",s.encodeMetadata(c)),i.append("",n)):typeof FormData<"u"&&n instanceof FormData?(i=n,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),c&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(c))):(i=n,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),r!=null&&r.headers&&(l=se(se({},l),r.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?bm:kn)(s.fetch,`${s.url}/object/${d}`,i,se({headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var s=this;const i=s._removeEmptyFolders(e),o=s._getFinalPath(i),l=new URL(s.url+`/object/upload/sign/${o}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=se(se({},Uw),r),d=se(se({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:i,fullPath:(await bm(s.fetch,l.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const s=se({},n.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const i=await kn(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(n.url+i.url),l=o.searchParams.get("token");if(!l)throw new lh("No token returned by API");return{signedUrl:o.toString(),path:e,token:l}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await kn(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
459stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await kn(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let s=r._getFinalPath(e);const i=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let o=await kn(r.fetch,`${r.url}/object/sign/${s}`,se({expiresIn:t},i?{transform:n.transform}:{}),{headers:r.headers});const l=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"",c=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${r.url}${c}${l}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const s=await kn(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return s.map(o=>se(se({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${i}`):null}))})}download(e,t,n){const r=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(e),l=()=>Rl(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0},n);return new q5(l,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>wm(await Rl(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await H5(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(s){if(t.shouldThrowOnError)throw s;if(ch(s)){var r;const i=s instanceof xm?s.status:s instanceof vC?(r=s.originalError)===null||r===void 0?void 0:r.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&r.push(s);const i=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});o!==""&&r.push(o);let l=r.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${n}${l}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Dv(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const s=se(se(se({},K5),t),{},{prefix:e||""});return await kn(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=se({},e);return await kn(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const Y5="2.101.1",nc={"X-Client-Info":`storage-js/${Y5}`};var J5=class extends aa{constructor(e,t={},n,r){const s=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const i=s.href.replace(/\/$/,""),o=se(se({},nc),t);super(i,o,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Rl(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Rl(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await kn(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await bm(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await kn(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dv(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},Q5=class extends aa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=se(se({},nc),t);super(r,s,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await kn(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),s=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Rl(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Dv(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!L5(e))throw new lh("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new D5({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}
459),r=this.shouldThrowOnError;return new Proxy(n,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...l)=>{try{return{data:await o.apply(s,l),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},X5=class extends aa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=se(se({},nc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await zt.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await zt.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},Z5=class extends aa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=se(se({},nc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},e4=class extends aa{constructor(e,t={},n){const r=e.replace(/\/$/,""),s=se(se({},nc),{},{"Content-Type":"application/json"},t);super(r,s,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await zt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},t4=class extends e4{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new n4(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},n4=class extends X5{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new r4(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}
459,r4=class extends Z5{constructor(e,t,n,r,s){super(e,t,s),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,se(se({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},s4=class extends J5{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new G5(this.url,this.headers,e,this.fetch)}get vectors(){return new t4(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new Q5(this.url+"/iceberg",this.headers,this.fetch)}};function uh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}const wC="2.101.1",Ki=30*1e3,Sm=3,Sf=Sm*Ki,i4="http://localhost:9999",o4="supabase.auth.token",a4={"X-Client-Info":`gotrue-js/${wC}`},jm="X-Supabase-Api-Version",bC={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},l4=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,c4=10*60*1e3;class Al extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function Z(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class u4 extends Al{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function d4(e){return Z(e)&&e.name==="AuthApiError"}class Ks extends Al{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Dr extends Al{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Ut extends Dr{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jf(e){return Z(e)&&e.name==="AuthSessionMissingError"}class Ii extends Dr{constructor(){super("Auth session or user missing","AuthInvalidToken
459ResponseError",500,void 0)}}class Uc extends Dr{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Vc extends Dr{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function h4(e){return Z(e)&&e.name==="AuthImplicitGrantRedirectError"}class Vw extends Dr{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class f4 extends Dr{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class km extends Dr{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function kf(e){return Z(e)&&e.name==="AuthRetryableFetchError"}class Bw extends Dr{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Cm extends Dr{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const ld="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),zw=` 	
460\r=`.split(""),p4=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<zw.length;t+=1)e[zw[t].charCodeAt(0)]=-2;for(let t=0;t<ld.length;t+=1)e[ld[t].charCodeAt(0)]=t;return e})();function Hw(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(ld[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(ld[r]),t.queuedBits-=6}}function SC(e,t,n){const r=p4[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Ww(e){const t=[],n=o=>{t.push(String.fromCodePoint(o))},r={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{v4(o,r,n)};for(let o=0;o<e.length;o+=1)SC(e.charCodeAt(o),s,i);return t.join("")}function m4(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function g4(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const s=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|s)+65536,n+=1}m4(r,t)}}function v4(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function bo(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)SC(e.charCodeAt(s),n,r);return new Uint8Array(t)}function y4(e){const t=[];return g4(e,n=>t.push(n)),new Uint8Array(t)}function Xs(e){const t=[],n={queue:0,queuedBits:0},r=s=>{t.push(s)};return e.forEach(s=>Hw(s,n,r)),Hw(null,n,r),t.join("")}function x4(e){return Math.round(Date.now()/1e3)+e}function w4(){return Symbol("auth-callback")}const lt=()=>typeof window<"u"&&typeof document<"u",Ls={tested:!1,writable:!1},jC=()=>{if(!lt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ls.tested)return Ls.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ls.tested=!0,Ls.writable=!0}catch{Ls.tested=!0,Ls.writable=!1}return Ls.writable};function b4(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
460h((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const kC=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),S4=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Gi=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},$s=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},at=async(e,t)=>{await e.removeItem(t)};class dh{constructor(){this.promise=new dh.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}dh.promiseConstructor=Promise;function Bc(e){const t=e.split(".");if(t.length!==3)throw new Cm("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!l4.test(t[r]))throw new Cm("JWT not in base64url format");return{header:JSON.parse(Ww(t[0])),payload:JSON.parse(Ww(t[1])),signature:bo(t[2]),raw:{header:t[0],payload:t[1]}}}async function j4(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function k4(e,t){return new Promise((r,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await e(i);if(!t(i,null,o)){r(o);return}}catch(o){if(!t(i,o)){s(o);return}}})()})}function C4(e){return("0"+e.toString(16)).substr(-2)}function N4(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let s="";for(let i=0;i<56;i++)s+=n.charAt(Math.floor(Math.random()*r));return s}return crypto.getRandomValues(t),Array.from(t,C4).join("")}async function E4(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function T4(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await E4(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Li(e,t,n=!1){const r=N4();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Gi(e,`${t}-code-verifier`,s);const i=await T4(r);return[i,r===i?"plain":"s256"]}const _4=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function P4(e){const t=e.headers.get(jm);if(!t||!t.match(_4))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function R4(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function A4(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const M4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function $i(e){if(!M4.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Cf(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function D4(e,t){return new Proxy(e,{get:(n,r,s)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const i=r.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,s)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,s)}})}function qw(e){return JSON.parse(JSON.stringify(e))}const Hs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),O4=[502,503,504];async function Kw(e){var t;if(!S4(e))throw new km(Hs(e),0);if(O4.includes(e.status))throw new km(Hs(e),e.status);let n;try{n=await e.json()}catch(i){throw new Ks(Hs(i),i)}let r;const s=P4(e);if(s&&s.getTime()>=bC["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Bw(Hs(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Ut}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((i,o)=>
460i&&typeof o=="string",!0))throw new Bw(Hs(n),e.status,n.weak_password.reasons);throw new u4(Hs(n),e.status||500,r)}const I4=(e,t,n,r)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(r),Object.assign(Object.assign({},s),n))};async function re(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[jm]||(i[jm]=bC["2024-01-01"].name),r!=null&&r.jwt&&(i.Authorization=`Bearer ${r.jwt}`);const o=(s=r==null?void 0:r.query)!==null&&s!==void 0?s:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",c=await L4(e,t,n+l,{headers:i,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function L4(e,t,n,r,s,i){const o=I4(t,r,s,i);let l;try{l=await e(n,Object.assign({},o))}catch(c){throw console.error(c),new km(Hs(c),0)}if(l.ok||await Kw(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(c){await Kw(c)}}function xn(e){var t;let n=null;U4(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=x4(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Gw(e){const t=xn(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function es(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function $4(e){return{data:e,error:null}}function F4(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=uh(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},c=Object.assign({},o);return{data:{properties:l,user:c},error:null}}function Yw(e){return e}function U4(e){return e.access_token&&e.refresh_token&&e.expires_in}const Nf=["global","local","others"];class V4{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=kC(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(t,n=Nf[0]){if(Nf.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Nf.join(", ")}`);try{return await re(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Z(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await re(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:es})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=uh(t,["options"]),s=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(s.new_email=r==null?void 0:r.newEmail,delete s.newEmail),await re(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:F4,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Z(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await re(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:es})}catch(n){if(Z(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await re(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Yw});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>
4600&&(p.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(v.split(";")[1].split("=")[1]);u[`${y}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(Z(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){$i(t);try{return await re(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:es})}catch(n){if(Z(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){$i(t);try{return await re(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:es})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){$i(t);try{return await re(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:es})}catch(r){if(Z(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){$i(t.userId);try{const{data:n,error:r}=await re(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:n,error:r}}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _deleteFactor(t){$i(t.userId),$i(t.id);try{return{data:await re(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,s,i,o,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await re(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(i=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:Yw});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,p=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(v=>{const g=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(v.split(";")[1].split("=")[1]);u[`${y}Page`]=g}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(Z(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await re(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await re(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await re(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await re(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _listCustomProviders(t){try{const n={};return t!=null&&t.type&&(n.type=t.type),await re(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var s;return{data:{providers:(s=r==null?void 0:r.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(n){if(Z(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(t){try{return await re(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _getCustomProvider(t){try{return await re(this.fetch,"GET",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Z(n))return{data:null,error:n};throw n}}async _updateCustomProvider(t,n){try{return await re(this.fetch,"PUT",`${this.url}/admin/custom-providers/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Z(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(t){try{return await re(this.fetch,"DELET
460E",`${this.url}/admin/custom-providers/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Z(n))return{data:null,error:n};throw n}}}function Jw(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const Fn={debug:!!(globalThis&&jC()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class CC extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Qw extends CC{}async function B4(e,t,n){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;let s;t>0&&(s=setTimeout(()=>{r.abort(),Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t)),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){clearTimeout(s),Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Qw(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Fn.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null,"  "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),clearTimeout(s),await n()}})}catch(i){if(t>0&&clearTimeout(s),(i==null?void 0:i.name)==="AbortError"&&t>0){if(r.signal.aborted)return Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",e),console.warn(`@supabase/gotrue-js: Lock "${e}" was not released within ${t}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,{mode:"exclusive",steal:!0},async o=>{if(o){Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",e,o.name);try{return await n()}finally{Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",e,o.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await n()}));throw Fn.debug&&console.log("@supabase/gotrue-js: navigatorLock: lock was stolen by another request",e),new Qw(`Lock "${e}" was released because another request stole it`)}throw i}}function z4(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function NC(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function H4(e){return parseInt(e,16)}function W4(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function q4(e){var t;const{chainId:n,domain:r,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:f}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
461`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=NC(e.address),v=d?`${d}://${r}
461`:r,g=e.statement?`${e.statement}
462`:"",y=`${v} wants you to sign in with your Ethereum account:
463${p}
464
465${g}`;let b=`URI: ${h}
466Version: ${f}
467Chain ID: ${n}${o?`
468Nonce: ${o}`:""}
469Issued At: ${i.toISOString()}`;if(s&&(b+=`
470Expiration Time: ${s.toISOString()}`),l&&(b+=`
471Not Before: ${l.toISOString()}`),c&&(b+=`
472Request ID: ${c}`),u){let w=`
473Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);w+=`
474- ${x}`}b+=w}return`${y}
475${b}`}class Ke extends Error{constructor({message:t,code:n,cause:r,name:s}){var i;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(i=s??(r instanceof Error?r.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=n}}class cd extends Ke{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function K4({error:e,options:t}){var n,r,s;const{publicKey:i}=t;if(!i)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ke({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=i.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ke({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=i.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ke({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ke({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ke({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return i.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new Ke({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ke({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const o=window.location.hostname;if(EC(o)){if(i.rp.id!==o)return new Ke({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Ke({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function G4({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ke({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ke({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(EC(r)){if(n.rpId!==r)return new Ke({message:`The RP ID "${n.rpId}
475" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ke({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ke({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ke({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Y4{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const J4=new Y4;function Q4(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,s=uh(e,["challenge","user","excludeCredentials"]),i=bo(t).buffer,o=Object.assign(Object.assign({},n),{id:bo(n.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:i,user:o});if(r&&r.length>0){l.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:bo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function X4(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=uh(e,["challenge","allowCredentials"]),s=bo(t).buffer,i=Object.assign(Object.assign({},r),{challenge:s});if(n&&n.length>0){i.allowCredentials=new Array(n.length);for(let o=0;o<n.length;o++){const l=n[o];i.allowCredentials[o]=Object.assign(Object.assign({},l),{id:bo(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return i}function Z4(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:Xs(new Uint8Array(e.response.attestationObject)),clientDataJSON:Xs(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function e$(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Xs(new Uint8Array(s.authenticatorData)),clientDataJSON:Xs(new Uint8Array(s.clientDataJSON)),signature:Xs(new Uint8Array(s.signature)),userHandle:s.userHandle?Xs(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function EC(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Xw(){var e,t;return!!(lt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function t$(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cd("Browser returned unexpected credential type",t)}:{data:null,error:new cd("Empty credential response",t)}}catch(t){return{data:null,error:K4({error:t,options:e})}}}async function n$(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new cd("Browser returned unexpected credential type",t)}:{data:null,error:new cd("Empty credential response",t)}}
475catch(t){return{data:null,error:G4({error:t,options:e})}}}const r$={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},s$={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function ud(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),n=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),r={};for(const s of e)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))r[i]=o;else if(n(o))r[i]=o;else if(t(o)){const l=r[i];t(l)?r[i]=ud(l,o):r[i]=ud(o)}else r[i]=o}return r}function i$(e,t){return ud(r$,e,t||{})}function o$(e,t){return ud(s$,e,t||{})}class a${constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:s},i){var o;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!l)return{data:null,error:c};const u=s??J4.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:d}=l.webauthn.credential_options.publicKey;if(!d.name){const h=r;if(h)d.name=`${d.id}:${h}`;else{const p=(await this.client.getUser()).data.user,v=((o=p==null?void 0:p.user_metadata)===null||o===void 0?void 0:o.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";d.name=`${d.id}:${v}`}}d.displayName||(d.displayName=d.name)}switch(l.webauthn.type){case"create":{const d=i$(l.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:h,error:f}=await t$({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}case"request":{const d=o$(l.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:h,error:f}=await n$(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:f}}}}catch(l){return Z(l)?{data:null,error:l}:{data:null,error:new Ks("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Al("rpId is required for WebAuthn authentication")};try{if(!Xw())return{data:null,error:new Ks("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:s},{request:i});if(!o)return{data:null,error:l};const{webauthn:c}=o;return this._verify({factorId:t,challengeId:o.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(o){return Z(o)?{data:null,error:o}:{data:null,error:new Ks("Unexpected error in authenticate",o)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!n)return{data:null,error:new Al("rpId is required for WebAuthn registration")};try{if(!Xw())return{data:null,error:new Ks("Browser does not support WebAuthn",null)};const{data:o,error:l}=await this._enroll({friendlyName:t});if(!o)return await this.client.mfa.listFactors().then(d=>{var h;return(h=d.data)===null||h===void 0?void 0:h.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:s},{create:i});return c?this._verify({factorId:o.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(o){return Z(o)?{data:null,error:o}:{data:null,error:new Ks("Unexpected error in register",o)}}}}z4();const l$={url:i4,storageKey:o4,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:a4,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function Zw(e,t,n){return await n()}const Fi={};class Ml{get jwks(){var t,n;return(n=(t=Fi[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){Fi[this.storageKey]=Object.assign(Object.assign({},Fi[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=Fi[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Fi[this.storageKey]=Object.assign(Object.assign({},Fi[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const i=Object.assign(Object.assign({},l$),t);if(this.storageKey=i.storageKey,this.instanceID=(n=Ml.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Ml.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&lt()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new V4({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=kC(i.fetch),this.lock=i.lock||Zw,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&lt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=B4:this.lock=Zw,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new a$(this)}
475,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(i.storage?this.storage=i.storage:jC()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=Jw(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=Jw(this.memoryStorage)),lt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${wC}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(lt()&&(n=b4(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),lt()&&this.detectSessionInUrl&&r!=="none"){const{data:s,error:i}=await this._getSessionFromURL(n,r);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),h4(i)){const c=(t=i.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",l),await this._saveSession(o),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Z(n)?this._returnResult({error:n}):this._returnResult({error:new Ks("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:xn}),{data:o,error:l}=i;if(l||!o)return this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(Z(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(t){var n,r,s;try{let i;if("email"in t){const{email:d,password:h,options:f}=t;let p=null,v=null;this.flowType==="pkce"&&([p,v]=await Li(this.storage,this.storageKey)),i=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:p,code_challenge_method:v},xform:xn})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:xn})}else throw new Uc("You must provide either an email or phone number and a password");const{data:o,error:l}=i;if(l||!o)return await at(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(t){try{let n;if("email"in t){const{email:i,password:o,options:l}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gw})}else if("phone"in t){const{phone:i,password:o,options:l}=t;n=await re(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Gw})}else throw new Uc("You must provide either an email or phone number and a password");const{data:r,error:s}=n;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!r||!r.session||!r.user){const i=new Ii;return this._returnResult({data:{user:null,session:null},error:i})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,s,i;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=t.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,s,i,o,l,c,u,d,h,f;let p,v;if("message"in t)p=t.message,v=t.signature;else{const{chain:g,wallet:y,statement:b,options:w}=t;let x;if(lt())if(typeof y=="object")x=y;else{const _=window;if("ethereum"in _&&typeof _.ethereum=="object"&&"request"in _.ethereum&&typeof _.ethereum.request=="function")x=_.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(w!=null&&w.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=y}const S=new URL((n=w==null?void 0:w.url)!==null&&n!==void 0?n:window.location.href),j=await x.request({method:"eth_requestAccounts"}).then(_=>_).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!j||j.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=NC(j[0]);let C=(r=w==null?void 0:w.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!C){const _=await x.request({method:"eth_chainId"});C=H4(_)}const N={domain:S.host,address:k,statement:b,uri:S.href,version:"1",chainId:C,nonce:(s=w==null?void 0:w.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=w==null?void 0:w.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(l=w==null?void 0:w.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=w==null?void 0:w.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=w==null?void 0:w.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=w==null?void 0:w.signInWithEthereum)===null||d===void 0?void 0:d.resources};p=q4(N),v=await x.request({method:"personal_sign",params:[W4(p),k]})}try{const{data:g,error:y}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:v}
475,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:xn});if(y)throw y;if(!g||!g.session||!g.user){const b=new Ii;return this._returnResult({data:{user:null,session:null},error:b})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:y})}catch(g){if(Z(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(t){var n,r,s,i,o,l,c,u,d,h,f,p;let v,g;if("message"in t)v=t.message,g=t.signature;else{const{chain:y,wallet:b,statement:w,options:x}=t;let S;if(lt())if(typeof b=="object")S=b;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))S=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");S=b}const j=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in S&&S.signIn){const k=await S.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:j.host,uri:j.href}),w?{statement:w}:null));let C;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")C=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)C=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)v=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),g=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in S)||typeof S.signMessage!="function"||!("publicKey"in S)||typeof S!="object"||!S.publicKey||!("toBase58"in S.publicKey)||typeof S.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${j.host} wants you to sign in with your Solana account:`,S.publicKey.toBase58(),...w?["",w,""]:[""],"Version: 1",`URI: ${j.href}`,`Issued At: ${(s=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
476`);const k=await S.signMessage(new TextEncoder().encode(v),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=k}}try{const{data:y,error:b}=await re(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:Xs(g)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:xn});if(b)throw b;if(!y||!y.session||!y.user){const w=new Ii;return this._returnResult({data:{user:null,session:null},error:w})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(Z(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(t){const n=await $s(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new f4;const{data:i,error:o}=await re(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:xn});if(await at(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const l=new Ii;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(t){try{const{options:n,provider:r,token:s,access_token:i,nonce:o}=t,l=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:xn}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new Ii;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,s,i,o;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Li(this.storage,this.storageKey));const{error:h}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(i=c==null?void 0:c.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(o=c==null?void 0:c.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}throw new Uc("You must provide either an email or phone number.")}catch(l){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var n,r;try{let s,i;"options"in t&&(s=(n=t.options)===null||n===void 0?void 0:n.redirectTo,i=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await re(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:xn});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const c=o.session,u=o.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var n,r,s,i,o;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await Li(this.storage,this.storageKey));const u=await re(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:$4});return!((i=u.data)===null||i===void 0)&&i.url&&lt()&&!(!((o=t.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Ut;const{error:s}=await re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(Z(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:s,options:i}=t,{error:o}=await re(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:l}=await re(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l})}throw new Uc("You must provide either an email or phone number and a type")}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await $s(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not val
476id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<Sf:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const o=await $s(this.userStorage,this.storageKey+"-user");o!=null&&o.user?t.user=o.user:t.user=Cf()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};t.user=D4(t.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:es}):await this._useSession(async n=>{var r,s,i;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Ut}:await re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:es})})}catch(n){if(Z(n))return jf(n)&&(await this._removeSession(),await at(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:s,error:i}=r;if(i)throw i;if(!s.session)throw new Ut;const o=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await Li(this.storage,this.storageKey));const{data:u,error:d}=await re(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:o.access_token,xform:es});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(r){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Ut;const n=Date.now()/1e3;let r=n,s=!0,i=null;const{payload:o}=Bc(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};i=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});i={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(n){if(Z(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Ut;const{data:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(Z(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!lt())throw new Vc("No browser detected.");
476if(t.error||t.error_description||t.error_code)throw new Vc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Vw("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Vc("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Vw("No code detected.");const{data:w,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:w.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=t;if(!i||!l||!o||!u)throw new Vc("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let f=d+h;c&&(f=parseInt(c));const p=f-d;p*1e3<=Ki&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${h}s`);const v=f-h;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,f,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,f,d);const{data:g,error:y}=await this._getUser(i);if(y)throw y;const b={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:b,redirectType:t.type},error:null})}catch(r){if(Z(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await $s(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i&&!jf(i))return this._returnResult({error:i});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(d4(l)&&(l.status===404||l.status===401||l.status===403)||jf(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await at(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=w4(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,s;try{const{data:{session:i},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",t,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",i),console.error(i)}})}async resetPasswordForEmail(t,n={}){let r=null,s=null;this.flowType==="pkce"&&([r,s]=await Li(this.storage,this.storageKey,!0));try{return await re(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:s,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(i){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,l,c,u,d;const{data:h,error:f}=i;if(f)throw f;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await re(this.fetch,"GET",p,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return lt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(Z(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:s,data:{session:i}}=n;
476if(s)throw s;const{options:o,provider:l,token:c,access_token:u,nonce:d}=t,h=await re(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=i==null?void 0:i.access_token)!==null&&r!==void 0?r:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:xn}),{data:f,error:p}=h;return p?this._returnResult({data:{user:null,session:null},error:p}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Ii}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:p}))}catch(s){if(await at(this.storage,`${this.storageKey}-code-verifier`),Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;if(o)throw o;return await re(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await k4(async s=>(s>0&&await j4(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await re(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:xn})),(s,i)=>{const o=200*Math.pow(2,s);return i&&kf(i)&&Date.now()+o-r<Ki})}catch(r){if(this._debug(n,"error",r),Z(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),lt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const s=await $s(this.storage,this.storageKey);if(s&&this.userStorage){let o=await $s(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Gi(this.userStorage,this.storageKey+"-user",o)),s.user=(t=o==null?void 0:o.user)!==null&&t!==void 0?t:Cf()}else if(s&&!s.user&&!s.user){const o=await $s(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await at(this.storage,this.storageKey+"-user"),await Gi(this.storage,this.storageKey,s)):s.user=Cf()}if(this._debug(r,"session from storage",s),!this._isValidSession(s)){this._debug(r,"session is not valid"),s!==null&&await this._removeSession();return}const i=((n=s.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<Sf;if(this._debug(r,`session has${i?"":" not"} expired with margin of ${Sf}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),kf(o)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:l}=await this._getUser(s.access_token);!l&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(r,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(r,"error",s),console.error(s);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Ut;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new dh;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new Ut;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const l={data:i.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(i){if(this._debug(s,"error",i),Z(i)){const o={data:null,error:i};return kf(i)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,n,r=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(c){i.push(c)}});if(await Promise.all(o),i.length>0){for(let l=0;l<i.length;l+=1)console.error(i[l]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await at(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Gi(this.userStorage,this.storageKey+"-user",{user:n.user});const s=Object.assign({},n);delete s.user;const i=qw(s);await Gi(this.storage,this.storageKey,i)}else{const s=qw(n);await Gi(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await at(this.storage,this.storageKey),await at(this.storage,this.storageKey+"-code-verifier"),await at(this.storage,this.storageKey+"-user"),this.userStorage&&await at(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&lt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
476catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ki);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((r.expires_at*1e3-t)/Ki);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ki}ms, refresh threshold is ${Sm} ticks`),s<=Sm&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof CC)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!lt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const s=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&s.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&s.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[i,o]=await Li(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(l.toString())}if(r!=null&&r.queryParams){const i=new URLSearchParams(r.queryParams);s.push(i.toString())}return r!=null&&r.skipBrowserRedirect&&s.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?this._returnResult({data:null,error:i}):await re(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;
476if(o)return this._returnResult({data:null,error:o});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await re(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Z4(t.webauthn.credential_response):e$(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return this._returnResult({data:null,error:i});const o=await re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:Q4(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:X4(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,s,i;if(t)try{const{payload:p}=Bc(t);let v=null;p.aal&&(v=p.aal);let g=v;const{data:{user:y},error:b}=await this.getUser(t);if(b)return this._returnResult({data:null,error:b});((r=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(S=>S.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(g="aal2");const x=p.amr||[];return{data:{currentLevel:v,nextLevel:g,currentAuthenticationMethods:x},error:null}}catch(p){if(Z(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:o},error:l}
476=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Bc(o.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(p=>p.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(d="aal2");const f=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?await re(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Ut})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ut});const o=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&lt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:s},error:i}=r;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new Ut});const o=await re(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return o.data&&o.data.redirect_url&&lt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await re(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new Ut})})}catch(t){if(Z(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:s}=n;return s?this._returnResult({data:null,error:s}):r?(await re(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Ut})})}catch(n){if(Z(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(l=>l.kid===t);if(r)return r;const s=Date.now();if(r=this.jwks.keys.find(l=>l.kid===t),r&&this.jwks_cached_at+c4>s)return r;const{data:i,error:o}=await re(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,r=i.keys.find(l=>l.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:v}
476=await this.getSession();if(v||!p.session)return this._returnResult({data:null,error:v});r=p.session.access_token}const{header:s,payload:i,signature:o,raw:{header:l,payload:c}}=Bc(r);n!=null&&n.allowExpired||R4(i.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:i,header:s,signature:o},error:null}}const d=A4(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,o,y4(`${l}.${c}`)))throw new Cm("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(r){if(Z(r))return this._returnResult({data:null,error:r});throw r}}}Ml.nextInstanceID={};const c$=Ml,u$="2.101.1";let Ia="";typeof Deno<"u"?Ia="deno":typeof document<"u"?Ia="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Ia="react-native":Ia="node";const d$={"X-Client-Info":`supabase-js-${Ia}/${u$}`},h$={headers:d$},f$={schema:"public"},p$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},m$={};function Dl(e){"@babel/helpers - typeof";return Dl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dl(e)}function g$(e,t){if(Dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function v$(e){var t=g$(e,"string");return Dl(t)=="symbol"?t:t+""}function y$(e,t,n){return(t=v$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e0(Object(n),!0).forEach(function(r){y$(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const x$=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),w$=()=>Headers,b$=(e,t,n)=>{const r=x$(n),s=w$();return async(i,o)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(i,Fe(Fe({},o),{},{headers:u}))}};function S$(e){return e.endsWith("/")?e:e+"/"}function j$(e,t){var n,r;const{db:s,auth:i,realtime:o,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,f={db:Fe(Fe({},c),s),auth:Fe(Fe({},u),i),realtime:Fe(Fe({},d),o),storage:{},global:Fe(Fe(Fe({},h),l),{},{headers:Fe(Fe({},(n=h==null?void 0:h.headers)!==null&&n!==void 0?n:{}),(r=l==null?void 0:l.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function k$(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(S$(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var C$=class extends c${constructor(e){super(e)}},N$=class{constructor(e,t,n){var r,s;this.supabaseUrl=e,this.supabaseKey=t;const i=k$(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,l={db:f$,realtime:m$,auth:Fe(Fe({},p$),{},{storageKey:o}),global:h$},c=j$(n??{},l);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=b$(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Fe({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new GL(new URL("rest/v1",i).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new s4(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new UL(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
476channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,storageKey:i,flowType:o,lock:l,debug:c,throwOnError:u},d,h){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new C$({url:this.authUrl.href,headers:Fe(Fe({},f),d),storageKey:i,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:s,flowType:o,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new T5(this.realtimeUrl.href,Fe(Fe({},e),{},{params:Fe(Fe({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const E$=(e,t,n)=>new N$(e,t,n);function T$(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}T$()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const _$="https://jwyuvnmpenmcrfkrfjfq.supabase.co",P$="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp3eXV2bm1wZW5tY3Jma3JmamZxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzQ5ODYzOTAsImV4cCI6MjA5MDU2MjM5MH0.bGFHZ54ei4SjPNnmtdKANLCyR14_zRYBntWhoq2sAFQ",Jn=E$(_$,P$,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),t0={id:"demo-user",email:"[email protected]",user_metadata:{role:"candidate",full_name:"Demo User"},app_metadata:{},aud:"authenticated",created_at:new Date().toISOString()},TC=m.createContext(null);function R$({children:e}){const[t,n]=m.useState(null),[r,s]=m.useState(null),[i,o]=m.useState(!0),[l,c]=m.useState(!1),u=m.useRef(!1);m.useEffect(()=>{const{data:{subscription:v}}=Jn.auth.onAuthStateChange((g,y)=>{u.current||(s(y),n((y==null?void 0:y.user)??null),o(!1))});return Jn.auth.getSession().then(({data:{session:g}})=>{u.current||(s(g),n((g==null?void 0:g.user)??null),o(!1))}),()=>v.unsubscribe()},[]);const d=async(v,g,y,b)=>{const{error:w}=await Jn.auth.signUp({email:v,password:g,options:{data:{role:y,full_name:b},emailRedirectTo:window.location.origin}});if(w)throw w},h=async(v,g)=>{const{error:y}=await Jn.auth.signInWithPassword({email:v,password:g});if(y)throw y},f=async()=>{if(l){u.current=!1,c(!1),n(null),s(null);return}const{error:v}=await Jn.auth.signOut();if(v)throw v},p=(v="candidate")=>{u.current=!0,c(!0),n({...t0,user_metadata:{...t0.user_metadata,role:v}}),o(!1)};return a.jsx(TC.Provider,{value:{user:t,session:r,loading:i,demoMode:l,signUp:d,signIn:h,signOut:f,enterDemo:p},children:e})}const Or=()=>{const e=m.useContext(TC);if(!e)throw new Error("useAuth must be used within AuthProvider");return e},_C=m.createContext({mode:"recruiter",setMode:()=>{}});function A$({children:e}){const[t,n]=m.useState("recruiter");return a.jsx(_C.Provider,{value:{mode:t,setMode:n},children:e})}const Ir=()=>m.useContext(_C),PC=m.createContext({highlightRoute:null,setHighlightRoute:()=>{}});function n0({children:e}){const[t,n]=m.useState(null);return a.jsx(PC.Provider,{value:{highlightRoute:t,setHighlightRoute:n},children:e})}const Ov=()=>m.useContext(PC),M$=ta("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),W=m.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?Zo:"button";return a.jsx(o,{className:J(M$({variant:t,size:n,className:e})),ref:i,...s})});W.displayName="Button";const D$=[{title:"Dashboard",description:"Your home base — see application stats, recent activity, and quick actions at a glance.",icon:Zl,route:"/"},{title:"Profile",description:"Build your professional identity. Add personas to represent different career angles.",icon:ec,route:"/profile"},{title:"My Resumes",description:"Upload and manage up to 5 resumes, each tailored to a persona. AI helps optimize them.",icon:ci,route:"/resumes"},{title:"My Videos",description:"Record 60-second signal videos. Show leadership, collaboration, and technical skills — not just bullet points.",icon:nr,route:"/videos"},{title:"Browse Jobs",description:"Explore roles from companies using Volo AI. See signal requirements and your match percentage before applying.",icon:dr,route:"/jobs"}
476,{title:"Application Tracker",description:"Track every application's status — from submitted to interview to offer. All in one place.",icon:na,route:"/applications"}],O$=[{title:"Dashboard",description:"Your command center — active roles, top candidates, signal match averages, and top-up requests.",icon:Zl,route:"/"},{title:"Job Postings",description:"Create roles with weighted success signals instead of vague requirements. AI suggests signals for you.",icon:Lt,route:"/jobs"},{title:"Final Five",description:"AI-ranked shortlist of top candidates based on signal match scores. Greenlight the best to the hiring manager.",icon:ec,route:"/candidates"},{title:"Interview Pipeline",description:"Track candidates through every stage — HR screen, technical, culture fit, to offer. Full activity log.",icon:pv,route:"/pipeline"},{title:"Applications",description:"Review all incoming applications with signal scores, resumes, and video packages side by side.",icon:na,route:"/applications"},{title:"Emails",description:"Manage all candidate communications — interview invites, follow-ups, and offer letters. AI drafts emails for you.",icon:Ni,route:"/emails"},{title:"Calendar",description:"Schedule and track interviews, team syncs, and candidate meetings. Stay on top of your hiring timeline.",icon:dv,route:"/calendar"}],Ef="volo-demo-tour-dismissed";function r0(){const{demoMode:e}=Or(),{mode:t}=Ir(),{setHighlightRoute:n}=Ov();On();const[r,s]=m.useState(0),[i,o]=m.useState(()=>sessionStorage.getItem(Ef)==="true"),[l,c]=m.useState(null),u=t==="candidate"?D$:O$;if(m.useEffect(()=>{e&&(s(0),o(sessionStorage.getItem(Ef)==="true"))},[t,e]),m.useEffect(()=>{var g;return n(!e||i?null:((g=u[r])==null?void 0:g.route)??null),()=>n(null)},[e,i,r,u,n]),m.useEffect(()=>{var b;if(!e||i)return;const g=(b=u[r])==null?void 0:b.route;if(!g)return;const y=()=>{const w=document.querySelector(`[data-tour-route="${g}"]`);if(!w){c(null);return}const x=w.getBoundingClientRect(),S=320,j=200;if(t==="candidate"){let C=x.left+x.width/2-S/2;C=Math.max(8,Math.min(C,window.innerWidth-S-8)),c({top:x.bottom+12,left:C})}else{let C=x.top+x.height/2-j/2;C=Math.max(8,Math.min(C,window.innerHeight-j-8)),c({top:C,left:x.right+12})}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[e,i,r,u,t]),!e||i)return null;const d=u[r],h=d.icon,f=r===u.length-1,p=()=>{o(!0),sessionStorage.setItem(Ef,"true")},v=l?{position:"fixed",top:l.top,left:l.left,zIndex:50,width:320}:{position:"fixed",bottom:24,right:24,zIndex:50,width:320};return a.jsx("div",{style:v,className:"animate-fade-in",children:a.jsxs("div",{className:"rounded-xl border border-border bg-card shadow-lg overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 pt-3 pb-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(Vo,{className:"h-3.5 w-3.5 text-primary"}),a.jsxs("span",{className:"text-[11px] font-medium text-primary uppercase tracking-wider",children:["Demo Tour · ",t==="candidate"?"Candidate":"Recruiter"]})]}),a.jsx("button",{onClick:p,className:"text-muted-foreground hover:text-foreground transition-colors p-0.5","aria-label":"Dismiss tour",children:a.jsx(or,{className:"h-3.5 w-3.5"})})]}),a.jsx("div",{className:"px-4 pt-1",children:a.jsx("div",{className:"flex gap-1",children:u.map((g,y)=>a.jsx("div",{className:`h-1 rounded-full flex-1 transition-all ${y<=r?"bg-primary":"bg-muted"}`},y))})}),a.jsx("div",{className:"p-4 space-y-3",children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10 shrink-0",children:a.jsx(h,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:d.title}),a.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed mt-0.5",children:d.description})]})]})}),a.jsxs("div",{className:"flex items-center justify-between px-4 pb-3",children:[a.jsxs(W,{variant:"ghost",size:"sm",onClick:()=>s(g=>g-1),disabled:r===0,className:"h-7 text-xs gap-1 px-2",children:[a.jsx(Xd,{className:"h-3 w-3"})," Back"]}),a.jsxs("span",{className:"text-[11px] text-muted-foreground",children:[r+1," / ",u.length]}),f?a.jsxs(W,{size:"sm",onClick:p,className:"h-7 text-xs gap-1 px-3",children:["Got it ",a.jsx(Vo,{className:"h-3 w-3"})]}):a.jsxs(W,{size:"sm",onClick:()=>s(g=>g+1),className:"h-7 text-xs gap-1 px-3",children:["Next ",a.jsx(kl,{className:"h-3 w-3"})]})]})]})})}const Tf=768;function I$(){const[e,t]=m.useState(void 0);return m.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Tf-1}px)`),r=()=>{t(window.innerWidth<Tf)};return n.addEventListener("change",r),t(window.innerWidth<Tf),()=>n.removeEventListener("change",r)},[]),!!e}const me=m.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:J("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));me.displayName="Input";var L$="Separator",s0="horizontal",$$=["horizontal","vertical"],RC=m.forwardRef((e,t)=>
vendor: 4,212 bytes, line 476
476{const{decorative:n,orientation:r=s0,...s}=e,i=F$(r)?r:s0,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return a.jsx(le.div,{"data-orientation":i,...l,...s,ref:t})});RC.displayName=L$;function F$(e){return $$.includes(e)}var AC=RC;const MC=m.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(AC,{ref:s,decorative:n,orientation:t,className:J("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));MC.displayName=AC.displayName;var _f="focusScope.autoFocusOnMount",Pf="focusScope.autoFocusOnUnmount",i0={bubbles:!1,cancelable:!0},U$="FocusScope",hh=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[l,c]=m.useState(null),u=Ft(s),d=Ft(i),h=m.useRef(null),f=we(t,g=>c(g)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(x){if(p.paused||!l)return;const S=x.target;l.contains(S)?h.current=S:qr(h.current,{select:!0})},y=function(x){if(p.paused||!l)return;const S=x.relatedTarget;S!==null&&(l.contains(S)||qr(h.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const j of x)j.removedNodes.length>0&&qr(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const w=new MutationObserver(b);return l&&w.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),w.disconnect()}}},[r,l,p.paused]),m.useEffect(()=>{if(l){a0.add(p);const g=document.activeElement;if(!l.contains(g)){const b=new CustomEvent(_f,i0);l.addEventListener(_f,u),l.dispatchEvent(b),b.defaultPrevented||(V$(q$(DC(l)),{select:!0}),document.activeElement===g&&qr(l))}return()=>{l.removeEventListener(_f,u),setTimeout(()=>{const b=new CustomEvent(Pf,i0);l.addEventListener(Pf,d),l.dispatchEvent(b),b.defaultPrevented||qr(g??document.body,{select:!0}),l.removeEventListener(Pf,d),a0.remove(p)},0)}}},[l,u,d,p]);const v=m.useCallback(g=>{if(!n&&!r||p.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(y&&b){const w=g.currentTarget,[x,S]=B$(w);x&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&qr(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&qr(S,{select:!0})):b===w&&g.preventDefault()}},[n,r,p.paused]);return a.jsx(le.div,{tabIndex:-1,...o,ref:f,onKeyDown:v})});hh.displayName=U$;function V$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qr(r,{select:t}),document.activeElement!==n)return}function B$(e){const t=DC(e),n=o0(t,e),r=o0(t.reverse(),e);return[n,r]}function DC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function o0(e,t){for(const n of e)if(!z$(n,{upTo:t}))return n}function z$(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function H$(e){return e instanceof HTMLInputElement&&"select"in e}function qr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&H$(e)&&t&&e.select()}}var a0=W$();function W$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=l0(e,t),e.unshift(t)},remove(t){var n;e=l0(e,t),(n=e[0])==null||n.resume()}}}function l0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function q$(e){return e.filter(t=>t.tagName!=="A")}var Rf=0;function Iv(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??c0()),document.body.insertAdjacentElement("beforeend",e[1]??c0()),Rf++,()=>{Rf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Rf--}},[])}function c0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,651 bytes, lines 476-491
476style.position="fixed",e.style.pointerEvents="none",e}var Qn=function(){return Qn=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Qn.apply(this,arguments)};function OC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function K$(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,i;r<s;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var mu="right-scroll-bar-position",gu="width-before-scroll-bar",G$="with-scroll-bars-hidden",Y$="--removed-body-scroll-bar-size";function Af(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function J$(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var Q$=typeof window<"u"?m.useLayoutEffect:m.useEffect,u0=new WeakMap;function X$(e,t){var n=J$(null,function(r){return e.forEach(function(s){return Af(s,r)})});return Q$(function(){var r=u0.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(l){i.has(l)||Af(l,null)}),i.forEach(function(l){s.has(l)||Af(l,o)})}u0.set(n,e)},[e]),n}function Z$(e){return e}function e3(e,t){t===void 0&&(t=Z$);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function t3(e){e===void 0&&(e={});var t=e3(null);return t.options=Qn({async:!0,ssr:!1},e),t}var IC=function(e){var t=e.sideCar,n=OC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Qn({},n))};IC.isSideCarExport=!0;function n3(e,t){return e.useMedium(t),IC}var LC=t3(),Mf=function(){},fh=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Mf,onWheelCapture:Mf,onTouchMoveCapture:Mf}),s=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,p=e.noRelative,v=e.noIsolation,g=e.inert,y=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=e.gapMode,S=OC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=f,k=X$([n,t]),C=Qn(Qn({},S),s);return m.createElement(m.Fragment,null,d&&m.createElement(j,{sideCar:LC,removeScrollBar:u,shards:h,noRelative:p,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:x}),o?m.cloneElement(m.Children.only(l),Qn(Qn({},C),{ref:k})):m.createElement(w,Qn({},C,{className:c,ref:k}),l))});fh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fh.classNames={fullWidth:gu,zeroRight:mu};var r3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function s3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=r3();return t&&e.setAttribute("nonce",t),e}function i3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function o3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=s3())&&(i3(t,n),o3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},l3=function(){var e=a3();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$C=function(){var e=l3(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},c3={left:0,top:0,right:0,gap:0},Df=function(e){return parseInt(e||"",10)||0},u3=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Df(n),Df(r),Df(s)]},d3=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return c3;var t=u3(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},h3=$C(),So="data-scroll-locked",f3=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
477  .`.concat(G$,` {
478   overflow: hidden `).concat(r,`;
479   padding-right: `).concat(l,"px ").concat(r,`;
480  }
481  body[`).concat(So,`] {
482    overflow: hidden `).concat(r,`;
483    overscroll-behavior: contain;
484    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
485    padding-left: `.concat(s,`px;
486    padding-top: `).concat(i,`px;
487    padding-right: `).concat(o,`px;
488    margin-left:0;
489    margin-top:0;
490    margin-right: `).concat(l,"px ").concat(r,`;
491    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
491")].filter(Boolean).join(""),`
492  }
493  
494  .`).concat(mu,` {
495    right: `).concat(l,"px ").concat(r,`;
496  }
497  
498  .`).concat(gu,` {
499    margin-right: `).concat(l,"px ").concat(r,`;
500  }
501  
502  .`).concat(mu," .").concat(mu,` {
503    right: 0 `).concat(r,`;
504  }
505  
506  .`).concat(gu," .").concat(gu,` {
507    margin-right: 0 `).concat(r,`;
508  }
509  
510  body[`).concat(So,`] {
511    `).concat(Y$,": ").concat(l,`px;
512  }
513`)},d0=function(){var e=parseInt(document.body.getAttribute(So)||"0",10);return isFinite(e)?e:0},p3=function(){m.useEffect(function(){return document.body.setAttribute(So,(d0()+1).toString()),function(){var e=d0()-1;e<=0?document.body.removeAttribute(So):document.body.setAttribute(So,e.toString())}},[])},m3=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;p3();var i=m.useMemo(function(){return d3(s)},[s]);return m.createElement(h3,{styles:f3(i,!t,s,n?"":"!important")})},Nm=!1;if(typeof window<"u")try{var zc=Object.defineProperty({},"passive",{get:function(){return Nm=!0,!0}});window.addEventListener("test",zc,zc),window.removeEventListener("test",zc,zc)}catch{Nm=!1}var Ui=Nm?{passive:!1}:!1,g3=function(e){return e.tagName==="TEXTAREA"},FC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!g3(e)&&n[t]==="visible")},v3=function(e){return FC(e,"overflowY")},y3=function(e){return FC(e,"overflowX")},h0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=UC(e,r);if(s){var i=VC(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},x3=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},w3=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},UC=function(e,t){return e==="v"?v3(t):y3(t)},VC=function(e,t){return e==="v"?x3(t):w3(t)},b3=function(e,t){return e==="h"&&t==="rtl"?-1:1},S3=function(e,t,n,r,s){var i=b3(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{if(!l)break;var p=VC(e,l),v=p[0],g=p[1],y=p[2],b=g-y-i*v;(v||b)&&UC(e,l)&&(h+=b,f+=v);var w=l.parentNode;l=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},f0=function(e){return[e.deltaX,e.deltaY]},p0=function(e){return e&&"current"in e?e.current:e},j3=function(e,t){return e[0]===t[0]&&e[1]===t[1]},k3=function(e){return`
514  .block-interactivity-`.concat(e,` {pointer-events: none;}
515  .allow-interactivity-`).concat(e,` {pointer-events: all;}
516`)},C3=0,Vi=[];function N3(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),s=m.useState(C3++)[0],i=m.useState($C)[0],o=m.useRef(e);m.useEffect(function(){o.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=K$([e.lockRef.current],(e.shards||[]).map(p0),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=m.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var b=Hc(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-b[0],S="deltaY"in g?g.deltaY:w[1]-b[1],j,k=g.target,C=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&C==="h"&&k.type==="range")return!1;var N=h0(C,k);if(!N)return!0;if(N?j=C:(j=C==="v"?"h":"v",N=h0(C,k)),!N)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=j),!j)return!0;var _=r.current||j;return S3(_,y,g,_==="h"?x:S,!0)},[]),c=m.useCallback(function(g){var y=g;if(!(!Vi.length||Vi[Vi.length-1]!==i)){var b="deltaY"in y?f0(y):Hc(y),w=t.current.filter(function(j){return j.name===y.type&&(j.target===y.target||y.target===j.shadowParent)&&j3(j.delta,b)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}
vendor: 4,332 bytes, line 516
516if(!w){var x=(o.current.shards||[]).map(p0).filter(Boolean).filter(function(j){return j.contains(y.target)}),S=x.length>0?l(y,x[0]):!o.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),u=m.useCallback(function(g,y,b,w){var x={name:g,delta:y,target:b,should:w,shadowParent:E3(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),d=m.useCallback(function(g){n.current=Hc(g),r.current=void 0},[]),h=m.useCallback(function(g){u(g.type,f0(g),g.target,l(g,e.lockRef.current))},[]),f=m.useCallback(function(g){u(g.type,Hc(g),g.target,l(g,e.lockRef.current))},[]);m.useEffect(function(){return Vi.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Ui),document.addEventListener("touchmove",c,Ui),document.addEventListener("touchstart",d,Ui),function(){Vi=Vi.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Ui),document.removeEventListener("touchmove",c,Ui),document.removeEventListener("touchstart",d,Ui)}},[]);var p=e.removeScrollBar,v=e.inert;return m.createElement(m.Fragment,null,v?m.createElement(i,{styles:k3(s)}):null,p?m.createElement(m3,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function E3(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const T3=n3(LC,N3);var ph=m.forwardRef(function(e,t){return m.createElement(fh,Qn({},e,{ref:t,sideCar:T3}))});ph.classNames=fh.classNames;var _3=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Bi=new WeakMap,Wc=new WeakMap,qc={},Of=0,BC=function(e){return e&&(e.host||BC(e.parentNode))},P3=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=BC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},R3=function(e,t,n,r){var s=P3(t,Array.isArray(e)?e:[e]);qc[n]||(qc[n]=new WeakMap);var i=qc[n],o=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var p=f.getAttribute(r),v=p!==null&&p!=="false",g=(Bi.get(f)||0)+1,y=(i.get(f)||0)+1;Bi.set(f,g),i.set(f,y),o.push(f),g===1&&v&&Wc.set(f,!0),y===1&&f.setAttribute(n,"true"),v||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(t),l.clear(),Of++,function(){o.forEach(function(h){var f=Bi.get(h)-1,p=i.get(h)-1;Bi.set(h,f),i.set(h,p),f||(Wc.has(h)||h.removeAttribute(r),Wc.delete(h)),p||h.removeAttribute(n)}),Of--,Of||(Bi=new WeakMap,Bi=new WeakMap,Wc=new WeakMap,qc={})}},Lv=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=_3(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),R3(r,s,n,"aria-hidden")):function(){return null}},mh="Dialog",[zC,D7]=Mr(mh),[A3,In]=zC(mh),HC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,l=m.useRef(null),c=m.useRef(null),[u,d]=yi({prop:r,defaultProp:s??!1,onChange:i,caller:mh});return a.jsx(A3,{scope:t,triggerRef:l,contentRef:c,contentId:rr(),titleId:rr(),descriptionId:rr(),open:u,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};HC.displayName=mh;var WC="DialogTrigger",M3=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=In(WC,n),i=we(t,s.triggerRef);return a.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Uv(s.open),...r,ref:i,onClick:q(e.onClick,s.onOpenToggle)})});M3.displayName=WC;var $v="DialogPortal",[D3,qC]=zC($v,{forceMount:void 0}),KC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=In($v,t);return a.jsx(D3,{scope:t,forceMount:n,children:m.Children.map(r,o=>a.jsx(ur,{present:n||i.open,children:a.jsx(Jl,{asChild:!0,container:s,children:o})}))})};KC.displayName=$v;var dd="DialogOverlay",GC=m.forwardRef((e,t)=>{const n=qC(dd,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=In(dd,e.__scopeDialog);return i.modal?a.jsx(ur,{present:r||i.open,children:a.jsx(I3,{...s,ref:t})}):null});GC.displayName=dd;var O3=vi("DialogOverlay.RemoveScroll"),I3=m.forwardRef((e,t)=>
vendor: 4,817 bytes, lines 516-520
516{const{__scopeDialog:n,...r}=e,s=In(dd,n);return a.jsx(ph,{as:O3,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(le.div,{"data-state":Uv(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),wi="DialogContent",YC=m.forwardRef((e,t)=>{const n=qC(wi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=In(wi,e.__scopeDialog);return a.jsx(ur,{present:r||i.open,children:i.modal?a.jsx(L3,{...s,ref:t}):a.jsx($3,{...s,ref:t})})});YC.displayName=wi;var L3=m.forwardRef((e,t)=>{const n=In(wi,e.__scopeDialog),r=m.useRef(null),s=we(t,n.contentRef,r);return m.useEffect(()=>{const i=r.current;if(i)return Lv(i)},[]),a.jsx(JC,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:q(e.onFocusOutside,i=>i.preventDefault())})}),$3=m.forwardRef((e,t)=>{const n=In(wi,e.__scopeDialog),r=m.useRef(!1),s=m.useRef(!1);return a.jsx(JC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),JC=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,l=In(wi,n),c=m.useRef(null),u=we(t,c);return Iv(),a.jsxs(a.Fragment,{children:[a.jsx(hh,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:a.jsx(ea,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Uv(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(F3,{titleId:l.titleId}),a.jsx(V3,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Fv="DialogTitle",QC=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=In(Fv,n);return a.jsx(le.h2,{id:s.titleId,...r,ref:t})});QC.displayName=Fv;var XC="DialogDescription",ZC=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=In(XC,n);return a.jsx(le.p,{id:s.descriptionId,...r,ref:t})});ZC.displayName=XC;var eN="DialogClose",tN=m.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=In(eN,n);return a.jsx(le.button,{type:"button",...r,ref:t,onClick:q(e.onClick,()=>s.onOpenChange(!1))})});tN.displayName=eN;function Uv(e){return e?"open":"closed"}var nN="DialogTitleWarning",[O7,rN]=eD(nN,{contentName:wi,titleName:Fv,docsSlug:"dialog"}),F3=({titleId:e})=>{const t=rN(nN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
517
518If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
519
520For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},U3="DialogDescriptionWarning",V3=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rN(U3).contentName}}.`;return m.useEffect(()=>{var i;const s=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},sN=HC,iN=KC,gh=GC,vh=YC,yh=QC,xh=ZC,oN=tN;const B3=sN,z3=iN,aN=m.forwardRef(({className:e,...t},n)=>a.jsx(gh,{className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));aN.displayName=gh.displayName;const H3=ta("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),lN=m.forwardRef(({side:e="right",className:t,children:n,...r},s)=>
520a.jsxs(z3,{children:[a.jsx(aN,{}),a.jsxs(vh,{ref:s,className:J(H3({side:e}),t),...r,children:[n,a.jsxs(oN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(or,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));lN.displayName=vh.displayName;const W3=m.forwardRef(({className:e,...t},n)=>a.jsx(yh,{ref:n,className:J("text-lg font-semibold text-foreground",e),...t}));W3.displayName=yh.displayName;const q3=m.forwardRef(({className:e,...t},n)=>a.jsx(xh,{ref:n,className:J("text-sm text-muted-foreground",e),...t}));q3.displayName=xh.displayName;function m0({className:e,...t}){return a.jsx("div",{className:J("animate-pulse rounded-md bg-muted",e),...t})}const K3="sidebar:state",G3=60*60*24*7,Y3="16rem",J3="18rem",Q3="3rem",X3="b",cN=m.createContext(null);function rc(){const e=m.useContext(cN);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const uN=m.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:i,...o},l)=>{const c=I$(),[u,d]=m.useState(!1),[h,f]=m.useState(e),p=t??h,v=m.useCallback(w=>{const x=typeof w=="function"?w(p):w;n?n(x):f(x),document.cookie=`${K3}=${x}; path=/; max-age=${G3}`},[n,p]),g=m.useCallback(()=>c?d(w=>!w):v(w=>!w),[c,v,d]);m.useEffect(()=>{const w=x=>{x.key===X3&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),g())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[g]);const y=p?"expanded":"collapsed",b=m.useMemo(()=>({state:y,open:p,setOpen:v,isMobile:c,openMobile:u,setOpenMobile:d,toggleSidebar:g}),[y,p,v,c,u,d,g]);return a.jsx(cN.Provider,{value:b,children:a.jsx(lC,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Y3,"--sidebar-width-icon":Q3,...s},className:J("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...o,children:i})})})});uN.displayName="SidebarProvider";const dN=m.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...i},o)=>{const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=rc();return n==="none"?a.jsx("div",{className:J("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:o,...i,children:s}):l?a.jsx(B3,{open:u,onOpenChange:d,...i,children:a.jsx(lN,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":J3},side:e,children:a.jsx("div",{className:"flex h-full w-full flex-col",children:s})})}):a.jsxs("div",{ref:o,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:J("relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),a.jsx("div",{className:J("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:a.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:s})})]})});dN.displayName="Sidebar";const hN=m.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:s}=rc();return a.jsxs(W,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:J("h-7 w-7",e),onClick:i=>{t==null||t(i),s()},...n,children:[a.jsx(uO,{}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});hN.displayName="SidebarTrigger";const Z3=m.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=rc();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:J("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] group-data-[side=left]:-right-4 group-data-[side=right]:left-0 hover:after:bg-sidebar-border sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Z3.displayName="SidebarRail";const eF=m.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:J("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-
520h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));eF.displayName="SidebarInset";const tF=m.forwardRef(({className:e,...t},n)=>a.jsx(me,{ref:n,"data-sidebar":"input",className:J("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));tF.displayName="SidebarInput";const fN=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:J("flex flex-col gap-2 p-2",e),...t}));fN.displayName="SidebarHeader";const pN=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:J("flex flex-col gap-2 p-2",e),...t}));pN.displayName="SidebarFooter";const nF=m.forwardRef(({className:e,...t},n)=>a.jsx(MC,{ref:n,"data-sidebar":"separator",className:J("mx-2 w-auto bg-sidebar-border",e),...t}));nF.displayName="SidebarSeparator";const mN=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:J("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));mN.displayName="SidebarContent";const gN=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:J("relative flex w-full min-w-0 flex-col p-2",e),...t}));gN.displayName="SidebarGroup";const vN=m.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Zo:"div";return a.jsx(s,{ref:r,"data-sidebar":"group-label",className:J("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});vN.displayName="SidebarGroupLabel";const rF=m.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?Zo:"button";return a.jsx(s,{ref:r,"data-sidebar":"group-action",className:J("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});rF.displayName="SidebarGroupAction";const yN=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:J("w-full text-sm",e),...t}));yN.displayName="SidebarGroupContent";const Em=m.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:J("flex w-full min-w-0 flex-col gap-1",e),...t}));Em.displayName="SidebarMenu";const Tm=m.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:J("group/menu-item relative",e),...t}));Tm.displayName="SidebarMenuItem";const sF=ta("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xN=m.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:i,...o},l)=>{const c=e?Zo:"button",{isMobile:u,state:d}=rc(),h=a.jsx(c,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:J(sF({variant:n,size:r}),i),...o});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(cC,{children:[a.jsx(uC,{asChild:!0,children:h}),a.jsx(Av,{side:"right",align:"center",hidden:d!=="collapsed"||u,...s})]})):h});xN.displayName="SidebarMenuButton";const iF=m.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const i=t?Zo:"button";return a.jsx(i,{ref:s,"data-sidebar":"menu-action",className:J("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});iF.displayName="SidebarMenuAction";const oF=m.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:J("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));oF.displayName="SidebarMenuBadge";const aF=m.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=m.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:J("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&a.jsx(m0,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),a.jsx(m0,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});aF.displayName="SidebarMenuSkeleton";const lF=m.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:J("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));lF.displayName="SidebarMenuSub";const cF=m.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));cF.displayName="SidebarMenuSubItem";const uF=m.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},i)=>{const o=e?Zo:"a";return a.jsx(o,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:J("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...s})});uF.displayName="SidebarMenuSubButton";const Vv="/assets/volo-logo-nHRXK8B-.png",wN=m.forwardRef(({className:e,activeClassName:t,pendingClassName:n,to:r,...s},i)=>a.jsx(aM,{ref:i,to:r,className:({isActive:o,isPending:l})=>J(e,o&&t,l&&n),...s}));wN.displayName="NavLink";var dF=m.createContext(void 0);function Bv(e){const t=m.useContext(dF);return e||t||"ltr"}var If="rovingFocusGroup.onEntryFocus",hF={bubbles:!1,cancelable:!0},sc="RovingFocusGroup",[_m,bN,fF]=Yd(sc),[pF,SN]=Mr(sc,[fF]),[mF,gF]=pF(sc),jN=m.forwardRef((e,t)=>
vendor: 17,211 bytes, line 520
520a.jsx(_m.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(_m.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(vF,{...e,ref:t})})}));jN.displayName=sc;var vF=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=m.useRef(null),p=we(t,f),v=Bv(i),[g,y]=yi({prop:o,defaultProp:l??null,onChange:c,caller:sc}),[b,w]=m.useState(!1),x=Ft(u),S=bN(n),j=m.useRef(!1),[k,C]=m.useState(0);return m.useEffect(()=>{const N=f.current;if(N)return N.addEventListener(If,x),()=>N.removeEventListener(If,x)},[x]),a.jsx(mF,{scope:n,orientation:r,dir:v,loop:s,currentTabStopId:g,onItemFocus:m.useCallback(N=>y(N),[y]),onItemShiftTab:m.useCallback(()=>w(!0),[]),onFocusableItemAdd:m.useCallback(()=>C(N=>N+1),[]),onFocusableItemRemove:m.useCallback(()=>C(N=>N-1),[]),children:a.jsx(le.div,{tabIndex:b||k===0?-1:0,"data-orientation":r,...h,ref:p,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{j.current=!0}),onFocus:q(e.onFocus,N=>{const _=!j.current;if(N.target===N.currentTarget&&_&&!b){const E=new CustomEvent(If,hF);if(N.currentTarget.dispatchEvent(E),!E.defaultPrevented){const M=S().filter($=>$.focusable),O=M.find($=>$.active),H=M.find($=>$.id===g),K=[O,H,...M].filter(Boolean).map($=>$.ref.current);NN(K,d)}}j.current=!1}),onBlur:q(e.onBlur,()=>w(!1))})})}),kN="RovingFocusGroupItem",CN=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,children:o,...l}=e,c=rr(),u=i||c,d=gF(kN,n),h=d.currentTabStopId===u,f=bN(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:g}=d;return m.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),a.jsx(_m.ItemSlot,{scope:n,id:u,focusable:r,active:s,children:a.jsx(le.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:q(e.onMouseDown,y=>{r?d.onItemFocus(u):y.preventDefault()}),onFocus:q(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:q(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=wF(y,d.orientation,d.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(y.currentTarget);x=d.loop?bF(x,S+1):x.slice(S+1)}setTimeout(()=>NN(x))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:g!=null}):o})})});CN.displayName=kN;var yF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function xF(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function wF(e,t,n){const r=xF(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yF[r]}function NN(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var SF=jN,jF=CN,Pm=["Enter"," "],kF=["ArrowDown","PageUp","Home"],EN=["ArrowUp","PageDown","End"],CF=[...kF,...EN],NF={ltr:[...Pm,"ArrowRight"],rtl:[...Pm,"ArrowLeft"]},EF={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ic="Menu",[Ol,TF,_F]=Yd(ic),[Ei,TN]=Mr(ic,[_F,oa,SN]),wh=oa(),_N=SN(),[PF,Ti]=Ei(ic),[RF,oc]=Ei(ic),PN=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,l=wh(t),[c,u]=m.useState(null),d=m.useRef(!1),h=Ft(i),f=Bv(s);return m.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),a.jsx(Ev,{...l,children:a.jsx(PF,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:a.jsx(RF,{scope:t,onClose:m.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:f,modal:o,children:r})})})};PN.displayName=ic;var AF="MenuAnchor",zv=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=wh(n);return a.jsx(Tv,{...s,...r,ref:t})});zv.displayName=AF;var Hv="MenuPortal",[MF,RN]=Ei(Hv,{forceMount:void 0}),AN=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=Ti(Hv,t);return a.jsx(MF,{scope:t,forceMount:n,children:a.jsx(ur,{present:n||i.open,children:a.jsx(Jl,{asChild:!0,container:s,children:r})})})};AN.displayName=Hv;var an="MenuContent",[DF,Wv]=Ei(an),MN=m.forwardRef((e,t)=>{const n=RN(an,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Ti(an,e.__scopeMenu),o=oc(an,e.__scopeMenu);return a.jsx(Ol.Provider,{scope:e.__scopeMenu,children:a.jsx(ur,{present:r||i.open,children:a.jsx(Ol.Slot,{scope:e.__scopeMenu,children:o.modal?a.jsx(OF,{...s,ref:t}):a.jsx(IF,{...s,ref:t})})})})}),OF=m.forwardRef((e,t)=>{const n=Ti(an,e.__scopeMenu),r=m.useRef(null),s=we(t,r);return m.useEffect(()=>{const i=r.current;if(i)return Lv(i)},[]),a.jsx(qv,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IF=m.forwardRef((e,t)=>{const n=Ti(an,e.__scopeMenu);return a.jsx(qv,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),LF=vi("MenuContent.ScrollLock"),qv=m.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,disableOutsideScroll:v,...g}=e,y=Ti(an,n),b=oc(an,n),w=wh(n),x=_N(n),S=TF(n),[j,k]=m.useState(null),C=m.useRef(null),N=we(t,C,y.onContentChange),_=m.useRef(0),E=m.useRef(""),M=m.useRef(0),O=m.useRef(null),H=m.useRef("right"),I=m.useRef(0),K=v?ph:m.Fragment,$=v?{as:LF,allowPinchZoom:!0}:void 0,Q=T=>{var U,ge;const R=E.current+T,V=S().filter(pe=>!pe.disabled),B=document.activeElement,z=(U=V.find(pe=>pe.ref.current===B))==null?void 0:U.textValue,ee=V.map(pe=>pe.textValue),de=YF(ee,R,z),ce=(ge=V.find(pe=>pe.textValue===de))==null?void 0:ge.ref.current;(function pe(he){E.current=he,window.clearTimeout(_.current),he!==""&&(_.current=window.setTimeout(()=>pe(""),1e3))})(R),ce&&setTimeout(()=>ce.focus())};m.useEffect(()=>()=>window.clearTimeout(_.current),[]),Iv();const P=m.useCallback(T=>{var V,B;return H.current===((V=O.current)==null?void 0:V.side)&&QF(T,(B=O.current)==null?void 0:B.area)},[]);return a.jsx(DF,{scope:n,searchRef:E,onItemEnter:m.useCallback(T=>{P(T)&&T.preventDefault()},[P]),onItemLeave:m.useCallback(T=>{var R;P(T)||((R=C.current)==null||R.focus(),k(null))},[P]),onTriggerLeave:m.useCallback(T=>{P(T)&&T.preventDefault()},[P]),pointerGraceTimerRef:M,onPointerGraceIntentChange:m.useCallback(T=>{O.current=T},[]),children:a.jsx(K,{...$,children:a.jsx(hh,{asChild:!0,trapped:s,onMountAutoFocus:q(i,T=>{var R;T.preventDefault(),(R=C.current)==null||R.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:a.jsx(ea,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:f,onDismiss:p,children:a.jsx(SF,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:j,onCurrentTabStopIdChange:k,onEntryFocus:q(c,T=>{b.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(_v,{role:"menu","aria-orientation":"vertical","data-state":YN(y.open),"data-radix-menu-content":"",dir:b.dir,...w,...g,ref:N,style:{outline:"none",...g.style},onKeyDown:q(g.onKeyDown,T=>{const V=T.target.closest("[data-radix-menu-content]")===T.currentTarget,B=T.ctrlKey||T.altKey||T.metaKey,z=T.key.length===1;V&&(T.key==="Tab"&&T.preventDefault(),!B&&z&&Q(T.key));const ee=C.current;if(T.target!==ee||!CF.includes(T.key))return;T.preventDefault();const ce=S().filter(U=>!U.disabled).map(U=>U.ref.current);EN.includes(T.key)&&ce.reverse(),KF(ce)}),onBlur:q(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(_.current),E.current="")}),onPointerMove:q(e.onPointerMove,Il(T=>{const R=T.target,V=I.current!==T.clientX;if(T.currentTarget.contains(R)&&V){const B=T.clientX>I.current?"right":"left";H.current=B,I.current=T.clientX}}))})})})})})})});MN.displayName=an;var $F="MenuGroup",Kv=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(le.div,{role:"group",...r,ref:t})});Kv.displayName=$F;var FF="MenuLabel",DN=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(le.div,{...r,ref:t})});DN.displayName=FF;var hd="MenuItem",g0="menu.itemSelect",bh=m.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=m.useRef(null),o=oc(hd,e.__scopeMenu),l=Wv(hd,e.__scopeMenu),c=we(t,i),u=m.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const f=new CustomEvent(g0,{bubbles:!0,cancelable:!0});h.addEventListener(g0,p=>r==null?void 0:r(p),{once:!0}),av(h,f),f.defaultPrevented?u.current=!1:o.onClose()}};return a.jsx(ON,{...s,ref:c,disabled:n,onClick:q(e.onClick,d),onPointerDown:h=>{var f;(f=e.onPointerDown)==null||f.call(e,h),u.current=!0},onPointerUp:q(e.onPointerUp,h=>{var f;u.current||(f=h.currentTarget)==null||f.click()}),onKeyDown:q(e.onKeyDown,h=>{const f=l.searchRef.current!=="";n||f&&h.key===" "||Pm.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});bh.displayName=hd;var ON=m.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=Wv(hd,n),l=_N(n),c=m.useRef(null),u=we(t,c),[d,h]=m.useState(!1),[f,p]=m.useState("");return m.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[i.children]),a.jsx(Ol.ItemSlot,{scope:n,disabled:r,textValue:s??f,children:a.jsx(jF,{asChild:!0,...l,focusable:!r,children:a.jsx(le.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:q(e.onPointerMove,Il(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,Il(v=>o.onItemLeave(v))),onFocus:q(e.onFocus,()=>h(!0)),onBlur:q(e.onBlur,()=>h(!1))})})})}),UF="MenuCheckboxItem",IN=m.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return a.jsx(VN,{scope:e.__scopeMenu,checked:n,children:a.jsx(bh,{role:"menuitemcheckbox","aria-checked":fd(n)?"mixed":n,...s,ref:t,"data-state":Yv(n),onSelect:q(s.onSelect,()=>r==null?void 0:r(fd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});IN.displayName=UF;var LN="MenuRadioGroup",[VF,BF]=Ei(LN,{value:void 0,onValueChange:()=>{}}),$N=m.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,i=Ft(r);return a.jsx(VF,{scope:e.__scopeMenu,value:n,onValueChange:i,children:a.jsx(Kv,{...s,ref:t})})});$N.displayName=LN;var FN="MenuRadioItem",UN=m.forwardRef((e,t)=>{const{value:n,...r}=e,s=BF(FN,e.__scopeMenu),i=n===s.value;return a.jsx(VN,{scope:e.__scopeMenu,checked:i,children:a.jsx(bh,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Yv(i),onSelect:q(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});UN.displayName=FN;var Gv="MenuItemIndicator",[VN,zF]=Ei(Gv,{checked:!1}),BN=m.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=zF(Gv,n);return a.jsx(ur,{present:r||fd(i.checked)||i.checked===!0,children:a.jsx(le.span,{...s,ref:t,"data-state":Yv(i.checked)})})});BN.displayName=Gv;var HF="MenuSeparator",zN=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(le.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});zN.displayName=HF;var WF="MenuArrow",HN=m.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=wh(n);return a.jsx(Pv,{...s,...r,ref:t})});HN.displayName=WF;var qF="MenuSub",[I7,WN]=Ei(qF),La="MenuSubTrigger",qN=m.forwardRef((e,t)=>{const n=Ti(La,e.__scopeMenu),r=oc(La,e.__scopeMenu),s=WN(La,e.__scopeMenu),i=Wv(La,e.__scopeMenu),o=m.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=m.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return m.useEffect(()=>d,[d]),m.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(zv,{asChild:!0,...u,children:a.jsx(ON,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":YN(n.open),...e,ref:Gd(t,s.onTriggerChange),onClick:h=>{var f;(f=e.onClick)==null||f.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,Il(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:q(e.onPointerLeave,Il(h=>{var p,v;d();const f=(p=n.content)==null?void 0:p.getBoundingClientRect();if(f){const g=(v=n.content)==null?void 0:v.dataset.side,y=g==="right",b=y?-5:5,w=f[y?"left":"right"],x=f[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:w,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:w,y:f.bottom}],side:g}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,h=>{var p;const f=i.searchRef.current!=="";e.disabled||f&&h.key===" "||NF[r.dir].includes(h.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),h.preventDefault())})})})});qN.displayName=La;var KN="MenuSubContent",GN=m.forwardRef((e,t)=>{const n=RN(an,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Ti(an,e.__scopeMenu),o=oc(an,e.__scopeMenu),l=WN(KN,e.__scopeMenu),c=m.useRef(null),u=we(t,c);return a.jsx(Ol.Provider,{scope:e.__scopeMenu,children:a.jsx(ur,{present:r||i.open,children:a.jsx(Ol.Slot,{scope:e.__scopeMenu,children:a.jsx(qv,{id:l.contentId,"aria-labelledby":l.triggerId,...s,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var h;o.isUsingKeyboardRef.current&&((h=c.current)==null||h.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:q(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:q(e.onKeyDown,d=>{var p;const h=d.currentTarget.contains(d.target),f=EF[o.dir].includes(d.key);h&&f&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});GN.displayName=KN;function YN(e){return e?"open":"closed"}function fd(e){return e==="indeterminate"}function Yv(e){return fd(e)?"indeterminate":e?"checked":"unchecked"}function KF(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function GF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function YF(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=GF(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function JF(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(s=!s)}return s}function QF(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return JF(n,t)}function Il(e){return t=>t.pointerType==="mouse"?e(t):void 0}var XF=PN,ZF=zv,eU=AN,tU=MN,nU=Kv,rU=DN,sU=bh,iU=IN,oU=$N,aU=UN,lU=BN,cU=zN,uU=HN,dU=qN,hU=GN,Sh="DropdownMenu",[fU,L7]=Mr(Sh,[TN]),_t=TN(),[pU,JN]=fU(Sh),QN=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=_t(t),u=m.useRef(null),[d,h]=yi({prop:s,defaultProp:i??!1,onChange:o,caller:Sh});return a.jsx(pU,{scope:t,triggerId:rr(),triggerRef:u,contentId:rr(),open:d,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(f=>!f),[h]),modal:l,children:a.jsx(XF,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};QN.displayName=Sh;var XN="DropdownMenuTrigger",ZN=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=JN(XN,n),o=_t(n);return a.jsx(ZF,{asChild:!0,...o,children:a.jsx(le.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:Gd(t,i.triggerRef),onPointerDown:q(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:q(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});ZN.displayName=XN;var mU="DropdownMenuPortal",eE=e=>{const{__scopeDropdownMenu:t,...n}=e,r=_t(t);return a.jsx(eU,{...r,...n})};eE.displayName=mU;var tE="DropdownMenuContent",nE=m.forwardRef((e,t)=>
520{const{__scopeDropdownMenu:n,...r}=e,s=JN(tE,n),i=_t(n),o=m.useRef(!1);return a.jsx(tU,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,l=>{var c;o.current||(c=s.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:q(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!s.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nE.displayName=tE;var gU="DropdownMenuGroup",vU=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(nU,{...s,...r,ref:t})});vU.displayName=gU;var yU="DropdownMenuLabel",rE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(rU,{...s,...r,ref:t})});rE.displayName=yU;var xU="DropdownMenuItem",sE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(sU,{...s,...r,ref:t})});sE.displayName=xU;var wU="DropdownMenuCheckboxItem",iE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(iU,{...s,...r,ref:t})});iE.displayName=wU;var bU="DropdownMenuRadioGroup",SU=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(oU,{...s,...r,ref:t})});SU.displayName=bU;var jU="DropdownMenuRadioItem",oE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(aU,{...s,...r,ref:t})});oE.displayName=jU;var kU="DropdownMenuItemIndicator",aE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(lU,{...s,...r,ref:t})});aE.displayName=kU;var CU="DropdownMenuSeparator",lE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(cU,{...s,...r,ref:t})});lE.displayName=CU;var NU="DropdownMenuArrow",EU=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(uU,{...s,...r,ref:t})});EU.displayName=NU;var TU="DropdownMenuSubTrigger",cE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(dU,{...s,...r,ref:t})});cE.displayName=TU;var _U="DropdownMenuSubContent",uE=m.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=_t(n);return a.jsx(hU,{...s,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});uE.displayName=_U;var PU=QN,RU=ZN,AU=eE,dE=nE,hE=rE,fE=sE,pE=iE,mE=oE,gE=aE,vE=lE,yE=cE,xE=uE;const MU=PU,DU=RU,OU=m.forwardRef(({className:e,inset:t,children:n,...r},s)=>a.jsxs(yE,{ref:s,className:J("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,a.jsx(eh,{className:"ml-auto h-4 w-4"})]}));OU.displayName=yE.displayName;const IU=m.forwardRef(({className:e,...t},n)=>a.jsx(xE,{ref:n,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));IU.displayName=xE.displayName;const wE=m.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(AU,{children:a.jsx(dE,{ref:r,sideOffset:t,className:J("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
520de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));wE.displayName=dE.displayName;const vu=m.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(fE,{ref:r,className:J("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));vu.displayName=fE.displayName;const LU=m.forwardRef(({className:e,children:t,checked:n,...r},s)=>a.jsxs(pE,{ref:s,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(gE,{children:a.jsx(hv,{className:"h-4 w-4"})})}),t]}));LU.displayName=pE.displayName;const $U=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(mE,{ref:r,className:J("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(gE,{children:a.jsx(iO,{className:"h-2 w-2 fill-current"})})}),t]}));$U.displayName=mE.displayName;const FU=m.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(hE,{ref:r,className:J("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));FU.displayName=hE.displayName;const UU=m.forwardRef(({className:e,...t},n)=>a.jsx(vE,{ref:n,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));UU.displayName=vE.displayName;function Jv(){const{setTheme:e,theme:t}=Bj();return a.jsxs(MU,{children:[a.jsx(DU,{asChild:!0,children:a.jsxs(W,{variant:"ghost",size:"icon","aria-label":"Toggle theme",children:[a.jsx(gw,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),a.jsx(mw,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),a.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),a.jsxs(wE,{align:"end",children:[a.jsxs(vu,{onClick:()=>e("light"),children:[a.jsx(gw,{className:"mr-2 h-4 w-4"}),"Light"]}),a.jsxs(vu,{onClick:()=>e("dark"),children:[a.jsx(mw,{className:"mr-2 h-4 w-4"}),"Dark"]}),a.jsxs(vu,{onClick:()=>e("system"),children:[a.jsx(cO,{className:"mr-2 h-4 w-4"}),"System"]})]})]})}const VU=[{title:"Dashboard",url:"/",icon:Zl},{title:"Browse Jobs",url:"/jobs",icon:dr},{title:"Tracker",url:"/applications",icon:na},{title:"My Resumes",url:"/resumes",icon:ci},{title:"My Videos",url:"/videos",icon:nr},{title:"Profile",url:"/profile",icon:ec}],BU=[{title:"Dashboard",url:"/",icon:Zl},{title:"Job Postings",url:"/jobs",icon:Lt},{title:"Final Five",url:"/candidates",icon:ec},{title:"Interview Pipeline",url:"/pipeline",icon:pv},{title:"Applications",url:"/applications",icon:na},{title:"Emails",url:"/emails",icon:Ni},{title:"Calendar",url:"/calendar",icon:dv}];function zU(){var f;const{state:e}=rc(),t=e==="collapsed",n=On(),r=Jt(),s=p=>n.pathname===p,{mode:i}=Ir(),{user:o,signOut:l}=Or(),{highlightRoute:c}=Ov(),u=i==="candidate"?VU:BU,d=i==="candidate"?"Candidate":"Recruiter",h=async()=>{await l(),r("/auth")};return a.jsxs(dN,{collapsible:"icon",children:[a.jsx(fN,{className:"h-14 border-b border-border/50",children:a.jsx(Em,{children:a.jsx(Tm,{children:a.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[a.jsx("img",{src:Vv,alt:"Volo AI",className:"h-8 w-8 rounded-lg shrink-0"}),!t&&a.jsxs("div",{className:"min-w-0",children:[a.jsx("h1",{className:"text-sm font-semibold text-foreground truncate",children:"Volo AI"}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:"Beyond the Resume."})]})]})})})}),a.jsx(mN,{children:a.jsxs(gN,{children:[a.jsx(vN,{children:d}),a.jsx(yN,{children:a.jsx(Em,{children:u.map(p=>a.jsxs(Tm,{className:"relative","data-tour-route":p.url,children:[c===p.url&&a.jsx("span",{className:"absolute inset-0 rounded-md ring-2 ring-primary animate-pulse pointer-events-none z-10"}),a.jsx(xN,{asChild:!0,isActive:s(p.url),children:a.jsxs(wN,{to:p.url,end:!0,className:"hover:bg-accent/50",activeClassName:"bg-accent text-primary font-medium",children:[a.jsx(p.icon,{className:"mr-2 h-4 w-4"}),!t&&a.jsx("span",{children:p.title})]})})]},p.title))})})]})}),a.jsxs(pN,{className:"border-t border-border/50 p-3 space-y-2",children:[!t&&o&&a.jsxs("div",{className:"px-2",children:[a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:((f=o.user_metadata)==null?void 0:f.full_name)||o.email}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:o.email})]}),!t&&a.jsx("div",{className:"px-2 pt-1 border-t border-border/30",children:a.jsx("p",{className:"text-xs font-medium text-foreground",children:"XYZ LLC"})}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Jv,{}),a.jsx(W,{variant:"ghost",size:"icon",onClick:h,className:"h-8 w-8",title:"Sign out",children:a.jsx(bk,{className:"h-4 w-4"})})]})]})]})}const Qv=m.createContext({});function Xv(e){const t=m.useRef(null);return t.current===null&&(t.current=e()),t.current}const HU=typeof window<"u",bE=HU?m.useLayoutEffect:m.useEffect,jh=m.createContext(null);function Zv(e,t){e.indexOf(t)===-1&&e.push(t)}function pd(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const lr=(e,t,n)=>n>t?t:n<e?e:n;let kh=()=>{},Ho=()=>{};const js={},SE=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function jE(e){return typeof e=="object"&&e!==null}const kE=e=>/^0[^.\s]+$/u.test(e);function CE(e){let t;return()=>(t===void 0&&(t=e()),t)}const ln=e=>e,WU=(e,t)=>n=>t(e(n)),ac=(...e)=>e.reduce(WU),Ll=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ey{constructor(){this.subscriptions=[]}add(t){return Zv(this.subscriptions,t),()=>pd(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const $t=e=>e*1e3,rn=e=>e/1e3;function NE(e,t){return t?e*(1e3/t):0}const EE=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qU=1e-7,KU=12;
vendor: 8,459 bytes, line 520
520function GU(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=EE(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>qU&&++l<KU);return o}function lc(e,t,n,r){if(e===t&&n===r)return ln;const s=i=>GU(i,0,1,e,n);return i=>i===0||i===1?i:EE(s(i),t,r)}const TE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_E=e=>t=>1-e(1-t),PE=lc(.33,1.53,.69,.99),ty=_E(PE),RE=TE(ty),AE=e=>e>=1?1:(e*=2)<1?.5*ty(e):.5*(2-Math.pow(2,-10*(e-1))),ny=e=>1-Math.sin(Math.acos(e)),ME=_E(ny),DE=TE(ny),YU=lc(.42,0,1,1),JU=lc(0,0,.58,1),OE=lc(.42,0,.58,1),QU=e=>Array.isArray(e)&&typeof e[0]!="number",IE=e=>Array.isArray(e)&&typeof e[0]=="number",v0={linear:ln,easeIn:YU,easeInOut:OE,easeOut:JU,circIn:ny,circInOut:DE,circOut:ME,backIn:ty,backInOut:RE,backOut:PE,anticipate:AE},XU=e=>typeof e=="string",y0=e=>{if(IE(e)){Ho(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return lc(t,n,r,s)}else if(XU(e))return Ho(v0[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),v0[e];return e},Kc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],x0={value:null,addProjectionMetrics:null};function ZU(e,t){let n=new Set,r=new Set,s=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,p=!1)=>{const g=p&&s?n:r;return f&&o.add(h),g.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(l=h,s){i=!0;return}s=!0;const f=n;n=r,r=f,n.forEach(u),t&&x0.value&&x0.value.frameloop[t].push(c),c=0,n.clear(),s=!1,i&&(i=!1,d.process(h))}};return d}const eV=40;function LE(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Kc.reduce((x,S)=>(x[S]=ZU(i,t?S:void 0),x),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:p,postRender:v}=o,g=()=>{const x=js.useManualTiming,S=x?s.timestamp:performance.now();n=!1,x||(s.delta=r?1e3/60:Math.max(Math.min(S-s.timestamp,eV),1)),s.timestamp=S,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),p.process(s),v.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},y=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:Kc.reduce((x,S)=>{const j=o[S];return x[S]=(k,C=!1,N=!1)=>(n||y(),j.schedule(k,C,N)),x},{}),cancel:x=>{for(let S=0;S<Kc.length;S++)o[Kc[S]].cancel(x)},state:s,steps:o}}const{schedule:ke,cancel:ks,state:ut,steps:Lf}=LE(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0);let yu;function tV(){yu=void 0}const kt={now:()=>(yu===void 0&&kt.set(ut.isProcessing||js.useManualTiming?ut.timestamp:performance.now()),yu),set:e=>{yu=e,queueMicrotask(tV)}},$E=e=>t=>typeof t=="string"&&t.startsWith(e),FE=$E("--"),nV=$E("var(--"),ry=e=>nV(e)?rV.test(e.split("/*")[0].trim()):!1,rV=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function w0(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const la={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},$l={...la,transform:e=>lr(0,1,e)},Gc={...la,default:1},Za=e=>Math.round(e*1e5)/1e5,sy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sV(e){return e==null}const iV=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,iy=(e,t)=>n=>!!(typeof n=="string"&&iV.test(n)&&n.startsWith(e)||t&&!sV(n)&&Object.prototype.hasOwnProperty.call(n,t)),UE=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(sy);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},oV=e=>lr(0,255,e),$f={...la,transform:e=>Math.round(oV(e))},Zs={test:iy("rgb","red"),parse:UE("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$f.transform(e)+", "+$f.transform(t)+", "+$f.transform(n)+", "+Za($l.transform(r))+")"};function aV(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const Rm={test:iy("#"),parse:aV,transform:Zs.transform},cc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kr=cc("deg"),ir=cc("%"),X=cc("px"),lV=cc("vh"),cV=cc("vw"),b0={...ir,parse:e=>ir.parse(e)/100,transform:e=>ir.transform(e*100)},co={test:iy("hsl","hue"),parse:UE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ir.transform(Za(t))+", "+ir.transform(Za(n))+", "+Za($l.transform(r))+")"},Ge={test:e=>Zs.test(e)||Rm.test(e)||co.test(e),parse:e=>Zs.test(e)?Zs.parse(e):co.test(e)?co.parse(e):Rm.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Zs.transform(e):co.transform(e),getAnimatableNone:e=>{const t=Ge.parse(e);return t.alpha=0,Ge.transform(t)}},uV=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function dV(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(sy))==null?void 0:t.length)||0)+(((n=e.match(uV))==null?void 0:n.length)||0)>0}const VE="number",BE="color",hV="var",fV="var(",S0="${}",pV=/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 Wo(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(pV,c=>(Ge.test(c)?(r.color.push(i),s.push(BE),n.push(Ge.parse(c))):c.startsWith(fV)?(r.var.push(i),s.push(hV),n.push(c)):(r.number.push(i),s.push(VE),n.push(parseFloat(c))),++i,S0)).split(S0);return{values:n,split:l,indexes:r,types:s}}function mV(e){return Wo(e).values}function zE({split:e,types:t}){const n=e.length;return r=>{let s="";for(let i=0;i<n;i++)if(s+=e[i],r[i]!==void 0){const o=t[i];o===VE?s+=Za(r[i]):o===BE?s+=Ge.transform(r[i]):s+=r[i]}return s}}function gV(e){return zE(Wo(e))}const vV=e=>typeof e=="number"?0:Ge.test(e)?Ge.getAnimatableNone(e):e,yV=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:vV(e);function xV(e){const t=Wo(e);return zE(t)(t.values.map((r,s)=>yV(r,t.split[s])))}const Rn={test:dV,parse:mV,createTransformer:gV,getAnimatableNone:xV};function Ff(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function wV({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=Ff(c,l,e+1/3),i=Ff(c,l,e),o=Ff(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function md(e,t){return n=>n>0?t:e}const _e=(e,t,n)=>e+(t-e)*n,Uf=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},bV=[Rm,Zs,co],SV=e=>bV.find(t=>t.test(e));function j0(e){const t=SV(e);if(kh(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===co&&(n=wV(n)),n}const k0=(e,t)=>{const n=j0(e),r=j0(t);if(!n||!r)return md(e,t);const s={...n};return i=>(s.red=Uf(n.red,r.red,i),s.green=Uf(n.green,r.green,i),s.blue=Uf(n.blue,r.blue,i),s.alpha=_e(n.alpha,r.alpha,i),Zs.transform(s))},Am=new Set(["none","hidden"]);function jV(e,t){return Am.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kV(e,t){return n=>_e(e,t,n)}function oy(e){return typeof e=="number"?kV:typeof e=="string"?ry(e)?md:Ge.test(e)?k0:EV:Array.isArray(e)?HE:typeof e=="object"?Ge.test(e)?k0:CV:md}function HE(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>oy(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function CV(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=oy(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function NV(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],o=e.indexes[i][r[i]],l=e.values[o]??0;n[s]=l,r[i]++}return n}const EV=(e,t)=>{const n=Rn.createTransformer(t),r=Wo(e),s=Wo(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Am.has(e)&&!s.values.length||Am.has(t)&&!r.values.length?jV(e,t):ac(HE(NV(r,s),s.values),n):(kh(!0,`Complex values '${e}' and '${t}
520' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),md(e,t))};function WE(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?_e(e,t,n):oy(e)(e,t)}const TV=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>ks(t),now:()=>ut.isProcessing?ut.timestamp:kt.now()}},qE=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=Math.round(e(i/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},gd=2e4;function ay(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<gd;)t+=n,r=e.next(t);return t>=gd?1/0:t}function _V(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(ay(r),gd);return{type:"keyframes",ease:i=>r.next(s*i).value/t,duration:rn(s)}}const Me={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Mm(e,t){return e*Math.sqrt(1-t*t)}const PV=12;function RV(e,t,n){let r=n;for(let s=1;s<PV;s++)r=r-e(r)/t(r);return r}const Vf=.001;function AV({duration:e=Me.duration,bounce:t=Me.bounce,velocity:n=Me.velocity,mass:r=Me.mass}){let s,i;kh(e<=$t(Me.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=lr(Me.minDamping,Me.maxDamping,o),e=lr(Me.minDuration,Me.maxDuration,rn(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,p=Mm(u,o),v=Math.exp(-h);return Vf-f/p*v},i=u=>{const h=u*o*e,f=h*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-h),g=Mm(Math.pow(u,2),o);return(-s(u)+Vf>0?-1:1)*((f-p)*v)/g}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Vf+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=RV(s,i,l);if(e=$t(e),isNaN(c))return{stiffness:Me.stiffness,damping:Me.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const MV=["duration","bounce"],DV=["stiffness","damping","mass"];function C0(e,t){return t.some(n=>e[n]!==void 0)}function OV(e){let t={velocity:Me.velocity,stiffness:Me.stiffness,damping:Me.damping,mass:Me.mass,isResolvedFromDuration:!1,...e};if(!C0(e,DV)&&C0(e,MV))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*lr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Me.mass,stiffness:s,damping:i}}else{const n=AV({...e,velocity:0});t={...t,...n,mass:Me.mass},t.isResolvedFromDuration=!0}return t}function vd(e=Me.visualDuration,t=Me.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=OV({...n,velocity:-rn(n.velocity||0)}),v=f||0,g=u/(2*Math.sqrt(c*d)),y=o-i,b=rn(Math.sqrt(c/d)),w=Math.abs(y)<5;r||(r=w?Me.restSpeed.granular:Me.restSpeed.default),s||(s=w?Me.restDelta.granular:Me.restDelta.default);let x,S,j,k,C,N;if(g<1)j=Mm(b,g),k=(v+g*b*y)/j,x=E=>{const M=Math.exp(-g*b*E);return o-M*(k*Math.sin(j*E)+y*Math.cos(j*E))},C=g*b*k+y*j,N=g*b*y-k*j,S=E=>Math.exp(-g*b*E)*(C*Math.sin(j*E)+N*Math.cos(j*E));else if(g===1){x=M=>o-Math.exp(-b*M)*(y+(v+b*y)*M);const E=v+b*y;S=M=>Math.exp(-b*M)*(b*E*M-v)}else{const E=b*Math.sqrt(g*g-1);x=I=>{const K=Math.exp(-g*b*I),$=Math.min(E*I,300);return o-K*((v+g*b*y)*Math.sinh($)+E*y*Math.cosh($))/E};const M=(v+g*b*y)/E,O=g*b*M-y*E,H=g*b*y-M*E;S=I=>{const K=Math.exp(-g*b*I),$=Math.min(E*I,300);return K*(O*Math.sinh($)+H*Math.cosh($))}}const _={calculatedDuration:p&&h||null,velocity:E=>$t(S(E)),next:E=>{if(!p&&g<1){const O=Math.exp(-g*b*E),H=Math.sin(j*E),I=Math.cos(j*E),K=o-O*(k*H+y*I),$=$t(O*(C*H+N*I));return l.done=Math.abs($)<=r&&Math.abs(o-K)<=s,l.value=l.done?o:K,l}const M=x(E);if(p)l.done=E>=h;else{const O=$t(S(E));l.done=Math.abs(O)<=r&&Math.abs(o-M)<=s}return l.value=l.done?o:M,l},toString:()=>{const E=Math.min(ay(_),gd),M=qE(O=>_.next(E*O).value,E,30);return E+"ms "+M},toTransition:()=>{}};return _}vd.applyToOptions=e=>{const t=_V(e,100,vd);return e.ease=t.ease,e.duration=$t(t.duration),e.type="keyframes",e};const IV=5;function KE(e,t,n){const r=Math.max(t-IV,0);return NE(n-e(r),t-r)}function Dm({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},p=N=>l!==void 0&&N<l||c!==void 0&&N>c,v=N=>l===void 0?c:c===void 0||Math.abs(l-N)<Math.abs(c-N)?l:c;let g=n*t;const y=h+g,b=o===void 0?y:o(y);b!==y&&(g=b-h);const w=N=>
vendor: 15,710 bytes, line 520
520-g*Math.exp(-N/r),x=N=>b+w(N),S=N=>{const _=w(N),E=x(N);f.done=Math.abs(_)<=u,f.value=f.done?b:E};let j,k;const C=N=>{p(f.value)&&(j=N,k=vd({keyframes:[f.value,v(f.value)],velocity:KE(x,N,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:N=>{let _=!1;return!k&&j===void 0&&(_=!0,S(N),C(N)),j!==void 0&&N>=j?k.next(N-j):(!_&&S(N),f)}}}function LV(e,t,n){const r=[],s=n||js.mix||WE,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||ln:t;l=ac(c,l)}r.push(l)}return r}function $V(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Ho(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=LV(t,r,s),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Ll(e[h],e[h+1],d);return l[h](f)};return n?d=>u(lr(e[0],e[i-1],d)):u}function FV(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Ll(0,t,r);e.push(_e(n,1,s))}}function UV(e){const t=[0];return FV(t,e.length-1),t}function VV(e,t){return e.map(n=>n*t)}function BV(e,t){return e.map(()=>t||OE).splice(0,e.length-1)}function el({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=QU(r)?r.map(y0):y0(r),i={done:!1,value:t[0]},o=VV(n&&n.length===t.length?n:UV(t),e),l=$V(o,t,{ease:Array.isArray(s)?s:BV(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const zV=e=>e!==null;function Ch(e,{repeat:t,repeatType:n="loop"},r,s=1){const i=e.filter(zV),l=s<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const HV={decay:Dm,inertia:Dm,tween:el,keyframes:el,spring:vd};function GE(e){typeof e.type=="string"&&(e.type=HV[e.type])}class ly{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const WV=e=>e/100;class yd extends ly{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 r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==kt.now()&&this.tick(kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;GE(t);const{type:n=el,repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const c=n||el;c!==el&&typeof l[0]!="number"&&(this.mixKeyframes=ac(WV,WE(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ay(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:p,type:v,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const b=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,S=r;if(h){const N=Math.min(this.currentTime,s)/l;let _=Math.floor(N),E=N%1;!E&&N>=1&&(E=1),E===1&&_--,_=Math.min(_,h+1),!!(_%2)&&(f==="reverse"?(E=1-E,p&&(E-=p/l)):f==="mirror"&&(S=o)),x=lr(0,1,E)*l}let j;w?(this.delayState.value=d[0],j=this.delayState):j=S.next(x),i&&!w&&(j.value=i(j.value));let{done:k}=j;!w&&c!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return C&&v!==Dm&&(j.value=Ch(d,this.options,y,this.speed)),g&&g(j.value),C&&this.finish(),j}then(t,n){return this.finished.then(t,n)}get duration(){return rn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rn(t)}get time(){return rn(this.currentTime)}set time(t){t=$t(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(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return KE(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(kt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=rn(this.currentTime))}play(){var s,i;if(this.isStopped)return;const{driver:t=TV,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(s=this.options).onPlay)==null||i.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(kt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.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 n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function qV(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ei=e=>e*180/Math.PI,Om=e=>{const t=ei(Math.atan2(e[1],e[0]));return Im(t)},KV={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Om,rotateZ:Om,skewX:e=>ei(Math.atan(e[1])),skewY:e=>ei(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Im=e=>(e=e%360,e<0&&(e+=360),e),N0=Om,E0=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),T0=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GV={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E0,scaleY:T0,scale:e=>(E0(e)+T0(e))/2,rotateX:e=>Im(ei(Math.atan2(e[6],e[5]))),rotateY:e=>Im(ei(Math.atan2(-e[2],e[0]))),rotateZ:N0,rotate:N0,skewX:e=>ei(Math.atan(e[4])),skewY:e=>ei(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Lm(e){return e.includes("scale")?1:0}function $m(e,t){if(!e||e==="none")return Lm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=GV,s=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=KV,s=l}if(!s)return Lm(t);const i=r[t],o=s[1].split(",").map(JV);return typeof i=="function"?i(o):o[i]}const YV=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $m(n,t)};function JV(e){return parseFloat(e.trim())}const ca=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ua=new Set(ca),_0=e=>e===la||e===X,QV=new Set(["x","y","z"]),XV=ca.filter(e=>!QV.has(e));function ZV(e){const t=[];return XV.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const cs={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>$m(t,"x"),y:(e,{transform:t})=>$m(t,"y")};cs.translateX=cs.x;cs.translateY=cs.y;const ui=new Set;let Fm=!1,Um=!1,Vm=!1;function YE(){if(Um){const e=Array.from(ui).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=ZV(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Um=!1,Fm=!1,ui.forEach(e=>e.complete(Vm)),ui.clear()}function JE(){ui.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Um=!0)})}function eB(){Vm=!0,JE(),YE(),Vm=!1}class cy{constructor(t,n,r,s,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ui.add(this),Fm||(Fm=!0,ke.read(JE),ke.resolveKeyframes(YE))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const i=s==null?void 0:s.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),s&&i===void 0&&s.set(t[0])}qV(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ui.delete(this)}cancel(){this.state==="scheduled"&&(ui.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const tB=e=>e.startsWith("--");function QE(e,t,n){tB(t)?e.style.setProperty(t,n):e.style[t]=n}const nB={};function XE(e,t){const n=CE(e);return()=>nB[t]??n()}const rB=XE(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ZE=XE(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$a=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,P0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$a([0,.65,.55,1]),circOut:$a([.55,0,1,.45]),backIn:$a([.31,.01,.66,-.59]),backOut:$a([.33,1.53,.69,.99])};function eT(e,t){if(e)return typeof e=="function"?ZE()?qE(e,t):"ease-out":IE(e)?$a(e):Array.isArray(e)?e.map(n=>eT(n,t)||P0.easeOut):P0[e]}function sB(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=eT(l,s);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function tT(e){return typeof e=="function"&&"applyToOptions"in e}function iB({type:e,...t}){return tT(e)&&ZE()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class nT extends ly{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,Ho(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=iB(t);this.animation=sB(n,r,s,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=Ch(s,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),QE(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.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 n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return rn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+rn(t)}get time(){return rn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$t(t),n&&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,rangeStart:n,rangeEnd:r,observe:s}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&rB()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),ln):s(this)}}const rT={anticipate:AE,backInOut:RE,circInOut:DE};function oB(e){return e in rT}function aB(e){typeof e.ease=="string"&&oB(e.ease)&&(e.ease=rT[e.ease])}const Bf=10;class lB extends nT{constructor(t){aB(t),GE(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new yd({...o,autoplay:!1}),c=Math.max(Bf,kt.now()-this.startTime),u=lr(0,Bf,c-Bf),d=l.sample(c).value,{name:h}=this.options;i&&h&&QE(i,h,d),n.setWithVelocity(l.sample(Math.max(0,c-u)).value,d,u),l.stop()}}const R0=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Rn.test(e)||e==="0")&&!e.startsWith("url("));function cB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function uB(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=R0(s,t),l=R0(i,t);return kh(o===l,`You are trying to animate ${t} from "${s}" to "${i}". "${o?i:s}" is not an animatable value.`,"value-not-animatable"),!o||!l?!1:cB(e)||(n==="spring"||tT(n))&&r}function Bm(e){e.duration=0,e.type="keyframes"}const sT=new Set(["opacity","clipPath","filter","transform"]),dB=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function hB(e){for(let t=0;t<e.length;
520t++)if(typeof e[t]=="string"&&dB.test(e[t]))return!0;return!1}const fB=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),pB=CE(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mB(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:i,type:o,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=t.owner.getProps();return pB()&&n&&(sT.has(n)||fB.has(n)&&hB(l))&&(n!=="transform"||!d)&&!u&&!r&&s!=="mirror"&&i!==0&&o!=="inertia"}const gB=40;class vB extends ly{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var v;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=kt.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...h},p=(d==null?void 0:d.KeyframeResolver)||cy;this.keyframeResolver=new p(l,(g,y,b)=>this.onKeyframesResolved(g,y,f,!b),c,u,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,s){var b,w;this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=kt.now();let h=!0;uB(t,i,o,l)||(h=!1,(js.instantAnimations||!c)&&(d==null||d(Ch(t,r,n))),t[0]=t[t.length-1],Bm(r),r.repeat=0);const p={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>gB?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},v=h&&!u&&mB(p),g=(w=(b=p.motionValue)==null?void 0:b.owner)==null?void 0:w.current;let y;if(v)try{y=new lB({...p,element:g})}catch{y=new yd(p)}else y=new yd(p);y.finished.then(()=>{this.notifyFinished()}).catch(ln),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),eB()),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 iT(e,t,n,r=0,s=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):s===1?i*r:l-i*r}const yB=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xB(e){const t=yB.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const wB=4;function oT(e,t,n=1){Ho(n<=wB,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=xB(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return SE(o)?parseFloat(o):o}return ry(s)?oT(s,t,n+1):s}const bB={type:"spring",stiffness:500,damping:25,restSpeed:10},SB=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jB={type:"keyframes",duration:.8},kB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},CB=(e,{keyframes:t})=>t.length>2?jB:ua.has(e)?e.startsWith("scale")?SB(t[1]):bB:kB;function aT(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function uy(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?aT(n,e):n}const NB=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function EB(e){for(const t in e)if(!NB.has(t))return!0;return!1}const dy=(e,t,n,r={},s,i)=>o=>{const l=uy(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-$t(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};EB(l)||Object.assign(d,CB(e,d)),d.duration&&(d.duration=$t(d.duration)),d.repeatDelay&&(d.repeatDelay=$t(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Bm(d),d.delay===0&&(h=!0)),(js.instantAnimations||js.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(h=!0,Bm(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!i&&t.get()!==void 0){const f=Ch(d.keyframes,l);if(f!==void 0){ke.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new yd(d):new vB(d)};function A0(e){const t=[{},{}];
vendor: 60,392 bytes, line 520
520return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function hy(e,t,n,r){if(typeof t=="function"){const[s,i]=A0(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=A0(r);t=t(n!==void 0?n:e.custom,s,i)}return t}function di(e,t,n){const r=e.getProps();return hy(r,t,n!==void 0?n:r.custom,e)}const lT=new Set(["width","height","top","left","right","bottom",...ca]),M0=30,TB=e=>!isNaN(parseFloat(e));class _B{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const s=kt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=TB(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ey);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}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=kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>M0)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,M0);return NE(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function qo(e,t){return new _B(e,t)}const zm=e=>Array.isArray(e);function PB(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,qo(n))}function RB(e){return zm(e)?e[e.length-1]||0:e}function AB(e,t){const n=di(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=RB(i[o]);PB(e,o,l)}}const dt=e=>!!(e&&e.getVelocity);function MB(e){return!!(dt(e)&&e.add)}function Hm(e,t){const n=e.getValue("willChange");if(MB(n))return n.add(t);if(!n&&js.WillChange){const r=new js.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function fy(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const DB="framerAppearId",cT="data-"+fy(DB);function uT(e){return e.props[cT]}function OB({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function dT(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i,transitionEnd:o,...l}=t;const c=e.getDefaultTransition();i=i?aT(i,c):c;const u=i==null?void 0:i.reduceMotion;r&&(i=r);const d=[],h=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const p=e.getValue(f,e.latestValues[f]??null),v=l[f];if(v===void 0||h&&OB(h,f))continue;const g={delay:n,...uy(i||{},f)},y=p.get();if(y!==void 0&&!p.isAnimating()&&!Array.isArray(v)&&v===y&&!g.velocity){ke.update(()=>p.set(v));continue}let b=!1;if(window.MotionHandoffAnimation){const S=uT(e);if(S){const j=window.MotionHandoffAnimation(S,f,ke);j!==null&&(g.startTime=j,b=!0)}}Hm(e,f);const w=u??e.shouldReduceMotion;p.start(dy(f,p,v,w&&lT.has(f)?{type:!1}:g,e,b));const x=p.animation;x&&d.push(x)}if(o){const f=()=>ke.update(()=>{o&&AB(e,o)});d.length?Promise.all(d).then(f):f()}return d}function Wm(e,t,n={}){var c;const r=di(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(dT(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=s;return IB(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function IB(e,t,n=0,r=0,s=0,i=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(Wm(c,t,{...o,delay:n+(typeof r=="function"?0:r)+iT(e.variantChildren,c,r,s,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function LB(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Wm(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Wm(e,t,n);else{const s=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(dT(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const $B={test:e=>e==="auto",parse:e=>e},hT=e=>t=>t.test(e),fT=[la,X,ir,Kr,cV,lV,$B],D0=e=>fT.find(hT(e));function FB(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||kE(e):!0}const UB=new Set(["brightness","contrast","saturate","opacity"]);function VB(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(sy)||[];if(!r)return e;const s=n.replace(r,"");let i=UB.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const BB=/\b([a-z-]*)\(.*?\)/gu,qm={...Rn,getAnimatableNone:e=>{const t=e.match(BB);return t?t.map(VB).join(" "):e}},Km={...Rn,getAnimatableNone:e=>{const t=Rn.parse(e);return Rn.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},O0={...la,transform:Math.round},zB={rotate:Kr,rotateX:Kr,rotateY:Kr,rotateZ:Kr,scale:Gc,scaleX:Gc,scaleY:Gc,scaleZ:Gc,skew:Kr,skewX:Kr,skewY:Kr,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:$l,originX:b0,originY:b0,originZ:X},py={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,inset:X,insetBlock:X,insetBlockStart:X,insetBlockEnd:X,insetInline:X,insetInlineStart:X,insetInlineEnd:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,paddingBlock:X,paddingBlockStart:X,paddingBlockEnd:X,paddingInline:X,paddingInlineStart:X,paddingInlineEnd:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,marginBlock:X,marginBlockStart:X,marginBlockEnd:X,marginInline:X,marginInlineStart:X,marginInlineEnd:X,fontSize:X,backgroundPositionX:X,backgroundPositionY:X,...zB,zIndex:O0,fillOpacity:$l,strokeOpacity:$l,numOctaves:O0},HB={...py,color:Ge,backgroundColor:Ge,outlineColor:Ge,fill:Ge,stroke:Ge,borderColor:Ge,borderTopColor:Ge,borderRightColor:Ge,borderBottomColor:Ge,borderLeftColor:Ge,filter:qm,WebkitFilter:qm,mask:Km,WebkitMask:Km},pT=e=>HB[e],WB=new Set([qm,Km]);function mT(e,t){let n=pT(e);return WB.has(n)||(n=Rn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const qB=new Set(["auto","none","0"]);function KB(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!qB.has(i)&&Wo(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=mT(n,s)}class GB extends cy{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),ry(h))){const f=oT(h,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!lT.has(r)||t.length!==2)return;const[s,i]=t,o=D0(s),l=D0(i),c=w0(s),u=w0(i);if(c!==u&&cs[r]){this.needsMeasurement=!0;return}if(o!==l)if(_0(o)&&_0(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else cs[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||FB(t[s]))&&r.push(s);r.length&&KB(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cs[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=cs[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function gT(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const s=document.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const vT=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xu(e){return jE(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:my,cancel:$7}=LE(queueMicrotask,!1),wn={x:!1,y:!1};function yT(){return wn.x||wn.y}function YB(e){return e==="x"||e==="y"?wn[e]?null:(wn[e]=!0,()=>{wn[e]=!1}):wn.x||wn.y?null:(wn.x=wn.y=!0,()=>{wn.x=wn.y=!1})}function xT(e,t){const n=gT(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function JB(e){return!(e.pointerType==="touch"||yT())}function QB(e,t,n={}){const[r,s,i]=xT(e,n);return r.forEach(o=>{let l=!1,c=!1,u;const d=()=>{o.removeEventListener("pointerleave",v)},h=y=>{u&&(u(y),u=void 0),d()},f=y=>{l=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(y))},p=()=>{l=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},v=y=>{if(y.pointerType!=="touch"){if(l){c=!0;return}h(y)}},g=y=>{if(!JB(y))return;c=!1;const b=t(o,y);typeof b=="function"&&(u=b,o.addEventListener("pointerleave",v,s))};o.addEventListener("pointerenter",g,s),o.addEventListener("pointerdown",p,s)}),i}const wT=(e,t)=>t?e===t?!0:wT(e,t.parentElement):!1,gy=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,XB=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZB(e){return XB.has(e.tagName)||e.isContentEditable===!0}const e8=new Set(["INPUT","SELECT","TEXTAREA"]);function t8(e){return e8.has(e.tagName)||e.isContentEditable===!0}const wu=new WeakSet;function I0(e){return t=>{t.key==="Enter"&&e(t)}}function zf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const n8=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=I0(()=>{if(wu.has(n))return;zf(n,"down");const s=I0(()=>{zf(n,"up")}),i=()=>zf(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function L0(e){return gy(e)&&!yT()}const $0=new WeakSet;function r8(e,t,n={}){const[r,s,i]=xT(e,n),o=l=>{const c=l.currentTarget;if(!L0(l)||$0.has(l))return;wu.add(c),n.stopPropagation&&$0.add(l);const u=t(c,l),d=(p,v)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),wu.has(c)&&wu.delete(c),L0(p)&&typeof u=="function"&&u(p,{success:v})},h=p=>{d(p,c===window||c===document||n.useGlobalTarget||wT(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),xu(l)&&(l.addEventListener("focus",u=>n8(u,s)),!ZB(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function vy(e){return jE(e)&&"ownerSVGElement"in e}const bu=new WeakMap;let Gr;const bT=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:vy(r)&&"getBBox"in r?r.getBBox()[t]:r[n],s8=bT("inline","width","offsetWidth"),i8=bT("block","height","offsetHeight");function o8({target:e,borderBoxSize:t}){var n;(n=bu.get(e))==null||n.forEach(r=>{r(e,{get width(){return s8(e,t)},get height(){return i8(e,t)}})})}function a8(e){e.forEach(o8)}function l8(){typeof ResizeObserver>"u"||(Gr=new ResizeObserver(a8))}function c8(e,t){Gr||l8();const n=gT(e);return n.forEach(r=>{let s=bu.get(r);s||(s=new Set,bu.set(r,s)),s.add(t),Gr==null||Gr.observe(r)}),()=>{n.forEach(r=>{const s=bu.get(r);s==null||s.delete(t),s!=null&&s.size||Gr==null||Gr.unobserve(r)})}}const Su=new Set;let uo;function u8(){uo=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Su.forEach(t=>t(e))},window.addEventListener("resize",uo)}function d8(e){return Su.add(e),uo||u8(),()=>{Su.delete(e),!Su.size&&typeof uo=="function"&&(window.removeEventListener("resize",uo),uo=void 0)}}function F0(e,t){return typeof e=="function"?d8(e):c8(e,t)}function h8(e){return vy(e)&&e.tagName==="svg"}const f8=[...fT,Ge,Rn],p8=e=>f8.find(hT(e)),U0=()=>({translate:0,scale:1,origin:0,originPoint:0}),ho=()=>({x:U0(),y:U0()}),V0=()=>({min:0,max:0}),Je=()=>({x:V0(),y:V0()}),m8=new WeakMap;function Nh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Fl(e){return typeof e=="string"||Array.isArray(e)}const yy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xy=["initial",...yy];function Eh(e){return Nh(e.animate)||xy.some(t=>Fl(e[t]))}function ST(e){return!!(Eh(e)||e.variants)}function g8(e,t,n){for(const r in t){const s=t[r],i=n[r];if(dt(s))e.addValue(r,s);else if(dt(i))e.addValue(r,qo(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,qo(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Gm={current:null},jT={current:!1},v8=typeof window<"u";function y8(){if(jT.current=!0,!!v8)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Gm.current=e.matches;e.addEventListener("change",t),t()}else Gm.current=!1}const B0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let xd={};function kT(e){xd=e}function x8(){return xd}class w8{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:i,blockInitialAnimation:o,visualState:l},c={}){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=cy,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 p=kt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ke.render(this.render,!1,!0))};const{latestValues:u,renderState:d}=l;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=Eh(n),this.isVariantNode=ST(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const v=f[p];u[p]!==void 0&&dt(v)&&v.set(u[p])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,m8.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(jT.current||y8(),this.shouldReduceMotion=Gm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),ks(this.notifyUpdate),ks(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&sT.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:c,ease:u,duration:d}=n.accelerate,h=new nT({element:this.current,name:t,keyframes:l,times:c,ease:u,duration:$t(d)}),f=o(h);this.valueSubscriptions.set(t,()=>{f(),h.cancel()});return}const r=ua.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in xd){const n=xd[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<B0.length;r++){const s=B0[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=g8(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}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=qo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(SE(r)||kE(r))?r=parseFloat(r):!p8(r)&&Rn.test(n)&&(r=mT(t,n)),this.setBaseTarget(t,dt(r)?r.get():r)),dt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=hy(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!dt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ey),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){my.render(this.render)}}class CT extends w8{constructor(){super(...arguments),this.KeyframeResolver=GB}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;dt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ps{constructor(t){this.isMounted=!1,this.node=t}update(){}}function NT({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function b8({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function S8(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Hf(e){return e===void 0||e===1}function Ym({scale:e,scaleX:t,scaleY:n}){return!Hf(e)||!Hf(t)||!Hf(n)}function Ws(e){return Ym(e)||ET(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function ET(e){return z0(e.x)||z0(e.y)}function z0(e){return e&&e!=="0%"}function wd(e,t,n){const r=e-n,s=t*r;return n+s}function H0(e,t,n,r,s){return s!==void 0&&(e=wd(e,s,r)),wd(e,n,r)+t}function Jm(e,t=0,n=1,r,s){e.min=H0(e.min,t,n,r,s),e.max=H0(e.max,t,n,r,s)}function TT(e,{x:t,y:n}){Jm(e.x,t.translate,t.scale,t.originPoint),Jm(e.y,n.translate,n.scale,n.originPoint)}const W0=.999999999999,q0=1.0000000000001;function j8(e,t,n,r=!1){var l;const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let c=0;c<s;c++){i=n[c],o=i.projectionDelta;const{visualElement:u}=i.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Gn(e.x,-i.scroll.offset.x),Gn(e.y,-i.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,TT(e,o)),r&&Ws(i.latestValues)&&ju(e,i.latestValues,(l=i.layout)==null?void 0:l.layoutBox))}t.x<q0&&t.x>W0&&(t.x=1),t.y<q0&&t.y>W0&&(t.y=1)}function Gn(e,t){e.min+=t,e.max+=t}function K0(e,t,n,r,s=.5){const i=_e(e.min,e.max,s);Jm(e,t,n,i,r)}function G0(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function ju(e,t,n){const r=n??e;K0(e.x,G0(t.x,r.x),t.scaleX,t.scale,t.originX),K0(e.y,G0(t.y,r.y),t.scaleY,t.scale,t.originY)}function _T(e,t){return NT(S8(e.getBoundingClientRect(),t))}function k8(e,t,n){const r=_T(e,n),{scroll:s}=t;return s&&(Gn(r.x,s.offset.x),Gn(r.y,s.offset.y)),r}const C8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},N8=ca.length;function E8(e,t,n){let r="",s=!0;for(let i=0;i<N8;i++){const o=ca[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number")c=l===(o.startsWith("scale")?1:0);else{const u=parseFloat(l);c=o.startsWith("scale")?u===1:u===0}if(!c||n){const u=vT(l,py[o]);if(!c){s=!1;const d=C8[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function wy(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(ua.has(c)){o=!0;continue}else if(FE(c)){s[c]=u;continue}else{const d=vT(u,py[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=E8(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}function PT(e,{style:t,vars:n},r,s){const i=e.style;let o;for(o in t)i[o]=t[o];s==null||s.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function Y0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Na={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const n=Y0(e,t.target.x),r=Y0(e,t.target.y);return`${n}% ${r}%`}},T8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Rn.parse(e);if(s.length>5)return r;const i=Rn.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=_e(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}},Qm={borderRadius:{...Na,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Na,borderTopRightRadius:Na,borderBottomLeftRadius:Na,borderBottomRightRadius:Na,boxShadow:T8};function RT(e,{layout:t,layoutId:n}){return ua.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Qm[e]||e==="opacity")}function by(e,t,n){var o;const r=e.style,s=t==null?void 0:t.style,i={};if(!r)return i;for(const l in r)(dt(r[l])||s&&dt(s[l])||RT(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(i[l]=r[l]);return i}function _8(e){return window.getComputedStyle(e)}class P8 extends CT{constructor(){super(...arguments),this.type="html",this.renderInstance=PT}readValueFromInstance(t,n){var r;if(ua.has(n))return(r=this.projection)!=null&&r.isProjecting?Lm(n):YV(t,n);{const s=_8(t),i=(FE(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return _T(t,n)}build(t,n,r){wy(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return by(t,n,r)}}const R8={offset:"stroke-dashoffset",array:"stroke-dasharray"},A8={offset:"strokeDashoffset",array:"strokeDasharray"};function M8(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?R8:A8;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const D8=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function AT(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:i=1,pathOffset:o=0,...l},c,u,d){if(wy(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const p of D8)h[p]!==void 0&&(f[p]=h[p],delete h[p]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&M8(h,s,i,o,!1)}const MT=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"]),DT=e=>typeof e=="string"&&e.toLowerCase()==="svg";function O8(e,t,n,r){PT(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(MT.has(s)?s:fy(s),t.attrs[s])}function OT(e,t,n){const r=by(e,t,n);for(const s in e)if(dt(e[s])||dt(t[s])){const i=ca.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}class I8 extends CT{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ua.has(n)){const r=pT(n);return r&&r.default||0}return n=MT.has(n)?n:fy(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return OT(t,n,r)}build(t,n,r){AT(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){O8(t,n,r,s)}mount(t){this.isSVGTag=DT(t.tagName),super.mount(t)}}const L8=xy.length;function IT(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?IT(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<L8;n++){const r=xy[n],s=e.props[r];(Fl(s)||s===!1)&&(t[r]=s)}return t}function LT(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const $8=[...yy].reverse(),F8=yy.length;function U8(e){return t=>Promise.all(t.map(({animation:n,options:r})=>LB(e,n,r)))}function V8(e){let t=U8(e),n=J0(),r=!0,s=!1;const i=u=>(d,h)=>{var p;const f=di(e,h,u==="exit"?(p=e.presenceContext)==null?void 0:p.custom:void 0);if(f){const{transition:v,transitionEnd:g,...y}=f;d={...d,...y,...g}}return d};function o(u){t=u(e)}function l(u){const{props:d}=e,h=IT(e.parent)||{},f=[],p=new Set;let v={},g=1/0;for(let b=0;b<F8;b++){const w=$8[b],x=n[w],S=d[w]!==void 0?d[w]:h[w],j=Fl(S),k=w===u?x.isActive:null;k===!1&&(g=b);let C=S===h[w]&&S!==d[w]&&j;if(C&&(r||s)&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...v},!x.isActive&&k===null||!S&&!x.prevProp||Nh(S)||typeof S=="boolean")continue;if(w==="exit"&&x.isActive&&k!==!0){x.prevResolvedValues&&(v={...v,...x.prevResolvedValues});continue}const N=B8(x.prevProp,S);let _=N||w===u&&x.isActive&&!C&&j||b>g&&j,E=!1;const M=Array.isArray(S)?S:[S];let O=M.reduce(i(w),{});k===!1&&(O={});const{prevResolvedValues:H={}}=x,I={...H,...O},K=P=>{_=!0,p.has(P)&&(E=!0,p.delete(P)),x.needsAnimating[P]=!0;const T=e.getValue(P);T&&(T.liveStyle=!1)};for(const P in I){const T=O[P],R=H[P];if(v.hasOwnProperty(P))continue;let V=!1;zm(T)&&zm(R)?V=!LT(T,R):V=T!==R,V?T!=null?K(P):p.add(P):T!==void 0&&p.has(P)?K(P):x.protectedKeys[P]=!0}x.prevProp=S,x.prevResolvedValues=O,x.isActive&&(v={...v,...O}),(r||s)&&e.blockInitialAnimation&&(_=!1);const $=C&&N;_&&(!$||E)&&f.push(...M.map(P=>{const T={type:w};if(typeof P=="string"&&(r||s)&&!$&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,V=di(R,P);if(R.enteringChildren&&V){const{delayChildren:B}=V.transition||{};T.delay=iT(R.enteringChildren,e,B)}}return{animation:P,options:T}}))}if(p.size){const b={};if(typeof d.initial!="boolean"){const w=di(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(b.transition=w.transition)}p.forEach(w=>{const x=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),b[w]=x??null}),f.push({animation:b})}let y=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,s=!1,y?t(f):Promise.resolve()}function c(u,d){var f;if(n[u].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(p=>{var v;return(v=p.animationState)==null?void 0:v.setActive(u,d)}),n[u].isActive=d;const h=l(u);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:l,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=J0(),s=!0}}}function B8(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!LT(t,e):!1}function Fs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function J0(){return{animate:Fs(!0),whileInView:Fs(),whileHover:Fs(),whileTap:Fs(),whileDrag:Fs(),whileFocus:Fs(),exit:Fs()}}function Xm(e,t){e.min=t.min,e.max=t.max}function vn(e,t){Xm(e.x,t.x),Xm(e.y,t.y)}function Q0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const $T=1e-4,z8=1-$T,H8=1+$T,FT=.01,W8=0-FT,q8=0+FT;function Ct(e){return e.max-e.min}function K8(e,t,n){return Math.abs(e-t)<=n}function X0(e,t,n,r=.5){e.origin=r,e.originPoint=_e(t.min,t.max,e.origin),e.scale=Ct(n)/Ct(t),e.translate=_e(n.min,n.max,e.origin)-e.originPoint,(e.scale>=z8&&e.scale<=H8||isNaN(e.scale))&&(e.scale=1),(e.translate>=W8&&e.translate<=q8||isNaN(e.translate))&&(e.translate=0)}function tl(e,t,n,r){X0(e.x,t.x,n.x,r?r.originX:void 0),X0(e.y,t.y,n.y,r?r.originY:void 0)}function Z0(e,t,n,r=0){const s=r?_e(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Ct(t)}function G8(e,t,n,r){Z0(e.x,t.x,n.x,r==null?void 0:r.x),Z0(e.y,t.y,n.y,r==null?void 0:r.y)}function eb(e,t,n,r=0){const s=r?_e(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Ct(t)}function bd(e,t,n,r){eb(e.x,t.x,n.x,r==null?void 0:r.x),eb(e.y,t.y,n.y,r==null?void 0:r.y)}function tb(e,t,n,r,s){return e-=t,e=wd(e,1/n,r),s!==void 0&&(e=wd(e,1/s,r)),e}function Y8(e,t=0,n=1,r=.5,s,i=e,o=e){if(ir.test(t)&&(t=parseFloat(t),t=_e(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=_e(i.min,i.max,r);e===i&&(l-=t),e.min=tb(e.min,t,n,l,s),e.max=tb(e.max,t,n,l,s)}function nb(e,t,[n,r,s],i,o){Y8(e,t[n],t[r],t[s],t.scale,i,o)}const J8=["x","scaleX","originX"],Q8=["y","scaleY","originY"];function rb(e,t,n,r){nb(e.x,t,J8,n?n.x:void 0,r?r.x:void 0),nb(e.y,t,Q8,n?n.y:void 0,r?r.y:void 0)}function sb(e){return e.translate===0&&e.scale===1}function UT(e){return sb(e.x)&&sb(e.y)}function ib(e,t){return e.min===t.min&&e.max===t.max}function X8(e,t){return ib(e.x,t.x)&&ib(e.y,t.y)}function ob(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function VT(e,t){return ob(e.x,t.x)&&ob(e.y,t.y)}function ab(e){return Ct(e.x)/Ct(e.y)}function lb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Vn(e){return[e("x"),e("y")]}function Z8(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const BT=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],ez=BT.length,cb=e=>typeof e=="string"?parseFloat(e):e,ub=e=>typeof e=="number"||X.test(e);function tz(e,t,n,r,s,i){s?(e.opacity=_e(0,n.opacity??1,nz(r)),e.opacityExit=_e(t.opacity??1,0,rz(r))):i&&(e.opacity=_e(t.opacity??1,n.opacity??1,r));for(let o=0;o<ez;o++){const l=BT[o];let c=db(t,l),u=db(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||ub(c)===ub(u)?(e[l]=Math.max(_e(cb(c),cb(u),r),0),(ir.test(u)||ir.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=_e(t.rotate||0,n.rotate||0,r))}function db(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const nz=zT(0,.5,ME),rz=zT(.5,.95,ln);function zT(e,t,n){return r=>r<e?0:r>t?1:n(Ll(e,t,r))}function sz(e,t,n){const r=dt(e)?e:qo(e);return r.start(dy("",r,t,n)),r.animation}function Ul(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const iz=(e,t)=>e.depth-t.depth;class oz{constructor(){this.children=[],this.isDirty=!1}add(t){Zv(this.children,t),this.isDirty=!0}remove(t){pd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(iz),this.isDirty=!1,this.children.forEach(t)}}function az(e,t){const n=kt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(ks(r),e(i-t))};return ke.setup(r,!0),()=>ks(r)}function ku(e){return dt(e)?e.get():e}class lz{constructor(){this.members=[]}add(t){Zv(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(pd(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(pd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:i}=r.options,{layoutDependency:o}=t.options;(i===void 0||i!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,i,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(s=t.resumingFrom)==null?void 0:(i=s.options).onExitComplete)==null||o.call(i)})}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 Cu={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Wf=["","X","Y","Z"],cz=1e3;let uz=0;function qf(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function HT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=uT(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&HT(r)}function WT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=uz++,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.layoutVersion=0,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(fz),this.nodes.forEach(xz),this.nodes.forEach(wz),this.nodes.forEach(pz)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new oz)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ey),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=vy(o)&&!h8(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{h=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,d&&d(),d=az(f,250),Cu.hasAnimatedSinceResize&&(Cu.hasAnimatedSinceResize=!1,this.nodes.forEach(pb)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||Cz,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),b=!this.targetLayout||!VT(this.targetLayout,p),w=!h&&f;if(this.options.layoutRoot||this.resumeFrom||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...uy(v,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,w)}else h||pb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ks(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(bz),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&HT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(gz),this.nodes.forEach(hb);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fb);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vz),this.nodes.forEach(yz),this.nodes.forEach(dz),this.nodes.forEach(hz)):this.nodes.forEach(fb),this.clearAllSnapshots();const l=kt.now();ut.delta=lr(0,1e3/60,l-ut.timestamp),ut.timestamp=l,ut.isProcessing=!0,Lf.update.process(ut),Lf.preRender.process(ut),Lf.render.process(ut),ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,my.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mz),this.sharedNodes.forEach(Sz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!UT(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||Ws(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),Nz(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Je();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Ez))){const{scroll:d}=this.root;d&&(Gn(l.x,d.offset.x),Gn(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=Je();if(vn(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&vn(l,o),Gn(l.x,h.offset.x),Gn(l.y,h.offset.y))}return l}applyTransform(o,l=!1,c){var d,h;const u=c||Je();vn(u,o);for(let f=0;f<this.path.length;f++){const p=this.path[f];!l&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Gn(u.x,-p.scroll.offset.x),Gn(u.y,-p.scroll.offset.y)),Ws(p.latestValues)&&ju(u,p.latestValues,(d=p.layout)==null?void 0:d.layoutBox)}return Ws(this.latestValues)&&ju(u,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),u}removeTransform(o){var c;const l=Je();vn(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!Ws(d.latestValues))continue;let h;d.instance&&(Ym(d.latestValues)&&d.updateSnapshot(),h=Je(),vn(h,d.measurePageBox())),rb(l,d.latestValues,(c=d.snapshot)==null?void 0:c.layoutBox,h)}return Ws(this.latestValues)&&rb(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ut.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var p;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=ut.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.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(),G8(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):vn(this.target,this.layout.layoutBox),TT(this.target,this.targetDelta)):vn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ym(this.parent.latestValues)||ET(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),bd(this.relativeTargetOrigin,l,c,this.options.layoutAnchor||void 0),vn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ut.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;vn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;j8(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Je());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Q0(this.prevProjectionDelta.x,this.projectionDelta.x),Q0(this.prevProjectionDelta.y,this.projectionDelta.y)),tl(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!lb(this.projectionDelta.x,this.prevProjectionDelta.x)||!lb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ho(),this.projectionDelta=ho(),this.projectionDeltaWithTransform=ho()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=ho();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Je(),p=c?c.source:void 0,v=this.layout?this.layout.source:void 0,g=p!==v,y=this.getStack(),b=!y||y.members.length<=1,w=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(kz));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const j=S/1e3;mb(h.x,o.x,j),mb(h.y,o.y,j),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(bd(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),jz(this.relativeTarget,this.relativeTargetOrigin,f,j),x&&X8(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Je()),vn(x,this.relativeTarget)),g&&(this.animationValues=d,tz(d,u,this.latestValues,j,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ks(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Cu.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=qo(0)),this.motionValue.jump(0,!1),this.currentAnimation=sz(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cz),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&qT(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Je();const h=Ct(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=Ct(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}vn(l,c),ju(l,d),tl(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new lz),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&qf("z",o,u,this.animationValues);for(let d=0;d<Wf.length;d++)qf(`rotate${Wf[d]}`,o,u,this.animationValues),qf(`skew${Wf[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ku(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ku(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Ws(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Z8(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in Qm){if(d[v]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:b}=Qm[v],w=h==="none"?d[v]:g(d[v],u);if(y){const x=y.length;for(let S=0;S<x;S++)o[y[S]]=w}else b?this.options.visualElement.renderState.vars[v]=w:o[v]=w}this.options.layoutId&&(o.pointerEvents=u===this?ku(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(hb),this.root.sharedNodes.clear()}}}function dz(e){e.updateLayout()}function hz(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;if(i==="size")Vn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=Ct(f);f.min=r[h].min,f.max=f.min+p});else if(i==="x"||i==="y"){const h=i==="x"?"y":"x";Xm(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else qT(i,t.layoutBox,r)&&Vn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],p=Ct(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const l=ho();tl(l,r,t.layoutBox);const c=ho();o?tl(c,e.applyTransform(s,!0),t.measuredBox):tl(c,r,t.layoutBox);const u=!UT(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const v=e.options.layoutAnchor||void 0,g=Je();bd(g,t.layoutBox,f.layoutBox,v);const y=Je();bd(y,r,p.layoutBox,v),VT(g,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function fz(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 pz(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mz(e){e.clearSnapshot()}function hb(e){e.clearMeasurements()}function gz(e){e.isLayoutDirty=!0,e.updateLayout()}function fb(e){e.isLayoutDirty=!1}function vz(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function yz(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function pb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xz(e){e.resolveTargetDelta()}function wz(e){e.calcProjection()}
520function bz(e){e.resetSkewAndRotation()}function Sz(e){e.removeLeadSnapshot()}function mb(e,t,n){e.translate=_e(t.translate,0,n),e.scale=_e(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function gb(e,t,n,r){e.min=_e(t.min,n.min,r),e.max=_e(t.max,n.max,r)}function jz(e,t,n,r){gb(e.x,t.x,n.x,r),gb(e.y,t.y,n.y,r)}function kz(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Cz={duration:.45,ease:[.4,0,.1,1]},vb=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yb=vb("applewebkit/")&&!vb("chrome/")?Math.round:ln;function xb(e){e.min=yb(e.min),e.max=yb(e.max)}function Nz(e){xb(e.x),xb(e.y)}function qT(e,t,n){return e==="position"||e==="preserve-aspect"&&!K8(ab(t),ab(n),.2)}function Ez(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Tz=WT({attachResizeListener:(e,t)=>Ul(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}),Kf={current:void 0},KT=WT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kf.current){const e=new Tz({});e.mount(window),e.setOptions({layoutScroll:!0}),Kf.current=e}return Kf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sy=m.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function wb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _z(...e){return t=>{let n=!1;const r=e.map(s=>{const i=wb(s,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s<r.length;s++){const i=r[s];typeof i=="function"?i():wb(e[s],null)}}}}function Pz(...e){return m.useCallback(_z(...e),e)}class Rz extends m.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(xu(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=xu(r)&&r.offsetWidth||0,i=xu(r)&&r.offsetHeight||0,o=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(o.height),l.width=parseFloat(o.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=s-l.width-l.left,l.bottom=i-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Az({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:i}){var f;const o=m.useId(),l=m.useRef(null),c=m.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:u}=m.useContext(Sy),d=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),h=Pz(l,d);return m.useInsertionEffect(()=>{const{width:p,height:v,top:g,left:y,right:b,bottom:w}=c.current;if(t||i===!1||!l.current||!p||!v)return;const x=n==="left"?`left: ${y}`:`right: ${b}`,S=r==="bottom"?`bottom: ${w}`:`top: ${g}`;l.current.dataset.motionPopId=o;const j=document.createElement("style");u&&(j.nonce=u);const k=s??document.head;return k.appendChild(j),j.sheet&&j.sheet.insertRule(`
521          [data-motion-pop-id="${o}"] {
522            position: absolute !important;
523            width: ${p}px !important;
524            height: ${v}px !important;
525            ${x}px !important;
526            ${S}px !important;
527          }
528        `),()=>{var C;(C=l.current)==null||C.removeAttribute("data-motion-pop-id"),k.contains(j)&&k.removeChild(j)}},[t]),a.jsx(Rz,{isPresent:t,childRef:l,sizeRef:c,pop:i,children:i===!1?e:m.cloneElement(e,{ref:h})})}const Mz=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o,anchorX:l,anchorY:c,root:u})=>{const d=Xv(Dz),h=m.useId();let f=!0,p=m.useMemo(()=>(f=!1,{id:h,initial:t,isPresent:n,custom:s,onExitComplete:v=>{d.set(v,!0);for(const g of d.values())if(!g)return;r&&r()},register:v=>(d.set(v,!1),()=>d.delete(v))}),[n,d,r]);return i&&f&&(p={...p}),m.useMemo(()=>{d.forEach((v,g)=>d.set(g,!1))},[n]),m.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=a.jsx(Az,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:c,root:u,children:e}),a.jsx(jh.Provider,{value:p,children:e})};function Dz(){return new Map}function GT(e=!0){const t=m.useContext(jh);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=m.useId();m.useEffect(()=>{if(e)return s(i)},[e]);const o=m.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Yc=e=>e.key||"";function bb(e){const t=[];
vendor: 6,301 bytes, line 528
528return m.Children.forEach(e,n=>{m.isValidElement(n)&&t.push(n)}),t}const uc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,h]=GT(o),f=m.useMemo(()=>bb(e),[e]),p=o&&!d?[]:f.map(Yc),v=m.useRef(!0),g=m.useRef(f),y=Xv(()=>new Map),b=m.useRef(new Set),[w,x]=m.useState(f),[S,j]=m.useState(f);bE(()=>{v.current=!1,g.current=f;for(let N=0;N<S.length;N++){const _=Yc(S[N]);p.includes(_)?(y.delete(_),b.current.delete(_)):y.get(_)!==!0&&y.set(_,!1)}},[S,p.length,p.join("-")]);const k=[];if(f!==w){let N=[...f];for(let _=0;_<S.length;_++){const E=S[_],M=Yc(E);p.includes(M)||(N.splice(_,0,E),k.push(E))}return i==="wait"&&k.length&&(N=k),j(bb(N)),x(f),null}const{forceRender:C}=m.useContext(Qv);return a.jsx(a.Fragment,{children:S.map(N=>{const _=Yc(N),E=o&&!d?!1:f===S||p.includes(_),M=()=>{if(b.current.has(_))return;if(y.has(_))b.current.add(_),y.set(_,!0);else return;let O=!0;y.forEach(H=>{H||(O=!1)}),O&&(C==null||C(),j(g.current),o&&(h==null||h()),r&&r())};return a.jsx(Mz,{isPresent:E,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:i,root:u,onExitComplete:E?void 0:M,anchorX:l,anchorY:c,children:N},_)})})},YT=m.createContext({strict:!1}),Sb={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 jb=!1;function Oz(){if(jb)return;const e={};for(const t in Sb)e[t]={isEnabled:n=>Sb[t].some(r=>!!n[r])};kT(e),jb=!0}function JT(){return Oz(),x8()}function Iz(e){const t=JT();for(const n in e)t[n]={...t[n],...e[n]};kT(t)}const Lz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Sd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Lz.has(e)}let QT=e=>!Sd(e);function $z(e){typeof e=="function"&&(QT=t=>t.startsWith("on")?!Sd(t):e(t))}try{$z(require("@emotion/is-prop-valid").default)}catch{}function Fz(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||dt(e[s])||(QT(s)||n===!0&&Sd(s)||!t&&!Sd(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Th=m.createContext({});function Uz(e,t){if(Eh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Fl(n)?n:void 0,animate:Fl(r)?r:void 0}}return e.inherit!==!1?t:{}}function Vz(e){const{initial:t,animate:n}=Uz(e,m.useContext(Th));return m.useMemo(()=>({initial:t,animate:n}),[kb(t),kb(n)])}function kb(e){return Array.isArray(e)?e.join(" "):e}const jy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function XT(e,t,n){for(const r in t)!dt(t[r])&&!RT(r,n)&&(e[r]=t[r])}function Bz({transformTemplate:e},t){return m.useMemo(()=>{const n=jy();return wy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function zz(e,t){const n=e.style||{},r={};return XT(r,n,e),Object.assign(r,Bz(e,t)),r}function Hz(e,t){const n={},r=zz(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ZT=()=>({...jy(),attrs:{}});function Wz(e,t,n,r){const s=m.useMemo(()=>{const i=ZT();return AT(i,t,DT(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};XT(i,e.style,e),s.style={...i,...s.style}}return s}const qz=["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 ky(e){return typeof e!="string"||e.includes("-")?!1:!!(qz.indexOf(e)>-1||/[A-Z]/u.test(e))}function Kz(e,t,n,{latestValues:r},s,i=!1,o){const c=(o??ky(e)?Wz:Hz)(t,r,s,e),u=Fz(t,typeof e=="string",i),d=e!==m.Fragment?{...u,...c,ref:n}:{},{children:h}=t,f=m.useMemo(()=>dt(h)?h.get():h,[h]);return m.createElement(e,{...d,children:f})}function Gz({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Yz(n,r,s,e),renderState:t()}}function Yz(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=ku(i[f]);let{initial:o,animate:l}=e;const c=Eh(e),u=ST(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!Nh(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const v=hy(e,f[p]);if(v){const{transitionEnd:g,transition:y,...b}=v;for(const w in b){let x=b[w];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(s[w]=x)}for(const w in g)s[w]=g[w]}}}return s}const e_=e=>(t,n)=>{const r=m.useContext(Th),s=m.useContext(jh),i=()=>Gz(e,t,r,s);return n?i():Xv(i)},Jz=e_({scrapeMotionValuesFromProps:by,createRenderState:jy}),Qz=e_({scrapeMotionValuesFromProps:OT,createRenderState:ZT}),Xz=Symbol.for("motionComponentSymbol");function Zz(e,t,n){const r=m.useRef(n);m.useInsertionEffect(()=>{r.current=n});const s=m.useRef(null);return m.useCallback(i=>{var l;i&&((l=e.onMount)==null||l.call(e,i));const o=r.current;if(typeof o=="function")if(i){const c=o(i);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):o(i);else o&&(o.current=i);t&&(i?t.mount(i):t.unmount())},[t])}const t_=m.createContext({});function Yi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function e6(e,t,n,r,s,i){var x,S;const{visualElement:o}=m.useContext(Th),l=m.useContext(YT),c=m.useContext(jh),u=m.useContext(Sy),d=u.reducedMotion,h=u.ski
vendor: 21,037 bytes, line 528
528pAnimations,f=m.useRef(null),p=m.useRef(!1);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:i}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const v=f.current,g=m.useContext(t_);v&&!v.projection&&s&&(v.type==="html"||v.type==="svg")&&t6(f.current,n,s,g);const y=m.useRef(!1);m.useInsertionEffect(()=>{v&&y.current&&v.update(n,c)});const b=n[cT],w=m.useRef(!!b&&typeof window<"u"&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,b))&&((S=window.MotionHasOptimisedAnimation)==null?void 0:S.call(window,b)));return bE(()=>{p.current=!0,v&&(y.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),w.current&&v.animationState&&v.animationState.animateChanges())}),m.useEffect(()=>{v&&(!w.current&&v.animationState&&v.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var j;(j=window.MotionHandoffMarkAsComplete)==null||j.call(window,b)}),w.current=!1),v.enteringChildren=void 0)}),v}function t6(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:n_(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&Yi(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:c,layoutRoot:u,layoutAnchor:d})}function n_(e){if(e)return e.options.allowProjection!==!1?e.projection:n_(e.parent)}function Gf(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&Iz(r);const i=n?n==="svg":ky(e),o=i?Qz:Jz;function l(u,d){let h;const f={...m.useContext(Sy),...u,layoutId:n6(u)},{isStatic:p}=f,v=Vz(u),g=o(u,p);if(!p&&typeof window<"u"){r6();const y=s6(f);h=y.MeasureLayout,v.visualElement=e6(e,g,f,s,y.ProjectionNode,i)}return a.jsxs(Th.Provider,{value:v,children:[h&&v.visualElement?a.jsx(h,{visualElement:v.visualElement,...f}):null,Kz(e,u,Zz(g,v.visualElement,d),g,p,t,i)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=m.forwardRef(l);return c[Xz]=e,c}function n6({layoutId:e}){const t=m.useContext(Qv).id;return t&&e!==void 0?t+"-"+e:e}function r6(e,t){m.useContext(YT).strict}function s6(e){const t=JT(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function i6(e,t){if(typeof Proxy>"u")return Gf;const n=new Map,r=(i,o)=>Gf(i,o,e,t),s=(i,o)=>r(i,o);return new Proxy(s,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,Gf(o,void 0,e,t)),n.get(o))})}const o6=(e,t)=>t.isSVG??ky(e)?new I8(t):new P8(t,{allowProjection:e!==m.Fragment});class a6 extends Ps{constructor(t){super(t),t.animationState||(t.animationState=V8(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Nh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let l6=0;class c6 extends Ps{constructor(){super(...arguments),this.id=l6++,this.isExitComplete=!1}update(){var i;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:l}=this.node.getProps();if(typeof o=="string"){const c=di(this.node,o,l);if(c){const{transition:u,transitionEnd:d,...h}=c;for(const f in h)(i=this.node.getValue(f))==null||i.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const u6={animation:{Feature:a6},exit:{Feature:c6}};function dc(e){return{point:{x:e.pageX,y:e.pageY}}}const d6=e=>t=>gy(t)&&e(t,dc(t));function nl(e,t,n,r){return Ul(e,t,d6(n),r)}const r_=({current:e})=>e?e.ownerDocument.defaultView:null,Cb=(e,t)=>Math.abs(e-t);function h6(e,t){const n=Cb(e.x,t.x),r=Cb(e.y,t.y);return Math.sqrt(n**2+r**2)}const Nb=new Set(["auto","scroll"]);class s_{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3,element:l}={}){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=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Jc(this.lastRawMoveEventInfo,this.transformPagePoint));const p=Yf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,g=h6(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!g)return;const{point:y}=p,{timestamp:b}=ut;this.history.push({...y,timestamp:b});const{onStart:w,onMove:x}=this.handlers;v||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=v,this.lastMoveEventInfo=Jc(v,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:b}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Yf(p.type==="pointercancel"?this.lastMoveEventInfo:Jc(v,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,w),y&&y(p,w)},!gy(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=s||window;const c=dc(t),u=Jc(c,this.transformPagePoint),{point:d}=u,{timestamp:h}=ut;this.history=[{...d,timestamp:h}];const{onSessionStart:f}=n;f&&f(t,Yf(u,this.history)),this.removeListeners=ac(nl(this.contextWindow,"pointermove",this.handlePointerMove),nl(this.contextWindow,"pointerup",this.handlePointerUp),nl(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Nb.has(r.overflowX)||Nb.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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 n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:s.x-n.x,y:s.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,s),ke.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ks(this.updatePoint)}}function Jc(e,t){return t?{point:t(e.point)}:e}function Eb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yf({point:e},t){return{point:e,delta:Eb(e,i_(t)),offset:Eb(e,f6(t)),velocity:p6(t,.1)}}function f6(e){return e[0]}function i_(e){return e[e.length-1]}function p6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=i_(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>$t(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>$t(t)*2&&(r=e[1]);const i=rn(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function m6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?_e(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?_e(n,e,r.max):Math.min(e,n)),e}function Tb(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function g6(e,{top:t,left:n,bottom:r,right:s}){return{x:Tb(e.x,n,s),y:Tb(e.y,t,r)}}function _b(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function v6(e,t){return{x:_b(e.x,t.x),y:_b(e.y,t.y)}}function y6(e,t){let n=.5;const r=Ct(e),s=Ct(t);return s>r?n=Ll(t.min,t.max-r,e.min):r>s&&(n=Ll(e.min,e.max-s,t.min)),lr(0,1,n)}function x6(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Zm=.35;function w6(e=Zm){return e===!1?e=0:e===!0&&(e=Zm),{x:Pb(e,"left","right"),y:Pb(e,"top","bottom")}}function Pb(e,t,n){return{min:Rb(e,t),max:Rb(e,n)}}function Rb(e,t){return typeof e=="number"?e:e[t]||0}const b6=new WeakMap;class S6{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:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=h=>{n&&this.snapToCursor(dc(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:v,onDragStart:g}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=YB(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Vn(b=>{let w=this.getAxisMotionValue(b).get()||0;if(ir.test(w)){const{projection:x}=this.visualElement;if(x&&x.layout){const S=x.layout.layoutBox[b];S&&(w=Ct(S)*(parseFloat(w)/100))}}this.originPoint[b]=w}),g&&ke.update(()=>g(h,f),!1,!0),Hm(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:g,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(v&&this.currentDirection===null){this.currentDirection=k6(b),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),y&&ke.update(()=>y(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new s_(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:r_(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!s||!r)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ke.postRender(()=>l(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Qc(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=m6(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,s=this.constraints;t&&Yi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=g6(r.layoutBox,t):this.constraints=!1,this.elastic=w6(n),s!==this.constraints&&!Yi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Vn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=x6(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Yi(t))return!1;const r=t.current;Ho(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=k8(r,s.root,this.visualElement.getTransformPagePoint());let o=v6(s.layout.layoutBox,i);if(n){const l=n(b8(o));this.hasMutatedConstraints=!!l,l&&(o=NT(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Vn(d=>{if(!Qc(d,n,this.currentDirection))return;let h=c&&c[d]||{};(o===!0||o===d)&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Hm(this.visualElement,t),r.start(dy(t,r,0,n,this.visualElement,!1))}stopAnimation(){Vn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Vn(n=>{const{drag:r}=this.getProps();if(!Qc(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n],c=i.get()||0;i.set(t[n]-_e(o,l,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Yi(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Vn(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=y6({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Vn(o=>{if(!Qc(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(_e(c,u,s[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;b6.set(this.visualElement,this);const t=this.visualElement.current,n=nl(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps(),f=u.target,p=f!==t&&t8(f);d&&h&&!p&&this.start(u)});let r;const s=()=>{const{dragConstraints:u}=this.getProps();Yi(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),r||(r=j6(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(s);const l=Ul(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Vn(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())});return()=>{l(),n(),o(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Zm,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Ab(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function j6(e,t,n){const r=F0(e,Ab(n)),s=F0(t,Ab(n));return()=>{r(),s()}}function Qc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function k6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class C6 extends Ps{constructor(t){super(t),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new S6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Jf=e=>(t,n)=>{e&&ke.update(()=>e(t,n),!1,!0)};class N6 extends Ps{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(t){this.session=new s_(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:r_(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jf(t),onStart:Jf(n),onMove:Jf(r),onEnd:(i,o)=>{delete this.session,s&&ke.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=nl(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 Qf=!1;class E6 extends m.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),Qf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Cu.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Qf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ke.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),my.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Qf=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function o_(e){const[t,n]=GT(),r=m.useContext(Qv);return a.jsx(E6,{...e,layoutGroup:r,switchLayoutGroup:m.useContext(t_),isPresent:t,safeToRemove:n})}const T6={pan:{Feature:N6},drag:{Feature:C6,ProjectionNode:KT,MeasureLayout:o_}};function Mb(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ke.postRender(()=>i(t,dc(t)))}class _6 extends Ps{mount(){const{current:t}=this.node;t&&(this.unmount=QB(t,(n,r)=>(Mb(this.node,r,"Start"),s=>Mb(this.node,s,"End"))))}unmount(){}}class P6 extends Ps{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=ac(Ul(this.node.current,"focus",()=>this.onFocus()),Ul(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Db(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ke.postRender(()=>i(t,dc(t)))}class R6 extends Ps{mount(){const{current:t}=this.node;if(!t)return;
528const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=r8(t,(s,i)=>(Db(this.node,i,"Start"),(o,{success:l})=>Db(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const eg=new WeakMap,Xf=new WeakMap,A6=e=>{const t=eg.get(e.target);t&&t(e)},M6=e=>{e.forEach(A6)};function D6({root:e,...t}){const n=e||document;Xf.has(n)||Xf.set(n,{});const r=Xf.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(M6,{root:e,...t})),r[s]}function O6(e,t,n){const r=D6(t);return eg.set(e,n),r.observe(e),()=>{eg.delete(e),r.unobserve(e)}}const I6={some:0,all:1};class L6 extends Ps{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:I6[s]},l=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,i&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:f}=this.node.getProps(),p=d?h:f;p&&p(u)};this.stopObserver=O6(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some($6(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function $6({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const F6={inView:{Feature:L6},tap:{Feature:R6},focus:{Feature:P6},hover:{Feature:_6}},U6={layout:{ProjectionNode:KT,MeasureLayout:o_}},V6={...u6,...F6,...T6,...U6},Zt=i6(V6,o6),Ob=[{title:"Dashboard",url:"/",icon:Zl},{title:"Jobs",url:"/jobs",icon:dr},{title:"Tracker",url:"/applications",icon:na},{title:"Resumes",url:"/resumes",icon:ci},{title:"Videos",url:"/videos",icon:nr},{title:"Profile",url:"/profile",icon:ec}];function a_(){const{mode:e,setMode:t}=Ir(),n=Jt(),r=()=>{t(e==="candidate"?"recruiter":"candidate"),n("/")};return a.jsxs(cC,{children:[a.jsx(uC,{asChild:!0,children:a.jsx(W,{variant:"outline",size:"sm",onClick:r,className:"gap-2 text-xs font-medium",children:e==="candidate"?a.jsxs(a.Fragment,{children:[a.jsx(gv,{className:"h-3.5 w-3.5"}),a.jsx("span",{className:"hidden sm:inline",children:"Switch to Recruiter"})]}):a.jsxs(a.Fragment,{children:[a.jsx(fv,{className:"h-3.5 w-3.5"}),a.jsx("span",{className:"hidden sm:inline",children:"Switch to Candidate"})]})})}),a.jsxs(Av,{children:["Switch to ",e==="candidate"?"Recruiter":"Candidate"," mode"]})]})}function B6(){const e=On(),t=Jt(),{signOut:n}=Or(),{highlightRoute:r}=Ov(),s=u=>e.pathname===u,[i,o]=m.useState(!1),l=async()=>{await n(),t("/auth")},c=u=>{t(u),o(!1)};return a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"h-14 flex items-center border-b border-border/50 px-4 sm:px-6 backdrop-blur-sm bg-background/80 sticky top-0 z-30",children:[a.jsxs("div",{className:"flex items-center gap-2 mr-4 md:mr-6 shrink-0",children:[a.jsx("img",{src:Vv,alt:"Volo AI",className:"h-8 w-8 rounded-lg"}),a.jsxs("div",{className:"hidden sm:block",children:[a.jsx("h1",{className:"text-sm font-semibold text-foreground leading-tight",children:"Volo AI"}),a.jsx("p",{className:"text-xs text-muted-foreground leading-tight",children:"Beyond the Resume."})]})]}),a.jsx("nav",{className:"hidden md:flex items-center gap-1 flex-1",children:Ob.map(u=>a.jsxs("div",{className:"relative","data-tour-route":u.url,children:[r===u.url&&a.jsx("span",{className:"absolute inset-0 rounded-md ring-2 ring-primary animate-pulse pointer-events-none z-10"}),a.jsxs("button",{onClick:()=>t(u.url),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${s(u.url)?"bg-accent text-primary":"text-muted-foreground hover:text-foreground hover:bg-accent/50"}`,children:[a.jsx(u.icon,{className:"h-3.5 w-3.5"}),u.title]})]},u.url))}),a.jsx("div",{className:"flex-1 md:hidden"}),a.jsxs("div",{className:"flex items-center gap-1.5 sm:gap-2",children:[a.jsx(a_,{}),a.jsx(Jv,{}),a.jsx(W,{variant:"ghost",size:"icon",onClick:l,className:"h-8 w-8",title:"Sign out",children:a.jsx(bk,{className:"h-4 w-4"})}),a.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8 md:hidden",onClick:()=>o(!i),children:i?a.jsx(or,{className:"h-4 w-4"}):a.jsx(lO,{className:"h-4 w-4"})})]})]}),a.jsx(uc,{children:i&&a.jsxs(a.Fragment,{children:[a.jsx(Zt.div,{className:"fixed inset-0 bg-background/60 backdrop-blur-sm z-20 md:hidden",initial:{opacity:0}
528,animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1)}),a.jsx(Zt.nav,{className:"fixed top-14 left-0 right-0 bg-background border-b border-border/50 z-20 md:hidden",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.2},children:a.jsx("div",{className:"p-3 space-y-1",children:Ob.map(u=>a.jsxs("button",{onClick:()=>c(u.url),className:`w-full flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium transition-colors ${s(u.url)?"bg-accent text-primary":"text-muted-foreground hover:text-foreground hover:bg-accent/50"}`,children:[a.jsx(u.icon,{className:"h-4 w-4"}),u.title]},u.url))})})]})})]})}function z6({children:e}){const{mode:t}=Ir();return t==="candidate"?a.jsx(n0,{children:a.jsxs("div",{className:"min-h-screen flex flex-col w-full",children:[a.jsx(B6,{}),a.jsx("main",{className:"flex-1 p-4 sm:p-6",children:e}),a.jsx(r0,{})]})}):a.jsx(n0,{children:a.jsx(uN,{children:a.jsxs("div",{className:"min-h-screen flex w-full",children:[a.jsx(zU,{}),a.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[a.jsxs("header",{className:"h-14 flex items-center border-b border-border/50 px-4 sm:px-6 backdrop-blur-sm bg-background/80 sticky top-0 z-10",children:[a.jsx(hN,{className:"mr-4","aria-label":"Toggle sidebar"}),a.jsx("div",{className:"flex-1"}),a.jsx(a_,{})]}),a.jsx("main",{className:"flex-1 p-4 sm:p-6",children:e}),a.jsx(r0,{})]})]})})})}const jd=[{id:"1",name:"Sarah Chen",email:"[email protected]",avatarInitials:"SC",personas:[{id:"p1",name:"Fintech Lead",role:"Engineering Manager"}]},{id:"2",name:"Marcus Johnson",email:"[email protected]",avatarInitials:"MJ",personas:[{id:"p2",name:"DevOps Lead",role:"Platform Engineer"}]},{id:"3",name:"Aisha Patel",email:"[email protected]",avatarInitials:"AP",personas:[{id:"p3",name:"Growth PM",role:"Product Manager"}]},{id:"4",name:"Liam O'Brien",email:"[email protected]",avatarInitials:"LO",personas:[{id:"p4",name:"UI Engineer",role:"Senior Frontend Engineer"}]},{id:"5",name:"Priya Sharma",email:"[email protected]",avatarInitials:"PS",personas:[{id:"p5",name:"Design Lead",role:"Product Design Lead"}]},{id:"6",name:"Jordan Rivera",email:"[email protected]",avatarInitials:"JR",personas:[{id:"p6",name:"Data Analyst",role:"Senior Data Analyst"}]},{id:"7",name:"Emily Zhang",email:"[email protected]",avatarInitials:"EZ",personas:[{id:"p7",name:"Frontend Architect",role:"Staff Frontend Engineer"}]},{id:"8",name:"David Kim",email:"[email protected]",avatarInitials:"DK",personas:[{id:"p8",name:"UX Designer",role:"Senior Product Designer"}]},{id:"9",name:"Natasha Volkov",email:"[email protected]",avatarInitials:"NV",personas:[{id:"p9",name:"Analytics Lead",role:"Data Analytics Manager"}]},{id:"10",name:"Carlos Mendez",email:"[email protected]",avatarInitials:"CM",personas:[{id:"p10",name:"React Specialist",role:"Frontend Engineer"}]},{id:"11",name:"Fatima Al-Hassan",email:"[email protected]",avatarInitials:"FA",personas:[{id:"p11",name:"Visual Designer",role:"Product Designer"}]},{id:"12",name:"Tyler Brooks",email:"[email protected]",avatarInitials:"TB",personas:[{id:"p12",name:"BI Analyst",role:"Business Intelligence Analyst"}]}],Vl=[{id:"j1",title:"Senior Frontend Engineer",company:"Acme Corp",applicantCount:47,status:"active",signals:[{name:"Technical Architecture",weight:25},{name:"React Expertise",weight:20},{name:"Team Collaboration",weight:20},{name:"System Design",weight:20},{name:"Communication",weight:15}]},{id:"j2",title:"Product Design Lead",company:"Nova Studio",applicantCount:32,status:"active",signals:[{name:"Design Systems",weight:25},{name:"User Research",weight:20},{name:"Conflict Resolution",weight:20},{name:"Prototyping",weight:20},{name:"Stakeholder Mgmt",weight:15}]},{id:"j3",title:"Senior Data Analyst",company:"DataFlow AI",applicantCount:28,status:"active",signals:[{name:"Data Modeling",weight:25},{name:"SQL & Analytics",weight:20},{name:"Data Visualization",weight:20},{name:"Statistical Analysis",weight:20},{name:"Communication",weight:15}]}],jo=[{id:"a1",applicantName:"Sarah Chen",jobTitle:"Senior Frontend Engineer",company:"Acme Corp",signalMatch:92,topUp:!1,persona:"Fintech Lead",status:"shortlisted"},{id:"a2",applicantName:"Liam O'Brien",jobTitle:"Senior Frontend Engineer",company:"Acme Corp",signalMatch:88,topUp:!1,persona:"UI Engineer",status:"shortlisted"},{id:"a3",applicantName:"Emily Zhang",jobTitle:"Senior Frontend Engineer",company:"Acme Corp",signalMatch:85,topUp:!0,topUpRequest:{status:"Responded",requestedInfo:"Hi Emily, we'd love to learn more about your experience with large-scale frontend architecture and performance optimization. Could you share a specific example of a system you've redesigned for performance?",response:"At my previous role at TechScale, I led the migration of our monolithic React app to a micro-frontend architecture, reducing initial load time by 60% and improving Core Web Vitals scores across all pages. I also implemented a custom lazy-loading strategy for our component library.",requestedAt:"Mar 18",respondedAt:"Mar 20"},persona:"Frontend Architect",status:"interview"},{id:"a4",applicantName:"Carlos Mendez",jobTitle:"Senior Frontend Engineer",company:"Acme Corp",signalMatch:76,topUp:!1,persona:"React Specialist",status:"reviewing"}
528,{id:"a5",applicantName:"Marcus Johnson",jobTitle:"Senior Frontend Engineer",company:"Acme Corp",signalMatch:62,topUp:!0,topUpRequest:{status:"Pending",requestedInfo:"Hi Marcus, your DevOps background is interesting. Could you elaborate on how your infrastructure experience translates to frontend development? We'd also like to understand your approach to CI/CD for frontend apps.",requestedAt:"Mar 22"},persona:"DevOps Lead",status:"reviewing"},{id:"a6",applicantName:"Aisha Patel",jobTitle:"Product Design Lead",company:"Nova Studio",signalMatch:90,topUp:!1,persona:"Growth PM",status:"interview"},{id:"a7",applicantName:"Priya Sharma",jobTitle:"Product Design Lead",company:"Nova Studio",signalMatch:87,topUp:!1,persona:"Design Lead",status:"shortlisted"},{id:"a8",applicantName:"David Kim",jobTitle:"Product Design Lead",company:"Nova Studio",signalMatch:79,topUp:!0,topUpRequest:{status:"Requested",requestedInfo:"Hi David, we noticed your portfolio focuses on mobile design. Could you share examples of your work on web-based design systems and how you approach cross-platform consistency?",requestedAt:"Mar 25"},persona:"UX Designer",status:"reviewing"},{id:"a9",applicantName:"Fatima Al-Hassan",jobTitle:"Product Design Lead",company:"Nova Studio",signalMatch:72,topUp:!1,persona:"Visual Designer",status:"reviewing"},{id:"a10",applicantName:"Liam O'Brien",jobTitle:"Product Design Lead",company:"Nova Studio",signalMatch:45,topUp:!1,persona:"UI Engineer",status:"rejected"},{id:"a11",applicantName:"Jordan Rivera",jobTitle:"Senior Data Analyst",company:"DataFlow AI",signalMatch:91,topUp:!1,persona:"Data Analyst",status:"shortlisted"},{id:"a12",applicantName:"Natasha Volkov",jobTitle:"Senior Data Analyst",company:"DataFlow AI",signalMatch:84,topUp:!0,topUpRequest:{status:"Responded",requestedInfo:"Hi Natasha, we're impressed by your analytics background. Could you walk us through a project where you built an end-to-e
528nd analytics pipeline and the business impact it had?",response:"I built a real-time customer churn prediction pipeline at DataVerse that processed 2M+ events daily. Using Python and dbt, I automated the ETL process and created Tableau dashboards that helped the retention team reduce churn by 18% in Q3.",requestedAt:"Mar 19",respondedAt:"Mar 21"},persona:"Analytics Lead",status:"interview"},{id:"a13",applicantName:"Tyler Brooks",jobTitle:"Senior Data Analyst",company:"DataFlow AI",signalMatch:77,topUp:!1,persona:"BI Analyst",status:"reviewing"},{id:"a14",applicantName:"Sarah Chen",jobTitle:"Senior Data Analyst",company:"DataFlow AI",signalMatch:58,topUp:!0,topUpRequest:{status:"Pending",requestedInfo:"Hi Sarah, your fintech experience is valuable but we'd like to understand your SQL and data modeling skills better. Could you describe your approach to designing a data warehouse schema?",requestedAt:"Mar 24"},persona:"Fintech Lead",status:"reviewing"},{id:"a15",applicantName:"Marcus Johnson",jobTitle:"Senior Data Analyst",company:"DataFlow AI",signalMatch:41,topUp:!1,persona:"DevOps Lead",status:"rejected"}],H6={"Sarah Chen":[{id:"v1",title:"Why Fintech Excites Me",duration:"2:34",thumbnailColor:"hsl(220 30% 20%)",uploadedAt:"Mar 15"},{id:"v2",title:"System Design Walkthrough",duration:"4:12",thumbnailColor:"hsl(200 30% 22%)",uploadedAt:"Mar 18"}],"Marcus Johnson":[{id:"v3",title:"DevOps Philosophy",duration:"3:05",thumbnailColor:"hsl(260 25% 20%)",uploadedAt:"Mar 10"}],"Aisha Patel":[{id:"v4",title:"Growth Strategy Pitch",duration:"3:45",thumbnailColor:"hsl(340 25% 20%)",uploadedAt:"Mar 12"},{id:"v5",title:"Cross-Functional Leadership",duration:"2:58",thumbnailColor:"hsl(350 20% 22%)",uploadedAt:"Mar 20"}],"Liam O'Brien":[{id:"v6",title:"UI Architecture Deep Dive",duration:"5:10",thumbnailColor:"hsl(180 25% 18%)",uploadedAt:"Mar 14"}],"Priya Sharma":[{id:"v7",title:"Design Systems at Scale",duration:"4:22",thumbnailColor:"hsl(280 25% 20%)",uploadedAt:"Mar 16"},{id:"v8",title:"User Research Methods",duration:"3:15",thumbnailColor:"hsl(290 20% 22%)",uploadedAt:"Mar 22"}],"Jordan Rivera":[{id:"v9",title:"Data Storytelling",duration:"3:30",thumbnailColor:"hsl(150 25% 18%)",uploadedAt:"Mar 11"}],"Emily Zhang":[{id:"v10",title:"Frontend Architecture Principles",duration:"4:45",thumbnailColor:"hsl(210 30% 20%)",uploadedAt:"Mar 17"},{id:"v11",title:"Performance Optimization",duration:"3:20",thumbnailColor:"hsl(220 25% 22%)",uploadedAt:"Mar 21"}],"David Kim":[{id:"v12",title:"Design Process Walkthrough",duration:"3:55",thumbnailColor:"hsl(30 25% 20%)",uploadedAt:"Mar 13"}],"Natasha Volkov":[{id:"v13",title:"Analytics Leadership",duration:"2:48",thumbnailColor:"hsl(120 20% 18%)",uploadedAt:"Mar 19"}],"Carlos Mendez":[{id:"v14",title:"React Performance Patterns",duration:"4:10",thumbnailColor:"hsl(200 25% 20%)",uploadedAt:"Mar 15"}],"Fatima Al-Hassan":[{id:"v15",title:"Visual Design Portfolio Tour",duration:"3:40",thumbnailColor:"hsl(310 25% 20%)",uploadedAt:"Mar 14"}],"Tyler Brooks":[{id:"v16",title:"BI Dashboard Case Study",duration:"4:00",thumbnailColor:"hsl(60 20% 18%)",uploadedAt:"Mar 16"}]};function W6(e){return H6[e]||[]}const st=sN,q6=iN,l_=m.forwardRef(({className:e,...t},n)=>a.jsx(gh,{ref:n,className:J("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));l_.displayName=gh.displayName;const Ze=m.forwardRef(({className:e,children:t,hideOverlay:n,...r},s)=>a.jsxs(q6,{children:[!n&&a.jsx(l_,{}),a.jsxs(vh,{ref:s,className:J("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,a.jsxs(oN,{className:"absolute right-4 top-4 roun
528ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(or,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ze.displayName=vh.displayName;const it=({className:e,...t})=>a.jsx("div",{className:J("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});it.displayName="DialogHeader";const c_=({className:e,...t})=>a.jsx("div",{className:J("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});c_.displayName="DialogFooter";const ot=m.forwardRef(({className:e,...t},n)=>a.jsx(yh,{ref:n,className:J("text-lg font-semibold leading-none tracking-tight",e),...t}));ot.displayName=yh.displayName;const da=m.forwardRef(({className:e,...t},n)=>a.jsx(xh,{ref:n,className:J("text-sm text-muted-foreground",e),...t}));da.displayName=xh.displayName;function _h({candidateName:e,defaultCollapsed:t=!1}){const n=W6(e),[r,s]=m.useState(null),[i,o]=m.useState(t);return n.length===0?null:a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>o(l=>!l),className:"flex items-center gap-2 w-full text-left mb-2",children:[a.jsxs("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:["Submitted Videos (",n.length,")"]}),a.jsx(Zd,{className:`h-3 w-3 text-muted-foreground transition-transform ${i?"":"rotate-180"}`})]}),a.jsx(uc,{initial:!1,children:!i&&a.jsx(Zt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:a.jsx("div",{className:"grid grid-cols-2 gap-2",children:n.map(l=>a.jsxs("button",{onClick:c=>{c.stopPropagation(),s(l.id)},className:"group relative rounded-lg border border-border/50 overflow-hidden text-left hover:border-primary/40 transition-colors",children:[a.jsx("div",{className:"aspect-video flex items-center justify-center",style:{backgroundColor:l.thumbnailColor},children:a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-background/80 backdrop-blur-sm text-foreground group-hover:bg-primary group-hover:text-primary-foreground transition-colors",children:a.jsx(hu,{className:"h-4 w-4 ml-0.5"})})}),a.jsxs("div",{className:"p-2",children:[a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:l.title}),a.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[l.duration," · ",l.uploadedAt]})]})]},l.id))})})}),a.jsx(st,{open:!!r,onOpenChange:l=>!l&&s(null),children:a.jsx(Ze,{className:"max-w-lg p-0 overflow-hidden",children:r&&(()=>{const l=n.find(c=>c.id===r);return l?a.jsx("div",{children:a.jsx("div",{className:"aspect-video flex items-center justify-center",style:{backgroundColor:l.thumbnailColor},children:a.jsxs("div",{className:"text-center space-y-2",children:[a.jsx(nr,{className:"h-10 w-10 text-foreground/60 mx-auto"}),a.jsx("p",{className:"text-sm text-foreground/60",children:"Video Player"}),a.jsxs("p",{className:"text-xs text-foreground/40",children:[l.title," · ",l.duration]})]})})}):null})()})})]})}var K6="Label",u_=m.forwardRef((e,t)=>a.jsx(le.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));u_.displayName=K6;var d_=u_;const G6=ta("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),fe=m.forwardRef(({className:e,...t},n)=>a.jsx(d_,{ref:n,className:J(G6(),e),...t}));fe.displayName=d_.displayName;const Cs=m.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:J("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
528ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Cs.displayName="Textarea";function h_({open:e,onOpenChange:t,candidateName:n,candidateEmail:r,subject:s,body:i}){const[o,l]=m.useState(r||""),[c,u]=m.useState(""),[d,h]=m.useState(!1),[f,p]=m.useState(s),[v,g]=m.useState(i),[y,b]=m.useState(!1),{toast:w}=cr(),x=k=>{k&&(l(r||""),p(s),g(i),u(""),h(!1),b(!1)),t(k)},S=()=>{if(!o.trim()||!f.trim()){w({title:"Missing fields",description:"Recipient and subject are required.",variant:"destructive"});return}b(!0),setTimeout(()=>{b(!1),w({title:"Email sent!",description:`Clarity request sent to ${n}.`}),t(!1)},1500)},j=()=>{w({title:"Draft saved",description:"Your email draft has been saved."}),t(!1)};return a.jsx(st,{open:e,onOpenChange:x,children:a.jsxs(Ze,{className:"max-w-lg max-h-[85vh] flex flex-col",hideOverlay:!0,children:[a.jsxs(it,{className:"flex-shrink-0",children:[a.jsxs(ot,{className:"flex items-center gap-2",children:[a.jsx(tr,{className:"h-4 w-4 text-primary"}),"Draft Email — Request Clarity"]}),a.jsxs(da,{children:["AI-drafted based on detected signal gaps for ",n]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto space-y-3 pr-1",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"To"}),!d&&a.jsx("button",{onClick:()=>h(!0),className:"text-xs text-primary hover:underline",children:"Cc"})]}),a.jsx(me,{className:"mt-1",placeholder:`${n.toLowerCase().replace(" ",".")}@email.com`,value:o,onChange:k=>l(k.target.value)})]}),d&&a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Cc"}),a.jsx(me,{className:"mt-1",placeholder:"[email protected]",value:c,onChange:k=>u(k.target.value)})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Subject"}),a.jsx(me,{className:"mt-1",value:f,onChange:k=>p(k.target.value)})]}),a.jsxs("div",{className:"flex items-center gap-1 border border-border/50 rounded-lg p-1 bg-accent/30",children:[a.jsx("button",{className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Bold",children:a.jsx(ZD,{className:"h-3.5 w-3.5 text-muted-foreground"})}),a.jsx("button",{className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Italic",children:a.jsx(aO,{className:"h-3.5 w-3.5 text-muted-foreground"})}),a.jsx("button",{className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Insert Link",children:a.jsx(am,{className:"h-3.5 w-3.5 text-muted-foreground"})}),a.jsx("button",{className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Align",children:a.jsx(KD,{className:"h-3.5 w-3.5 text-muted-foreground"})}),a.jsx("div",{className:"flex-1"}),a.jsx("button",{className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Attach file",children:a.jsx(dO,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),a.jsx(Cs,{className:"min-h-[200px] resize-none text-sm leading-relaxed",value:v,onChange:k=>g(k.target.value)})]}),a.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-border/30 flex-shrink-0",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(W,{onClick:S,disabled:y,className:"gap-2",children:[a.jsx(tr,{className:"h-3.5 w-3.5"}),y?"Sending...":"Send"]}),a.jsx(W,{variant:"outline",onClick:j,children:"Save Draft"})]}),a.jsx(W,{variant:"ghost",size:"sm",onClick:()=>t(!1),children:"Discard"})]})]})})}const Y6={Responded:{badge:"signal-badge-high",icon:Uo},Requested:{badge:"signal-badge-mid",icon:Ni},Pending:{badge:"signal-badge-low",icon:Xl}};function Ib({topUpRequest:e,onEmailClick:t}){const n=Y6[e.status],r=n.icon;return a.jsxs("div",{className:"space-y-3 mt-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[a.jsx(mv,{className:"h-4 w-4 text-peach"}),"Top-Up Request"]}),a.jsxs("span",{className:`${n.badge} flex items-center gap-1`,children:[a.jsx(r,{className:"h-3 w-3"}),e.status]})]}),a.jsxs("div",{className:"rounded-lg bg-muted/50 border border-border p-3 space-y-1",children:[a.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:["Requested Information · ",e.requestedAt]}
528),a.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:e.requestedInfo})]}),e.response&&a.jsxs("div",{className:"rounded-lg bg-mint-bg/30 border border-mint/20 p-3 space-y-1",children:[a.jsxs("p",{className:"text-xs font-medium text-mint flex items-center gap-1",children:[a.jsx(Uo,{className:"h-3 w-3"}),"Candidate Response · ",e.respondedAt]}),a.jsx("p",{className:"text-sm text-foreground leading-relaxed",children:e.response})]}),e.status==="Pending"&&a.jsx("div",{className:"rounded-lg bg-peach-bg/30 border border-peach/20 p-3",children:a.jsxs("p",{className:"text-xs text-peach flex items-center gap-1",children:[a.jsx(nO,{className:"h-3 w-3"}),"Awaiting candidate response"]})}),t&&a.jsxs(W,{size:"sm",variant:"outline",className:"gap-2",onClick:t,children:[a.jsx(Ni,{className:"h-3.5 w-3.5"}),"Email Candidate"]})]})}function J6({open:e,onOpenChange:t,candidateName:n,showTopUp:r}){var h,f;const[s,i]=m.useState(!1);if(!n)return null;const o=jd.find(p=>p.name===n),l=jo.filter(p=>p.applicantName===n),c=l.find(p=>p.topUp&&p.topUpRequest);if(!o)return null;const u=p=>p>=80?"signal-badge-high":p>=60?"signal-badge-mid":"signal-badge-low",d=()=>i(!0);return a.jsxs(a.Fragment,{children:[a.jsx(st,{open:e,onOpenChange:t,children:a.jsxs(Ze,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[a.jsx(it,{children:a.jsxs(ot,{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-lavender-bg text-lavender text-sm font-semibold",children:o.avatarInitials}),a.jsxs("div",{children:[a.jsx("span",{className:"block",children:o.name}),a.jsx("span",{className:"block text-xs font-normal text-muted-foreground",children:o.email})]})]})}),a.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.personas.map(p=>a.jsxs("span",{className:"text-xs px-2 py-1 rounded-md bg-lavender-bg text-lavender border border-lavender/20",children:[a.jsx(th,{className:"h-3 w-3 inline mr-1"}),p.name," · ",p.role]},p.id))}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("h3",{className:"text-sm font-semibold text-foreground flex items-center gap-2",children:[a.jsx(Lt,{className:"h-4 w-4 text-sky"}),"Applications (",l.length,")"]}),l.map(p=>a.jsx("div",{className:"p-3 rounded-lg border border-border/50 bg-card",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:p.jobTitle}),a.jsx("p",{className:"text-xs text-muted-foreground",children:p.company})]}),a.jsxs("span",{className:`${u(p.signalMatch)} ${p.signalMatch>=75?"font-bold":""}`,children:[p.signalMatch,"%"]})]})},p.id))]}),r&&(c==null?void 0:c.topUpRequest)&&a.jsx(Ib,{topUpRequest:c.topUpRequest,onEmailClick:d}),!r&&l.filter(p=>p.topUp&&p.topUpRequest).map(p=>a.jsxs("div",{children:[a.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:[p.jobTitle," · ",p.company]}),a.jsx(Ib,{topUpRequest:p.topUpRequest,onEmailClick:d})]},p.id)),a.jsx(_h,{candidateName:n,defaultCollapsed:!0})]})}),a.jsx(h_,{open:s,onOpenChange:i,candidateName:n,candidateEmail:o==null?void 0:o.email,subject:`Follow-up: Additional Information Request — ${(c==null?void 0:c.jobTitle)||((h=l[0])==null?void 0:h.jobTitle)||""}`,body:`Hi ${n},
529
530Thank you for your application for the ${(c==null?void 0:c.jobTitle)||((f=l[0])==null?void 0:f.jobTitle)||"open"} position. We'd like to request some additional information to help us better evaluate your candidacy.
531
532Could you please provide more details about your relevant experience?
533
534Best regards,
535Recruiting Team`})]})}const Lb=[{bg:"bg-sky-bg",text:"text-sky",border:"border-sky/20",hoverBorder:"hover:border-sky/40"},{bg:"bg-lavender-bg",text:"text-lavender",border:"border-lavender/20",hoverBorder:"hover:border-lavender/40"},{bg:"bg-mint-bg",text:"text-mint",border:"border-mint/20",hoverBorder:"hover:border-mint/40"},{bg:"bg-peach-bg",text:"text-peach",border:"border-peach/20",hoverBorder:"hover:border-peach/40"}];function Zf({label:e,value:t,icon:n,trend:r,onClick:s,colorIndex:i=0}){const o=Lb[i%Lb.length];return a.jsxs("div",{className:`bento-item flex flex-col gap-3 border ${o.border} ${o.hoverBorder} ${s?"cursor-pointer transition-colors":""}`,onClick:s,role:s?"button":void 0,tabIndex:s?0:void 0,onKeyDown:s?l=>l.key==="Enter"&&s():void 0,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-xs sm:text-sm text-muted-foreground truncate",children:e}),a.jsx("div",{className:`flex h-7 w-7 sm:h-8 sm:w-8 shrink-0 items-center justify-center rounded-lg ${o.bg}`,children:a.jsx(n,{className:`h-3.5 w-3.5 sm:h-4 sm:w-4 ${o.text}`})})]}),a.jsxs("div",{className:"flex items-end gap-2",children:[a.jsx("span",{className:"text-2xl sm:text-3xl font-semibold tracking-tight text-foreground",children:t}),r&&a.jsxs("span",{className:"signal-badge-high mb-1 flex items-center gap-1",children:[a.jsx(fO,{className:"h-3 w-3"}),r]})]})]})}function Q6(){const e=Jt(),[t,n]=m.useState(null),[r,s]=m.useState(null),[i,o]=m.useState(!1),l=Vl.filter(v=>v.status==="active"),c=jd.length,u=jo.filter(v=>v.topUp),d=jo.filter(v=>v.status==="interview"),h=[{id:"1",subject:"Interview Scheduled: Sarah Chen – Product Design Lead",to:"[email protected]",date:"Mar 28",status:"sent"},{id:"2",subject:"Interview Reminder: Marcus Johnson – Sr. Frontend Engineer",to:"[email protected]",date:"Mar 27",status:"sent"},{id:"3",subject:"Interview Follow-up: Aisha Patel – Product Manager",to:"[email protected]",date:"Mar 26",status:"opened"},{id:"4",subject:"Interview Invite: Liam O'Brien – Platform Engineer",to:"[email protected]",date:"Mar 25",status:"pending"}],f=(v,g=!1)=>{n(null),o(g),s(v)},p=v=>v==="Responded"?"signal-badge-high":v==="Requested"?"signal-badge-mid":"signal-badge-low";return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Dashboard"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"AI-powered talent intelligence at a glance"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 sm:gap-4",children:[a.jsx(Zf,{label:"Active Roles",value:String(l.length),icon:Lt,trend:"+2",onClick:()=>n("roles"),colorIndex:0}),a.jsx(Zf,{label:"Interview Pipeline",value:String(d.length),icon:pv,onClick:()=>e("/pipeline"),colorIndex:1}),a.jsx(Zf,{label:"Top-Up Requests",value:String(u.length),icon:Vo,onClick:()=>n("topups"),colorIndex:3})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"bento-item border border-sky/20 hover:border-sky/40 cursor-pointer transition-colors",onClick:()=>e("/emails"),children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Interview Emails"}),a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-sky-bg",children:a.jsx(Ni,{className:"h-4 w-4 text-sky"})})]}),a.jsx("div",{className:"space-y-3",children:h.map(v=>{const g=v.status==="sent"?"signal-badge-high":v.status==="opened"?"signal-badge-mid":"signal-badge-low";return a.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border/30 last:border-0",children:[a.jsxs("div",{className:"min-w-0 flex-1 mr-3",children:[a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:v.subject}),a.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[v.to," · ",v.date]})]}),a.jsx("span",{className:`${g} text-[10px] shrink-0`,children:v.status})]},v.id)})})]}),a.jsxs("div",{className:"bento-item border border-lavender/20 hover:border-lavender/40 cursor-pointer transition-colors",onClick:()=>e("/calendar"),children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Upcoming Interviews"}),a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-lavender-bg",children:a.jsx(dv,{className:"h-4 w-4 text-lavender"})})]}),a.jsx("div",{className:"space-y-2",children:[{time:"Today, 9:00 AM",candidate:"Sarah Chen",role:"Product Design Lead",type:"Technical"},{time:"Today, 11:00 AM",candidate:"Marcus Johnson",role:"Sr. Frontend Engineer",type:"Behavioral"},{time:"Today, 2:00 PM",candidate:"Aisha Patel",role:"Product Manager",type:"Final"},{time:"Tomorrow, 9:00 AM",candidate:"Liam O'Brien",role:"Platform Engineer",type:"Technical"},{time:"Tomorrow, 3:00 PM",candidate:"Priya Sharma",role:"Design Lead",type:"Culture"}].map((v,g)=>a.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-border/30 last:border-0",children:[a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-lavender-bg shrink-0",children:a.jsx(Xl,{className:"h-3.5 w-3.5 text-lavender"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:v.candidate}),a.jsx("p",{className:"text-[10px] text-muted-foreground truncate",children:v.role})]}),a.jsxs("div",{className:"text-right shrink-0",children:[a.jsx("p",{className:"text-[10px] font-medium text-foreground",children:v.time}),a.jsx("p",{className:"text-[10px] text-muted-foreground",children:v.type})]})]},g))})]})]}),a.jsx(st,{open:t==="roles",onOpenChange:()=>n(null),children:a.jsxs(Ze,{className:"max-w-lg",children:[a.jsx(it,{children:a.jsxs(ot,{children:["Active Roles (",l.length,")"]})}),a.jsx("div",{className:"space-y-3 max-h-[60vh] overflow-y-auto",children:l.map(v=>a.jsxs("div",{className:"p-4 rounded-lg bg-sky-bg/50 border border-sky/20 cursor-pointer hover:border-sky/40 transition-colors",onClick:()=>{n(null),e("/jobs")},children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:v.title}),a.jsx("p",{className:"text-xs text-muted-foreground",children:v.company})]}),a.jsx("span",{className:"signal-badge-high",children:v.status})]}),a.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:v.signals.map(g=>a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-mint-bg text-mint border border-mint/20",children:g.name},g.name))}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[v.applicantCount," applicants"]})]},v.id))})]})}),a.jsx(st,{open:t==="candidates",onOpenChange:()=>n(null),children:a.jsxs(Ze,{className:"max-w-lg",children:[a.jsx(it,{children:a.jsxs(ot,{children:["All Candidates (",c,")"]})}),a.jsx("div",{className:"space-y-3 max-h-[60vh] overflow-y-auto",children:jd.map(v=>a.jsxs("div",{className:"p-4 rounded-lg bg-lavender-bg/50 border border-lavender/20 cursor-pointer hover:border-lavender/40 transition-colors",onClick:()=>f(v.name),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-lavender-bg text-lavender text-sm font-semibold",children:v.avatarInitials}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:v.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:v.email})]})]}),a.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:v.personas.map(g=>a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-peach-bg text-peach border border-peach/20",children:g.name},g.id))})]},v.id))})]})}),a.jsx(st,{open:t==="topups",onOpenChange:()=>n(null),children:a.jsxs(Ze,{className:"max-w-lg",children:[a.jsx(it,{children:a.jsxs(ot,{children:["Top-Up Requests (",u.length,")"]})}),a.jsx("div",{className:"space-y-3 max-h-[60vh] overflow-y-auto",children:u.map(v=>a.jsxs("div",{className:"p-4 rounded-lg bg-peach-bg/50 border border-peach/20 cursor-pointer hover:border-peach/40 transition-colors",onClick:()=>f(v.applicantName,!0),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:v.applicantName}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[v.jobTitle," · ",v.company]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[v.topUpRequest&&a.jsx("span",{className:p(v.topUpRequest.status),children:v.topUpRequest.status}),a.jsxs("span",{className:"signal-badge-mid",children:[v.signalMatch,"%"]})]})]}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Persona: ",v.persona]}),v.topUpRequest&&a.jsxs("div",{className:"mt-2 rounded-md bg-muted/50 border border-border p-2",children:[a.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested Info:"}),a.jsx("p",{className:"text-xs text-foreground",children:v.topUpRequest.requestedInfo})]})]},v.id))})]})}),a.jsx(J6,{open:!!r,onOpenChange:v=>!v&&s(null),candidateName:r,showTopUp:i})]})}function Ln(){const e=Jt();return a.jsxs(W,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground hover:text-foreground -ml-2 mb-4",onClick:()=>e("/"),children:[a.jsx(Xd,{className:"h-4 w-4"}),"Dashboard"]})}function $b(e,[t,n]){return Math.min(n,Math.max(t,e))}function X6(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Z6=[" ","Enter","ArrowUp","ArrowDown"],eH=[" ","Enter"],bi="Select",[Ph,Rh,tH]=Yd(bi),[ha,U7]=Mr(bi,[tH,oa]),Ah=oa(),[nH,Rs
vendor: 3,516 bytes, line 535
535]=ha(bi),[rH,sH]=ha(bi),f_=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:h,disabled:f,required:p,form:v}=e,g=Ah(t),[y,b]=m.useState(null),[w,x]=m.useState(null),[S,j]=m.useState(!1),k=Bv(u),[C,N]=yi({prop:r,defaultProp:s??!1,onChange:i,caller:bi}),[_,E]=yi({prop:o,defaultProp:l,onChange:c,caller:bi}),M=m.useRef(null),O=y?v||!!y.closest("form"):!0,[H,I]=m.useState(new Set),K=Array.from(H).map($=>$.props.value).join(";");return a.jsx(Ev,{...g,children:a.jsxs(nH,{required:p,scope:t,trigger:y,onTriggerChange:b,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:j,contentId:rr(),value:_,onValueChange:E,open:C,onOpenChange:N,dir:k,triggerPointerDownPosRef:M,disabled:f,children:[a.jsx(Ph.Provider,{scope:t,children:a.jsx(rH,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback($=>{I(Q=>new Set(Q).add($))},[]),onNativeOptionRemove:m.useCallback($=>{I(Q=>{const P=new Set(Q);return P.delete($),P})},[]),children:n})}),O?a.jsxs(L_,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:h,value:_,onChange:$=>E($.target.value),disabled:f,form:v,children:[_===void 0?a.jsx("option",{value:""}):null,Array.from(H)]},K):null]})})};f_.displayName=bi;var p_="SelectTrigger",m_=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Ah(n),o=Rs(p_,n),l=o.disabled||r,c=we(t,o.onTriggerChange),u=Rh(n),d=m.useRef("touch"),[h,f,p]=F_(g=>{const y=u().filter(x=>!x.disabled),b=y.find(x=>x.value===o.value),w=U_(y,g,b);w!==void 0&&o.onValueChange(w.value)}),v=g=>{l||(o.onOpenChange(!0),p()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return a.jsx(Tv,{asChild:!0,...i,children:a.jsx(le.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":$_(o.value)?"":void 0,...s,ref:c,onClick:q(s.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&v(g)}),onPointerDown:q(s.onPointerDown,g=>{d.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:q(s.onKeyDown,g=>{const y=h.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(y&&g.key===" ")&&Z6.includes(g.key)&&(v(),g.preventDefault())})})})});m_.displayName=p_;var g_="SelectValue",v_=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...l}=e,c=Rs(g_,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,h=we(t,c.onValueNodeChange);return pt(()=>{u(d)},[u,d]),a.jsx(le.span,{...l,ref:h,style:{pointerEvents:"none"},children:$_(c.value)?a.jsx(a.Fragment,{children:o}):i})});v_.displayName=g_;var iH="SelectIcon",y_=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return a.jsx(le.span,{"aria-hidden":!0,...s,ref:t,children:r||"▼"})});y_.displayName=iH;var oH="SelectPortal",x_=e=>a.jsx(Jl,{asChild:!0,...e});x_.displayName=oH;var Si="SelectContent",w_=m.forwardRef((e,t)=>{const n=Rs(Si,e.__scopeSelect),[r,s]=m.useState();if(pt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Ci.createPortal(a.jsx(b_,{scope:e.__scopeSelect,children:a.jsx(Ph.Slot,{scope:e.__scopeSelect,children:a.jsx("div",{children:e.children})})}),i):null}return a.jsx(S_,{...e,ref:t})});
vendor: 14,584 bytes, line 535
535w_.displayName=Si;var bn=10,[b_,As]=ha(Si),aH="SelectContentImpl",lH=vi("SelectContent.RemoveScroll"),S_=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:y,...b}=e,w=Rs(Si,n),[x,S]=m.useState(null),[j,k]=m.useState(null),C=we(t,U=>S(U)),[N,_]=m.useState(null),[E,M]=m.useState(null),O=Rh(n),[H,I]=m.useState(!1),K=m.useRef(!1);m.useEffect(()=>{if(x)return Lv(x)},[x]),Iv();const $=m.useCallback(U=>{const[ge,...pe]=O().map(te=>te.ref.current),[he]=pe.slice(-1),A=document.activeElement;for(const te of U)if(te===A||(te==null||te.scrollIntoView({block:"nearest"}),te===ge&&j&&(j.scrollTop=0),te===he&&j&&(j.scrollTop=j.scrollHeight),te==null||te.focus(),document.activeElement!==A))return},[O,j]),Q=m.useCallback(()=>$([N,x]),[$,N,x]);m.useEffect(()=>{H&&Q()},[H,Q]);const{onOpenChange:P,triggerPointerDownPosRef:T}=w;m.useEffect(()=>{if(x){let U={x:0,y:0};const ge=he=>{var A,te;U={x:Math.abs(Math.round(he.pageX)-(((A=T.current)==null?void 0:A.x)??0)),y:Math.abs(Math.round(he.pageY)-(((te=T.current)==null?void 0:te.y)??0))}},pe=he=>{U.x<=10&&U.y<=10?he.preventDefault():x.contains(he.target)||P(!1),document.removeEventListener("pointermove",ge),T.current=null};return T.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",pe,{capture:!0})}}},[x,P,T]),m.useEffect(()=>{const U=()=>P(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[P]);const[R,V]=F_(U=>{const ge=O().filter(A=>!A.disabled),pe=ge.find(A=>A.ref.current===document.activeElement),he=U_(ge,U,pe);he&&setTimeout(()=>he.ref.current.focus())}),B=m.useCallback((U,ge,pe)=>{const he=!K.current&&!pe;(w.value!==void 0&&w.value===ge||he)&&(_(U),he&&(K.current=!0))},[w.value]),z=m.useCallback(()=>x==null?void 0:x.focus(),[x]),ee=m.useCallback((U,ge,pe)=>{const he=!K.current&&!pe;(w.value!==void 0&&w.value===ge||he)&&M(U)},[w.value]),de=r==="popper"?tg:j_,ce=de===tg?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:p,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return a.jsx(b_,{scope:n,content:x,viewport:j,onViewportChange:k,itemRefCallback:B,selectedItem:N,onItemLeave:z,itemTextRefCallback:ee,focusSelectedItem:Q,selectedItemText:E,position:r,isPositioned:H,searchRef:R,children:a.jsx(ph,{as:lH,allowPinchZoom:!0,children:a.jsx(hh,{asChild:!0,trapped:w.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:q(s,U=>{var ge;(ge=w.trigger)==null||ge.focus({preventScroll:!0}),U.preventDefault()}),children:a.jsx(ea,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:a.jsx(de,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:U=>U.preventDefault(),...b,...ce,onPlaced:()=>I(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:q(b.onKeyDown,U=>{const ge=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!ge&&U.key.length===1&&V(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let he=O().filter(A=>!A.disabled).map(A=>A.ref.current);if(["ArrowUp","End"].includes(U.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){const A=U.target,te=he.indexOf(A);he=he.slice(te+1)}setTimeout(()=>$(he)),U.preventDefault()}})})})})})})});S_.displayName=aH;var cH="SelectItemAlignedPosition",j_=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Rs(Si,n),o=As(Si,n),[l,c]=m.useState(null),[u,d]=m.useState(null),h=we(t,C=>d(C)),f=Rh(n),p=m.useRef(!1),v=m.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:b,focusSelectedItem:w}=o,x=m.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&y&&b){const C=i.trigger.getBoundingClientRect(),N=u.getBoundingClientRect(),_=i.valueNode.getBoundingClientRect(),E=b.getBoundingClientRect();if(i.dir!=="rtl"){const A=E.left-N.left,te=_.left-A,ie=C.left-te,et=C.width+ie,Ms=Math.max(et,N.width),Lr=window.innerWidth-bn,Ds=$b(te,[bn,Math.max(bn,Lr-Ms)]);l.style.minWidth=et+"px",l.style.left=Ds+"px"}else{const A=N.right-E.right,te=window.innerWidth-_.right-A,ie=window.innerWidth-C.right-te,et=C.width+ie,Ms=Math.max(et,N.width),Lr=window.innerWidth-bn,Ds=$b(te,[bn,Math.max(bn,Lr-Ms)]);l.style.minWidth=et+"px",l.style.right=Ds+"px"}const M=f(),O=window.innerHeight-bn*2,H=g.scrollHeight,I=window.getComputedStyle(u),K=parseInt(I.borderTopWidth,10),$=parseInt(I.paddingTop,10),Q=parseInt(I.borderBottomWidth,10),P=parseInt(I.paddingBottom,10),T=K+$+H+P+Q,R=Math.min(y.offsetHeight*5,T),V=window.getComputedStyle(g),B=parseInt(V.paddingTop,10),z=parseInt(V.paddingBottom,10),ee=C.top+C.height/2-bn,de=O-ee,ce=y.offsetHeight/2,U=y.offsetTop+ce,ge=K+$+U,pe=T-ge;if(ge<=ee){const A=M.length>0&&y===M[M.length-1].ref.current;l.style.bottom="0px";const te=u.clientHeight-g.offsetTop-g.offsetHeight,ie=Math.max(de,ce+(A?z:0)+te+Q),et=ge+ie;l.style.height=et+"px"}else{const A=M.length>0&&y===M[0].ref.current;l.style.top="0px";const ie=Math.max(ee,K+g.offsetTop+(A?B:0)+ce)+pe;l.style.height=ie+"px",g.scrollTop=ge-ee+g.offsetTop}l.style.margin=`${bn}px 0`,l.style.minHeight=R+"px",l.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[f,i.trigger,i.valueNode,l,u,g,y,b,i.dir,r]);pt(()=>x(),[x]);const[S,j]=m.useState();pt(()=>{u&&j(window.getComputedStyle(u).zIndex)},[u]);const k=m.useCallback(C=>{C&&v.current===!0&&(x(),w==null||w(),v.current=!1)},[x,w]);return a.jsx(dH,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:k,children:a.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:a.jsx(le.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});j_.displayName=cH;var uH="SelectPopperPosition",tg=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=bn,...i}=e,o=Ah(n);return a.jsx(_v,{...o,...i,ref:t,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});tg.displayName=uH;var[dH,Cy]=ha(Si,{}),ng="SelectViewport",k_=m.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=As(ng,n),o=Cy(ng,n),l=we(t,i.onViewportChange),c=m.useRef(0);return a.jsxs(a.Fragment,{children:[a.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),a.jsx(Ph.Slot,{scope:n,children:a.jsx(le.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:q(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const p=Math.abs(c.current-d.scrollTop);if(p>0){const v=window.innerHeight-bn*2,g=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),b=Math.max(g,y);if(b<v){const w=b+p,x=Math.min(v,w),S=w-x;h.style.height=x+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});k_.displayName=ng;var C_="SelectGroup",[hH,fH]=ha(C_),pH=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=rr();return a.jsx(hH,{scope:n,id:s,children:a.jsx(le.div,{role:"group","aria-labelledby":s,...r,ref:t})})});pH.displayName=C_;var N_="SelectLabel",E_=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=fH(N_,n);return a.jsx(le.div,{id:s.id,...r,ref:t})});E_.displayName=N_;var kd="SelectItem",[mH,T_]=ha(kd),__=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,l=Rs(kd,n),c=As(kd,n),u=l.value===r,[d,h]=m.useState(i??""),[f,p]=m.useState(!1),v=we(t,w=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,w,r,s)}),g=rr(),y=m.useRef("touch"),b=()=>{s||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return a.jsx(mH,{scope:n,value:r,disabled:s,textId:g,isSelected:u,onItemTextChange:m.useCallback(w=>{h(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:a.jsx(Ph.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:a.jsx(le.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:v,onFocus:q(o.onFocus,()=>p(!0)),onBlur:q(o.onBlur,()=>p(!1)),onClick:q(o.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:q(o.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:q(o.onPointerDown,w=>{y.current=w.pointerType}),onPointerMove:q(o.onPointerMove,w=>{var x;y.current=w.pointerType,s?(x=c.onItemLeave)==null||x.call(c):y.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:q(o.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:q(o.onKeyDown,w=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(eH.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});__.displayName=kd;var Fa="SelectItemText",P_=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Rs(Fa,n),l=As(Fa,n),c=T_(Fa,n),u=sH(Fa,n),[d,h]=m.useState(null),f=we(t,b=>h(b),c.onItemTextChange,b=>{var w;return(w=l.itemTextRefCallback)==null?void 0:w.call(l,b,c.value,c.disabled)}),p=d==null?void 0:d.textContent,v=m.useMemo(()=>a.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return pt(()=>(g(v),()=>y(v)),[g,y,v]),a.jsxs(a.Fragment,{children:[a.jsx(le.span,{id:c.textId,...i,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ci.createPortal(i.children,o.valueNode):null]})});P_.displayName=Fa;var R_="SelectItemIndicator",A_=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return T_(R_,n).isSelected?a.jsx(le.span,{"aria-hidden":!0,...r,ref:t}):null});A_.displayName=R_;var rg="SelectScrollUpButton",M_=m.forwardRef((e,t)=>{const n=As(rg,e.__scopeSelect),r=Cy(rg,e.__scopeSelect),[s,i]=m.useState(!1),o=we(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(O_,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});M_.displayName=rg;var sg="SelectScrollDownButton",D_=m.forwardRef((e,t)=>{const n=As(sg,e.__scopeSelect),r=Cy(sg,e.__scopeSelect),[s,i]=m.useState(!1),o=we(t,r.onScrollButtonChange);return pt(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),s?a.jsx(O_,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});D_.displayName=sg;var O_=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=As("SelectScrollButton",n),o=m.useRef(null),l=Rh(n),c=m.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return m.useEffect(()=>()=>c(),[c]),pt(()=>{var d;const u=l().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),a.jsx(le.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:q(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:q(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:q(s.onPointerLeave,()=>{c()})})}),gH="SelectSeparator",I_=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a.jsx(le.div,{"aria-hidden":!0,...r,ref:t})});I_.displayName=gH;var ig="SelectArrow",vH=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Ah(n),i=Rs(ig,n),o=As(ig,n);return i.open&&o.position==="popper"?a.jsx(Pv,{...s,...r,ref:t}):null});vH.displayName=ig;var yH="SelectBubbleInput",L_=m.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const s=m.useRef(null),i=we(r,s),o=X6(t);return m.useEffect(()=>{const l=s.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[o,t]),a.jsx(le.select,{...n,style:{...Kj,...n.style},ref:i,defaultValue:t})});L_.displayName=yH;function $_(e){return e===""||e===void 0}function F_(e){const t=Ft(e),n=m.useRef(""),r=m.useRef(0),s=m.useCallback(o=>{const l=n.current+o;t(l),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(l)},[t]),i=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function U_(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=xH(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function xH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wH=f_,V_=m_,bH=v_,SH=y_,jH=x_,B_=w_,kH=k_,z_=E_,H_=__,CH=P_,NH=A_,W_=M_,q_=D_,K_=I_;const He=wH,We=bH,Ve=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(V_,{ref:r,className:J("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
535ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,a.jsx(SH,{asChild:!0,children:a.jsx(Zd,{className:"h-4 w-4 opacity-50"})})]}));Ve.displayName=V_.displayName;const G_=m.forwardRef(({className:e,...t},n)=>a.jsx(W_,{ref:n,className:J("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(tO,{className:"h-4 w-4"})}));G_.displayName=W_.displayName;const Y_=m.forwardRef(({className:e,...t},n)=>a.jsx(q_,{ref:n,className:J("flex cursor-default items-center justify-center py-1",e),...t,children:a.jsx(Zd,{className:"h-4 w-4"})}));Y_.displayName=q_.displayName;const Be=m.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>a.jsx(jH,{children:a.jsxs(B_,{ref:s,className:J("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[a.jsx(G_,{}),a.jsx(kH,{className:J("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),a.jsx(Y_,{})]})}));Be.displayName=B_.displayName;const EH=m.forwardRef(({className:e,...t},n)=>a.jsx(z_,{ref:n,className:J("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));EH.displayName=z_.displayName;const ne=m.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(H_,{ref:r,className:J("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(NH,{children:a.jsx(hv,{className:"h-4 w-4"})})}),a.jsx(CH,{children:t})]}));ne.displayName=H_.displayName;const TH=m.forwardRef(({className:e,...t},n)=>a.jsx(K_,{ref:n,className:J("-mx-1 my-1 h-px bg-muted",e),...t}));TH.displayName=K_.displayName;const _H=["Engineering","Design","Product","Data & Analytics","Marketing","Operations","Sales","HR & People"],PH=["Full-time","Part-time","Contract","Freelance","Internship"],RH=[{label:"Intern",years:"0 years"},{label:"Entry Level",years:"0–1 years"},{label:"Junior",years:"1–3 years"},{label:"Mid Level",years:"3–5 years"},{label:"Senior",years:"5–8 years"},{label:"Staff",years:"8–12 years"},{label:"Lead",years:"10–15 years"},{label:"Principal",years:"12–18 years"},{label:"Director",years:"15+ years"},{label:"VP",years:"18+ years"}],AH=["$30k – $50k","$50k – $70k","$70k – $90k","$90k – $110k","$110k – $130k","$130k – $160k","$160k – $200k","$200k – $250k","$250k – $300k","$300k+"],Fb={Engineering:[{name:"Technical Architecture",weight:25},{name:"System Design",weight:20},{name:"Code Quality",weight:20},{name:"Team Collaboration",weight:20},{name:"Communication",weight:15}],Design:[{name:"Design Systems",weight:25},{name:"User Research",weight:20},{name:"Prototyping",weight:20},{name:"Stakeholder Mgmt",weight:20},{name:"Communication",weight:15}],Product:[{name:"Product Strategy",weight:25},{name:"User Research",weight:20},{name:"Data-Driven Decisions",weight:20},{name:"Stakeholder Mgmt",weight:20},{name:"Communication",weight:15}],"Data & Analytics":[{name:"Data Modeling",weight:25},{name:"SQL & Analytics",weight:20},{name:"Data Visualization",weight:20},{name:"Statistical Analysis",weight:20},{name:"Communication",weight:15}],Marketing:[{name:"Campaign Strategy",weight:25},{name:"Analytics & Attribution",weight:20},{name:"Content Creation",weight:20},{name:"Cross-Team Collaboration",weight:20},{name:"Communication",weight:15}],Operations:[{name:"Process Optimization",weight:25},{name:"Project Management",weight:20},{name:"Problem Solving",weight:20},{name:"Stakeholder Mgmt",weight:20},{name:"Communication",weight:15}],Sales:[{name:"Revenue Growth",weight:25},{name:"Pipeline Management",weight:20},{name:"Relationship Building",weight:20},{name:"Negotiation",weight:20},{name:"Communication",weight:15}],"HR & People":[{name:"Talent Strategy",weight:25},{name:"Employee Experience",weight:20},{name:"Conflict Resolution",weight:20},{name:"Stakeholder Mgmt",weight:20},{name:"Communication",weight:15}]},MH=["Remote","Hybrid","On-site"];function DH({open:e,onOpenChange:t}){const[n,r]=m.useState(""),[s,i]=m.useState(""),[o,l]=m.useState(""),[c,u]=m.useState(""),[d,h]=m.useState(""),[f,p]=m.useState(""),[v,g]=m.useState(""),[y,b]=m.useState(""),[w,x]=m.useState(""),[S,j]=m.useState(""),[k,C]=m.useState(""),[N,_]=m.useState([{name:"",weight:20}]),[E,M]=m.useState(!1),{toast:O}=cr(),H=N.reduce((R,V)=>R+V.weight,0),I=n.trim()&&s.trim()&&o&&c&&N.every(R=>R.name.trim())&&H===100,K=()=>{N.length<7&&_([...N,{name:"",weight:10}])},$=R=>{N.length>1&&_(N.filter((V,B)=>B!==R))},Q=(R,V,B)=>{_(N.map((z,ee)=>ee===R?{...z,[V]:B}:z))},P=()=>{I&&(M(!0),setTimeout(()=>{M(!1),O({title:"Job posted!",description:`"${n}" at ${s} is now live.`}),t(!1),T()},1200))},T=()=>{r(""),i(""),l(""),u(""),h(""),p(""),g(""),b(""),x(""),j(""),C(""),_([{name:"",weight:20}])};return a.jsx(st,{open:e,onOpenChange:R=>{R||T(),t(R)},children:a.jsxs(Ze,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[a.jsxs(it,{children:[a.jsxs(ot,{className:"flex items-center gap-2",children:[a.jsx(Lt,{className:"h-5 w-5 text-primary"}),"New Job Posting"]}),a.jsx(da,{children:"Create a new role with success signals for AI-driven candidate matching."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Job Title *"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Senior Frontend Engineer",value:n,onChange:R=>r(R.target.value),maxLength:80})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Company *"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Acme Corp",value:s,onChange:R=>i(R.target.value),maxLength:60})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Department *"}),a.jsxs(He,{value:o,onValueChange:l,children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select..."})}),a.jsx(Be,{children:_H.map(R=>a.jsx(ne,{value:R,children:R},R))})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Employment Type *"}),a.jsxs(He,{value:c,onValueChange:u,children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select..."})}),a.jsx(Be,{children:PH.map(R=>a.jsx(ne,{value:R,children:R},R))})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Experience Level"}),a.jsxs(He,{value:d,onValueChange:h,children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select..."})}),a.jsx(Be,{children:RH.map(R=>a.jsxs(ne,{value:R.label,children:[R.label," ",a.jsxs("span",{className:"text-muted-foreground ml-1",children:["(",R.years,")"]})]},R.label))})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Location Type"}),a.jsxs(He,{value:f,onValueChange:p,children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select..."})}),a.jsx(Be,{children:MH.map(R=>a.jsx(ne,{value:R,children:R},R))})]})]})]}),f&&f!=="Remote"&&a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Location"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. San Francisco, CA",value:v,onCh
535ange:R=>g(R.target.value)})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Salary Range (USD)"}),a.jsxs(He,{value:y,onValueChange:R=>{b(R),R!=="custom"&&x("")},children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select range..."})}),a.jsxs(Be,{children:[AH.map(R=>a.jsx(ne,{value:R,children:R},R)),a.jsx(ne,{value:"custom",children:"Custom (type manually)"})]})]}),y==="custom"&&a.jsx(me,{className:"mt-2",placeholder:"e.g. $140k – $180k",value:w,onChange:R=>x(R.target.value)})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Job Description"}),a.jsx(Cs,{className:"mt-1.5 min-h-[80px]",placeholder:"Describe the role, responsibilities, and what makes it exciting...",value:S,onChange:R=>j(R.target.value)})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Requirements"}),a.jsx(Cs,{className:"mt-1.5 min-h-[60px]",placeholder:"Key qualifications, skills, and experience required...",value:k,onChange:R=>C(R.target.value)})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[a.jsx(Vo,{className:"h-3.5 w-3.5 text-primary"}),"Success Signals *"]}),a.jsxs("span",{className:`text-xs font-medium ${H===100?"text-success":"text-destructive"}`,children:[H,"/100%"]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Define the signals our AI uses to match candidates. Weights must total 100%."}),o&&Fb[o]&&a.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-primary hover:text-primary/80 mb-3 transition-colors",onClick:()=>_(Fb[o].map(R=>({...R}))),children:[a.jsx(Vo,{className:"h-3 w-3"}),"Use suggested signals for ",o]}),a.jsx("div",{className:"space-y-2",children:N.map((R,V)=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(me,{className:"flex-1",placeholder:"e.g. Technical Architecture",value:R.name,onChange:B=>Q(V,"name",B.target.value),maxLength:40}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(me,{className:"w-16 text-center",type:"number",min:5,max:50,value:R.weight,onChange:B=>Q(V,"weight",parseInt(B.target.value)||0)}),a.jsx("span",{className:"text-xs text-muted-foreground",children:"%"})]}),N.length>1&&a.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:()=>$(V),children:a.jsx(or,{className:"h-3.5 w-3.5"})})]},V))}),N.length<7&&a.jsxs(W,{variant:"ghost",size:"sm",className:"mt-2 gap-1 text-xs text-muted-foreground",onClick:K,children:[a.jsx(jr,{className:"h-3 w-3"})," Add Signal"]})]}),!I&&n&&a.jsx("div",{className:"p-3 rounded-lg bg-accent/50 border border-border/30",children:a.jsx("p",{className:"text-xs text-muted-foreground",children:H!==100?`Signal weights must total 100% (currently ${H}%)`:N.every(R=>R.name.trim())?"Fill in all required fields (*) to post":"All signals need a name"})}),a.jsx(W,{className:"w-full gap-2",disabled:!I||E,onClick:P,children:E?a.jsx(a.Fragment,{children:"Publishing..."}):a.jsxs(a.Fragment,{children:[a.jsx(Lt,{className:"h-4 w-4"})," Publish Job Posting"]})})]})]})})}function OH(){const e=Jt(),{mode:t}=Ir(),[n,r]=m.useState(!1),[s,i]=m.useState("all"),[o,l]=m.useState(""),c=m.useMemo(()=>{let u=s==="all"?[...Vl]:Vl.filter(d=>d.status===s);if(o.trim()){const d=o.toLowerCase();u=u.filter(h=>h.title.toLowerCase().includes(d))}return u.sort((d,h)=>d.title.localeCompare(h.title))},[s,o]);return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[t==="recruiter"&&a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Job Postings"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Manage roles and success signals"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search by role title...",value:o,onChange:u=>l(u.target.value),className:"pl-9"})]}),a.jsxs(He,{value:s,onValueChange:i,children:[a.jsx(Ve,{className:"w-40 shrink-0",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Status"}),a.jsx(ne,{value:"active",children:"Active"}),a.jsx(ne,{value:"paused",children:"Paused"}),a.jsx(ne,{value:"closed",children:"Closed"})]})]}),a.jsxs(W,{size:"sm",className:"gap-2 shrink-0 h-10",onClick:()=>r(!0),children:[a.jsx(jr,{className:"h-4 w-4"}),"New Posting"]})]}),a.jsxs("div",{className:"space-y-2",children:[c.map(u=>a.jsx("div",{className:"bento-item cursor-pointer transition-all hover:border-sky/40 hover:shadow-md",onClick:()=>e(`/applications?role=${encodeURIComponent(u.title)}`),children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-sky-bg",children:a.jsx(Lt,{className:"h-5 w-5 text-sky"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:u.title}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[u.applicantCount," applicants"]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:`text-xs px-2 py-0.5 rounded-full ${u.status==="active"?"signal-badge-high":u.status==="paused"?"signal-badge-mid":"signal-badge-low"}`,children:u.status}),a.jsx(eh,{className:"h-4 w-4 text-muted-foreground"})]})]})},u.id)),c.length===0&&a.jsx("div",{className:"bento-item col-span-full text-center py-12",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No job postings match this filter."})})]}),a.jsx(DH,{open:n,onOpenChange:r})]})}const Ub=e=>{let t;const n=new Set,r=(u,d)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const f=t;t=d??(typeof h!="object"||h===null)?h:Object.assign({}
535,t,h),n.forEach(p=>p(t,f))}},s=()=>t,l={setState:r,getState:s,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,s,l);return l},IH=e=>e?Ub(e):Ub,LH=e=>e;function $H(e,t=LH){const n=F.useSyncExternalStore(e.subscribe,F.useCallback(()=>t(e.getState()),[e,t]),F.useCallback(()=>t(e.getInitialState()),[e,t]));return F.useDebugValue(n),n}const Vb=e=>{const t=IH(e),n=r=>$H(t,r);return Object.assign(n,t),n},FH=e=>e?Vb(e):Vb,sn={hr_screen:"HR Screen",technical:"Technical Round",hm_review:"Hiring Manager Review",final_round:"Final Round",offer:"Offer"},nt=["hr_screen","technical","hm_review","final_round","offer"],UH=[{id:"1-p1",name:"Sarah Chen",avatarInitials:"SC",persona:"Fintech Lead",jobTitle:"Senior Frontend Engineer",jobId:"j1",overallMatch:92,currentStage:"hm_review",greenlitAt:new Date(Date.now()-3*864e5),greenlitBy:"HR Team",activities:[{id:"s1",timestamp:new Date(Date.now()-3*864e5),actor:"HR",action:"Greenlit candidate",detail:"Sarah Chen approved for Senior Frontend Engineer pipeline"},{id:"s2",timestamp:new Date(Date.now()-2.5*864e5),actor:"HR",action:"Scheduled HR Screen",detail:"Mar 28 at 10:00 AM with Lisa Park"},{id:"s3",timestamp:new Date(Date.now()-2*864e5),actor:"HR",action:"Completed HR Screen",detail:"Strong communication, culture fit excellent"},{id:"s4",timestamp:new Date(Date.now()-2*864e5),actor:"System",action:"Advanced to Technical Round"},{id:"s5",timestamp:new Date(Date.now()-1.5*864e5),actor:"HR",action:"Scheduled Technical Round",detail:"Mar 29 at 2:00 PM with James Wu"},{id:"s6",timestamp:new Date(Date.now()-1*864e5),actor:"HM",action:"Completed Technical Round",detail:"Excellent system design, strong React expertise. Recommend advancing."},{id:"s7",timestamp:new Date(Date.now()-1*864e5),actor:"System",action:"Advanced to Hiring Manager Review"}],scheduledInterviews:[{id:"si1",stage:"hm_review",date:"2026-04-02",time:"11:00",interviewer:"David Park (HM)",notes:"Focus on leadership and team fit"}]},{id:"4-p4",name:"Liam O'Brien",avatarInitials:"LO",persona:"UI Engineer",jobTitle:"Senior Frontend Engineer",jobId:"j1",overallMatch:88,currentStage:"technical",greenlitAt:new Date(Date.now()-2*864e5),greenlitBy:"HR Team",activities:[{id:"l1",timestamp:new Date(Date.now()-2*864e5),actor:"HR",action:"Greenlit candidate",detail:"Liam O'Brien approved for Senior Frontend Engineer pipeline"},{id:"l2",timestamp:new Date(Date.now()-1.5*864e5),actor:"HR",action:"Scheduled HR Screen",detail:"Mar 29 at 9:00 AM with Lisa Park"},{id:"l3",timestamp:new Date(Date.now()-1*864e5),actor:"HR",action:"Completed HR Screen",detail:"Good energy, deep component architecture knowledge"},{id:"l4",timestamp:new Date(Date.now()-1*864e5),actor:"System",action:"Advanced to Technical Round"}],scheduledInterviews:[{id:"si2",stage:"technical",date:"2026-04-01",time:"14:00",interviewer:"James Wu (Staff Eng)",notes:"Live coding + system design"}]},{id:"3-p3",name:"Aisha Patel",avatarInitials:"AP",persona:"Growth PM",jobTitle:"Product Design Lead",jobId:"j2",overallMatch:90,currentStage:"final_round",greenlitAt:new Date(Date.now()-5*864e5),greenlitBy:"HR Team",activities:[{id:"a1",timestamp:new Date(Date.now()-5*864e5),actor:"HR",action:"Greenlit candidate",detail:"Aisha Patel approved for Product Design Lead pipeline"},{id:"a2",timestamp:new Date(Date.now()-4*864e5),actor:"HR",action:"Completed HR Screen",detail:"Outstanding stakeholder management examples"},{id:"a3",timestamp:new Date(Date.now()-4*864e5),actor:"System",action:"Advanced to Technical Round"},{id:"a4",timestamp:new Date(Date.now()-3*864e5),actor:"HM",action:"Completed Technical Round",detail:"Design system knowledge is top-tier. Portfolio review was impressive."},{id:"a5",timestamp:new Date(Date.now()-3*864e5),actor:"System",action:"Advanced to Hiring Manager Review"},{id:"a6",timestamp:new Date(Date.now()-2*864e5),actor:"HM",action:"Completed Hiring Manager Review",detail:"Strong leadership qualities. Team loved her. Moving to final."},{id:"a7",timestamp:new Date(Date.now()-2*864e5),actor:"System",action:"Advanced to Final Round"}],scheduledInterviews:[{id:"si3",stage:"final_round",date:"2026-04-03",time:"10:00",interviewer:"VP Design Panel",notes:"Executive presentation + culture add assessment"}]},{id:"6-p6",name:"Jordan Rivera",avatarInitials:"JR",persona:"Data Analyst",jobTitle:"Senior Data Analyst",jobId:"j3",overallMatch:91,currentStage:"hr_screen",greenlitAt:new Date(Date.now()-.5*864e5),greenlitBy:"HR Team",activities:[{id:"j1",timestamp:new Date(Date.now()-.5*864e5),actor:"HR",action:"Greenlit candidate",detail:"Jordan Rivera approved for Senior Data Analyst pipeline"},{id:"j2",timestamp:new Date(Date.now()-.2*864e5),actor:"HR",action:"Added note",detail:"Top scorer across all data signals. Fast-track recommended."}],scheduledInterviews:[]},{id:"5-p5",name:"Priya Sharma",avatarInitials:"PS",persona:"Design Lead",jobTitle:"Product Design Lead",jobId:"j2",overallMatch:87,currentStage:"technical",greenlitAt:new Date(Date.now()-3*864e5),greenlitBy:"HR Team",activities:[{id:"p1",timestamp:new Date(Date.now()-3*864e5),actor:"HR",action:"Greenlit candidate",detail:"Priya Sharma approved for Product Design Lead pipeline"},{id:"p2",timestamp:new Date(Date.now()-2*864e5),actor:"HR",action:"Completed HR Screen",detail
535:"Governance model for design systems was very well articulated"},{id:"p3",timestamp:new Date(Date.now()-2*864e5),actor:"System",action:"Advanced to Technical Round"}],scheduledInterviews:[{id:"si4",stage:"technical",date:"2026-04-01",time:"10:00",interviewer:"Senior Designer Panel",notes:"Portfolio deep-dive + design challenge"}]},{id:"9-p9",name:"Natasha Volkov",avatarInitials:"NV",persona:"Analytics Lead",jobTitle:"Senior Data Analyst",jobId:"j3",overallMatch:84,currentStage:"hm_review",greenlitAt:new Date(Date.now()-4*864e5),greenlitBy:"HR Team",activities:[{id:"n1",timestamp:new Date(Date.now()-4*864e5),actor:"HR",action:"Greenlit candidate",detail:"Natasha Volkov approved for Senior Data Analyst pipeline"},{id:"n2",timestamp:new Date(Date.now()-3*864e5),actor:"HR",action:"Completed HR Screen"},{id:"n3",timestamp:new Date(Date.now()-3*864e5),actor:"System",action:"Advanced to Technical Round"},{id:"n4",timestamp:new Date(Date.now()-2*864e5),actor:"HM",action:"Completed Technical Round",detail:"SQL skills are excellent. Propensity model case study was strong."},{id:"n5",timestamp:new Date(Date.now()-2*864e5),actor:"System",action:"Advanced to Hiring Manager Review"}],scheduledInterviews:[{id:"si5",stage:"hm_review",date:"2026-04-02",time:"15:00",interviewer:"Maria Santos (Data Lead)",notes:"Team dynamics and data culture discussion"}]}],VH=[{id:"sn1",message:"🟢 Sarah Chen greenlit for Senior Frontend Engineer — ready for HM review",timestamp:new Date(Date.now()-3*864e5),read:!0},{id:"sn2",message:"📋 Sarah Chen moved to Hiring Manager Review",timestamp:new Date(Date.now()-1*864e5),read:!1},{id:"sn3",message:"🟢 Aisha Patel greenlit for Product Design Lead — ready for HM review",timestamp:new Date(Date.now()-5*864e5),read:!0},{id:"sn4",message:"📋 Aisha Patel moved to Final Round",timestamp:new Date(Date.now()-2*864e5),read:!1},{id:"sn5",message:"🟢 Jordan Rivera greenlit for Senior Data Analyst — ready for HM review",timestamp:new Date(Date.now()-.5*864e5),read:!1},{id:"sn6",message:"📋 Natasha Volkov moved to Hiring Manager Review",timestamp:new Date(Date.now()-2*864e5),read:!1}],Mh=FH((e,t)=>({pipeline:UH,notifications:VH,candidateNotes:{},greenlightCandidate:n=>{if(t().pipeline.find(l=>l.id===n.id))return;const s=new Date,i={...n,currentStage:"hr_screen",greenlitAt:s,greenlitBy:"HR Team",activities:[{id:crypto.randomUUID(),timestamp:s,actor:"HR",action:"Greenlit candidate",detail:`${n.name} approved for ${n.jobTitle} pipeline`}],scheduledInterviews:[]},o={id:crypto.randomUUID(),message:`🟢 ${n.name} greenlit for ${n.jobTitle} — ready for HM review`,timestamp:s,read:!1};e(l=>({pipeline:[...l.pipeline,i],notifications:[o,...l.notifications]}))},addActivity:(n,r)=>{e(s=>({pipeline:s.pipeline.map(i=>i.id===n?{...i,activities:[...i.activities,{...r,id:crypto.randomUUID(),timestamp:new Date}]}:i)}))},advanceStage:n=>{const r=t().pipeline.find(o=>o.id===n);if(!r)return;const s=nt.indexOf(r.currentStage);if(s>=nt.length-1)return;const i=nt[s+1];e(o=>({pipeline:o.pipeline.map(l=>l.id===n?{...l,currentStage:i}:l)})),t().addActivity(n,{actor:"System",action:`Advanced to ${sn[i]}`}),e(o=>({notifications:[{id:crypto.randomUUID(),message:`📋 ${r.name} moved to ${sn[i]}`,timestamp:new Date,read:!1},...o.notifications]}))},scheduleInterview:(n,r)=>{const s={...r,id:crypto.randomUUID()};e(i=>({pipeline:i.pipeline.map(o=>o.id===n?{...o,scheduledInterviews:[...o.scheduledInterviews,s]}:o)})),t().addActivity(n,{actor:"HR",action:`Scheduled ${sn[r.stage]}`,detail:`${r.date} at ${r.time} with ${r.interviewer}`})},completeStage:(n,r,s)=>{t().addActivity(n,{actor:"HR",action:`Completed ${sn[r]}`,detail:s})},setDecision:(n,r)=>{const s=t().pipeline.find(i=>i.id===n);e(i=>({pipeline:i.pipeline.map(o=>o.id===n?{...o,decision:r}:o)})),s&&t().addActivity(n,{actor:"HM",action:`Decision: ${r.replace("_"," ")}`})},markNotificationRead:n=>{e(r=>({notifications:r.notifications.map(s=>s.id===n?{...s,read:!0}:s)}))},isGreenlit:n=>t().pipeline.some(r=>r.id===n),setCandidateNote:(n,r)=>{e(s=>({candidateNotes:{...s.candidateNotes,[n]:r}}))}})),BH=ta("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Bl({className:e,variant:t,...n}){return a.jsx("div",{className:J(BH({variant:t}),e),...n})}const Bb={shortlisted:"signal-badge-high",interview:"signal-badge-high",reviewing:"signal-badge-mid",rejected:"signal-badge-low"};function zH(){const[e]=uM(),t=Jt(),{mode:n}=Ir(),r=e.get("role"),[s,i]=m.useState(r||"all"),[o,l]=m.useState("name"),[c,u]=m.useState("asc"),[d,h]=m.useState(null),[f,p]=m.useState(""),{pipeline:v}=Mh();m.useEffect(()=>{r&&i(r)},[r]);const g=[...new Set(jo.map(j=>j.jobTitle))].sort((j,k)=>j.localeCompare(k)),y=m.useMemo(()=>{let j=s==="all"?[...jo]:jo.filter(k=>k.jobTitle===s);if(f.trim()){const k=f.toLowerCase();j=j.filter(C=>C.applicantName.toLowerCase().includes(k)||C.jobTitle.toLowerCase().includes(k)||C.persona.toLowerCase().includes(k))}return j.sort((k,C)=>{let N=0;return o==="name"?N=k.applicantName.localeCompare(C.applicantName):o==="signalMatch"?N=k.signalMatch-C.signalMatch:o==="status"&&(N=k.status.localeCompare(C.status)),c==="desc"?-N:N}),j},[s,o,c,f]),b=j=>{o===j?u(k=>k==="asc"?"desc":"asc"):(l(j),u("asc"))},w=({col:j})=>o!==j?a.jsx(YD,{className:"h-3 w-3"}):c==="asc"?a.jsx(QD,{className:"h-3 w-3 text-primary"}):a.jsx(GD,{className:"h-3 w-3 text-primary"}),x=y.find(j=>j.id===d),S=x?v.find(j=>j.name===x.applicantName):null;return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[n==="recruiter"&&a.jsx(Ln,{}),a.jsx("div",{className:"flex items-center justify-between flex-wrap gap-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[r&&a.jsx("button",{onClick:()=>t("/jobs"),className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border hover:bg-accent transition-colors","aria-label":"Back to Job Postings",children:a.jsx(Xd,{className:"h-4 w-4 text-muted-foreground"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:r?`${r} — Applications`:"Applications"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Track signal matches and top-up status"})]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search by name, role, or persona...",value:f,onChange:j=>p(j.target.value),className:"pl-9"})]}),a.jsxs(He,{value:s,onValueChange:i,children:[a.jsx(Ve,{className:"w-64 shrink-0",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Roles"}),g.map(j=>a.jsx(ne,{value:j,children:j},j))]})]})]}),a.jsx("div",{className:"bento-item overflow-hidden p-0",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full",role:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border/50",children:[a.jsx("th",{className:"text-left p-4",children:a.jsxs("button",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground uppercase tracking-wider hover:text-foreground transition-colors",onClick:()=>b("name"),children:["Candidate",a.jsx(w,{col:"name"})]})}),a.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider p-4 hidden md:table-cell",children:"Role"}),a.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider p-4 hidden lg:table-cell",children:"Persona"}),a.jsx("th",{className:"text-left p-4",children:a.jsxs("button",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground uppercase tracking-wider hover:text-foreground transition-colors",onClick:()=>b("signalMatch"),children:["Signal Match",a.jsx(w,{col:"signalMatch"})]})}),a.jsx("th",{className:"text-left text-xs font-medium text-muted-foreground uppercase tracking-wider p-4 hidden sm:table-cell",children:"Top-Up"}),a.jsx("th",{className:"text-left p-4",children:a.jsxs("button",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground uppercase tracking-wider hover:text-foreground transition-colors",onClick:()=>b("status"),children:["Status",a.jsx(w,{col:"status"})]})})]})}),a.jsx("tbody",{children:y.map(j=>{const k=j.signalMatch>=75?"signal-badge-high":j.signalMatch>=50?"signal-badge-mid":"signal-badge-low";return a.jsxs("tr",{className:"border-b border-border/20 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>h(j.id),children:[a.jsx("td",{className:"p-4",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-lavender-bg text-lavender text-xs font-semibold",children:j.applicantName.split(" ").map(C=>C[0]).join("")}),a.jsxs("div",{children:[a.jsx("span",{className:"text-sm font-medium text-foreground",children:j.applicantName}),a.jsx("p",{className:"text-xs text-muted-foreground md:hidden",children:j.jobTitle})]})]})}),a.jsx("td",{className:"p-4 hidden md:table-cell",children:a.jsx("span",{className:"text-sm text-foreground",children:j.jobTitle})}),a.jsx("td",{className:"p-4 hidden lg:table-cell",children:a.jsx("span",{className:"text-xs text-muted-foreground bg-peach-bg px-2 py-1 rounded text-peach border border-peach/20",children:j.persona})}),a.jsx("td",{className:"p-4",children:a.jsxs("span",{className:`${k} ${j.signalMatch>=75?"font-bold":""}`,"aria-label":`${j.signalMatch}% signal match`,children:[j.signalMatch,"%"]})}),a.jsx("td",{className:"p-4 hidden sm:table-cell",children:j.topUp?a.jsxs("span",{className:"flex items-center gap-1 text-xs text-mint","aria-label":"Top-up active",children:[a.jsx(pO,{className:"h-3 w-3"})," Active"]}):a.jsx("span",{className:"text-xs text-muted-foreground",children:"—"})}),a.jsx("td",{className:"p-4",children:a.jsx("span",{className:Bb[j.status]||"signal-badge-mid",children:j.status})})]},j.id)})})]})})}),a.jsx(st,{open:!!d,onOpenChange:j=>!j&&h(null),children:a.jsxs(Ze,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[a.jsx(it,{children:a.jsxs(ot,{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-lavender-bg text-lavender text-sm font-semibold",children:(x==null?void 0:x.applicantName.split(" ").map(j=>j[0]).join(""))??""}),a.jsxs("div",{children:[a.jsx("p",{className:"text-base",children:x==null?void 0:x.applicantName}),a.jsxs("p",{className:"text-xs text-muted-foreground font-normal",children:[x==null?void 0:x.persona," · ",x==null?void 0:x.jobTitle]})]})]})}),x&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsxs("div",{className:"rounded-md border border-mint/20 bg-mint-bg/30 p-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Signal Match"}),a.jsxs("p",{className:`text-lg font-bold ${x.signalMatch>=75?"text-mint":x.signalMatch>=50?"text-peach":"text-rose"}`,children:[x.signalMatch,"%"]})]}),a.jsxs("div",{className:"rounded-md border border-sky/20 bg-sky-bg/30 p-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Status"}),a.jsx("span",{className:`text-sm capitalize ${Bb[x.status]||"signal-badge-mid"}`,children:x.status})]}),a.jsxs("div",{className:"rounded-md border border-peach/20 bg-peach-bg/30 p-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Top-Up"}),a.jsx("p",{className:"text-sm text-foreground",children:x.topUp?"Active":"None"})]}),a.jsxs("div",{className:"rounded-md border border-lavender/20 bg-lavender-bg/30 p-3",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Persona"}),a.jsx("p",{className:"text-sm text-foreground",children:x.persona})]})]}),S&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Pipeline Progress"}),a.jsx("div",{className:"flex items-center gap-1 mb-2",children:nt.map((j,k)=>{const C=nt.indexOf(S.currentStage);return a.jsx("div",{className:"flex-1",children:a.jsx("div",{className:`h-2 rounded-full transition-colors ${k<C?"bg-mint":k===C?"bg-sky":"bg-muted"}`})},j)})}),a.jsx("div",{className:"flex justify-between",children:nt.map(j=>a.jsx("p",{className:`text-[10px] ${j===S.currentStage?"text-sky font-medium":"text-muted-foreground"}`,children:sn[j]},j))}),S.decision&&a.jsx("div",{className:"mt-2",children:a.jsx(Bl,{variant:S.decision==="hired"?"default":S.decision==="rejected"?"destructive":"secondary",className:"capitalize",children:S.decision.replace("_"," ")})}),S.activities.length>0&&a.jsxs("div",{className:"mt-4",children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Recent Activity"}),a.jsx("div",{className:"space-y-2",children:[...S.activities].reverse().slice(0,5).map(j=>a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Bl,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:j.actor}),a.jsx("span",{className:"text-xs text-foreground",children:j.action})]},j.id))})]})]}),!S&&a.jsx("div",{className:"rounded-md border border-border/50 p-4 text-center",children:a.jsx("p",{className:"text-xs text-muted-foreground",children:"This candidate is not in the interview pipeline yet."})}),a.jsx(_h,{candidateName:x.applicantName,defaultCollapsed:!0})]})]})})]})}const HH={"Fintech Lead":["Technical Architecture","System Design","Communication","Team Collaboration","Strategic Thinking"],"Product Designer":["Design Systems","User Research","Prototyping","Stakeholder Mgmt","Communication"],"ML Engineer":["ML Pipeline Design","Technical Architecture","System Design","Communication","Strategic Thinking"],"DevOps Lead":["Technical Architecture","System Design","Team Collaboration","Communication","React Expertise"],"SRE Specialist":["System Design","Team Collaboration","Communication","Technical Architecture","Strategic Thinking"],"Growth PM":["Stakeholder Mgmt","Communication","User Research","Strategic Thinking","Team Collaboration"],"
535UI Engineer":["React Expertise","Technical Architecture","Communication","Team Collaboration","System Design"],"Design Lead":["Design Systems","User Research","Prototyping","Stakeholder Mgmt","Conflict Resolution"],"Data Analyst":["Data Modeling","SQL & Analytics","Data Visualization","Statistical Analysis","Communication"],"Frontend Architect":["Technical Architecture","React Expertise","System Design","Team Collaboration","Communication"],"UX Designer":["User Research","Prototyping","Design Systems","Communication","Stakeholder Mgmt"],"Analytics Lead":["Data Modeling","SQL & Analytics","Statistical Analysis","Data Visualization","Communication"],"React Specialist":["React Expertise","Technical Architecture","System Design","Communication","Team Collaboration"],"Visual Designer":["Design Systems","Prototyping","User Research","Communication","Stakeholder Mgmt"],"BI Analyst":["Data Modeling","SQL & Analytics","Data Visualization","Communication","Statistical Analysis"]},WH={"Sarah Chen":{"Technical Architecture":'"...we migrated from a monolith to event-driven microservices. The key insight was isolating the payment domain boundary — that let us deploy 4x faster without cross-team coordination overhead..."',"React Expertise":'"...I introduced a compound component pattern with context-based state sharing. It reduced our form boilerplate by 60% and made the components fully accessible out of the box..."',"Team Collaboration":'"...I set up weekly architecture reviews where anyone could challenge decisions. It slowed us down initially, but the quality of our technical decisions improved dramatically..."',"System Design":'"...for the real-time pricing engine, we used a CQRS pattern with event sourcing. The read model was eventually consistent but could handle 50K requests per second..."',Communication:`"...I created a 'tech radar' document that translated our technical roadmap into business impact terms. The CFO told me it was the first time they understood why we needed to refactor..."`},"Marcus Johnson":{"Technical Architecture":'"...I designed the platform abstraction layer so teams could deploy without knowing whether they were on ECS or Kubernetes. The API contract was the boundary..."',"Team Collaboration":`"...cross-team PRs were a bottleneck. I introduced a 'platform office hours' model — 2 hours a day where any team could get live support on infrastructure changes..."`,"System Design":'"...the observability stack was built in layers: structured logs, distributed traces, and custom metrics. Each layer had clear ownership and SLOs..."',Communication:`"...I write incident post-mortems as narratives, not bullet points. They read like stories because that's how people actually learn and remember lessons..."`,"React Expertise":'"...I built an internal dashboard using React with server components for the data-heavy views. The key was lazy loading the monitoring panels..."'},"Aisha Patel":{"Design Systems":'"...our design system had 3 tiers: primitives, patterns, and templates. Each tier had different stability guarantees — primitives were frozen, templates were experimental..."',"User Research":`"...we ran diary studies for 4 weeks before building anything. The insight that changed everything: users didn't want more features, they wanted fewer steps..."`,"Conflict Resolution":`"...the CEO wanted a complete redesign, the VP of Engineering wanted incremental changes. I proposed a 'parallel tracks' approach — redesign the top 3 flows while maintaining the rest..."`,Prototyping:'"...I use Figma prototypes for stakeholder alignment but always build interactive HTML prototypes for user testing. The fidelity gap matters for honest feedback..."',"Stakeholder Mgmt":`"...I created a 'design brief' template that every stakeholder signs off on before we start. It includes success metrics, constraints, and explicitly what's out of scope..."`,Communication:'"...I present design decisions as hypotheses with evidence, not as creative choices. This earns trust with data-driven stakeholders..."',"Strategic Thinking":`"...growth isn't about more experiments. It's about having a clear model of your funnel and knowing which lever has the highest expected value right now..."`,"Team Collaboration":'"...I pair with engineers during implementation. Not to check on them, but because the best design refinements happen when you see real constraints in real time..."'},"Liam O'Brien":{"React Expertise":'"...I rebuilt the component library using a headless UI pattern — all logic in hooks, all styling in Tailwind. It let us ship a dark mode in 2 days across 40 components..."',"Technical Architecture":'"...the key was separating the render layer from the data layer. We used React Query for server state and Zustand for UI state — zero prop drilling..."',Communication:`"...I run 'demo Fridays' where engineers present their work to the whole company. It builds empathy between teams and gives non-technical folks visibility..."`,"Team Collaboration":`"...I believe in pair programming for complex features. It's slower upfront but the knowledge sharing and code quality gains compound over time..."`,"System Design":'"...for the design system, I created a layered token system — primitive tokens feed semantic tokens which feed component tokens. Changes cascade predictably..."'},"Priya Sharma":{"Design Systems":'"...I built a design system serving 5 product teams. The breakthrough was creating a governance model — each team owns their domain patterns, but primitives are centrally maintained..."',"User Research":`"...we used a mixed-methods approach: quantitative surveys for 'what', then qualitative interviews for 'why'. This combination consistently produced actionable insights..."`,Prototyping:`"...I prototype in Figma for speed, but I learned enough React to build interactive prototypes. Stakeholders can't unsee a 
535working prototype — it changes the conversation..."`,"Conflict Resolution":'"...two product managers had competing visions. I facilitated a design sprint where both approaches were prototyped and tested with real users. The data resolved the debate..."',"Stakeholder Mgmt":'"...I created a quarterly design roadmap that aligned with engineering sprints. It gave stakeholders predictability while leaving room for discovery work..."'},"Jordan Rivera":{"Data Modeling":'"...I restructured the data warehouse from a flat schema to a star schema. Query performance improved 10x and the self-serve analytics adoption tripled..."',"SQL & Analytics":'"...I built a library of parameterized SQL templates that analysts could customize. It reduced ad-hoc query errors by 80% and standardized our metric definitions..."',"Data Visualization":'"...the executive dashboard I built told a story — not just charts. Each visualization answered a specific business question and linked to the next logical question..."',"Statistical Analysis":'"...I implemented a Bayesian approach to our A/B testing framework. It gave us reliable results with 40% smaller sample sizes compared to frequentist methods..."',Communication:'"...I translate data findings into business narratives. My rule: every chart needs a headline that a VP can read and immediately understand the implication..."'},"Emily Zhang":{"Technical Architecture":'"...I designed a module federation setup for our micro-frontend architecture. Teams could deploy independently while sharing a common design system and auth layer..."',"React Expertise":'"...I migrated our app from class components to hooks, then to React Server Components. Each step was incremental — zero downtime, zero breaking changes..."',"System Design":'"...the real-time collaboration feature required CRDT-based state sync. I evaluated Yjs and Automerge, built prototypes of each, and chose Yjs for its smaller bundle size..."',"Team Collaboration":'"...I created an RFC process for architectural decisions. Every engineer can propose changes, and we discuss async before the sync meeting. It democratized technical direction..."',Communication:`"...I maintain a weekly 'frontend digest' newsletter for the team — new patterns, deprecation notices, performance wins. It keeps 30 engineers aligned without meetings..."`},"David Kim":{"User Research":`"...I conducted 50+ user interviews for our onboarding redesign. The key insight: users didn't fail at tasks, they failed at understanding why those tasks mattered..."`,Prototyping:`"...I use a 'wizard of oz' technique — fake backends with real UIs. It lets us test interaction patterns before investing in engineering..."`,"Design Systems":'"...I audited our existing components and found 23 variants of buttons. I consolidated them into 5 with clear usage guidelines. Consistency improved overnight..."',Communication:`"...I present design work in 'before and after' format with metrics. It makes the impact tangible and builds credibility with skeptical stakeholders..."`,"Stakeholder Mgmt":`"...I hold monthly 'design reviews' where stakeholders see work in progress. It prevents big reveals and builds shared ownership of the design direction..."`},"Natasha Volkov":{"Data Modeling":'"...I designed a dimensional model for our marketing analytics that unified data from 8 different ad platforms. Attribution accuracy improved from 60% to 94%..."',"SQL & Analytics":'"...I built a real-time analytics pipeline using dbt and Snowflake. Analysts could query fresh data within 15 minutes instead of waiting for overnight batch jobs..."',"Statistical Analysis":'"...I developed a propensity scoring model to identify churn risk. It correctly predicted 78% of churners 30 days before they left, giving the CS team time to intervene..."',"Data Visualization":'"...I moved our reporting from static PDFs to interactive Looker dashboards. Self-serve analytics adoption went from 20% to 75% in three months..."',Communication:`"...I created a 'data dictionary' that everyone from the CEO to junior analysts could understand. It became the single source of truth for metric definitions..."`},"Carlos Mendez":{"React Expertise":'"...I built a form engine that generates complex multi-step forms from JSON schemas. It handles validation, conditional logic, and accessibility — all declaratively..."',"Technical Architecture":`"...I designed a plugin architecture for our React app that lets teams add features without touching the core bundle. It's like WordPress but for single-page apps..."`,Communication:'"...I document every architectural decision in ADRs. New team members can understand n
535ot just what we built, but why. It reduced onboarding time by 40%..."',"Team Collaboration":'"...I set up a component showcase where teams can share and discover reusable components. It reduced duplicate work by an estimated 30% across 4 teams..."',"System Design":'"...for offline support, I implemented a service worker strategy with background sync. Users could keep working during network outages without losing data..."'},"Fatima Al-Hassan":{"Design Systems":'"...I created a visual language that unified our mobile and web products. The constraint was making components feel native on each platform while maintaining brand consistency..."',Prototyping:`"...I use motion prototypes to sell interaction ideas. Static mockups can't convey the feeling of a well-crafted animation — and that feeling is what users remember..."`,"User Research":'"...I implemented a continuous research program — 2 user sessions per week, every week. It replaced big quarterly studies and kept us closer to user needs..."',Communication:`"...I maintain a 'design decisions log' visible to the whole company. It shows what we decided, what we considered, and why. Transparency builds trust..."`,"Stakeholder Mgmt":`"...I learned to present three options, not one. It shifts the conversation from 'do we approve this?' to 'which direction is best?' — much more productive..."`},"Tyler Brooks":{"Data Modeling":'"...I built a unified customer data model that merged CRM, product usage, and support ticket data. For the first time, we had a true 360-degree customer view..."',"SQL & Analytics":'"...I optimized our slowest queries — some taking 20 minutes — down to under 30 seconds. The key was proper indexing, materialized views, and query restructuring..."',"Data Visualization":'"...I built an anomaly detection dashboard that highlights unusual patterns automatically. It catches revenue dips and usage spikes before anyone files a ticket..."',Communication:`"...I run 'data office hours' where anyone can bring questions. It democratized data access and reduced the analytics request backlog by 60%..."`,"Statistical Analysis":'"...I built a cohort analysis framework that tracks user behavior across acquisition channels. It proved that our highest-CAC channel actually had the best LTV..."'}};function og(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function qH(e,t){const n=HH[e]||[],r=t.map(o=>{const l=n.includes(o.name),c=og(e+o.name);let u;if(l){const d=c%100;d<30?u=40+c%20:d<60?u=60+c%20:u=80+c%21}else u=5+c%40;return u=Math.min(u,100),{name:o.name,score:u,weight:o.weight,covered:l}}),s=Math.round(r.reduce((o,l)=>o+Math.min(l.score/l.weight*100,100),0)/r.length),i=r.filter(o=>!o.covered).map(o=>o.name);return{overallMatch:s,signalScores:r,missingSignals:i}}function KH(e){const t=Vl.find(s=>s.id===e);if(!t)return[];const n=[];for(const s of jd)for(const i of s.personas){const{overallMatch:o,signalScores:l,missingSignals:c}=qH(i.name,t.signals);n.push({id:`${s.id}-${i.id}`,name:s.name,persona:i.name,avatarInitials:s.avatarInitials,overallMatch:o,signalScores:l,missingSignals:c})}const r=n.sort((s,i)=>i.overallMatch-s.overallMatch).slice(0,5);return r.forEach((s,i)=>{if(i===0)return;const o=s.signalScores,l=i>=3?2:1,c=o.map((u,d)=>d).sort((u,d)=>og(s.name+o[u].name+i)%2===0?-1:1);for(let u=0;u<Math.min(l,c.length);u++){const d=c[u],h=o[d],p=20+og(s.name+h.name+"weak"+i)%26;o[d]={...h,score:Math.max(Math.round(h.weight*p/100),3)}}s.overallMatch=Math.round(o.reduce((u,d)=>u+Math.min(d.score/d.weight*100,100),0)/o.length)}),r}function zb(){var c;const e=m.useMemo(()=>[...Vl].sort((u,d)=>u.title.localeCompare(d.title)),[]),[t,n]=m.useState(((c=e[0])==null?void 0:c.id)??""),[r,s]=m.useState(""),i=KH(t),o=e.find(u=>u.id===t),l=m.useMemo(()=>{if(!r.trim())return i;const u=r.toLowerCase();return i.filter(d=>d.name.toLowerCase().includes(u)||d.persona.toLowerCase().includes(u))},[i,r]);return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsx("div",{className:"flex items-center justify-between flex-wrap gap-4",children:a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Final Five — Recruiter Slate"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Top candidates for ",o==null?void 0:o.title]})]})}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search by name or role...",value:r,onChange:u=>s(u.target.value),className:"pl-9"})]}),a.jsxs(He,{value:t,onValueChange:n,children:[a.jsx(Ve,{className:"w-64 shrink-0",children:a.jsx(We,{})}),a.jsx(Be,{children:e.map(u=>a.jsx(ne,{value:u.id,children:u.title},u.id))})]})]}),o&&o.signals&&a.jsxs("div",{className:"bento-item",children:[a.jsxs("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-3",children:[o.title," — Required Signals"]}),a.jsx("div",{className:"flex flex-wrap gap-2",children:o.signals.map(u=>a.jsxs("span",{className:"text-xs px-2.5 py-1 rounded-full bg-primary/10 text-primary border border-primary/20",children:[u.name," (",u.weight,"%)"]},u.name))})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsx(uc,{mode:"popLayout",children:l.map((u,d)=>a.jsx(GH,{candidate:u,rank:d+1},u.id))}),l.length===0&&a.jsx("div",{className:"bento-item text-center py-12",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No candidates found for this role."})})]})]})}function GH({candidate:e,rank:t}){const[n,r]=m.useState(null),[s,i]=m.useState(null),[o,l]=m.useState(!1),{greenlightCandidate:c,isGreenlit:u}=Mh(),{toast:d}=cr(),h=u(e.id),f=WH[e.name]||{},p=e.signalScores.filter(y=>y.score<60),v=p.length>0,g=y=>{r(b=>b===y?null:y)};return a.jsxs(Zt.div,{layout:!0,initial:{opacity:0,y:20}
535,animate:{opacity:1,y:0},exit:{opacity:0,scale:.95},transition:{delay:t*.05},className:`bento-item transition-all ${s==="greenlight"?"border-success/40 bg-success/5":s==="pass"?"border-border/20 opacity-60":""}`,children:[a.jsxs("div",{className:"flex items-start justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold",children:["#",t]}),a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-accent text-foreground text-sm font-semibold",children:e.avatarInitials}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:e.name}),a.jsx("p",{className:"text-xs text-muted-foreground",children:e.persona})]})]}),a.jsxs("div",{className:"text-right",children:[a.jsxs("span",{className:`text-lg font-bold ${e.overallMatch>=75?"text-success":e.overallMatch>=50?"text-warning":"text-destructive"}`,"aria-label":`Overall signal match: ${e.overallMatch}%`,children:[e.overallMatch,"%"]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"overall match"})]})]}),a.jsxs("div",{className:"space-y-2 mb-4",children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Signal Heatmap"}),e.signalScores.map(y=>{const b=y.weight>0?y.score/y.weight*100:0,w=Math.min(b,100),x=b>=75?"bg-success":b>=50?"bg-warning":"bg-destructive",S=!!f[y.name],j=n===y.name;return a.jsxs("div",{children:[a.jsxs("button",{onClick:()=>S&&g(y.name),className:`w-full text-left ${S?"cursor-pointer":"cursor-default"}`,"aria-label":`${y.name}: ${y.score}% of ${y.weight}% required${S?" — click for transcript":""}`,"aria-expanded":j,children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"text-xs text-foreground",children:y.name}),S&&a.jsx(Zd,{className:`h-3 w-3 text-muted-foreground transition-transform ${j?"rotate-180":""}`})]}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.score,"% ",a.jsxs("span",{className:"text-muted-foreground/60",children:["/ ",y.weight,"% req"]})]})]}),a.jsx("div",{className:"h-2 rounded-full bg-muted overflow-hidden",children:a.jsx(Zt.div,{className:`h-full rounded-full ${x}`,initial:{width:0},animate:{width:`${w}%`},transition:{duration:.6,delay:.1}})})]}),a.jsx(uc,{children:j&&f[y.name]&&a.jsx(Zt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:a.jsxs("div",{className:"mt-2 p-3 rounded-md bg-accent/50 border border-border/30",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-1 uppercase tracking-wider",children:"AI-Detected Transcript"}),a.jsx("p",{className:"text-xs text-foreground italic leading-relaxed",children:f[y.name]})]})})})]},y.name)})]}),a.jsx(_h,{candidateName:e.name,defaultCollapsed:!0}),a.jsxs("div",{className:"flex gap-2 pt-3 border-t border-border/30",children:[a.jsx(Zt.div,{className:"flex-1",whileTap:{scale:.95},children:a.jsxs(W,{variant:s==="greenlight"||h?"default":"outline",className:`w-full gap-2 ${h?"bg-success text-success-foreground hover:bg-success/90":""}`,disabled:h,onClick:()=>{i("greenlight"),c({id:e.id,name:e.name,avatarInitials:e.avatarInitials,persona:e.persona,jobTitle:e.jobTitle||e.persona,jobId:e.jobId||"",overallMatch:e.overallMatch}),d({title:"✅ Candidate Greenlit",description:`${e.name} has been added to the interview pipeline. Hiring Manager has been notified.`})},children:[a.jsx(Zt.div,{animate:s==="greenlight"?{scale:[1,1.3,1]}:{},transition:{type:"spring",stiffness:400,damping:10},children:a.jsx(hv,{className:"h-4 w-4"})}),h?"Greenlit ✓":"Greenlight"]})}),v&&a.jsx(Zt.div,{className:"flex-1",whileTap:{scale:.95},children:a.jsxs(W,{variant:"outline",className:"w-full gap-2 border-warning/30 text-warning hover:bg-warning/10",onClick:()=>l(!0),children:[a.jsx(Ni,{className:"h-4 w-4"}),"Request Clarity"]})}),a.jsx(Zt.div,{className:"flex-1",whileTap:{scale:.95},children:a.jsxs(W,{variant:s==="pass"?"secondary":"ghost",className:"w-full gap-2",onClick:()=>i(y=>
535y==="pass"?null:"pass"),children:[a.jsx(Zt.div,{animate:s==="pass"?{rotate:[0,-10,10,0]}:{},transition:{type:"spring",stiffness:400,damping:10},children:a.jsx(or,{className:"h-4 w-4"})}),"Pass"]})})]}),v&&a.jsx(h_,{open:o,onOpenChange:l,candidateName:e.name,subject:`Follow-up: Additional Clarity on ${p.map(y=>y.name).join(", ")} — ${e.persona}`,body:YH(e,p,f)})]})}function YH(e,t,n){const r=t.map(s=>{const i=n[s.name],o=i?`
536   From your interview: ${i.slice(0,120)}...`:"";return`• ${s.name} (current score: ${s.score}%)${o}`}).join(`
537
538`);return`Hi ${e.name.split(" ")[0]},
539
540Thank you for your application and the time you've invested in the interview process for the ${e.persona} role. Your overall signal match of ${e.overallMatch}% is promising, and we were impressed by several aspects of your profile.
541
542However, our AI-driven signal analysis has identified a few areas where we'd like to gain additional clarity before moving forward:
543
544${r}
545
546We believe these gaps may be addressable and would love to give you the opportunity to elaborate. Would you be open to a brief follow-up conversation or a short recorded response addressing these areas?
547
548This isn't a rejection — it's an invitation to strengthen your candidacy. Many of our strongest hires have gone through this clarity process.
549
550Looking forward to hearing from you.
551
552Best regards,
553Hiring Team`}const JH=[{id:"1",subject:"Interview Scheduled: Sarah Chen – Product Design Lead",to:"[email protected]",date:"Mar 28, 2026",status:"sent",type:"Scheduled"},{id:"2",subject:"Interview Reminder: Marcus Johnson – Sr. Frontend Engineer",to:"[email protected]",date:"Mar 27, 2026",status:"sent",type:"Reminder"},{id:"3",subject:"Interview Follow-up: Aisha Patel – Product Manager",to:"[email protected]",date:"Mar 26, 2026",status:"opened",type:"Follow-up"},{id:"4",subject:"Interview Invite: Liam O'Brien – Platform Engineer",to:"[email protected]",date:"Mar 25, 2026",status:"pending",type:"Invite"},{id:"5",subject:"Interview Scheduled: Priya Sharma – Design Lead",to:"[email protected]",date:"Mar 24, 2026",status:"sent",type:"Scheduled"},{id:"6",subject:"Interview Rejection: Jordan Rivera – Data Analyst",to:"[email protected]",date:"Mar 23, 2026",status:"sent",type:"Rejection"},{id:"7",subject:"Interview Follow-up: Emily Zhang – Staff Frontend Engineer",to:"[email protected]",date:"Mar 22, 2026",status:"opened",type:"Follow-up"},{id:"8",subject:"Interview Invite: David Kim – Senior Product Designer",to:"[email protected]",date:"Mar 21, 2026",status:"pending",type:"Invite"}];function QH(){const[e,t]=m.useState(""),n=JH.filter(s=>s.subject.toLowerCase().includes(e.toLowerCase())||s.to.toLowerCase().includes(e.toLowerCase())),r=s=>s==="sent"?"signal-badge-high":s==="opened"?"signal-badge-mid":"signal-badge-low";return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Interview Emails"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Track all interview-related email communications"})]}),a.jsxs("div",{className:"relative max-w-sm",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search emails...",value:e,onChange:s=>t(s.target.value),className:"pl-9"})]}),a.jsxs("div",{className:"space-y-2",children:[n.map(s=>{const i=s.status==="pending";return a.jsxs("div",{className:`bento-item flex items-center justify-between border border-border/50 hover:border-sky/30 transition-colors cursor-pointer ${i?"bg-accent/30":""}`,children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-sky-bg shrink-0",children:a.jsx(Ni,{className:"h-4 w-4 text-sky"})}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:`text-sm truncate ${i?"font-semibold text-foreground":"font-medium text-foreground"}`,children:s.subject}
vendor: 5,443 bytes, line 553
553),a.jsxs("p",{className:`text-xs ${i?"text-foreground/70":"text-muted-foreground"}`,children:[s.to," · ",s.date]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-3",children:[a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:s.type}),a.jsx("span",{className:`${r(s.status)} text-xs`,children:s.status})]})]},s.id)}),n.length===0&&a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No emails found"})]})]})}function dn(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Pr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function Bn(e,t){const n=dn(e);return isNaN(t)?Pr(e,NaN):(t&&n.setDate(n.getDate()+t),n)}const J_=6048e5,XH=864e5;let ZH={};function Dh(){return ZH}function Ko(e,t){var l,c,u,d;const n=Dh(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=dn(e),i=s.getDay(),o=(i<r?7:0)+i-r;return s.setDate(s.getDate()-o),s.setHours(0,0,0,0),s}function Cd(e){return Ko(e,{weekStartsOn:1})}function Q_(e){const t=dn(e),n=t.getFullYear(),r=Pr(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const s=Cd(r),i=Pr(e,0);i.setFullYear(n,0,4),i.setHours(0,0,0,0);const o=Cd(i);return t.getTime()>=s.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function Nd(e){const t=dn(e);return t.setHours(0,0,0,0),t}function Hb(e){const t=dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function eW(e,t){const n=Nd(e),r=Nd(t),s=+n-Hb(n),i=+r-Hb(r);return Math.round((s-i)/XH)}function tW(e){const t=Q_(e),n=Pr(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),Cd(n)}function X_(e,t){const n=t*7;return Bn(e,n)}function nW(e){return Pr(e,Date.now())}function Z_(e,t){const n=Nd(e),r=Nd(t);return+n==+r}function rW(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function sW(e){if(!rW(e)&&typeof e!="number")return!1;const t=dn(e);return!isNaN(Number(t))}function iW(e){const t=dn(e),n=Pr(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const oW={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},aW=(e,t,n)=>{let r;const s=oW[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ep(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const lW={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cW={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uW={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dW={date:ep({formats:lW,defaultWidth:"full"}),time:ep({formats:cW,defaultWidth:"full"}),dateTime:ep({formats:uW,defaultWidth:"full"})},hW={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},fW=(e,t,n,r)=>hW[e];function Ea(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;s=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[o]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const pW={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mW={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},gW={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},vW={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
553ay","Saturday"]},yW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},xW={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wW=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},bW={ordinalNumber:wW,era:Ea({values:pW,defaultWidth:"wide"}),quarter:Ea({values:mW,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ea({values:gW,defaultWidth:"wide"}),day:Ea({values:vW,defaultWidth:"wide"}),dayPeriod:Ea({values:yW,defaultWidth:"wide",formattingValues:xW,defaultFormattingWidth:"wide"})};function Ta(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?jW(l,h=>h.test(o)):SW(l,h=>h.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(o.length);return{value:u,rest:d}}}function SW(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jW(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function kW(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(s.length);return{value:o,rest:l}}}const CW=/^(\d+)(th|st|nd|rd)?/i,NW=/\d+/i,EW={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},TW={any:[/^b/i,/^(a|c)/i]},_W={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},PW={any:[/1/i,/2/i,/3/i,/4/i]},RW={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},AW={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},MW={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},DW={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},OW={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},IW={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},LW={ordinalNumber:kW({matchPattern:CW,parsePattern:NW,valueCallback:e=>parseInt(e,10)}),era:Ta({matchPatterns:EW,defaultMatchWidth:"wide",parsePatterns:TW,defaultParseWidth:"any"}),quarter:Ta({matchPatterns:_W,defaultMatchWidth:"wide",parsePatterns:PW,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ta({matchPatterns:RW,defaultMatchWidth:"wide",parsePatterns:AW,defaultParseWidth:"any"}),day:Ta({matchPatterns:MW,defaultMatchWidth:"wide",parsePatterns:DW,defaultParseWidth:"any"}),dayPeriod:Ta({matchPatterns:OW,defaultMatchWidth:"any",parsePatterns:IW,defaultParseWidth:"any"})},$W={code:"en-US",formatDistance:aW,formatLong:dW,formatRelative:fW,localize:bW,match:LW,options:{weekStartsOn:0,firstWeekContainsDate:1}};function FW(e){const t=dn(e);return eW(t,iW(t))+1}function UW(e){const t=dn(e),n=+Cd(t)-+tW(t);return Math.round(n/J_)+1}function eP(e,t){var d,h,f,p;const n=dn(e),r=n.getFullYear(),s=Dh(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,o=Pr(e,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const l=Ko(o,t),c=Pr(e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=Ko(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function VW(e,t){var l,c,u,d;const n=Dh(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=eP(e,t),i=Pr(e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),Ko(i,t)}function BW(e,t){const n=dn(e),r=+Ko(n,t)-+VW(n,t);return Math.round(r/J_)+1}function be(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Hr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return be(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):be(n+1,2)},d(e,t){return be(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return be(e.getHours()%12||12,t.length)},H(e,t){return be(e.getHours(),t.length)},m(e,t){return be(e.getMinutes(),t.length)},s(e,t){return be(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return be(s,t.length)}},zi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Wb={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Hr.y(e,t)},Y:function(e,t,n,r){const s=eP(e,r),i=s>0?s:1-s;if(t==="YY"){const o=i%100;return be(o,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):be(i,t.length)},R:function(e,t){const n=Q_(e);return be(n,t.length)},u:function(e,t){const n=e.getFullYear();return be(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return be(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return be(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Hr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return be(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=BW(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):be(s,t.length)},I:function(e,t,n){const r=UW(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):be(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Hr.d(e,t)},D:function(e,t,n){const r=FW(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):be(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return be(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return be(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return be(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=zi.noon:r===0?s=zi.midnight:s=r/12>
vendor: 4,133 bytes, line 553
553=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=zi.evening:r>=12?s=zi.afternoon:r>=4?s=zi.morning:s=zi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Hr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Hr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):be(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Hr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Hr.s(e,t)},S:function(e,t){return Hr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Kb(r);case"XXXX":case"XX":return qs(r);case"XXXXX":case"XXX":default:return qs(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Kb(r);case"xxxx":case"xx":return qs(r);case"xxxxx":case"xxx":default:return qs(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qb(r,":");case"OOOO":default:return"GMT"+qs(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qb(r,":");case"zzzz":default:return"GMT"+qs(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return be(r,t.length)},T:function(e,t,n){const r=e.getTime();return be(r,t.length)}};function qb(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+be(i,2)}function Kb(e,t){return e%60===0?(e>0?"-":"+")+be(Math.abs(e)/60,2):qs(e,t)}function qs(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=be(Math.trunc(r/60),2),i=be(r%60,2);return n+s+t+i}const Gb=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},tP=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},zW=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Gb(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Gb(r,t)).replace("{{time}}",tP(s,t))},HW={p:tP,P:zW},WW=/^D+$/,qW=/^Y+$/,KW=["D","DD","YY","YYYY"];function GW(e){return WW.test(e)}function YW(e){return qW.test(e)}function JW(e,t,n){const r=QW(e,t,n);if(console.warn(r),KW.includes(e))throw new RangeError(r)}function QW(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const XW=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ZW=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,e7=/^'([^]*?)'?$/,t7=/''/g,n7=/[a-zA-Z]/;function Yb(e,t,n){var d,h,f,p;const r=Dh(),s=r.locale??$W,i=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,o=r.weekStartsOn??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,l=dn(e);if(!sW(l))throw new RangeError("Invalid time value");
553let c=t.match(ZW).map(v=>{const g=v[0];if(g==="p"||g==="P"){const y=HW[g];return y(v,s.formatLong)}return v}).join("").match(XW).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const g=v[0];if(g==="'")return{isToken:!1,value:r7(v)};if(Wb[g])return{isToken:!0,value:v};if(g.match(n7))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:o,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const g=v.value;(YW(g)||GW(g))&&JW(g,t,String(e));const y=Wb[g[0]];return y(l,g,s.localize,u)}).join("")}function r7(e){const t=e.match(e7);return t?t[1].replace(t7,"'"):e}function s7(e){return Z_(e,nW(e))}function i7(e,t){return X_(e,-t)}const Jb={technical:{bg:"bg-sky-bg",text:"text-sky",border:"border-sky/30"},behavioral:{bg:"bg-lavender-bg",text:"text-lavender",border:"border-lavender/30"},culture:{bg:"bg-mint-bg",text:"text-mint",border:"border-mint/30"},final:{bg:"bg-peach-bg",text:"text-peach",border:"border-peach/30"}};function o7(e){return[{id:"1",candidate:"Sarah Chen",role:"Product Design Lead",time:"9:00 AM",duration:"45 min",type:"technical",day:Bn(e,0)},{id:"2",candidate:"Marcus Johnson",role:"Sr. Frontend Engineer",time:"11:00 AM",duration:"30 min",type:"behavioral",day:Bn(e,0)},{id:"3",candidate:"Aisha Patel",role:"Product Manager",time:"2:00 PM",duration:"60 min",type:"final",day:Bn(e,1)},{id:"4",candidate:"Liam O'Brien",role:"Platform Engineer",time:"10:00 AM",duration:"45 min",type:"technical",day:Bn(e,2)},{id:"5",candidate:"Priya Sharma",role:"Design Lead",time:"3:00 PM",duration:"30 min",type:"culture",day:Bn(e,2)},{id:"6",candidate:"Emily Zhang",role:"Staff Frontend Engineer",time:"1:00 PM",duration:"45 min",type:"behavioral",day:Bn(e,3)},{id:"7",candidate:"David Kim",role:"Senior Product Designer",time:"10:30 AM",duration:"60 min",type:"final",day:Bn(e,4)},{id:"8",candidate:"Jordan Rivera",role:"Data Analyst",time:"4:00 PM",duration:"30 min",type:"technical",day:Bn(e,4)}]}function a7(){const[e,t]=m.useState(new Date),n=Ko(e,{weekStartsOn:1}),r=Array.from({length:5},(i,o)=>Bn(n,o)),s=o7(n);return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Interview Calendar"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Weekly view of all scheduled interviews"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(W,{variant:"outline",size:"icon",onClick:()=>t(i7(e,1)),children:a.jsx(eO,{className:"h-4 w-4"})}),a.jsx(W,{variant:"outline",size:"sm",onClick:()=>t(new Date),children:"Today"}),a.jsx(W,{variant:"outline",size:"icon",onClick:()=>t(X_(e,1)),children:a.jsx(eh,{className:"h-4 w-4"})})]})]}),a.jsx("div",{className:"flex flex-wrap gap-3",children:Object.entries(Jb).map(([i,o])=>a.jsx("span",{className:`text-xs px-2 py-1 rounded-full ${o.bg} ${o.text} border ${o.border} capitalize`,children:i},i))}),a.jsx("div",{className:"grid grid-cols-5 gap-3",children:r.map(i=>{const o=s.filter(c=>Z_(c.day,i)),l=s7(i);return a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:`text-center py-2 rounded-lg border ${l?"bg-primary/10 border-primary/30":"bg-muted/30 border-border/50"}`,children:[a.jsx("p",{className:`text-xs font-medium ${l?"text-primary":"text-muted-foreground"}`,children:Yb(i,"EEE")}),a.jsx("p",{className:`text-lg font-semibold ${l?"text-primary":"text-foreground"}`,children:Yb(i,"d")})]}),a.jsxs("div",{className:"space-y-2 min-h-[120px]",children:[o.map(c=>{const u=Jb[c.type];return a.jsxs("div",{className:`p-2.5 rounded-lg border ${u.border} ${u.bg} cursor-pointer hover:opacity-80 transition-opacity`,children:[a.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[a.jsx(Xl,{className:`h-3 w-3 ${u.text}`}),a.jsx("span",{className:`text-[10px] font-medium ${u.text}`,children:c.time}),a.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["· ",c.duration]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(th,{className:"h-3 w-3 text-muted-foreground"}),a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:c.candidate})]}),a.jsx("p",{className:"text-[10px] text-muted-foreground truncate mt-0.5",children:c.role})]},c.id)}),o.length===0&&a.jsx("p",{className:"text-[10px] text-muted-foreground text-center pt-4",children:"No interviews"})]})]},i.toISOString())})})]})}function l7(){const{pipeline:e,notifications:t,advanceStage:n,markNotificationRead:r}=Mh(),[s,i]=m.useState("all"),[o,l]=m.useState(null),[c,u]=m.useState(!1),[d,h]=m.useState(""),f=t.filter(y=>!y.read).length,p=m.useMemo(()=>{let y=s==="all"?e:e.filter(b=>b.currentStage===s);if(d.trim()){const b=d.toLowerCase();y=y.filter(w=>w.name.toLowerCase().includes(b)||w.persona.toLowerCase().includes(b)||w.jobTitle.toLowerCase().includes(b))}return y},[e,s,d]),v=nt.reduce((y,b)=>(y[b]=e.filter(w=>w.currentStage===b&&!w.decision),y),{}),g=e.find(y=>y.id===o);return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Interview Pipeline"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[e.length," candidate",e.length!==1?"s":""," in pipeline"]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search by name, role, or persona...",value:d,onChange:y=>h(y.target.value),className:"pl-9"})]}),a.jsxs(He,{value:s,onValueChange:i,children:[a.jsx(Ve,{className:"w-64 shrink-0",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Stages"}),nt.map(y=>{var b;return a.jsxs(ne,{value:y,children:[sn[y]," (",((b=v[y])==null?void 0:b.length)||0,")"]},y)})]})]}),a.jsxs(W,{size:"sm",className:"relative gap-2 shrink-0 h-10",onClick:()=>u(!0),children:[a.jsx(gk,{className:"h-4 w-4"}),a.jsx("span",{className:"hidden sm:inline",children:"HM Notifications"}),f>0&&a.jsx("span",{className:"absolute -top-1.5 -right-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-destructive text-destructive-foreground text-xs",children:f})]})]}
553),a.jsx("div",{className:"grid grid-cols-5 gap-2",children:nt.map((y,b)=>{var w;return a.jsxs("button",{onClick:()=>i(y===s?"all":y),className:`flex items-center gap-2 rounded-lg border px-3 py-3 text-left transition-all ${s===y?"border-primary bg-primary/5":"border-border/50 bg-card hover:border-border"}`,children:[a.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-primary/10 text-primary text-xs font-bold shrink-0",children:b+1}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-xs font-medium text-foreground truncate",children:sn[y]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[((w=v[y])==null?void 0:w.length)||0," candidates"]})]})]},y)})}),e.length===0&&a.jsx("div",{className:"bento-item text-center py-16",children:a.jsxs("p",{className:"text-muted-foreground text-sm",children:["No candidates in the pipeline yet. Greenlight candidates from the"," ",a.jsx("span",{className:"text-primary font-medium",children:"Final Five"})," tab to start."]})}),a.jsx("div",{className:"space-y-3",children:a.jsx(uc,{mode:"popLayout",children:p.map(y=>a.jsxs(Zt.div,{layout:!0,initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,scale:.95},className:`bento-item cursor-pointer transition-all hover:border-primary/30 ${y.decision==="hired"?"border-success/40 bg-success/5":y.decision==="rejected"?"border-destructive/30 opacity-60":y.decision==="on_hold"?"border-warning/30 bg-warning/5":""}`,onClick:()=>l(y.id),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-accent text-foreground text-sm font-semibold",children:y.avatarInitials}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:y.name}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[y.persona," · ",y.jobTitle]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs(Bl,{variant:"outline",className:`text-xs ${y.overallMatch>=80?"border-success/50 text-success":y.overallMatch>=60?"border-warning/50 text-warning":"border-destructive/50 text-destructive"}`,children:[y.overallMatch,"% match"]}),a.jsx(c7,{stage:y.currentStage}),y.decision&&a.jsx(Bl,{variant:y.decision==="hired"?"default":y.decision==="rejected"?"destructive":"secondary",className:"text-xs capitalize",children:y.decision.replace("_"," ")}),a.jsx(eh,{className:"h-4 w-4 text-muted-foreground"})]})]}),y.activities.length>0&&a.jsx("div",{className:"mt-3 pt-3 border-t border-border/30",children:a.jsxs("p",{className:"text-xs text-muted-foreground",children:[a.jsx("span",{className:"font-medium text-foreground",children:y.activities[y.activities.length-1].actor})," · ",y.activities[y.activities.length-1].action," · ",Ny(y.activities[y.activities.length-1].timestamp)]})})]},y.id))})}),g&&a.jsx(u7,{candidate:g,open:!!o,onClose:()=>l(null)}),a.jsx(d7,{open:c,onClose:()=>u(!1),notifications:t,onMarkRead:r})]})}function c7({stage:e}){const t=nt.indexOf(e);return a.jsx("div",{className:"flex items-center gap-1",children:nt.map((n,r)=>a.jsx("div",{className:`h-1.5 w-4 rounded-full transition-colors ${r<=t?"bg-primary":"bg-muted"}`,title:sn[n]},n))})}function u7({candidate:e,open:t,onClose:n}){const{advanceStage:r,scheduleInterview:s,completeStage:i,setDecision:o,addActivity:l,candidateNotes:c,setCandidateNote:u}=Mh(),{toast:d}=cr(),[h,f]=m.useState(!1),p=c[e.id]||"",[v,g]=m.useState({stage:e.currentStage,date:"",time:"",interviewer:"",notes:""}),y=!e.decision&&nt.indexOf(e.currentStage)<nt.length-1,b=()=>{!v.date||!v.time||!v.interviewer||(s(e.id,v),d({title:"Interview Scheduled",description:`${sn[v.stage]} scheduled for ${v.date}`}),f(!1),g({stage:e.currentStage,date:"",time:"",interviewer:"",notes:""}))},w=()=>{p.trim()&&(l(e.id,{actor:"HR",action:"Added note",detail:p}),u(e.id,""))};return a.jsx(st,{open:t,onOpenChange:x=>!x&&n(),children:a.jsxs(Ze,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[a.jsx(it,{children:a.jsxs(ot,{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-accent text-foreground text-sm font-semibold",children:e.avatarInitials}),a.jsxs("div",{children:[a.jsx("p",{className:"text-base",children:e.name}),a.jsxs("p",{className:"text-xs text-muted-foreground font-normal",children:[e.persona," · ",e.jobTitle]})]})]})}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Pipeline Progress"}),a.jsx("div",{className:"flex items-center gap-1",children:nt.map((x,S)=>{const j=nt.indexOf(e.currentStage),k=S<j,C=S===j;return a.jsxs("div",{className:"flex items-center gap-1 flex-1",children:[a.jsx("div",{className:`flex-1 h-2 rounded-full transition-colors ${k?"bg-success":C?"bg-primary":"bg-muted"}`}),S<nt.length-1&&a.jsx(kl,{className:"h-3 w-3 text-muted-foreground shrink-0"})]},x)})}),a.jsx("div",{className:"flex justify-between mt-1",children:nt.map(x=>a.jsx("p",{className:`text-[10px] ${x===e.currentStage?"text-primary font-medium":"text-muted-foreground"}`,children:sn[x]},x))})]}),e.scheduledInterviews.length>0&&a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Scheduled Interviews"}),a.jsx("div",{className:"space-y-2",children:e.scheduledInterviews.map(x=>a.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border/50 p-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(fw,{className:"h-4 w-4 text-muted-foreground"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-foreground",children:sn[x.stage]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.date," at ",x.time]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[a.jsx(th,{className:"h-3 w-3"}),x.interviewer]})]},x.id))})]}),a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[a.jsxs(W,{size:"sm",variant:"outline",className:"gap-1.5",onClick:()=>f(!0),children:[a.jsx(fw,{className:"h-3.5 w-3.5"}),"Schedule Interview"]}),y&&a.jsxs(W,{size:"sm",className:"gap-1.5",onClick:()=>{r(e.id),d({title:"Stage Advanced",description:`${e.name} moved to next stage`})},children:[a.jsx(kl,{className:"h-3.5 w-3.5"}),"Advance Stage"]}),!e.decision&&a.jsxs(a.Fragment,{children:[a.jsxs(W,{size:"sm",variant:"outline",className:"gap-1.5 border-success/30 text-success hover:bg-success/10",onClick:()=>
553{o(e.id,"hired"),d({title:"🎉 Candidate marked as Hired!"})},children:[a.jsx(Uo,{className:"h-3.5 w-3.5"}),"Hire"]}),a.jsxs(W,{size:"sm",variant:"outline",className:"gap-1.5 border-warning/30 text-warning hover:bg-warning/10",onClick:()=>{o(e.id,"on_hold"),d({title:"Candidate placed on hold"})},children:[a.jsx(rO,{className:"h-3.5 w-3.5"}),"Hold"]}),a.jsxs(W,{size:"sm",variant:"outline",className:"gap-1.5 border-destructive/30 text-destructive hover:bg-destructive/10",onClick:()=>{o(e.id,"rejected"),d({title:"Candidate rejected"})},children:[a.jsx(sO,{className:"h-3.5 w-3.5"}),"Reject"]})]})]}),a.jsx(_h,{candidateName:e.name,defaultCollapsed:!0}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Add Note"}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(Cs,{value:p,onChange:x=>u(e.id,x.target.value),placeholder:"Add a note about this candidate...",className:"text-xs min-h-[60px]"}),a.jsx(W,{size:"sm",onClick:w,disabled:!p.trim(),children:a.jsx(mv,{className:"h-3.5 w-3.5"})})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Activity Log"}),a.jsx("div",{className:"space-y-3",children:[...e.activities].reverse().map(x=>a.jsxs("div",{className:"flex gap-3",children:[a.jsxs("div",{className:"flex flex-col items-center",children:[a.jsx("div",{className:`h-2 w-2 rounded-full mt-1.5 ${x.actor==="HR"?"bg-primary":x.actor==="HM"?"bg-warning":x.actor==="Candidate"?"bg-success":"bg-muted-foreground"}`}),a.jsx("div",{className:"w-px flex-1 bg-border/50"})]}),a.jsxs("div",{className:"pb-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Bl,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:x.actor}),a.jsx("span",{className:"text-xs text-muted-foreground",children:Ny(x.timestamp)})]}),a.jsx("p",{className:"text-xs text-foreground mt-0.5",children:x.action}),x.detail&&a.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:x.detail})]})]},x.id))})]})]}),a.jsx(st,{open:h,onOpenChange:f,children:a.jsxs(Ze,{className:"max-w-md",children:[a.jsx(it,{children:a.jsx(ot,{children:"Schedule Interview"})}),a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-xs text-muted-foreground",children:"Round"}),a.jsxs(He,{value:v.stage,onValueChange:x=>g(S=>({...S,stage:x})),children:[a.jsx(Ve,{children:a.jsx(We,{})}),a.jsx(Be,{children:nt.map(x=>a.jsx(ne,{value:x,children:sn[x]},x))})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-xs text-muted-foreground",children:"Date"}),a.jsx(me,{type:"date",value:v.date,onChange:x=>g(S=>({...S,date:x.target.value}))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs text-muted-foreground",children:"Time"}),a.jsx(me,{type:"time",value:v.time,onChange:x=>g(S=>({...S,time:x.target.value}))})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs text-muted-foreground",children:"Interviewer"}),a.jsx(me,{value:v.interviewer,onChange:x=>g(S=>({...S,interviewer:x.target.value})),placeholder:"e.g. Jane Smith (HM)"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"text-xs text-muted-foreground",children:"Notes"}),a.jsx(Cs,{value:v.notes,onChange:x=>g(S=>({...S,notes:x.target.value})),placeholder:"Interview focus areas, links...",className:"text-xs"})]})]}),a.jsxs(c_,{children:[a.jsx(W,{variant:"outline",onClick:()=>f(!1),children:"Cancel"}),a.jsx(W,{onClick:b,disabled:!v.date||!v.time||!v.interviewer,children:"Schedule"})]})]})})]})})}function d7({open:e,onClose:t,notifications:n,onMarkRead:r}){return a.jsx(st,{open:e,onOpenChange:s=>!s&&t(),children:a.jsxs(Ze,{className:"max-w-md max-h-[70vh] overflow-y-auto",children:[a.jsx(it,{children:a.jsxs(ot,{className:"flex items-center gap-2",children:[a.jsx(gk,{className:"h-4 w-4"}),"Hiring Manager Notifications"]})}),a.jsx("div",{className:"space-y-2",children:n.length===0?a.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No notifications yet"}):n.map(s=>a.jsxs("button",{className:`w-full text-left rounded-md border p-3 transition-all ${s.read?"border-border/30 bg-background":"border-primary/30 bg-primary/5"}`,onClick:()=>r(s.id),children:[a.jsx("p",{className:"text-xs text-foreground",children:s.message}),a.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:Ny(s.timestamp)})]},s.id))})]})})}function Ny(e){const t=Math.floor((Date.now()-e.getTime())/1e3);if(t<60)return"just now";const n=Math.floor(t/60);if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}const h7=[{id:"1",title:"Sr. UX Designer",company:"Acme Corp",location:"New York, NY",salary:"$150k – $190k",type:"Full-time",sponsorship:"Yes",signals:[{name:"Design Systems",weight:25},{name:"User Research",weight:20},{name:"Prototyping",weight:20}]},{id:"2",title:"Lead Product Designer",company:"Nova Studio",location:"San Francisco, CA",salary:"$140k – $175k",type:"Full-time",sponsorship:"No",signals:[{name:"Product Strategy",weight:30},{name:"Design Leadership",weight:25},{name:"User Testing",weight:15}]},{id:"3",title:"Frontend Engineer",company:"DataFlow AI",location:"Remote",salary:"$130k – $160k",type:"Full-time",sponsorship:"Yes",signals:[{name:"React/TypeScript",weight:30},{name:"Performance",weight:20}
553,{name:"Accessibility",weight:15}]}];function f7(){var u;const e=Jt(),{user:t}=Or(),n=((u=t==null?void 0:t.user_metadata)==null?void 0:u.full_name)||"there",[r,s]=m.useState(null),[i,o]=m.useState(null),[l,c]=m.useState("");return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsxs("div",{children:[a.jsxs("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:["Welcome back, ",n.split(" ")[0]," 👋"]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Here's your job search at a glance"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2 sm:gap-4",children:[a.jsx(tp,{label:"Resumes",value:"3",max:"5",icon:ci,color:"lavender",onClick:()=>e("/resumes")}),a.jsx(tp,{label:"Videos",value:"2",max:"5",icon:nr,color:"peach",onClick:()=>e("/videos")}),a.jsx(tp,{label:"Applications",value:"3",icon:na,color:"mint",onClick:()=>e("/applications")})]}),a.jsxs("div",{className:"bento-item",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"Explore Jobs"}),a.jsx("button",{onClick:()=>e("/jobs"),className:"text-muted-foreground hover:text-foreground transition-colors",children:a.jsx(JD,{className:"h-4 w-4"})})]}),a.jsx("div",{className:"space-y-3",children:h7.map(d=>a.jsxs("div",{className:"flex items-center justify-between py-3 border-b border-border/30 last:border-0 cursor-pointer hover:bg-accent/30 px-2 -mx-2 rounded transition-colors",onClick:()=>s(d),role:"button",tabIndex:0,onKeyDown:h=>h.key==="Enter"&&s(d),children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[a.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-mint-bg",children:a.jsx(Lt,{className:"h-4 w-4 text-mint"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:d.title}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground truncate",children:[a.jsx("span",{className:"truncate",children:d.company}),a.jsx("span",{children:"·"}),a.jsxs("span",{className:"flex items-center gap-0.5 shrink-0",children:[a.jsx(Qs,{className:"h-3 w-3"}),a.jsx("span",{className:"truncate max-w-[80px] sm:max-w-none",children:d.location})]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-2 shrink-0 ml-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:d.salary}),a.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded-full bg-accent/50 text-muted-foreground whitespace-nowrap",children:d.type})]})]},d.id))}),a.jsx(W,{variant:"outline",size:"sm",className:"w-full mt-4",onClick:()=>e("/jobs"),children:"Explore More Jobs"})]}),a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[a.jsxs("div",{className:"bento-item cursor-pointer hover:border-peach/40 transition-colors",onClick:()=>e("/videos"),children:[a.jsx(nr,{className:"h-5 w-5 text-peach mb-2"}),a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Record a Signal Video"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Companies using Volo AI want to see you in action. A 60-second video can boost your match score by 15-20%."})]}),a.jsxs("div",{className:"bento-item cursor-pointer hover:border-mint/40 transition-colors",onClick:()=>e("/jobs"),children:[a.jsx(Lt,{className:"h-5 w-5 text-mint mb-2"}),a.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Browse Open Roles"}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"See jobs from companies using Volo AI, with signal requirements so you know exactly what they're looking for."})]})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 bg-background/60 z-20",onClick:()=>s(null)}),a.jsx("div",{className:"fixed inset-0 z-30 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-lg w-full max-w-md min-h-[420px] p-5 animate-fade-in flex flex-col gap-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-lg font-semibold text-foreground",children:r.title}),a.jsx(W,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>s(null),children:a.jsx(or,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(Lt,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:r.company}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[r.location," · ",r.type]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border border-border/30",children:[a.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Compensation"}),a.jsx("p",{className:"text-sm font-semibold text-foreground mt-0.5",children:r.salary})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border border-border/30",children:[a.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:"Sponsorship"}),a.jsx("p",{className:"text-sm font-semibold text-foreground mt-0.5",children:r.sponsorship})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"Required Signals"}),a.jsx("div",{className:"space-y-2",children:r.signals.map((d,h)=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("p",{className:"text-sm text-foreground",children:d.name}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:[d.weight,"%"]})]},h))})]}),a.jsx("div",{className:"flex-1"}),a.jsxs("div",{className:"flex gap-2 mt-1",children:[a.jsxs(W,{className:"flex-1 gap-2",onClick:()=>{o(r),s(null)},children:[a.jsx(tr,{className:"h-4 w-4"})," Apply Now"]}),a.jsx(W,{variant:"outline",size:"icon",children:a.jsx(td,{className:"h-4 w-4"})})]})]})})]}),i&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 bg-background/60 z-20",onClick:()=>{o(null),c("")}}),a.jsx("div",{className:"fixed inset-0 z-30 flex items-center justify-center p-4",children:a.jsxs("div",{className:"bg-card border border-border rounded-xl shadow-lg w-full max-w-md min-h-[420px] p-5 animate-fade-in flex flex-col gap-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h3",{className:"text-lg font-semibold text-foreground",children:["Apply to ",i.title]}),a.jsx(W,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{o(null),c("")},children:a.jsx(or,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border border-border/30",children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:i.company}),a.jsx("p",{className:"text-xs text-muted-foreground",children:i.location})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider mb-2",children:"Select Resume"}),a.jsxs(He,{value:l,onValueChange:c,children:[a.jsx(Ve,{className:"w-full",children:a.jsx(We,{placeholder:"Choose a resume..."})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"resume-1",children:"UX Designer Resume"}),a.jsx(ne,{value:"resume-2",children:"Product Designer Resume"}),a.jsx(ne,{value:"resume-3",children:"General Resume"})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Your signal videos will be automatically attached based on matching signals."})]}),a.jsx("div",{className:"flex-1"}),a.jsxs(W,{className:"w-full gap-2",onClick:()=>{o(null),c(""),e("/applications")},children:[a.jsx(tr,{className:"h-4 w-4"})," Submit Application"]})]})})]})]})}function tp({label:e,value:t,max:n,icon:r,color:s="primary",onClick:i}){const o={mint:"text-mint border-mint/20 hover:border-mint/40",lavender:"text-lavender border-lavender/20 hover:border-lavender/40",peach:"text-peach border-peach/20 hover:border-peach/40",sky:"text-sky border-sky/20 hover:border-sky/40",primary:"text-primary border-primary/20 hover:border-primary/40"};return a.jsxs("div",{className:`bento-item cursor-pointer transition-colors border ${o[s]}`,onClick:i,children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsx("span",{className:"text-[11px] sm:text-xs text-muted-foreground truncate",children:e}),a.jsx(r,{className:"h-4 w-4"})]}),a.jsxs("div",{className:"flex items-baseline gap-1",children:[a.jsx("span",{className:"text-xl sm:text-2xl font-semibold text-foreground",children:t}),n&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:["/ ",n]})]})]})}function p7(){var T,R,V,B;const{user:e}=Or(),{toast:t}=cr(),n=m.useRef(null),[r,s]=m.useState(((R=(T=e==null?void 0:e.user_metadata)==null?void 0:T.full_name)==null?void 0:R.split(" ")[0])||""),[i,o]=m.useState(((B=(V=e==null?void 0:e.user_metadata)==null?void 0:V.full_name)==null?void 0:B.split(" ").slice(1).join(" "))||""),[l]=m.useState((e==null?void 0:e.email)||""),[c,u]=m.useState(""),[d,h]=m.useState(""),[f,p]=m.useState(""),[v,g]=m.useState("authorized"),[y,b]=m.useState("no"),[w,x]=m.useState("open"),[S,j]=m.useState(""),[k,C]=m.useState(""),[N,_]=m.useState(""),[E,M]=m.useState(""),[O,H]=m.useState(null),[I,K]=m.useState(!1);m.useEffect(()=>{if(!e)return;(async()=>{const{data:ee}=await Jn.from("profiles").select("avatar_url").eq("user_id",e.id).maybeSingle();if(ee!=null&&ee.avatar_url){const de=ee.avatar_url.match(/avatars\/(.+?)(\?|$)/);if(de!=null&&de[1]){const{data:ce}=await Jn.storage.from("avatars").createSignedUrl(de[1],3600);if(ce!=null&&ce.signedUrl){H(ce.signedUrl);return}}H(ee.avatar_url)}})()},[e]);const $=async z=>{var he;const ee=(he=z.target.files)==null?void 0:he[0];if(!ee||!e)return;if(!ee.type.startsWith("image/")){t({title:"Invalid file",description:"Please upload an image file.",variant:"destructive"});return}if(ee.size>2*1024*1024){t({title:"File too large",description:"Max 2MB allowed.",variant:"destructive"});return}K(!0);const de=ee.name.split(".").pop(),ce=`${e.id}/avatar.${de}`,{error:U}=await Jn.storage.from("avatars").upload(ce,ee,{upsert:!0});if(U){t({title:"Upload failed",description:U.message,variant:"destructive"}),K(!1);return}const ge=`avatars/${ce}`;await Jn.from("profiles").upsert({user_id:e.id,avatar_url:ge},{onConflict:"user_id"});const{data:pe}=await Jn.storage.from("avatars").createSignedUrl(ce,3600);H((pe==null?void 0:pe.signedUrl)||ge),K(!1),t({title:"Photo updated!"})},Q=()=>{t({title:"Profile saved!",description:"Your info has been updated."})},P=`${(r==null?void 0:r[0])||""}${(i==null?void 0:i[0])||""}`.toUpperCase()||"?";return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Profile"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Your account info and job preferences"})]}),a.jsxs("div",{className:"flex items-center gap-5",children:[a.jsxs("div",{className:"relative group",children:[a.jsx("div",{className:"h-20 w-20 rounded-full overflow-hidden bg-sky-bg border-2 border-sky/30 flex items-center justify-center",children:O?a.jsx("img",{src:O,alt:"Profile",className:"h-full w-full object-cover"}):a.jsx("span",{className:"text-xl font-semibold text-sky",children:P})}),a.jsx("button",{onClick:()=>{var z;return(z=n.current)==null?void 0:z.click()},disabled:I,className:"absolute inset-0 rounded-full bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center cursor-pointer",children:I?a.jsx(wk,{className:"h-5 w-5 text-white animate-spin"}):a.jsx(Da,{className:"h-5 w-5 text-white"})}),a.jsx("input",{ref:n,type:"file",accept:"image/*",className:"hidden",onChange:$})]}),a.jsxs("div",{children:[a.jsxs("p",{className:"text-sm font-medium text-foreground",children:[r," ",i]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:l}),a.jsx("button",{onClick:()=>{var z;return(z=n.current)==null?void 0:z.click()},className:"text-xs text-sky hover:underline mt-1",disabled:I,children:I?"Uploading...":"Change photo"})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs("div",{className:"bento-item space-y-4 hover:border-sky/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-sky-bg",children:a.jsx(th,{className:"h-4 w-4 text-sky"})}),a.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wider",children:"Personal Info"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"First Name"}),a.jsx(me,{className:"mt-1",value:r,onChange:z=>s(z.target.value),placeholder:"John"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Last Name"}),a.jsx(me,{className:"mt-1",value:i,onChange:z=>o(z.target.value),placeholder:"Doe"})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Email"}),a.jsx(me,{className:"mt-1",value:l,disabled:!0})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Phone"}),a.jsx(me,{className:"mt-1",value:c,onChange:z=>u(z.target.value),placeholder:"+1 (555) 000-0000"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"LinkedIn"}),a.jsx(me,{className:"mt-1",value:N,onChange:z=>_(z.target.value),placeholder:"linkedin.com/in/yourname"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Portfolio / Website"}),a.jsx(me,{className:"mt-1",value:E,onChange:z=>M(z.target.value),placeholder:"https://yoursite.com"})]})]}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"bento-item space-y-4 hover:border-mint/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-mint-bg",children:a.jsx(Qs,{className:"h-4 w-4 text-mint"})}),a.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wider",children:"Location"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"City"}),a.jsx(me,{className:"mt-1",value:d,onChange:z=>h(z.target.value),placeholder:"San Francisco"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"State"}),a.jsx(me,{className:"mt-1",value:f,onChange:z=>p(z.target.value),placeholder:"CA"})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Open to Relocation"}),a.jsxs(He,{value:w,onValueChange:x,children:[a.jsx(Ve,{className:"mt-1",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"open",children:"Open to relocation"}),a.jsx(ne,{value:"no",children:"Not open to relocation"}),a.jsx(ne,{value:"depends",children:"Depends on location"})]})]})]})]}),a.jsxs("div",{className:"bento-item space-y-4 hover:border-lavender/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-lavender-bg",children:a.jsx(gv,{className:"h-4 w-4 text-lavender"})}),a.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wider",children:"Work Authorization"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Authorization Status"}),a.jsxs(He,{value:v,onValueChange:g,children:[a.jsx(Ve,{className:"mt-1",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"authorized",children:"Authorized to work (US Citizen / Green Card)"}),a.jsx(ne,{value:"visa",children:"On work visa (H1B, L1, etc.)"}),a.jsx(ne,{value:"opt",children:"OPT / CPT"}),a.jsx(ne,{value:"other",children:"Other"})]})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Need Sponsorship"}),a.jsxs(He,{value:y,onValueChange:b,children:[a.jsx(Ve,{className:"mt-1
553",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"no",children:"No sponsorship needed"}),a.jsx(ne,{value:"yes",children:"Will need sponsorship"}),a.jsx(ne,{value:"future",children:"May need in the future"})]})]})]})]}),a.jsxs("div",{className:"bento-item space-y-4 hover:border-peach/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-peach-bg",children:a.jsx(vk,{className:"h-4 w-4 text-peach"})}),a.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wider",children:"Salary Expectations"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Minimum ($)"}),a.jsx(me,{className:"mt-1",type:"number",value:S,onChange:z=>j(z.target.value),placeholder:"120000"})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs text-muted-foreground",children:"Maximum ($)"}),a.jsx(me,{className:"mt-1",type:"number",value:k,onChange:z=>C(z.target.value),placeholder:"180000"})]})]})]})]})]}),a.jsx("div",{className:"flex justify-end",children:a.jsxs(W,{className:"gap-2",onClick:Q,children:[a.jsx(hO,{className:"h-4 w-4"})," Save Profile"]})})]})}const m7=[{id:"r1",label:"General",targetRole:"Product Designer",fileName:"resume_general.pdf",size:"142KB",lastUpdated:"Mar 28, 2026"},{id:"r2",label:"Design Focus",targetRole:"Sr. UX Designer",fileName:"resume_design.pdf",size:"168KB",lastUpdated:"Mar 25, 2026"},{id:"r3",label:"Leadership",targetRole:"Lead Product Designer",fileName:"resume_lead.pdf",size:"131KB",lastUpdated:"Mar 22, 2026"}],Us=5;function g7(){const[e,t]=m.useState(m7),[n,r]=m.useState(!1),[s,i]=m.useState(null),[o,l]=m.useState(""),[c,u]=m.useState(""),[d,h]=m.useState("card"),{toast:f}=cr(),p=()=>{if(!o.trim())return;const g={id:`r${Date.now()}`,label:o,targetRole:c||"General",fileName:`resume_${o.toLowerCase().replace(/\s/g,"_")}.pdf`,size:"~100KB",lastUpdated:"Just now"};t([...e,g]),r(!1),l(""),u(""),f({title:"Resume uploaded!",description:`"${o}" added to your vault.`})},v=g=>{t(e.filter(y=>y.id!==g)),f({title:"Resume removed"})};return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"My Resumes"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Upload up to ",Us," resumes · ",e.length,"/",Us," used"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"flex items-center gap-0.5 border border-border rounded-md p-0.5",children:[a.jsx("button",{onClick:()=>h("card"),className:`p-1.5 rounded ${d==="card"?"bg-accent text-foreground":"text-muted-foreground"}`,children:a.jsx(yk,{className:"h-4 w-4"})}),a.jsx("button",{onClick:()=>h("list"),className:`p-1.5 rounded ${d==="list"?"bg-accent text-foreground":"text-muted-foreground"}`,children:a.jsx(xk,{className:"h-4 w-4"})})]}),a.jsxs(W,{size:"sm",className:"gap-2",onClick:()=>r(!0),disabled:e.length>=Us,children:[a.jsx(vw,{className:"h-4 w-4"})," Upload"]})]})]}),d==="card"&&a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(g=>a.jsxs("div",{className:"bento-item group hover:border-lavender/40 transition-colors",children:[a.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-lavender-bg",children:a.jsx(ci,{className:"h-5 w-5 text-lavender"})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-semibold text-foreground truncate",children:g.label}),a.jsx("p",{className:"text-xs text-muted-foreground",children:g.targetRole})]})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground border-t border-border/30 pt-3 mb-3",children:[a.jsxs("span",{children:[g.fileName," · ",g.size]}),a.jsx("span",{children:g.lastUpdated})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(W,{variant:"outline",size:"sm",className:"flex-1 gap-1 text-xs",onClick:()=>i(g),children:[a.jsx(pw,{className:"h-3 w-3"})," Preview"]}),a.jsx(W,{variant:"ghost",size:"sm",className:"gap-1 text-xs",children:a.jsx(oO,{className:"h-3 w-3"})}),a.jsx(W,{variant:"ghost",size:"sm",className:"gap-1 text-xs text-destructive hover:text-destructive",onClick:()=>v(g.id),children:a.jsx(nd,{className:"h-3 w-3"})})]})]},g.id)),e.length<Us&&a.jsxs("div",{className:"p-6 rounded-lg border border-dashed border-lavender/30 flex flex-col items-center justify-center text-muted-foreground hover:border-lavender/50 hover:text-lavender transition-colors cursor-pointer min-h-[180px]",onClick:()=>r(!0),children:[a.jsx(jr,{className:"h-6 w-6 mb-2"}),a.jsx("span",{className:"text-sm",children:"Add Resume"}),a.jsxs("span",{className:"text-xs mt-1",children:[Us-e.length," slots remaining"]})]})]}),d==="list"&&a.jsxs("div",{className:"space-y-2",children:[e.map(g=>a.jsxs("div",{className:"bento-item flex items-center justify-between hover:border-lavender/40 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-lavender-bg",children:a.jsx(ci,{className:"h-4 w-4 text-lavender"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:g.label}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.targetRole," · ",g.f
553ileName," · ",g.size]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:g.lastUpdated}),a.jsxs(W,{variant:"outline",size:"sm",className:"gap-1 text-xs",onClick:()=>i(g),children:[a.jsx(pw,{className:"h-3 w-3"})," Preview"]}),a.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>v(g.id),children:a.jsx(nd,{className:"h-3 w-3"})})]})]},g.id)),e.length<Us&&a.jsxs(W,{variant:"outline",className:"w-full gap-2 text-sm",onClick:()=>r(!0),children:[a.jsx(jr,{className:"h-4 w-4"})," Add Resume (",Us-e.length," slots remaining)"]})]}),a.jsx(st,{open:n,onOpenChange:r,children:a.jsxs(Ze,{className:"max-w-md",children:[a.jsxs(it,{children:[a.jsx(ot,{children:"Upload Resume"}),a.jsx(da,{children:"Add a resume tailored for a specific role type."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Label"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Design Focus, General",value:o,onChange:g=>l(g.target.value),maxLength:30})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Target Role"}),a.jsxs(He,{value:c,onValueChange:u,children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{placeholder:"Select role type..."})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"Sr. UX Designer",children:"Sr. UX Designer"}),a.jsx(ne,{value:"Sr. Product Designer",children:"Sr. Product Designer"}),a.jsx(ne,{value:"Lead Product Designer",children:"Lead Product Designer"}),a.jsx(ne,{value:"Staff UX Designer",children:"Staff UX Designer"}),a.jsx(ne,{value:"Product Designer",children:"Product Designer"}),a.jsx(ne,{value:"General",children:"General"})]})]})]}),a.jsxs("div",{className:"p-8 rounded-lg border-2 border-dashed border-lavender/30 text-center text-muted-foreground hover:border-lavender/50 transition-colors cursor-pointer",children:[a.jsx(vw,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a.jsx("p",{className:"text-sm",children:"Click or drag to upload PDF"}),a.jsx("p",{className:"text-xs mt-1",children:"Max 10MB"})]}),a.jsx(W,{className:"w-full",onClick:p,disabled:!o.trim(),children:"Upload Resume"})]})]})}),a.jsx(st,{open:!!s,onOpenChange:()=>i(null),children:a.jsxs(Ze,{className:"max-w-md",children:[a.jsx(it,{children:a.jsxs(ot,{children:[s==null?void 0:s.label," — Resume"]})}),s&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"p-4 rounded-lg bg-lavender-bg border border-lavender/20 space-y-2",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:"Target Role"}),a.jsx("p",{className:"text-sm font-medium text-foreground",children:s.targetRole}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.fileName," · ",s.size," · ",s.lastUpdated]})]}),a.jsx("div",{className:"h-48 rounded-lg bg-muted/50 border border-border/30 flex items-center justify-center",children:a.jsxs("div",{className:"text-center text-muted-foreground",children:[a.jsx(ci,{className:"h-10 w-10 mx-auto mb-2 opacity-50"}),a.jsx("p",{className:"text-sm",children:"Resume preview"}),a.jsx("p",{className:"text-xs mt-1",children:"Full preview coming soon"})]})})]})]})})]})}const v7=[{id:"v1",label:"Technical Deep Dive",signal:"Design Systems",duration:"1:42",recordedDate:"Mar 27, 2026"},{id:"v2",label:"Leadership Story",signal:"Team Collaboration",duration:"2:15",recordedDate:"Mar 24, 2026"}],Vs=5;function y7(){const[e,t]=m.useState(v7),[n,r]=m.useState(!1),[s,i]=m.useState(null),[o,l]=m.useState(""),[c,u]=m.useState(""),[d,h]=m.useState("card"),{toast:f}=cr(),p=()=>{if(!o.trim())return;const g={id:`v${Date.now()}`,label:o,signal:c||"General",duration:"0:00",recordedDate:"Just now"};t([...e,g]),r(!1),l(""),u(""),f({title:"Video saved!",description:`"${o}" added to your vault.`})},v=g=>{t(e.filter(y=>y.id!==g)),f({title:"Video removed"})};return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"My Videos"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Record up to ",Vs," signal videos · ",e.length,"/",Vs," used"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("div",{className:"flex items-center gap-0.5 border border-border rounded-md p-0.5",children:[a.jsx("button",{onClick:()=>
553h("card"),className:`p-1.5 rounded ${d==="card"?"bg-accent text-foreground":"text-muted-foreground"}`,children:a.jsx(yk,{className:"h-4 w-4"})}),a.jsx("button",{onClick:()=>h("list"),className:`p-1.5 rounded ${d==="list"?"bg-accent text-foreground":"text-muted-foreground"}`,children:a.jsx(xk,{className:"h-4 w-4"})})]}),a.jsxs(W,{size:"sm",className:"gap-2",onClick:()=>r(!0),disabled:e.length>=Vs,children:[a.jsx(Da,{className:"h-4 w-4"})," Record"]})]})]}),d==="card"&&a.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[e.map(g=>a.jsxs("div",{className:"bento-item group hover:border-peach/40 transition-colors",children:[a.jsxs("div",{className:"relative h-36 rounded-lg bg-peach-bg/50 border border-peach/20 flex items-center justify-center mb-3 overflow-hidden cursor-pointer",onClick:()=>i(g),children:[a.jsx(nr,{className:"h-8 w-8 text-peach/40"}),a.jsx("div",{className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:a.jsx("div",{className:"h-12 w-12 rounded-full bg-peach/90 flex items-center justify-center",children:a.jsx(hu,{className:"h-5 w-5 text-white ml-0.5"})})}),a.jsxs("div",{className:"absolute bottom-2 right-2 flex items-center gap-1 text-xs text-muted-foreground bg-background/80 rounded px-1.5 py-0.5",children:[a.jsx(Xl,{className:"h-3 w-3"})," ",g.duration]})]}),a.jsx("p",{className:"text-sm font-semibold text-foreground",children:g.label}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Signal: ",g.signal]}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Recorded ",g.recordedDate]}),a.jsxs("div",{className:"flex gap-2 mt-3",children:[a.jsxs(W,{variant:"outline",size:"sm",className:"flex-1 gap-1 text-xs",onClick:()=>i(g),children:[a.jsx(hu,{className:"h-3 w-3"})," Play"]}),a.jsx(W,{variant:"ghost",size:"sm",className:"gap-1 text-xs text-destructive hover:text-destructive",onClick:()=>v(g.id),children:a.jsx(nd,{className:"h-3 w-3"})})]})]},g.id)),e.length<Vs&&a.jsxs("div",{className:"p-6 rounded-lg border border-dashed border-peach/30 flex flex-col items-center justify-center text-muted-foreground hover:border-peach/50 hover:text-peach transition-colors cursor-pointer min-h-[200px]",onClick:()=>r(!0),children:[a.jsx(jr,{className:"h-6 w-6 mb-2"}),a.jsx("span",{className:"text-sm",children:"Record New Video"}),a.jsxs("span",{className:"text-xs mt-1",children:[Vs-e.length," slots remaining"]})]})]}),d==="list"&&a.jsxs("div",{className:"space-y-2",children:[e.map(g=>a.jsxs("div",{className:"bento-item flex items-center justify-between hover:border-peach/40 transition-colors",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-peach-bg",children:a.jsx(nr,{className:"h-4 w-4 text-peach"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:g.label}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Signal: ",g.signal," · ",g.duration," · ",g.recordedDate]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs(W,{variant:"outline",size:"sm",className:"gap-1 text-xs",onClick:()=>i(g),children:[a.jsx(hu,{className:"h-3 w-3"})," Play"]}),a.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-destructive hover:text-destructive",onClick:()=>v(g.id),children:a.jsx(nd,{className:"h-3 w-3"})})]})]},g.id)),e.length<Vs&&a.jsxs(W,{variant:"outline",className:"w-full gap-2 text-sm",onClick:()=>r(!0),children:[a.jsx(jr,{className:"h-4 w-4"})," Record New Video (",Vs-e.length," slots remaining)"]})]}),a.jsx(st,{open:n,onOpenChange:r,children:a.jsxs(Ze,{className:"max-w-md",children:[a.jsxs(it,{children:[a.jsxs(ot,{className:"flex items-center gap-2",children:[a.jsx(Da,{className:"h-5 w-5 text-peach"})," Record Signal Video"]}),a.jsx(da,{children:"Record a 60-second video showcasing a specific skill signal."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Video Label"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Leadership Story",value:o,onChange:g=>l(g.target.value),maxLength:40})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Signal"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Design Systems, Team Collaboration",value:c,onChange:g=>u(g.target.value),maxLength:40})]}),a.jsx("div",{className:"h-48 rounded-lg bg-peach-bg/50 border border-peach/20 flex items-center justify-center",children:a.jsxs("div",{className:"text-center text-muted-foreground",children:[a.jsx(Da,{className:"h-10 w-10 mx-auto mb-2 opacity-50"}),a.jsx("p",{className:"text-sm",children:"Camera preview"}),a.jsx("p",{className:"text-xs mt-1",children:"Recording will start when you click below"})]})}),a.jsxs(W,{className:"w-full gap-2",onClick:p,disabled:!o.trim(),children:[a.jsx(Da,{className:"h-4 w-4"})," Start Recording"]})]})]})}),a.jsx(st,{open:!!s,onOpenChange:()=>i(null),children:a.jsxs(Ze,{className:"max-w-lg",children:[a.jsx(it,{children:a.jsx(ot,{children:s==null?void 0:s.label})}),s&&a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"h-56 rounded-lg bg-peach-bg/50 border border-peach/20 flex items-center justify-center",children:a.jsxs("div",{className:"text-center text-muted-foreground",children:[a.jsx(nr,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{className:"text-sm",children:"Video player"}),a.jsxs("p",{className:"text-xs mt-1",children:["Duration: ",s.duration]})]})}),a.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[a.jsxs("span",{children:["Signal: ",s.signal]}),a.jsxs("span",{children:["Recorded ",s.recordedDate]})]})]})]})})]})}const Qb=[{id:"bj1",title:"Sr. UX Designer",company:"Stripe",location:"San Francisco, CA",salary:"$160k – $200k",posted:"1 day ago",type:"Full-time",workModel:"Hybrid",sponsorship:!0,experience:"5+ years",signals:[{name:"Design Systems",weight:25},{name:"User Research",weight:20},{name:"Prototyping",weight:20}]},{id:"bj2",title:"Sr. Product Designer",company:"Figma",location:"New York, NY",salary:"$155k – $195k",posted:"2 days ago",type:"Full-time",workModel:"Remote",sponsorship:!0,experience:"5+ years",signals:[{name:"Visual Design",weight:25},{name:"Design Systems",weight:20},{name:"Stakeholder Mgmt",weight:15}]},{id:"bj3",title:"Lead Product Designer",company:"Airbnb",location:"San Francisco, CA",salary:"$180k – $230k",posted:"3 days ago",type:"Full-time",workModel:"Hybrid",sponsorship:!1,experience:"7+ years",signals:[{name:"Team Leadership",weight:25},{name:"Design Strategy",weight:20},{name:"User Research",weight:20}]},{id:"bj4",title:"Staff UX Designer",company:"Google",location:"Mountain Vie
553w, CA",salary:"$190k – $260k",posted:"1 day ago",type:"Full-time",workModel:"Hybrid",sponsorship:!0,experience:"8+ years",signals:[{name:"Interaction Design",weight:25},{name:"Design Systems",weight:20},{name:"Accessibility",weight:15}]},{id:"bj5",title:"Sr. Product Designer",company:"Notion",location:"New York, NY",salary:"$165k – $200k",posted:"4 days ago",type:"Full-time",workModel:"Remote",sponsorship:!1,experience:"5+ years",signals:[{name:"Prototyping",weight:25},{name:"Visual Design",weight:20},{name:"Communication",weight:15}]},{id:"bj6",title:"Lead Product Designer",company:"Linear",location:"Remote",salary:"$170k – $210k",posted:"2 days ago",type:"Full-time",workModel:"Remote",sponsorship:!1,experience:"6+ years",signals:[{name:"Product Thinking",weight:25},{name:"Design Systems",weight:20},{name:"Prototyping",weight:20}]},{id:"bj7",title:"Sr. UX Designer",company:"Spotify",location:"New York, NY",salary:"$150k – $190k",posted:"5 days ago",type:"Full-time",workModel:"Hybrid",sponsorship:!0,experience:"5+ years",signals:[{name:"User Research",weight:25},{name:"Interaction Design",weight:20},{name:"Data-Driven Design",weight:15}]},{id:"bj8",title:"Staff Product Designer",company:"Vercel",location:"Remote",salary:"$180k – $240k",posted:"1 day ago",type:"Full-time",workModel:"Remote",sponsorship:!1,experience:"8+ years",signals:[{name:"Design Systems",weight:25},{name:"Frontend Collaboration",weight:20},{name:"Visual Design",weight:20}]},{id:"bj9",title:"Sr. Product Designer",company:"Coinbase",location:"San Francisco, CA",salary:"$170k – $220k",posted:"3 days ago",type:"Full-time",workModel:"Remote",sponsorship:!0,experience:"5+ years",signals:[{name:"Complex Workflows",weight:25},{name:"Design Systems",weight:20},{name:"Prototyping",weight:15}]},{id:"bj10",title:"Lead UX Designer",company:"Meta",location:"Menlo Park, CA",salary:"$185k – $250k",posted:"2 days ago",type:"Full-time",workModel:"On-site",sponsorship:!0,experience:"7+ years",signals:[{name:"Team Leadership",weight:25},{name:"User Research",weight:20},{name:"Design Strategy",weight:20}]},{id:"bj11",title:"Sr. UX Designer",company:"Slack",location:"Denver, CO",salary:"$145k – $180k",posted:"1 week ago",type:"Full-time",workModel:"Hybrid",sponsorship:!1,experience:"5+ years",signals:[{name:"Interaction Design",weight:25}
553,{name:"Accessibility",weight:20},{name:"Communication",weight:15}]},{id:"bj12",title:"Staff UX Designer",company:"Apple",location:"Cupertino, CA",salary:"$200k – $280k",posted:"3 days ago",type:"Full-time",workModel:"On-site",sponsorship:!0,experience:"10+ years",signals:[{name:"Visual Design",weight:25},{name:"Interaction Design",weight:25},{name:"Prototyping",weight:20}]},{id:"bj13",title:"Sr. Product Designer",company:"Dropbox",location:"Remote",salary:"$155k – $195k",posted:"4 days ago",type:"Full-time",workModel:"Remote",sponsorship:!1,experience:"5+ years",signals:[{name:"Product Thinking",weight:25},{name:"User Research",weight:20},{name:"Visual Design",weight:15}]}];function x7(){const[e,t]=m.useState(""),[n,r]=m.useState("all"),[s,i]=m.useState("all"),[o,l]=m.useState("all"),[c,u]=m.useState(new Set),[d,h]=m.useState(new Set),[f,p]=m.useState(null),[v,g]=m.useState(null),[y,b]=m.useState(!1),[w,x]=m.useState(""),{toast:S}=cr(),j=(E,M)=>{M==null||M.stopPropagation(),p(null),g(E),b(!0)},k=[...new Set(Qb.map(E=>E.location))].sort(),C=Qb.filter(E=>{const M=E.title.toLowerCase().includes(e.toLowerCase())||E.company.toLowerCase().includes(e.toLowerCase()),O=n==="all"||E.location===n,H=s==="all"||E.workModel===s,I=o==="all"||(o==="yes"?E.sponsorship:!E.sponsorship);return M&&O&&H&&I}),N=E=>{u(M=>{const O=new Set(M);return O.has(E)?O.delete(E):O.add(E),O})},_=()=>{const E=v||f;E&&(h(M=>
553new Set(M).add(E.id)),S({title:"Application Submitted! 🎉",description:`Applied to ${E.title} at ${E.company}`}),b(!1),g(null),p(null),x(""))};return a.jsxs("div",{className:"space-y-6 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-xl sm:text-2xl font-semibold tracking-tight text-foreground",children:"Browse Jobs"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Companies using Volo AI to hire"})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center gap-3 flex-wrap",children:[a.jsxs("div",{className:"relative flex-1 min-w-[180px] max-w-sm",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search jobs...",value:e,onChange:E=>t(E.target.value),className:"pl-9"})]}),a.jsxs(He,{value:n,onValueChange:r,children:[a.jsx(Ve,{className:"w-44",children:a.jsx(We,{placeholder:"City"})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Cities"}),k.map(E=>a.jsx(ne,{value:E,children:E},E))]})]}),a.jsxs(He,{value:s,onValueChange:i,children:[a.jsx(Ve,{className:"w-36",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Models"}),a.jsx(ne,{value:"Remote",children:"Remote"}),a.jsx(ne,{value:"Hybrid",children:"Hybrid"}),a.jsx(ne,{value:"On-site",children:"On-site"})]})]}),a.jsxs(He,{value:o,onValueChange:l,children:[a.jsx(Ve,{className:"w-44",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"all",children:"All Sponsorship"}),a.jsx(ne,{value:"yes",children:"Offers Sponsorship"}),a.jsx(ne,{value:"no",children:"No Sponsorship"})]})]})]}),a.jsxs("div",{className:"space-y-4",children:[C.map(E=>a.jsxs("div",{className:"bento-item hover:border-mint/40 transition-colors cursor-pointer",onClick:()=>p(E),children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-lg bg-mint-bg",children:a.jsx(Lt,{className:"h-5 w-5 text-mint"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:E.title}),a.jsx("p",{className:"text-xs text-muted-foreground",children:E.company})]})]}),a.jsx(W,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:M=>{M.stopPropagation(),N(E.id)},children:c.has(E.id)?a.jsx(hw,{className:"h-4 w-4 text-mint"}):a.jsx(td,{className:"h-4 w-4 text-muted-foreground"})})]}),a.jsxs("div",{className:"flex flex-wrap gap-3 mt-3 text-xs text-muted-foreground",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Qs,{className:"h-3 w-3"}),E.location]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(vk,{className:"h-3 w-3"}),E.salary]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Xl,{className:"h-3 w-3"}),E.posted]}),a.jsx("span",{className:"px-2 py-0.5 rounded bg-sky-bg text-sky border border-sky/20",children:E.workModel}),E.sponsorship&&a.jsx("span",{className:"px-2 py-0.5 rounded bg-lavender-bg text-lavender border border-lavender/20",children:"Visa Sponsor"}),a.jsxs("span",{className:"px-2 py-0.5 rounded bg-peach-bg text-peach border border-peach/20",children:[E.experience," exp"]})]}),a.jsxs("div",{className:"flex items-end justify-between mt-3",children:[a.jsx("div",{className:"flex flex-wrap gap-1",children:E.signals.map(M=>a.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-mint-bg text-mint border border-mint/20",children:[M.name," (",M.weight,"%)"]},M.name))}),d.has(E.id)?a.jsxs(W,{size:"sm",variant:"outline",className:"gap-1.5 ml-3 shrink-0 text-mint border-mint/30",disabled:!0,children:[a.jsx(Uo,{className:"h-3.5 w-3.5"})," Applied"]}):a.jsxs(W,{size:"sm",className:"gap-1.5 ml-3 shrink-0",onClick:M=>j(E,M),children:[a.jsx(tr,{className:"h-3.5 w-3.5"})," Apply Now"]})]})]},E.id)),C.length===0&&a.jsx("div",{className:"bento-item text-center py-12",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No jobs match your filters."})})]}),a.jsx(st,{open:!!f&&!y,onOpenChange:()=>p(null),children:a.jsxs(Ze,{className:"max-w-lg max-h-[80vh] overflow-y-auto",children:[a.jsx(it,{children:a.jsx(ot,{children:f==null?void 0:f.title})}),f&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10",children:a.jsx(Lt,{className:"h-5 w-5 text-primary"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:f.company}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.location," · ",f.workModel]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{className:"p-3 rounded-lg bg-accent/30 border border-border/30",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:"Compensation"}),a.jsx("p",{className:"text-sm font-semibold text-foreground",children:f.salary})]}),a.jsxs("div",{className:"p-3 rounded-lg bg-accent/30 border border-border/30",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase",children:"Sponsorship"}),a.jsx("p",{className:"text-sm font-semibold text-foreground",children:f.sponsorship?"Yes":"No"})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:"Required Signals"}),a.jsx("div",{className:"space-y-2",children:f.signals.map(E=>a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-sm text-foreground",children:E.name}),a.jsxs("span",{className:"text-xs text-muted-foreground",children:[E.weight,"%"]})]},E.name))})]}),a.jsxs("div",{className:"flex gap-2",children:[d.has(f.id)?a.jsxs(W,{className:"flex-1 gap-2 text-mint",variant:"outline",disabled:!0,children:[a.jsx(Uo,{className:"h-4 w-4"})," Applied"]}):a.jsxs(W,{className:"flex-1 gap-2",onClick:()=>j(f),children:[a.jsx(tr,{className:"h-4 w-4"})," Apply Now"]}),a.jsx(W,{variant:"outline",onClick:()=>N(f.id),children:c.has(f.id)?a.jsx(hw,{className:"h-4 w-4"}):a.jsx(td,{className:"h-4 w-4"})})]})]})]})}),a.jsx(st,{open:y,onOpenChange:E=>{b(E),E||(g(null),x(""))},children:a.jsxs(Ze,{className:"max-w-md",children:[a.jsx(it,{children:a.jsxs(ot,{children:["Apply to ",v==null?void 0:v.title]})}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"p-3 rounded-lg bg-accent/30 border border-border/30",children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:v==null?void 0:v.company}),a.jsx("p",{className:"text-xs text-muted-foreground",children:v==null?void 0:v.location})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-1.5",children:"Select Resume"}),a.jsxs(He,{value:w,onValueChange:x,children:[a.jsx(Ve,{children:a.jsx(We,{placeholder:"Choose a resume..."})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"general",children:"General"}),a.jsx(ne,{value:"design",children:"Design Focus"}),a.jsx(ne,{value:"leadership",children:"Leadership"})]})]})]}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Your signal videos will be automatically attached based on matching signals."}),a.jsxs(W,{className:"w-full gap-2",onClick:_,disabled:!w,children:[a.jsx(tr,{className:"h-4 w-4"})," Submit Application"]})]})]})})]})}const w7=[{id:"t1",title:"Sr. Product Designer",company:"Stripe",location:"San Francisco, CA",status:"saved",savedDate:"Mar 30, 2026",source:"volo",matchScore:85,notes:"",lastUpdate:"Just saved",salary:"$160k – $200k"},{id:"t2",title:"Staff UX Designer",company:"Vercel",location:"Remote",status:"saved",savedDate:"Mar 29, 2026",source:"external",url:"https://vercel.com/careers/staff-ux",notes:"Referred by Jake",lastUpdate:"Saved 2 days ago",salary:"$180k – $220k"},{id:"t3",title:"Sr. UX Designer",company:"Acme Corp",location:"New York, NY",status:"applied",matchScore:88,appliedDate:"Mar 25, 2026",savedDate:"Mar 20, 2026",source:"volo",notes:"",lastUpdate:"Application under review",salary:"$150k – $190k"},{id:"t4",title:"Lead Product Designer",company:"Nova Studio",location:"San Francisco, CA",status:"applied",matchScore:72,appliedDate:"Mar 22, 2026",savedDate:"Mar 18, 2026",source:"volo",notes:"Portfolio submitted",lastUpdate:"Reviewing portfolio",salary:"$140k – $175k"},{id:"t5",title:"Sr. Product Designer",company:"Figma",location:"Remote",status:"applied",appliedDate:"Mar 28, 2026",savedDate:"Mar 25, 2026",source:"external",url:"https://figma.com/careers/ux",notes:"Applied via website",lastUpdate:"Confirmation email received"},{id:"t6",title:"Staff Product Designer",company:"Linear",location:"Remote",status:"applied",appliedDate:"Mar 27, 2026",savedDate:"Mar 24, 2026",source:"external",url:"https://linear.app/careers",notes:"",lastUpdate:"Applied 4 days ago"},{id:"t7",title:"Lead UX Designer",company:"DataFlow AI",location:"Remote",status:"interviewing",matchScore:91,appliedDate:"Mar 20, 2026",savedDate:"Mar 15, 2026",source:"volo",notes:"Technical round scheduled Apr 3",lastUpdate:"Interview scheduled",salary:"$130k – $160k"},{id:"t8",title:"Sr. Product Designer",company:"Airbnb",location:"San Francisco, CA",status:"interviewing",appliedDate:"Mar 18, 2026",savedDate:"Mar 10, 2026",source:"external",url:"https://airbnb.com/careers",notes:"Passed phone screen, onsite next week",lastUpdate:"Onsite round pending"},{id:"t9",title:"Staff UX Designer",company:"StartupXYZ",location:"Remote",status:"offer",matchScore:79,appliedDate:"Mar 10, 2026",savedDate:"Mar 5, 2026",source:"volo",notes:"$155k + equity, need to respond by Apr 5",lastUpdate:"Offer received!",salary:"$155k + equity"}],yn={saved:{bg:"bg-muted",text:"text-muted-foreground",border:"border-border"},applied:{bg:"bg-peach-bg",text:"text-peach",border:"border-peach-border"},interviewing:{bg:"bg-mint-bg",text:"text-mint",border:"border-mint-border"},offer:{bg:"bg-sky-bg",text:"text-sky",border:"border-sky-border"},rejected:{bg:"bg-rose-bg",text:"text-rose",border:"border-rose-border"},archived:{bg:"bg-muted",text:"text-muted-foreground",border:"border-border"}},np=[{key:"saved",label:"SAVED",icon:td},{key:"applied",label:"APPLIED",icon:tr},{key:"interviewing",label:"INTERVIEWING",icon:mv},{key:"offer",label:"OFFER",icon:XD}],_a={saved:{label:"Saved",class:"text-xs px-2 py-0.5 rounded-full bg-muted text-muted-foreground"},applied:{label:"Applied",class:"signal-badge-mid"},interviewing:{label:"Interviewing",class:"signal-badge-high"},offer:{label:"Offer",class:"signal-badge-high"},rejected:{label:"Not Selected",class:"signal-badge-low"},archived:{label:"Archived",class:"text-xs px-2 py-0.5 rounded-full bg-muted text-muted-foreground"}};function b7(){const[e,t]=m.useState(w7),[n,r]=m.useState("saved"),[s,i]=m.useState("active"),[o,l]=m.useState(""),[c,u]=m.useState(null),[d,h]=m.useState(!1),[f,p]=m.useState(null),[v,g]=m.useState(null),{toast:y}=cr(),[b,w]=m.useState(""),[x,S]=m.useState(""),[j,k]=m.useState(""),[C,N]=m.useState(""),[_,E]=m.useState("saved"),[M,O]=m.useState(""),[H,I]=m.useState(""),[K,$]=m.useState(!1),Q=e.filter(A=>A.status!=="archived"&&A.status!=="rejected"),P=e.filter(A=>A.status==="archived"||A.status==="rejected"),R=(s==="active"?Q:P).filter(A=>A.title.toLowerCase().includes(o.toLowerCase())||A.company.toLowerCase().includes(o.toLowerCase())),V=(A,te)=>{t(ie=>ie.map(et=>et.id===A?{...et,status:te,lastUpdate:`Moved to ${_a[te].label}`}:et)),y({title:`Moved to ${_a[te].label}`})},B=()=>{t(A=>A.map(te=>te.status==="rejected"?{...te,status:"archived"}:te)),y({title:"Archived rejected applications"})},z=()=>{b.trim()&&($(!0),setTimeout(()=>{const A=(()=>{try{return new URL(b).hostname.replace("www.","").split(".")[0]}catch{return""}})(),te=A.charAt(0).toUpperCase()+A.slice(1);k(te||"Unknown Company"),S("Sr. Product Designer"),N("Remote"),I("We are looking for a Sr. Product Designer to join our design team. You will lead end-to-e
553nd design for key product areas, collaborate closely with engineering and product, and help define our design system. Requirements: 5+ years of product design experience, strong portfolio, proficiency in Figma, experience with design systems, and excellent communication skills."),$(!1),y({title:"URL extracted!",description:"Fields auto-filled. Review and save."})},1200))},ee=()=>{if(!x.trim()||!j.trim())return;const A={id:`t${Date.now()}`,title:x,company:j,location:C||"Not specified",status:_,source:"external",url:b||void 0,notes:M,savedDate:new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),appliedDate:_!=="saved"?new Date().toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):void 0,lastUpdate:"Just added"};t(te=>[...te,A]),h(!1),de(),y({title:"Job added!",description:`${x} at ${j} tracked.`})},de=()=>{S(""),k(""),N(""),w(""),E("saved"),O(""),I("")},ce=A=>R.filter(te=>te.status===A),U=(A,te)=>{p(te),A.dataTransfer.effectAllowed="move"},ge=(A,te)=>{A.preventDefault(),A.dataTransfer.dropEffect="move",g(te)},pe=()=>g(null),he=(A,te)=>{A.preventDefault(),f&&V(f,te),p(null),g(null)};return m.useEffect(()=>{const A=te=>{te.key==="Escape"&&u(null)};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[]),a.jsxs("div",{className:"space-y-5 animate-fade-in",children:[a.jsx(Ln,{}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"Job Tracker"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[Q.length," TOTAL JOBS"]})]}),a.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between flex-wrap gap-3",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{onClick:()=>i("active"),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${s==="active"?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-foreground"}`,children:"Active"}),a.jsx("button",{onClick:()=>i("archived"),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${s==="archived"?"text-primary border-b-2 border-primary":"text-muted-foreground hover:text-foreground"}`,children:"Archived"})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[a.jsxs(W,{variant:"outline",size:"sm",className:"gap-1.5 text-xs",onClick:B,children:[a.jsx(dw,{className:"h-3 w-3"})," ",a.jsx("span",{className:"hidden sm:inline",children:"Archive all rejected"}),a.jsx("span",{className:"sm:hidden",children:"Archive"})]}),a.jsxs(W,{size:"sm",className:"gap-1.5",onClick:()=>h(!0),children:[a.jsx(jr,{className:"h-4 w-4"})," ",a.jsx("span",{className:"hidden sm:inline",children:"Add Application"}),a.jsx("span",{className:"sm:hidden",children:"Add"})]})]})]}),a.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-md",children:[a.jsx(dr,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{placeholder:"Search for roles or companies",value:o,onChange:A=>l(A.target.value),className:"pl-9"})]}),a.jsxs("div",{className:"flex gap-4",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[s==="active"&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex sm:hidden gap-1 mb-3 overflow-x-auto",children:np.map(A=>{const te=ce(A.key).length;return a.jsxs("button",{onClick:()=>r(A.key),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md whitespace-nowrap transition-colors ${n===A.key?`${yn[A.key].bg} ${yn[A.key].text} border ${yn[A.key].border}`:"text-muted-foreground hover:text-foreground"}`,children:[a.jsx(A.icon,{className:"h-3 w-3"}),A.label," (",te,")"]},A.key)})}),a.jsx("div",{className:"sm:hidden space-y-2",children:(()=>{const A=np.find(ie=>ie.key===n),te=ce(A.key);return a.jsxs("div",{className:"space-y-2 min-h-[120px]",children:[te.map(ie=>a.jsxs("div",{className:`p-3 rounded-lg border ${yn[A.key].border} bg-card hover:border-primary/30 transition-colors cursor-pointer`,onClick:()=>u(ie),children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsx("p",{className:"text-sm font-medium text-foreground leading-tight",children:ie.title}),ie.source==="external"&&a.jsx(yf,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-0.5"})]}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-2",children:[a.jsx(vf,{className:"h-3 w-3"})," ",ie.company]}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Qs,{className:"h-3 w-3"})," ",ie.location]}),ie.matchScore&&a.jsx("div",{className:"mt-2",children:a.jsxs("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${yn[A.key].bg} ${yn[A.key].text}`,children:[ie.matchScore,"% match"]})})]},ie.id)),te.length===0&&a.jsx("div",{className:"p-4 rounded-lg border border-dashed border-border/40 text-center",children:a.jsx("p",{className:"text-xs text-muted-foreground",children:"No jobs here yet"})})]})})()}),a.jsx("div",{className:"hidden sm:grid grid-cols-4 gap-3",children:np.map(A=>{const te=ce(A.key);return a.jsxs("div",{className:`space-y-3 rounded-lg p-2 transition-colors min-w-0 ${v===A.key?"bg-primary/5 ring-2 ring-primary/20":""}`,onDragOver:ie=>ge(ie,A.key),onDragLeave:pe,onDrop:ie=>he(ie,A.key),children:[a.jsxs("div",{className:"flex items-center gap-2 px-1",children:[a.jsx(A.icon,{className:`h-4 w-4 ${yn[A.key].text}`}),a.jsxs("span",{className:`text-xs font-semibold uppercase tracking-wider ${yn[A.key].text}`,children:[A.label," (",te.length,")"]})]}),a.jsxs("div",{className:"space-y-2 min-h-[120px]",children:[te.map(ie=>a.jsxs("div",{draggable:!0,onDragStart:et=>U(et,ie.id),className:`p-3 rounded-lg border ${yn[A.key].border} bg-card hover:border-primary/30 transition-colors cursor-grab active:cursor-grabbing ${f===ie.id?"opacity-50":""}`,onClick:()=>u(ie),children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsx("p",{className:"text-sm font-medium text-foreground leading-tight",children:ie.title}),ie.source==="external"&&a.jsx(yf,{className:"h-3 w-3 text-muted-foreground flex-shrink-0 mt-0.5"})]}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground mb-2",children:[a.jsx(vf,{className:"h-3 w-3"})," ",ie.company]}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Qs,{className:"h-3 w-3"})," ",ie.location]}),ie.matchScore&&a.jsx("div",{className:"mt-2",children:a.jsxs("span",{className:`text-[10px] px-1.5 py-0.5 rounded ${yn[A.key].bg} ${yn[A.key].text}`,children:[ie.matchScore,"% match"]})})]},ie.id)),te.length===0&&a.jsx("div",{className:"p-4 rounded-lg border border-dashed border-border/40 text-center",children:a.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop jobs here"})})]})]},A.key)})})]}),s==="archived"&&a.jsxs("div",{className:"space-y-2",children:[R.map(A=>a.jsxs("div",{className:"bento-item flex flex-col sm:flex-row sm:items-center justify-between gap-2 hover:border-mint/40 transition-colors cursor-pointer",onClick:()=>u(A),children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-9 w-9 items-center justify-center rounded-lg bg-mint-bg",children:a.jsx(Lt,{className:"h-4 w-4 text-mint"})}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("p",{className:"text-sm font-medium text-foreground",children:A.title}),A.source==="external"&&a.jsx(yf,{className:"h-3 w-3 text-muted-foreground"})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:[A.company," · ",A.location]})]})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[A.matchScore&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:[A.matchScore,"% match"]}),a.jsx("span",{className:_a[A.status].class,children:_a[A.status].label})]})]},A.id)),R.length===0&&a.jsx("div",{className:"bento-item text-center py-12",children:a.jsx("p",{className:"text-sm text-muted-foreground",children:"No jobs found."})})]})]}),c&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 bg-background/60 z-20 lg:hidden",onClick:()=>u(null)}),a.jsxs("div",{className:`
554              fixed inset-y-0 right-0 w-full sm:w-96 z-30 bg-card border-l border-border p-4 space-y-4 overflow-y-auto
555              lg:relative lg:inset-auto lg:w-80 lg:flex-shrink-0 lg:border lg:rou
555nded-lg lg:h-[calc(100vh-10rem)] lg:sticky lg:top-20 lg:z-auto
556              animate-fade-in
557            `,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c.title}),a.jsx(W,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>u(null),children:a.jsx(or,{className:"h-4 w-4"})})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-mint-bg",children:a.jsx(Lt,{className:"h-5 w-5 text-mint"})}),a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-foreground",children:c.company}),a.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a.jsx(Qs,{className:"h-3 w-3"})," ",c.location]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsx(Hi,{label:"Status",value:_a[c.status].label}),a.jsx(Hi,{label:"Source",value:c.source==="volo"?"Volo AI":"External"}),c.matchScore&&a.jsx(Hi,{label:"Match",value:`${c.matchScore}%`}),c.salary&&a.jsx(Hi,{label:"Salary",value:c.salary}),a.jsx(Hi,{label:"Saved",value:c.savedDate}),c.appliedDate&&a.jsx(Hi,{label:"Applied",value:c.appliedDate})]}),c.url&&a.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-primary hover:underline",children:[a.jsx(am,{className:"h-3 w-3"})," ",c.url]}),a.jsxs("div",{className:"p-3 rounded-lg bg-muted/50 border border-border/30",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Latest Update"}),a.jsx("p",{className:"text-sm text-foreground",children:c.lastUpdate})]}),c.notes&&a.jsxs("div",{className:"p-3 rounded-lg bg-accent/30 border border-border/30",children:[a.jsx("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Notes"}),a.jsx("p",{className:"text-sm text-foreground",children:c.notes})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(He,{defaultValue:c.status,onValueChange:A=>{V(c.id,A),u({...c,status:A})},children:[a.jsx(Ve,{className:"text-xs h-8",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"saved",children:"Saved"}),a.jsx(ne,{value:"applied",children:"Applied"}),a.jsx(ne,{value:"interviewing",children:"Interviewing"}),a.jsx(ne,{value:"offer",children:"Offer"}),a.jsx(ne,{value:"rejected",children:"Not Selected"}),a.jsx(ne,{value:"archived",children:"Archived"})]})]}),c.status!=="archived"&&a.jsxs(W,{variant:"ghost",size:"sm",className:"text-xs",onClick:()=>{V(c.id,"archived"),u(null)},children:[a.jsx(dw,{className:"h-3 w-3 mr-1"})," Archive"]})]})]})]})]}),a.jsx(st,{open:d,onOpenChange:A=>{A||de(),h(A)},children:a.jsxs(Ze,{className:"max-w-md max-h-[85vh] overflow-y-auto",children:[a.jsxs(it,{children:[a.jsxs(ot,{className:"flex items-center gap-2",children:[a.jsx(jr,{className:"h-5 w-5 text-primary"})," Add Application"]}),a.jsx(da,{children:"Paste a job URL to auto-fill, or enter details manually."})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Job URL"}),a.jsxs("div",{className:"flex gap-2 mt-1.5",children:[a.jsxs("div",{className:"relative flex-1",children:[a.jsx(am,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{className:"pl-9",placeholder:"https://company.com/careers/role",value:b,onChange:A=>w(A.target.value)})]}),a.jsx(W,{variant:"outline",size:"sm",onClick:z,disabled:!b.trim()||K,children:K?a.jsx(wk,{className:"h-4 w-4 animate-spin"}):"Extract"})]}),a.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:"Paste a link and click Extract to auto-fill fields"})]}),a.jsxs("div",{className:"border-t border-border/30 pt-4 space-y-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Job Title"}),a.jsx(me,{className:"mt-1.5",placeholder:"e.g. Sr. Product Designer",value:x,onChange:A=>S(A.target.value),maxLength:60})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Company"}),a.jsxs("div",{className:"relative mt-1.5",children:[a.jsx(vf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{className:"pl-9",placeholder:"Company",value:j,onChange:A=>k(A.target.value),maxLength:40})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Location"}),a.jsxs("div",{className:"relative mt-1.5",children:[a.jsx(Qs,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),a.jsx(me,{className:"pl-9",placeholder:"City or Remote",value:C,onChange:A=>N(A.target.value),maxLength:30})]})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Status"}),a.jsxs(He,{value:_,onValueChange:A=>E(A),children:[a.jsx(Ve,{className:"mt-1.5",children:a.jsx(We,{})}),a.jsxs(Be,{children:[a.jsx(ne,{value:"saved",children:"Saved"}),a.jsx(ne,{value:"applied",children:"Applied"}),a.jsx(ne,{value:"interviewing",children:"Interviewing"}),a.jsx(ne,{value:"offer",children:"Offer"})]})]})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Job Description"}),a.jsx(Cs,{className:"mt-1.5",placeholder:"Paste job description here...",value:H,onChange:A=>I(A.target.value),rows:3,maxLength:1e3})]}),a.jsxs("div",{children:[a.jsx(fe,{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"Notes"}),a.jsx(Cs,{className:"mt-1.5",placeholder:"Referral, deadline, interview details...",value:M,onChange:A=>O(A.target.value),rows:2,maxLength:200})]})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx(W,{variant:"outline",className:"flex-1",onClick:()=>{de(),h(!1)},children:"Cancel"}),a.jsxs(W,{className:"flex-1 gap-2",onClick:ee,disabled:!x.trim()||!j.trim(),children:[a.jsx(jr,{className:"h-4 w-4"})," Save"]})]})]})]})})]})}function Hi({label:e,value:t}){return a.jsxs("div",{className:"p-2 rounded-lg bg-accent/30 border border-border/30",children:[a.jsx("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wider",children:e}),a.jsx("p",{className:"text-xs font-medium text-foreground mt-0.5",children:t})]})}function S7(){const{enterDemo:e}=Or(),{setMode:t}=Ir(),n=Jt();return a.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-background p-4 relative",children:[a.jsx("div",{className:"absolute top-4 right-4",children:a.jsx(Jv,{})}
557),a.jsxs("div",{className:"w-full max-w-md space-y-12 flex flex-col items-center",children:[a.jsxs("div",{className:"flex items-center justify-center gap-5 pt-8",children:[a.jsx("img",{src:Vv,alt:"Volo AI",className:"h-[120px] w-[120px] rounded-3xl shrink-0"}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-5xl font-bold text-foreground leading-tight",children:"Volo AI"}),a.jsx("p",{className:"text-lg text-muted-foreground leading-tight",children:"Beyond the Resume."})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 w-full",children:[a.jsxs(W,{variant:"outline",size:"lg",className:"w-full gap-2 text-base py-6 transition-all duration-200 hover:scale-105 hover:shadow-lg hover:border-blue-500 hover:bg-blue-500/10 hover:text-blue-600 dark:hover:text-blue-400",onClick:()=>{e("recruiter"),t("recruiter"),n("/")},children:[a.jsx(gv,{className:"h-5 w-5"}),"Recruiter Demo"]}),a.jsxs(W,{variant:"outline",size:"lg",className:"w-full gap-2 text-base py-6 transition-all duration-200 hover:scale-105 hover:shadow-lg hover:border-emerald-500 hover:bg-emerald-500/10 hover:text-emerald-600 dark:hover:text-emerald-400",onClick:()=>{e("candidate"),t("candidate"),n("/")},children:[a.jsx(fv,{className:"h-5 w-5"}),"Candidate Demo"]})]})]})]})}const j7=[{icon:a.jsx(fv,{className:"h-8 w-8 text-primary"}),title:"Create Personas",description:"Build up to 5 professional identities",detail
557:"Each persona represents a different career angle — Fintech Lead, Growth PM, Staff Engineer. Tailor your resume and intro video per persona to stand out."},{icon:a.jsx(nr,{className:"h-8 w-8 text-primary"}),title:"Record Signal Videos",description:"Show, don't just tell",detail:"Our AI Studio helps you record 60-second clips covering hiring signals like leadership, technical depth, and collaboration. Companies see proof, not just bullet points."},{icon:a.jsx(Sk,{className:"h-8 w-8 text-primary"}),title:"Signal Matching",description:"AI matches you to the right roles",detail:"Each job posting lists the signals they care about. We auto-match your videos against those signals and show your match percentage before you apply."},{icon:a.jsx(tr,{className:"h-8 w-8 text-primary"}),title:"One-Click Apply",description:"Submit your best self instantly",detail:"Pick a persona, select a job, and submit. Your resume + video package is sent automatically. If signals are missing, we'll prompt a quick 60-second recording."}],k7=[{icon:a.jsx(Vo,{className:"h-8 w-8 text-primary"}),title:"Post Roles with Signals",description:"Define what actually matters",detail:"Instead of vague requirements, define success signals with weights. Our AI suggests signals based on the department and role — you fine-tune the percentages."},{icon:a.jsx(Sk,{className:"h-8 w-8 text-primary"}),title:"AI-Ranked Candidates",description:"See signal match scores instantly",detail:"Candidates are ranked by how well their video signals match your requirements. No more guessing from resumes alone — see proof of their abilities."},{icon:a.jsx(Uo,{className:"h-8 w-8 text-primary"}),title:"Greenlight & Pipeline",description:"Streamlined interview workflow",detail:"Greenlight top candidates to send them to the Hiring Manager. Track every stage from HR screen to offer, schedule interviews, and keep a full activity log."},{icon:a.jsx(tr,{className:"h-8 w-8 text-primary"}),title:"Team Communication",description:"HR, HM, and candidates in sync",detail:"Every action is logged — greenlight decisions, interview schedules, notes, and stage advances. No more lost context between team members."}];function C7(){var u;const[e,t]=m.useState(0),{user:n}=Or(),{setMode:r}=Ir(),s=Jt(),i=((u=n==null?void 0:n.user_metadata)==null?void 0:u.role)||"candidate",o=i==="candidate"?j7:k7,l=o[e],c=()=>{r(i),s("/")};return a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:a.jsxs("div",{className:"w-full max-w-lg space-y-8",children:[a.jsx("div",{className:"flex justify-center gap-2",children:o.map((d,h)=>a.jsx("div",{className:`h-2 rounded-full transition-all ${h===e?"w-8 bg-primary":"w-2 bg-muted-foreground/20"}`},h))}),a.jsxs("div",{className:"p-8 rounded-2xl border border-border bg-card text-center space-y-4 animate-fade-in",children:[a.jsx("div",{className:"flex justify-center",children:l.icon}),a.jsx("h2",{className:"text-xl font-bold text-foreground",children:l.title}),a.jsx("p",{className:"text-sm font-medium text-primary",children:l.description}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:l.detail})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(W,{variant:"ghost",size:"sm",onClick:()=>t(d=>d-1),disabled:e===0,className:"gap-1",children:[a.jsx(Xd,{className:"h-4 w-4"})," Back"]}),a.jsx("button",{onClick:c,className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:"Skip onboarding"}),e<o.length-1?a.jsxs(W,{size:"sm",onClick:()=>t(d=>d+1),className:"gap-1",children:["Next ",a.jsx(kl,{className:"h-4 w-4"})]}):a.jsxs(W,{size:"sm",onClick:c,className:"gap-1",children:["Get Started ",a.jsx(kl,{className:"h-4 w-4"})]})]})]})})}const Xb=()=>{const e=On();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),a.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},N7=new i2;function Zb({children:e}){const{user:t,loading:n}=Or();return n?a.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:a.jsx("div",{className:"animate-pulse text-muted-foreground text-sm",children:"Loading..."})}):t?a.jsx(a.Fragment,{children:e}):a.jsx(Fj,{to:"/auth",replace:!0})}function E7({children:e}){const{user:t,loading:n}=Or();return n?null:t?a.jsx(Fj,{to:"/",replace:!0}):a.jsx(a.Fragment,{children:e})}function T7(){const{mode:e}=Ir();return e==="candidate"?a.jsxs(Xp,{children:[a.jsx(qe,{path:"/",element:a.jsx(f7,{})}),a.jsx(qe,{path:"/profile",element:a.jsx(p7,{})}),a.jsx(qe,{path:"/resumes",element:a.jsx(g7,{})}),a.jsx(qe,{path:"/videos",element:a.jsx(y7,{})}),a.jsx(qe,{path:"/jobs",element:a.jsx(x7,{})}),a.jsx(qe,{path:"/applications",element:a.jsx(b7,{})}),a.jsx(qe,{path:"*",element:a.jsx(Xb,{})})]}):a.jsxs(Xp,{children:[a.jsx(qe,{path:"/",element:a.jsx(Q6,{})}),a.jsx(qe,{path:"/jobs",element:a.jsx(OH,{})}),a.jsx(qe,{path:"/candidates",element:a.jsx(zb,{})}),a.jsx(qe,{path:"/applications",element:a.jsx(zH,{})}),a.jsx(qe,{path:"/pipeline",element:a.jsx(l7,{})}),a.jsx(qe,{path:"/emails",element:a.jsx(QH,{})}),a.jsx(qe,{path:"/calendar",element:a.jsx(a7,{})}),a.jsx(qe,{path:"/slate",element:a.jsx(zb,{})}),a.jsx(qe,{path:"*",element:a.jsx(Xb,{})})]})}const _7=()=>a.jsx(a2,{client:N7,children:a.jsx(mM,{attribute:"class",defaultTheme:"light",enableSystem:!0,children:a.jsxs(lC,{delayDuration:200,children:[a.jsx(JO,{}),a.jsx(GM,{}),a.jsx(rM,{children:a.jsx(R$,{children:a.jsx(A$,{children:a.jsxs(Xp,{children:[a.jsx(qe,{path:"/auth",element:a.jsx(E7,{children:a.jsx(S7,{})})}),a.jsx(qe,{path:"/onboarding",element:a.jsx(Zb,{children:a.jsx(C7,{})})}),a.jsx(qe,{path:"/*",element:a.jsx(Zb,{children:a.jsx(z6,{children:a.jsx(T7,{})})})})]})})})})]})})});Sj(document.getElementById("root")).render(a.jsx(_7,{}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.