vendor: 4,703 bytes, lines 1-9
1var V0=e=>{throw TypeError(e)};var wh=(e,t,n)=>t.has(e)||V0("Cannot "+n);var k=(e,t,n)=>(wh(e,t,"read from private field"),n?n.call(e):t.get(e)),ae=(e,t,n)=>t.has(e)?V0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ee=(e,t,n,r)=>(wh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ye=(e,t,n)=>(wh(e,t,"access private method"),n);var nu=(e,t,n,r)=>({set _(s){ee(e,t,s,n)},get _(){return k(e,t,r)}});function oA(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)}})();var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aA(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var s1={exports:{}},mf={},i1={exports:{}},Te={};/** 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 Pc=Symbol.for("react.element"),lA=Symbol.for("react.portal"),cA=Symbol.for("react.fragment"),uA=Symbol.for("react.strict_mode"),dA=Symbol.for("react.profiler"),fA=Symbol.for("react.provider"),hA=Symbol.for("react.context"),pA=Symbol.for("react.forward_ref"),mA=Symbol.for("react.suspense"),gA=Symbol.for("react.memo"),vA=Symbol.for("react.lazy"),U0=Symbol.iterator;function yA(e){return e===null||typeof e!="object"?null:(e=U0&&e[U0]||e["@@iterator"],typeof e=="function"?e:null)}var o1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},a1=Object.assign,l1={};function Ca(e,t,n){this.props=e,this.context=t,this.refs=l1,this.updater=n||o1}Ca.prototype.isReactComponent={};Ca.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")};Ca.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function c1(){}c1.prototype=Ca.prototype;function tv(e,t,n){this.props=e,this.context=t,this.refs=l1,this.updater=n||o1}var nv=tv.prototype=new c1;nv.constructor=tv;a1(nv,Ca.prototype);nv.isPureReactComponent=!0;var B0=Array.isArray,u1=Object.prototype.hasOwnProperty,rv={current:null},d1={key:!0,ref:!0,__self:!0,__source:!0};function f1(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)u1.call(t,r)&&!d1.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:Pc,type:e,key:i,ref:o,props:s,_owner:rv.current}}function xA(e,t){return{$$typeof:Pc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function sv(e){return typeof e=="object"&&e!==null&&e.$$typeof===Pc}function wA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var z0=/\/+/g;function bh(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wA(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Fu(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 Pc:case lA:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+bh(o,0):r,B0(s)?(n="",e!=null&&(n=e.replace(z0,"$&/")+"/"),Fu(s,t,n,"",function(c){return c})):s!=null&&(sv(s)&&(s=xA(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(z0,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",B0(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+bh(i,a);o+=Fu(i,t,n,l,s)}else if(l=yA(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+bh(i,a++),o+=Fu(i,t,n,l,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 ru(e,t,n){if(e==null)return e;var r=[],s=0;return Fu(e,r,"","",function(i){return t.call(n,i,s++)}),r}function bA(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 zt={current:null},$u={transition:null},_A={ReactCurrentDispatcher:zt,ReactCurrentBatchConfig:$u,ReactCurrentOwner:rv};function h1(){throw Error("act(...) is not supported in production builds of React.")}Te.Children={map:ru,forEach:function(e,t,n){ru(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ru(e,function(){t++}),t},toArray:function(e){return ru(e,function(t){return t})||[]},only:function(e){if(!sv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Te.Component=Ca;Te.Fragment=cA;Te.Profiler=dA;Te.PureComponent=tv;Te.StrictMode=uA;Te.Suspense=mA;Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_A;Te.act=h1;Te.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=a1({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=rv.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)u1.call(t,l)&&!d1.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Pc,type:e.type,key:s,ref:i,props:r,_owner:o}};Te.createContext=function(e){return e={$$typeof:hA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:fA,_context:e},e.Consumer=e};Te.createElement=f1;Te.createFactory=function(e){var t=f1.bind(null,e);return t.type=e,t};Te.createRef=function(){return{current:null}};Te.forwardRef=function(e){return{$$typeof:pA,render:e}};Te.isValidElement=sv;Te.lazy=function(e){return{$$typeof:vA,_payload:{_status:-1,_result:e},_init:bA}};Te.memo=function(e,t){return{$$typeof:gA,type:e,compare:t===void 0?null:t}};Te.startTransition=function(e){var t=$u.transition;$u.transition={};try{e()}finally{$u.transition=t}};Te.unstable_act=h1;Te.useCallback=function(e,t){return zt.current.useCallback(e,t)};Te.useContext=function(e){return zt.current.useContext(e)};Te.useDebugValue=function(){};Te.useDeferredValue=function(e){return zt.current.useDeferredValue(e)};Te.useEffect=function(e,t){return zt.current.useEffect(e,t)};Te.useId=function(){return zt.current.useId()};Te.useImperativeHandle=function(e,t,n){return zt.current.useImperativeHandle(e,t,n)};Te.useInsertionEffect=function(e,t){return zt.current.useInsertionEffect(e,t)};Te.useLayoutEffect=function(e,t){return zt.current.useLayoutEffect(e,t)};Te.useMemo=function(e,t){return zt.current.useMemo(e,t)};Te.useReducer=function(e,t,n){return zt.current.useReducer(e,t,n)};Te.useRef=function(e){return zt.current.useRef(e)};Te.useState=function(e){return zt.current.useState(e)};Te.useSyncExternalStore=function(e,t,n){return zt.current.useSyncExternalStore(e,t,n)};Te.useTransition=function(){return zt.current.useTransition()};Te.version="18.3.1";i1.exports=Te;var p=i1.exports;const F=r1(p),p1=oA({__proto__:null,default:F},[p]);/** 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 SA=p,CA=Symbol.for("react.element"),EA=Symbol.for("react.fragment"),kA=Object.prototype.hasOwnProperty,TA=SA.__SECRET_INT
vendor: 4,885 bytes, lines 17-32
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,PA={key:!0,ref:!0,__self:!0,__source:!0};function m1(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)kA.call(t,r)&&!PA.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:CA,type:e,key:i,ref:o,props:s,_owner:TA.current}}mf.Fragment=EA;mf.jsx=m1;mf.jsxs=m1;s1.exports=mf;var d=s1.exports,g1={exports:{}},vn={},v1={exports:{}},y1={};/** 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(j,O){var K=j.length;j.push(O);e:for(;0<K;){var G=K-1>>>1,ne=j[G];if(0<s(ne,O))j[G]=O,j[K]=ne,K=G;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var O=j[0],K=j.pop();if(K!==O){j[0]=K;e:for(var G=0,ne=j.length,fe=ne>>>1;G<fe;){var Se=2*(G+1)-1,Ye=j[Se],he=Se+1,se=j[he];if(0>s(Ye,K))he<ne&&0>s(se,Ye)?(j[G]=se,j[he]=K,G=he):(j[G]=Ye,j[Se]=K,G=Se);else if(he<ne&&0>s(se,K))j[G]=se,j[he]=K,G=he;else break e}}return O}function s(j,O){var K=j.sortIndex-O.sortIndex;return K!==0?K:j.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,f=null,h=3,m=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(j){for(var O=n(c);O!==null;){if(O.callback===null)r(c);else if(O.startTime<=j)r(c),O.sortIndex=O.expirationTime,t(l,O);else break;O=n(c)}}function _(j){if(g=!1,b(j),!y)if(n(l)!==null)y=!0,V(S);else{var O=n(c);O!==null&&H(_,O.startTime-j)}}function S(j,O){y=!1,g&&(g=!1,x(C),C=-1),m=!0;var K=h;try{for(b(O),f=n(l);f!==null&&(!(f.expirationTime>O)||j&&!R());){var G=f.callback;if(typeof G=="function"){f.callback=null,h=f.priorityLevel;var ne=G(f.expirationTime<=O);O=e.unstable_now(),typeof ne=="function"?f.callback=ne:f===n(l)&&r(l),b(O)}else r(l);f=n(l)}if(f!==null)var fe=!0;else{var Se=n(c);Se!==null&&H(_,Se.startTime-O),fe=!1}return fe}finally{f=null,h=K,m=!1}}var P=!1,T=null,C=-1,M=5,I=-1;function R(){return!(e.unstable_now()-I<M)}function A(){if(T!==null){var j=e.unstable_now();I=j;var O=!0;try{O=T(!0,j)}finally{O?$():(P=!1,T=null)}}else P=!1}var $;if(typeof v=="function")$=function(){v(A)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,Z=L.port2;L.port1.onmessage=A,$=function(){Z.postMessage(null)}}else $=function(){w(A,0)};function V(j){T=j,P||(P=!0,$())}function H(j,O){C=w(function(){j(e.unstable_now())},O)}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(j){j.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,V(S))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var K=h;h=O;try{return j()}finally{h=K}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,O){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var K=h;h=j;try{return O()}finally{h=K}},e.unstable_scheduleCallback=function(j,O,K){var G=e.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?G+K:G):K=G,j){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=K+ne,j={id:u++,callback:O,priorityLevel:j,startTime:K,expirationTime:ne,sortIndex:-1},K>G?(j.sortIndex=K,t(c,j),n(l)===null&&j===n(c)&&(g?(x(C),C=-1):g=!0,H(_,K-G))):(j.sortIndex=ne,t(l,j),y||m||(y=!0,V(S))),j},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(j){var O=h;return function(){var K=h;h=O;try{return j.apply(this,arguments)}finally{h=K}}}})(y1);v1.exports=y1;var jA=v1.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 RA=p,gn=jA;function B(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 x1=new Set,Vl={};function Wi(e,t){sa(e,t),sa(e+"Capture",t)}function sa(e,t){for(Vl[e]=t,e=0;e<t.length;e++)x1.add(t[e])}var Ur=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ap=Object.prototype.hasOwnProperty,NA=/^[: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]*$/,W0={},H0={};function AA(e){return Ap.call(H0,e)?!0:Ap.call(W0,e)?!1:NA.test(e)?H0[e]=!0:(W0[e]=!0,!1)}function OA(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 MA(e,t,n,r){if(t===null||typeof t>"u"||OA(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 Wt(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 kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){kt[e]=new Wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];kt[t]=new Wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){kt[e]=new Wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){kt[e]=new Wt(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){kt[e]=new Wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){kt[e]=new Wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){kt[e]=new Wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){kt[e]=new Wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){kt[e]=new Wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var iv=/[\-:]([a-z])/g;function ov(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(iv,ov);kt[t]=new Wt(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(iv,ov);kt[t]=new Wt(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(iv,ov);kt[t]=new Wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){kt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new Wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){kt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function av(e,t,n,r){var s=kt.hasOwnProperty(t)?kt[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(MA(t,n,s,r)&&(n=null),r||s===null?AA(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))))}
vendor: 16,921 bytes, lines 33-37
33var Yr=RA.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,su=Symbol.for("react.element"),mo=Symbol.for("react.portal"),go=Symbol.for("react.fragment"),lv=Symbol.for("react.strict_mode"),Op=Symbol.for("react.profiler"),w1=Symbol.for("react.provider"),b1=Symbol.for("react.context"),cv=Symbol.for("react.forward_ref"),Mp=Symbol.for("react.suspense"),Dp=Symbol.for("react.suspense_list"),uv=Symbol.for("react.memo"),ds=Symbol.for("react.lazy"),_1=Symbol.for("react.offscreen"),K0=Symbol.iterator;function za(e){return e===null||typeof e!="object"?null:(e=K0&&e[K0]||e["@@iterator"],typeof e=="function"?e:null)}var et=Object.assign,_h;function ol(e){if(_h===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_h=t&&t[1]||""}return` 34`+_h+e}var Sh=!1;function Ch(e,t){if(!e||Sh)return"";Sh=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=` 37`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Sh=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ol(e):""}function DA(e){switch(e.tag){case 5:return ol(e.type);case 16:return ol("Lazy");case 13:return ol("Suspense");case 19:return ol("SuspenseList");case 0:case 2:case 15:return e=Ch(e.type,!1),e;case 11:return e=Ch(e.type.render,!1),e;case 1:return e=Ch(e.type,!0),e;default:return""}}function Ip(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 go:return"Fragment";case mo:return"Portal";case Op:return"Profiler";case lv:return"StrictMode";case Mp:return"Suspense";case Dp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b1:return(e.displayName||"Context")+".Consumer";case w1:return(e._context.displayName||"Context")+".Provider";case cv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uv:return t=e.displayName||null,t!==null?t:Ip(e.type)||"Memo";case ds:t=e._payload,e=e._init;try{return Ip(e(t))}catch{}}return null}function IA(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 Ip(t);case 8:return t===lv?"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 Vs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function S1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function LA(e){var t=S1(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 iu(e){e._valueTracker||(e._valueTracker=LA(e))}function C1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=S1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function od(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 et({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function G0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vs(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 E1(e,t){t=t.checked,t!=null&&av(e,"checked",t,!1)}function Fp(e,t){E1(e,t);var n=Vs(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")?$p(e,t.type,n):t.hasOwnProperty("defaultValue")&&$p(e,t.type,Vs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function q0(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 $p(e,t,n){(t!=="number"||od(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var al=Array.isArray;function Ao(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)}else{for(n=""+Vs(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 Vp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return et({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Q0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(al(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vs(n)}}function k1(e,t){var n=Vs(t.value),r=Vs(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 Y0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function T1(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 Up(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?T1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ou,P1=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(ou=ou||document.createElement("div"),ou.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ou.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ul(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bl={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},FA=["Webkit","ms","Moz","O"];Object.keys(bl).forEach(function(e){FA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bl[t]=bl[e]})});function j1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bl.hasOwnProperty(e)&&bl[e]?(""+t).trim():t+"px"}function R1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=j1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var $A=et({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 Bp(e,t){if(t){if($A[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function zp(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 Wp=null;function dv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hp=null,Oo=null,Mo=null;function Z0(e){if(e=Nc(e)){if(typeof Hp!="function")throw Error(B(280));var t=e.stateNode;t&&(t=wf(t),Hp(e.stateNode,e.type,t))}}function N1(e){Oo?Mo?Mo.push(e):Mo=[e]:Oo=e}function A1(){if(Oo){var e=Oo,t=Mo;if(Mo=Oo=null,Z0(e),t)for(e=0;e<t.length;e++)Z0(t[e])}}function O1(e,t){return e(t)}function M1(){}var Eh=!1;function D1(e,t,n){if(Eh)return e(t,n);Eh=!0;try{return O1(e,t,n)}finally{Eh=!1,(Oo!==null||Mo!==null)&&(M1(),A1())}}function Bl(e,t){var n=e.stateNode;if(n===null)return null;var r=wf(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(B(231,t,typeof n));return n}var Kp=!1;if(Ur)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){Kp=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{Kp=!1}function VA(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var _l=!1,ad=null,ld=!1,Gp=null,UA={onError:function(e){_l=!0,ad=e}};function BA(e,t,n,r,s,i,o,a,l){_l=!1,ad=null,VA.apply(UA,arguments)}function zA(e,t,n,r,s,i,o,a,l){if(BA.apply(this,arguments),_l){if(_l){var c=ad;_l=!1,ad=null}else throw Error(B(198));ld||(ld=!0,Gp=c)}}function Hi(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 I1(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 X0(e){if(Hi(e)!==e)throw Error(B(188))}function WA(e){var t=e.alternate;if(!t){if(t=Hi(e),t===null)throw Error(B(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 X0(s),e;if(i===r)return X0(s),t;i=i.sibling}throw Error(B(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function L1(e){return e=WA(e),e!==null?F1(e):null}function F1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=F1(e);if(t!==null)return t;e=e.sibling}return null}var $1=gn.unstable_scheduleCallback,J0=gn.unstable_cancelCallback,HA=gn.unstable_shouldYield,KA=gn.unstable_requestPaint,lt=gn.unstable_now,GA=gn.unstable_getCurrentPriorityLevel,fv=gn.unstable_ImmediatePriority,V1=gn.unstable_UserBlockingPriority,cd=gn.unstable_NormalPriority,qA=gn.unstable_LowPriority,U1=gn.unstable_IdlePriority,gf=null,pr=null;function QA(e){if(pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(gf,e,void 0,(e.current.flags&128)===128)}catch{}}var Hn=Math.clz32?Math.clz32:XA,YA=Math.log,ZA=Math.LN2;function XA(e){return e>>>=0,e===0?32:31-(YA(e)/ZA|0)|0}var au=64,lu=4194304;function ll(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 ud(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 a=o&~s;a!==0?r=ll(a):(i&=o,i!==0&&(r=ll(i)))}else o=n&~s,o!==0?r=ll(o):i!==0&&(r=ll(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-Hn(t),s=1<<n,r|=e[n],t&=~s;return r}function JA(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 e2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Hn(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=JA(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function qp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function B1(){var e=au;return au<<=1,!(au&4194240)&&(au=64),e}function kh(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Hn(t),e[t]=n}function t2(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-Hn(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function hv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Hn(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var $e=0;function z1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var W1,pv,H1,K1,G1,Qp=!1,cu=[],Ns=null,As=null,Os=null,zl=new Map,Wl=new Map,ms=[],n2="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 ex(e,t){switch(e){case"focusin":case"focusout":Ns=null;break;case"dragenter":case"dragleave":As=null;break;case"mouseover":case"mouseout":Os=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wl.delete(t.pointerId)}}function Ha(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=Nc(t),t!==null&&pv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function r2(e,t,n,r,s){switch(t){case"focusin":return Ns=Ha(Ns,e,t,n,r,s),!0;case"dragenter":return As=Ha(As,e,t,n,r,s),!0;
vendor: 10,308 bytes, line 37
37case"mouseover":return Os=Ha(Os,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return zl.set(i,Ha(zl.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Wl.set(i,Ha(Wl.get(i)||null,e,t,n,r,s)),!0}return!1}function q1(e){var t=hi(e.target);if(t!==null){var n=Hi(t);if(n!==null){if(t=n.tag,t===13){if(t=I1(n),t!==null){e.blockedOn=t,G1(e.priority,function(){H1(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 Vu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Wp=r,n.target.dispatchEvent(r),Wp=null}else return t=Nc(n),t!==null&&pv(t),e.blockedOn=n,!1;t.shift()}return!0}function tx(e,t,n){Vu(e)&&n.delete(t)}function s2(){Qp=!1,Ns!==null&&Vu(Ns)&&(Ns=null),As!==null&&Vu(As)&&(As=null),Os!==null&&Vu(Os)&&(Os=null),zl.forEach(tx),Wl.forEach(tx)}function Ka(e,t){e.blockedOn===t&&(e.blockedOn=null,Qp||(Qp=!0,gn.unstable_scheduleCallback(gn.unstable_NormalPriority,s2)))}function Hl(e){function t(s){return Ka(s,e)}if(0<cu.length){Ka(cu[0],e);for(var n=1;n<cu.length;n++){var r=cu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ns!==null&&Ka(Ns,e),As!==null&&Ka(As,e),Os!==null&&Ka(Os,e),zl.forEach(t),Wl.forEach(t),n=0;n<ms.length;n++)r=ms[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ms.length&&(n=ms[0],n.blockedOn===null);)q1(n),n.blockedOn===null&&ms.shift()}var Do=Yr.ReactCurrentBatchConfig,dd=!0;function i2(e,t,n,r){var s=$e,i=Do.transition;Do.transition=null;try{$e=1,mv(e,t,n,r)}finally{$e=s,Do.transition=i}}function o2(e,t,n,r){var s=$e,i=Do.transition;Do.transition=null;try{$e=4,mv(e,t,n,r)}finally{$e=s,Do.transition=i}}function mv(e,t,n,r){if(dd){var s=Yp(e,t,n,r);if(s===null)Ih(e,t,r,fd,n),ex(e,r);else if(r2(s,e,t,n,r))r.stopPropagation();else if(ex(e,r),t&4&&-1<n2.indexOf(e)){for(;s!==null;){var i=Nc(s);if(i!==null&&W1(i),i=Yp(e,t,n,r),i===null&&Ih(e,t,r,fd,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Ih(e,t,r,null,n)}}var fd=null;function Yp(e,t,n,r){if(fd=null,e=dv(r),e=hi(e),e!==null)if(t=Hi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=I1(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 fd=e,null}function Q1(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(GA()){case fv:return 1;case V1:return 4;case cd:case qA:return 16;case U1:return 536870912;default:return 16}default:return 16}}var Ps=null,gv=null,Uu=null;function Y1(){if(Uu)return Uu;var e,t=gv,n=t.length,r,s="value"in Ps?Ps.value:Ps.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 Uu=s.slice(e,1<r?1-r:void 0)}function Bu(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 uu(){return!0}function nx(){return!1}function yn(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 a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?uu:nx,this.isPropagationStopped=nx,this}return et(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=uu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=uu)},persist:function(){},isPersistent:uu}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vv=yn(Ea),Rc=et({},Ea,{view:0,detail:0}),a2=yn(Rc),Th,Ph,Ga,vf=et({},Rc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yv,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!==Ga&&(Ga&&e.type==="mousemove"?(Th=e.screenX-Ga.screenX,Ph=e.screenY-Ga.screenY):Ph=Th=0,Ga=e),Th)},movementY:function(e){return"movementY"in e?e.movementY:Ph}}),rx=yn(vf),l2=et({},vf,{dataTransfer:0}),c2=yn(l2),u2=et({},Rc,{relatedTarget:0}),jh=yn(u2),d2=et({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),f2=yn(d2),h2=et({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),p2=yn(h2),m2=et({},Ea,{data:0}),sx=yn(m2),g2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v2={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"},y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=y2[e])?!!t[e]:!1}function yv(){return x2}var w2=et({},Rc,{key:function(e){if(e.key){var t=g2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?v2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yv,charCode:function(e){return e.type==="keypress"?Bu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),b2=yn(w2),_2=et({},vf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ix=yn(_2),S2=et({},Rc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yv}),C2=yn(S2),E2=et({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),k2=yn(E2),T2=et({},vf,{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}),P2=yn(T2),j2=[9,13,27,32],xv=Ur&&"CompositionEvent"in window,Sl=null;Ur&&"documentMode"in document&&(Sl=document.documentMode);var R2=Ur&&"TextEvent"in window&&!Sl,Z1=Ur&&(!xv||Sl&&8<Sl&&11>=Sl),ox=" ",ax=!1;function X1(e,t){switch(e){case"keyup":return j2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vo=!1;function N2(e,t){switch(e){case"compositionend":return J1(t);case"keypress":return t.which!==32?null:(ax=!0,ox);case"textInput":return e=t.data,e===ox&&ax?null:e;default:return null}}function A2(e,t){if(vo)return e==="compositionend"||!xv&&X1(e,t)?(e=Y1(),Uu=gv=Ps=null,vo=!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 Z1&&t.locale!=="ko"?null:t.data;default:return null}}var O2={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 lx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!O2[e.type]:t==="textarea"}function eS(e,t,n,r){N1(r),t=hd(t,"onChange"),0<t.length&&(n=new vv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cl=null,Kl=null;function M2(e){dS(e,0)}function yf(e){var t=wo(e);if(C1(t))return e}function D2(e,t){if(e==="change")return t}var tS=!1;if(Ur){var Rh;if(Ur){var Nh="oninput"in document;if(!Nh){var cx=document.createElement("div");cx.setAttribute("oninput","return;"),Nh=typeof cx.oninput=="function"}Rh=Nh}else Rh=!1;tS=Rh&&(!document.documentMode||9<document.documentMode)}function ux(){Cl&&(Cl.detachEvent("onpropertychange",nS),Kl=Cl=null)}function nS(e){if(e.propertyName==="value"&&yf(Kl)){var t=[];eS(t,Kl,e,dv(e)),D1(M2,t)}}function I2(e,t,n){e==="focusin"?(ux(),Cl=t,Kl=n,Cl.attachEvent("onpropertychange",nS)):e==="focusout"&&ux()}function L2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yf(Kl)}function F2(e,t){if(e==="click")return yf(t)}function $2(e,t){if(e==="input"||e==="change")return yf(t)}function V2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qn=typeof Object.is=="function"?Object.is:V2;function Gl(e,t){if(qn(e,t))return!0;
vendor: 4,808 bytes, line 37
37if(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(!Ap.call(t,s)||!qn(e[s],t[s]))return!1}return!0}function dx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fx(e,t){var n=dx(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=dx(n)}}function rS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sS(){for(var e=window,t=od();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=od(e.document)}return t}function wv(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 U2(e){var t=sS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&rS(n.ownerDocument.documentElement,n)){if(r!==null&&wv(n)){if(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=fx(n,i);var o=fx(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 B2=Ur&&"documentMode"in document&&11>=document.documentMode,yo=null,Zp=null,El=null,Xp=!1;function hx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xp||yo==null||yo!==od(r)||(r=yo,"selectionStart"in r&&wv(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}),El&&Gl(El,r)||(El=r,r=hd(Zp,"onSelect"),0<r.length&&(t=new vv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yo)))}function du(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xo={animationend:du("Animation","AnimationEnd"),animationiteration:du("Animation","AnimationIteration"),animationstart:du("Animation","AnimationStart"),transitionend:du("Transition","TransitionEnd")},Ah={},iS={};Ur&&(iS=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function xf(e){if(Ah[e])return Ah[e];if(!xo[e])return e;var t=xo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in iS)return Ah[e]=t[n];return e}var oS=xf("animationend"),aS=xf("animationiteration"),lS=xf("animationstart"),cS=xf("transitionend"),uS=new Map,px="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 Ys(e,t){uS.set(e,t),Wi(t,[e])}for(var Oh=0;Oh<px.length;Oh++){var Mh=px[Oh],z2=Mh.toLowerCase(),W2=Mh[0].toUpperCase()+Mh.slice(1);Ys(z2,"on"+W2)}Ys(oS,"onAnimationEnd");Ys(aS,"onAnimationIteration");Ys(lS,"onAnimationStart");Ys("dblclick","onDoubleClick");Ys("focusin","onFocus");Ys("focusout","onBlur");Ys(cS,"onTransitionEnd");sa("onMouseEnter",["mouseout","mouseover"]);sa("onMouseLeave",["mouseout","mouseover"]);sa("onPointerEnter",["pointerout","pointerover"]);sa("onPointerLeave",["pointerout","pointerover"]);Wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37Wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),H2=new Set("cancel close invalid load scroll toggle".split(" ").concat(cl));function mx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,zA(r,t,void 0,e),e.currentTarget=null}function dS(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 a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;mx(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;mx(s,a,c),i=l}}}if(ld)throw e=Gp,ld=!1,Gp=null,e}function Ke(e,t){var n=t[rm];n===void 0&&(n=t[rm]=new Set);var r=e+"__bubble";n.has(r)||(fS(t,e,2,!1),n.add(r))}function Dh(e,t,n){var r=0;t&&(r|=4),fS(n,e,r,t)}var fu="_reactListening"+Math.random().toString(36).slice(2);function ql(e){if(!e[fu]){e[fu]=!0,x1.forEach(function(n){n!=="selectionchange"&&(H2.has(n)||Dh(n,!1,e),Dh(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fu]||(t[fu]=!0,Dh("selectionchange",!1,t))}}function fS(e,t,n,r){switch(Q1(t)){case 1:var s=i2;break;case 4:s=o2;break;default:s=mv}n=s.bind(null,t,n,e),s=void 0,!Kp||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 Ih(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 a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=hi(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}D1(function(){var c=i,u=dv(n),f=[];e:{var h=uS.get(e);if(h!==void 0){var m=vv,y=e;switch(e){case"keypress":if(Bu(n)===0)break e;case"keydown":case"keyup":m=b2;break;case"focusin":y="focus",m=jh;break;case"focusout":y="blur",m=jh;break;case"beforeblur":case"afterblur":m=jh;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":m=rx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=c2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=C2;break;case oS:case aS:case lS:m=f2;break;case cS:m=k2;break;case"scroll":m=a2;break;case"wheel":m=P2;break;case"copy":case"cut":case"paste":m=p2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=ix}var g=(t&4)!==0,w=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var v=c,b;v!==null;){b=v;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,x!==null&&(_=Bl(v,x),_!=null&&g.push(Ql(v,_,b)))),w)break;v=v.return}0<g.length&&(h=new m(h,y,null,n,u),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==Wp&&(y=n.relatedTarget||n.fromElement)&&(hi(y)||y[Br]))break e;if((m||h)&&(h=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,m?(y=n.relatedTarget||n.toElement,m=c,y=y?hi(y):null,y!==null&&(w=Hi(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(m=null,y=c),m!==y)){if(g=rx,_="onMouseLeave",x="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(g=ix,_="onPointerLeave",x="onPointerEnter",v="pointer"),w=m==null?h:wo(m),b=y==null?h:wo(y),h=new g(_,v+"leave",m,n,u),h.target=w,h.relatedTarget=b,_=null,hi(u)===c&&(g=new g(x,v+"enter",y,n,u),g.target=b,g.relatedTarget=w,_=g),w=_,m&&y)t:{for(g=m,x=y,v=0,b=g;b;b=to(b))v++;for(b=0,_=x;_;_=to(_))b++;for(;0<v-b;)g=to(g),v--;for(;0<b-v;)x=to(x),b--;for(;v--;){if(g===x||x!==null&&g===x.alternate)break t;g=to(g),x=to(x)}g=null}else g=null;m!==null&&gx(f,h,m,g,!1),y!==null&&w!==null&&gx(f,w,y,g,!0)}}
vendor: 7,582 bytes, lines 37-38
37e:{if(h=c?wo(c):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var S=D2;else if(lx(h))if(tS)S=$2;else{S=L2;var P=I2}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=F2);if(S&&(S=S(e,c))){eS(f,S,n,u);break e}P&&P(e,h,c),e==="focusout"&&(P=h._wrapperState)&&P.controlled&&h.type==="number"&&$p(h,"number",h.value)}switch(P=c?wo(c):window,e){case"focusin":(lx(P)||P.contentEditable==="true")&&(yo=P,Zp=c,El=null);break;case"focusout":El=Zp=yo=null;break;case"mousedown":Xp=!0;break;case"contextmenu":case"mouseup":case"dragend":Xp=!1,hx(f,n,u);break;case"selectionchange":if(B2)break;case"keydown":case"keyup":hx(f,n,u)}var T;if(xv)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else vo?X1(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Z1&&n.locale!=="ko"&&(vo||C!=="onCompositionStart"?C==="onCompositionEnd"&&vo&&(T=Y1()):(Ps=u,gv="value"in Ps?Ps.value:Ps.textContent,vo=!0)),P=hd(c,C),0<P.length&&(C=new sx(C,e,null,n,u),f.push({event:C,listeners:P}),T?C.data=T:(T=J1(n),T!==null&&(C.data=T)))),(T=R2?N2(e,n):A2(e,n))&&(c=hd(c,"onBeforeInput"),0<c.length&&(u=new sx("onBeforeInput","beforeinput",null,n,u),f.push({event:u,listeners:c}),u.data=T))}dS(f,t)})}function Ql(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hd(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Bl(e,n),i!=null&&r.unshift(Ql(e,i,s)),i=Bl(e,t),i!=null&&r.push(Ql(e,i,s))),e=e.return}return r}function to(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function gx(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Bl(n,i),l!=null&&o.unshift(Ql(n,l,a))):s||(l=Bl(n,i),l!=null&&o.push(Ql(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var K2=/\r\n?/g,G2=/\u0000|\uFFFD/g;function vx(e){return(typeof e=="string"?e:""+e).replace(K2,` 38`).replace(G2,"")}function hu(e,t,n){if(t=vx(t),vx(e)!==t&&n)throw Error(B(425))}function pd(){}var Jp=null,em=null;function tm(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 nm=typeof setTimeout=="function"?setTimeout:void 0,q2=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,Q2=typeof queueMicrotask=="function"?queueMicrotask:typeof yx<"u"?function(e){return yx.resolve(null).then(e).catch(Y2)}:nm;function Y2(e){setTimeout(function(){throw e})}function Lh(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),Hl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Hl(t)}function Ms(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 xx(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 ka=Math.random().toString(36).slice(2),dr="__reactFiber$"+ka,Yl="__reactProps$"+ka,Br="__reactContainer$"+ka,rm="__reactEvents$"+ka,Z2="__reactListeners$"+ka,X2="__reactHandles$"+ka;function hi(e){var t=e[dr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Br]||n[dr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xx(e);e!==null;){if(n=e[dr])return n;e=xx(e)}return t}e=n,n=e.parentNode}return null}function Nc(e){return e=e[dr]||e[Br],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function wo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function wf(e){return e[Yl]||null}var sm=[],bo=-1;function Zs(e){return{current:e}}function Ge(e){0>bo||(e.current=sm[bo],sm[bo]=null,bo--)}function Be(e,t){bo++,sm[bo]=e.current,e.current=t}var Us={},Dt=Zs(Us),en=Zs(!1),Ai=Us;function ia(e,t){var n=e.type.contextTypes;if(!n)return Us;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 tn(e){return e=e.childContextTypes,e!=null}function md(){Ge(en),Ge(Dt)}function wx(e,t,n){if(Dt.current!==Us)throw Error(B(168));Be(Dt,t),Be(en,n)}function hS(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(B(108,IA(e)||"Unknown",s));return et({},n,r)}function gd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Us,Ai=Dt.current,Be(Dt,e),Be(en,en.current),!0}function bx(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=hS(e,t,Ai),r.__reactInternalMemoizedMergedChildContext=e,Ge(en),Ge(Dt),Be(Dt,e)):Ge(en),Be(en,n)}var Rr=null,bf=!1,Fh=!1;function pS(e){Rr===null?Rr=[e]:Rr.push(e)}function J2(e){bf=!0,pS(e)}function Xs(){if(!Fh&&Rr!==null){Fh=!0;var e=0,t=$e;try{var n=Rr;for($e=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Rr=null,bf=!1}catch(s){throw Rr!==null&&(Rr=Rr.slice(e+1)),$1(fv,Xs),s}finally{$e=t,Fh=!1}}return null}var _o=[],So=0,vd=null,yd=0,Cn=[],En=0,Oi=null,Ar=1,Or="";function ii(e,t){_o[So++]=yd,_o[So++]=vd,vd=e,yd=t}function mS(e,t,n){Cn[En++]=Ar,Cn[En++]=Or,Cn[En++]=Oi,Oi=e;var r=Ar;e=Or;var s=32-Hn(r)-1;r&=~(1<<s),n+=1;var i=32-Hn(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Ar=1<<32-Hn(t)+s|n<<s|r,Or=i+e}else Ar=1<<i|n<<s|r,Or=e}function bv(e){e.return!==null&&(ii(e,1),mS(e,1,0))}function _v(e){for(;e===vd;)vd=_o[--So],_o[So]=null,yd=_o[--So],_o[So]=null;for(;e===Oi;)Oi=Cn[--En],Cn[En]=null,Or=Cn[--En],Cn[En]=null,Ar=Cn[--En],Cn[En]=null}var hn=null,fn=null,Qe=!1,Un=null;function gS(e,t){var n=kn(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 _x(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,hn=e,fn=Ms(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,fn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Oi!==null?{id:Ar,overflow:Or}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=kn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,fn=null,!0):!1;default:return!1}}function im(e){return(e.mode&1)!==0&&(e.flags&128)===0}function om(e){if(Qe){var t=fn;if(t){var n=t;if(!_x(e,t)){if(im(e))throw Error(B(418));t=Ms(n.nextSibling);var r=hn;t&&_x(e,t)?gS(r,n):(e.flags=e.flags&-4097|2,Qe=!1,hn=e)}}else{if(im(e))throw Error(B(418));e.flags=e.flags&-4097|2,Qe=!1,hn=e}}}function Sx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function pu(e){if(e!==hn)return!1;if(!Qe)return Sx(e),Qe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!tm(e.type,e.memoizedProps)),t&&(t=fn)){if(im(e))throw vS(),Error(B(418));for(;t;)gS(e,t),t=Ms(t.nextSibling)}if(Sx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317)
vendor: 14,247 bytes, line 38
38);e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){fn=Ms(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}fn=null}}else fn=hn?Ms(e.stateNode.nextSibling):null;return!0}function vS(){for(var e=fn;e;)e=Ms(e.nextSibling)}function oa(){fn=hn=null,Qe=!1}function Sv(e){Un===null?Un=[e]:Un.push(e)}var eO=Yr.ReactCurrentBatchConfig;function qa(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(B(309));var r=n.stateNode}if(!r)throw Error(B(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 a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function mu(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cx(e){var t=e._init;return t(e._payload)}function yS(e){function t(x,v){if(e){var b=x.deletions;b===null?(x.deletions=[v],x.flags|=16):b.push(v)}}function n(x,v){if(!e)return null;for(;v!==null;)t(x,v),v=v.sibling;return null}function r(x,v){for(x=new Map;v!==null;)v.key!==null?x.set(v.key,v):x.set(v.index,v),v=v.sibling;return x}function s(x,v){return x=Fs(x,v),x.index=0,x.sibling=null,x}function i(x,v,b){return x.index=b,e?(b=x.alternate,b!==null?(b=b.index,b<v?(x.flags|=2,v):b):(x.flags|=2,v)):(x.flags|=1048576,v)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function a(x,v,b,_){return v===null||v.tag!==6?(v=Hh(b,x.mode,_),v.return=x,v):(v=s(v,b),v.return=x,v)}function l(x,v,b,_){var S=b.type;return S===go?u(x,v,b.props.children,_,b.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ds&&Cx(S)===v.type)?(_=s(v,b.props),_.ref=qa(x,v,b),_.return=x,_):(_=Qu(b.type,b.key,b.props,null,x.mode,_),_.ref=qa(x,v,b),_.return=x,_)}function c(x,v,b,_){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Kh(b,x.mode,_),v.return=x,v):(v=s(v,b.children||[]),v.return=x,v)}function u(x,v,b,_,S){return v===null||v.tag!==7?(v=ki(b,x.mode,_,S),v.return=x,v):(v=s(v,b),v.return=x,v)}function f(x,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Hh(""+v,x.mode,b),v.return=x,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case su:return b=Qu(v.type,v.key,v.props,null,x.mode,b),b.ref=qa(x,null,v),b.return=x,b;case mo:return v=Kh(v,x.mode,b),v.return=x,v;case ds:var _=v._init;return f(x,_(v._payload),b)}if(al(v)||za(v))return v=ki(v,x.mode,b,null),v.return=x,v;mu(x,v)}return null}function h(x,v,b,_){var S=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:a(x,v,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case su:return b.key===S?l(x,v,b,_):null;case mo:return b.key===S?c(x,v,b,_):null;case ds:return S=b._init,h(x,v,S(b._payload),_)}if(al(b)||za(b))return S!==null?null:u(x,v,b,_,null);mu(x,b)}return null}function m(x,v,b,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return x=x.get(b)||null,a(v,x,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case su:return x=x.get(_.key===null?b:_.key)||null,l(v,x,_,S);case mo:return x=x.get(_.key===null?b:_.key)||null,c(v,x,_,S);case ds:var P=_._init;return m(x,v,b,P(_._payload),S)}if(al(_)||za(_))return x=x.get(b)||null,u(v,x,_,S,null);mu(v,_)}return null}function y(x,v,b,_){for(var S=null,P=null,T=v,C=v=0,M=null;T!==null&&C<b.length;C++){T.index>C?(M=T,T=null):M=T.sibling;var I=h(x,T,b[C],_);if(I===null){T===null&&(T=M);break}e&&T&&I.alternate===null&&t(x,T),v=i(I,v,C),P===null?S=I:P.sibling=I,P=I,T=M}if(C===b.length)return n(x,T),Qe&&ii(x,C),S;if(T===null){for(;C<b.length;C++)T=f(x,b[C],_),T!==null&&(v=i(T,v,C),P===null?S=T:P.sibling=T,P=T);return Qe&&ii(x,C),S}for(T=r(x,T);C<b.length;C++)M=m(T,x,C,b[C],_),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?C:M.key),v=i(M,v,C),P===null?S=M:P.sibling=M,P=M);return e&&T.forEach(function(R){return t(x,R)}),Qe&&ii(x,C),S}function g(x,v,b,_){var S=za(b);if(typeof S!="function")throw Error(B(150));if(b=S.call(b),b==null)throw Error(B(151));for(var P=S=null,T=v,C=v=0,M=null,I=b.next();T!==null&&!I.done;C++,I=b.next()){T.index>C?(M=T,T=null):M=T.sibling;var R=h(x,T,I.value,_);if(R===null){T===null&&(T=M);break}e&&T&&R.alternate===null&&t(x,T),v=i(R,v,C),P===null?S=R:P.sibling=R,P=R,T=M}if(I.done)return n(x,T),Qe&&ii(x,C),S;if(T===null){for(;!I.done;C++,I=b.next())I=f(x,I.value,_),I!==null&&(v=i(I,v,C),P===null?S=I:P.sibling=I,P=I);return Qe&&ii(x,C),S}for(T=r(x,T);!I.done;C++,I=b.next())I=m(T,x,C,I.value,_),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?C:I.key),v=i(I,v,C),P===null?S=I:P.sibling=I,P=I);return e&&T.forEach(function(A){return t(x,A)}),Qe&&ii(x,C),S}function w(x,v,b,_){if(typeof b=="object"&&b!==null&&b.type===go&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case su:e:{for(var S=b.key,P=v;P!==null;){if(P.key===S){if(S=b.type,S===go){if(P.tag===7){n(x,P.sibling),v=s(P,b.props.children),v.return=x,x=v;break e}}else if(P.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ds&&Cx(S)===P.type){n(x,P.sibling),v=s(P,b.props),v.ref=qa(x,P,b),v.return=x,x=v;break e}n(x,P);break}else t(x,P);P=P.sibling}b.type===go?(v=ki(b.props.children,x.mode,_,b.key),v.return=x,x=v):(_=Qu(b.type,b.key,b.props,null,x.mode,_),_.ref=qa(x,v,b),_.return=x,x=_)}return o(x);case mo:e:{for(P=b.key;v!==null;){if(v.key===P)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(x,v.sibling),v=s(v,b.children||[]),v.return=x,x=v;break e}else{n(x,v);break}else t(x,v);v=v.sibling}v=Kh(b,x.mode,_),v.return=x,x=v}return o(x);case ds:return P=b._init,w(x,v,P(b._payload),_)}if(al(b))return y(x,v,b,_);if(za(b))return g(x,v,b,_);mu(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(x,v.sibling),v=s(v,b),v.return=x,x=v):(n(x,v),v=Hh(b,x.mode,_),v.return=x,x=v),o(x)):n(x,v)}return w}var aa=yS(!0),xS=yS(!1),xd=Zs(null),wd=null,Co=null,Cv=null;function Ev(){Cv=Co=wd=null}function kv(e){var t=xd.current;Ge(xd),e._currentValue=t}function am(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 Io(e,t){wd=e,Cv=Co=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function Nn(e){var t=e._currentValue;if(Cv!==e)if(e={context:e,memoizedValue:t,next:null},Co===null){if(wd===null)throw Error(B(308));Co=e,wd.dependencies={lanes:0,firstContext:e}}else Co=Co.next=e;return t}var pi=null;function Tv(e){pi===null?pi=[e]:pi.push(e)}function wS(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Tv(t)):(n.next=s.next,s.next=n),t.interleaved=n,zr(e,r)}function zr(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 fs=!1;function Pv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bS(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 Ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ds(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,zr(e,n)}return s=r.interleaved,s===null?(t.next=t,Tv(r)):(t.next=s.next,s.next=t),r.interleaved=t,zr(e,n)}function zu(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,hv(e,n)}}function Ex(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 bd(e,t,n,r){var s=e.updateQueue;fs=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,u=c=l=null,a=i;do{var h=a.lane,m=a.eventTime;if((r&h)===h){u!==null&&(u=u.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=e,g=a;switch(h=t,m=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){f=y.call(m,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,h=typeof y=="function"?y.call(m,f,h):y,h==null)break e;f=et({},f,h);break e;case 2:fs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else m={eventTime:m,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(u===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,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);Di|=o,e.lanes=o,e.memoizedState=f}}function kx(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(B(191,s));s.call(r)}}}var Ac={},mr=Zs(Ac),Zl=Zs(Ac),Xl=Zs(Ac);function mi(e){if(e===Ac)throw Error(B(174));return e}function jv(e,t){switch(Be(Xl,t),Be(Zl,e),Be(mr,Ac),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Up(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Up(t,e)}Ge(mr),Be(mr,t)}function la(){Ge(mr),Ge(Zl),Ge(Xl)}function _S(e){mi(Xl.current);var t=mi(mr.current),n=Up(t,e.type);t!==n&&(Be(Zl,e),Be(mr,n))}function Rv(e){Zl.current===e&&(Ge(mr),Ge(Zl))}var Ze=Zs(0);function _d(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 $h=[];function Nv(){for(var e=0;e<$h.length;e++)$h[e]._workInProgressVersionPrimary=null;$h.length=0}var Wu=Yr.ReactCurrentDispatcher,Vh=Yr.ReactCurrentBatchConfig,Mi=0,Je=null,ht=null,yt=null,Sd=!1,kl=!1,Jl=0,tO=0;function jt(){throw Error(B(321))}function Av(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!qn(e[n],t[n]))return!1;return!0}function Ov(e,t,n,r,s,i){if(Mi=i,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Wu.current=e===null||e.memoizedState===null?iO:oO,e=n(r,s),kl){i=0;do{if(kl=!1,Jl=0,25<=i)throw Error(B(301));i+=1,yt=ht=null,t.updateQueue=null,Wu.current=aO,e=n(r,s)}while(kl)}if(Wu.current=Cd,t=ht!==null&&ht.next!==null,Mi=0,yt=ht=Je=null,Sd=!1,t)throw Error(B(300));return e}function Mv(){var e=Jl!==0;return Jl=0,e}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?Je.memoizedState=yt=e:yt=yt.next=e,yt}function An(){if(ht===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=ht.next;var t=yt===null?Je.memoizedState:yt.next;if(t!==null)yt=t,ht=e;else{if(e===null)throw Error(B(310));ht=e,e={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},yt===null?Je.memoizedState=yt=e:yt=yt.next=e}return yt}function ec(e,t){return typeof t=="function"?t(e):t}function Uh(e){var t=An(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=ht,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 a=o=null,l=null,c=i;do{var u=c.lane;if((Mi&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,Je.lanes|=u,Di|=u}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,qn(r,t.memoizedState)||(Jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Je.lanes|=i,Di|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bh(e){var t=An(),n=t.queue;if(n===null)throw Error(B(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);qn(i,t.memoizedState)||(Jt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function SS(){}function CS(e,t){var n=Je,r=An(),s=t(),i=!qn(r.memoizedState,s);if(i&&(r.memoizedState=s,Jt=!0),r=r.queue,Dv(TS.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||yt!==null&&yt.memoizedState.tag&1){if(n.flags|=2048,tc(9,kS.bind(null,n,r,s,t),void 0,null),wt===null)throw Error(B(349));Mi&30||ES(n,t,s)}return s}function ES(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kS(e,t,n,r){t.value=n,t.getSnapshot=r,PS(t)&&jS(e)}
vendor: 4,969 bytes, line 38
38function TS(e,t,n){return n(function(){PS(t)&&jS(e)})}function PS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!qn(e,n)}catch{return!0}}function jS(e){var t=zr(e,1);t!==null&&Kn(t,e,1,-1)}function Tx(e){var t=or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ec,lastRenderedState:e},t.queue=e,e=e.dispatch=sO.bind(null,Je,e),[t.memoizedState,e]}function tc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Je.updateQueue,t===null?(t={lastEffect:null,stores:null},Je.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 RS(){return An().memoizedState}function Hu(e,t,n,r){var s=or();Je.flags|=e,s.memoizedState=tc(1|t,n,void 0,r===void 0?null:r)}function _f(e,t,n,r){var s=An();r=r===void 0?null:r;var i=void 0;if(ht!==null){var o=ht.memoizedState;if(i=o.destroy,r!==null&&Av(r,o.deps)){s.memoizedState=tc(t,n,i,r);return}}Je.flags|=e,s.memoizedState=tc(1|t,n,i,r)}function Px(e,t){return Hu(8390656,8,e,t)}function Dv(e,t){return _f(2048,8,e,t)}function NS(e,t){return _f(4,2,e,t)}function AS(e,t){return _f(4,4,e,t)}function OS(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 MS(e,t,n){return n=n!=null?n.concat([e]):null,_f(4,4,OS.bind(null,t,e),n)}function Iv(){}function DS(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Av(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function IS(e,t){var n=An();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Av(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function LS(e,t,n){return Mi&21?(qn(n,t)||(n=B1(),Je.lanes|=n,Di|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=n)}function nO(e,t){var n=$e;$e=n!==0&&4>n?n:4,e(!0);var r=Vh.transition;Vh.transition={};try{e(!1),t()}finally{$e=n,Vh.transition=r}}function FS(){return An().memoizedState}function rO(e,t,n){var r=Ls(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$S(e))VS(t,n);else if(n=wS(e,t,n,r),n!==null){var s=Ut();Kn(n,e,r,s),US(n,t,r)}}function sO(e,t,n){var r=Ls(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($S(e))VS(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,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,qn(a,o)){var l=t.interleaved;l===null?(s.next=s,Tv(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=wS(e,t,s,r),n!==null&&(s=Ut(),Kn(n,e,r,s),US(n,t,r))}}function $S(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function VS(e,t){kl=Sd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function US(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hv(e,n)}}var Cd={readContext:Nn,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useInsertionEffect:jt,useLayoutEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useMutableSource:jt,useSyncExternalStore:jt,useId:jt,unstable_isNewReconciler:!1},iO={readContext:Nn,useCallback:function(e,t){return or().memoizedState=[e,t===void 0?null:t],e},useContext:Nn,useEffect:Px,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Hu(4194308,4,OS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Hu(4,2,e,t)},useMemo:function(e,t){var n=or();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=or();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=rO.bind(null,Je,e),[r.memoizedState,e]},useRef:function(e){var t=or();return e={current:e},t.memoizedState=e},useState:Tx,useDebugValue:Iv,useDeferredValue:function(e){return or().memoizedState=e},useTransition:function(){var e=Tx(!1),t=e[0];return e=nO.bind(null,e[1]),or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Je,s=or();if(Qe){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),wt===null)throw Error(B(349));Mi&30||ES(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Px(TS.bind(null,r,i,e),[e]),r.flags|=2048,tc(9,kS.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=or(),t=wt.identifierPrefix;if(Qe){var n=Or,r=Ar;n=(r&~(1<<32-Hn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=tO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},oO={readContext:Nn,useCallback:DS,useContext:Nn,useEffect:Dv,useImperativeHandle:MS,useInsertionEffect:NS,useLayoutEffect:AS,useMemo:IS,useReducer:Uh,useRef
vendor: 4,528 bytes, lines 38-40
38:RS,useState:function(){return Uh(ec)},useDebugValue:Iv,useDeferredValue:function(e){var t=An();return LS(t,ht.memoizedState,e)},useTransition:function(){var e=Uh(ec)[0],t=An().memoizedState;return[e,t]},useMutableSource:SS,useSyncExternalStore:CS,useId:FS,unstable_isNewReconciler:!1},aO={readContext:Nn,useCallback:DS,useContext:Nn,useEffect:Dv,useImperativeHandle:MS,useInsertionEffect:NS,useLayoutEffect:AS,useMemo:IS,useReducer:Bh,useRef:RS,useState:function(){return Bh(ec)},useDebugValue:Iv,useDeferredValue:function(e){var t=An();return ht===null?t.memoizedState=e:LS(t,ht.memoizedState,e)},useTransition:function(){var e=Bh(ec)[0],t=An().memoizedState;return[e,t]},useMutableSource:SS,useSyncExternalStore:CS,useId:FS,unstable_isNewReconciler:!1};function Ln(e,t){if(e&&e.defaultProps){t=et({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function lm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:et({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sf={isMounted:function(e){return(e=e._reactInternals)?Hi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),s=Ls(e),i=Ir(r,s);i.payload=t,n!=null&&(i.callback=n),t=Ds(e,i,s),t!==null&&(Kn(t,e,s,r),zu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),s=Ls(e),i=Ir(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ds(e,i,s),t!==null&&(Kn(t,e,s,r),zu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Ls(e),s=Ir(n,r);s.tag=2,t!=null&&(s.callback=t),t=Ds(e,s,r),t!==null&&(Kn(t,e,r,n),zu(t,e,r))}};function jx(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?!Gl(n,r)||!Gl(s,i):!0}function BS(e,t,n){var r=!1,s=Us,i=t.contextType;return typeof i=="object"&&i!==null?i=Nn(i):(s=tn(t)?Ai:Dt.current,r=t.contextTypes,i=(r=r!=null)?ia(e,s):Us),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Rx(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&&Sf.enqueueReplaceState(t,t.state,null)}function cm(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Pv(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Nn(i):(i=tn(t)?Ai:Dt.current,s.context=ia(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(lm(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&&Sf.enqueueReplaceState(s,s.state,null),bd(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ca(e,t){try{var n="",r=t;do n+=DA(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 zh(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function um(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var lO=typeof WeakMap=="function"?WeakMap:Map;function zS(e,t,n){n=Ir(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){kd||(kd=!0,wm=r),um(e,t)},n}function WS(e,t,n){n=Ir(-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(){um(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){um(e,t),typeof r!="function"&&(Is===null?Is=new Set([this]):Is.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Nx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new lO;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=_O.bind(null,e,t,n),t.then(e,e))}function Ax(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 Ox(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=Ir(-1,1),t.tag=2,Ds(n,t,1))),n.lanes|=1),e)}var cO=Yr.ReactCurrentOwner,Jt=!1;function Ft(e,t,n,r){t.child=e===null?xS(t,null,n,r):aa(t,e.child,n,r)}function Mx(e,t,n,r,s){n=n.render;var i=t.ref;return Io(t,s),r=Ov(e,t,n,r,i,s),n=Mv(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wr(e,t,s)):(Qe&&n&&bv(t),t.flags|=1,Ft(e,t,r,s),t.child)}function Dx(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Wv(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,HS(e,t,i,r,s)):(e=Qu(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:Gl,n(o,r)&&e.ref===t.ref)return Wr(e,t,s)}return t.flags|=1,e=Fs(i,r),e.ref=t.ref,e.return=t,t.child=e}function HS(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Gl(i,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,Wr(e,t,s)}return dm(e,t,n,r,s)}function KS(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},Be(ko,un),un|=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,Be(ko,un),un|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Be(ko,un),un|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Be(ko,un),un|=r;return Ft(e,t,s,n),t.child}function GS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function dm(e,t,n,r,s){var i=tn(n)?Ai:Dt.current;return i=ia(t,i),Io(t,s),n=Ov(e,t,n,r,i,s),r=Mv(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wr(e,t,s)):(Qe&&r&&bv(t),t.flags|=1,Ft(e,t,n,s),t.child)}function Ix(e,t,n,r,s){if(tn(n)){var i=!0;gd(t)}else i=!1;if(Io(t,s),t.stateNode===null)Ku(e,t),BS(t,n,r),cm(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Nn(c):(c=tn(n)?Ai:Dt.current,c=ia(t,c));var u=n.getDerivedStateFromProps,f=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&Rx(t,o,r,c),fs=!1;var h=t.memoizedState;o.state=h,bd(t,r,o,s),l=t.memoizedState,a!==r||h!==l||en.current||fs?(typeof u=="function"&&(lm(t,n,u,r),l=t.memoizedState),(a=fs||jx(t,n,a,r,h,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,bS(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Ln(t.type,a),o.props=c,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Nn(l):(l=tn(n)?Ai:Dt.current,l=ia(t,l));var m=n.getDerivedStateFromProps;(u=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&Rx(t,o,r,l),fs=!1,h=t.memoizedState,o.state=h,bd(t,r,o,s);var y=t.memoizedState;a!==f||h!==y||en.current||fs?(typeof m=="function"&&(lm(t,n,m,r),y=t.memoizedState),(c=fs||jx(t,n,c,r,h,y,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,y,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=y),o.props=r,o.state=y,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return fm(e,t,n,r,i,s)}function fm(e,t,n,r,s,i){GS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&bx(t,n,!1),Wr(e,t,i);r=t.stateNode,cO.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=aa(t,e.child,null,i),t.child=aa(t,null,a,i)):Ft(e,t,a,i),t.memoizedState=r.state,s&&bx(t,n,!0),t.child}function qS(e){var t=e.stateNode;t.pendingContext?wx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&wx(e,t.context,!1),jv(e,t.containerInfo)}function Lx(e,t,n,r,s){return oa(),Sv(s),t.flags|=256,Ft(e,t,n,r),t.child}var hm={dehydrated:null,treeContext:null,retryLane:0};function pm(e){return{baseLanes:e,cachePool:null,transitions:null}}function QS(e,t,n){var r=t.pendingProps,s=Ze.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Be(Ze,s&1),e===null)return om(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=kf(o,r,0,null),e=ki(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=pm(n),t.memoizedState=hm,e):Lv(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return uO(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Fs(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Fs(a,i):(i=ki(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?pm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=hm,r}return i=e.child,e=i.sibling,r=Fs(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 Lv(e,t){return t=kf({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function gu(e,t,n,r){return r!==null&&Sv(r),aa(t,e.child,null,n),e=Lv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uO(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=zh(Error(B(422))),gu(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=kf({mode:"visible",children:r.children},s,0,null),i=ki(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&aa(t,e.child,null,o),t.child.memoizedState=pm(o),t.memoizedState=hm,i);if(!(t.mode&1))return gu(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(B(419)),r=zh(i,r,void 0),gu(e,t,o,r)}if(a=(o&e.childLanes)!==0,Jt||a){if(r=wt,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,zr(e,s),Kn(r,e,s,-1))}return zv(),r=zh(Error(B(421))),gu(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=SO.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,fn=Ms(s.nextSibling),hn=t,Qe=!0,Un=null,e!==null&&(Cn[En++]=Ar,Cn[En++]=Or,Cn[En++]=Oi,Ar=e.id,Or=e.overflow,Oi=t),t=Lv(t,r.children),t.flags|=4096,t)}function Fx(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),am(e.return,t,n)}function Wh(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 YS(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ft(e,t,r.children,n),r=Ze.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&&Fx(e,n,t);else if(e.tag===19)Fx(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(Be(Ze,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&&_d(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Wh(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&&_d(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Wh(t,!0,n,null,i);break;case"together":Wh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ku(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Di|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=Fs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function dO(e,t,n){switch(t.tag){case 3:qS(t),oa();break;case 5:_S(t);break;case 1:tn(t.type)&&gd(t);break;case 4:jv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Be(xd,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Be(Ze,Ze.current&1),t.flags|=128,null):n&t.child.childLanes?QS(e,t,n):(Be(Ze,Ze.current&1),e=Wr(e,t,n),e!==null?e.sibling:null);Be(Ze,Ze.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return YS(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),Be(Ze,Ze.current),r)break;return null;case 22:case 23:return t.lanes=0,KS(e,t,n)}return Wr(e,t,n)}var ZS,mm,XS,JS;ZS=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}};mm=function(){};XS=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,mi(mr.current);var i=null;switch(n){case"input":s=Lp(e,s),r=Lp(e,r),i=[];break;case"select":s=et({},s,{value:void 0}),r=et({},r,{value:void 0}),i=[];break;case"textarea":s=Vp(e,s),r=Vp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=pd)}Bp(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Vl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Vl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ke("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};JS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qa(e,t){if(!Qe)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 Rt(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 fO(e,t,n){var r=t.pendingProps;switch(_v(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(t),null;case 1:return tn(t.type)&&md(),Rt(t),null;case 3:return r=t.stateNode,la(),Ge(en),Ge(Dt),Nv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(pu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Un!==null&&(Sm(Un),Un=null))),mm(e,t),Rt(t),null;case 5:Rv(t);var s=mi(Xl.current);if(n=t.type,e!==null&&t.stateNode!=null)XS(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return Rt(t),null}if(e=mi(mr.current),pu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[dr]=t,r[Yl]=i,e=(t.mode&1)!==0,n){case"dialog":Ke("cancel",r),Ke("close",r);break;case"iframe":case"object":case"embed":Ke("load",r);break;case"video":case"audio":for(s=0;s<cl.length;s++)Ke(cl[s],r);break;case"source":Ke("error",r);break;case"img":case"image":case"link":Ke("error",r),Ke("load",r);break;case"details":Ke("toggle",r);break;case"input":G0(r,i),Ke("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ke("invalid",r);break;case"textarea":Q0(r,i),Ke("invalid",r)}Bp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&hu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&hu(r.textContent,a,e),s=["children",""+a]):Vl.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ke("scroll",r)}switch(n){case"input":iu(r),q0(r,i,!0);break;case"textarea":iu(r),Y0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=pd)}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=T1(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[dr]=t,e[Yl]=r,ZS(e,t,!1,!1),t.stateNode=e;e:{switch(o=zp(n,r),n){case"dialog":Ke("cancel",e),Ke("close",e),s=r;break;case"iframe":case"object":case"embed":Ke("load",e),s=r;break;case"video":case"audio":for(s=0;s<cl.length;s++)Ke(cl[s],e);s=r;break;case"source":Ke("error",e),s=r;break;case"img":case"image":case"link":Ke("error",e),Ke("load",e),s=r;break;case"details":Ke("toggle",e),s=r;break;case"input":G0(e,r),s=Lp(e,r),Ke("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=et({},r,{value:void 0}),Ke("invalid",e);break;case"textarea":Q0(e,r),s=Vp(e,r),Ke("invalid",e);break;default:s=r}Bp(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?R1(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&P1(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ul(e,l):typeof l=="number"&&Ul(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Vl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ke("scroll",e):l!=null&&av(e,i,l,o))}switch(n){case"input":iu(e),q0(e,r,!1);break;case"textarea":iu(e),Y0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vs(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Ao(e,!!r.multiple,i,!1):r.defaultValue!=null&&Ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=pd)}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 Rt(t),null;case 6:if(e&&t.stateNode!=null)JS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=mi(Xl.current),mi(mr.current),pu(t)){if(r=t.stateNode,n=t.memoizedProps,r[dr]=t,(i=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:hu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[dr]=t,t.stateNode=r}return Rt(t),null;case 13:if(Ge(Ze),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Qe&&fn!==null&&t.mode&1&&!(t.flags&128))vS(),oa(),t.flags|=98560,i=!1;else if(i=pu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(B(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(B(317)
vendor: 25,600 bytes, line 40
40);i[dr]=t}else oa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rt(t),i=!1}else Un!==null&&(Sm(Un),Un=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||Ze.current&1?mt===0&&(mt=3):zv())),t.updateQueue!==null&&(t.flags|=4),Rt(t),null);case 4:return la(),mm(e,t),e===null&&ql(t.stateNode.containerInfo),Rt(t),null;case 10:return kv(t.type._context),Rt(t),null;case 17:return tn(t.type)&&md(),Rt(t),null;case 19:if(Ge(Ze),i=t.memoizedState,i===null)return Rt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Qa(i,!1);else{if(mt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=_d(e),o!==null){for(t.flags|=128,Qa(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 Be(Ze,Ze.current&1|2),t.child}e=e.sibling}i.tail!==null&<()>ua&&(t.flags|=128,r=!0,Qa(i,!1),t.lanes=4194304)}else{if(!r)if(e=_d(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Qe)return Rt(t),null}else 2*lt()-i.renderingStartTime>ua&&n!==1073741824&&(t.flags|=128,r=!0,Qa(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=lt(),t.sibling=null,n=Ze.current,Be(Ze,r?n&1|2:n&1),t):(Rt(t),null);case 22:case 23:return Bv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?un&1073741824&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function hO(e,t){switch(_v(t),t.tag){case 1:return tn(t.type)&&md(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(),Ge(en),Ge(Dt),Nv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rv(t),null;case 13:if(Ge(Ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));oa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Ze),null;case 4:return la(),null;case 10:return kv(t.type._context),null;case 22:case 23:return Bv(),null;case 24:return null;default:return null}}var vu=!1,Ot=!1,pO=typeof WeakSet=="function"?WeakSet:Set,re=null;function Eo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){it(e,t,r)}else n.current=null}function gm(e,t,n){try{n()}catch(r){it(e,t,r)}}var $x=!1;function mO(e,t){if(Jp=dd,e=sS(),wv(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,a=-1,l=-1,c=0,u=0,f=e,h=null;t:for(;;){for(var m;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)h=f,f=m;for(;;){if(f===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++u===r&&(l=o),(m=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=m}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(em={focusedElem:e,selectionRange:n},dd=!1,re=t;re!==null;)if(t=re,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,re=e;else for(;re!==null;){t=re;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,x=t.stateNode,v=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ln(t.type,g),w);x.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(_){it(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,re=e;break}re=t.return}return y=$x,$x=!1,y}function Tl(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&&gm(t,n,i)}s=s.next}while(s!==r)}}function Cf(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 vm(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 eC(e){var t=e.alternate;t!==null&&(e.alternate=null,eC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[Yl],delete t[rm],delete t[Z2],delete t[X2])),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 tC(e){return e.tag===5||e.tag===3||e.tag===4}function Vx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tC(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 ym(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=pd));else if(r!==4&&(e=e.child,e!==null))for(ym(e,t,n),e=e.sibling;e!==null;)ym(e,t,n),e=e.sibling}function xm(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(xm(e,t,n),e=e.sibling;e!==null;)xm(e,t,n),e=e.sibling}var _t=null,$n=!1;function ns(e,t,n){for(n=n.child;n!==null;)nC(e,t,n),n=n.sibling}function nC(e,t,n){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(gf,n)}catch{}switch(n.tag){case 5:Ot||Eo(n,t);case 6:var r=_t,s=$n;_t=null,ns(e,t,n),_t=r,$n=s,_t!==null&&($n?(e=_t,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_t.removeChild(n.stateNode));break;case 18:_t!==null&&($n?(e=_t,n=n.stateNode,e.nodeType===8?Lh(e.parentNode,n):e.nodeType===1&&Lh(e,n),Hl(e)):Lh(_t,n.stateNode));break;case 4:r=_t,s=$n,_t=n.stateNode.containerInfo,$n=!0,ns(e,t,n),_t=r,$n=s;break;case 0:case 11:case 14:case 15:if(!Ot&&(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)&&gm(n,t,o),s=s.next}while(s!==r)}ns(e,t,n);break;case 1:if(!Ot&&(Eo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){it(n,t,a)}ns(e,t,n);break;case 21:ns(e,t,n);break;case 22:n.mode&1?(Ot=(r=Ot)||n.memoizedState!==null,ns(e,t,n),Ot=r):ns(e,t,n);break;default:ns(e,t,n)}}function Ux(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pO),t.forEach(function(r){var s=CO.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,a=o;e:for(;a!==null;){switch(a.tag){case 5:_t=a.stateNode,$n=!1;break e;case 3:_t=a.stateNode.containerInfo,$n=!0;break e;case 4:_t=a.stateNode.containerInfo,$n=!0;break e}a=a.return}if(_t===null)throw Error(B(160));nC(i,o,s),_t=null,$n=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){it(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)rC(t,e),t=t.sibling}function rC(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Mn(t,e),nr(e),r&4){try{Tl(3,e,e.return),Cf(3,e)}catch(g){it(e,e.return,g)}try{Tl(5,e,e.return)}catch(g){it(e,e.return,g)}}break;case 1:Mn(t,e),nr(e),r&512&&n!==null&&Eo(n,n.return);break;case 5:if(Mn(t,e),nr(e),r&512&&n!==null&&Eo(n,n.return),e.flags&32){var s=e.stateNode;try{Ul(s,"")}catch(g){it(e,e.return,g)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&E1(s,i),zp(a,o);var c=zp(a,i);for(o=0;o<l.length;o+=2){var u=l[o],f=l[o+1];u==="style"?R1(s,f):u==="dangerouslySetInnerHTML"?P1(s,f):u==="children"?Ul(s,f):av(s,u,f,c)}switch(a){case"input":Fp(s,i);break;case"textarea":k1(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Ao(s,!!i.multiple,m,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ao(s,!!i.multiple,i.defaultValue,!0):Ao(s,!!i.multiple,i.multiple?[]:"",!1))}s[Yl]=i}catch(g){it(e,e.return,g)}}break;case 6:if(Mn(t,e),nr(e),r&4){if(e.stateNode===null)throw Error(B(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(g){it(e,e.return,g)}}break;case 3:if(Mn(t,e),nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hl(t.containerInfo)}catch(g){it(e,e.return,g)}break;case 4:Mn(t,e),nr(e);break;case 13:Mn(t,e),nr(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Vv=lt())),r&4&&Ux(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Ot=(c=Ot)||u,Mn(t,e),Ot=c):Mn(t,e),nr(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&e.mode&1)for(re=e,u=e.child;u!==null;){for(f=re=u;re!==null;){switch(h=re,m=h.child,h.tag){case 0:case 11:case 14:case 15:Tl(4,h,h.return);break;case 1:Eo(h,h.return);var y=h.stateNode;if(typeof y.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(g){it(r,n,g)}}break;case 5:Eo(h,h.return);break;case 22:if(h.memoizedState!==null){zx(f);continue}}m!==null?(m.return=h,re=m):zx(f)}u=u.sibling}e:for(u=null,f=e;;){if(f.tag===5){if(u===null){u=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=j1("display",o))}catch(g){it(e,e.return,g)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(g){it(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Mn(t,e),nr(e),r&4&&Ux(e);break;case 21:break;default:Mn(t,e),nr(e)}}function nr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(tC(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ul(s,""),r.flags&=-33);var i=Vx(e);xm(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Vx(e);ym(e,a,o);break;default:throw Error(B(161))}}catch(l){it(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gO(e,t,n){re=e,sC(e)}function sC(e,t,n){for(var r=(e.mode&1)!==0;re!==null;){var s=re,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||vu;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ot;a=vu;var c=Ot;if(vu=o,(Ot=l)&&!c)for(re=s;re!==null;)o=re,l=o.child,o.tag===22&&o.memoizedState!==null?Wx(s):l!==null?(l.return=o,re=l):Wx(s);for(;i!==null;)re=i,sC(i),i=i.sibling;re=s,vu=a,Ot=c}Bx(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,re=i):Bx(e)}}function Bx(e){for(;re!==null;){var t=re;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ot||Cf(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ot)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Ln(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&kx(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}kx(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var f=u.dehydrated;f!==null&&Hl(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}Ot||t.flags&512&&vm(t)}catch(h){it(t,t.return,h)}}if(t===e){re=null;break}if(n=t.sibling,n!==null){n.return=t.return,re=n;break}re=t.return}}function zx(e){for(;re!==null;){var t=re;if(t===e){re=null;break}var n=t.sibling;if(n!==null){n.return=t.return,re=n;break}re=t.return}}function Wx(e){for(;re!==null;){var t=re;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cf(4,t)}catch(l){it(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){it(t,s,l)}}var i=t.return;try{vm(t)}catch(l){it(t,i,l)}break;case 5:var o=t.return;try{vm(t)}catch(l){it(t,o,l)}}}catch(l){it(t,t.return,l)}if(t===e){re=null;break}var a=t.sibling;if(a!==null){a.return=t.return,re=a;break}re=t.return}}var vO=Math.ceil,Ed=Yr.ReactCurrentDispatcher,Fv=Yr.ReactCurrentOwner,Tn=Yr.ReactCurrentBatchConfig,Me=0,wt=null,ut=null,Et=0,un=0,ko=Zs(0),mt=0,nc=null,Di=0,Ef=0,$v=0,Pl=null,Zt=null,Vv=0,ua=1/0,Pr=null,kd=!1,wm=null,Is=null,yu=!1,js=null,Td=0,jl=0,bm=null,Gu=-1,qu=0;function Ut(){return Me&6?lt():Gu!==-1?Gu:Gu=lt()}function Ls(e){return e.mode&1?Me&2&&Et!==0?Et&-Et:eO.transition!==null?(qu===0&&(qu=B1()),qu):(e=$e,e!==0||(e=window.event,e=e===void 0?16:Q1(e.type)),e):1}function Kn(e,t,n,r){if(50<jl)throw jl=0,bm=null,Error(B(185));jc(e,n,r),(!(Me&2)||e!==wt)&&(e===wt&&(!(Me&2)&&(Ef|=n),mt===4&&gs(e,Et)),nn(e,r),n===1&&Me===0&&!(t.mode&1)&&(ua=lt()+500,bf&&Xs()))}function nn(e,t){var n=e.callbackNode;e2(e,t);var r=ud(e,e===wt?Et:0);if(r===0)n!==null&&J0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&J0(n),t===1)e.tag===0?J2(Hx.bind(null,e)):pS(Hx.bind(null,e)),Q2(function(){!(Me&6)&&Xs()}),n=null;else{switch(z1(r)){case 1:n=fv;break;case 4:n=V1;break;case 16:n=cd;break;case 536870912:n=U1;break;default:n=cd}n=fC(n,iC.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iC(e,t){if(Gu=-1,qu=0,Me&6)throw Error(B(327));var n=e.callbackNode;if(Lo()&&e.callbackNode!==n)return null;var r=ud(e,e===wt?Et:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Pd(e,r);else{t=r;var s=Me;Me|=2;var i=aC();(wt!==e||Et!==t)&&(Pr=null,ua=lt()+500,Ei(e,t));do try{wO();break}catch(a){oC(e,a)}while(!0);Ev(),Ed.current=i,Me=s,ut!==null?t=0:(wt=null,Et=0,t=mt)}if(t!==0){if(t===2&&(s=qp(e),s!==0&&(r=s,t=_m(e,s))),t===1)throw n=nc,Ei(e,0),gs(e,r),nn(e,lt()),n;if(t===6)gs(e,r);else{if(s=e.current.alternate,!(r&30)&&!yO(s)&&(t=Pd(e,r),t===2&&(i=qp(e),i!==0&&(r=i,t=_m(e,i))),t===1))throw n=nc,Ei(e,0),gs(e,r),nn(e,lt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:oi(e,Zt,Pr);break;case 3:if(gs(e,r),(r&130023424)===r&&(t=Vv+500-lt(),10<t)){if(ud(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=nm(oi.bind(null,e,Zt,Pr),t);break}oi(e,Zt,Pr);break;case 4:if(gs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Hn(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vO(r/1960))-r,10<r){e.timeoutHandle=nm(oi.bind(null,e,Zt,Pr),r);break}oi(e,Zt,Pr);break;case 5:oi(e,Zt,Pr);break;default:throw Error(B(329))}}}return nn(e,lt()),e.callbackNode===n?iC.bind(null,e):null}function _m(e,t){var n=Pl;return e.current.memoizedState.isDehydrated&&(Ei(e,t).flags|=256),e=Pd(e,t),e!==2&&(t=Zt,Zt=n,t!==null&&Sm(t)),e}function Sm(e){Zt===null?Zt=e:Zt.push.apply(Zt,e)}function yO(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(!qn(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 gs(e,t){for(t&=~$v,t&=~Ef,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Hn(t),r=1<<n;e[n]=-1,t&=~r}}function Hx(e){if(Me&6)throw Error(B(327));Lo();var t=ud(e,0);if(!(t&1))return nn(e,lt()),null;var n=Pd(e,t);if(e.tag!==0&&n===2){var r=qp(e);r!==0&&(t=r,n=_m(e,r))}if(n===1)throw n=nc,Ei(e,0),gs(e,t),nn(e,lt()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,oi(e,Zt,Pr),nn(e,lt()),null}function Uv(e,t){var n=Me;Me|=1;try{return e(t)}finally{Me=n,Me===0&&(ua=lt()+500,bf&&Xs())}}function Ii(e){js!==null&&js.tag===0&&!(Me&6)&&Lo();var t=Me;Me|=1;var n=Tn.transition,r=$e;try{if(Tn.transition=null,$e=1,e)return e()}finally{$e=r,Tn.transition=n,Me=t,!(Me&6)&&Xs()}}function Bv(){un=ko.current,Ge(ko)}function Ei(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,q2(n)),ut!==null)for(n=ut.return;n!==null;){var r=n;switch(_v(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&md();break;case 3:la(),Ge(en),Ge(Dt),Nv();break;case 5:Rv(r);break;case 4:la();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:kv(r.type._context);break;case 22:case 23:Bv()}n=n.return}if(wt=e,ut=e=Fs(e.current,null),Et=un=t,mt=0,nc=null,$v=Ef=Di=0,Zt=Pl=null,pi!==null){for(t=0;t<pi.length;t++)if(n=pi[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}pi=null}return e}function oC(e,t){do{var n=ut;try{if(Ev(),Wu.current=Cd,Sd){for(var r=Je.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Sd=!1}if(Mi=0,yt=ht=Je=null,kl=!1,Jl=0,Fv.current=null,n===null||n.return===null){mt=1,nc=t,ut=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Et,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var h=u.alternate;h?(u.updateQueue=h.updateQueue,u.memoizedState=h.memoizedState,u.lanes=h.lanes):(u.updateQueue=null,u.memoizedState=null)}var m=Ax(o);if(m!==null){m.flags&=-257,Ox(m,o,a,i,t),m.mode&1&&Nx(i,c,t),t=m,l=c;var y=t.updateQueue;if(y===null){var g=new Set;g.add(l),t.updateQueue=g}else y.add(l);break e}else{if(!(t&1)){Nx(i,c,t),zv();break e}l=Error(B(426))}}else if(Qe&&a.mode&1){var w=Ax(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Ox(w,o,a,i,t),Sv(ca(l,a));break e}}i=l=ca(l,a),mt!==4&&(mt=2),Pl===null?Pl=[i]:Pl.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=zS(i,l,t);Ex(i,x);break e;case 1:a=l;var v=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Is===null||!Is.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=WS(i,a,t);Ex(i,_);break e}}i=i.return}while(i!==null)}cC(n)}catch(S){t=S,ut===n&&n!==null&&(ut=n=n.return);continue}break}while(!0)}function aC(){var e=Ed.current;return Ed.current=Cd,e===null?Cd:e}function zv(){(mt===0||mt===3||mt===2)&&(mt=4),wt===null||!(Di&268435455)&&!(Ef&268435455)||gs(wt,Et)}function Pd(e,t){var n=Me;Me|=2;var r=aC();(wt!==e||Et!==t)&&(Pr=null,Ei(e,t));do try{xO();break}catch(s){oC(e,s)}while(!0);if(Ev(),Me=n,Ed.current=r,ut!==null)throw Error(B(261));return wt=null,Et=0,mt}function xO(){for(;ut!==null;)lC(ut)}function wO(){for(;ut!==null&&!HA();)lC(ut)}function lC(e){var t=dC(e.alternate,e,un);e.memoizedProps=e.pendingProps,t===null?cC(e):ut=t,Fv.current=null}function cC(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=hO(n,t),n!==null){n.flags&=32767,ut=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{mt=6,ut=null;return}}else if(n=fO(n,t,un),n!==null){ut=n;return}if(t=t.sibling,t!==null){ut=t;return}ut=t=e}while(t!==null);mt===0&&(mt=5)}function oi(e,t,n){var r=$e,s=Tn.transition;try{Tn.transition=null,$e=1,bO(e,t,n,r)}finally{Tn.transition=s,$e=r}return null}function bO(e,t,n,r){do Lo();while(js!==null);if(Me&6)throw Error(B(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(B(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(t2(e,i),e===wt&&(ut=wt=null,Et=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||yu||(yu=!0,fC(cd,function(){return Lo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Tn.transition,Tn.transition=null;var o=$e;$e=1;var a=Me;Me|=4,Fv.current=null,mO(e,n),rC(n,e),U2(em),dd=!!Jp,em=Jp=null,e.current=n,gO(n),KA(),Me=a,$e=o,Tn.transition=i}else e.current=n;if(yu&&(yu=!1,js=e,Td=s),i=e.pendingLanes,i===0&&(Is=null),QA(n.stateNode),nn(e,lt()),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(kd)throw kd=!1,e=wm,wm=null,e;return Td&1&&e.tag!==0&&Lo(),i=e.pendingLanes,i&1?e===bm?jl++:(jl=0,bm=e):jl=0,Xs(),null}function Lo(){if(js!==null){var e=z1(Td),t=Tn.transition,n=$e;try{if(Tn.transition=null,$e=16>e?16:e,js===null)var r=!1;else{if(e=js,js=null,Td=0,Me&6)throw Error(B(331));var s=Me;for(Me|=4,re=e.current;re!==null;){var i=re,o=i.child;if(re.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(re=c;re!==null;){var u=re;switch(u.tag){case 0:case 11:case 15:Tl(8,u,i)}var f=u.child;if(f!==null)f.return=u,re=f;else for(;re!==null;){u=re;var h=u.sibling,m=u.return;if(eC(u),u===c){re=null;break}if(h!==null){h.return=m,re=h;break}re=m}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}re=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,re=o;else e:for(;re!==null;){if(i=re,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Tl(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,re=x;break e}re=i.return}}var v=e.current;for(re=v;re!==null;){o=re;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,re=b;else e:for(o=v;re!==null;){if(a=re,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Cf(9,a)}}catch(S){it(a,a.return,S)}if(a===o){re=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,re=_;break e}re=a.return}}if(Me=s,Xs(),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(gf,e)}catch{}r=!0}return r}finally{$e=n,Tn.transition=t}}return!1}function Kx(e,t,n){t=ca(n,t),t=zS(e,t,1),e=Ds(e,t,1),t=Ut(),e!==null&&(jc(e,1,t),nn(e,t))}function it(e,t,n){if(e.tag===3)Kx(e,e,n);else for(;t!==null;){if(t.tag===3){Kx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Is===null||!Is.has(r))){e=ca(n,e),e=WS(t,e,1),t=Ds(t,e,1),e=Ut(),t!==null&&(jc(t,1,e),nn(t,e));break}}t=t.return}}function _O(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,wt===e&&(Et&n)===n&&(mt===4||mt===3&&(Et&130023424)===Et&&500>lt()-Vv?Ei(e,0):$v|=n),nn(e,t)}function uC(e,t){t===0&&(e.mode&1?(t=lu,lu<<=1,!(lu&130023424)&&(lu=4194304)):t=1);var n=Ut();e=zr(e,t),e!==null&&(jc(e,t,n),nn(e,n))}function SO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uC(e,n)}function CO(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(B(314))}r!==null&&r.delete(t),uC(e,n)}var dC;dC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||en.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,dO(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,Qe&&t.flags&1048576&&mS(t,yd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ku(e,t),e=t.pendingProps;var s=ia(t,Dt.current);Io(t,n),s=Ov(null,t,r,e,s,n);var i=Mv();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,tn(r)?(i=!0,gd(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Pv(t),s.updater=Sf,t.stateNode=s,s._reactInternals=t,cm(t,r,e,n),t=fm(null,t,r,!0,i,n)):(t.tag=0,Qe&&i&&bv(t),Ft(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ku(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=kO(r),e=Ln(r,e),s){case 0:t=dm(null,t,r,e,n);break e;case 1:t=Ix(null,t,r,e,n);break e;case 11:t=Mx(null,t,r,e,n);break e;case 14:t=Dx(null,t,r,Ln(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ln(r,s),dm(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ln(r,s),Ix(e,t,r,s,n);case 3:e:{if(qS(t),e===null)throw Error(B(387));
vendor: 4,729 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,s=i.element,bS(e,t),bd(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=ca(Error(B(423)),t),t=Lx(e,t,r,n,s);break e}else if(r!==s){s=ca(Error(B(424)),t),t=Lx(e,t,r,n,s);break e}else for(fn=Ms(t.stateNode.containerInfo.firstChild),hn=t,Qe=!0,Un=null,n=xS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(oa(),r===s){t=Wr(e,t,n);break e}Ft(e,t,r,n)}t=t.child}return t;case 5:return _S(t),e===null&&om(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,tm(r,s)?o=null:i!==null&&tm(r,i)&&(t.flags|=32),GS(e,t),Ft(e,t,o,n),t.child;case 6:return e===null&&om(t),null;case 13:return QS(e,t,n);case 4:return jv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=aa(t,null,r,n):Ft(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ln(r,s),Mx(e,t,r,s,n);case 7:return Ft(e,t,t.pendingProps,n),t.child;case 8:return Ft(e,t,t.pendingProps.children,n),t.child;case 12:return Ft(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,Be(xd,r._currentValue),r._currentValue=o,i!==null)if(qn(i.value,o)){if(i.children===s.children&&!en.current){t=Wr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ir(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),am(i.return,n,t),a.lanes|=n;break}l=l.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(B(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),am(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}Ft(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Io(t,n),s=Nn(s),r=r(s),t.flags|=1,Ft(e,t,r,n),t.child;case 14:return r=t.type,s=Ln(r,t.pendingProps),s=Ln(r.type,s),Dx(e,t,r,s,n);case 15:return HS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ln(r,s),Ku(e,t),t.tag=1,tn(r)?(e=!0,gd(t)):e=!1,Io(t,n),BS(t,r,s),cm(t,r,s,n),fm(null,t,r,!0,e,n);case 19:return YS(e,t,n);case 22:return KS(e,t,n)}throw Error(B(156,t.tag))};function fC(e,t){return $1(e,t)}function EO(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 kn(e,t,n,r){return new EO(e,t,n,r)}function Wv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function kO(e){if(typeof e=="function")return Wv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cv)return 11;if(e===uv)return 14}return 2}function Fs(e,t){var n=e.alternate;return n===null?(n=kn(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 Qu(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Wv(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case go:return ki(n.children,s,i,t);case lv:o=8,s|=8;break;case Op:return e=kn(12,n,t,s|2),e.elementType=Op,e.lanes=i,e;case Mp:return e=kn(13,n,t,s),e.elementType=Mp,e.lanes=i,e;case Dp:return e=kn(19,n,t,s),e.elementType=Dp,e.lanes=i,e;case _1:return kf(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w1:o=10;break e;case b1:o=9;break e;case cv:o=11;break e;case uv:o=14;break e;case ds:o=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=kn(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ki(e,t,n,r){return e=kn(7,e,r,t),e.lanes=n,e}function kf(e,t,n,r){return e=kn(22,e,r,t),e.elementType=_1,e.lanes=n,e.stateNode={isHidden:!1},e}function Hh(e,t,n){return e=kn(6,e,null,t),e.lanes=n,e}
vendor: 4,322 bytes, line 40
40function Kh(e,t,n){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TO(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=kh(0),this.expirationTimes=kh(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kh(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Hv(e,t,n,r,s,i,o,a,l){return e=new TO(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=kn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pv(i),e}function PO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function hC(e){if(!e)return Us;e=e._reactInternals;e:{if(Hi(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(tn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if(tn(n))return hS(e,n,t)}return t}function pC(e,t,n,r,s,i,o,a,l){return e=Hv(n,r,!0,e,s,i,o,a,l),e.context=hC(null),n=e.current,r=Ut(),s=Ls(n),i=Ir(r,s),i.callback=t??null,Ds(n,i,s),e.current.lanes=s,jc(e,s,r),nn(e,r),e}function Tf(e,t,n,r){var s=t.current,i=Ut(),o=Ls(s);return n=hC(n),t.context===null?t.context=n:t.pendingContext=n,t=Ir(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ds(s,t,o),e!==null&&(Kn(e,s,o,i),zu(e,s,o)),o}function jd(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 Gx(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Kv(e,t){Gx(e,t),(e=e.alternate)&&Gx(e,t)}function jO(){return null}var mC=typeof reportError=="function"?reportError:function(e){console.error(e)};function Gv(e){this._internalRoot=e}Pf.prototype.render=Gv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Tf(e,t,null,null)};Pf.prototype.unmount=Gv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ii(function(){Tf(null,e,null,null)}),t[Br]=null}};function Pf(e){this._internalRoot=e}Pf.prototype.unstable_scheduleHydration=function(e){if(e){var t=K1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ms.length&&t!==0&&t<ms[n].priority;n++);ms.splice(n,0,e),n===0&&q1(e)}};function qv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function qx(){}function RO(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=jd(o);i.call(c)}}var o=pC(t,r,e,0,null,!1,!1,"",qx);return e._reactRootContainer=o,e[Br]=o.current,ql(e.nodeType===8?e.parentNode:e),Ii(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=jd(l);a.call(c)}}var l=Hv(e,0,!1,null,null,!1,!1,"",qx);return e._reactRootContainer=l,e[Br]=l.current,ql(e.nodeType===8?e.parentNode:e),Ii(function(){Tf(t,l,n,r)}),l}function Rf(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=jd(o);a.call(l)}}Tf(t,o,e,s)}else o=RO(n,t,e,s,r);return jd(o)}W1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ll(t.pendingLanes);n!==0&&(hv(t,n|1),nn(t,lt()),!(Me&6)&&(ua=lt()+500,Xs()))}break;case 13:Ii(function(){var r=zr(e,1);if(r!==null){var s=Ut();Kn(r,e,1,s)}}),Kv(e,1)}};pv=function(e){if(e.tag===13){var t=zr(e,134217728);if(t!==null){var n=Ut();Kn(t,e,134217728,n)}Kv(e,134217728)}};H1=function(e){if(e.tag===13){var t=Ls(e),n=zr(e,t);if(n!==null){var r=Ut();Kn(n,e,t,r)}Kv(e,t)}};K1=function(){return $e};G1=function(e,t){var n=$e;
40try{return $e=e,t()}finally{$e=n}};Hp=function(e,t,n){switch(t){case"input":if(Fp(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=wf(r);if(!s)throw Error(B(90));C1(r),Fp(r,s)}}}break;case"textarea":k1(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}};O1=Uv;M1=Ii;var NO={usingClientEntryPoint:!1,Events:[Nc,wo,wf,N1,A1,Uv]},Ya={findFiberByHostInstance:hi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AO={bundleType:Ya.bundleType,version:Ya.version,rendererPackageName:Ya.rendererPackageName,rendererConfig:Ya.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Yr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=L1(e),e===null?null:e.stateNode},findFiberByHostInstance:Ya.findFiberByHostInstance||jO,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 xu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xu.isDisabled&&xu.supportsFiber)try{gf=xu.inject(AO),pr=xu}catch{}}vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NO;vn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qv(t))throw Error(B(200));return PO(e,t,null,n)};vn.createRoot=function(e,t){if(!qv(e))throw Error(B(299));var n=!1,r="",s=mC;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Hv(e,1,!1,null,null,n,!1,r,s),e[Br]=t.current,ql(e.nodeType===8?e.parentNode:e),new Gv(t)};vn.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(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=L1(t),e=e===null?null:e.stateNode,e};vn.flushSync=function(e){return Ii(e)};vn.hydrate=function(e,t,n){if(!jf(t))throw Error(B(200));return Rf(null,e,t,!0,n)};vn.hydrateRoot=function(e,t,n){if(!qv(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=mC;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=pC(t,null,e,1,n??null,s,!1,i,o),e[Br]=t.current,ql(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 Pf(t)};vn.render=function(e,t,n){if(!jf(t))throw Error(B(200));return Rf(null,e,t,!1,n)};vn.unmountComponentAtNode=function(e){if(!jf(e))throw Error(B(40));return e._reactRootContainer?(Ii(function(){Rf(null,null,e,!1,function(){e._reactRootContainer=null,e[Br]=null})}),!0):!1};vn.unstable_batchedUpdates=Uv;vn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!jf(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return Rf(e,t,n,!1,r)};vn.version="18.3.1-next-f1338f8080-20240426";function gC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gC)}catch(e){console.error(e)}}gC(),g1.exports=vn;var Ki=g1.exports;const vC=r1(Ki);var yC,Qx=Ki;yC=Qx.createRoot,Qx.hydrateRoot;/** 41 * @remix-run/router v1.20.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 rc(){return rc=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},rc.apply(this,arguments)}var Rs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Rs||(Rs={}));const Yx="popstate";function OO(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Cm("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Rd(s)}return DO(t,n,null,e)}function dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function xC(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MO(){return Math.random().toString(36).substr(2,8)}function Zx(e,t){return{usr:e.state,key:e.key,idx:t}}function Cm(e,t,n,r){return n===void 0&&(n=null),rc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ta(t):t,{state:n,key:t&&t.key||r||MO()})}function Rd(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 Ta(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 DO(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Rs.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(rc({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function f(){a=Rs.Pop;let w=u(),x=w==null?null:w-c;c=w,l&&l({action:a,location:g.location,delta:x})}function h(w,x){a=Rs.Push;let v=Cm(g.location,w,x);c=u()+1;let b=Zx(v,c),_=g.createHref(v);try{o.pushState(b,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:g.location,delta:1})}function m(w,x){a=Rs.Replace;let v=Cm(g.location,w,x);c=u();let b=Zx(v,c),_=g.createHref(v);o.replaceState(b,"",_),i&&l&&l({action:a,location:g.location,delta:0})}function y(w){let x=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:Rd(w);return v=v.replace(/ $/,"%20"),dt(x,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,x)}let g={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Yx,f),l=w,()=>{s.removeEventListener(Yx,f),l=null}},createHref(w){return t(s,w)},createURL:y,encodeLocation(w){let x=y(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:m,go(w){return o.go(w)}};return g}var Xx;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Xx||(Xx={}));function IO(e,t,n){return n===void 0&&(n="/"),LO(e,t,n,!1)}function LO(e,t,n,r){let s=typeof t=="string"?Ta(t):t,i=Qv(s.pathname||"/",n);if(i==null)return null;let o=wC(e);FO(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=QO(i);a=GO(o[l],c,r)}return a}function wC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(dt(l.relativePath.startsWith(r),'Absolute route path "'+l.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."),l.relativePath=l.relativePath.slice(r.length));let c=$s([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(dt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),wC(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:HO(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of bC(i.path))s(i,o,l)}),t}function bC(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=bC(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function FO(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:KO(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const $O=/^:[\w-]+$/,VO=3,UO=2,BO=1,zO=10,WO=-2,Jx=e=>e==="*";function HO(e,t){let n=e.split("/"),r=n.length;return n.some(Jx)&&(r+=WO),t&&(r+=UO),n.filter(s=>!Jx(s)).reduce((s,i)=>s+($O.test(i)?VO:i===""?BO:zO),r)}function KO(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 GO(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,u=i==="/"?t:t.slice(i.length)||"/",f=ew({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),h=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=ew({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;
vendor: 51,919 bytes, lines 49-67
49Object.assign(s,f.params),o.push({params:s,pathname:$s([i,f.pathname]),pathnameBase:JO($s([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=$s([i,f.pathnameBase]))}return o}function ew(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qO(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,u,f)=>{let{paramName:h,isOptional:m}=u;if(h==="*"){let g=a[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[f];return m&&!y?c[h]=void 0:c[h]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function qO(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),xC(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,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function QO(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return xC(!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 Qv(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 YO(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ta(e):e;return{pathname:n?n.startsWith("/")?n:ZO(n,t):t,search:eM(r),hash:tM(s)}}function ZO(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 Gh(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 XO(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _C(e,t){let n=XO(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function SC(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ta(e):(s=rc({},e),dt(!s.pathname||!s.pathname.includes("?"),Gh("?","pathname","search",s)),dt(!s.pathname||!s.pathname.includes("#"),Gh("#","pathname","hash",s)),dt(!s.search||!s.search.includes("#"),Gh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=YO(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const $s=e=>e.join("/").replace(/\/\/+/g,"/"),JO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),eM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function nM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const CC=["post","put","patch","delete"];new Set(CC);const rM=["get",...CC];new Set(rM);/** 50 * React Router v6.27.0 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 sc(){return sc=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},sc.apply(this,arguments)}const Yv=p.createContext(null),sM=p.createContext(null),Gi=p.createContext(null),Nf=p.createContext(null),Js=p.createContext({outlet:null,matches:[],isDataRoute:!1}),EC=p.createContext(null);function iM(e,t){let{relative:n}=t===void 0?{}:t;Oc()||dt(!1);let{basename:r,navigator:s}=p.useContext(Gi),{hash:i,pathname:o,search:a}=PC(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:$s([r,o])),s.createHref({pathname:l,search:a,hash:i})}function Oc(){return p.useContext(Nf)!=null}function Mc(){return Oc()||dt(!1),p.useContext(Nf).location}function kC(e){p.useContext(Gi).static||p.useLayoutEffect(e)}function Pa(){let{isDataRoute:e}=p.useContext(Js);return e?yM():oM()}function oM(){Oc()||dt(!1);let e=p.useContext(Yv),{basename:t,future:n,navigator:r}=p.useContext(Gi),{matches:s}=p.useContext(Js),{pathname:i}=Mc(),o=JSON.stringify(_C(s,n.v7_relativeSplatPath)),a=p.useRef(!1);return kC(()=>{a.current=!0}),p.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let f=SC(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$s([t,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,o,i,e])}function TC(){let{matches:e}=p.useContext(Js),t=e[e.length-1];return t?t.params:{}}function PC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Gi),{matches:s}=p.useContext(Js),{pathname:i}=Mc(),o=JSON.stringify(_C(s,r.v7_relativeSplatPath));return p.useMemo(()=>SC(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function aM(e,t){return lM(e,t)}function lM(e,t,n,r){Oc()||dt(!1);let{navigator:s}=p.useContext(Gi),{matches:i}=p.useContext(Js),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Mc(),u;if(t){var f;let w=typeof t=="string"?Ta(t):t;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||dt(!1),u=w}else u=c;let h=u.pathname||"/",m=h;if(l!=="/"){let w=l.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=IO(e,{pathname:m}),g=hM(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:$s([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:$s([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&g?p.createElement(Nf.Provider,{value:{location:sc({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Rs.Pop}},g):g}function cM(){let e=vM(),t=nM(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 p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const uM=p.createElement(cM,null);class dM extends p.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?p.createElement(Js.Provider,{value:this.props.routeContext},p.createElement(EC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fM(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(Yv);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Js.Provider,{value:t},r)}function hM(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,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||dt(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<o.length;u++){let f=o[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=u),f.route.id){let{loaderData:h,errors:m}=n,y=f.route.loader&&h[f.route.id]===void 0&&(!m||m[f.route.id]===void 0);if(f.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,f,h)=>{let m,y=!1,g=null,w=null;n&&(m=a&&f.route.id?a[f.route.id]:void 0,g=f.route.errorElement||uM,l&&(c<0&&h===0?(y=!0,w=null):c===h&&(y=!0,w=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,h+1)),v=()=>{let b;return m?b=g:y?b=w:f.route.Component?b=p.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,p.createElement(fM,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:b})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?p.createElement(dM,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:v(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):v()},null)}var jC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jC||{}),Nd=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}(Nd||{});function pM(e){let t=p.useContext(Yv);return t||dt(!1),t}function mM(e){let t=p.useContext(sM);return t||dt(!1),t}function gM(e){let t=p.useContext(Js);return t||dt(!1),t}function RC(e){let t=gM(),n=t.matches[t.matches.length-1];return n.route.id||dt(!1),n.route.id}function vM(){var e;let t=p.useContext(EC),n=mM(Nd.UseRouteError),r=RC(Nd.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function yM(){let{router:e}=pM(jC.UseNavigateStable),t=RC(Nd.UseNavigateStable),n=p.useRef(!1);return kC(()=>{n.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,sc({fromRouteId:t},i)))},[e,t])}function is(e){dt(!1)}function xM(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Rs.Pop,navigator:i,static:o=!1,future:a}=e;Oc()&&dt(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:i,static:o,future:sc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Ta(r));let{pathname:u="/",search:f="",hash:h="",state:m=null,key:y="default"}=r,g=p.useMemo(()=>{let w=Qv(u,l);return w==null?null:{location:{pathname:w,search:f,hash:h,state:m,key:y},navigationType:s}},[l,u,f,h,m,y,s]);return g==null?null:p.createElement(Gi.Provider,{value:c},p.createElement(Nf.Provider,{children:n,value:g}))}function wM(e){let{children:t,location:n}=e;return aM(Em(t),n)}new Promise(()=>{});function Em(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,s)=>{if(!p.isValidElement(r))return;let i=[...t,s];if(r.type===p.Fragment){n.push.apply(n,Em(r.props.children,i));return}r.type!==is&&dt(!1),!r.props.index||!r.props.children||dt(!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=Em(r.props.children,i)),n.push(o)}),n}/** 59 * React Router DOM v6.27.0 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 km(){return km=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},km.apply(this,arguments)}function bM(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 _M(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SM(e,t){return e.button===0&&(!t||t==="_self")&&!_M(e)}const CM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],EM="6";try{window.__reactRouterVersion=EM}catch{}const kM="startTransition",tw=p1[kM];function TM(e){let{basename:t,children:n,future:r,window:s}=e,i=p.useRef();i.current==null&&(i.current=OO({window:s,v5Compat:!0}));let o=i.current,[a,l]=p.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},u=p.useCallback(f=>{c&&tw?tw(()=>l(f)):l(f)},[l,c]);return p.useLayoutEffect(()=>o.listen(u),[o,u]),p.createElement(xM,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const PM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xt=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}=t,h=bM(t,CM),{basename:m}=p.useContext(Gi),y,g=!1;if(typeof c=="string"&&jM.test(c)&&(y=c,PM))try{let b=new URL(window.location.href),_=c.startsWith("//")?new URL(b.protocol+c):new URL(c),S=Qv(_.pathname,m);_.origin===b.origin&&S!=null?c=S+_.search+_.hash:g=!0}catch{}let w=iM(c,{relative:s}),x=RM(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:f});function v(b){r&&r(b),b.defaultPrevented||x(b)}return p.createElement("a",km({},h,{href:y||w,onClick:g||i?r:v,ref:n,target:l}))});var nw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(nw||(nw={}));var rw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rw||(rw={}));function RM(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Pa(),c=Mc(),u=PC(e,{relative:o});return p.useCallback(f=>{if(SM(f,n)){f.preventDefault();let h=r!==void 0?r:Rd(c)===Rd(u);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}var ja=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(){}},Li=typeof window>"u"||"Deno"in globalThis;function _n(){}function NM(e,t){return typeof e=="function"?e(t):e}function Tm(e){return typeof e=="number"&&e>=0&&e!==1/0}function NC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fo(e,t){return typeof e=="function"?e(t):e}function Bn(e,t){return typeof e=="function"?e(t):e}function sw(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Zv(o,t.options))return!1}else if(!ic(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||i&&!i(t))}function iw(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Fi(t.options.mutationKey)!==Fi(i))return!1}else if(!ic(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Zv(e,t){return((t==null?void 0:t.queryKeyHashFn)||Fi)(e)}function Fi(e){return JSON.stringify(e,(t,n)=>Pm(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function ic(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!ic(e[n],t[n])):!1}function AC(e,t){if(e===t)return e;const n=ow(e)&&ow(t);if(n||Pm(e)&&Pm(t)){const r=n?e:Object.keys(e),s=r.length,i=n?t:Object.keys(t),o=i.length,a=n?[]:{};let l=0;for(let c=0;c<o;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=AC(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function Ad(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ow(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pm(e){if(!aw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!aw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function aw(e){return Object.prototype.toString.call(e)==="[object Object]"}function AM(e){return new Promise(t=>{setTimeout(t,e)})}function jm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?AC(e,t):t}function OM(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function MM(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Xv=Symbol();function OC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Xv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var yi,xs,Ho,G_,DM=(G_=class extends ja{constructor(){super();ae(this,yi);ae(this,xs);ae(this,Ho);ee(this,Ho,t=>{if(!Li&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){k(this,xs)||this.setEventListener(k(this,Ho))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,xs))==null||t.call(this),ee(this,xs,void 0))}setEventListener(t){var n;ee(this,Ho,t),(n=k(this,xs))==null||n.call(this),ee(this,xs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){k(this,yi)!==t&&(ee(this,yi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof k(this,yi)=="boolean"?k(this,yi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},yi=new WeakMap,xs=new WeakMap,Ho=new WeakMap,G_),Jv=new DM,Ko,ws,Go,q_,IM=(q_=class extends ja{constructor(){super();ae(this,Ko,!0);ae(this,ws);ae(this,Go);ee(this,Go,t=>{if(!Li&&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(){k(this,ws)||this.setEventListener(k(this,Go))}onUnsubscribe(){var t;this.hasListeners()||((t=k(this,ws))==null||t.call(this),ee(this,ws,void 0))}setEventListener(t){var n;ee(this,Go,t),(n=k(this,ws))==null||n.call(this),ee(this,ws,t(this.setOnline.bind(this)))}setOnline(t){k(this,Ko)!==t&&(ee(this,Ko,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return k(this,Ko)}},Ko=new WeakMap,ws=new WeakMap,Go=new WeakMap,q_),Od=new IM;function Rm(){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 LM(e){return Math.min(1e3*2**e,3e4)}function MC(e){return(e??"online")==="online"?Od.isOnline():!0}var DC=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function qh(e){return e instanceof DC}function IC(e){let t=!1,n=0,r=!1,s;const i=Rm(),o=g=>{var w;r||(h(new DC(g)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>Jv.isFocused()&&(e.networkMode==="always"||Od.isOnline())&&e.canRun(),u=()=>MC(e.networkMode)&&e.canRun(),f=g=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,g),s==null||s(),i.resolve(g))},h=g=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,g),s==null||s(),i.reject(g))},m=()=>new Promise(g=>{var w;s=x=>{(r||c())&&g(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var g;s=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const w=n===0?e.initialPromise:void 0;try{g=w??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(f).catch(x=>{var P;if(r)return;const v=e.retry??(Li?0:3),b=e.retryDelay??LM,_=typeof b=="function"?b(n,x):b,S=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,x);if(t||!S){h(x);return}n++,(P=e.onFail)==null||P.call(e,n,x),AM(_).then(()=>c()?void 0:m()).then(()=>{t?h(x):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?y():m().then(y),i)}}function FM(){let e=[],t=0,n=a=>{a()},r=a=>{a()},s=a=>setTimeout(a,0);const i=a=>{t?e.push(a):s(()=>{n(a)})},o=()=>{const a=e;e=[],a.length&&s(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{s=a}}}var pt=FM(),xi,Q_,LC=(Q_=class{constructor(){ae(this,xi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Tm(this.gcTime)&&ee(this,xi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Li?1/0:5*60*1e3))}clearGcTimeout(){k(this,xi)&&(clearTimeout(k(this,xi)),ee(this,xi,void 0))}},xi=new WeakMap,Q_),qo,Qo,bn,Nt,Cc,wi,Fn,kr,Y_,$M=(Y_=class extends LC{constructor(t){super();ae(this,Fn);ae(this,qo);ae(this,Qo);ae(this,bn);ae(this,Nt);ae(this,Cc);ae(this,wi);ee(this,wi,!1),ee(this,Cc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,bn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,qo,VM(this.options)),this.state=t.state??k(this,qo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=k(this,Nt))==null?void 0:t.promise}setOptions(t){this.options={...k(this,Cc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,bn).remove(this)}setData(t,n){const r=jm(this.state.data,t,this.options);return ye(this,Fn,kr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ye(this,Fn,kr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=k(this,Nt))==null?void 0:r.promise;return(s=k(this,Nt))==null||s.cancel(t),n?n.then(_n).catch(_n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(k(this,qo))}isActive(){return this.observers.some(t=>Bn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!NC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Nt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=k(this,Nt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),k(this,bn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(k(this,Nt)&&(k(this,wi)?k(this,Nt).cancel({revert:!0}):k(this,Nt).cancelRetry()),this.scheduleGc()),k(this,bn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ye(this,Fn,kr).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(k(this,Nt))return k(this,Nt).continueRetry(),k(this,Nt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ee(this,wi,!0),r.signal)})},i=()=>{const f=OC(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return s(h),ee(this,wi,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};s(o),(l=this.options.behavior)==null||l.onFetch(o,this),ee(this,Qo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&ye(this,Fn,kr).call(this,{type:"fetch",meta:(u=o.fetchOptions)==null?void 0:u.meta});const a=f=>{var h,m,y,g;qh(f)&&f.silent||ye(this,Fn,kr).call(this,{type:"error",error:f}),qh(f)||((m=(h=k(this,bn).config).onError)==null||m.call(h,f,this),(g=(y=k(this,bn).config).onSettled)==null||g.call(y,this.state.data,f,this)),this.scheduleGc()};return ee(this,Nt,IC({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,m,y,g;if(f===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(w){a(w);return}(m=(h=k(this,bn).config).onSuccess)==null||m.call(h,f,this),(g=(y=k(this,bn).config).onSettled)==null||g.call(y,f,this.state.error,this),this.scheduleGc()},onError:a,onFail:(f,h)=>{ye(this,Fn,kr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{ye(this,Fn,kr).call(this,{type:"pause"})},onContinue:()=>{ye(this,Fn,kr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),k(this,Nt).start()}},qo=new WeakMap,Qo=new WeakMap,bn=new WeakMap,Nt=new WeakMap,Cc=new WeakMap,wi=new WeakMap,Fn=new WeakSet,kr=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,...FC(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...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 qh(s)&&s.revert&&k(this,Qo)?{...k(this,Qo),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),pt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),k(this,bn).notify({query:this,type:"updated",action:t})})},Y_);function FC(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:MC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function VM(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 ar,Z_,UM=(Z_=class extends ja{constructor(t={}){super();ae(this,ar);this.config=t,ee(this,ar,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Zv(s,n);let o=this.get(i);return o||(o=new $M({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){k(this,ar).has(t.queryHash)||(k(this,ar).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=k(this,ar).get(t.queryHash);n&&(t.destroy(),n===t&&k(this,ar).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){pt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return k(this,ar).get(t)}getAll(){return[...k(this,ar).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>sw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>sw(t,r)):n}notify(t){pt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ar=new WeakMap,Z_),lr,It,bi,cr,os,X_,BM=(X_=class extends LC{constructor(t){super();ae(this,cr);ae(this,lr);ae(this,It);ae(this,bi);this.mutationId=t.mutationId,ee(this,It,t.mutationCache),ee(this,lr,[]),this.state=t.state||$C(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){k(this,lr).includes(t)||(k(this,lr).push(t),this.clearGcTimeout(),k(this,It).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,lr,k(this,lr).filter(n=>n!==t)),this.scheduleGc(),k(this,It).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){k(this,lr).length||(this.state.status==="pending"?this.scheduleGc():k(this,It).remove(this))}continue(){var t;return((t=k(this,bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,c,u,f,h,m,y,g,w,x,v,b,_,S,P,T;ee(this,bi,IC({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(C,M)=>{ye(this,cr,os).call(this,{type:"failed",failureCount:C,error:M})},onPause:()=>{ye(this,cr,os).call(this,{type:"pause"})},onContinue:()=>{ye(this,cr,os).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,It).canRun(this)}));const n=this.state.status==="pending",r=!k(this,bi).canStart();try{if(!n){ye(this,cr,os).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=k(this,It).config).onMutate)==null?void 0:i.call(s,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&ye(this,cr,os).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const C=await k(this,bi).start();return await((c=(l=k(this,It).config).onSuccess)==null?void 0:c.call(l,C,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,C,t,this.state.context)),await((m=(h=k(this,It).config).onSettled)==null?void 0:m.call(h,C,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,C,null,t,this.state.context)),ye(this,cr,os).call(this,{type:"success",data:C}),C}catch(C){try{throw await((x=(w=k(this,It).config).onError)==null?void 0:x.call(w,C,t,this.state.context,this)),await((b=(v=this.options).onError)==null?void 0:b.call(v,C,t,this.state.context)),await((S=(_=k(this,It).config).onSettled)==null?void 0:S.call(_,void 0,C,this.state.variables,this.state.context,this)),await((T=(P=this.options).onSettled)==null?void 0:T.call(P,void 0,C,t,this.state.context)),C}finally{ye(this,cr,os).call(this,{type:"error",error:C})}}finally{k(this,It).runNext(this)}}},lr=new WeakMap,It=new WeakMap,bi=new WeakMap,cr=new WeakSet,os=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),pt.batch(()=>{k(this,lr).forEach(r=>{r.onMutationUpdate(t)}),k(this,It).notify({mutation:this,type:"updated",action:t})})},X_);function $C(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ln,Ec,J_,zM=(J_=class extends ja{constructor(t={}){super();ae(this,ln);ae(this,Ec);this.config=t,ee(this,ln,new Map),ee(this,Ec,Date.now())}build(t,n,r){const s=new BM({mutationCache:this,mutationId:++nu(this,Ec)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=wu(t),r=k(this,ln).get(n)??[];r.push(t),k(this,ln).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=wu(t);if(k(this,ln).has(n)){const s=(r=k(this,ln).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?k(this,ln).delete(n):k(this,ln).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=k(this,ln).get(wu(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=k(this,ln).get(wu(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){pt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...k(this,ln).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>iw(n,r))}findAll(t={}){return this.getAll().filter(n=>iw(t,n))}notify(t){pt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return pt.batch(()=>Promise.all(t.map(n=>n.continue().catch(_n))))}},ln=new WeakMap,Ec=new WeakMap,J_);function wu(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function lw(e){return{onFetch:(t,n)=>{var u,f,h,m,y;const r=t.options,s=(h=(f=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=OC(t.options,t.fetchOptions),v=async(b,_,S)=>{if(g)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const P={queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};w(P);const T=await x(P),{maxPages:C}=t.options,M=S?MM:OM;return{pages:M(b.pages,T,C),pageParams:M(b.pageParams,_,C)}};if(s&&i.length){const b=s==="backward",_=b?WM:cw,S={pages:i,pageParams:o},P=_(r,S);a=await v(S,P,b)}else{const b=e??i.length;do{const _=l===0?o[0]??r.initialPageParam:cw(r,a);if(l>0&&_==null)break;a=await v(a,_),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var g,w;return(w=(g=t.options).persister)==null?void 0:w.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function cw(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 WM(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 nt,bs,_s,Yo,Zo,Ss,Xo,Jo,e1,HM=(e1=class{constructor(e={}){ae(this,nt);ae(this,bs);ae(this,_s);ae(this,Yo);ae(this,Zo);ae(this,Ss);ae(this,Xo);ae(this,Jo);ee(this,nt,e.queryCache||new UM),ee(this,bs,e.mutationCache||new zM),ee(this,_s,e.defaultOptions||{}),ee(this,Yo,new Map),ee(this,Zo,new Map),ee(this,Ss,0)}mount(){nu(this,Ss)._++,k(this,Ss)===1&&(ee(this,Xo,Jv.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,nt).onFocus())})),ee(this,Jo,Od.subscribe(async e=>{e&&(await this.resumePausedMutations(),k(this,nt).onOnline())})))}unmount(){var e,t;nu(this,Ss)._--,k(this,Ss)===0&&((e=k(this,Xo))==null||e.call(this),ee(this,Xo,void 0),(t=k(this,Jo))==null||t.call(this),ee(this,Jo,void 0))}isFetching(e){return k(this,nt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return k(this,bs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,nt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=k(this,nt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Fo(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return k(this,nt).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=k(this,nt).get(r.queryHash),i=s==null?void 0:s.state.data,o=NM(t,i);if(o!==void 0)return k(this,nt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return pt.batch(()=>k(this,nt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=k(this,nt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=k(this,nt);pt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=k(this,nt),r={type:"active",...e};return pt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=pt.batch(()=>k(this,nt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(_n).catch(_n)}invalidateQueries(e={},t={}){return pt.batch(()=>{if(k(this,nt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=pt.batch(()=>k(this,nt).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(_n)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(_n)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=k(this,nt).build(this,t);return n.isStaleByTime(Fo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_n).catch(_n)}fetchInfiniteQuery(e){return e.behavior=lw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_n).catch(_n)}ensureInfiniteQueryData(e){return e.behavior=lw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Od.isOnline()?k(this,bs).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,nt)}getMutationCache(){return k(this,bs)}getDefaultOptions(){return k(this,_s)}setDefaultOptions(e){ee(this,_s,e)}setQueryDefaults(e,t){k(this,Yo).set(Fi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...k(this,Yo).values()];let n={};return t.forEach(r=>{ic(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){k(this,Zo).set(Fi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...k(this,Zo).values()];let n={};return t.forEach(r=>{ic(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...k(this,_s).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zv(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.enabled!==!0&&t.queryFn===Xv&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...k(this,_s).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){k(this,nt).clear(),k(this,bs).clear()}},nt=new WeakMap,bs=new WeakMap,_s=new WeakMap,Yo=new WeakMap,Zo=new WeakMap,Ss=new WeakMap,Xo=new WeakMap,Jo=new WeakMap,e1),qt,je,kc,Lt,_i,ea,Cs,ur,Tc,ta,na,Si,Ci,Es,ra,Le,ul,Nm,Am,Om,Mm,Dm,Im,Lm,VC,t1,KM=(t1=class extends ja{constructor(t,n){super();ae(this,Le);ae(this,qt);ae(this,je);ae(this,kc);ae(this,Lt);ae(this,_i);ae(this,ea);ae(this,Cs);ae(this,ur);ae(this,Tc);ae(this,ta);ae(this,na);ae(this,Si);ae(this,Ci);ae(this,Es);ae(this,ra,new Set);this.options=n,ee(this,qt,t),ee(this,ur,null),ee(this,Cs,Rm()),this.options.experimental_prefetchInRender||k(this,Cs).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,je).addObserver(this),uw(k(this,je),this.options)?ye(this,Le,ul).call(this):this.updateResult(),ye(this,Le,Mm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Fm(k(this,je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Fm(k(this,je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ye(this,Le,Dm).call(this),ye(this,Le,Im).call(this),k(this,je).removeObserver(this)}setOptions(t,n){const r=this.options,s=k(this,je);if(this.options=k(this,qt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Bn(this.options.enabled,k(this,je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ye(this,Le,Lm).call(this),k(this,je).setOptions(this.options),r._defaulted&&!Ad(this.options,r)&&k(this,qt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,je),observer:this});const i=this.hasListeners();i&&dw(k(this,je),s,this.options,r)&&ye(this,Le,ul).call(this),this.updateResult(n),i&&(k(this,je)!==s||Bn(this.options.enabled,k(this,je))!==Bn(r.enabled,k(this,je))||Fo(this.options.staleTime,k(this,je))!==Fo(r.staleTime,k(this,je)))&&ye(this,Le,Nm).call(this);const o=ye(this,Le,Am).call(this);i&&(k(this,je)!==s||Bn(this.options.enabled,k(this,je))!==Bn(r.enabled,k(this,je))||o!==k(this,Es))&&ye(this,Le,Om).call(this,o)}getOptimisticResult(t){const n=k(this,qt).getQueryCache().build(k(this,qt),t),r=this.createResult(n,t);return qM(this,r)&&(ee(this,Lt,r),ee(this,ea,this.options),ee(this,_i,k(this,je).state)),r}getCurrentResult(){return k(this,Lt)}trackResult(t,n){const r={};return Object.keys(t).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),t[s])})}),r}trackProp(t){k(this,ra).add(t)}getCurrentQuery(){return k(this,je)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=k(this,qt).defaultQueryOptions(t),r=k(this,qt).getQueryCache().build(k(this,qt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ye(this,Le,ul).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Lt)))}createResult(t,n){var C;const r=k(this,je),s=this.options,i=k(this,Lt),o=k(this,_i),a=k(this,ea),c=t!==r?t.state:k(this,kc),{state:u}=t;let f={...u},h=!1,m;if(n._optimisticResults){const M=this.hasListeners(),I=!M&&uw(t,n),R=M&&dw(t,r,n,s);(I||R)&&(f={...f,...FC(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:w}=f;if(n.select&&f.data!==void 0)if(i&&f.data===(o==null?void 0:o.data)&&n.select===k(this,Tc))m=k(this,ta);else try{ee(this,Tc,n.select),m=n.select(f.data),m=jm(i==null?void 0:i.data,m,n),ee(this,ta,m),ee(this,ur,null)}catch(M){ee(this,ur,M)}else m=f.data;if(n.placeholderData!==void 0&&m===void 0&&w==="pending"){let M;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))M=i.data;else if(M=typeof n.placeholderData=="function"?n.placeholderData((C=k(this,na))==null?void 0:C.state.data,k(this,na)):n.placeholderData,n.select&&M!==void 0)try{M=n.select(M),ee(this,ur,null)}catch(I){ee(this,ur,I)}M!==void 0&&(w="success",m=jm(i==null?void 0:i.data,M,n),h=!0)}k(this,ur)&&(y=k(this,ur),m=k(this,ta),g=Date.now(),w="error");const x=f.fetchStatus==="fetching",v=w==="pending",b=w==="error",_=v&&x,S=m!==void 0,T={status:w,fetchStatus:f.fetchStatus,isPending:v,isSuccess:w==="success",isError:b,isInitialLoading:_,isLoading:_,data:m,dataUpdatedAt:f.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!v,isLoadingError:b&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:b&&S,isStale:ey(t,n),refetch:this.refetch,promise:k(this,Cs)};if(this.options.experimental_prefetchInRender){const M=A=>{T.status==="error"?A.reject(T.error):T.data!==void 0&&A.resolve(T.data)},I=()=>{const A=ee(this,Cs,T.promise=Rm());M(A)},R=k(this,Cs);switch(R.status){case"pending":t.queryHash===r.queryHash&&M(R);break;case"fulfilled":(T.status==="error"||T.data!==R.value)&&I();break;case"rejected":(T.status!=="error"||T.error!==R.reason)&&I();break}}return T}updateResult(t){const n=k(this,Lt),r=this.createResult(k(this,je),this.options);if(ee(this,_i,k(this,je).state),ee(this,ea,this.options),k(this,_i).data!==void 0&&ee(this,na,k(this,je)),Ad(r,n))return;ee(this,Lt,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!k(this,ra).size)return!0;const l=new Set(a??k(this,ra));return this.options.throwOnError&&l.add("error"),Object.keys(k(this,Lt)).some(c=>{const u=c;return k(this,Lt)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),ye(this,Le,VC).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ye(this,Le,Mm).call(this)}},qt=new WeakMap,je=new WeakMap,kc=new WeakMap,Lt=new WeakMap,_i=new WeakMap,ea=new WeakMap,Cs=new WeakMap,ur=new WeakMap,Tc=new WeakMap,ta=new WeakMap,na=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Es=new WeakMap,ra=new WeakMap,Le=new WeakSet,ul=function(t){ye(this,Le,Lm).call(this);let n=k(this,je).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(_n)),n},Nm=function(){ye(this,Le,Dm).call(this);const t=Fo(this.options.staleTime,k(this,je));if(Li||k(this,Lt).isStale||!Tm(t))return;const r=NC(k(this,Lt).dataUpdatedAt,t)+1;ee(this,Si,setTimeout(()=>{k(this,Lt).isStale||this.updateResult()},r))},Am=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,je)):this.options.refetchInterval)??!1},Om=function(t){ye(this,Le,Im).call(this),ee(this,Es,t),!(Li||Bn(this.options.enabled,k(this,je))===!1||!Tm(k(this,Es))||k(this,Es)===0)&&ee(this,Ci,setInterval(()=>{(this.options.refetchIntervalInBackground||Jv.isFocused())&&ye(this,Le,ul).call(this)},k(this,Es)))},Mm=function(){ye(this,Le,Nm).call(this),ye(this,Le,Om).call(this,ye(this,Le,Am).call(this))},Dm=function(){k(this,Si)&&(clearTimeout(k(this,Si)),ee(this,Si,void 0))},Im=function(){k(this,Ci)&&(clearInterval(k(this,Ci)),ee(this,Ci,void 0))},Lm=function(){const t=k(this,qt).getQueryCache().build(k(this,qt),this.options);if(t===k(this,je))return;const n=k(this,je);ee(this,je,t),ee(this,kc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},VC=function(t){pt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(k(this,Lt))}),k(this,qt).getQueryCache().notify({query:k(this,je),type:"observerResultsUpdated"})})},t1);function GM(e,t){return Bn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function uw(e,t){return GM(e,t)||e.state.data!==void 0&&Fm(e,t,t.refetchOnMount)}function Fm(e,t,n){if(Bn(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ey(e,t)}return!1}function dw(e,t,n,r){return(e!==t||Bn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ey(e,n)}function ey(e,t){return Bn(t.enabled,e)!==!1&&e.isStaleByTime(Fo(t.staleTime,e))}function qM(e,t){return!Ad(e.getCurrentResult(),t)}var ks,Ts,Qt,Nr,Vr,Yu,$m,n1,QM=(n1=class extends ja{constructor(n,r){super();ae(this,Vr);ae(this,ks);ae(this,Ts);ae(this,Qt);ae(this,Nr);ee(this,ks,n),this.setOptions(r),this.bindMethods(),ye(this,Vr,Yu).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=k(this,ks).defaultMutationOptions(n),Ad(this.options,r)||k(this,ks).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Qt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Fi(r.mutationKey)!==Fi(this.options.mutationKey)?this.reset():((s=k(this,Qt))==null?void 0:s.state.status)==="pending"&&k(this,Qt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=k(this,Qt))==null||n.removeObserver(this)}onMutationUpdate(n){ye(this,Vr,Yu).call(this),ye(this,Vr,$m).call(this,n)}getCurrentResult(){return k(this,Ts)}reset(){var n;(n=k(this,Qt))==null||n.removeObserver(this),ee(this,Qt,void 0),ye(this,Vr,Yu).call(this),ye(this,Vr,$m).call(this)}mutate(n,r){var s;return ee(this,Nr,r),(s=k(this,Qt))==null||s.removeObserver(this),ee(this,Qt,k(this,ks).getMutationCache().build(k(this,ks),this.options)),k(this,Qt).addObserver(this),k(this,Qt).execute(n)}},ks=new WeakMap,Ts=new WeakMap,Qt=new WeakMap,Nr=new WeakMap,Vr=new WeakSet,Yu=function(){var r;const n=((r=k(this,Qt))==null?void 0:r.state)??$C();ee(this,Ts,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},$m=function(n){pt.batch(()=>{var r,s,i,o,a,l,c,u;if(k(this,Nr)&&this.hasListeners()){const f=k(this,Ts).variables,h=k(this,Ts).context;(n==null?void 0:n.type)==="success"?((s=(r=k(this,Nr)).onSuccess)==null||s.call(r,n.data,f,h),(o=(i=k(this,Nr)).onSettled)==null||o.call(i,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((l=(a=k(this,Nr)).onError)==null||l.call(a,n.error,f,h),(u=(c=k(this,Nr)).onSettled)==null||u.call(c,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(k(this,Ts))})})},n1),UC=p.createContext(void 0),Af=e=>{const t=p.useContext(UC);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YM=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(UC.Provider,{value:e,children:t})),BC=p.createContext(!1),ZM=()=>p.useContext(BC);BC.Provider;function XM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JM=p.createContext(XM()),eD=()=>p.useContext(JM);function zC(e,t){return typeof e=="function"?e(...t):!!e}function WC(){}var tD=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},nD=e=>{p.useEffect(()=>{e.clearReset()},[e])},rD=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&zC(n,[e.error,r]),sD=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},iD=(e,t)=>e.isLoading&&e.isFetching&&!t,oD=(e,t)=>
67(e==null?void 0:e.suspense)&&t.isPending,fw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function aD(e,t,n){var u,f,h,m,y;const r=Af(),s=ZM(),i=eD(),o=r.defaultQueryOptions(e);(f=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||f.call(u,o),o._optimisticResults=s?"isRestoring":"optimistic",sD(o),tD(o,i),nD(i);const a=!r.getQueryCache().get(o.queryHash),[l]=p.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(p.useSyncExternalStore(p.useCallback(g=>{const w=s?()=>{}:l.subscribe(pt.batchCalls(g));return l.updateResult(),w},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),oD(o,c))throw fw(o,l,i);if(rD({result:c,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((m=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||m.call(h,o,c),o.experimental_prefetchInRender&&!Li&&iD(c,s)){const g=a?fw(o,l,i):(y=r.getQueryCache().get(o.queryHash))==null?void 0:y.promise;g==null||g.catch(WC).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function On(e,t){return aD(e,KM)}function ai(e,t){const n=Af(),[r]=p.useState(()=>new QM(n,e));p.useEffect(()=>{r.setOptions(e)},[r,e]);const s=p.useSyncExternalStore(p.useCallback(o=>r.subscribe(pt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=p.useCallback((o,a)=>{r.mutate(o,a).catch(WC)},[r]);if(s.error&&zC(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const lD=1,cD=1e6;let Qh=0;function uD(){return Qh=(Qh+1)%Number.MAX_SAFE_INTEGER,Qh.toString()}const Yh=new Map,hw=e=>{if(Yh.has(e))return;const t=setTimeout(()=>{Yh.delete(e),Rl({type:"REMOVE_TOAST",toastId:e})},cD);Yh.set(e,t)},dD=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,lD)};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?hw(n):e.toasts.forEach(r=>{hw(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)}}},Zu=[];let Xu={toasts:[]};function Rl(e){Xu=dD(Xu,e),Zu.forEach(t=>{t(Xu)})}function fD({...e}){const t=uD(),n=s=>Rl({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>Rl({type:"DISMISS_TOAST",toastId:t});return Rl({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function ty(){const[e,t]=p.useState(Xu);return p.useEffect(()=>(Zu.push(t),()=>{const n=Zu.indexOf(t);n>-1&&Zu.splice(n,1)}),[e]),{...e,toast:fD,dismiss:n=>Rl({type:"DISMISS_TOAST",toastId:n})}}function Y(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 hD(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Of(...e){return t=>e.forEach(n=>hD(n,t))}function De(...e){return p.useCallback(Of(...e),e)}function pD(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function c(f){const{scope:h,children:m,...y}=f,g=(h==null?void 0:h[e][l])||a,w=p.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:w,children:m})}function u(f,h){const m=(h==null?void 0:h[e][l])||a,y=p.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,mD(s,...t)]}function mD(...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((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var rn=p.forwardRef((e,t)=>
vendor: 10,763 bytes, line 67
67{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(gD);if(i){const o=i.props.children,a=s.map(l=>l===i?p.Children.count(o)>1?p.Children.only(null):p.isValidElement(o)?o.props.children:null:l);return d.jsx(Vm,{...r,ref:t,children:p.isValidElement(o)?p.cloneElement(o,void 0,a):null})}return d.jsx(Vm,{...r,ref:t,children:n})});rn.displayName="Slot";var Vm=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const s=yD(n);return p.cloneElement(n,{...vD(r,n.props),ref:t?Of(t,s):s})}return p.Children.count(n)>1?p.Children.only(null):null});Vm.displayName="SlotClone";var ny=({children:e})=>d.jsx(d.Fragment,{children:e});function gD(e){return p.isValidElement(e)&&e.type===ny}function vD(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]=(...a)=>{i(...a),s(...a)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...e,...n}}function yD(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 Mf(e){const t=e+"CollectionProvider",[n,r]=pD(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:g}=m,w=F.useRef(null),x=F.useRef(new Map).current;return d.jsx(s,{scope:y,itemMap:x,collectionRef:w,children:g})};o.displayName=t;const a=e+"CollectionSlot",l=F.forwardRef((m,y)=>{const{scope:g,children:w}=m,x=i(a,g),v=De(y,x.collectionRef);return d.jsx(rn,{ref:v,children:w})});l.displayName=a;const c=e+"CollectionItemSlot",u="data-radix-collection-item",f=F.forwardRef((m,y)=>{const{scope:g,children:w,...x}=m,v=F.useRef(null),b=De(y,v),_=i(c,g);return F.useEffect(()=>(_.itemMap.set(v,{ref:v,...x}),()=>void _.itemMap.delete(v))),d.jsx(rn,{[u]:"",ref:b,children:w})});f.displayName=c;function h(m){const y=i(e+"CollectionConsumer",m);return F.useCallback(()=>{const w=y.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((_,S)=>x.indexOf(_.ref.current)-x.indexOf(S.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:l,ItemSlot:f},h,r]}function xD(e,t){const n=p.createContext(t),r=i=>{const{children:o,...a}=i,l=p.useMemo(()=>a,Object.values(a));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function s(i){const o=p.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 Zr(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];const c=f=>{var x;const{scope:h,children:m,...y}=f,g=((x=h==null?void 0:h[e])==null?void 0:x[l])||a,w=p.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:w,children:m})};c.displayName=i+"Provider";function u(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=p.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,wD(s,...t)]}function wD(...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((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var bD=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ce=bD.reduce((e,t)=>{const n=p.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?rn:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ry(e,t){e&&Ki.flushSync(()=>e.dispatchEvent(t))}function Tt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function _D(e,t=globalThis==null?void 0:globalThis.document){const n=Tt(e);p.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 SD="DismissableLayer",Um="dismissableLayer.update",CD="dismissableLayer.pointerDownOutside",ED="dismissableLayer.focusOutside",pw,HC=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ra=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,c=p.useContext(HC),[u,f]=p.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),y=De(t,T=>f(T)),g=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(w),v=u?g.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,_=v>=x,S=TD(T=>{const C=T.target,M=[...c.branches].some(I=>I.contains(C));!_||M||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},h),P=PD(T=>{const C=T.target;[...c.branches].some(I=>I.contains(C))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},h);return _D(T=>{v===c.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),p.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(pw=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),mw(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=pw)}},[u,h,n,c]),p.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),mw())},[u,c]),p.useEffect(()=>{const T=()=>m({});return document.addEventListener(Um,T),()=>document.removeEventListener(Um,T)},[]),d.jsx(ce.div,{...l,ref:y,style:{pointerEvents:b?_?"auto":"none":void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,S.onPointerDownCapture)})});Ra.displayName=SD;var kD="DismissableLayerBranch",KC=p.forwardRef((e,t)=>{const n=p.useContext(HC),r=p.useRef(null),s=De(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),d.jsx(ce.div,{...e,ref:s})});KC.displayName=kD;function TD(e,t=globalThis==null?void 0:globalThis.document){const n=Tt(e),r=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){GC(CD,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}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=Tt(e),r=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!r.current&&GC(ED,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 mw(){const e=new CustomEvent(Um);document.dispatchEvent(e)}function GC(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?ry(s,i):s.dispatchEvent(i)}var jD=Ra,RD=KC,bt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},ND="Portal",Dc=p.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=p.useState(!1);bt(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?vC.createPortal(d.jsx(ce.div,{...r,ref:t}),o):null});Dc.displayName=ND;function AD(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Zn=e=>{const{present:t,children:n}=e,r=OD(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=De(r.ref,MD(s));return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:i}):null};Zn.displayName="Presence";function OD(e){const[t,n]=p.useState(),r=p.useRef({}),s=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[a,l]=AD(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=bu(r.current);i.current=a==="mounted"?c:"none"},[a]),bt(()=>{const c=r.current,u=s.current;if(u!==e){const h=i.current,m=bu(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),bt(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=m=>{const g=bu(r.current).includes(m.animationName);if(m.target===t&&g&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},h=m=>{m.target===t&&(i.current=bu(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function bu(e){return(e==null?void 0:e.animationName)||"none"}function MD(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 Bs({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=DD({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=Tt(n),l=p.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else s(c)},[i,e,s,a]);return[o,l]}function DD({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,s=p.useRef(r),i=Tt(t);return p.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var ID="VisuallyHidden",Ic=p.forwardRef((e,t)=>
67d.jsx(ce.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ic.displayName=ID;var LD=Ic,sy="ToastProvider",[iy,FD,$D]=Mf("Toast"),[qC,_H]=Zr("Toast",[$D]),[VD,Df]=qC(sy),QC=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=p.useState(null),[c,u]=p.useState(0),f=p.useRef(!1),h=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${sy}\`. Expected non-empty \`string\`.`),d.jsx(iy.Provider,{scope:t,children:d.jsx(VD,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>u(m=>m+1),[]),onToastRemove:p.useCallback(()=>u(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};QC.displayName=sy;var YC="ToastViewport",UD=["F8"],Bm="toast.viewportPause",zm="toast.viewportResume",ZC=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=UD,label:s="Notifications ({hotkey})",...i}=e,o=Df(YC,n),a=FD(n),l=p.useRef(null),c=p.useRef(null),u=p.useRef(null),f=p.useRef(null),h=De(t,f,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;p.useEffect(()=>{const w=x=>{var b;r.length!==0&&r.every(_=>x[_]||x.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),p.useEffect(()=>{const w=l.current,x=f.current;if(y&&w&&x){const v=()=>{if(!o.isClosePausedRef.current){const P=new CustomEvent(Bm);x.dispatchEvent(P),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const P=new CustomEvent(zm);x.dispatchEvent(P),o.isClosePausedRef.current=!1}},_=P=>{!w.contains(P.relatedTarget)&&b()},S=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",_),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",S),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[y,o.isClosePausedRef]);const g=p.useCallback(({tabbingDirection:w})=>{const v=a().map(b=>{const _=b.ref.current,S=[_,...eI(_)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return p.useEffect(()=>{const w=f.current;if(w){const x=v=>{var S,P,T;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const C=document.activeElement,M=v.shiftKey;if(v.target===w&&M){(S=c.current)==null||S.focus();return}const A=g({tabbingDirection:M?"backwards":"forwards"}),$=A.findIndex(L=>L===C);Zh(A.slice($+1))?v.preventDefault():M?(P=c.current)==null||P.focus():(T=u.current)==null||T.focus()}};return w.addEventListener("keydown",x),()=>w.removeEventListener("keydown",x)}},[a,g]),d.jsxs(RD,{ref:l,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&d.jsx(Wm,{ref:c,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});Zh(w)}}),d.jsx(iy.Slot,{scope:n,children:d.jsx(ce.ol,{tabIndex:-1,...i,ref:h})}),y&&d.jsx(Wm,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});Zh(w)}})]})});ZC.displayName=YC;var XC="ToastFocusProxy",Wm=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=Df(XC,n);return d.jsx(Ic,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&r()}})});Wm.displayName=XC;var If="Toast",BD="toast.swipeStart",zD="toast.swipeMove",WD="toast.swipeCancel",HD="toast.swipeEnd",JC=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=Bs({prop:r,defaultProp:s,onChange:i});return d.jsx(Zn,{present:n||a,children:d.jsx(qD,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Tt(e.onPause),onResume:Tt(e.onResume),onSwipeStart:Y(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Y(e.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Y(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Y(e.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});JC.displayName=If;var[KD,GD]=qC(If,{onClose(){}}),qD=p.forwardRef((e,t)=>
67{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...y}=e,g=Df(If,n),[w,x]=p.useState(null),v=De(t,L=>x(L)),b=p.useRef(null),_=p.useRef(null),S=s||g.duration,P=p.useRef(0),T=p.useRef(S),C=p.useRef(0),{onToastAdd:M,onToastRemove:I}=g,R=Tt(()=>{var Z;(w==null?void 0:w.contains(document.activeElement))&&((Z=g.viewport)==null||Z.focus()),o()}),A=p.useCallback(L=>{!L||L===1/0||(window.clearTimeout(C.current),P.current=new Date().getTime(),C.current=window.setTimeout(R,L))},[R]);p.useEffect(()=>{const L=g.viewport;if(L){const Z=()=>{A(T.current),c==null||c()},V=()=>{const H=new Date().getTime()-P.current;T.current=T.current-H,window.clearTimeout(C.current),l==null||l()};return L.addEventListener(Bm,V),L.addEventListener(zm,Z),()=>{L.removeEventListener(Bm,V),L.removeEventListener(zm,Z)}}},[g.viewport,S,l,c,A]),p.useEffect(()=>{i&&!g.isClosePausedRef.current&&A(S)},[i,S,g.isClosePausedRef,A]),p.useEffect(()=>(M(),()=>I()),[M,I]);const $=p.useMemo(()=>w?oE(w):null,[w]);return g.viewport?d.jsxs(d.Fragment,{children:[$&&d.jsx(QD,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),d.jsx(KD,{scope:n,onClose:R,children:Ki.createPortal(d.jsx(iy.ItemSlot,{scope:n,children:d.jsx(jD,{asChild:!0,onEscapeKeyDown:Y(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||R(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Y(e.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,R()))}),onPointerDown:Y(e.onPointerDown,L=>{L.button===0&&(b.current={x:L.clientX,y:L.clientY})}),onPointerMove:Y(e.onPointerMove,L=>{if(!b.current)return;const Z=L.clientX-b.current.x,V=L.clientY-b.current.y,H=!!_.current,j=["left","right"].includes(g.swipeDirection),O=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,K=j?O(0,Z):0,G=j?0:O(0,V),ne=L.pointerType==="touch"?10:2,fe={x:K,y:G},Se={originalEvent:L,delta:fe};H?(_.current=fe,_u(zD,f,Se,{discrete:!1})):gw(fe,g.swipeDirection,ne)?(_.current=fe,_u(BD,u,Se,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(Z)>ne||Math.abs(V)>ne)&&(b.current=null)}),onPointerUp:Y(e.onPointerUp,L=>{const Z=_.current,V=L.target;if(V.hasPointerCapture(L.pointerId)&&V.releasePointerCapture(L.pointerId),_.current=null,b.current=null,Z){const H=L.currentTarget,j={originalEvent:L,delta:Z};gw(Z,g.swipeDirection,g.swipeThreshold)?_u(HD,m,j,{discrete:!0}):_u(WD,h,j,{discrete:!0}),H.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),QD=e=>{const{__scopeToast:t,children:n,...r}=e,s=Df(If,t),[i,o]=p.useState(!1),[a,l]=p.useState(!1);return XD(()=>o(!0)),p.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx(Dc,{asChild:!0,children:d.jsx(Ic,{...r,children:i&&d.jsxs(d.Fragment,{children:[s.label," ",n]})})})},YD="ToastTitle",eE=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(ce.div,{...r,ref:t})});eE.displayName=YD;var ZD="ToastDescription",tE=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return d.jsx(ce.div,{...r,ref:t})});tE.displayName=ZD;var nE="ToastAction",rE=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?d.jsx(iE,{altText:n,asChild:!0,children:d.jsx(oy,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nE}\`. Expected non-empty \`string\`.`),null)});rE.displayName=nE;var sE="ToastClose",oy=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=GD(sE,n);return d.jsx(iE,{asChild:!0,children:d.jsx(ce.button,{type:"button",...r,ref:t,onClick:Y(e.onClick,s.onClose)})})});oy.displayName=sE;var iE=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return d.jsx(ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function oE(e){const t=[];
vendor: 6,028 bytes, lines 67-126
67return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),JD(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(...oE(r))}}),t}function _u(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?ry(s,i):s.dispatchEvent(i)}var gw=(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 XD(e=()=>{}){const t=Tt(e);bt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function JD(e){return e.nodeType===e.ELEMENT_NODE}function eI(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 Zh(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var tI=QC,aE=ZC,lE=JC,cE=eE,uE=tE,dE=rE,fE=oy;function hE(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=hE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pE(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=hE(e))&&(r&&(r+=" "),r+=t);return r}const vw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yw=pE,Na=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return yw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const h=vw(u)||vw(f);return s[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...m}=u;return Object.entries(m).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...c,f,h]:c},[]);return yw(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 68 * @license lucide-react v0.462.0 - ISC 69 * 70 * This source code is licensed under the ISC license. 71 * See the LICENSE file in the root directory of this source tree. 72 */const nI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mE=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 73 * @license lucide-react v0.462.0 - ISC 74 * 75 * This source code is licensed under the ISC license. 76 * See the LICENSE file in the root directory of this source tree. 77 */var rI={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"};/** 78 * @license lucide-react v0.462.0 - ISC 79 * 80 * This source code is licensed under the ISC license. 81 * See the LICENSE file in the root directory of this source tree. 82 */const sI=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},l)=>p.createElement("svg",{ref:l,...rI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mE("lucide",s),...a},[...o.map(([c,u])=>p.createElement(c,u)),...Array.isArray(i)?i:[i]]));/** 83 * @license lucide-react v0.462.0 - ISC 84 * 85 * This source code is licensed under the ISC license. 86 * See the LICENSE file in the root directory of this source tree. 87 */const _e=(e,t)=>{const n=p.forwardRef(({className:r,...s},i)=>p.createElement(sI,{ref:i,iconNode:t,className:mE(`lucide-${nI(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 88 * @license lucide-react v0.462.0 - ISC 89 * 90 * This source code is licensed under the ISC license. 91 * See the LICENSE file in the root directory of this source tree. 92 */const Xh=_e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 93 * @license lucide-react v0.462.0 - ISC 94 * 95 * This source code is licensed under the ISC license. 96 * See the LICENSE file in the root directory of this source tree. 97 */const iI=_e("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"}]]);/** 98 * @license lucide-react v0.462.0 - ISC 99 * 100 * This source code is licensed under the ISC license. 101 * See the LICENSE file in the root directory of this source tree. 102 */const gE=_e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 103 * @license lucide-react v0.462.0 - ISC 104 * 105 * This source code is licensed under the ISC license. 106 * See the LICENSE file in the root directory of this source tree. 107 */const vE=_e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 108 * @license lucide-react v0.462.0 - ISC 109 * 110 * This source code is licensed under the ISC license. 111 * See the LICENSE file in the root directory of this source tree. 112 */const yE=_e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 113 * @license lucide-react v0.462.0 - ISC 114 * 115 * This source code is licensed under the ISC license. 116 * See the LICENSE file in the root directory of this source tree. 117 */const oI=_e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 118 * @license lucide-react v0.462.0 - ISC 119 * 120 * This source code is licensed under the ISC license. 121 * See the LICENSE file in the root directory of this source tree. 122 */const aI=_e("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 123 * @license lucide-react v0.462.0 - ISC 124 * 125 * This source code is licensed under the ISC license. 126 * See the LICENSE file in the root directory of this source tree.
127 */const xE=_e("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** 128 * @license lucide-react v0.462.0 - ISC 129 * 130 * This source code is licensed under the ISC license. 131 * See the LICENSE file in the root directory of this source tree. 132 */const xw=_e("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 133 * @license lucide-react v0.462.0 - ISC 134 * 135 * This source code is licensed under the ISC license. 136 * See the LICENSE file in the root directory of this source tree. 137 */const wE=_e("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** 138 * @license lucide-react v0.462.0 - ISC 139 * 140 * This source code is licensed under the ISC license. 141 * See the LICENSE file in the root directory of this source tree. 142 */const lI=_e("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"}]]);/** 143 * @license lucide-react v0.462.0 - ISC 144 * 145 * This source code is licensed under the ISC license. 146 * See the LICENSE file in the root directory of this source tree. 147 */const cI=_e("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"}]]);/** 148 * @license lucide-react v0.462.0 - ISC 149 * 150 * This source code is licensed under the ISC license. 151 * See the LICENSE file in the root directory of this source tree. 152 */const uI=_e("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** 153 * @license lucide-react v0.462.0 - ISC 154 * 155 * This source code is licensed under the ISC license. 156 * See the LICENSE file in the root directory of this source tree. 157 */const dI=_e("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 158 * @license lucide-react v0.462.0 - ISC 159 * 160 * This source code is licensed under the ISC license. 161 * See the LICENSE file in the root directory of this source tree. 162 */const fI=_e("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 163 * @license lucide-react v0.462.0 - ISC 164 * 165 * This source code is licensed under the ISC license. 166 * See the LICENSE file in the root directory of this source tree. 167 */const ww=_e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 168 * @license lucide-react v0.462.0 - ISC 169 * 170 * This source code is licensed under the ISC license. 171 * See the LICENSE file in the root directory of this source tree. 172 */const hI=_e("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"}]]);/** 173 * @license lucide-react v0.462.0 - ISC 174 * 175 * This source code is licensed under the ISC license. 176 * See the LICENSE file in the root directory of this source tree. 177 */const pI=_e("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"}]]);/** 178 * @license lucide-react v0.462.0 - ISC 179 * 180 * This source code is licensed under the ISC license. 181 * See the LICENSE file in the root directory of this source tree. 182 */const mI=_e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 183 * @license lucide-react v0.462.0 - ISC 184 * 185 * This source code is licensed under the ISC license. 186 * See the LICENSE file in the root directory of this source tree.
187 */const gI=_e("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 188 * @license lucide-react v0.462.0 - ISC 189 * 190 * This source code is licensed under the ISC license. 191 * See the LICENSE file in the root directory of this source tree. 192 */const bw=_e("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 193 * @license lucide-react v0.462.0 - ISC 194 * 195 * This source code is licensed under the ISC license. 196 * See the LICENSE file in the root directory of this source tree. 197 */const _w=_e("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"}]]);/** 198 * @license lucide-react v0.462.0 - ISC 199 * 200 * This source code is licensed under the ISC license. 201 * See the LICENSE file in the root directory of this source tree. 202 */const vI=_e("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"}]]);/** 203 * @license lucide-react v0.462.0 - ISC 204 * 205 * This source code is licensed under the ISC license. 206 * See the LICENSE file in the root directory of this source tree. 207 */const yI=_e("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"}]]);/** 208 * @license lucide-react v0.462.0 - ISC 209 * 210 * This source code is licensed under the ISC license. 211 * See the LICENSE file in the root directory of this source tree. 212 */const xI=_e("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 213 * @license lucide-react v0.462.0 - ISC 214 * 215 * This source code is licensed under the ISC license. 216 * See the LICENSE file in the root directory of this source tree. 217 */const wI=_e("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/** 218 * @license lucide-react v0.462.0 - ISC 219 * 220 * This source code is licensed under the ISC license. 221 * See the LICENSE file in the root directory of this source tree. 222 */const bI=_e("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** 223 * @license lucide-react v0.462.0 - ISC 224 * 225 * This source code is licensed under the ISC license. 226 * See the LICENSE file in the root directory of this source tree. 227 */const _I=_e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 228 * @license lucide-react v0.462.0 - ISC 229 * 230 * This source code is licensed under the ISC license. 231 * See the LICENSE file in the root directory of this source tree. 232 */const SI=_e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 233 * @license lucide-react v0.462.0 - ISC 234 * 235 * This source code is licensed under the ISC license. 236 * See the LICENSE file in the root directory of this source tree. 237 */const CI=_e("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",key:"oel41y"}]]);/** 238 * @license lucide-react v0.462.0 - ISC 239 * 240 * This source code is licensed under the ISC license. 241 * See the LICENSE file in the root directory of this source tree. 242 */const Sw=_e("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/** 243 * @license lucide-react v0.462.0 - ISC 244 * 245 * This source code is licensed under the ISC license. 246 * See the LICENSE file in the root directory of this source tree. 247 */const EI=_e("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"}]]);/** 248 * @license lucide-react v0.462.0 - ISC 249 * 250 * This source code is licensed under the ISC license. 251 * See the LICENSE file in the root directory of this source tree. 252 */const Cw=_e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 9,282 bytes, lines 252-277
252],["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"}]]);/** 253 * @license lucide-react v0.462.0 - ISC 254 * 255 * This source code is licensed under the ISC license. 256 * See the LICENSE file in the root directory of this source tree. 257 */const kI=_e("Twitter",[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]]);/** 258 * @license lucide-react v0.462.0 - ISC 259 * 260 * This source code is licensed under the ISC license. 261 * See the LICENSE file in the root directory of this source tree. 262 */const TI=_e("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"}]]);/** 263 * @license lucide-react v0.462.0 - ISC 264 * 265 * This source code is licensed under the ISC license. 266 * See the LICENSE file in the root directory of this source tree. 267 */const Su=_e("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"}]]);/** 268 * @license lucide-react v0.462.0 - ISC 269 * 270 * This source code is licensed under the ISC license. 271 * See the LICENSE file in the root directory of this source tree. 272 */const PI=_e("Vote",[["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}],["path",{d:"M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z",key:"1ezoue"}],["path",{d:"M22 19H2",key:"nuriw5"}]]);/** 273 * @license lucide-react v0.462.0 - ISC 274 * 275 * This source code is licensed under the ISC license. 276 * See the LICENSE file in the root directory of this source tree. 277 */const ay=_e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ly="-",jI=e=>{const t=NI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(ly);return a[0]===""&&a.length!==1&&a.shift(),bE(a,t)||RI(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},bE=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?bE(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(ly);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Ew=/^\[(.+)\]$/,RI=e=>{if(Ew.test(e)){const t=Ew.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},NI=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return OI(Object.entries(e.classGroups),n).forEach(([i,o])=>{Hm(o,r,i,t)}),r},Hm=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:kw(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(AI(s)){Hm(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{Hm(o,kw(t,i),n,r)})})},kw=(e,t)=>{let n=e;return t.split(ly).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},AI=e=>e.isThemeGetter,OI=(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,a])=>[t+o,a])):i);return[n,s]}):e,MI=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)}}},_E="!",DI=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let c=0,u=0,f;for(let w=0;w<a.length;w++){let x=a[w];if(c===0){if(x===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(u,w)),u=w+i;continue}if(x==="/"){f=w;continue}}x==="["?c++:x==="]"&&c--}const h=l.length===0?a:a.substring(u),m=h.startsWith(_E),y=m?h.substring(1):h,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:o}):o},II=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},LI=e=>({cache:MI(e.cacheSize),parseClassName:DI(e),...jI(e)}),FI=/\s+/,$I=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(FI);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=n(c);let y=!!m,g=r(y?h.substring(0,m):h);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const w=II(u).join(":"),x=f?w+_E:w,v=x+g;if(i.includes(v))continue;i.push(v);const b=s(g,y);for(let _=0;_<b.length;++_){const S=b[_];i.push(x+S)}a=c+(a.length>0?" "+a:a)}return a};function VI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=SE(t))&&(r&&(r+=" "),r+=n);return r}const SE=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=SE(e[r]))&&(n&&(n+=" "),n+=t);return n};function UI(e,...t){let n,r,s,i=o;function o(l){const c=t.reduce((u,f)=>f(u),e());return n=LI(c),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=$I(l,n);return s(l,u),u}return function(){return i(VI.apply(null,arguments))}}const He=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},CE=/^\[(?:([a-z-]+):)?(.+)\]$/i,BI=/^\d+\/\d+$/,zI=new Set(["px","full","screen"]),WI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HI=/\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$/,KI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,GI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cr=e=>$o(e)||zI.has(e)||BI.test(e),rs=e=>Aa(e,"length",nL),$o=e=>!!e&&!Number.isNaN(Number(e)),Jh=e=>Aa(e,"number",$o),Za=e=>!!e&&Number.isInteger(Number(e)),QI=e=>e.endsWith("%")&&$o(e.slice(0,-1)),ve=e=>CE.test(e),ss=e=>WI.test(e),YI=new Set(["length","size","percentage"]),ZI=e=>Aa(e,YI,EE),XI=e=>Aa(e,"position",EE),JI=new Set(["image","url"]),eL=e=>Aa(e,JI,sL),tL=e=>Aa(e,"",rL),Xa=()=>!0,Aa=(e,t,n)=>{const r=CE.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},nL=e=>HI.test(e)&&!KI.test(e),EE=()=>!1,rL=e=>GI.test(e),sL=e=>qI.test(e),iL=()=>{const e=He("colors"),t=He("spacing"),n=He("blur"),r=He("brightness"),s=He("borderColor"),i=He("borderRadius"),o=He("borderSpacing"),a=He("borderWidth"),l=He("contrast"),c=He("grayscale"),u=He("hueRotate"),f=He("invert"),h=He("gap"),m=He("gradientColorStops"),y=He("gradientColorStopPositions"),g=He("inset"),w=He("margin"),x=He("opacity"),v=He("padding"),b=He("saturate"),_=He("scale"),S=He("sepia"),P=He("skew"),T=He("space"),C=He("translate"),M=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto",ve,t],A=()=>[ve,t],$=()=>["",Cr,rs],L=()=>["auto",$o,ve],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],V=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ve],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[$o,ve];return{cacheSize:500,separator:":",theme:{colors:[Xa],spacing:[Cr,rs],blur:["none","",ss,ve],brightness:G(),borderColor:[e],borderRadius:["none","","full",ss,ve],borderSpacing:A(),borderWidth:$(),contrast:G(),grayscale:O(),hueRotate:G(),invert:O(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[QI,rs],inset:R(),margin:R(),opacity:G(),padding:A(),saturate:G(),scale:G(),sepia:O(),skew:G(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[ss]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:[...Z(),ve]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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]}
vendor: 9,946 bytes, line 277
277],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Za,ve]}],basis:[{basis:R()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Za,ve]}],"grid-cols":[{"grid-cols":[Xa]}],"col-start-end":[{col:["auto",{span:["full",Za,ve]},ve]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Xa]}],"row-start-end":[{row:["auto",{span:[Za,ve]},ve]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[ss]},ss]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ss,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jh]}],"font-family":[{font:[Xa]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",$o,Jh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cr,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...V(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cr,rs]}],"underline-offset":[{"underline-offset":["auto",Cr,ve]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),XI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ZI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},eL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...V(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:V()}],"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:["",...V()]}],"outline-offset":[{"outline-offset":[Cr,ve]}],"outline-w":[{outline:[Cr,rs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Cr,rs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ss,tL]}],"shadow-color":[{shadow:[Xa]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ss,ve]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"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",ve]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Za,ve]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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"]}
277],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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Cr,rs,Jh]}],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"]}}},oL=UI(iL);function U(...e){return oL(pE(e))}function aL(e){try{const t=new URL(e);return t.searchParams.set("ref","toolio.app"),t.toString()}catch{return e}}const lL=tI,kE=p.forwardRef(({className:e,...t},n)=>d.jsx(aE,{ref:n,className:U("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}));kE.displayName=aE.displayName;const cL=Na("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"}}),TE=p.forwardRef(({className:e,variant:t,...n},r)=>d.jsx(lE,{ref:r,className:U(cL({variant:t}),e),...n}));TE.displayName=lE.displayName;const uL=p.forwardRef(({className:e,...t},n)=>d.jsx(dE,{ref:n,className:U("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));uL.displayName=dE.displayName;const PE=p.forwardRef(({className:e,...t},n)=>d.jsx(fE,{ref:n,className:U("absolute right-2 top-2 rounded-md p-1 text-foreground
277/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:d.jsx(ay,{className:"h-4 w-4"})}));PE.displayName=fE.displayName;const jE=p.forwardRef(({className:e,...t},n)=>d.jsx(cE,{ref:n,className:U("text-sm font-semibold",e),...t}));jE.displayName=cE.displayName;const RE=p.forwardRef(({className:e,...t},n)=>d.jsx(uE,{ref:n,className:U("text-sm opacity-90",e),...t}));RE.displayName=uE.displayName;function dL(){const{toasts:e}=ty();return d.jsxs(lL,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return d.jsxs(TE,{...i,children:[d.jsxs("div",{className:"grid gap-1",children:[n&&d.jsx(jE,{children:n}),r&&d.jsx(RE,{children:r})]}),s,d.jsx(PE,{})]},t)}),d.jsx(kE,{})]})}var fL=e=>{switch(e){case"success":return mL;case"info":return vL;case"warning":return gL;case"error":return yL;default:return null}},hL=Array(12).fill(0),pL=({visible:e})=>F.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},F.createElement("div",{className:"sonner-spinner"},hL.map((t,n)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),mL=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"})),gL=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",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"})),vL=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"})),yL=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"})),xL=()=>{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},Km=1,wL=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:Km++,i=this.toasts.find(a=>a.id===s),o=e.dismissible===void 0?!0:e.dismissible;return i?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:n}),{...a,...e,id:s,dismissible:o,title:n}):a):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=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)=>
277this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.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;return r.then(async i=>{if(_L(i)&&!i.ok){s=!1;let o=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,a=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description;this.create({id:n,type:"error",message:o,description:a})}else if(t.success!==void 0){s=!1;let o=typeof t.success=="function"?await t.success(i):t.success,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"success",message:o,description:a})}}).catch(async i=>{if(t.error!==void 0){s=!1;let o=typeof t.error=="function"?await t.error(i):t.error,a=typeof t.description=="function"?await t.description(i):t.description;this.create({id:n,type:"error",message:o,description:a})}}).finally(()=>{var i;s&&(this.dismiss(n),n=void 0),(i=t.finally)==null||i.call(t)}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Km++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},cn=new wL,bL=(e,t)=>{let n=(t==null?void 0:t.id)||Km++;return cn.addToast({title:e,...t,id:n}),n},_L=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",SL=bL,CL=()=>cn.toasts,Fe=Object.assign(SL,{success:cn.success,info:cn.info,warning:cn.warning,error:cn.error,custom:cn.custom,message:cn.message,promise:cn.promise,dismiss:cn.dismiss,loading:cn.loading},{getHistory:CL});function EL(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))}EL(`: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}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-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;
277left: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;background:var(--gray1);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}: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:0;right:0;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}
277: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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);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-border: hsl(0, 0%, 20%);--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%);--error-text: hsl(358, 100%, 81%)}[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%)} 278`);function Cu(e){return e.label!==void 0}var kL=3,TL="32px",PL=4e3,jL=356,RL=14,NL=20,AL=200;function OL(...e){return e.filter(Boolean).join(" ")}var ML=e=>{var t,n,r,s,i,o,a,l,c,u;let{invert:f,toast:h,unstyled:m,interacting:y,setHeights:g,visibleToasts:w,heights:x,index:v,toasts:b,expanded:_,removeToast:S,defaultRichColors:P,closeButton:T,style:C,cancelButtonStyle:M,actionButtonStyle:I,className:R="",descriptionClassName:A="",duration:$,position:L,gap:Z,loadingIcon:V,expandByDefault:H,classNames:j,icons:O,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:G,cn:ne}=e,[fe,Se]=F.useState(!1),[Ye,he]=F.useState(!1),[se,we]=F.useState(!1),[Pe,Ce]=F.useState(!1),[Ae,Ne]=F.useState(0),[gt,Pt]=F.useState(0),Sr=F.useRef(null),on=F.useRef(null),Jr=v===0,E=v+1<=w,N=h.type,D=h.dism
278issible!==!1,X=h.className||"",Q=h.descriptionClassName||"",W=F.useMemo(()=>x.findIndex(ge=>ge.toastId===h.id)||0,[x,h.id]),oe=F.useMemo(()=>{var ge;return(ge=h.closeButton)!=null?ge:T},[h.closeButton,T]),me=F.useMemo(()=>h.duration||$||PL,[h.duration,$]),tt=F.useRef(0),ze=F.useRef(0),Jn=F.useRef(0),es=F.useRef(null),[Ji,Ua]=L.split("-"),eu=F.useMemo(()=>x.reduce((ge,We,Ve)=>Ve>=W?ge:ge+We.height,0),[x,W]),Ba=xL(),xh=h.invert||f,eo=N==="loading";ze.current=F.useMemo(()=>W*Z+eu,[W,eu]),F.useEffect(()=>{Se(!0)},[]),F.useLayoutEffect(()=>{if(!fe)return;let ge=on.current,We=ge.style.height;ge.style.height="auto";let Ve=ge.getBoundingClientRect().height;ge.style.height=We,Pt(Ve),g(er=>er.find(tr=>tr.toastId===h.id)?er.map(tr=>tr.toastId===h.id?{...tr,height:Ve}:tr):[{toastId:h.id,height:Ve,position:h.position},...er])},[fe,h.title,h.description,g,h.id]);let ts=F.useCallback(()=>{he(!0),Ne(ze.current),g(ge=>ge.filter(We=>We.toastId!==h.id)),setTimeout(()=>{S(h)},AL)},[h,S,g,ze]);F.useEffect(()=>{if(h.promise&&N==="loading"||h.duration===1/0||h.type==="loading")return;let ge,We=me;return _||y||G&&Ba?(()=>{if(Jn.current<tt.current){let Ve=new Date().getTime()-tt.current;We=We-Ve}Jn.current=new Date().getTime()})():We!==1/0&&(tt.current=new Date().getTime(),ge=setTimeout(()=>{var Ve;(Ve=h.onAutoClose)==null||Ve.call(h,h),ts()},We)),()=>clearTimeout(ge)},[_,y,H,h,me,ts,h.promise,N,G,Ba]),F.useEffect(()=>{let ge=on.current;if(ge){let We=ge.getBoundingClientRect().height;return Pt(We),g(Ve=>[{toastId:h.id,height:We,position:h.position},...Ve]),()=>g(Ve=>Ve.filter(er=>er.toastId!==h.id))}},[g,h.id]),F.useEffect(()=>{h.delete&&ts()},[ts,h.delete]);function sA(){return O!=null&&O.loading?F.createElement("div",{className:"sonner-loader","data-visible":N==="loading"},O.loading):V?F.createElement("div",{className:"sonner-loader","data-visible":N==="loading"},V):F.createElement(pL,{visible:N==="loading"})}return F.createElement("li",{"aria-live":h.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:on,className:ne(R,X,j==null?void 0:j.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[N],(n=h==null?void 0:h.classNames)==null?void 0:n[N]),"data-sonner-toast":"","data-rich-colors":(r=h.richColors)!=null?r:P,"data-styled":!(h.jsx||h.unstyled||m),"data-mounted":fe,"data-promise":!!h.promise,"data-removed":Ye,"data-visible":E,"data-y-position":Ji,"data-x-position":Ua,"data-index":v,"data-front":Jr,"data-swiping":se,"data-dismissible":D,"data-type":N,"data-invert":xh,"data-swipe-out":Pe,"data-expanded":!!(_||H&&fe),style:{"--index":v,"--toasts-before":v,"--z-index":b.length-v,"--offset":`${Ye?Ae:ze.current}px`,"--initial-height":H?"auto":`${gt}px`,...C,...h.style},onPointerDown:ge=>{eo||!D||(Sr.current=new Date,Ne(ze.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(we(!0),es.current={x:ge.clientX,y:ge.clientY}))},onPointerUp:()=>{var ge,We,Ve,er;if(Pe||!D)return;es.current=null;let tr=Number(((ge=on.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount").replace("px",""))||0),tu=new Date().getTime()-((We=Sr.current)==null?void 0:We.getTime()),iA=Math.abs(tr)/tu;if(Math.abs(tr)>=NL||iA>.11){Ne(ze.current),(Ve=h.onDismiss)==null||Ve.call(h,h),ts(),Ce(!0);return}(er=on.current)==null||er.style.setProperty("--swipe-amount","0px"),we(!1)},onPointerMove:ge=>{var We;if(!es.current||!D)return;let Ve=ge.clientY-es.current.y,er=ge.clientX-es.current.x,tr=(Ji==="top"?Math.min:Math.max)(0,Ve),tu=ge.pointerType==="touch"?10:2;Math.abs(tr)>tu?(We=on.current)==null||We.style.setProperty("--swipe-amount",`${Ve}px`):Math.abs(er)>tu&&(es.current=null)}},oe&&!h.jsx?F.createElement("button",{"aria-label":K,"data-disabled":eo,"data-close-button":!0,onClick:eo||!D?()=>{}:()=>{var ge;ts(),(ge=h.onDismiss)==null||ge.call(h,h)},className:ne(j==null?void 0:j.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},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"}))):null,h.jsx||F.isValidElement(h.title)?h.jsx||h.title:F.createElement(F.Fragment,null,N||h.icon||h.promise?F.createElement("div",{"data-icon":"",className:ne(j==null?void 0:j.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||sA():null,h.type!=="loading"?h.icon||(O==null?void 0:O[N])||fL(N):null):null,F.createElement("div",{"data-content":"",className:ne(j==null?void 0:j.content,(o=h==null?void 0:h.classNames)==null?void 0:o.content)},F.createElement("div",{"data-title":"",className:ne(j==null?void 0:j.title,(a=h==null?void 0:h.classNames)==null?void 0:a.title)},h.title),h.description?F.createElement("div",{"data-description":"",className:ne(A,Q,j==null?void 0:j.description,(l=h==null?void 0:h.classNames)==null?void 0:l.description)},h.description):null),F.isValidElement(h.cancel)?h.cancel:h.cancel&&Cu(h.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||M,onClick:ge=>{var We,Ve;Cu(h.cancel)&&D&&((Ve=(We=h.cancel).onClick)==null||Ve.call(We,ge),ts())},className:ne(j==null?void 0:j.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,F.isValidElement(h.action)?h.action:h.action&&Cu(h.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||I,onClick:ge=>{var We,Ve;Cu(h.action)&&(ge.defaultPrevented||((Ve=(We=h.action).onClick)==null||Ve.call(We,ge),ts()))},className:ne(j==null?void 0:j.actionButton,(u=h==null?void 0:h.classNames)==null?void 0:u.actionButton)},h.action.label):null))};function Tw(){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}var DL=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:c,duration:u,style:f,visibleToasts:h=kL,toastOptions:m,dir:y=Tw(),gap:g=RL,loadingIcon:w,icons:x,containerAriaLabel:v="Notifications",pauseWhenPageIsHidden:b,cn:_=OL}=e,[S,P]=F.useState([]),T=F.useMemo(()=>Array.from(new Set([n].concat(S.filter(G=>G.position).map(G=>G.position)))),[S,n]),[C,M]=F.useState([]),[I,R]=F.useState(!1),[A,$]=F.useState(!1),[L,Z]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
278k":"light"),V=F.useRef(null),H=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=F.useRef(null),O=F.useRef(!1),K=F.useCallback(G=>{var ne;(ne=S.find(fe=>fe.id===G.id))!=null&&ne.delete||cn.dismiss(G.id),P(fe=>fe.filter(({id:Se})=>Se!==G.id))},[S]);return F.useEffect(()=>cn.subscribe(G=>{if(G.dismiss){P(ne=>ne.map(fe=>fe.id===G.id?{...fe,delete:!0}:fe));return}setTimeout(()=>{vC.flushSync(()=>{P(ne=>{let fe=ne.findIndex(Se=>Se.id===G.id);return fe!==-1?[...ne.slice(0,fe),{...ne[fe],...G},...ne.slice(fe+1)]:[G,...ne]})})})}),[]),F.useEffect(()=>{if(l!=="system"){Z(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:G})=>{Z(G?"dark":"light")})},[l]),F.useEffect(()=>{S.length<=1&&R(!1)},[S]),F.useEffect(()=>{let G=ne=>{var fe,Se;r.every(Ye=>ne[Ye]||ne.code===Ye)&&(R(!0),(fe=V.current)==null||fe.focus()),ne.code==="Escape"&&(document.activeElement===V.current||(Se=V.current)!=null&&Se.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[r]),F.useEffect(()=>{if(V.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,O.current=!1)}},[V.current]),S.length?F.createElement("section",{"aria-label":`${v} ${H}`,tabIndex:-1},T.map((G,ne)=>{var fe;let[Se,Ye]=G.split("-");return F.createElement("ol",{key:G,dir:y==="auto"?Tw():y,tabIndex:-1,ref:V,className:o,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":Se,"data-x-position":Ye,style:{"--front-toast-height":`${((fe=C[0])==null?void 0:fe.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||TL,"--width":`${jL}px`,"--gap":`${g}px`,...f},onBlur:he=>{O.current&&!he.currentTarget.contains(he.relatedTarget)&&(O.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||O.current||(O.current=!0,j.current=he.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{A||R(!1)},onPointerDown:he=>{he.target instanceof HTMLElement&&he.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},S.filter(he=>!he.position&&ne===0||he.position===G).map((he,se)=>{var we,Pe;return F.createElement(ML,{key:he.id,icons:x,index:se,toast:he,defaultRichColors:c,duration:(we=m==null?void 0:m.duration)!=null?we:u,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:t,visibleToasts:h,closeButton:(Pe=m==null?void 0:m.closeButton)!=null?Pe:i,interacting:A,position:G,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:K,toasts:S.filter(Ce=>Ce.position==he.position),heights:C.filter(Ce=>Ce.position==he.position),setHeights:M,expandByDefault:s,gap:g,loadingIcon:w,expanded:I,pauseWhenPageIsHidden:b,cn:_})}))})):null},IL=p1.useId||(()=>{}),LL=0;function Gn(e){const[t,n]=p.useState(IL());return bt(()=>{n(r=>r??String(LL++))},[e]),t?`radix-${t}`:""}const FL=["top","right","bottom","left"],zs=Math.min,dn=Math.max,Md=Math.round,Eu=Math.floor,Ws=e=>({x:e,y:e}),$L={left:"right",right:"left",bottom:"top",top:"bottom"},VL={start:"end",end:"start"};function Gm(e,t,n){return dn(e,zs(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function Kr(e){return e.split("-")[0]}function Oa(e){return e.split("-")[1]}function cy(e){return e==="x"?"y":"x"}function uy(e){return e==="y"?"height":"width"}function Hs(e){return["top","bottom"].includes(Kr(e))?"y":"x"}function dy(e){return cy(Hs(e))}function UL(e,t,n){n===void 0&&(n=!1);const r=Oa(e),s=dy(e),i=uy(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Dd(o)),[o,Dd(o)]}function BL(e){const t=Dd(e);return[qm(e),t,qm(t)]}function qm(e){return e.replace(/start|end/g,t=>VL[t])}function zL(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function WL(e,t,n,r){const s=Oa(e);let i=zL(Kr(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(qm)))),i}function Dd(e){return e.replace(/left|right|bottom|top/g,t=>$L[t])}function HL(e){return{top:0,right:0,bottom:0,left:0,...e}}function NE(e){return typeof e!="number"?HL(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 Pw(e,t,n){let{reference:r,floating:s}=e;const i=Hs(t),o=dy(t),a=uy(o),l=Kr(t),c=i==="y",u=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-s.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-s.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Oa(t)){case"start":m[o]-=h*(n&&c?-1:1);break;case"end":m[o]+=h*(n&&c?-1:1);break}return m}const KL=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,306 bytes, line 278
278=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:u,y:f}=Pw(c,r,l),h=r,m={},y=0;for(let g=0;g<a.length;g++){const{name:w,fn:x}=a[g],{x:v,y:b,data:_,reset:S}=await x({x:u,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:m,rects:c,platform:o,elements:{reference:e,floating:t}});u=v??u,f=b??f,m={...m,[w]:{...m[w],..._}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:u,y:f}=Pw(c,h,l)),g=-1)}return{x:u,y:f,placement:h,strategy:s,middlewareData:m}};async function oc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Hr(t,e),y=NE(m),w=a[h?f==="floating"?"reference":"floating":f],x=Id(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=f==="floating"?{x:r,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Id(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:b,strategy:l}):v);return{top:(x.top-S.top+y.top)/_.y,bottom:(S.bottom-x.bottom+y.bottom)/_.y,left:(x.left-S.left+y.left)/_.x,right:(S.right-x.right+y.right)/_.x}}const GL=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Hr(e,t)||{};if(c==null)return{};const f=NE(u),h={x:n,y:r},m=dy(s),y=uy(m),g=await o.getDimensions(c),w=m==="y",x=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=i.reference[y]+i.reference[m]-h[m]-i.floating[y],S=h[m]-i.reference[m],P=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let T=P?P[b]:0;(!T||!await(o.isElement==null?void 0:o.isElement(P)))&&(T=a.floating[b]||i.floating[y]);const C=_/2-S/2,M=T/2-g[y]/2-1,I=zs(f[x],M),R=zs(f[v],M),A=I,$=T-g[y]-R,L=T/2-g[y]/2+C,Z=Gm(A,L,$),V=!l.arrow&&Oa(s)!=null&&L!==Z&&i.reference[y]/2-(L<A?I:R)-g[y]/2<0,H=V?L<A?L-A:L-$:0;return{[m]:h[m]+H,data:{[m]:Z,centerOffset:L-Z-H,...V&&{alignmentOffset:H}},reset:V}}}),qL=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:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=Hr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Kr(s),v=Hs(a),b=Kr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(b||!g?[Dd(a)]:BL(a)),P=y!=="none";!h&&P&&S.push(...WL(a,g,y,_));const T=[a,...S],C=await oc(t,w),M=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&M.push(C[x]),f){const L=UL(s,o,_);M.push(C[L[0]],C[L[1]])}if(I=[...I,{placement:s,overflows:M}],!M.every(L=>L<=0)){var R,A;const L=(((R=i.flip)==null?void 0:R.index)||0)+1,Z=T[L];if(Z)return{data:{index:L,overflows:I},reset:{placement:Z}};let V=(A=I.filter(H=>H.overflows[0]<=0).sort((H,j)=>H.overflows[1]-j.overflows[1])[0])==null?void 0:A.placement;if(!V)switch(m){case"bestFit":{var $;const H=($=I.filter(j=>{if(P){const O=Hs(j.placement);return O===v||O==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(O=>O>0).reduce((O,K)=>O+K,0)]).sort((j,O)=>j[1]-O[1])[0])==null?void 0:$[0];H&&(V=H);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}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 Rw(e){return FL.some(t=>e[t]>=0)}const QL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Hr(e,t);switch(r){case"referenceHidden":{const i=await oc(t,{...s,elementContext:"reference"}),o=jw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Rw(o)}}}case"escaped":{const i=await oc(t,{...s,altBoundary:!0}),o=jw(i,n.floating);return{data:{escapedOffsets:o,escaped:Rw(o)}}}default:return{}}}}};async function YL(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=Kr(n),a=Oa(n),l=Hs(n)==="y",c=["left","top"].includes(o)?-1:1,u=i&&l?-1:1,f=Hr(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const ZL=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:a}=t,l=await YL(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},XL=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:a={fn:w=>{let{x,y:v}=w;return{x,y:v}}},...l}=Hr(e,t),c={x:n,y:r},u=await oc(t,l),f=Hs(Kr(s)),h=cy(f);let m=c[h],y=c[f];if(i){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",v=m+u[w],b=m-u[x];m=Gm(v,m,b)}if(o){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",v=y+u[w],b=y-u[x];y=Gm(v,y,b)}const g=a.fn({...t,[h]:m,[f]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:i,[f]:o}}}}}},JL=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:s,rects:i,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Hr(e,t),u={x:n,y:r},f=Hs(s),h=cy(f);let m=u[h],y=u[f];const g=Hr(a,t),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const b=h==="y"?"height":"width",_=i.reference[h]-i.floating[b]+w.mainAxis,S=i.reference[h]+i.reference[b]-w.mainAxis;m<_?m=_:m>S&&(m=S)}if(c){var x,v;const b=h==="y"?"width":"height",_=["top","left"].includes(Kr(s)),S=i.reference[f]-i.floating[b]+(_&&((x=o.offset)==null?void 0:x[f])||0)+(_?0:w.crossAxis),P=i.reference[f]+i.reference[b]+(_?0:((v=o.offset)==null?void 0:v[f])||0)-(_?w.crossAxis:0);y<S?y=S:y>P&&(y=P)}return{[h]:m,[f]:y}}}},eF=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:a}=t,{apply:l=()=>{},...c}=Hr(e,t),u=await oc(t,c),f=Kr(s),h=Oa(s),m=Hs(s)==="y",{width:y,height:g}=i.floating;let w,x;f==="top"||f==="bottom"?(w=f,x=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,w=h==="end"?"top":"bottom");const v=g-u.top-u.bottom,b=y-u.left-u.right,_=zs(g-u[w],v),S=zs(y-u[x],b),P=!t.middlewareData.shift;let T=_,C=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=v),P&&!h){const I=dn(u.left,0),R=dn(u.right,0),A=dn(u.top,0),$=dn(u.bottom,0);m?C=y-2*(I!==0||R!==0?I+R:dn(u.left,u.right)):T=g-2*(A!==0||$!==0?A+$:dn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:T});const M=await o.getDimensions(a.floating);return y!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Lf(){return typeof window<"u"}function Ma(e){return AE(e)?(e.nodeName||"").toLowerCase():"#document"}function pn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _r(e){var t;return(t=(AE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AE(e){return Lf()?e instanceof Node||e instanceof pn(e).Node:!1}function Qn(e){return Lf()?e instanceof Element||e instanceof pn(e).Element:!1}function wr(e){return Lf()?e instanceof HTMLElement||e instanceof pn(e).HTMLElement:!1}function Nw(e){return!Lf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof pn(e).ShadowRoot}function Lc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function tF(e){return["table","td","th"].includes(Ma(e))}function Ff(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function fy(e){const t=hy(),n=Qn(e)?Yn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function nF(e){let t=Ks(e);for(;wr(t)&&!da(t);){if(fy(t))return t;if(Ff(t))return null;t=Ks(t)}return null}function hy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function da(e){return["html","body","#document"].includes(Ma(e))}function Yn(e){return pn(e).getComputedStyle(e)}function $f(e){return Qn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}
vendor: 7,508 bytes, line 278
278function Ks(e){if(Ma(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nw(e)&&e.host||_r(e);return Nw(t)?t.host:t}function OE(e){const t=Ks(e);return da(t)?e.ownerDocument?e.ownerDocument.body:e.body:wr(t)&&Lc(t)?t:OE(t)}function ac(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=OE(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=pn(s);if(i){const a=Qm(o);return t.concat(o,o.visualViewport||[],Lc(s)?s:[],a&&n?ac(a):[])}return t.concat(s,ac(s,[],n))}function Qm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ME(e){const t=Yn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=wr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Md(n)!==i||Md(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function py(e){return Qn(e)?e:e.contextElement}function Vo(e){const t=py(e);if(!wr(t))return Ws(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=ME(t);let o=(i?Md(n.width):n.width)/r,a=(i?Md(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const rF=Ws(0);function DE(e){const t=pn(e);return!hy()||!t.visualViewport?rF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sF(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==pn(e)?!1:t}function $i(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=py(e);let o=Ws(1);t&&(r?Qn(r)&&(o=Vo(r)):o=Vo(e));const a=sF(i,n,r)?DE(i):Ws(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(i){const h=pn(i),m=r&&Qn(r)?pn(r):r;let y=h,g=Qm(y);for(;g&&r&&m!==y;){const w=Vo(g),x=g.getBoundingClientRect(),v=Yn(g),b=x.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,_=x.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,f*=w.y,l+=b,c+=_,y=pn(g),g=Qm(y)}}return Id({width:u,height:f,x:l,y:c})}function iF(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=_r(r),a=t?Ff(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ws(1);const u=Ws(0),f=wr(r);if((f||!f&&!i)&&((Ma(r)!=="body"||Lc(o))&&(l=$f(r)),wr(r))){const h=$i(r);c=Vo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function oF(e){return Array.from(e.getClientRects())}function Ym(e,t){const n=$f(e).scrollLeft;return t?t.left+n:$i(_r(e)).left+n}function aF(e){const t=_r(e),n=$f(e),r=e.ownerDocument.body,s=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ym(e);const a=-n.scrollTop;return Yn(r).direction==="rtl"&&(o+=dn(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function lF(e,t){const n=pn(e),r=_r(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=hy();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function cF(e,t){const n=$i(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=wr(e)?Vo(e):Ws(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function Aw(e,t,n){let r;if(t==="viewport")r=lF(e,n);else if(t==="document")r=aF(_r(e));else if(Qn(t))r=cF(t,n);else{const s=DE(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return Id(r)}function IE(e,t){const n=Ks(e);return n===t||!Qn(n)||da(n)?!1:Yn(n).position==="fixed"||IE(n,t)}function uF(e,t){const n=t.get(e);if(n)return n;let r=ac(e,[],!1).filter(a=>Qn(a)&&Ma(a)!=="body"),s=null;const i=Yn(e).position==="fixed";let o=i?Ks(e):e;for(;Qn(o)&&!da(o);){const a=Yn(o),l=fy(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Lc(o)&&!l&&IE(e,o))?r=r.filter(u=>u!==o):s=a,o=Ks(o)}return t.set(e,r),r}function dF(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Ff(t)?[]:uF(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,u)=>{const f=Aw(t,u,s);return c.top=dn(f.top,c.top),c.right=zs(f.right,c.right),c.bottom=zs(f.bottom,c.bottom),c.left=dn(f.left,c.left),c},Aw(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function fF(e){const{width:t,height:n}=ME(e);return{width:t,height:n}}function hF(e,t,n){const r=wr(t),s=_r(t),i=n==="fixed",o=$i(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ws(0);if(r||!r&&!i)if((Ma(t)!=="body"||Lc(s))&&(a=$f(t)),r){const m=$i(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else s&&(l.x=Ym(s));let c=0,u=0;if(s&&!r&&!i){const m=s.getBoundingClientRect();u=m.top+a.scrollTop,c=m.left+a.scrollLeft-Ym(s,m)}const f=o.left+a.scrollLeft-l.x-c,h=o.top+a.scrollTop-l.y-u;return{x:f,y:h,width:o.width,height:o.height}}function ep(e){return Yn(e).position==="static"}function Ow(e,t){if(!wr(e)||Yn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _r(e)===n&&(n=n.ownerDocument.body),n}function LE(e,t){const n=pn(e);if(Ff(e))return n;if(!wr(e)){let s=Ks(e);for(;s&&!da(s);){if(Qn(s)&&!ep(s))return s;s=Ks(s)}return n}let r=Ow(e,t);for(;r&&tF(r)&&ep(r);)r=Ow(r,t);return r&&da(r)&&ep(r)&&!fy(r)?n:r||nF(e)||n}const pF=async function(e){const t=this.getOffsetParent||LE,n=this.getDimensions,r=await n(e.floating);return{reference:hF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mF(e){return Yn(e).direction==="rtl"}const gF={convertOffsetParentRelativeRectToViewportRelativeRect:iF,getDocumentElement:_r,getClippingRect:dF,getOffsetParent:LE,getElementRects:pF,getClientRects:oF,getDimensions:fF,getScale:Vo,isElement:Qn,isRTL:mF};function vF(e,t){let n=null,r;const s=_r(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:f,height:h}=e.getBoundingClientRect();if(a||t(),!f||!h)return;const m=Eu(u),y=Eu(s.clientWidth-(c+f)),g=Eu(s.clientHeight-(u+h)),w=Eu(c),v={rootMargin:-m+"px "+-y+"px "+-g+"px "+-w+"px",threshold:dn(0,zs(1,l))||1};let b=!0;function _(S){const P=S[0].intersectionRatio;if(P!==l){if(!b)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(_,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,v)}n.observe(e)}return o(!0),i}function yF(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=py(e),u=s||i?[...c?ac(c):[],...ac(t)]:[];u.forEach(x=>{s&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const f=c&&a?vF(c,n):null;let h=-1,m=null;o&&(m=new ResizeObserver(x=>{let[v]=x;v&&v.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let y,g=l?$i(e):null;l&&w();function w(){const x=$i(e);g&&(x.x!==g.x||x.y!==g.y||x.width!==g.width||x.height!==g.height)&&n(),g=x,y=requestAnimationFrame(w)}return n(),()=>{var x;u.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const xF=ZL,wF=XL,bF=qL,_F=eF,SF=QL,Mw=GL,CF=JL,EF=(e,t,n)=>{const r=new Map,s={platform:gF,...n},i={...s.platform,_c:r};return KL(e,t,{...s,platform:i})};var Ju=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Ld(e,t){if(e===t)return!0;
vendor: 4,312 bytes, line 278
278if(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(!Ld(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)&&!Ld(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function FE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dw(e,t){const n=FE(e);return Math.round(t*n)/n}function tp(e){const t=p.useRef(e);return Ju(()=>{t.current=e}),t}function kF(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=p.useState(r);Ld(h,r)||m(r);const[y,g]=p.useState(null),[w,x]=p.useState(null),v=p.useCallback(j=>{j!==P.current&&(P.current=j,g(j))},[]),b=p.useCallback(j=>{j!==T.current&&(T.current=j,x(j))},[]),_=i||y,S=o||w,P=p.useRef(null),T=p.useRef(null),C=p.useRef(u),M=l!=null,I=tp(l),R=tp(s),A=tp(c),$=p.useCallback(()=>{if(!P.current||!T.current)return;const j={placement:t,strategy:n,middleware:h};R.current&&(j.platform=R.current),EF(P.current,T.current,j).then(O=>{const K={...O,isPositioned:A.current!==!1};L.current&&!Ld(C.current,K)&&(C.current=K,Ki.flushSync(()=>{f(K)}))})},[h,t,n,R,A]);Ju(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[c]);const L=p.useRef(!1);Ju(()=>(L.current=!0,()=>{L.current=!1}),[]),Ju(()=>{if(_&&(P.current=_),S&&(T.current=S),_&&S){if(I.current)return I.current(_,S,$);$()}},[_,S,$,I,M]);const Z=p.useMemo(()=>({reference:P,floating:T,setReference:v,setFloating:b}),[v,b]),V=p.useMemo(()=>({reference:_,floating:S}),[_,S]),H=p.useMemo(()=>{const j={position:n,left:0,top:0};if(!V.floating)return j;const O=Dw(V.floating,u.x),K=Dw(V.floating,u.y);return a?{...j,transform:"translate("+O+"px, "+K+"px)",...FE(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:K}},[n,a,V.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:$,refs:Z,elements:V,floatingStyles:H}),[u,$,Z,V,H])}const TF=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?Mw({element:r.current,padding:s}).fn(n):{}:r?Mw({element:r,padding:s}).fn(n):{}}}},PF=(e,t)=>({...xF(e),options:[e,t]}),jF=(e,t)=>({...wF(e),options:[e,t]}),RF=(e,t)=>({...CF(e),options:[e,t]}),NF=(e,t)=>({...bF(e),options:[e,t]}),AF=(e,t)=>({..._F(e),options:[e,t]}),OF=(e,t)=>({...SF(e),options:[e,t]}),MF=(e,t)=>({...TF(e),options:[e,t]});var DF="Arrow",$E=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return d.jsx(ce.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});$E.displayName=DF;var IF=$E;function LF(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function c(f){const{scope:h,children:m,...y}=f,g=(h==null?void 0:h[e][l])||a,w=p.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:w,children:m})}function u(f,h){const m=(h==null?void 0:h[e][l])||a,y=p.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,FF(s,...t)]}function FF(...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((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function $F(e){const[t,n]=p.useState(void 0);return bt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>
vendor: 6,490 bytes, line 278
278{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var my="Popper",[VE,Da]=LF(my),[VF,UE]=VE(my),BE=e=>{const{__scopePopper:t,children:n}=e,[r,s]=p.useState(null);return d.jsx(VF,{scope:t,anchor:r,onAnchorChange:s,children:n})};BE.displayName=my;var zE="PopperAnchor",WE=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=UE(zE,n),o=p.useRef(null),a=De(t,o);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:d.jsx(ce.div,{...s,ref:a})});WE.displayName=zE;var gy="PopperContent",[UF,BF]=VE(gy),HE=p.forwardRef((e,t)=>{var se,we,Pe,Ce,Ae,Ne;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:y,...g}=e,w=UE(gy,n),[x,v]=p.useState(null),b=De(t,gt=>v(gt)),[_,S]=p.useState(null),P=$F(_),T=(P==null?void 0:P.width)??0,C=(P==null?void 0:P.height)??0,M=r+(i!=="center"?"-"+i:""),I=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},R=Array.isArray(c)?c:[c],A=R.length>0,$={padding:I,boundary:R.filter(WF),altBoundary:A},{refs:L,floatingStyles:Z,placement:V,isPositioned:H,middlewareData:j}=kF({strategy:"fixed",placement:M,whileElementsMounted:(...gt)=>yF(...gt,{animationFrame:m==="always"}),elements:{reference:w.anchor},middleware:[PF({mainAxis:s+C,alignmentAxis:o}),l&&jF({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?RF():void 0,...$}),l&&NF({...$}),AF({...$,apply:({elements:gt,rects:Pt,availableWidth:Sr,availableHeight:on})=>{const{width:Jr,height:E}=Pt.reference,N=gt.floating.style;N.setProperty("--radix-popper-available-width",`${Sr}px`),N.setProperty("--radix-popper-available-height",`${on}px`),N.setProperty("--radix-popper-anchor-width",`${Jr}px`),N.setProperty("--radix-popper-anchor-height",`${E}px`)}}),_&&MF({element:_,padding:a}),HF({arrowWidth:T,arrowHeight:C}),h&&OF({strategy:"referenceHidden",...$})]}),[O,K]=qE(V),G=Tt(y);bt(()=>{H&&(G==null||G())},[H,G]);const ne=(se=j.arrow)==null?void 0:se.x,fe=(we=j.arrow)==null?void 0:we.y,Se=((Pe=j.arrow)==null?void 0:Pe.centerOffset)!==0,[Ye,he]=p.useState();return bt(()=>{x&&he(window.getComputedStyle(x).zIndex)},[x]),d.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:H?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ye,"--radix-popper-transform-origin":[(Ce=j.transformOrigin)==null?void 0:Ce.x,(Ae=j.transformOrigin)==null?void 0:Ae.y].join(" "),...((Ne=j.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(UF,{scope:n,placedSide:O,onArrowChange:S,arrowX:ne,arrowY:fe,shouldHideArrow:Se,children:d.jsx(ce.div,{"data-side":O,"data-align":K,...g,ref:b,style:{...g.style,animation:H?void 0:"none"}})})})});HE.displayName=gy;var KE="PopperArrow",zF={top:"bottom",right:"left",bottom:"top",left:"right"},GE=p.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=BF(KE,r),o=zF[i.placedSide];return d.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:d.jsx(IF,{...s,ref:n,style:{...s.style,display:"block"}})})});GE.displayName=KE;function WF(e){return e!==null}var HF=e=>({name:"transformOrigin",options:e,fn(t){var w,x,v;const{placement:n,rects:r,middlewareData:s}=t,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,u]=qE(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(((x=s.arrow)==null?void 0:x.x)??0)+a/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=o?f:`${h}px`,g=`${-l}px`):c==="top"?(y=o?f:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=o?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,g=o?f:`${m}px`),{data:{x:y,y:g}}}});function qE(e){const[t,n="center"]=e.split("-");return[t,n]}var vy=BE,yy=WE,xy=HE,wy=GE,[Vf,SH]=Zr("Tooltip",[Da]),Uf=Da(),QE="TooltipProvider",KF=700,Zm="tooltip.open",[GF,by]=Vf(QE),YE=e=>{const{__scopeTooltip:t,delayDuration:n=KF,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=p.useState(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(GF,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),a(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:i})};YE.displayName=QE;var Bf="Tooltip",[qF,zf]=Vf(Bf),ZE=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=e,l=by(Bf,e.__scopeTooltip),c=Uf(t),[u,f]=p.useState(null),h=Gn(),m=p.useRef(0),y=o??l.disableHoverableContent,g=a??l.delayDuration,w=p.useRef(!1),[x=!1,v]=Bs({prop:r,defaultProp:s,onChange:T=>{T?(l.onOpen(),document.dispatchEvent(new CustomEvent(Zm))):l.onClose(),i==null||i(T)}}),b=p.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),_=p.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w.current=!1,v(!0)},[v]),S=p.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v(!1)},[v]),P=p.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,v(!0),m.current=0},g)},[g,v]);return p.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),d.jsx(vy,{...c,children:d.jsx(qF,{scope:t,contentId:h,open:x,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayed?P():_()},[l.isOpenDelayed,P,_]),onTriggerLeave:p.useCallback(()=>{y?S():(window.clearTimeout(m.current),m.current=0)},[S,y]),onOpen:_,onClose:S,disableHoverableContent:y,children:n})})};ZE.displayName=Bf;var Xm="TooltipTrigger",XE=p.forwardRef((e,t)=>
vendor: 4,376 bytes, line 278
278{const{__scopeTooltip:n,...r}=e,s=zf(Xm,n),i=by(Xm,n),o=Uf(n),a=p.useRef(null),l=De(t,a,s.onTriggerChange),c=p.useRef(!1),u=p.useRef(!1),f=p.useCallback(()=>c.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.jsx(yy,{asChild:!0,...o,children:d.jsx(ce.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:Y(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Y(e.onFocus,()=>{c.current||s.onOpen()}),onBlur:Y(e.onBlur,s.onClose),onClick:Y(e.onClick,s.onClose)})})});XE.displayName=Xm;var QF="TooltipPortal",[CH,YF]=Vf(QF,{forceMount:void 0}),fa="TooltipContent",JE=p.forwardRef((e,t)=>{const n=YF(fa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=zf(fa,e.__scopeTooltip);return d.jsx(Zn,{present:r||o.open,children:o.disableHoverableContent?d.jsx(ek,{side:s,...i,ref:t}):d.jsx(ZF,{side:s,...i,ref:t})})}),ZF=p.forwardRef((e,t)=>{const n=zf(fa,e.__scopeTooltip),r=by(fa,e.__scopeTooltip),s=p.useRef(null),i=De(t,s),[o,a]=p.useState(null),{trigger:l,onClose:c}=n,u=s.current,{onPointerInTransitChange:f}=r,h=p.useCallback(()=>{a(null),f(!1)},[f]),m=p.useCallback((y,g)=>{const w=y.currentTarget,x={x:y.clientX,y:y.clientY},v=t$(x,w.getBoundingClientRect()),b=n$(x,v),_=r$(g.getBoundingClientRect()),S=i$([...b,..._]);a(S),f(!0)},[f]);return p.useEffect(()=>()=>h(),[h]),p.useEffect(()=>{if(l&&u){const y=w=>m(w,u),g=w=>m(w,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[l,u,m,h]),p.useEffect(()=>{if(o){const y=g=>{const w=g.target,x={x:g.clientX,y:g.clientY},v=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),b=!s$(x,o);v?h():b&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,o,c,h]),d.jsx(ek,{...e,ref:i})}),[XF,JF]=Vf(Bf,{isInside:!1}),ek=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=zf(fa,n),c=Uf(n),{onClose:u}=l;return p.useEffect(()=>(document.addEventListener(Zm,u),()=>document.removeEventListener(Zm,u)),[u]),p.useEffect(()=>{if(l.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),d.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:d.jsxs(xy,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.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:[d.jsx(ny,{children:r}),d.jsx(XF,{scope:n,isInside:!0,children:d.jsx(LD,{id:l.contentId,role:"tooltip",children:s||r})})]})})});JE.displayName=fa;var tk="TooltipArrow",e$=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Uf(n);return JF(tk,n).isInside?null:d.jsx(wy,{...s,...r,ref:t})});e$.displayName=tk;function t$(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 n$(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 r$(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 s$(e,t){const{x:n,y:r}=e;let s=!1;for(let i=0,o=t.length-1;i<t.length;
278o=i++){const a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(s=!s)}return s}function i$(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),o$(t)}function o$(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 a$=YE,l$=ZE,c$=XE,nk=JE;const _y=a$,rk=l$,sk=c$,Sy=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(nk,{ref:r,sideOffset:t,className:U("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}));Sy.displayName=nk.displayName;const np=768;function u$(){const[e,t]=p.useState(void 0);return p.useEffect(()=>{const n=window.matchMedia(`(max-width: ${np-1}px)`),r=()=>{t(window.innerWidth<np)};return n.addEventListener("change",r),t(window.innerWidth<np),()=>n.removeEventListener("change",r)},[]),!!e}const Cy=Na("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"}}),Ee=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?rn:"button";return d.jsx(o,{className:U(Cy({variant:t,size:n,className:e})),ref:i,...s})});Ee.displayName="Button";const Ct=p.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:U("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}));Ct.displayName="Input";var d$="Separator",Iw="horizontal",f$=["horizontal","vertical"],ik=p.forwardRef((e,t)=>{const{decorative:n,orientation:r=Iw,...s}=e,i=h$(r)?r:Iw,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return d.jsx(ce.div,{"data-orientation":i,...a,...s,ref:t})});ik.displayName=d$;function h$(e){return f$.includes(e)}var ok=ik;const Ey=p.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>d.jsx(ok,{ref:s,decorative:n,orientation:t,className:U("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Ey.displayName=ok.displayName;var rp="focusScope.autoFocusOnMount",sp="focusScope.autoFocusOnUnmount",Lw={bubbles:!1,cancelable:!0},p$="FocusScope",Wf=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=p.useState(null),c=Tt(s),u=Tt(i),f=p.useRef(null),h=De(t,g=>l(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(b){if(m.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:as(f.current,{select:!0})},w=function(b){if(m.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||as(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&as(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const v=new MutationObserver(x);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),v.disconnect()}}},[r,a,m.paused]),p.useEffect(()=>{if(a){$w.add(m);const g=document.activeElement;if(!a.contains(g)){const x=new CustomEvent(rp,Lw);a.addEventListener(rp,c),a.dispatchEvent(x),x.defaultPrevented||(m$(w$(ak(a)),{select:!0}),document.activeElement===g&&as(a))}return()=>{a.removeEventListener(rp,c),setTimeout(()=>{const x=new CustomEvent(sp,Lw);a.addEventListener(sp,u),a.dispatchEvent(x),x.defaultPrevented||as(g??document.body,{select:!0}),a.removeEventListener(sp,u),$w.remove(m)},0)}}},[a,c,u,m]);const y=p.useCallback(g=>{if(!n&&!r||m.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(w&&x){const v=g.currentTarget,[b,_]=g$(v);
vendor: 4,675 bytes, line 278
278b&&_?!g.shiftKey&&x===_?(g.preventDefault(),n&&as(b,{select:!0})):g.shiftKey&&x===b&&(g.preventDefault(),n&&as(_,{select:!0})):x===v&&g.preventDefault()}},[n,r,m.paused]);return d.jsx(ce.div,{tabIndex:-1,...o,ref:h,onKeyDown:y})});Wf.displayName=p$;function m$(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(as(r,{select:t}),document.activeElement!==n)return}function g$(e){const t=ak(e),n=Fw(t,e),r=Fw(t.reverse(),e);return[n,r]}function ak(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 Fw(e,t){for(const n of e)if(!v$(n,{upTo:t}))return n}function v$(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 y$(e){return e instanceof HTMLInputElement&&"select"in e}function as(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&y$(e)&&t&&e.select()}}var $w=x$();function x$(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Vw(e,t),e.unshift(t)},remove(t){var n;e=Vw(e,t),(n=e[0])==null||n.resume()}}}function Vw(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function w$(e){return e.filter(t=>t.tagName!=="A")}var ip=0;function ky(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Uw()),document.body.insertAdjacentElement("beforeend",e[1]??Uw()),ip++,()=>{ip===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ip--}},[])}function Uw(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var fr=function(){return fr=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},fr.apply(this,arguments)};function lk(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 b$(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 ed="right-scroll-bar-position",td="width-before-scroll-bar",_$="with-scroll-bars-hidden",S$="--removed-body-scroll-bar-size";function op(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function C$(e,t){var n=p.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 E$=typeof window<"u"?p.useLayoutEffect:p.useEffect,Bw=new WeakMap;function k$(e,t){var n=C$(null,function(r){return e.forEach(function(s){return op(s,r)})});return E$(function(){var r=Bw.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(a){i.has(a)||op(a,null)}),i.forEach(function(a){s.has(a)||op(a,o)})}Bw.set(n,e)},[e]),n}function T$(e){return e}function P$(e,t){t===void 0&&(t=T$);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(a){return a!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(i),o=n}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return s}function j$(e){e===void 0&&(e={});var t=P$(null);return t.options=fr({async:!0,ssr:!1},e),t}var ck=function(e){var t=e.sideCar,n=lk(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 p.createElement(r,fr({},n))};
vendor: 4,895 bytes, lines 278-315
278ck.isSideCarExport=!0;function R$(e,t){return e.useMedium(t),ck}var uk=j$(),ap=function(){},Hf=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:ap,onWheelCapture:ap,onTouchMoveCapture:ap}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,m=e.noIsolation,y=e.inert,g=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,v=e.gapMode,b=lk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=h,S=k$([n,t]),P=fr(fr({},b),s);return p.createElement(p.Fragment,null,u&&p.createElement(_,{sideCar:uk,removeScrollBar:c,shards:f,noIsolation:m,inert:y,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:v}),o?p.cloneElement(p.Children.only(a),fr(fr({},P),{ref:S})):p.createElement(x,fr({},P,{className:l,ref:S}),a))});Hf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hf.classNames={fullWidth:td,zeroRight:ed};var N$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function A$(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=N$();return t&&e.setAttribute("nonce",t),e}function O$(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function M$(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var D$=function(){var e=0,t=null;return{add:function(n){e==0&&(t=A$())&&(O$(t,n),M$(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},I$=function(){var e=D$();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},dk=function(){var e=I$(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},L$={left:0,top:0,right:0,gap:0},lp=function(e){return parseInt(e||"",10)||0},F$=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[lp(n),lp(r),lp(s)]},$$=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return L$;var t=F$(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])}},V$=dk(),Uo="data-scroll-locked",U$=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` 279 .`.concat(_$,` { 280 overflow: hidden `).concat(r,`; 281 padding-right: `).concat(a,"px ").concat(r,`; 282 } 283 body[`).concat(Uo,`] { 284 overflow: hidden `).concat(r,`; 285 overscroll-behavior: contain; 286 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 287 padding-left: `.concat(s,`px; 288 padding-top: `).concat(i,`px; 289 padding-right: `).concat(o,`px; 290 margin-left:0; 291 margin-top:0; 292 margin-right: `).concat(a,"px ").concat(r,`; 293 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),` 294 } 295 296 .`).concat(ed,` { 297 right: `).concat(a,"px ").concat(r,`; 298 } 299 300 .`).concat(td,` { 301 margin-right: `).concat(a,"px ").concat(r,`; 302 } 303 304 .`).concat(ed," .").concat(ed,` { 305 right: 0 `).concat(r,`; 306 } 307 308 .`).concat(td," .").concat(td,` { 309 margin-right: 0 `).concat(r,`; 310 } 311 312 body[`).concat(Uo,`] { 313 `).concat(S$,": ").concat(a,`px; 314 } 315`)},zw=function(){var e=parseInt(document.body.getAttribute(Uo)||"0",10);return isFinite(e)?e:0},B$=function(){p.useEffect(function(){return document.body.setAttribute(Uo,(zw()+1).toString()),function(){var e=zw()-1;e<=0?document.body.removeAttribute(Uo):document.body.setAttribute(Uo,e.toString())}},[])},z$=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;B$();var i=p.useMemo(function(){return $$(s)},[s]);return p.createElement(V$,{styles:U$(i,!t,s,n?"":"!important")})},Jm=!1;if(typeof window<"u")try{var ku=Object.defineProperty({},"passive",{get:function(){return Jm=!0,!0}});window.addEventListener("test",ku,ku),window.removeEventListener("test",ku,ku)}catch{Jm=!1}var no=Jm?{passive:!1}:!1,W$=function(e){return e.tagName==="TEXTAREA"},fk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!W$(e)&&n[t]==="visible")},H$=function(e){return fk(e,"overflowY")},K$=function(e){return fk(e,"overflowX")},Ww=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=hk(e,r);if(s){var i=pk(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},G$=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},q$=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},hk=function(e,t){return e==="v"?H$(t):K$(t)},pk=function(e,t){return e==="v"?G$(t):q$(t)},Q$=function(e,t){return e==="h"&&t==="rtl"?-1:1}
vendor: 8,792 bytes, lines 315-318
315,Y$=function(e,t,n,r,s){var i=Q$(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),c=!1,u=o>0,f=0,h=0;do{var m=pk(e,a),y=m[0],g=m[1],w=m[2],x=g-w-i*y;(y||x)&&hk(e,a)&&(f+=x,h+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(h)<1||!s))&&(c=!0),c},Tu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hw=function(e){return[e.deltaX,e.deltaY]},Kw=function(e){return e&&"current"in e?e.current:e},Z$=function(e,t){return e[0]===t[0]&&e[1]===t[1]},X$=function(e){return` 316 .block-interactivity-`.concat(e,` {pointer-events: none;} 317 .allow-interactivity-`).concat(e,` {pointer-events: all;} 318`)},J$=0,ro=[];function e4(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),s=p.useState(J$++)[0],i=p.useState(dk)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var g=b$([e.lockRef.current],(e.shards||[]).map(Kw),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=Tu(g),v=n.current,b="deltaX"in g?g.deltaX:v[0]-x[0],_="deltaY"in g?g.deltaY:v[1]-x[1],S,P=g.target,T=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in g&&T==="h"&&P.type==="range")return!1;var C=Ww(T,P);if(!C)return!0;if(C?S=T:(S=T==="v"?"h":"v",C=Ww(T,P)),!C)return!1;if(!r.current&&"changedTouches"in g&&(b||_)&&(r.current=S),!S)return!0;var M=r.current||S;return Y$(M,w,g,M==="h"?b:_,!0)},[]),l=p.useCallback(function(g){var w=g;if(!(!ro.length||ro[ro.length-1]!==i)){var x="deltaY"in w?Hw(w):Tu(w),v=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&Z$(S.delta,x)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(o.current.shards||[]).map(Kw).filter(Boolean).filter(function(S){return S.contains(w.target)}),_=b.length>0?a(w,b[0]):!o.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),c=p.useCallback(function(g,w,x,v){var b={name:g,delta:w,target:x,should:v,shadowParent:t4(x)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(_){return _!==b})},1)},[]),u=p.useCallback(function(g){n.current=Tu(g),r.current=void 0},[]),f=p.useCallback(function(g){c(g.type,Hw(g),g.target,a(g,e.lockRef.current))},[]),h=p.useCallback(function(g){c(g.type,Tu(g),g.target,a(g,e.lockRef.current))},[]);p.useEffect(function(){return ro.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,no),document.addEventListener("touchmove",l,no),document.addEventListener("touchstart",u,no),function(){ro=ro.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,no),document.removeEventListener("touchmove",l,no),document.removeEventListener("touchstart",u,no)}},[]);var m=e.removeScrollBar,y=e.inert;return p.createElement(p.Fragment,null,y?p.createElement(i,{styles:X$(s)}):null,m?p.createElement(z$,{gapMode:e.gapMode}):null)}function t4(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const n4=R$(uk,e4);var Kf=p.forwardRef(function(e,t){return p.createElement(Hf,fr({},e,{ref:t,sideCar:n4}))});Kf.classNames=Hf.classNames;var r4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},so=new WeakMap,Pu=new WeakMap,ju={},cp=0,mk=function(e){return e&&(e.host||mk(e.parentNode))},s4=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=mk(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})},i4=function(e,t,n,r){var s=s4(t,Array.isArray(e)?e:[e]);ju[n]||(ju[n]=new WeakMap);var i=ju[n],o=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))u(h);else try{var m=h.getAttribute(r),y=m!==null&&m!=="false",g=(so.get(h)||0)+1,w=(i.get(h)||0)+1;so.set(h,g),i.set(h,w),o.push(h),g===1&&y&&Pu.set(h,!0),w===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(t),a.clear(),cp++,function(){o.forEach(function(f){var h=so.get(f)-1,m=i.get(f)-1;so.set(f,h),i.set(f,m),h||(Pu.has(f)||f.removeAttribute(r),Pu.delete(f)),m||f.removeAttribute(n)}),cp--,cp||(so=new WeakMap,so=new WeakMap,Pu=new WeakMap,ju={})}},Ty=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=r4(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),i4(r,s,n,"aria-hidden")):function(){return null}},Py="Dialog",[gk,vk]=Zr(Py),[o4,Xn]=gk(Py),yk=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=p.useRef(null),l=p.useRef(null),[c=!1,u]=Bs({prop:r,defaultProp:s,onChange:i});return d.jsx(o4,{scope:t,triggerRef:a,contentRef:l,contentId:Gn(),titleId:Gn(),descriptionId:Gn(),open:c,onOpenChange:u,onOpenToggle:p.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};yk.displayName=Py;var xk="DialogTrigger",wk=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Xn(xk,n),i=De(t,s.triggerRef);return d.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ny(s.open),...r,ref:i,onClick:Y(e.onClick,s.onOpenToggle)})});wk.displayName=xk;var jy="DialogPortal",[a4,bk]=gk(jy,{forceMount:void 0}),_k=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Xn(jy,t);return d.jsx(a4,{scope:t,forceMount:n,children:p.Children.map(r,o=>d.jsx(Zn,{present:n||i.open,children:d.jsx(Dc,{asChild:!0,container:s,children:o})}))})};_k.displayName=jy;var Fd="DialogOverlay",Sk=p.forwardRef((e,t)=>{const n=bk(Fd,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Xn(Fd,e.__scopeDialog);return i.modal?d.jsx(Zn,{present:r||i.open,children:d.jsx(l4,{...s,ref:t})}):null});Sk.displayName=Fd;var l4=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Xn(Fd,n);return d.jsx(Kf,{as:rn,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(ce.div,{"data-state":Ny(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Vi="DialogContent",Ck=p.forwardRef((e,t)=>{const n=bk(Vi,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Xn(Vi,e.__scopeDialog);return d.jsx(Zn,{present:r||i.open,children:i.modal?d.jsx(c4,{...s,ref:t}):d.jsx(u4,{...s,ref:t})})});Ck.displayName=Vi;var c4=p.forwardRef((e,t)=>{const n=Xn(Vi,e.__scopeDialog),r=p.useRef(null),s=De(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return Ty(i)},[]),d.jsx(Ek,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Y(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,i=>i.preventDefault())})}),u4=p.forwardRef((e,t)=>{const n=Xn(Vi,e.__scopeDialog),r=p.useRef(!1),s=p.useRef(!1);return d.jsx(Ek,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),Ek=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Xn(Vi,n),l=p.useRef(null),c=De(t,l);return ky(),d.jsxs(d.Fragment,{children:[d.jsx(Wf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:d.jsx(Ra,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ny(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(f4,{titleId:a.titleId}),d.jsx(p4,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Ry="DialogTitle",kk=p.forwardRef((e,t)=>
318{const{__scopeDialog:n,...r}=e,s=Xn(Ry,n);return d.jsx(ce.h2,{id:s.titleId,...r,ref:t})});kk.displayName=Ry;var Tk="DialogDescription",Pk=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Xn(Tk,n);return d.jsx(ce.p,{id:s.descriptionId,...r,ref:t})});Pk.displayName=Tk;var jk="DialogClose",Rk=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Xn(jk,n);return d.jsx(ce.button,{type:"button",...r,ref:t,onClick:Y(e.onClick,()=>s.onOpenChange(!1))})});Rk.displayName=jk;function Ny(e){return e?"open":"closed"}var Nk="DialogTitleWarning",[d4,Ak]=xD(Nk,{contentName:Vi,titleName:Ry,docsSlug:"dialog"}),f4=({titleId:e})=>{const t=Ak(Nk),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 319 320If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 321 322For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},h4="DialogDescriptionWarning",p4=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ak(h4).contentName}}.`;return p.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},Ay=yk,Oy=wk,My=_k,Fc=Sk,$c=Ck,Vc=kk,Uc=Pk,Gf=Rk;const Ok=Ay,m4=Oy,g4=My,Mk=p.forwardRef(({className:e,...t},n)=>d.jsx(Fc,{className:U("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}));Mk.displayName=Fc.displayName;const v4=Na("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"}}),Dy=p.forwardRef(({side:e="right",className:t,children:n,...r},s)=>d.jsxs(g4,{children:[d.jsx(Mk,{}),d.jsxs($c,{ref:s,className:U(v4({side:e}),t),...r,children:[n,d.jsxs(Gf,{className:"absolute right-4 top-4 roun
322ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[d.jsx(ay,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Dy.displayName=$c.displayName;const Dk=({className:e,...t})=>d.jsx("div",{className:U("flex flex-col space-y-2 text-center sm:text-left",e),...t});Dk.displayName="SheetHeader";const Ik=p.forwardRef(({className:e,...t},n)=>d.jsx(Vc,{ref:n,className:U("text-lg font-semibold text-foreground",e),...t}));Ik.displayName=Vc.displayName;const y4=p.forwardRef(({className:e,...t},n)=>d.jsx(Uc,{ref:n,className:U("text-sm text-muted-foreground",e),...t}));y4.displayName=Uc.displayName;function zn({className:e,...t}){return d.jsx("div",{className:U("animate-pulse rounded-md bg-muted",e),...t})}const x4="sidebar:state",w4=60*60*24*7,b4="16rem",_4="18rem",S4="3rem",C4="b",Lk=p.createContext(null);function Bc(){const e=p.useContext(Lk);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Fk=p.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:i,...o},a)=>{const l=u$(),[c,u]=p.useState(!1),[f,h]=p.useState(e),m=t??f,y=p.useCallback(v=>{const b=typeof v=="function"?v(m):v;n?n(b):h(b),document.cookie=`${x4}=${b}; path=/; max-age=${w4}`},[n,m]),g=p.useCallback(()=>l?u(v=>!v):y(v=>!v),[l,y,u]);p.useEffect(()=>{const v=b=>{b.key===C4&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),g())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[g]);const w=m?"expanded":"collapsed",x=p.useMemo(()=>({state:w,open:m,setOpen:y,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:g}),[w,m,y,l,c,u,g]);return d.jsx(Lk.Provider,{value:x,children:d.jsx(_y,{delayDuration:0,children:d.jsx("div",{style:{"--sidebar-width":b4,"--sidebar-width-icon":S4,...s},className:U("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:a,...o,children:i})})})});Fk.displayName="SidebarProvider";const $k=p.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...i},o)=>{const{isMobile:a,state:l,openMobile:c,setOpenMobile:u}=Bc();return n==="none"?d.jsx("div",{className:U("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:o,...i,children:s}):a?d.jsx(Ok,{open:c,onOpenChange:u,...i,children:d.jsx(Dy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] !bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":_4},side:e,children:d.jsx("div",{className:"flex h-full w-full flex-col",children:s})})}):d.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[d.jsx("div",{className:U("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] 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]")}),d.jsx("div",{className:U("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] 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:d.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})})]})});$k.displayName="Sidebar";const Vk=p.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:s}=Bc();return d.jsxs(Ee,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:U("h-7 w-7",e),onClick:i=>{t==null||t(i),s()},...n,children:[d.jsx(wI,{}),d.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});Vk.displayName="SidebarTrigger";const E4=p.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Bc();return d.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:U("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] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 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})});E4.displayName="SidebarRail";const k4=p.forwardRef(({className:e,...t},n)=>d.jsx("main",{ref:n,className:U("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-
322h-[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}));k4.displayName="SidebarInset";const Uk=p.forwardRef(({className:e,...t},n)=>d.jsx(Ct,{ref:n,"data-sidebar":"input",className:U("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));Uk.displayName="SidebarInput";const Bk=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"header",className:U("flex flex-col gap-2 p-2",e),...t}));Bk.displayName="SidebarHeader";const zk=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"footer",className:U("flex flex-col gap-2 p-2",e),...t}));zk.displayName="SidebarFooter";const T4=p.forwardRef(({className:e,...t},n)=>d.jsx(Ey,{ref:n,"data-sidebar":"separator",className:U("mx-2 w-auto bg-sidebar-border",e),...t}));T4.displayName="SidebarSeparator";const Wk=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"content",className:U("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));Wk.displayName="SidebarContent";const Hk=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"group",className:U("relative flex w-full min-w-0 flex-col p-2",e),...t}));Hk.displayName="SidebarGroup";const Kk=p.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?rn:"div";return d.jsx(s,{ref:r,"data-sidebar":"group-label",className:U("duration-200 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] 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})});Kk.displayName="SidebarGroupLabel";const P4=p.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?rn:"button";return d.jsx(s,{ref:r,"data-sidebar":"group-action",className:U("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})});P4.displayName="SidebarGroupAction";const Gk=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"group-content",className:U("w-full text-sm",e),...t}));Gk.displayName="SidebarGroupContent";const qk=p.forwardRef(({className:e,...t},n)=>d.jsx("ul",{ref:n,"data-sidebar":"menu",className:U("flex w-full min-w-0 flex-col gap-1",e),...t}));qk.displayName="SidebarMenu";const Qk=p.forwardRef(({className:e,...t},n)=>d.jsx("li",{ref:n,"data-sidebar":"menu-item",className:U("group/menu-item relative",e),...t}));Qk.displayName="SidebarMenuItem";const j4=Na("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"}}),eg=p.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:i,...o},a)=>{const l=e?rn:"button",{isMobile:c,state:u}=Bc(),f=d.jsx(l,{ref:a,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:U(j4({variant:n,size:r}),i),...o});return s?(typeof s=="string"&&(s={children:s}
322),d.jsxs(rk,{children:[d.jsx(sk,{asChild:!0,children:f}),d.jsx(Sy,{side:"right",align:"center",hidden:u!=="collapsed"||c,...s})]})):f});eg.displayName="SidebarMenuButton";const R4=p.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const i=t?rn:"button";return d.jsx(i,{ref:s,"data-sidebar":"menu-action",className:U("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 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>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})});R4.displayName="SidebarMenuAction";const N4=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:U("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","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}));N4.displayName="SidebarMenuBadge";const A4=p.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return d.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:U("rounded-md h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&d.jsx(zn,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),d.jsx(zn,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});A4.displayName="SidebarMenuSkeleton";const O4=p.forwardRef(({className:e,...t},n)=>d.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:U("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}));O4.displayName="SidebarMenuSub";const M4=p.forwardRef(({...e},t)=>d.jsx("li",{ref:t,...e}));M4.displayName="SidebarMenuSubItem";const D4=p.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},i)=>{const o=e?rn:"a";return d.jsx(o,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:U("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 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 aria-disabled:pointer-events-none aria-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})});D4.displayName="SidebarMenuSubButton";var $d=["light","dark"],Iy="(prefers-color-scheme: dark)",I4=typeof window>"u",Ly=p.createContext(void 0),L4={setTheme:e=>{},themes:[]},Yk=()=>{var e;return(e=p.useContext(Ly))!=null?e:L4},F4=e=>p.useContext(Ly)?e.children:p.createElement(V4,{...e}),$4=["light","dark"],V4=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:s="theme",themes:i=$4,defaultTheme:o=n?"system":"light",attribute:a="data-theme",value:l,children:c,nonce:u})=>{let[f,h]=p.useState(()=>Gw(s,o)),[m,y]=p.useState(()=>Gw(s)),g=l?Object.values(l):i,w=p.useCallback(_=>{let S=_;if(!S)return;_==="system"&&n&&(S=qw());let P=l?l[S]:S,T=t?B4():null,C=document.documentElement;if(a==="class"?(C.classList.remove(...g),P&&C.classList.add(P)):P?C.setAttribute(a,P):C.removeAttribute(a),r){let M=$d.includes(o)?o:null,I=$d.includes(S)?S:M;C.style.colorScheme=I}T==null||T()},[]),x=p.useCallback(_=>{let S=typeof _=="function"?_(_):_;h(S);try{localStorage.setItem(s,S)}catch{}},[e]),v=p.useCallback(_=>{let S=qw(_);y(S),f==="system"&&n&&!e&&w("system")},[f,e]);p.useEffect(()=>{let _=window.matchMedia(Iy);return _.addListener(v),v(_),()=>_.removeListener(v)},[v]),p.useEffect(()=>{let _=S=>{if(S.key!==s)return;let P=S.newValue||o;x(P)};return window.addEventListener("storage",_),()=>window.removeEventListener("storage",_)},[x]),p.useEffect(()=>{w(e??f)},[e,f]);let b=p.useMemo(()=>({theme:f,setTheme:x,forcedTheme:e,resolvedTheme:f==="system"?m:f,themes:n?[...i,"system"]:i,systemTheme:n?m:void 0}),[f,x,e,m,n,i]);return p.createElement(Ly.Provider,{value:b},p.createElement(U4,{forcedTheme:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:s,themes:i,defaultTheme:o,attribute:a,value:l,children:c,attrs:g,nonce:u}),c)},U4=p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,f=s?$d.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(y,g=!1,w=!0)=>{let x=o?o[y]:y,v=g?y+"|| ''":`'${x}'`,b="";return s&&w&&!g&&$d.includes(y)&&(b+=`d.style.colorScheme = '${y}';`),n==="class"?g||x?b+=`c.add(${v})`:b+="null":x&&(b+=`d[s](n,${v})`),b},m=e?`!function(){${u}${h(e)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${c})){var t='${Iy}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}
vendor: 23,062 bytes, line 322
322${c?"":"else{"+h(i,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${h(o?"x[e]":"e",!0)}}else{${h(i,!1,!1)};}${f}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),Gw=(e,t)=>{if(I4)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},B4=()=>{let e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(e)},1)}},qw=e=>(e||(e=window.matchMedia(Iy)),e.matches?"dark":"light");function z4({children:e,...t}){return d.jsx(F4,{...t,children:e})}function Qw(){const{theme:e,setTheme:t}=Yk(),n=()=>{t(e==="dark"?"light":"dark")};return d.jsxs(Ee,{variant:"ghost",size:"icon",onClick:n,className:"relative",children:[d.jsx(EI,{className:"h-[1.2rem] w-[1.2rem] rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),d.jsx(xI,{className:"absolute h-[1.2rem] w-[1.2rem] rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),d.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}var W4=p.createContext(void 0);function qf(e){const t=p.useContext(W4);return e||t||"ltr"}function H4(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function c(f){const{scope:h,children:m,...y}=f,g=(h==null?void 0:h[e][l])||a,w=p.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:w,children:m})}function u(f,h){const m=(h==null?void 0:h[e][l])||a,y=p.useContext(m);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const s=()=>{const i=n.map(o=>p.createContext(o));return function(a){const l=(a==null?void 0:a[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,K4(s,...t)]}function K4(...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((a,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...a,...f}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var up="rovingFocusGroup.onEntryFocus",G4={bubbles:!1,cancelable:!0},Qf="RovingFocusGroup",[tg,Zk,q4]=Mf(Qf),[Q4,Yf]=H4(Qf,[q4]),[Y4,Z4]=Q4(Qf),Xk=p.forwardRef((e,t)=>d.jsx(tg.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(tg.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(X4,{...e,ref:t})})}));Xk.displayName=Qf;var X4=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,h=p.useRef(null),m=De(t,h),y=qf(i),[g=null,w]=Bs({prop:o,defaultProp:a,onChange:l}),[x,v]=p.useState(!1),b=Tt(c),_=Zk(n),S=p.useRef(!1),[P,T]=p.useState(0);return p.useEffect(()=>{const C=h.current;if(C)return C.addEventListener(up,b),()=>C.removeEventListener(up,b)},[b]),d.jsx(Y4,{scope:n,orientation:r,dir:y,loop:s,currentTabStopId:g,onItemFocus:p.useCallback(C=>w(C),[w]),onItemShiftTab:p.useCallback(()=>v(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(C=>C+1),[]),onFocusableItemRemove:p.useCallback(()=>T(C=>C-1),[]),children:d.jsx(ce.div,{tabIndex:x||P===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:Y(e.onMouseDown,()=>{S.current=!0}),onFocus:Y(e.onFocus,C=>{const M=!S.current;if(C.target===C.currentTarget&&M&&!x){const I=new CustomEvent(up,G4);if(C.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=_().filter(V=>V.focusable),A=R.find(V=>V.active),$=R.find(V=>V.id===g),Z=[A,$,...R].filter(Boolean).map(V=>V.ref.current);tT(Z,u)}}S.current=!1}),onBlur:Y(e.onBlur,()=>v(!1))})})}),Jk="RovingFocusGroupItem",eT=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=e,a=Gn(),l=i||a,c=Z4(Jk,n),u=c.currentTabStopId===l,f=Zk(n),{onFocusableItemAdd:h,onFocusableItemRemove:m}=c;return p.useEffect(()=>{if(r)return h(),()=>m()},[r,h,m]),d.jsx(tg.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:d.jsx(ce.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...o,ref:t,onMouseDown:Y(e.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:Y(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:Y(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const g=tV(y,c.orientation,c.dir);if(g!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(v=>v.focusable).map(v=>v.ref.current);if(g==="last")x.reverse();else if(g==="prev"||g==="next"){g==="prev"&&x.reverse();const v=x.indexOf(y.currentTarget);x=c.loop?nV(x,v+1):x.slice(v+1)}setTimeout(()=>tT(x))}})})})});eT.displayName=Jk;var J4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function eV(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function tV(e,t,n){const r=eV(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return J4[r]}function tT(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function nV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var nT=Xk,rT=eT,ng=["Enter"," "],rV=["ArrowDown","PageUp","Home"],sT=["ArrowUp","PageDown","End"],sV=[...rV,...sT],iV={ltr:[...ng,"ArrowRight"],rtl:[...ng,"ArrowLeft"]},oV={ltr:["ArrowLeft"],rtl:["ArrowRight"]},zc="Menu",[lc,aV,lV]=Mf(zc),[qi,iT]=Zr(zc,[lV,Da,Yf]),Zf=Da(),oT=Yf(),[cV,Qi]=qi(zc),[uV,Wc]=qi(zc),aT=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:s,onOpenChange:i,modal:o=!0}=e,a=Zf(t),[l,c]=p.useState(null),u=p.useRef(!1),f=Tt(i),h=qf(s);return p.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(vy,{...a,children:d.jsx(cV,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:d.jsx(uV,{scope:t,onClose:p.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:o,children:r})})})};aT.displayName=zc;var dV="MenuAnchor",Fy=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Zf(n);return d.jsx(yy,{...s,...r,ref:t})});Fy.displayName=dV;var $y="MenuPortal",[fV,lT]=qi($y,{forceMount:void 0}),cT=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:s}=e,i=Qi($y,t);return d.jsx(fV,{scope:t,forceMount:n,children:d.jsx(Zn,{present:n||i.open,children:d.jsx(Dc,{asChild:!0,container:s,children:r})})})};cT.displayName=$y;var Pn="MenuContent",[hV,Vy]=qi(Pn),uT=p.forwardRef((e,t)=>{const n=lT(Pn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Qi(Pn,e.__scopeMenu),o=Wc(Pn,e.__scopeMenu);return d.jsx(lc.Provider,{scope:e.__scopeMenu,children:d.jsx(Zn,{present:r||i.open,children:d.jsx(lc.Slot,{scope:e.__scopeMenu,children:o.modal?d.jsx(pV,{...s,ref:t}):d.jsx(mV,{...s,ref:t})})})})}),pV=p.forwardRef((e,t)=>{const n=Qi(Pn,e.__scopeMenu),r=p.useRef(null),s=De(t,r);return p.useEffect(()=>{const i=r.current;if(i)return Ty(i)},[]),d.jsx(Uy,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Y(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),mV=p.forwardRef((e,t)=>{const n=Qi(Pn,e.__scopeMenu);return d.jsx(Uy,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Uy=p.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...g}=e,w=Qi(Pn,n),x=Wc(Pn,n),v=Zf(n),b=oT(n),_=aV(n),[S,P]=p.useState(null),T=p.useRef(null),C=De(t,T,w.onContentChange),M=p.useRef(0),I=p.useRef(""),R=p.useRef(0),A=p.useRef(null),$=p.useRef("right"),L=p.useRef(0),Z=y?Kf:p.Fragment,V=y?{as:rn,allowPinchZoom:!0}:void 0,H=O=>{var se,we;const K=I.current+O,G=_().filter(Pe=>!Pe.disabled),ne=document.activeElement,fe=(se=G.find(Pe=>Pe.ref.current===ne))==null?void 0:se.textValue,Se=G.map(Pe=>Pe.textValue),Ye=TV(Se,K,fe),he=(we=G.find(Pe=>Pe.textValue===Ye))==null?void 0:we.ref.current;(function Pe(Ce){I.current=Ce,window.clearTimeout(M.current),Ce!==""&&(M.current=window.setTimeout(()=>Pe(""),1e3))})(K),he&&setTimeout(()=>he.focus())};p.useEffect(()=>()=>window.clearTimeout(M.current),[]),ky();const j=p.useCallback(O=>{var G,ne;return $.current===((G=A.current)==null?void 0:G.side)&&jV(O,(ne=A.current)==null?void 0:ne.area)},[]);return d.jsx(hV,{scope:n,searchRef:I,onItemEnter:p.useCallback(O=>{j(O)&&O.preventDefault()},[j]),onItemLeave:p.useCallback(O=>{var K;j(O)||((K=T.current)==null||K.focus(),P(null))},[j]),onTriggerLeave:p.useCallback(O=>{j(O)&&O.preventDefault()},[j]),pointerGraceTimerRef:R,onPointerGraceIntentChange:p.useCallback(O=>{A.current=O},[]),children:d.jsx(Z,{...V,children:d.jsx(Wf,{asChild:!0,trapped:s,onMountAutoFocus:Y(i,O=>{var K;O.preventDefault(),(K=T.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:d.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:d.jsx(nT,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:P,onEntryFocus:Y(l,O=>{x.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(xy,{role:"menu","aria-orientation":"vertical","data-state":kT(w.open),"data-radix-menu-content":"",dir:x.dir,...v,...g,ref:C,style:{outline:"none",...g.style},onKeyDown:Y(g.onKeyDown,O=>{const G=O.target.closest("[data-radix-menu-content]")===O.currentTarget,ne=O.ctrlKey||O.altKey||O.metaKey,fe=O.key.length===1;G&&(O.key==="Tab"&&O.preventDefault(),!ne&&fe&&H(O.key));const Se=T.current;if(O.target!==Se||!sV.includes(O.key))return;O.preventDefault();const he=_().filter(se=>!se.disabled).map(se=>se.ref.current);sT.includes(O.key)&&he.reverse(),EV(he)}),onBlur:Y(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(M.current),I.current="")}),onPointerMove:Y(e.onPointerMove,cc(O=>{const K=O.target,G=L.current!==O.clientX;if(O.currentTarget.contains(K)&&G){const ne=O.clientX>L.current?"right":"left";$.current=ne,L.current=O.clientX}}))})})})})})})});uT.displayName=Pn;var gV="MenuGroup",By=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ce.div,{role:"group",...r,ref:t})});By.displayName=gV;var vV="MenuLabel",dT=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ce.div,{...r,ref:t})});dT.displayName=vV;var Vd="MenuItem",Yw="menu.itemSelect",Xf=p.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...s}=e,i=p.useRef(null),o=Wc(Vd,e.__scopeMenu),a=Vy(Vd,e.__scopeMenu),l=De(t,i),c=p.useRef(!1),u=()=>{const f=i.current;if(!n&&f){const h=new CustomEvent(Yw,{bubbles:!0,cancelable:!0});f.addEventListener(Yw,m=>r==null?void 0:r(m),{once:!0}),ry(f,h),h.defaultPrevented?c.current=!1:o.onClose()}};return d.jsx(fT,{...s,ref:l,disabled:n,onClick:Y(e.onClick,u),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),c.current=!0},onPointerUp:Y(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:Y(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||ng.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Xf.displayName=Vd;var fT=p.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=e,o=Vy(Vd,n),a=oT(n),l=p.useRef(null),c=De(t,l),[u,f]=p.useState(!1),[h,m]=p.useState("");return p.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[i.children]),d.jsx(lc.ItemSlot,{scope:n,disabled:r,textValue:s??h,children:d.jsx(rT,{asChild:!0,...a,focusable:!r,children:d.jsx(ce.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:c,onPointerMove:Y(e.onPointerMove,cc(y=>{r?o.onItemLeave(y):(o.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y(e.onPointerLeave,cc(y=>o.onItemLeave(y))),onFocus:Y(e.onFocus,()=>f(!0)),onBlur:Y(e.onBlur,()=>f(!1))})})})}),yV="MenuCheckboxItem",hT=p.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...s}=e;return d.jsx(yT,{scope:e.__scopeMenu,checked:n,children:d.jsx(Xf,{role:"menuitemcheckbox","aria-checked":Ud(n)?"mixed":n,...s,ref:t,"data-state":Wy(n),onSelect:Y(s.onSelect,()=>r==null?void 0:r(Ud(n)?!0:!n),{checkForDefaultPrevented:!1})})})});hT.displayName=yV;var pT="MenuRadioGroup",[xV,wV]=qi(pT,{value:void 0,onValueChange:()=>{}}),mT=p.forwardRef((e,t)=>{const{value:n,onValueChange:r,...s}=e,i=Tt(r);return d.jsx(xV,{scope:e.__scopeMenu,value:n,onValueChange:i,children:d.jsx(By,{...s,ref:t})})});mT.displayName=pT;var gT="MenuRadioItem",vT=p.forwardRef((e,t)=>{const{value:n,...r}=e,s=wV(gT,e.__scopeMenu),i=n===s.value;return d.jsx(yT,{scope:e.__scopeMenu,checked:i,children:d.jsx(Xf,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Wy(i),onSelect:Y(r.onSelect,()=>{var o;return(o=s.onValueChange)==null?void 0:o.call(s,n)},{checkForDefaultPrevented:!1})})})});vT.displayName=gT;var zy="MenuItemIndicator",[yT,bV]=qi(zy,{checked:!1}),xT=p.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...s}=e,i=bV(zy,n);return d.jsx(Zn,{present:r||Ud(i.checked)||i.checked===!0,children:d.jsx(ce.span,{...s,ref:t,"data-state":Wy(i.checked)})})});xT.displayName=zy;var _V="MenuSeparator",wT=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ce.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});wT.displayName=_V;var SV="MenuArrow",bT=p.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,s=Zf(n);return d.jsx(wy,{...s,...r,ref:t})});bT.displayName=SV;var CV="MenuSub",[EH,_T]=qi(CV),dl="MenuSubTrigger",ST=p.forwardRef((e,t)=>{const n=Qi(dl,e.__scopeMenu),r=Wc(dl,e.__scopeMenu),s=_T(dl,e.__scopeMenu),i=Vy(dl,e.__scopeMenu),o=p.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=p.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return p.useEffect(()=>u,[u]),p.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),d.jsx(Fy,{asChild:!0,...c,children:d.jsx(fT,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":kT(n.open),...e,ref:Of(t,s.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Y(e.onPointerMove,cc(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:Y(e.onPointerLeave,cc(f=>{var m,y;u();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(y=n.content)==null?void 0:y.dataset.side,w=g==="right",x=w?-5:5,v=h[w?"left":"right"],b=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:v,y:h.top},{x:b,y:h.top},{x:b,y:h.bottom},{x:v,y:h.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Y(e.onKeyDown,f=>{var m;const h=i.searchRef.current!=="";e.disabled||h&&f.key===" "||iV[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});ST.displayName=dl;var CT="MenuSubContent",ET=p.forwardRef((e,t)=>{const n=lT(Pn,e.__scopeMenu),{forceMount:r=n.forceMount,...s}=e,i=Qi(Pn,e.__scopeMenu),o=Wc(Pn,e.__scopeMenu),a=_T(CT,e.__scopeMenu),l=p.useRef(null),c=De(t,l);return d.jsx(lc.Provider,{scope:e.__scopeMenu,children:d.jsx(Zn,{present:r||i.open,children:d.jsx(lc.Slot,{scope:e.__scopeMenu,children:d.jsx(Uy,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;o.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:Y(e.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Y(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:Y(e.onKeyDown,u=>{var m;const f=u.currentTarget.contains(u.target),h=oV[o.dir].includes(u.key);f&&h&&(i.onOpenChange(!1),(m=a.trigger)==null||m.focus(),u.preventDefault())})})})})})});ET.displayName=CT;function kT(e){return e?"open":"closed"}function Ud(e){return e==="indeterminate"}function Wy(e){return Ud(e)?"indeterminate":e?"checked":"unchecked"}function EV(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function kV(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function TV(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=kV(e,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function PV(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 a=t[i].x,l=t[i].y,c=t[o].x,u=t[o].y;l>r!=u>r&&n<(c-a)*(r-l)/(u-l)+a&&(s=!s)}return s}function jV(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return PV(n,t)}function cc(e){return t=>t.pointerType==="mouse"?e(t):void 0}var RV=aT,NV=Fy,AV=cT,OV=uT,MV=By,DV=dT,IV=Xf,LV=hT,FV=mT,$V=vT,VV=xT,UV=wT,BV=bT,zV=ST,WV=ET,Hy="DropdownMenu",[HV,kH]=Zr(Hy,[iT]),Ht=iT(),[KV,TT]=HV(Hy),PT=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,l=Ht(t),c=p.useRef(null),[u=!1,f]=Bs({prop:s,defaultProp:i,onChange:o});return d.jsx(KV,{scope:t,triggerId:Gn(),triggerRef:c,contentId:Gn(),open:u,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(h=>!h),[f]),modal:a,children:d.jsx(RV,{...l,open:u,onOpenChange:f,dir:r,modal:a,children:n})})};PT.displayName=Hy;var jT="DropdownMenuTrigger",RT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=e,i=TT(jT,n),o=Ht(n);return d.jsx(NV,{asChild:!0,...o,children:d.jsx(ce.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:Of(t,i.triggerRef),onPointerDown:Y(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:Y(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});RT.displayName=jT;var GV="DropdownMenuPortal",NT=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ht(t);return d.jsx(AV,{...r,...n})};NT.displayName=GV;var AT="DropdownMenuContent",OT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=TT(AT,n),i=Ht(n),o=p.useRef(!1);return d.jsx(OV,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:t,onCloseAutoFocus:Y(e.onCloseAutoFocus,a=>{var l;o.current||(l=s.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:Y(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!s.modal||u)&&(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)"}})});OT.displayName=AT;var qV="DropdownMenuGroup",QV=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(MV,{...s,...r,ref:t})});QV.displayName=qV;var YV="DropdownMenuLabel",MT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(DV,{...s,...r,ref:t})});MT.displayName=YV;var ZV="DropdownMenuItem",DT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(IV,{...s,...r,ref:t})});DT.displayName=ZV;var XV="DropdownMenuCheckboxItem",IT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(LV,{...s,...r,ref:t})});IT.displayName=XV;var JV="DropdownMenuRadioGroup",e5=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(FV,{...s,...r,ref:t})});e5.displayName=JV;var t5="DropdownMenuRadioItem",LT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx($V,{...s,...r,ref:t})});LT.displayName=t5;var n5="DropdownMenuItemIndicator",FT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(VV,{...s,...r,ref:t})});FT.displayName=n5;var r5="DropdownMenuSeparator",$T=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(UV,{...s,...r,ref:t})});$T.displayName=r5;var s5="DropdownMenuArrow",i5=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(BV,{...s,...r,ref:t})});i5.displayName=s5;var o5="DropdownMenuSubTrigger",VT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(zV,{...s,...r,ref:t})});VT.displayName=o5;var a5="DropdownMenuSubContent",UT=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,s=Ht(n);return d.jsx(WV,{...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)"}})});UT.displayName=a5;var l5=PT,c5=RT,u5=NT,BT=OT,zT=MT,WT=DT,HT=IT,KT=LT,GT=FT,qT=$T,QT=VT,YT=UT;const d5=l5,f5=c5,h5=p.forwardRef(({className:e,inset:t,children:n,...r},s)=>d.jsxs(QT,{ref:s,className:U("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,d.jsx(yE,{className:"ml-auto h-4 w-4"})]}));
322h5.displayName=QT.displayName;const p5=p.forwardRef(({className:e,...t},n)=>d.jsx(YT,{ref:n,className:U("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}));p5.displayName=YT.displayName;const ZT=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(u5,{children:d.jsx(BT,{ref:r,sideOffset:t,className:U("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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));ZT.displayName=BT.displayName;const rg=p.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(WT,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));rg.displayName=WT.displayName;const m5=p.forwardRef(({className:e,children:t,checked:n,...r},s)=>d.jsxs(HT,{ref:s,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(GT,{children:d.jsx(gE,{className:"h-4 w-4"})})}),t]}));m5.displayName=HT.displayName;const g5=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(KT,{ref:r,className:U("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(GT,{children:d.jsx(aI,{className:"h-2 w-2 fill-current"})})}),t]}));g5.displayName=KT.displayName;const v5=p.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(zT,{ref:r,className:U("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));v5.displayName=zT.displayName;const XT=p.forwardRef(({className:e,...t},n)=>d.jsx(qT,{ref:n,className:U("-mx-1 my-1 h-px bg-muted",e),...t}));XT.displayName=qT.displayName;const uc=Ay,dc=Oy,y5=My,JT=p.forwardRef(({className:e,...t},n)=>d.jsx(Fc,{ref:n,className:U("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}));JT.displayName=Fc.displayName;const ha=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(y5,{children:[d.jsx(JT,{}),d.jsxs($c,{ref:r,className:U("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),...n,children:[t,d.jsxs(Gf,{className:"absolute right-4 top-4 roun
322ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(ay,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ha.displayName=$c.displayName;const pa=({className:e,...t})=>d.jsx("div",{className:U("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});pa.displayName="DialogHeader";const ma=p.forwardRef(({className:e,...t},n)=>d.jsx(Vc,{ref:n,className:U("text-lg font-semibold leading-none tracking-tight",e),...t}));ma.displayName=Vc.displayName;const x5=p.forwardRef(({className:e,...t},n)=>d.jsx(Uc,{ref:n,className:U("text-sm text-muted-foreground",e),...t}));x5.displayName=Uc.displayName;var Hc=e=>e.type==="checkbox",gi=e=>e instanceof Date,$t=e=>e==null;const eP=e=>typeof e=="object";var ct=e=>!$t(e)&&!Array.isArray(e)&&eP(e)&&!gi(e),tP=e=>ct(e)&&e.target?Hc(e.target)?e.target.checked:e.target.value:e,w5=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,nP=(e,t)=>e.has(w5(t)),b5=e=>{const t=e.constructor&&e.constructor.prototype;return ct(t)&&t.hasOwnProperty("isPrototypeOf")},Ky=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Gt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Ky&&(e instanceof Blob||e instanceof FileList))&&(n||ct(e)))if(t=n?[]:{},!n&&!b5(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Gt(e[r]));else return e;return t}var Jf=e=>Array.isArray(e)?e.filter(Boolean):[],ot=e=>e===void 0,q=(e,t,n)=>{if(!t||!ct(e))return n;const r=Jf(t.split(/[,[\].]+?/)).reduce((s,i)=>$t(s)?s:s[i],e);return ot(r)||r===e?ot(e[t])?n:e[t]:r},Sn=e=>typeof e=="boolean",Gy=e=>/^\w*$/.test(e),rP=e=>Jf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ie=(e,t,n)=>{let r=-1;const s=Gy(t)?[t]:rP(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=ct(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const Bd={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Wn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Er={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},sP=F.createContext(null),eh=()=>F.useContext(sP),_5=e=>{const{children:t,...n}=e;return F.createElement(sP.Provider,{value:n},t)};var iP=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==Wn.all&&(t._proxyFormState[o]=!r||Wn.all),n&&(n[o]=!0),e[o]}});return s},Yt=e=>ct(e)&&!Object.keys(e).length,oP=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Yt(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||Wn.all))},Nl=e=>Array.isArray(e)?e:[e],aP=(e,t,n)=>!e||!t||e===t||Nl(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function qy(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function S5(e){const t=eh(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=F.useState(n._formState),l=F.useRef(!0),c=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=F.useRef(s);return u.current=s,qy({disabled:r,next:f=>l.current&&aP(u.current,f.name,i)&&oP(f,c.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),iP(o,n,c.current,!1)}var hr=e=>typeof e=="string",lP=(e,t,n,r,s)=>hr(e)?(r&&t.watch.add(e),q(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),q(n,i))):(r&&(t.watchAll=!0),n);function C5(e){const t=eh(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=F.useRef(r);a.current=r,qy({disabled:i,subject:n._subjects.values,next:u=>{aP(a.current,u.name,o)&&c(Gt(lP(a.current,n._names,u.values||n._formValues,!1,s)))}});const[l,c]=F.useState(n._getWatch(r,s));return F.useEffect(()=>n._removeUnmounted()),l}function E5(e){const t=eh(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=nP(s._names.array,n),a=C5({control:s,name:n,defaultValue:q(s._formValues,n,q(s._defaultValues,n,e.defaultValue)),exact:!0}),l=S5({control:s,name:n,exact:!0}),c=F.useRef(s.register(n,{...e.rules,value:a,...Sn(e.disabled)?{disabled:e.disabled}:{}}));return F.useEffect(()=>{const u=s._options.shouldUnregister||i,f=(h,m)=>{const y=q(s._fields,h);y&&y._f&&(y._f.mount=m)};if(f(n,!0),u){const h=Gt(q(s._options.defaultValues,n));Ie(s._defaultValues,n,h),ot(q(s._formValues,n))&&Ie(s._formValues,n,h)}return()=>{(o?u&&!s._state.action:u)?s.unregister(n):f(n,!1)}},[n,s,o,i]),F.useEffect(()=>{q(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:q(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Sn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:F.useCallback(u=>c.current.onChange({target:{value:tP(u),name:n},type:Bd.CHANGE}),[n]),onBlur:F.useCallback(()=>c.current.onBlur({target:{value:q(s._formValues,n),name:n},type:Bd.BLUR}),[n,s]),ref:F.useCallback(u=>{const f=q(s._fields,n);f&&u&&(f._f.ref={focus:()=>
vendor: 27,855 bytes, line 322
322u.focus(),select:()=>u.select(),setCustomValidity:h=>u.setCustomValidity(h),reportValidity:()=>u.reportValidity()})},[s._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!q(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!q(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!q(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!q(l.validatingFields,n)},error:{enumerable:!0,get:()=>q(l.errors,n)}})}}const k5=e=>e.render(E5(e));var cP=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},Zw=e=>({isOnSubmit:!e||e===Wn.onSubmit,isOnBlur:e===Wn.onBlur,isOnChange:e===Wn.onChange,isOnAll:e===Wn.all,isOnTouch:e===Wn.onTouched}),Xw=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Al=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=q(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Al(a,t))break}else if(ct(a)&&Al(a,t))break}}};var T5=(e,t,n)=>{const r=Nl(q(e,n));return Ie(r,"root",t[n]),Ie(e,n,r),e},Qy=e=>e.type==="file",Mr=e=>typeof e=="function",zd=e=>{if(!Ky)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},nd=e=>hr(e),Yy=e=>e.type==="radio",Wd=e=>e instanceof RegExp;const Jw={value:!1,isValid:!1},eb={value:!0,isValid:!0};var uP=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ot(e[0].attributes.value)?ot(e[0].value)||e[0].value===""?eb:{value:e[0].value,isValid:!0}:eb:Jw}return Jw};const tb={isValid:!1,value:null};var dP=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,tb):tb;function nb(e,t,n="validate"){if(nd(e)||Array.isArray(e)&&e.every(nd)||Sn(e)&&!e)return{type:n,message:nd(e)?e:"",ref:t}}var io=e=>ct(e)&&!Wd(e)?e:{value:e,message:""},rb=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:c,min:u,max:f,pattern:h,validate:m,name:y,valueAsNumber:g,mount:w,disabled:x}=e._f,v=q(t,y);if(!w||x)return{};const b=o?o[0]:i,_=A=>{r&&b.reportValidity&&(b.setCustomValidity(Sn(A)?"":A||""),b.reportValidity())},S={},P=Yy(i),T=Hc(i),C=P||T,M=(g||Qy(i))&&ot(i.value)&&ot(v)||zd(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,I=cP.bind(null,y,n,S),R=(A,$,L,Z=Er.maxLength,V=Er.minLength)=>{const H=A?$:L;S[y]={type:A?Z:V,message:H,ref:i,...I(A?Z:V,H)}};if(s?!Array.isArray(v)||!v.length:a&&(!C&&(M||$t(v))||Sn(v)&&!v||T&&!uP(o).isValid||P&&!dP(o).isValid)){const{value:A,message:$}=nd(a)?{value:!!a,message:a}:io(a);if(A&&(S[y]={type:Er.required,message:$,ref:b,...I(Er.required,$)},!n))return _($),S}if(!M&&(!$t(u)||!$t(f))){let A,$;const L=io(f),Z=io(u);if(!$t(v)&&!isNaN(v)){const V=i.valueAsNumber||v&&+v;$t(L.value)||(A=V>L.value),$t(Z.value)||($=V<Z.value)}else{const V=i.valueAsDate||new Date(v),H=K=>new Date(new Date().toDateString()+" "+K),j=i.type=="time",O=i.type=="week";hr(L.value)&&v&&(A=j?H(v)>H(L.value):O?v>L.value:V>new Date(L.value)),hr(Z.value)&&v&&($=j?H(v)<H(Z.value):O?v<Z.value:V<new Date(Z.value))}if((A||$)&&(R(!!A,L.message,Z.message,Er.max,Er.min),!n))return _(S[y].message),S}if((l||c)&&!M&&(hr(v)||s&&Array.isArray(v))){const A=io(l),$=io(c),L=!$t(A.value)&&v.length>+A.value,Z=!$t($.value)&&v.length<+$.value;if((L||Z)&&(R(L,A.message,$.message),!n))return _(S[y].message),S}if(h&&!M&&hr(v)){const{value:A,message:$}=io(h);if(Wd(A)&&!v.match(A)&&(S[y]={type:Er.pattern,message:$,ref:i,...I(Er.pattern,$)},!n))return _($),S}if(m){if(Mr(m)){const A=await m(v,t),$=nb(A,b);if($&&(S[y]={...$,...I(Er.validate,$.message)},!n))return _($.message),S}else if(ct(m)){let A={};for(const $ in m){if(!Yt(A)&&!n)break;const L=nb(await m[$](v,t),b,$);L&&(A={...L,...I($,L.message)},_(L.message),n&&(S[y]=A))}if(!Yt(A)&&(S[y]={ref:b,...A},!n))return S}}return _(!0),S};function P5(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=ot(e)?r++:e[t[r++]];return e}function j5(e){for(const t in e)if(e.hasOwnProperty(t)&&!ot(e[t]))return!1;return!0}function ft(e,t){const n=Array.isArray(t)?t:Gy(t)?[t]:rP(t),r=n.length===1?e:P5(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(ct(r)&&Yt(r)||Array.isArray(r)&&j5(r))&&ft(e,n.slice(0,-1)),e}var dp=()=>{let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}},sg=e=>$t(e)||!eP(e);function vs(e,t){if(sg(e)||sg(t))return e===t;if(gi(e)&&gi(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(gi(i)&&gi(o)||ct(i)&&ct(o)||Array.isArray(i)&&Array.isArray(o)?!vs(i,o):i!==o)return!1}}return!0}var fP=e=>e.type==="select-multiple",R5=e=>Yy(e)||Hc(e),fp=e=>zd(e)&&e.isConnected,hP=e=>{for(const t in e)if(Mr(e[t]))return!0;return!1};function Hd(e,t={}){const n=Array.isArray(e);if(ct(e)||n)for(const r in e)Array.isArray(e[r])||ct(e[r])&&!hP(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Hd(e[r],t[r])):$t(e[r])||(t[r]=!0);return t}function pP(e,t,n){const r=Array.isArray(e);if(ct(e)||r)for(const s in e)Array.isArray(e[s])||ct(e[s])&&!hP(e[s])?ot(t)||sg(n[s])?n[s]=Array.isArray(e[s])?Hd(e[s],[]):{...Hd(e[s])}:pP(e[s],$t(t)?{}:t[s],n[s]):n[s]=!vs(e[s],t[s]);return n}var Ja=(e,t)=>pP(e,t,Hd(t)),mP=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ot(e)?e:t?e===""?NaN:e&&+e:n&&hr(e)?new Date(e):r?r(e):e;function hp(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Qy(t)?t.files:Yy(t)?dP(e.refs).value:fP(t)?[...t.selectedOptions].map(({value:n})=>n):Hc(t)?uP(e.refs).value:mP(ot(t.value)?e.ref.value:t.value,e)}var N5=(e,t,n,r)=>{const s={};for(const i of e){const o=q(t,i);o&&Ie(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},el=e=>ot(e)?e:Wd(e)?e.source:ct(e)?Wd(e.value)?e.value.source:e.value:e;const sb="AsyncFunction";var A5=e=>(!e||!e.validate)&&!!(Mr(e.validate)&&e.validate.constructor.name===sb||ct(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===sb)),O5=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function ib(e,t,n){const r=q(e,n);if(r||Gy(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=q(t,i),a=q(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var M5=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,D5=(e,t)=>!Jf(q(e,t)).length&&ft(e,t);const I5={mode:Wn.onSubmit,reValidateMode:Wn.onChange,shouldFocusError:!0};function L5(e={}){let t={...I5,...e},n={submitCount:0,isDirty:!1,isLoading:Mr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=ct(t.defaultValues)||ct(t.values)?Gt(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Gt(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:dp(),array:dp(),state:dp()},h=Zw(t.mode),m=Zw(t.reValidateMode),y=t.criteriaMode===Wn.all,g=E=>N=>{clearTimeout(c),c=setTimeout(E,N)},w=async E=>{if(!e.disabled&&(u.isValid||E)){const N=t.resolver?Yt((await C()).errors):await I(r,!0);N!==n.isValid&&f.state.next({isValid:N})}},x=(E,N)=>{!e.disabled&&(u.isValidating||u.validatingFields)&&((E||Array.from(a.mount)).forEach(D=>{D&&(N?Ie(n.validatingFields,D,N):ft(n.validatingFields,D))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Yt(n.validatingFields)}))},v=(E,N=[],D,X,Q=!0,W=!0)=>{if(X&&D&&!e.disabled){if(o.action=!0,W&&Array.isArray(q(r,E))){const oe=D(q(r,E),X.argA,X.argB);Q&&Ie(r,E,oe)}if(W&&Array.isArray(q(n.errors,E))){const oe=D(q(n.errors,E),X.argA,X.argB);Q&&Ie(n.errors,E,oe),D5(n.errors,E)}if(u.touchedFields&&W&&Array.isArray(q(n.touchedFields,E))){const oe=D(q(n.touchedFields,E),X.argA,X.argB);Q&&Ie(n.touchedFields,E,oe)}u.dirtyFields&&(n.dirtyFields=Ja(s,i)),f.state.next({name:E,isDirty:A(E,N),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ie(i,E,N)},b=(E,N)=>{Ie(n.errors,E,N),f.state.next({errors:n.errors})},_=E=>{n.errors=E,f.state.next({errors:n.errors,isValid:!1})},S=(E,N,D,X)=>{const Q=q(r,E);if(Q){const W=q(i,E,ot(D)?q(s,E):D);ot(W)||X&&X.defaultChecked||N?Ie(i,E,N?W:hp(Q._f)):Z(E,W),o.mount&&w()}},P=(E,N,D,X,Q)=>{let W=!1,oe=!1;const me={name:E};if(!e.disabled){const tt=!!(q(r,E)&&q(r,E)._f&&q(r,E)._f.disabled);if(!D||X){u.isDirty&&(oe=n.isDirty,n.isDirty=me.isDirty=A(),W=oe!==me.isDirty);const ze=tt||vs(q(s,E),N);oe=!!(!tt&&q(n.dirtyFields,E)),ze||tt?ft(n.dirtyFields,E):Ie(n.dirtyFields,E,!0),me.dirtyFields=n.dirtyFields,W=W||u.dirtyFields&&oe!==!ze}if(D){const ze=q(n.touchedFields,E);ze||(Ie(n.touchedFields,E,D),me.touchedFields=n.touchedFields,W=W||u.touchedFields&&ze!==D)}W&&Q&&f.state.next(me)}return W?me:{}},T=(E,N,D,X)=>{const Q=q(n.errors,E),W=u.isValid&&Sn(N)&&n.isValid!==N;if(e.delayError&&D?(l=g(()=>b(E,D)),l(e.delayError)):(clearTimeout(c),l=null,D?Ie(n.errors,E,D):ft(n.errors,E)),(D?!vs(Q,D):Q)||!Yt(X)||W){const oe={...X,...W&&Sn(N)?{isValid:N}:{},errors:n.errors,name:E};n={...n,...oe},f.state.next(oe)}},C=async E=>{x(E,!0);const N=await t.resolver(i,t.context,N5(E||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return x(E),N},M=async E=>{const{errors:N}=await C(E);if(E)for(const D of E){const X=q(N,D);X?Ie(n.errors,D,X):ft(n.errors,D)}else n.errors=N;return N},I=async(E,N,D={valid:!0})=>{for(const X in E){const Q=E[X];if(Q){const{_f:W,...oe}=Q;if(W){const me=a.array.has(W.name),tt=Q._f&&A5(Q._f);tt&&u.validatingFields&&x([X],!0);const ze=await rb(Q,i,y,t.shouldUseNativeValidation&&!N,me);if(tt&&u.validatingFields&&x([X]),ze[W.name]&&(D.valid=!1,N))break;!N&&(q(ze,W.name)?me?T5(n.errors,ze,W.name):Ie(n.errors,W.name,ze[W.name]):ft(n.errors,W.name))}!Yt(oe)&&await I(oe,N,D)}}return D.valid},R=()=>{for(const E of a.unMount){const N=q(r,E);N&&(N._f.refs?N._f.refs.every(D=>!fp(D)):!fp(N._f.ref))&&he(E)}a.unMount=new Set},A=(E,N)=>!e.disabled&&(E&&N&&Ie(i,E,N),!vs(G(),s)),$=(E,N,D)=>lP(E,a,{...o.mount?i:ot(N)?s:hr(E)?{[E]:N}:N},D,N),L=E=>Jf(q(o.mount?i:s,E,e.shouldUnregister?q(s,E,[]):[])),Z=(E,N,D={})=>{const X=q(r,E);let Q=N;if(X){const W=X._f;W&&(!W.disabled&&Ie(i,E,mP(N,W)),Q=zd(W.ref)&&$t(N)?"":N,fP(W.ref)?[...W.ref.options].forEach(oe=>oe.selected=Q.includes(oe.value)):W.refs?Hc(W.ref)?W.refs.length>1?W.refs.forEach(oe=>(!oe.defaultChecked||!oe.disabled)&&(oe.checked=Array.isArray(Q)?!!Q.find(me=>me===oe.value):Q===oe.value)):W.refs[0]&&(W.refs[0].checked=!!Q):W.refs.forEach(oe=>oe.checked=oe.value===Q):Qy(W.ref)?W.ref.value="":(W.ref.value=Q,W.ref.type||f.values.next({name:E,values:{...i}})))}(D.shouldDirty||D.shouldTouch)&&P(E,Q,D.shouldTouch,D.shouldDirty,!0),D.shouldValidate&&K(E)},V=(E,N,D)=>{for(const X in N){const Q=N[X],W=`${E}.${X}`,oe=q(r,W);(a.array.has(E)||ct(Q)||oe&&!oe._f)&&!gi(Q)?V(W,Q,D):Z(W,Q,D)}},H=(E,N,D={})=>{const X=q(r,E),Q=a.array.has(E),W=Gt(N);Ie(i,E,W),Q?(f.array.next({name:E,values:{...i}}),(u.isDirty||u.dirtyFields)&&D.shouldDirty&&f.state.next({name:E,dirtyFields:Ja(s,i),isDirty:A(E,W)})):X&&!X._f&&!$t(W)?V(E,W,D):Z(E,W,D),Xw(E,a)&&f.state.next({...n}),f.values.next({name:o.mount?E:void 0,values:{...i}})},j=async E=>{o.mount=!0;const N=E.target;let D=N.name,X=!0;const Q=q(r,D),W=()=>N.type?hp(Q._f):tP(E),oe=me=>{X=Number.isNaN(me)||gi(me)&&isNaN(me.getTime())||vs(me,q(i,D,me))};if(Q){let me,tt;const ze=W(),Jn=E.type===Bd.BLUR||E.type===Bd.FOCUS_OUT,es=!O5(Q._f)&&!t.resolver&&!q(n.errors,D)&&!Q._f.deps||M5(Jn,q(n.touchedFields,D),n.isSubmitted,m,h),Ji=Xw(D,a,Jn);Ie(i,D,ze),Jn?(Q._f.onBlur&&Q._f.onBlur(E),l&&l(0)):Q._f.onChange&&Q._f.onChange(E);const Ua=P(D,ze,Jn,!1),eu=!Yt(Ua)||Ji;if(!Jn&&f.values.next({name:D,type:E.type,values:{...i}}),es)return u.isValid&&(e.mode==="onBlur"?Jn&&w():w()),eu&&f.state.next({name:D,...Ji?{}:Ua});if(!Jn&&Ji&&f.state.next({...n}),t.resolver){const{errors:Ba}=await C([D]);if(oe(ze),X){const xh=ib(n.errors,r,D),eo=ib(Ba,r,xh.name||D);me=eo.error,D=eo.name,tt=Yt(Ba)}}else x([D],!0),me=(await rb(Q,i,y,t.shouldUseNativeValidation))[D],x([D]),oe(ze),X&&(me?tt=!1:u.isValid&&(tt=await I(r,!0)));X&&(Q._f.deps&&K(Q._f.deps),T(D,tt,me,Ua))}},O=(E,N)=>{if(q(n.errors,N)&&E.focus)return E.focus(),1},K=async(E,N={})=>{let D,X;const Q=Nl(E);if(t.resolver){const W=await M(ot(E)?E:Q);D=Yt(W),X=E?!Q.some(oe=>q(W,oe)):D}else E?(X=(await Promise.all(Q.map(async W=>{const oe=q(r,W);return await I(oe&&oe._f?{[W]:oe}:oe)}))).every(Boolean),!(!X&&!n.isValid)&&w()):X=D=await I(r);return f.state.next({...!hr(E)||u.isValid&&D!==n.isValid?{}:{name:E},...t.resolver||!E?{isValid:D}:{},errors:n.errors}),N.shouldFocus&&!X&&Al(r,O,E?Q:a.mount),X},G=E=>{const N={...o.mount?i:s};return ot(E)?N:hr(E)?q(N,E):E.map(D=>q(N,D))},ne=(E,N)=>({invalid:!!q((N||n).errors,E),isDirty:!!q((N||n).dirtyFields,E),error:q((N||n).errors,E),isValidating:!!q(n.validatingFields,E),isTouched:!!q((N||n).touchedFields,E)}),fe=E=>{E&&Nl(E).forEach(N=>ft(n.errors,N)),f.state.next({errors:E?n.errors:{}})},Se=(E,N,D)=>{const X=(q(r,E,{_f:{}})._f||{}).ref,Q=q(n.errors,E)||{},{ref:W,message:oe,type:me,...tt}=Q;Ie(n.errors,E,{...tt,...N,ref:X}),f.state.next({name:E,errors:n.errors,isValid:!1}),D&&D.shouldFocus&&X&&X.focus&&X.focus()},Ye=(E,N)=>Mr(E)?f.values.subscribe({next:D=>E($(void 0,N),D)}):$(E,N,!0),he=(E,N={})=>{for(const D of E?Nl(E):a.mount)a.mount.delete(D),a.array.delete(D),N.keepValue||(ft(r,D),ft(i,D)),!N.keepError&&ft(n.errors,D),!N.keepDirty&&ft(n.dirtyFields,D),!N.keepTouched&&ft(n.touchedFields,D),!N.keepIsValidating&&ft(n.validatingFields,D),!t.shouldUnregister&&!N.keepDefaultValue&&ft(s,D);f.values.next({values:{...i}}),f.state.next({...n,...N.keepDirty?{isDirty:A()}:{}}),!N.keepIsValid&&w()},se=({disabled:E,name:N,field:D,fields:X,value:Q})=>{if(Sn(E)&&o.mount||E){const W=E?void 0:ot(Q)?hp(D?D._f:q(X,N)._f):Q;Ie(i,N,W),P(N,W,!1,!1,!0)}},we=(E,N={})=>{let D=q(r,E);const X=Sn(N.disabled)||Sn(e.disabled);return Ie(r,E,{...D||{},_f:{...D&&D._f?D._f:{ref:{name:E}},name:E,mount:!0,...N}}),a.mount.add(E),D?se({field:D,disabled:Sn(N.disabled)?N.disabled:e.disabled,name:E,value:N.value}):S(E,!0,N.value),{...X?{disabled:N.disabled||e.disabled}:{},...t.progressive?{required:!!N.required,min:el(N.min),max:el(N.max),minLength:el(N.minLength),maxLength:el(N.maxLength),pattern:el(N.pattern)}:{},name:E,onChange:j,onBlur:j,ref:Q=>{if(Q){we(E,N),D=q(r,E);const W=ot(Q.value)&&Q.querySelectorAll&&Q.querySelectorAll("input,select,textarea")[0]||Q,oe=R5(W),me=D._f.refs||[];if(oe?me.find(tt=>tt===W):W===D._f.ref)return;Ie(r,E,{_f:{...D._f,...oe?{refs:[...me.filter(fp),W,...Array.isArray(q(s,E))?[{}]:[]],ref:{type:W.type,name:E}}:{ref:W}}}),S(E,!1,void 0,W)}else D=q(r,E,{}),D._f&&(D._f.mount=!1),(t.shouldUnregister||N.shouldUnregister)&&!(nP(a.array,E)&&o.action)&&a.unMount.add(E)}}},Pe=()=>t.shouldFocusError&&Al(r,O,a.mount),Ce=E=>{Sn(E)&&(f.state.next({disabled:E}),Al(r,(N,D)=>{const X=q(r,D);X&&(N.disabled=X._f.disabled||E,Array.isArray(X._f.refs)&&X._f.refs.forEach(Q=>{Q.disabled=X._f.disabled||E}))},0,!1))},Ae=(E,N)=>async D=>{let X;D&&(D.preventDefault&&D.preventDefault(),D.persist&&D.persist());let Q=Gt(i);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:W,values:oe}=await C();n.errors=W,Q=oe}else await I(r);if(ft(n.errors,"root"),Yt(n.errors)){f.state.next({errors:{}});try{await E(Q,D)}catch(W){X=W}}else N&&await N({...n.errors},D),Pe(),setTimeout(Pe);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Yt(n.errors)&&!X,submitCount:n.submitCount+1,errors:n.errors}),X)throw X},Ne=(E,N={})=>{q(r,E)&&(ot(N.defaultValue)?H(E,Gt(q(s,E))):(H(E,N.defaultValue),Ie(s,E,Gt(N.defaultValue))),N.keepTouched||ft(n.touchedFields,E),N.keepDirty||(ft(n.dirtyFields,E),n.isDirty=N.defaultValue?A(E,Gt(q(s,E))):A()),N.keepError||(ft(n.errors,E),u.isValid&&w()),f.state.next({...n}))},gt=(E,N={})=>{const D=E?Gt(E):s,X=Gt(D),Q=Yt(E),W=Q?s:X;if(N.keepDefaultValues||(s=D),!N.keepValues){if(N.keepDirtyValues){const oe=new Set([...a.mount,...Object.keys(Ja(s,i))]);for(const me of Array.from(oe))q(n.dirtyFields,me)?Ie(W,me,q(i,me)):H(me,q(W,me))}else{if(Ky&&ot(E))for(const oe of a.mount){const me=q(r,oe);if(me&&me._f){const tt=Array.isArray(me._f.refs)?me._f.refs[0]:me._f.ref;if(zd(tt)){const ze=tt.closest("form");if(ze){ze.reset();break}}}}r={}}i=e.shouldUnregister?N.keepDefaultValues?Gt(s):{}:Gt(W),f.array.next({values:{...W}}),f.values.next({values:{...W}})}a={mount:N.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!N.keepIsValid||!!N.keepDirtyValues,o.watch=!!e.shouldUnregister,f.state.next({submitCount:N.keepSubmitCount?n.submitCount:0,isDirty:Q?!1:N.keepDirty?n.isDirty:!!(N.keepDefaultValues&&!vs(E,s)),isSubmitted:N.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Q?{}:N.keepDirtyValues?N.keepDefaultValues&&i?Ja(s,i):n.dirtyFields:N.keepDefaultValues&&E?Ja(s,E):N.keepDirty?n.dirtyFields:{},touchedFields:N.keepTouched?n.touchedFields:{},errors:N.keepErrors?n.errors:{},isSubmitSuccessful:N.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Pt=(E,N)=>gt(Mr(E)?E(i):E,N);return{control:{register:we,unregister:he,getFieldState:ne,handleSubmit:Ae,setError:Se,_executeSchema:C,_getWatch:$,_getDirty:A,_updateValid:w,_removeUnmounted:R,_updateFieldArray:v,_updateDisabledField:se,_getFieldArray:L,_reset:gt,_resetDefaultValues:()=>Mr(t.defaultValues)&&t.defaultValues().then(E=>{Pt(E,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:E=>{n={...n,...E}},_disableForm:Ce,_subjects:f,_proxyFormState:u,_setErrors:_,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(E){o=E},get _defaultValues(){return s},get _names(){return a},set _names(E){a=E},get _formState(){return n},set _formState(E){n=E},get _options(){return t},set _options(E){t={...t,...E}}},trigger:K,register:we,handleSubmit:Ae,watch:Ye,setValue:H,getValues:G,reset:Pt,resetField:Ne,clearErrors:fe,unregister:he,setError:Se,setFocus:(E,N={})=>{const D=q(r,E),X=D&&D._f;if(X){const Q=X.refs?X.refs[0]:X.ref;Q.focus&&(Q.focus(),N.shouldSelect&&Q.select())}},getFieldState:ne}}function F5(e={}){const t=F.useRef(),n=F.useRef(),[r,s]=F.useState({isDirty:!1,isValidating:!1,isLoading:Mr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Mr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...L5(e),formState:r});const i=t.current.control;return i._options=e,qy({subject:i._subjects.state,next:o=>{oP(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),F.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),F.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),F.useEffect(()=>{e.values&&!vs(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),F.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),F.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),F.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[r]),t.current.formState=iP(r,i),t.current}const ob=(e,t,n)=>{if(e&&"reportValidity"in e){const r=q(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},gP=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?ob(r.ref,n,e):r.refs&&r.refs.forEach(s=>ob(s,n,e))}},$5=(e,t)=>{t.shouldUseNativeValidation&&gP(e,t);const n={};for(const r in e){const s=q(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(V5(t.names||Object.keys(e),r)){const o=Object.assign({},q(n,r));Ie(o,"root",i),Ie(n,r,o)}else Ie(n,r,i)}return n},V5=(e,t)=>e.some(n=>n.startsWith(t+"."));var U5=function(e,t){for(var n={};e.length;){var r=e[0],s=r.code,i=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var a=r.unionErrors[0].errors[0];n[o]={message:a.message,type:a.code}}else n[o]={message:i,type:s};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=cP(o,t,n,s,c?[].concat(c,r.message):r.message)}e.shift()}return n},B5=function(e,t,n){return n===void 0&&(n={}),function(r,s,i){try{return Promise.resolve(function(o,a){try{var l=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&gP({},i),{errors:{},values:n.raw?r:c}})}catch(c){return a(c)}return l&&l.then?l.then(void 0,a):l}(0,function(o){if(function(a){return Array.isArray(a==null?void 0:a.errors)}(o))return{values:{},errors:$5(U5(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}},Oe;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Oe||(Oe={}));var ab;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ab||(ab={}));const te=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),di=e=>{switch(typeof e){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(e)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(e)?te.array:e===null?te.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?te.promise:typeof Map<"u"&&e instanceof Map?te.map:typeof Set<"u"&&e instanceof Set?te.set:typeof Date<"u"&&e instanceof Date?te.date:te.object;default:return te.unknown}},z=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class jn extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(o))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return s(this),r}static assert(t){if(!(t instanceof jn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}jn.create=e=>new jn(e);const fc=(e,t)=>{let n;switch(e.code){case z.invalid_type:e.received===te.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case z.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Oe.jsonStringifyReplacer)}`;break;case z.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(e.keys,", ")}`;break;case z.invalid_union:n="Invalid input";break;case z.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(e.options)}`;break;case z.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(e.options)}, received '${e.received}'`;break;case z.invalid_arguments:n="Invalid function arguments";break;case z.invalid_return_type:n="Invalid function return type";break;case z.invalid_date:n="Invalid date";break;case z.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Oe.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case z.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case z.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case z.custom:n="Invalid input";break;case z.invalid_intersection_types:n="Intersection results could not be merged";break;case z.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case z.not_finite:n="Number must be finite";break;default:n=t.defaultError,Oe.assertNever(e)}return{message:n}};let z5=fc;function ig(){return z5}const og=e=>
vendor: 7,027 bytes, line 322
322{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}};function J(e,t){const n=ig(),r=og({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fc?void 0:fc].filter(s=>!!s)});e.common.issues.push(r)}class Bt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return de;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Bt.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return de;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const de=Object.freeze({status:"aborted"}),fl=e=>({status:"dirty",value:e}),sn=e=>({status:"valid",value:e}),lb=e=>e.status==="aborted",cb=e=>e.status==="dirty",Kd=e=>e.status==="valid",Gd=e=>typeof Promise<"u"&&e instanceof Promise;function qd(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function vP(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ie||(ie={}));var hl,pl;class br{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ub=(e,t)=>{if(Kd(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new jn(e.common.issues);return this._error=n,this._error}}};function pe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var l,c;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:s}}class ke{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return di(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Bt,ctx:{common:t.parent.common,data:t.data,parsedType:di(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},i=this._parseSync({data:t,path:s.path,parent:s});return ub(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:di(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Gd(s)?s:Promise.resolve(s));return ub(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:z.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new qr({schema:this,typeName:ue.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Lr.create(this,this._def)}nullable(){return Bi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gr.create(this,this._def)}promise(){return pc.create(this,this._def)}or(t){return Zd.create([this,t],this._def)}and(t){return Xd.create(this,t,this._def)}transform(t){return new qr({...pe(this._def),schema:this,typeName:ue.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new rf({...pe(this._def),innerType:this,defaultValue:n,typeName:ue.ZodDefault})}brand(){return new bP({typeName:ue.ZodBranded,type:this,...pe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sf({...pe(this._def),innerType:this,catchValue:n,typeName:ue.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return th.create(this,t)}readonly(){return of.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const W5=/^c[^\s-]{8,}
vendor: 44,267 bytes, line 322
322$/i,H5=/^[0-9a-z]+$/,K5=/^[0-9A-HJKMNP-TV-Z]{26}$/,G5=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,q5=/^[a-z0-9_-]{21}$/i,Q5=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Y5=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Z5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let pp;const X5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,J5=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,e3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,yP="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",t3=new RegExp(`^${yP}$`);function xP(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function n3(e){return new RegExp(`^${xP(e)}$`)}function r3(e){let t=`${yP}T${xP(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function s3(e,t){return!!((t==="v4"||!t)&&X5.test(e)||(t==="v6"||!t)&&J5.test(e))}class Dr extends ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==te.string){const i=this._getOrReturnCtx(t);return J(i,{code:z.invalid_type,expected:te.string,received:i.parsedType}),de}const r=new Bt;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?J(s,{code:z.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&J(s,{code:z.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Y5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"email",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")pp||(pp=new RegExp(Z5,"u")),pp.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"emoji",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")G5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"uuid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")q5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"nanoid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")W5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")H5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"cuid2",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")K5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ulid",code:z.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),J(s,{validation:"url",code:z.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"regex",code:z.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?r3(i).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?t3.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?n3(i).test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{code:z.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Q5.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"duration",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?s3(t.data,i.version)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"ip",code:z.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?e3.test(t.data)||(s=this._getOrReturnCtx(t,s),J(s,{validation:"base64",code:z.invalid_string,message:i.message}),r.dirty()):Oe.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:z.invalid_string,...ie.errToObj(r)})}_addCheck(t){return new Dr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ie.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...ie.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...ie.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ie.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ie.errToObj(n)})}nonempty(t){return this.min(1,ie.errToObj(t))}trim(){return new Dr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Dr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Dr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dr.create=e=>{var t;return new Dr({checks:[],typeName:ue.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pe(e)})};function i3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class ga extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==te.number){const i=this._getOrReturnCtx(t);return J(i,{code:z.invalid_type,expected:te.number,received:i.parsedType}),de}let r;const s=new Bt;for(const i of this._def.checks)i.kind==="int"?Oe.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:z.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?i3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:z.not_finite,message:i.message}),s.dirty()):Oe.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ie.toString(n))}setLimit(t,n,r,s){return new ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ie.toString(s)}]})}_addCheck(t){return new ga({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Oe.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ga.create=e=>new ga({checks:[],typeName:ue.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...pe(e)});class va extends ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==te.bigint){const i=this._getOrReturnCtx(t);return J(i,{code:z.invalid_type,expected:te.bigint,received:i.parsedType}),de}let r;const s=new Bt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:z.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Oe.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ie.toString(n))}setLimit(t,n,r,s){return new va({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ie.toString(s)}]})}_addCheck(t){return new va({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}va.create=e=>{var t;return new va({checks:[],typeName:ue.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...pe(e)})};class ag extends ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==te.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.boolean,received:r.parsedType}),de}return sn(t.data)}}ag.create=e=>new ag({typeName:ue.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...pe(e)});class hc extends ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==te.date){const i=this._getOrReturnCtx(t);return J(i,{code:z.invalid_type,expected:te.date,received:i.parsedType}),de}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return J(i,{code:z.invalid_date}),de}const r=new Bt;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:z.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),J(s,{code:z.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Oe.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new hc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}hc.create=e=>new hc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ue.ZodDate,...pe(e)});class lg extends ke{_parse(t){if(this._getType(t)!==te.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.symbol,received:r.parsedType}),de}return sn(t.data)}}lg.create=e=>new lg({typeName:ue.ZodSymbol,...pe(e)});class Qd extends ke{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.undefined,received:r.parsedType}),de}return sn(t.data)}}Qd.create=e=>new Qd({typeName:ue.ZodUndefined,...pe(e)});class Yd extends ke{_parse(t){if(this._getType(t)!==te.null){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.null,received:r.parsedType}),de}return sn(t.data)}}Yd.create=e=>new Yd({typeName:ue.ZodNull,...pe(e)});class cg extends ke{constructor(){super(...arguments),this._any=!0}_parse(t){return sn(t.data)}}cg.create=e=>new cg({typeName:ue.ZodAny,...pe(e)});class Bo extends ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sn(t.data)}}Bo.create=e=>new Bo({typeName:ue.ZodUnknown,...pe(e)});class Gs extends ke{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:z.invalid_type,expected:te.never,received:n.parsedType}),de}}Gs.create=e=>new Gs({typeName:ue.ZodNever,...pe(e)});class ug extends ke{_parse(t){if(this._getType(t)!==te.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.void,received:r.parsedType}),de}return sn(t.data)}}ug.create=e=>new ug({typeName:ue.ZodVoid,...pe(e)});class gr extends ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==te.array)return J(n,{code:z.invalid_type,expected:te.array,received:n.parsedType}),de;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(J(n,{code:o?z.too_big:z.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(J(n,{code:z.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(J(n,{code:z.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new br(n,o,n.path,a)))).then(o=>Bt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new br(n,o,n.path,a)));return Bt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new gr({...this._def,minLength:{value:t,message:ie.toString(n)}})}max(t,n){return new gr({...this._def,maxLength:{value:t,message:ie.toString(n)}})}length(t,n){return new gr({...this._def,exactLength:{value:t,message:ie.toString(n)}})}nonempty(t){return this.min(1,t)}}gr.create=(e,t)=>new gr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ue.ZodArray,...pe(t)});function co(e){if(e instanceof rt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Lr.create(co(r))}return new rt({...e._def,shape:()=>t})}else return e instanceof gr?new gr({...e._def,type:co(e.element)}):e instanceof Lr?Lr.create(co(e.unwrap())):e instanceof Bi?Bi.create(co(e.unwrap())):e instanceof Gr?Gr.create(e.items.map(t=>co(t))):e}class rt extends ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Oe.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==te.object){const c=this._getOrReturnCtx(t);return J(c,{code:z.invalid_type,expected:te.object,received:c.parsedType}),de}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const c in s.data)o.includes(c)||a.push(c);const l=[];for(const c of o){const u=i[c],f=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new br(s,f,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Gs){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:s.data[u]}});else if(c==="strict")a.length>0&&(J(s,{code:z.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new br(s,f,s.path,u)),alwaysSet:u in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,h=await u.value;c.push({key:f,value:h,alwaysSet:u.alwaysSet})}return c}).then(c=>Bt.mergeObjectSync(r,c)):Bt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ie.errToObj,new rt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=ie.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(t){return new rt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ue.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new rt({...this._def,catchall:t})}pick(t){const n={};return Oe.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}omit(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new rt({...this._def,shape:()=>n})}deepPartial(){return co(this)}partial(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new rt({...this._def,shape:()=>n})}required(t){const n={};return Oe.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Lr;)i=i._def.innerType;n[r]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return wP(Oe.objectKeys(this.shape))}}rt.create=(e,t)=>new rt({shape:()=>e,unknownKeys:"strip",catchall:Gs.create(),typeName:ue.ZodObject,...pe(t)});rt.strictCreate=(e,t)=>new rt({shape:()=>e,unknownKeys:"strict",catchall:Gs.create(),typeName:ue.ZodObject,...pe(t)});rt.lazycreate=(e,t)=>new rt({shape:e,unknownKeys:"strip",catchall:Gs.create(),typeName:ue.ZodObject,...pe(t)});class Zd extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new jn(a.ctx.common.issues));return J(n,{code:z.invalid_union,unionErrors:o}),de}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new jn(l));return J(n,{code:z.invalid_union,unionErrors:a}),de}}get options(){return this._def.options}}Zd.create=(e,t)=>new Zd({options:e,typeName:ue.ZodUnion,...pe(t)});const Tr=e=>e instanceof ef?Tr(e.schema):e instanceof qr?Tr(e.innerType()):e instanceof tf?[e.value]:e instanceof Ui?e.options:e instanceof nf?Oe.objectValues(e.enum):e instanceof rf?Tr(e._def.innerType):e instanceof Qd?[void 0]:e instanceof Yd?[null]:e instanceof Lr?[void 0,...Tr(e.unwrap())]:e instanceof Bi?[null,...Tr(e.unwrap())]:e instanceof bP||e instanceof of?Tr(e.unwrap()):e instanceof sf?Tr(e._def.innerType):[];class Zy extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.object)return J(n,{code:z.invalid_type,expected:te.object,received:n.parsedType}),de;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(J(n,{code:z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),de)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=Tr(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Zy({typeName:ue.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...pe(r)})}}function dg(e,t){const n=di(e),r=di(t);if(e===t)return{valid:!0,data:e};if(n===te.object&&r===te.object){const s=Oe.objectKeys(t),i=Oe.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=dg(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===te.array&&r===te.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=dg(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===te.date&&r===te.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xd extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(lb(i)||lb(o))return de;const a=dg(i.value,o.value);return a.valid?((cb(i)||cb(o))&&n.dirty(),{status:n.value,value:a.data}):(J(r,{code:z.invalid_intersection_types}),de)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Xd.create=(e,t,n)=>new Xd({left:e,right:t,typeName:ue.ZodIntersection,...pe(n)});class Gr extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.array)return J(r,{code:z.invalid_type,expected:te.array,received:r.parsedType}),de;if(r.data.length<this._def.items.length)return J(r,{code:z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),de;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new br(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Bt.mergeArray(n,o)):Bt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Gr({...this._def,rest:t})}}Gr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gr({items:e,typeName:ue.ZodTuple,rest:null,...pe(t)})};class Jd extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.object)return J(r,{code:z.invalid_type,expected:te.object,received:r.parsedType}),de;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new br(r,a,r.path,a)),value:o._parse(new br(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Bt.mergeObjectAsync(n,s):Bt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ke?new Jd({keyType:t,valueType:n,typeName:ue.ZodRecord,...pe(r)}):new Jd({keyType:Dr.create(),valueType:t,typeName:ue.ZodRecord,...pe(n)})}}class fg extends ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.map)return J(r,{code:z.invalid_type,expected:te.map,received:r.parsedType}),de;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],c)=>({key:s._parse(new br(r,a,r.path,[c,"key"])),value:i._parse(new br(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return de;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}fg.create=(e,t,n)=>new fg({valueType:t,keyType:e,typeName:ue.ZodMap,...pe(n)});class ya extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==te.set)return J(r,{code:z.invalid_type,expected:te.set,received:r.parsedType}),de;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(J(r,{code:z.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(J(r,{code:z.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return de;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new br(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new ya({...this._def,minSize:{value:t,message:ie.toString(n)}})}max(t,n){return new ya({...this._def,maxSize:{value:t,message:ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ya.create=(e,t)=>new ya({valueType:e,minSize:null,maxSize:null,typeName:ue.ZodSet,...pe(t)});class Ol extends ke{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.function)return J(n,{code:z.invalid_type,expected:te.function,received:n.parsedType}),de;function r(a,l){return og({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ig(),fc].filter(c=>!!c),issueData:{code:z.invalid_arguments,argumentsError:l}})}function s(a,l){return og({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ig(),fc].filter(c=>!!c),issueData:{code:z.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof pc){const a=this;return sn(async function(...l){const c=new jn([]),u=await a._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),f=await Reflect.apply(o,this,u);return await a._def.returns._def.type.parseAsync(f,i).catch(m=>{throw c.addIssue(s(f,m)),c})})}else{const a=this;return sn(function(...l){const c=a._def.args.safeParse(l,i);if(!c.success)throw new jn([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=a._def.returns.safeParse(u,i);if(!f.success)throw new jn([s(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ol({...this._def,args:Gr.create(t).rest(Bo.create())})}returns(t){return new Ol({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ol({args:t||Gr.create([]).rest(Bo.create()),returns:n||Bo.create(),typeName:ue.ZodFunction,...pe(r)})}}class ef extends ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ef.create=(e,t)=>new ef({getter:e,typeName:ue.ZodLazy,...pe(t)});class tf extends ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:z.invalid_literal,expected:this._def.value}),de}return{status:"valid",value:t.data}}get value(){return this._def.value}}tf.create=(e,t)=>new tf({value:e,typeName:ue.ZodLiteral,...pe(t)});function wP(e,t){return new Ui({values:e,typeName:ue.ZodEnum,...pe(t)})}class Ui extends ke{constructor(){super(...arguments),hl.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Oe.joinValues(r),received:n.parsedType,code:z.invalid_type}),de}if(qd(this,hl)||vP(this,hl,new Set(this._def.values)),!qd(this,hl).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:z.invalid_enum_value,options:r}),de}return sn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ui.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ui.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}hl=new WeakMap;Ui.create=wP;class nf extends ke{constructor(){super(...arguments),pl.set(this,void 0)}_parse(t){const n=Oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==te.string&&r.parsedType!==te.number){const s=Oe.objectValues(n);return J(r,{expected:Oe.joinValues(s),received:r.parsedType,code:z.invalid_type}),de}if(qd(this,pl)||vP(this,pl,new Set(Oe.getValidEnumValues(this._def.values))),!qd(this,pl).has(t.data)){const s=Oe.objectValues(n);return J(r,{received:r.data,code:z.invalid_enum_value,options:s}),de}return sn(t.data)}get enum(){return this._def.values}}pl=new WeakMap;nf.create=(e,t)=>new nf({values:e,typeName:ue.ZodNativeEnum,...pe(t)});class pc extends ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==te.promise&&n.common.async===!1)return J(n,{code:z.invalid_type,expected:te.promise,received:n.parsedType}),de;const r=n.parsedType===te.promise?n.data:Promise.resolve(n.data);return sn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}pc.create=(e,t)=>new pc({type:e,typeName:ue.ZodPromise,...pe(t)});class qr extends ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ue.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{J(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return de;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?de:l.status==="dirty"||n.value==="dirty"?fl(l.value):l});{if(n.value==="aborted")return de;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?de:a.status==="dirty"||n.value==="dirty"?fl(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?de:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Kd(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Kd(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);Oe.assertNever(s)}}qr.create=(e,t,n)=>new qr({schema:e,typeName:ue.ZodEffects,effect:t,...pe(n)});qr.createWithPreprocess=(e,t,n)=>new qr({schema:t,effect:{type:"preprocess",transform:e},typeName:ue.ZodEffects,...pe(n)});class Lr extends ke{_parse(t){return this._getType(t)===te.undefined?sn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lr.create=(e,t)=>new Lr({innerType:e,typeName:ue.ZodOptional,...pe(t)});class Bi extends ke{_parse(t){return this._getType(t)===te.null?sn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bi.create=(e,t)=>new Bi({innerType:e,typeName:ue.ZodNullable,...pe(t)});class rf extends ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===te.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}rf.create=(e,t)=>new rf({innerType:e,typeName:ue.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...pe(t)});class sf extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gd(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new jn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sf.create=(e,t)=>new sf({innerType:e,typeName:ue.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...pe(t)});class hg extends ke{_parse(t){if(this._getType(t)!==te.nan){const r=this._getOrReturnCtx(t);return J(r,{code:z.invalid_type,expected:te.nan,received:r.parsedType}),de}return{status:"valid",value:t.data}}}hg.create=e=>new hg({typeName:ue.ZodNaN,...pe(e)});class bP extends ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class th extends ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?de:i.status==="dirty"?(n.dirty(),fl(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?de:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new th({in:t,out:n,typeName:ue.ZodPipeline})}}class of extends ke{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Kd(s)&&(s.value=Object.freeze(s.value)),s);return Gd(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}of.create=(e,t)=>new of({innerType:e,typeName:ue.ZodReadonly,...pe(t)});rt.lazycreate;var ue;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ue||(ue={}));const tl=Dr.create;ga.create;hg.create;va.create;ag.create;hc.create;lg.create;Qd.create;Yd.create;cg.create;Bo.create;Gs.create;ug.create;gr.create;const o3=rt.create;rt.strictCreate;Zd.create;Zy.create;Xd.create;Gr.create;Jd.create;fg.create;ya.create;Ol.create;ef.create;tf.create;Ui.create;nf.create;pc.create;qr.create;Lr.create;Bi.create;qr.createWithPreprocess;th.create;var a3="Label",_P=p.forwardRef((e,t)=>d.jsx(ce.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())}}));_P.displayName=a3;var SP=_P;const l3=Na("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),hs=p.forwardRef(({className:e,...t},n)=>d.jsx(SP,{ref:n,className:U(l3(),e),...t}));hs.displayName=SP.displayName;const c3=_5,CP=p.createContext({}),nl=({...e})=>d.jsx(CP.Provider,{value:{name:e.name},children:d.jsx(k5,{...e})}),nh=()=>{const e=p.useContext(CP),t=p.useContext(EP),{getFieldState:n,formState:r}=eh(),s=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},EP=p.createContext({}),uo=p.forwardRef(({className:e,...t},n)=>{const r=p.useId();return d.jsx(EP.Provider,{value:{id:r},children:d.jsx("div",{ref:n,className:U("space-y-2",e),...t})})});uo.displayName="FormItem";const fo=p.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=nh();return d.jsx(hs,{ref:n,className:U(r&&"text-destructive",e),htmlFor:s,...t})});fo.displayName="FormLabel";const ho=p.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=nh();return d.jsx(rn,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});ho.displayName="FormControl";const kP=p.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=nh();return d.jsx("p",{ref:n,id:r,className:U("text-sm text-muted-foreground",e),...t})});kP.displayName="FormDescription";const po=p.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=nh(),o=s?String(s==null?void 0:s.message):t;return o?d.jsx("p",{ref:r,id:i,className:U("text-sm font-medium text-destructive",e),...n,children:o}):null});po.displayName="FormMessage";const mc=p.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:U("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
322ing-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}));mc.displayName="Textarea";function db(e,[t,n]){return Math.min(n,Math.max(t,e))}function u3(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var d3=[" ","Enter","ArrowUp","ArrowDown"],f3=[" ","Enter"],Kc="Select",[rh,sh,h3]=Mf(Kc),[Ia,TH]=Zr(Kc,[h3,Da]),ih=Da(),[p3,ei]=Ia(Kc),[m3,g3]=Ia(Kc),TP=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:h,required:m,form:y}=e,g=ih(t),[w,x]=p.useState(null),[v,b]=p.useState(null),[_,S]=p.useState(!1),P=qf(c),[T=!1,C]=Bs({prop:r,defaultProp:s,onChange:i}),[M,I]=Bs({prop:o,defaultProp:a,onChange:l}),R=p.useRef(null),A=w?y||!!w.closest("form"):!0,[$,L]=p.useState(new Set),Z=Array.from($).map(V=>V.props.value).join(";");return d.jsx(vy,{...g,children:d.jsxs(p3,{required:m,scope:t,trigger:w,onTriggerChange:x,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:S,contentId:Gn(),value:M,onValueChange:I,open:T,onOpenChange:C,dir:P,triggerPointerDownPosRef:R,disabled:h,children:[d.jsx(rh.Provider,{scope:t,children:d.jsx(m3,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(V=>{L(H=>new Set(H).add(V))},[]),onNativeOptionRemove:p.useCallback(V=>{L(H=>{const j=new Set(H);return j.delete(V),j})},[]),children:n})}),A?d.jsxs(XP,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:M,onChange:V=>I(V.target.value),disabled:h,form:y,children:[M===void 0?d.jsx("option",{value:""}):null,Array.from($)]},Z):null]})})};TP.displayName=Kc;var PP="SelectTrigger",jP=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=ih(n),o=ei(PP,n),a=o.disabled||r,l=De(t,o.onTriggerChange),c=sh(n),u=p.useRef("touch"),[f,h,m]=JP(g=>{const w=c().filter(b=>!b.disabled),x=w.find(b=>b.value===o.value),v=ej(w,g,x);v!==void 0&&o.onValueChange(v.value)}),y=g=>{a||(o.onOpenChange(!0),m()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(yy,{asChild:!0,...i,children:d.jsx(ce.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:a,"data-disabled":a?"":void 0,"data-placeholder":ZP(o.value)?"":void 0,...s,ref:l,onClick:Y(s.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&y(g)}),onPointerDown:Y(s.onPointerDown,g=>{u.current=g.pointerType;const w=g.target;w.hasPointerCapture(g.pointerId)&&w.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:Y(s.onKeyDown,g=>{const w=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(w&&g.key===" ")&&d3.includes(g.key)&&(y(),g.preventDefault())})})})});jP.displayName=PP;var RP="SelectValue",NP=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=ei(RP,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,f=De(t,l.onValueNodeChange);return bt(()=>{c(u)},[c,u]),d.jsx(ce.span,{...a,ref:f,style:{pointerEvents:"none"},children:ZP(l.value)?d.jsx(d.Fragment,{children:o}):i})});NP.displayName=RP;var v3="SelectIcon",AP=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...s}=e;return d.jsx(ce.span,{"aria-hidden":!0,...s,ref:t,children:r||"â¼"})});AP.displayName=v3;var y3="SelectPortal",OP=e=>d.jsx(Dc,{asChild:!0,...e});OP.displayName=y3;var zi="SelectContent",MP=p.forwardRef((e,t)=>{const n=ei(zi,e.__scopeSelect),[r,s]=p.useState();if(bt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Ki.createPortal(d.jsx(DP,{scope:e.__scopeSelect,children:d.jsx(rh.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),i):null}return d.jsx(IP,{...e,ref:t})});MP.displayName=zi;var Dn=10,[DP,ti]=Ia(zi),x3="SelectContentImpl",IP=p.forwardRef((e,t)=>
vendor: 13,621 bytes, line 322
322{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:w,...x}=e,v=ei(zi,n),[b,_]=p.useState(null),[S,P]=p.useState(null),T=De(t,se=>_(se)),[C,M]=p.useState(null),[I,R]=p.useState(null),A=sh(n),[$,L]=p.useState(!1),Z=p.useRef(!1);p.useEffect(()=>{if(b)return Ty(b)},[b]),ky();const V=p.useCallback(se=>{const[we,...Pe]=A().map(Ne=>Ne.ref.current),[Ce]=Pe.slice(-1),Ae=document.activeElement;for(const Ne of se)if(Ne===Ae||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===we&&S&&(S.scrollTop=0),Ne===Ce&&S&&(S.scrollTop=S.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==Ae))return},[A,S]),H=p.useCallback(()=>V([C,b]),[V,C,b]);p.useEffect(()=>{$&&H()},[$,H]);const{onOpenChange:j,triggerPointerDownPosRef:O}=v;p.useEffect(()=>{if(b){let se={x:0,y:0};const we=Ce=>{var Ae,Ne;se={x:Math.abs(Math.round(Ce.pageX)-(((Ae=O.current)==null?void 0:Ae.x)??0)),y:Math.abs(Math.round(Ce.pageY)-(((Ne=O.current)==null?void 0:Ne.y)??0))}},Pe=Ce=>{se.x<=10&&se.y<=10?Ce.preventDefault():b.contains(Ce.target)||j(!1),document.removeEventListener("pointermove",we),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",Pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",Pe,{capture:!0})}}},[b,j,O]),p.useEffect(()=>{const se=()=>j(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[j]);const[K,G]=JP(se=>{const we=A().filter(Ae=>!Ae.disabled),Pe=we.find(Ae=>Ae.ref.current===document.activeElement),Ce=ej(we,se,Pe);Ce&&setTimeout(()=>Ce.ref.current.focus())}),ne=p.useCallback((se,we,Pe)=>{const Ce=!Z.current&&!Pe;(v.value!==void 0&&v.value===we||Ce)&&(M(se),Ce&&(Z.current=!0))},[v.value]),fe=p.useCallback(()=>b==null?void 0:b.focus(),[b]),Se=p.useCallback((se,we,Pe)=>{const Ce=!Z.current&&!Pe;(v.value!==void 0&&v.value===we||Ce)&&R(se)},[v.value]),Ye=r==="popper"?pg:LP,he=Ye===pg?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:w}:{};return d.jsx(DP,{scope:n,content:b,viewport:S,onViewportChange:P,itemRefCallback:ne,selectedItem:C,onItemLeave:fe,itemTextRefCallback:Se,focusSelectedItem:H,selectedItemText:I,position:r,isPositioned:$,searchRef:K,children:d.jsx(Kf,{as:rn,allowPinchZoom:!0,children:d.jsx(Wf,{asChild:!0,trapped:v.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:Y(s,se=>{var we;(we=v.trigger)==null||we.focus({preventScroll:!0}),se.preventDefault()}),children:d.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:d.jsx(Ye,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:se=>se.preventDefault(),...x,...he,onPlaced:()=>L(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Y(x.onKeyDown,se=>{const we=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!we&&se.key.length===1&&G(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let Ce=A().filter(Ae=>!Ae.disabled).map(Ae=>Ae.ref.current);if(["ArrowUp","End"].includes(se.key)&&(Ce=Ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Ae=se.target,Ne=Ce.indexOf(Ae);Ce=Ce.slice(Ne+1)}setTimeout(()=>V(Ce)),se.preventDefault()}})})})})})})});IP.displayName=x3;var w3="SelectItemAlignedPosition",LP=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=ei(zi,n),o=ti(zi,n),[a,l]=p.useState(null),[c,u]=p.useState(null),f=De(t,T=>u(T)),h=sh(n),m=p.useRef(!1),y=p.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:x,focusSelectedItem:v}=o,b=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&w&&x){const T=i.trigger.getBoundingClientRect(),C=c.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),I=x.getBoundingClientRect();if(i.dir!=="rtl"){const Ae=I.left-C.left,Ne=M.left-Ae,gt=T.left-Ne,Pt=T.width+gt,Sr=Math.max(Pt,C.width),on=window.innerWidth-Dn,Jr=db(Ne,[Dn,Math.max(Dn,on-Sr)]);a.style.minWidth=Pt+"px",a.style.left=Jr+"px"}else{const Ae=C.right-I.right,Ne=window.innerWidth-M.right-Ae,gt=window.innerWidth-T.right-Ne,Pt=T.width+gt,Sr=Math.max(Pt,C.width),on=window.innerWidth-Dn,Jr=db(Ne,[Dn,Math.max(Dn,on-Sr)]);a.style.minWidth=Pt+"px",a.style.right=Jr+"px"}const R=h(),A=window.innerHeight-Dn*2,$=g.scrollHeight,L=window.getComputedStyle(c),Z=parseInt(L.borderTopWidth,10),V=parseInt(L.paddingTop,10),H=parseInt(L.borderBottomWidth,10),j=parseInt(L.paddingBottom,10),O=Z+V+$+j+H,K=Math.min(w.offsetHeight*5,O),G=window.getComputedStyle(g),ne=parseInt(G.paddingTop,10),fe=parseInt(G.paddingBottom,10),Se=T.top+T.height/2-Dn,Ye=A-Se,he=w.offsetHeight/2,se=w.offsetTop+he,we=Z+V+se,Pe=O-we;if(we<=Se){const Ae=R.length>0&&w===R[R.length-1].ref.current;a.style.bottom="0px";const Ne=c.clientHeight-g.offsetTop-g.offsetHeight,gt=Math.max(Ye,he+(Ae?fe:0)+Ne+H),Pt=we+gt;a.style.height=Pt+"px"}else{const Ae=R.length>0&&w===R[0].ref.current;a.style.top="0px";const gt=Math.max(Se,Z+g.offsetTop+(Ae?ne:0)+he)+Pe;a.style.height=gt+"px",g.scrollTop=we-Se+g.offsetTop}a.style.margin=`${Dn}px 0`,a.style.minHeight=K+"px",a.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,i.trigger,i.valueNode,a,c,g,w,x,i.dir,r]);bt(()=>b(),[b]);const[_,S]=p.useState();bt(()=>{c&&S(window.getComputedStyle(c).zIndex)},[c]);const P=p.useCallback(T=>{T&&y.current===!0&&(b(),v==null||v(),y.current=!1)},[b,v]);return d.jsx(_3,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:d.jsx(ce.div,{...s,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});LP.displayName=w3;var b3="SelectPopperPosition",pg=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Dn,...i}=e,o=ih(n);return d.jsx(xy,{...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)"}})});pg.displayName=b3;var[_3,Xy]=Ia(zi,{}),mg="SelectViewport",FP=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=ti(mg,n),o=Xy(mg,n),a=De(t,i.onViewportChange),l=p.useRef(0);return d.jsxs(d.Fragment,{children:[d.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}),d.jsx(rh.Slot,{scope:n,children:d.jsx(ce.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Y(s.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=o;if(h!=null&&h.current&&f){const m=Math.abs(l.current-u.scrollTop);if(m>0){const y=window.innerHeight-Dn*2,g=parseFloat(f.style.minHeight),w=parseFloat(f.style.height),x=Math.max(g,w);if(x<y){const v=x+m,b=Math.min(y,v),_=v-b;f.style.height=b+"px",f.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});FP.displayName=mg;var $P="SelectGroup",[S3,C3]=Ia($P),E3=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Gn();return d.jsx(S3,{scope:n,id:s,children:d.jsx(ce.div,{role:"group","aria-labelledby":s,...r,ref:t})})});E3.displayName=$P;var VP="SelectLabel",UP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=C3(VP,n);return d.jsx(ce.div,{id:s.id,...r,ref:t})});UP.displayName=VP;var af="SelectItem",[k3,BP]=Ia(af),zP=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=ei(af,n),l=ti(af,n),c=a.value===r,[u,f]=p.useState(i??""),[h,m]=p.useState(!1),y=De(t,v=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,v,r,s)}),g=Gn(),w=p.useRef("touch"),x=()=>{s||(a.onValueChange(r),a.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 d.jsx(k3,{scope:n,value:r,disabled:s,textId:g,isSelected:c,onItemTextChange:p.useCallback(v=>{f(b=>b||((v==null?void 0:v.textContent)??"").trim())},[]),children:d.jsx(rh.ItemSlot,{scope:n,value:r,disabled:s,textValue:u,children:d.jsx(ce.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:y,onFocus:Y(o.onFocus,()=>m(!0)),onBlur:Y(o.onBlur,()=>m(!1)),onClick:Y(o.onClick,()=>{w.current!=="mouse"&&x()}),onPointerUp:Y(o.onPointerUp,()=>{w.current==="mouse"&&x()}),onPointerDown:Y(o.onPointerDown,v=>{w.current=v.pointerType}),onPointerMove:Y(o.onPointerMove,v=>{var b;w.current=v.pointerType,s?(b=l.onItemLeave)==null||b.call(l):w.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y(o.onPointerLeave,v=>{var b;v.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:Y(o.onKeyDown,v=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&v.key===" "||(f3.includes(v.key)&&x(),v.key===" "&&v.preventDefault())})})})})});zP.displayName=af;var ml="SelectItemText",WP=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=ei(ml,n),a=ti(ml,n),l=BP(ml,n),c=g3(ml,n),[u,f]=p.useState(null),h=De(t,x=>f(x),l.onItemTextChange,x=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,x,l.value,l.disabled)}),m=u==null?void 0:u.textContent,y=p.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:w}=c;return bt(()=>(g(y),()=>w(y)),[g,w,y]),d.jsxs(d.Fragment,{children:[d.jsx(ce.span,{id:l.textId,...i,ref:h}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ki.createPortal(i.children,o.valueNode):null]})});WP.displayName=ml;var HP="SelectItemIndicator",KP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return BP(HP,n).isSelected?d.jsx(ce.span,{"aria-hidden":!0,...r,ref:t}):null});KP.displayName=HP;var gg="SelectScrollUpButton",GP=p.forwardRef((e,t)=>{const n=ti(gg,e.__scopeSelect),r=Xy(gg,e.__scopeSelect),[s,i]=p.useState(!1),o=De(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(QP,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});GP.displayName=gg;var vg="SelectScrollDownButton",qP=p.forwardRef((e,t)=>{const n=ti(vg,e.__scopeSelect),r=Xy(vg,e.__scopeSelect),[s,i]=p.useState(!1),o=De(t,r.onScrollButtonChange);return bt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?d.jsx(QP,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});qP.displayName=vg;var QP=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=ti("SelectScrollButton",n),o=p.useRef(null),a=sh(n),l=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),bt(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),d.jsx(ce.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:Y(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Y(s.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Y(s.onPointerLeave,()=>{l()})})}),T3="SelectSeparator",YP=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ce.div,{"aria-hidden":!0,...r,ref:t})});YP.displayName=T3;var yg="SelectArrow",P3=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=ih(n),i=ei(yg,n),o=ti(yg,n);return i.open&&o.position==="popper"?d.jsx(wy,{...s,...r,ref:t}):null});P3.displayName=yg;function ZP(e){return e===""||e===void 0}var XP=p.forwardRef((e,t)=>{const{value:n,...r}=e,s=p.useRef(null),i=De(t,s),o=u3(n);return p.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==n&&u){const f=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(f)}},[o,n]),d.jsx(Ic,{asChild:!0,children:d.jsx("select",{...r,ref:i,defaultValue:n})})});XP.displayName="BubbleSelect";function JP(e){const t=Tt(e),n=p.useRef(""),r=p.useRef(0),s=p.useCallback(o=>{const a=n.current+o;
322t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function ej(e,t,n){const s=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=j3(e,Math.max(i,0));s.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function j3(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var R3=TP,tj=jP,N3=NP,A3=AP,O3=OP,nj=MP,M3=FP,rj=UP,sj=zP,D3=WP,I3=KP,ij=GP,oj=qP,aj=YP;const L3=R3,F3=N3,lj=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(tj,{ref:r,className:U("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-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,d.jsx(A3,{asChild:!0,children:d.jsx(vE,{className:"h-4 w-4 opacity-50"})})]}));lj.displayName=tj.displayName;const cj=p.forwardRef(({className:e,...t},n)=>d.jsx(ij,{ref:n,className:U("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(oI,{className:"h-4 w-4"})}));cj.displayName=ij.displayName;const uj=p.forwardRef(({className:e,...t},n)=>d.jsx(oj,{ref:n,className:U("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(vE,{className:"h-4 w-4"})}));uj.displayName=oj.displayName;const dj=p.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>d.jsx(O3,{children:d.jsxs(nj,{ref:s,className:U("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:[d.jsx(cj,{}),d.jsx(M3,{className:U("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(uj,{})]})}));dj.displayName=nj.displayName;const $3=p.forwardRef(({className:e,...t},n)=>d.jsx(rj,{ref:n,className:U("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$3.displayName=rj.displayName;const fj=p.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(sj,{ref:r,className:U("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(I3,{children:d.jsx(gE,{className:"h-4 w-4"})})}),d.jsx(D3,{children:t})]}));fj.displayName=sj.displayName;const V3=p.forwardRef(({className:e,...t},n)=>d.jsx(aj,{ref:n,className:U("-mx-1 my-1 h-px bg-muted",e),...t}));V3.displayName=aj.displayName;const U3="modulepreload",B3=function(e){return"/"+e},fb={},xa=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=B3(l),l in fb)return;fb[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":U3,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((h,m)=>{f.addEventListener("load",h),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return s.then(o=>{for(const a of o||[])a.status==="rejected"&&i(a.reason);return t().catch(i)})},z3=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xa(async()=>{const{default:r}=await Promise.resolve().then(()=>La);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};
322class Jy extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class W3 extends Jy{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class H3 extends Jy{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class K3 extends Jy{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var xg;(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"})(xg||(xg={}));var G3=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class q3{constructor(t,{headers:n={},customFetch:r,region:s=xg.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=z3(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return G3(this,void 0,void 0,function*(){try{const{headers:s,method:i,body:o}=n;let a={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let c;o&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",c=o):typeof o=="string"?(a["Content-Type"]="text/plain",c=o):typeof FormData<"u"&&o instanceof FormData?c=o:(a["Content-Type"]="application/json",c=JSON.stringify(o)));const u=yield this.fetch(`${this.url}/${t}`,{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:c}).catch(y=>{throw new W3(y)}),f=u.headers.get("x-relay-error");if(f&&f==="true")throw new H3(u);if(!u.ok)throw new K3(u);let h=((r=u.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),m;return h==="application/json"?m=yield u.json():h==="application/octet-stream"?m=yield u.blob():h==="text/event-stream"?m=u:h==="multipart/form-data"?m=yield u.formData():m=yield u.text(),{data:m,error:null}}catch(s){return{data:null,error:s}}})}}var Xt={},e0={},oh={},Gc={},ah={},lh={},Q3=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},wa=Q3();const Y3=wa.fetch,hj=wa.fetch.bind(wa),pj=wa.Headers,Z3=wa.Request,X3=wa.Response,La=Object.freeze(Object.defineProperty({__proto__:null,Headers:pj,Request:Z3,Response:X3,default:hj,fetch:Y3},Symbol.toStringTag,{value:"Module"})),J3=aA(La);var ch={};Object.defineProperty(ch,"__esModule",{value:!0});let eU=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
322de=t.code}};ch.default=eU;var mj=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lh,"__esModule",{value:!0});const tU=mj(J3),nU=mj(ch);let rU=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=tU.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=Object.assign({},this.headers),this.headers[t]=n,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["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=>{var o,a,l;let c=null,u=null,f=null,h=i.status,m=i.statusText;if(i.ok){if(this.method!=="HEAD"){const x=await i.text();x===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?u=x:u=JSON.parse(x))}const g=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),w=(a=i.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");g&&w&&w.length>1&&(f=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(u)&&(u.length>1?(c={code:"PGRST116",details:`Results contain ${u.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},u=null,f=null,h=406,m="Not Acceptable"):u.length===1?u=u[0]:u=null)}else{const g=await i.text();try{c=JSON.parse(g),Array.isArray(c)&&i.status===404&&(u=[],c=null,h=200,m="OK")}catch{i.status===404&&g===""?(h=204,m="No Content"):c={message:g}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,h=200,m="OK"),c&&this.shouldThrowOnError)throw new nU.default(c)}return{error:c,data:u,count:f,status:h,statusText:m}});return this.shouldThrowOnError||(s=s.catch(i=>{var o,a,l;return{error:{message:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:`${(a=i==null?void 0:i.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=i==null?void 0:i.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),s.then(t,n)}};lh.default=rU;var sU=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ah,"__esModule",{value:!0});const iU=sU(lh);let oU=class extends iU.default{select(t){let n=!1;const r=(t??"*").split("").map(s=>/\s/.test(s)&&!n?"":(s==='"'&&(n=!n),s)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:s,referencedTable:i=s}={}){const o=i?`${i}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:s=r}={}){const i=typeof s>"u"?"offset":`${s}.offset`,o=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(o,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
322explain({analyze:t=!1,verbose:n=!1,settings:r=!1,buffers:s=!1,wal:i=!1,format:o="text"}={}){var a;const l=[t?"analyze":null,n?"verbose":null,r?"settings":null,s?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`,o==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};ah.default=oU;var aU=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gc,"__esModule",{value:!0});const lU=aU(ah);let cU=class extends lU.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const r=Array.from(new Set(n)).map(s=>typeof s=="string"&&new RegExp("[,()]").test(s)?`"${s}"`:`${s}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:r,type:s}={}){let i="";s==="plain"?i="pl":s==="phrase"?i="ph":s==="websearch"&&(i="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${i}fts${o}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}};Gc.default=cU;var uU=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0});const rl=uU(Gc);let dU=class{constructor(t,{headers:n={},schema:r,fetch:s}){this.url=t,this.headers=n,this.schema=r,this.fetch=s}select(t,{head:n=!1,count:r}={}){const s=n?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(a=>/\s/.test(a)&&!i?"":(a==='"'&&(i=!i),a)).join("");return this.url.searchParams.set("select",o),r&&(this.headers.Prefer=`count=${r}`),new rl.default({method:s,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const s="POST",i=[];if(this.headers.Prefer&&i.push(this.headers.Prefer),n&&i.push(`count=${n}`),r||i.push("missing=default"),this.headers.Prefer=i.join(","),Array.isArray(t)){const o=t.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>
3220){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new rl.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:s,defaultToNull:i=!0}={}){const o="POST",a=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),s&&a.push(`count=${s}`),i||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(t)){const l=t.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);this.url.searchParams.set("columns",c.join(","))}}return new rl.default({method:o,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",s=[];return this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),this.headers.Prefer=s.join(","),new rl.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new rl.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};oh.default=dU;var uh={},dh={};Object.defineProperty(dh,"__esModule",{value:!0});dh.version=void 0;dh.version="0.0.0-automated";Object.defineProperty(uh,"__esModule",{value:!0});uh.DEFAULT_HEADERS=void 0;const fU=dh;uh.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${fU.version}`};var gj=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e0,"__esModule",{value:!0});const hU=gj(oh),pU=gj(Gc),mU=uh;let gU=class vj{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=Object.assign(Object.assign({},mU.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new hU.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new vj(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:s=!1,count:i}={}){let o;const a=new URL(`${this.url}/rpc/${t}`);let l;r||s?(o=r?"HEAD":"GET",Object.entries(n).filter(([u,f])=>f!==void 0).map(([u,f])=>[u,Array.isArray(f)?`{${f.join(",")}}`:`${f}`]).forEach(([u,f])=>{a.searchParams.append(u,f)})):(o="POST",l=n);const c=Object.assign({},this.headers);return i&&(c.Prefer=`count=${i}`),new pU.default({method:o,url:a,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};e0.default=gU;var Fa=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.PostgrestError=Xt.PostgrestBuilder=Xt.PostgrestTransformBuilder=Xt.PostgrestFilterBuilder=Xt.PostgrestQueryBuilder=Xt.PostgrestClient=void 0;const yj=Fa(e0);Xt.PostgrestClient=yj.default;const xj=Fa(oh);Xt.PostgrestQueryBuilder=xj.default;const wj=Fa(Gc);Xt.PostgrestFilterBuilder=wj.default;const bj=Fa(ah);Xt.PostgrestTransformBuilder=bj.default;const _j=Fa(lh);Xt.PostgrestBuilder=_j.default;const Sj=Fa(ch);Xt.PostgrestError=Sj.default;var vU=Xt.default={PostgrestClient:yj.default,PostgrestQueryBuilder:xj.default,PostgrestFilterBuilder:wj.default,PostgrestTransformBuilder:bj.default,PostgrestBuilder:_j.default,PostgrestError:Sj.default};const{PostgrestClient:yU,PostgrestQueryBuilder:OH,PostgrestFilterBuilder:MH,PostgrestTransformBuilder:DH,PostgrestBuilder:IH,PostgrestError:LH}=vU,xU="2.11.2",wU={"X-Client-Info":`realtime-js/${xU}`},bU="1.0.0",Cj=1e4,_U=1e3;var zo;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(zo||(zo={}));var an;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(an||(an={}));var Vn;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Vn||(Vn={}));var wg;(function(e){e.websocket="websocket"})(wg||(wg={}));var fi;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(fi||(fi={}));class SU{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const s=n.getUint8(1),i=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=r.decode(t.slice(o,o+s));o=o+s;const l=r.decode(t.slice(o,o+i));o=o+i;const c=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}class Ej{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}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))}}var Ue;(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"})(Ue||(Ue={}));const hb=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((i,o)=>(i[o]=CU(o,e,t,s),i),{})},CU=(e,t,n,r)=>{const s=t.find(a=>a.name===e),i=s==null?void 0:s.type,o=n[e];return i&&!r.includes(i)?kj(i,o):bg(o)},kj=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return PU(t,n)}switch(e){case Ue.bool:return EU(t);case Ue.float4:case Ue.float8:case Ue.int2:case Ue.int4:case Ue.int8:case Ue.numeric:case Ue.oid:return kU(t);case Ue.json:case Ue.jsonb:return TU(t);case Ue.timestamp:return jU(t);case Ue.abstime:case Ue.date:case Ue.daterange:case Ue.int4range:case Ue.int8range:case Ue.money:case Ue.reltime:case Ue.text:case Ue.time:case Ue.timestamptz:case Ue.timetz:case Ue.tsrange:case Ue.tstzrange:return bg(t);default:return bg(t)}},bg=e=>e,EU=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},kU=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 12,936 bytes, line 322
322if(!Number.isNaN(t))return t}return e},TU=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},PU=(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(a=>kj(t,a))}return e},jU=e=>typeof e=="string"?e.replace(" ","T"):e,Tj=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class mp{constructor(t,n,r={},s=Cj){this.channel=t,this.event=n,this.payload=r,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var pb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(pb||(pb={}));class Ml{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Ml.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=Ml.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Ml.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,s){const i=this.cloneDeep(t),o=this.transformState(n),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const f=i[c];if(f){const h=u.map(w=>w.presence_ref),m=f.map(w=>w.presence_ref),y=u.filter(w=>m.indexOf(w.presence_ref)<0),g=f.filter(w=>h.indexOf(w.presence_ref)<0);y.length>0&&(a[c]=y),g.length>0&&(l[c]=g)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},r,s)}static syncDiff(t,n,r,s){const{joins:i,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),u.length>0){const f=t[a].map(m=>m.presence_ref),h=u.filter(m=>f.indexOf(m.presence_ref)<0);t[a].unshift(...h)}r(a,u,l)}),this.map(o,(a,l)=>{let c=t[a];if(!c)return;const u=l.map(f=>f.presence_ref);c=c.filter(f=>u.indexOf(f.presence_ref)<0),t[a]=c,s(a,c,l),c.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const s=t[r];return"metas"in s?n[r]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):n[r]=s,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var mb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(mb||(mb={}));var gb;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(gb||(gb={}));var jr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(jr||(jr={}));class t0{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=an.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new mp(this,Vn.join,this.params,this.timeout),this.rejoinTimer=new Ej(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=an.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=an.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=an.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=an.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Vn.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new Ml(this),this.broadcastEndpointURL=Tj(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,s;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:i,presence:o,private:a}}=this.params;this._onError(u=>t==null?void 0:t(jr.CHANNEL_ERROR,u)),this._onClose(()=>t==null?void 0:t(jr.CLOSED));const l={},c={broadcast:i,presence:o,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(u=>u.filter))!==null&&s!==void 0?s:[],private:a};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:c},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:u})=>{var f;if(this.socket.setAuth(),u===void 0){t==null||t(jr.SUBSCRIBED);return}else{const h=this.bindings.postgres_changes,m=(f=h==null?void 0:h.length)!==null&&f!==void 0?f:0,y=[];for(let g=0;g<m;g++){const w=h[g],{filter:{event:x,schema:v,table:b,filter:_}}=w,S=u&&u[g];if(S&&S.event===x&&S.schema===v&&S.table===b&&S.filter===_)y.push(Object.assign(Object.assign({},w),{id:S.id}));else{this.unsubscribe(),t==null||t(jr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(jr.SUBSCRIBED);return}}).receive("error",u=>{t==null||t(jr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(u).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(jr.TIMED_OUT)})}return this}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){return this._on(t,n,r)}async send(t,n={}){var r,s;if(!this._canPush()&&t.type==="broadcast"){const{event:i,payload:o}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=an.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Vn.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const s=new mp(this,Vn.leave,{},t);s.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),s.send(),this._canPush()||s.trigger("ok",{})})}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}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new mp(this,t,n,r);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var s,i;const o=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=Vn;if(r&&[a,l,c,u].indexOf(o)>=0&&r!==this._joinRef())return;let h=this._onMessage(o,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(m=>{var y,g,w;return((y=m.filter)===null||y===void 0?void 0:y.event)==="*"||((w=(g=m.filter)===null||g===void 0?void 0:g.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===o}).map(m=>m.callback(h,r)):(i=this.bindings[o])===null||i===void 0||i.filter(m=>{var y,g,w,x,v,b;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const _=m.id,S=(y=m.filter)===null||y===void 0?void 0:y.event;return _&&((g=n.ids)===null||g===void 0?void 0:g.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const _=(v=(x=m==null?void 0:m.filter)===null||x===void 0?void 0:x.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return _==="*"||_===((b=n==null?void 0:n.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof h=="object"&&"ids"in h){const y=h.data,{schema:g,table:w,commit_timestamp:x,type:v,errors:b}=y;h=Object.assign(Object.assign({},{schema:g,table:w,commit_timestamp:x,eventType:v,new:{},old:{},errors:b}),this._getPayloadRecords(y))}m.callback(h,r)})}_isClosed(){return this.state===an.closed}_isJoined(){return this.state===an.joined}_isJoining(){return this.state===an.joining}_isLeaving(){return this.state===an.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const s=t.toLocaleLowerCase(),i={type:s,filter:n,callback:r};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===r&&t0.isEqual(s.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Vn.close,{},t)}_onError(t){this._on(Vn.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=an.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=hb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=
322hb(t.columns,t.old_record)),n}}const RU=()=>{},NU=typeof WebSocket<"u",AU=` 323 addEventListener("message", (e) => { 324 if (e.data.event === "start") { 325 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 326 } 327 });`;class OU{constructor(t,n){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=wU,this.params={},this.timeout=Cj,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=RU,this.conn=null,this.sendBuffer=[],this.serializer=new SU,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=i=>{let o;return i?o=i:typeof fetch>"u"?o=(...a)=>xa(async()=>{const{default:l}=await Promise.resolve().then(()=>La);return{default:l}},void 0).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${t}/${wg.websocket}`,this.httpEndpoint=Tj(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const s=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;if(s&&(this.accessTokenValue=s,this.apiKey=s),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:i=>[1e3,2e3,5e3,1e4][i-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(i,o)=>o(JSON.stringify(i)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Ej(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers});return}if(NU){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new MU(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),xa(async()=>{const{default:t}=await import("./browser-DQhxJKHv.js").then(n=>n.b);return{default:t}},[]).then(({default:t})=>{this.conn=new t(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:bU}))}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case zo.connecting:return fi.Connecting;case zo.open:return fi.Open;case zo.closing:return fi.Closing;default:return fi.Closed}}isConnected(){return this.connectionState()===fi.Open}channel(t,n={config:{}}){const r=new t0(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:s,ref:i}=t,o=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(t=null){let n=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(n){let r=null;try{r=JSON.parse(atob(n.split(".")[1]))}catch{}if(r&&r.exp&&!(Math.floor(Date.now()/1e3)-r.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${r.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${r.exp}`);
327this.accessTokenValue=n,this.channels.forEach(s=>{n&&s.updateJoinPayload({access_token:n}),s.joinedOnce&&s._isJoined()&&s._push(Vn.access_token,{access_token:n})})}}async sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(_U,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",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))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:s,payload:i,ref:o}=n;o&&o===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${i.status||""} ${r} ${s} ${o&&"("+o+")"||""}`,i),this.channels.filter(a=>a._isMember(r)).forEach(a=>a._trigger(s,i,o)),this.stateChangeCallbacks.message.forEach(a=>a(n))})}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{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.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Vn.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",s=new URLSearchParams(n);return`${t}${r}${s}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([AU],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}}class MU{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=zo.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class n0 extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function vt(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class DU extends n0{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class _g extends n0{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var IU=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const Pj=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xa(async()=>{const{default:r}=await Promise.resolve().then(()=>La);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},LU=()=>IU(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield xa(()=>Promise.resolve().then(()=>La),void 0)).Response:Response}),Sg=e=>{if(Array.isArray(e))return e.map(n=>Sg(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]=Sg(r)}),t};var Yi=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
327return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const gp=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),FU=(e,t,n)=>Yi(void 0,void 0,void 0,function*(){const r=yield LU();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(s=>{t(new DU(gp(s),e.status||500))}).catch(s=>{t(new _g(gp(s),s))}):t(new _g(gp(e),e))}),$U=(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"},t==null?void 0:t.headers),r&&(s.body=JSON.stringify(r)),Object.assign(Object.assign({},s),n))};function qc(e,t,n,r,s,i){return Yi(this,void 0,void 0,function*(){return new Promise((o,a)=>{e(n,$U(t,r,s,i)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>FU(l,a,r))})})}function lf(e,t,n,r){return Yi(this,void 0,void 0,function*(){return qc(e,"GET",t,n,r)})}function ps(e,t,n,r,s){return Yi(this,void 0,void 0,function*(){return qc(e,"POST",t,r,s,n)})}function VU(e,t,n,r,s){return Yi(this,void 0,void 0,function*(){return qc(e,"PUT",t,r,s,n)})}function UU(e,t,n,r){return Yi(this,void 0,void 0,function*(){return qc(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function jj(e,t,n,r,s){return Yi(this,void 0,void 0,function*(){return qc(e,"DELETE",t,r,s,n)})}var Kt=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const BU={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},vb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class zU{constructor(t,n={},r,s){this.url=t,this.headers=n,this.bucketId=r,this.fetch=Pj(s)}uploadOrUpdate(t,n,r,s){return Kt(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},vb),s);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",this.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const c=this._removeEmptyFolders(n),u=this._getFinalPath(c),f=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:i,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),h=yield f.json();return f.ok?{data:{path:c,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(i){if(vt(i))return{data:null,error:i};throw i}})}upload(t,n,r){return Kt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return Kt(this,void 0,void 0,function*(){const i=this._removeEmptyFolders(t),o=this._getFinalPath(i),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:vb.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const f=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:u}),h=yield f.json();return f.ok?{data:{path:i,fullPath:h.Key},error:null}:{data:null,error:h}}catch(l){if(vt(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return Kt(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const s=Object.assign({},this.headers);n!=null&&n.upsert&&(s["x-upsert"]="true");const i=yield ps(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:s}),o=new URL(this.url+i.url),a=o.searchParams.get("token");if(!a)throw new n0("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:a},error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}update(t,n,r){return Kt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return Kt(this,void 0,void 0,function*(){try{return{data:yield ps(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}copy(t,n,r){return Kt(this,void 0,void 0,function*(){try{return{data:{path:(yield ps(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}createSignedUrl(t,n,r){return Kt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),i=yield ps(this.fetch,`${this.url}/object/sign/${s}
327`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return i={signedUrl:encodeURI(`${this.url}${i.signedURL}${o}`)},{data:i,error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return Kt(this,void 0,void 0,function*(){try{const s=yield ps(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:s.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${i}`):null})),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}download(t,n){return Kt(this,void 0,void 0,function*(){const s=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",i=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=i?`?${i}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield lf(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(vt(a))return{data:null,error:a};throw a}})}info(t){return Kt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield lf(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Sg(r),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}exists(t){return Kt(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield UU(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(vt(r)&&r instanceof _g){const s=r.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),s=[],i=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";i!==""&&s.push(i);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(t){return Kt(this,void 0,void 0,function*(){try{return{data:yield jj(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}list(t,n,r){return Kt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},BU),n),{prefix:t||""});return{data:yield ps(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(vt(s))return{data:null,error:s};throw s}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const WU="2.7.1",HU={"X-Client-Info":`storage-js/${WU}`};var oo=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class KU{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},HU),n),this.fetch=Pj(r)}listBuckets(){return oo(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(vt(t))return{data:null,error:t};throw t}})}getBucket(t){return oo(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return oo(this,void 0,void 0,function*(){try{return{data:yield ps(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return oo(this,void 0,void 0,function*(){try{return{data:yield VU(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(vt(r))return{data:null,error:r};throw r}})}emptyBucket(t){return oo(this,void 0,void 0,function*(){try{return{data:yield ps(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}deleteBucket(t){return oo(this,void 0,void 0,function*(){try{return{data:yield jj(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(vt(n))return{data:null,error:n};throw n}})}}class GU extends KU{constructor(t,n={},r){super(t,n,r)}from(t){return new zU(this.url,this.headers,t,this.fetch)}}const qU="2.48.1";let gl="";typeof Deno<"u"?gl="deno":typeof document<"u"?gl="web":typeof navigator<"u"&&navigator.product==="ReactNative"?gl="react-native":gl="node";const QU={"X-Client-Info":`supabase-js-${gl}/${qU}`},YU={headers:QU},ZU={schema:"public"},XU={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},JU={};var eB=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
327return new(n||(n=Promise))(function(i,o){function a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const tB=e=>{let t;return e?t=e:typeof fetch>"u"?t=hj:t=fetch,(...n)=>t(...n)},nB=()=>typeof Headers>"u"?pj:Headers,rB=(e,t,n)=>{const r=tB(n),s=nB();return(i,o)=>eB(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(i,Object.assign(Object.assign({},o),{headers:c}))})};var sB=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};function iB(e){return e.replace(/\/$/,"")}function oB(e,t){const{db:n,auth:r,realtime:s,global:i}=e,{db:o,auth:a,realtime:l,global:c}=t,u={db:Object.assign(Object.assign({},o),n),auth:Object.assign(Object.assign({},a),r),realtime:Object.assign(Object.assign({},l),s),global:Object.assign(Object.assign({},c),i),accessToken:()=>sB(this,void 0,void 0,function*(){return""})};return e.accessToken?u.accessToken=e.accessToken:delete u.accessToken,u}const Rj="2.67.3",aB="http://localhost:9999",lB="supabase.auth.token",cB={"X-Client-Info":`gotrue-js/${Rj}`},yb=10,Cg="X-Supabase-Api-Version",Nj={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function uB(e){return Math.round(Date.now()/1e3)+e}function dB(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const rr=()=>typeof window<"u"&&typeof document<"u",ri={tested:!1,writable:!1},Dl=()=>{if(!rr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ri.tested)return ri.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ri.tested=!0,ri.writable=!0}catch{ri.tested=!0,ri.writable=!1}return ri.writable};function fB(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((s,i)=>{t[i]=s})}catch{}return n.searchParams.forEach((r,s)=>{t[s]=r}),t}const Aj=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xa(async()=>{const{default:r}=await Promise.resolve().then(()=>La);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},hB=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Oj=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Ru=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Nu=async(e,t)=>{await e.removeItem(t)};function pB(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,s,i,o,a,l,c,u=0;for(e=e.replace("-","+").replace("_","/");u<e.length;)o=t.indexOf(e.charAt(u++)),a=t.indexOf(e.charAt(u++)),l=t.indexOf(e.charAt(u++)),c=t.indexOf(e.charAt(u++)),r=o<<2|a>>4,s=(a&15)<<4|l>>2,i=(l&3)<<6|c,n=n+String.fromCharCode(r),l!=64&&s!=0&&(n=n+String.fromCharCode(s)),c!=64&&i!=0&&(n=n+String.fromCharCode(i));return n}class fh{constructor(){this.promise=new fh.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}fh.promiseConstructor=Promise;function xb(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(pB(r))}async function mB(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function gB(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 vB(e){return("0"+e.toString(16)).substr(-2)}function yB(){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,vB).join("")}async function xB(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
327n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}function wB(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function bB(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 xB(e);return wB(n)}async function ao(e,t,n=!1){const r=yB();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await Oj(e,`${t}-code-verifier`,s);const i=await bB(r);return[i,r===i?"plain":"s256"]}const _B=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function SB(e){const t=e.headers.get(Cg);if(!t||!t.match(_B))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class r0 extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function xe(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class CB extends r0{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function EB(e){return xe(e)&&e.name==="AuthApiError"}class Mj extends r0{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Zi extends r0{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class ls extends Zi{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function kB(e){return xe(e)&&e.name==="AuthSessionMissingError"}class vp extends Zi{constructor(){super("Auth session or user missing","AuthInvalidToken
327ResponseError",500,void 0)}}class Au extends Zi{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ou extends Zi{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 TB(e){return xe(e)&&e.name==="AuthImplicitGrantRedirectError"}class wb extends Zi{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 Eg extends Zi{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function yp(e){return xe(e)&&e.name==="AuthRetryableFetchError"}class bb extends Zi{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var PB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(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 li=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),jB=[502,503,504];async function _b(e){var t;if(!hB(e))throw new Eg(li(e),0);if(jB.includes(e.status))throw new Eg(li(e),e.status);let n;try{n=await e.json()}catch(i){throw new Mj(li(i),i)}let r;const s=SB(e);if(s&&s.getTime()>=Nj["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 bb(li(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new ls}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)=>i&&typeof o=="string",!0))throw new bb(li(n),e.status,n.weak_password.reasons);throw new CB(li(n),e.status||500,r)}const RB=(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[Cg]||(i[Cg]=Nj["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 a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await NB(e,t,n+a,{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(l):{data:Object.assign({},l),error:null}}async function NB(e,t,n,r,s,i){const o=RB(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new Eg(li(l),0)}if(a.ok||await _b(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await _b(l)}}function cs(e){var t;let n=null;DB(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=uB(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Sb(e){const t=cs(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 ys(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function AB(e){return{data:e,error:null}}function OB(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=PB(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function MB(e){return e}function DB(e){return e.access_token&&e.refresh_token&&e.expires_in}var IB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(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};class LB{constructor({url:t="",headers:n={},fetch:r}
327){this.url=t,this.headers=n,this.fetch=Aj(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){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(xe(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:ys})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=IB(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:OB,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(xe(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:ys})}catch(n){if(xe(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=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:MB});if(u.error)throw u.error;const f=await u.json(),h=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return m.length>0&&(m.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);c[`${w}Page`]=g}),c.total=parseInt(h)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(xe(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){try{return await Re(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:ys})}catch(n){if(xe(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await Re(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:ys})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await Re(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:ys})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){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(xe(n))return{data:null,error:n};throw n}}async _deleteFactor(t){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(xe(n))return{data:null,error:n};throw n}}}const FB={getItem:e=>Dl()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Dl()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Dl()&&globalThis.localStorage.removeItem(e)}};function Cb(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function $B(){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)}}const lo={debug:!!(globalThis&&Dl()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Dj extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class VB extends Dj{}async function UB(e,t,n){lo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),lo.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>
327globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){lo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{lo.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw lo.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new VB(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(lo.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null," "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}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"),await n()}}))}$B();const BB={url:aB,storageKey:lB,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:cB,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},sl=30*1e3,Eb=3;async function kb(e,t,n){return await n()}class gc{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=gc.nextInstanceID,gc.nextInstanceID+=1,this.instanceID>0&&rr()&&console.warn("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.");const s=Object.assign(Object.assign({},BB),t);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new LB({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=Aj(s.fetch),this.lock=s.lock||kb,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:rr()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=UB:this.lock=kb,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?s.storage?this.storage=s.storage:Dl()?this.storage=FB:(this.memoryStorage={},this.storage=Cb(this.memoryStorage)):(this.memoryStorage={},this.storage=Cb(this.memoryStorage)),rr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Rj}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=fB(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),rr()&&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),TB(i)){const l=(t=i.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return await this._removeSession(),{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="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 xe(n)?{error:n}:{error:new Mj("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:cs}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(xe(i))return{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:u,password:f,options:h}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await ao(this.storage,this.storageKey)),i=await Re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:u,password:f,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:m,code_challenge_method:y},xform:cs})}else if("phone"in t){const{phone:u,password:f,options:h}=t;i=await Re(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:f,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(s=h==null?void 0:h.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:cs})}else throw new Au("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(xe(i))return{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:a}=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:a==null?void 0:a.captchaToken}},xform:Sb})}else if("phone"in t){const{phone:i,password:o,options:a}=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:a==null?void 0:a.captchaToken}},xform:Sb})}else throw new Au("You must provide either an email or phone number and a password");const{data:r,error:s}=n;return s?{data:{user:null,session:null},error:s}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new vp}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:s})}catch(n){if(xe(n))return{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(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await Ru(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{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:cs});if(await Nu(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new vp}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(xe(i))return{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,a=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:cs}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new vp}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(xe(n))return{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:a,options:l}=t;
327let c=null,u=null;this.flowType==="pkce"&&([c,u]=await ao(this.storage,this.storageKey));const{error:f}=await Re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:u}=await Re(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u}}throw new Au("You must provide either an email or phone number.")}catch(a){if(xe(a))return{data:{user:null,session:null},error:a};throw a}}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:a}=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:cs});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(xe(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(t){var n,r,s;try{let i=null,o=null;return this.flowType==="pkce"&&([i,o]=await ao(this.storage,this.storageKey)),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:i,code_challenge_method:o}),headers:this.headers,xform:AB})}catch(i){if(xe(i))return{data:null,error:i};throw i}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,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 ls;const{error:s}=await Re(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(xe(t))return{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{data:{user:null,session:null},error:o}}else if("phone"in t){const{phone:r,type:s,options:i}=t,{data:o,error:a}=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{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new Au("You must provide either an email or phone number and a type")}catch(n){if(xe(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,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 Ru(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
327id"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){let o=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,c,u)=>(!o&&c==="user"&&(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."),o=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,u))})}return{data:{session:t},error:null}}const{session:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{session:null},error:i}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await Re(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:ys}):await this._useSession(async n=>{var r,s,i;const{data:o,error:a}=n;if(a)throw a;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ls}: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:ys})})}catch(n){if(xe(n))return kB(n)&&(await this._removeSession(),await Nu(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,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 ls;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await ao(this.storage,this.storageKey));const{data:c,error:u}=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:a,code_challenge_method:l}),jwt:o.access_token,xform:ys});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(xe(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return xb(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new ls;const n=Date.now()/1e3;let r=n,s=!0,i=null;const o=xb(t.access_token);if(o.exp&&(r=o.exp,s=r<=n),s){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;i={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return{data:{user:i.user,session:i},error:null}}catch(n){if(xe(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:o,error:a}=n;if(a)throw a;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new ls;const{session:s,error:i}=await this._callRefreshToken(t.refresh_token);return i?{data:{user:null,session:null},error:i}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(xe(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!rr())throw new Ou("No browser detected.");
327if(t.error||t.error_description||t.error_code)throw new Ou(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 wb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ou("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 wb("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=t;if(!i||!a||!o||!c)throw new Ou("No session defined in URL");const u=Math.round(Date.now()/1e3),f=parseInt(a);let h=u+f;l&&(h=parseInt(l));const m=h-u;m*1e3<=sl&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${f}s`);const y=h-f;u-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,h,u):u-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,h,u);const{data:g,error:w}=await this._getUser(i);if(w)throw w;const x={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:f,expires_at:h,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:x,redirectType:t.type},error:null}}catch(r){if(xe(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Ru(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,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)return{error:i};const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:a}=await this.admin.signOut(o,t);if(a&&!(EB(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await Nu(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=dB(),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(-1,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 ao(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(xe(i))return{data:null,error:i};throw i}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(xe(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:f,error:h}=i;if(h)throw h;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Re(this.fetch,"GET",m,{headers:this.headers,jwt:(u=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return rr()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(xe(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,s;const{data:i,error:o}=n;
327if(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(xe(n))return{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 gB(async s=>(s>0&&await mB(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:cs})),(s,i)=>{const o=200*Math.pow(2,s);return i&&yp(i)&&Date.now()+o-r<sl})}catch(r){if(this._debug(n,"error",r),xe(r))return{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),rr()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await Ru(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not valid"),r!==null&&await this._removeSession();return}const s=Math.round(Date.now()/1e3),i=((t=r.expires_at)!==null&&t!==void 0?t:1/0)<s+yb;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${yb}s`),i){if(this.autoRefreshToken&&r.refresh_token){const{error:o}=await this._callRefreshToken(r.refresh_token);o&&(console.error(o),yp(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new ls;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new fh;const{data:i,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!i.session)throw new ls;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={session:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),xe(i)){const o={session:null,error:i};return yp(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 a=>{try{await a.callback(t,n)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Oj(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Nu(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&rr()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),sl);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}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)/sl);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${sl}ms, refresh threshold is ${Eb} ticks`),s<=Eb&&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 Dj)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!rr()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),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(-1,async()=>
327{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 ao(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.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?{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(xe(n))return{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;if(o)return{data:null,error:o};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:c}=await Re(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(t.factorType==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(xe(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;if(i)return{data:null,error:i};const{data:o,error:a}=await Re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(xe(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:s,error:i}=n;return i?{data:null,error:i}:await Re(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(xe(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],s=r.filter(o=>o.factor_type==="totp"&&o.status==="verified"),i=r.filter(o=>o.factor_type==="phone"&&o.status==="verified");return{data:{all:r,totp:s,phone:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:s},error:i}=t;if(i)return{data:null,error:i};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(s.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((r=(n=s.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const u=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:u},error:null}}))}}
327gc.nextInstanceID=0;const zB=gc;class WB extends zB{constructor(t){super(t)}}var HB=function(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 a(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class KB{constructor(t,n,r){var s,i,o;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=iB(t);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,c={db:ZU,realtime:JU,auth:Object.assign(Object.assign({},XU),{storageKey:l}),global:YU},u=oB(r??{},c);this.storageKey=(s=u.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=u.global.headers)!==null&&i!==void 0?i:{},u.accessToken?(this.accessToken=u.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=u.auth)!==null&&o!==void 0?o:{},this.headers,u.global.fetch),this.fetch=rB(n,this._getAccessToken.bind(this),u.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},u.realtime)),this.rest=new yU(`${a}/rest/v1`,{headers:this.headers,schema:u.db.schema,fetch:this.fetch}),u.accessToken||this._listenForAuthEvents()}get functions(){return new q3(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new GU(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return HB(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,storageKey:i,flowType:o,lock:a,debug:l},c,u){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new WB({url:this.authUrl,headers:Object.assign(Object.assign({},f),c),storageKey:i,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,flowType:o,lock:a,debug:l,fetch:u,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new OU(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const GB=(e,t,n)=>new KB(e,t,n),qB="https://zhvzjlegyduzseslatdx.supabase.co",QB="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InpodnpqbGVneWR1enNlc2xhdGR4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzc3ODg2ODksImV4cCI6MjA1MzM2NDY4OX0.dI-VRXYCxUwnOyxDb2t78NvbsbDNpmDK42ssdytypNI",be=GB(qB,QB,{auth:{persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0},db:{schema:"public"}}),YB=o3({title:tl().min(2).max(50),url:tl().url(),description:tl().min(10).max(500),category:tl().uuid(),tags:tl()}),Mu="website_submission_form",Ij=({onSubmitSuccess:e})=>{const{toast:t}=ty(),n=F5({resolver:B5(YB),defaultValues:{title:"",url:"",description:"",category:"",tags:""}}),{data:r}=On({queryKey:["categories"],queryFn:async()=>{const{data:i,error:o}=await be.from("categories").select("id, name");if(o)throw o;return i}});p.useEffect(()=>{const i=localStorage.getItem(Mu);if(i){const o=JSON.parse(i);n.reset(o),localStorage.removeItem(Mu)}},[n]),p.useEffect(()=>{const i=n.watch(o=>{localStorage.setItem(Mu,JSON.stringify(o))});return()=>i.unsubscribe()},[n]);async function s(i){try{const{data:{user:o}}=await be.auth.getUser(),{error:a}=await be.from("websites").insert([{title:i.title,url:i.url,description:i.description,category_id:i.category,created_by:o==null?void 0:o.id,approval_status:"pending"}]);if(a)throw a;
327t({title:"Website submitted!",description:"Thank you for your submission. It will be reviewed by our team before being published."}),localStorage.removeItem(Mu),n.reset(),e==null||e()}catch(o){console.error("Error submitting website:",o),t({title:"Error",description:"There was an error submitting your website. Please try again.",variant:"destructive"})}}return d.jsx(c3,{...n,children:d.jsxs("form",{onSubmit:n.handleSubmit(s),className:"space-y-8",children:[d.jsx(nl,{control:n.control,name:"title",render:({field:i})=>d.jsxs(uo,{children:[d.jsx(fo,{children:"Website Title"}),d.jsx(ho,{children:d.jsx(Ct,{placeholder:"Enter website title",...i})}),d.jsx(po,{})]})}),d.jsx(nl,{control:n.control,name:"url",render:({field:i})=>d.jsxs(uo,{children:[d.jsx(fo,{children:"Website URL"}),d.jsx(ho,{children:d.jsx(Ct,{placeholder:"https://example.com",...i})}),d.jsx(po,{})]})}),d.jsx(nl,{control:n.control,name:"description",render:({field:i})=>d.jsxs(uo,{children:[d.jsx(fo,{children:"Description"}),d.jsx(ho,{children:d.jsx(mc,{placeholder:"Describe the website...",...i})}),d.jsx(po,{})]})}),d.jsx(nl,{control:n.control,name:"category",render:({field:i})=>d.jsxs(uo,{children:[d.jsx(fo,{children:"Category"}),d.jsxs(L3,{onValueChange:i.onChange,defaultValue:i.value,children:[d.jsx(ho,{children:d.jsx(lj,{children:d.jsx(F3,{placeholder:"Select a category"})})}),d.jsx(dj,{children:r==null?void 0:r.map(o=>d.jsx(fj,{value:o.id,children:o.name},o.id))})]}),d.jsx(po,{})]})}),d.jsx(nl,{control:n.control,name:"tags",render:({field:i})=>d.jsxs(uo,{children:[d.jsx(fo,{children:"Tags"}),d.jsx(ho,{children:d.jsx(Ct,{placeholder:"Enter tags separated by commas",...i})}),d.jsx(kP,{children:"Add relevant tags separated by commas (e.g., design, resources, free)"}),d.jsx(po,{})]})}),d.jsx(Ee,{type:"submit",className:"w-full bg-[#9b87f5] hover:bg-[#7E69AB] text-white",children:"Submit Website"})]})})};function Tb(){const e=Pa(),t=Mc(),[n,r]=p.useState(!1),[s,i]=p.useState(!1);p.useEffect(()=>{(async()=>{const{data:{user:c}}=await be.auth.getUser();r(!!c)})();const{data:{subscription:l}}=be.auth.onAuthStateChange((c,u)=>{r(!!(u!=null&&u.user)),u!=null&&u.user&&localStorage.getItem("openSubmitDialog")==="true"&&(i(!0),localStorage.removeItem("openSubmitDialog"))});return()=>{l.unsubscribe()}},[]),p.useEffect(()=>{i(!1)},[t.pathname]);const o=()=>{n?i(!0):(localStorage.setItem("openSubmitDialog","true"),localStorage.setItem("redirectAfterLogin",window.location.pathname),e("/login"))};return d.jsxs(uc,{open:s,onOpenChange:i,children:[d.jsx(dc,{asChild:!0,children:d.jsx(Ee,{variant:"ghost",onClick:o,children:"Submit Website"})}),n&&d.jsxs(ha,{className:"max-w-2xl",children:[d.jsx(pa,{children:d.jsx(ma,{children:"Submit a Website"})}),d.jsx("div",{className:"mt-4",children:d.jsx(Ij,{onSubmitSuccess:()=>i(!1)})})]})]})}var s0="Avatar",[ZB,FH]=Zr(s0),[XB,Lj]=ZB(s0),Fj=p.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[s,i]=p.useState("idle");return d.jsx(XB,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:d.jsx(ce.span,{...r,ref:t})})});Fj.displayName=s0;var $j="AvatarImage",Vj=p.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=e,o=Lj($j,n),a=JB(r,i.referrerPolicy),l=Tt(c=>{s(c),o.onImageLoadingStatusChange(c)});return bt(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?d.jsx(ce.img,{...i,ref:t,src:r}):null});Vj.displayName=$j;var Uj="AvatarFallback",Bj=p.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...s}=e,i=Lj(Uj,n),[o,a]=p.useState(r===void 0);return p.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&i.imageLoadingStatus!=="loaded"?d.jsx(ce.span,{...s,ref:t}):null});Bj.displayName=Uj;function JB(e,t){const[n,r]=p.useState("idle");return bt(()=>{if(!e){r("error");return}let s=!0;const i=new window.Image,o=a=>()=>{s&&r(a)};return r("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,t&&(i.referrerPolicy=t),()=>{s=!1}},[e,t]),n}var zj=Fj,Wj=Vj,Hj=Bj;const Kj=p.forwardRef(({className:e,...t},n)=>d.jsx(zj,{ref:n,className:U("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Kj.displayName=zj.displayName;const ez=p.forwardRef(({className:e,...t},n)=>d.jsx(Wj,{ref:n,className:U("aspect-square h-full w-full",e),...t}));
327ez.displayName=Wj.displayName;const Gj=p.forwardRef(({className:e,...t},n)=>d.jsx(Hj,{ref:n,className:U("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Gj.displayName=Hj.displayName;const tz=()=>{const[e,t]=p.useState(null),n=Pa(),{theme:r}=Yk();p.useEffect(()=>{(async()=>{const{data:{user:l}}=await be.auth.getUser();t((l==null?void 0:l.email)||null)})();const{data:{subscription:a}}=be.auth.onAuthStateChange((l,c)=>{var u;t(((u=c==null?void 0:c.user)==null?void 0:u.email)||null)});return()=>{a.unsubscribe()}},[]);const s=async()=>{try{await be.auth.signOut(),Fe.success("Logged out successfully"),n("/")}catch{Fe.error("Error logging out")}},i=r==="dark"?"https://zhvzjlegyduzseslatdx.supabase.co/storage/v1/object/public/toolio//toolio-logo-white.png":"https://zhvzjlegyduzseslatdx.supabase.co/storage/v1/object/public/toolio//toolio-logo-dark.png";return d.jsx("nav",{className:"sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:d.jsxs("div",{className:"flex h-16 items-center",children:[d.jsxs("div",{className:"flex items-center space-x-4 px-4",children:[d.jsx(Vk,{className:"hover:bg-accent"}),d.jsx(Ey,{orientation:"vertical",className:"h-6"}),d.jsx(xt,{to:"/",className:"flex items-center space-x-2",children:d.jsx("img",{src:i,alt:"Toolio Logo",className:"h-8"})})]}),d.jsxs("div",{className:"flex flex-1 items-center justify-end space-x-4 px-4",children:[d.jsxs("div",{className:"hidden md:flex items-center space-x-4",children:[d.jsx(xt,{to:"/about",children:d.jsxs(Ee,{variant:"ghost",className:"flex items-center gap-2",children:[d.jsx(ww,{className:"h-4 w-4"}),"About"]})}),d.jsx(Tb,{}),e?d.jsxs(d5,{children:[d.jsxs(f5,{className:"flex items-center space-x-2 hover:bg-accent hover:text-accent-foreground px-2 py-1 rounded-md",children:[d.jsx(Kj,{className:"h-8 w-8",children:d.jsx(Gj,{children:d.jsx(Su,{className:"h-4 w-4"})})}),d.jsx("span",{className:"text-sm",children:e})]}),d.jsxs(ZT,{align:"end",children:[d.jsxs(rg,{onClick:()=>n("/profile"),className:"cursor-pointer",children:[d.jsx(Su,{className:"mr-2 h-4 w-4"}),d.jsx("span",{children:"Profile"})]}),d.jsx(XT,{}),d.jsxs(rg,{onClick:s,className:"cursor-pointer",children:[d.jsx(_w,{className:"mr-2 h-4 w-4"}),d.jsx("span",{children:"Logout"})]})]})]}):d.jsx(xt,{to:"/login",children:d.jsxs(Ee,{variant:"ghost",className:"flex items-center gap-2",children:[d.jsx(bw,{className:"h-4 w-4"}),"Login"]})}),d.jsx(Qw,{})]}),d.jsxs(Ok,{children:[d.jsx(m4,{asChild:!0,children:d.jsx(Ee,{variant:"ghost",size:"icon",className:"md:hidden",children:d.jsx(vI,{className:"h-5 w-5"})})}),d.jsxs(Dy,{children:[d.jsx(Dk,{children:d.jsx(Ik,{children:"Menu"})}),d.jsxs("div",{className:"mt-6 flex flex-col space-y-4",children:[d.jsxs(xt,{to:"/",className:"flex items-center space-x-2",children:[d.jsx(fI,{className:"h-4 w-4"}),d.jsx("span",{children:"Home"})]}),d.jsxs(xt,{to:"/about",className:"flex items-center space-x-2",children:[d.jsx(ww,{className:"h-4 w-4"}),d.jsx("span",{children:"About"})]}),d.jsx(Tb,{}),e?d.jsxs(d.Fragment,{children:[d.jsxs(xt,{to:"/profile",className:"flex items-center space-x-2",children:[d.jsx(Su,{className:"h-4 w-4"}),d.jsx("span",{children:"Profile"})]}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Su,{className:"h-4 w-4"}),d.jsx("span",{className:"text-sm",children:e})]}),d.jsx(Ee,{variant:"ghost",size:"sm",onClick:s,className:"ml-2",children:d.jsx(_w,{className:"h-4 w-4"})})]})]}):d.jsxs(xt,{to:"/login",className:"flex items-center space-x-2",children:[d.jsx(bw,{className:"h-4 w-4"}),d.jsx("span",{children:"Login"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Qw,{}),d.jsx("span",{children:"Theme"})]})]})]})]})]})]})})},Qc={categories:["categories"],websites:["websites"],featuredWebsites:["featured-websites"],websitesByCategory:e=>["websites","category",e],websiteDetails:e=>["website",e],recommendedWebsites:e=>["recommended-websites",e],likes:e=>["likes",e],userRole:e=>["user-role",e]},qj=e=>On({queryKey:Qc.categories,queryFn:async()=>{const{data:t,error:n}=await be.from("categories").select("id, name, description, icon").order("name",{ascending:!0});if(n)throw console.error("Error fetching categories:",n),n;return t??[]},staleTime:1e3*60*10,gcTime:1e3*60*30,...e}),nz=e=>On({queryKey:Qc.featuredWebsites,queryFn:async()=>{const{data:t,error:n}=await be.from("websites").select(` 328 id, 329 title, 330 description, 331 image_url, 332 thumbnail_url, 333 url, 334 categories!inner(name) 335 `).eq("is_featured",!0).eq("approval_status","approved").order("title",{ascending:!0}).limit(12);if(n)throw console.error("Error fetching featured websites:",n),n;return t??[]},staleTime:1e3*60*5,gcTime:1e3*60*15,...e}),rz=(e,t)=>On({queryKey:Qc.websiteDetails(e||""),queryFn:async()=>
335{if(!e)throw new Error("No website ID provided");const{data:n,error:r}=await be.from("websites").select(` 336 id, 337 title, 338 description, 339 image_url, 340 thumbnail_url, 341 url, 342 category_id, 343 created_at, 344 categories!inner(id, name, icon) 345 `).eq("id",e).maybeSingle();if(r)throw console.error("Error fetching website:",r),r;if(!n)throw new Error("Website not found");return n},enabled:!!e,staleTime:1e3*60*10,...t}),sz=(e,t,n)=>On({queryKey:Qc.recommendedWebsites(e||""),queryFn:async()=>{if(!e)return[];const{data:r,error:s}=await be.from("websites").select(` 346 id, 347 title, 348 description, 349 image_url, 350 thumbnail_url, 351 url, 352 categories!inner(name) 353 `).eq("category_id",e).neq("id",t||"").eq("approval_status","approved").order("created_at",{ascending:!1}).limit(3);if(s)throw console.error("Error fetching recommended websites:",s),s;return r??[]},enabled:!!e,staleTime:1e3*60*5,...n}),iz=(e,t)=>On({queryKey:Qc.likes(e||""),queryFn:async()=>{if(!e)return{count:0};const{count:n,error:r}=await be.from("likes").select("id",{count:"exact"}).eq("website_id",e);if(r)throw console.error("Error fetching likes count:",r),r;return{count:n||0}},enabled:!!e,staleTime:1e3*30,...t}),oz=p.memo(()=>{const[e,t]=p.useState(""),{state:n}=Bc(),r=n==="collapsed",{data:s,isLoading:i}=qj(),o=p.useMemo(()=>(s==null?void 0:s.filter(a=>a.name.toLowerCase().includes(e.toLowerCase())))||[],[s,e]);return d.jsxs($k,{collapsible:"icon",children:[d.jsx(Bk,{children:!r&&d.jsxs("div",{className:"relative",children:[d.jsx(Uk,{type:"text",placeholder:"Search categories...",value:e,onChange:a=>t(a.target.value)}),d.jsx(SI,{className:"absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 transform text-muted-foreground"})]})}),d.jsx(Wk,{children:d.jsxs(Hk,{children:[!r&&d.jsx(Kk,{children:"Categories"}),d.jsx(Gk,{children:i?d.jsx("div",{className:"flex items-center justify-center p-4",children:d.jsx(mI,{className:"h-4 w-4 animate-spin"})}):d.jsx(qk,{children:o==null?void 0:o.map(a=>d.jsx(Qk,{children:r?d.jsx(_y,{children:d.jsxs(rk,{children:[d.jsx(sk,{asChild:!0,children:d.jsx(eg,{asChild:!0,children:d.jsx(xt,{to:`/category/${a.name.toLowerCase()}`,className:"flex items-center justify-center",children:d.jsx("span",{className:"w-4 h-4 flex items-center justify-center",children:a.icon})})})}),d.jsx(Sy,{side:"right",children:a.name})]})}):d.jsx(eg,{asChild:!0,children:d.jsx(xt,{to:`/category/${a.name.toLowerCase()}`,children:d.jsxs("span",{className:"flex items-center",children:[d.jsx("span",{className:"w-4 h-4 mr-2 flex items-center justify-center",children:a.icon}),d.jsx("span",{children:a.name})]})})})},a.id))})})]})}),!r&&d.jsxs(zk,{children:[d.jsx("div",{className:"p-4 bg-gradient-to-r from-purple-500/10 to-blue-500/10 rounded-lg m-2 border border-purple-500/20",children:d.jsx("div",{className:"flex flex-col gap-3",children:d.jsxs("a",{href:"https://whitepaper.toolio.app/",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2 text-sm bg-purple-500/20 hover:bg-purple-500/30 text-purple-700 dark:text-purple-300 px-3 py-2 rounded-md transition-colors h-[54px]",children:[d.jsx(cI,{className:"h-4 w-4"}),d.jsx("span",{children:"Whitepaper"})]})})}),d.jsx("div",{className:"flex justify-center p-2",children:d.jsx("a",{target:"_blank",href:"https://betalist.com/startups/toolio-app?utm_campaign=badge-toolio-app&utm_medium=badge&utm_source=badge-featured",className:"block",children:d.jsx("img",{alt:"Toolio.App - Toolio.App curates & showcase the most valuable apps online | BetaList",className:"w-[200px] h-[54px] object-contain",src:"https://betalist.com/badges/featured?id=127175&theme=color"})})}),d.jsx("div",{className:"flex justify-center p-2",children:d.jsx("a",{href:"https://www.producthunt.com/products/toolio-2?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-toolio-2",target:"_blank",rel:"noopener noreferrer",className:"block",children:d.jsx("img",{src:"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=983185&theme=neutral&t=1750767292691",alt:"Toolio - Toolio.App curates & showcase the most valuable apps online. | Product Hunt",className:"w-[200px] h-[54px] object-contain"})})})]})]})});function az(){const[e,t]=p.useState(!1),[n,r]=p.useState(""),[s,i]=p.useState(""),[o,a]=p.useState(""),[l,c]=p.useState(""),[u,f]=p.useState(!1),h=async m=>{m.preventDefault(),f(!0);try{const{error:y}=await be.from("contact_messages").insert([{name:n,email:s,subject:o,message:l}]);if(y)throw y;Fe.success("Message sent successfully!"),t(!1),r(""),i(""),a(""),c("")}catch(y){Fe.error("Failed to send message. Please try again."),console.error("Error sending message:",y)}finally{f(!1)}};return d.jsxs(uc,{open:e,onOpenChange:t,children:[d.jsx(dc,{asChild:!0,children:d.jsxs(Ee,{variant:"ghost",size:"sm",className:"flex items-center gap-2 text-left",children:[d.jsx(yI,{className:"w-5 h-5"}),"Contact Us"]})}
353),d.jsxs(ha,{className:"sm:max-w-[425px]",children:[d.jsx(pa,{children:d.jsx(ma,{children:"Contact Us"})}),d.jsxs("form",{onSubmit:h,className:"space-y-4 mt-4",children:[d.jsx("div",{className:"space-y-2",children:d.jsx(Ct,{placeholder:"Your name",value:n,onChange:m=>r(m.target.value),required:!0})}),d.jsx("div",{className:"space-y-2",children:d.jsx(Ct,{type:"email",placeholder:"Your email",value:s,onChange:m=>i(m.target.value),required:!0})}),d.jsx("div",{className:"space-y-2",children:d.jsx(Ct,{placeholder:"Subject",value:o,onChange:m=>a(m.target.value),required:!0})}),d.jsx("div",{className:"space-y-2",children:d.jsx(mc,{placeholder:"Your message",value:l,onChange:m=>c(m.target.value),required:!0})}),d.jsx("div",{className:"flex justify-end",children:d.jsx(Ee,{type:"submit",disabled:u,children:u?"Sending...":"Send Message"})})]})]})]})}const lz=()=>d.jsx("footer",{className:"mt-auto border-t bg-background/80 backdrop-blur-sm",children:d.jsxs("div",{className:"container mx-auto px-4 py-8",children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-4",children:"Toolio"}),d.jsx("p",{className:"text-sm text-muted-foreground",children:"Discover and share the best web development tools and resources."})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-4",children:"Quick Links"}),d.jsxs("ul",{className:"space-y-2",children:[d.jsx("li",{children:d.jsx(xt,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground",children:"Home"})}),d.jsx("li",{children:d.jsx(xt,{to:"/about",className:"text-sm text-muted-foreground hover:text-foreground",children:"About"})}),d.jsx("li",{children:d.jsx(xt,{to:"/submit",className:"text-sm text-muted-foreground hover:text-foreground",children:"Submit Website"})})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-4",children:"Connect"}),d.jsxs("div",{className:"flex flex-col space-y-4",children:[d.jsxs("div",{className:"flex space-x-4",children:[d.jsx("a",{href:"https://github.com",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground",children:d.jsx(uI,{className:"w-5 h-5"})}),d.jsx("a",{href:"https://x.com/ToolioApp",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground",children:d.jsx(kI,{className:"w-5 h-5"})}),d.jsx(xt,{to:"/admin",className:"text-muted-foreground hover:text-foreground",children:d.jsx(CI,{className:"w-5 h-5"})})]}),d.jsx(az,{})]})]})]}),d.jsx("div",{className:"mt-8 pt-4 border-t text-center text-sm text-muted-foreground",children:d.jsxs("p",{children:["© ",new Date().getFullYear()," Toolio. All rights reserved."]})})]})}),vr=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:U("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));vr.displayName="Card";const Ti=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:U("flex flex-col space-y-1.5 p-6",e),...t}));Ti.displayName="CardHeader";const Pi=p.forwardRef(({className:e,...t},n)=>d.jsx("h3",{ref:n,className:U("text-2xl font-semibold leading-none tracking-tight",e),...t}));Pi.displayName="CardTitle";const ji=p.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:U("text-sm text-muted-foreground",e),...t}));ji.displayName="CardDescription";const Ri=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:U("p-6 pt-0",e),...t}));Ri.displayName="CardContent";const cz=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{ref:n,className:U("flex items-center p-6 pt-0",e),...t}));cz.displayName="CardFooter";const uz=Na("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 vc({className:e,variant:t,...n}){return d.jsx("div",{className:U(uz({variant:t}),e),...n})}var dz="AspectRatio",Qj=p.forwardRef((e,t)=>
353{const{ratio:n=1/1,style:r,...s}=e;return d.jsx("div",{style:{position:"relative",width:"100%",paddingBottom:`${100/n}%`},"data-radix-aspect-ratio-wrapper":"",children:d.jsx(ce.div,{...s,ref:t,style:{...r,position:"absolute",top:0,right:0,bottom:0,left:0}})})});Qj.displayName=dz;var fz=Qj;const hz=fz,hh=({id:e,title:t,description:n,url:r,imageUrl:s,thumbnailUrl:i,category:o,tags:a})=>{const[l,c]=p.useState(!1),u="https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d",f=l?u:i||s||u;return d.jsx(xt,{to:`/website/${e}`,children:d.jsxs(vr,{className:"overflow-hidden transition-all duration-300 hover:animate-card-hover hover:shadow-lg",children:[d.jsx("div",{className:"aspect-video overflow-hidden relative",children:d.jsx(hz,{ratio:16/9,children:d.jsx("img",{src:f,alt:t,className:"w-full h-full object-cover",onError:h=>{c(!0);const m=h.target;m.src=u}})})}),d.jsxs(Ti,{children:[d.jsxs("div",{className:"flex justify-between items-start",children:[d.jsx(Pi,{className:"text-xl font-bold",children:t}),d.jsx(vc,{variant:"secondary",children:o})]}),d.jsx(ji,{className:"line-clamp-2",children:n})]}),d.jsx(Ri,{children:d.jsx("div",{className:"flex flex-wrap gap-2",children:a.map(h=>d.jsx(vc,{variant:"outline",className:"text-xs",children:h},h))})})]})})},pz=()=>d.jsxs("div",{className:"group relative flex justify-center items-center text-zinc-600 text-xs font-bold scale-75",children:[d.jsxs("div",{className:"fixed opacity-0 group-hover:opacity-100 group-hover:-translate-y-[150%] -translate-y-[300%] duration-500 group-hover:delay-500 skew-y-[20deg] group-hover:skew-y-0 shadow-md z-[9999]",children:[d.jsxs("div",{className:"bg-gradient-to-r from-purple-500 to-pink-500 flex items-center gap-1 p-2 rounded-md",children:[d.jsxs("svg",{fill:"none",viewBox:"0 0 24 24",height:"20px",width:"20px",xmlns:"http://www.w3.org/2000/svg",className:"stroke-white",children:[d.jsx("circle",{strokeLinejoin:"round",r:9,cy:12,cx:12}),d.jsx("path",{strokeLinejoin:"round",d:"M12 3C12 3 8.5 6 8.5 12C8.5 18 12 21 12 21"}),d.jsx("path",{strokeLinejoin:"round",d:"M12 3C12 3 15.5 6 15.5 12C15.5 18 12 21 12 21"}),d.jsx("path",{strokeLinejoin:"round",d:"M3 12H21"}),d.jsx("path",{strokeLinejoin:"round",d:"M19.5 7.5H4.5"}),d.jsx("g",{filter:"url(#filter0_d_15_556)",children:d.jsx("path",{strokeLinejoin:"round",d:"M19.5 16.5H4.5"})}),d.jsx("defs",{children:d.jsxs("filter",{colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",height:3,width:17,y:16,x:"3.5",id:"filter0_d_15_556",children:[d.jsx("feFlood",{result:"BackgroundImageFix",floodOpacity:0}),d.jsx("feColorMatrix",{result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",type:"matrix",in:"SourceAlpha"}),d.jsx("feOffset",{dy:1}),d.jsx("feGaussianBlur",{stdDeviation:"0.5"}),d.jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0",type:"matrix"}),d.jsx("feBlend",{result:"effect1_dropShadow_15_556",in2:"BackgroundImageFix",mode:"normal"}),d.jsx("feBlend",{result:"shape",in2:"effect1_dropShadow_15_556",in:"SourceGraphic",mode:"normal"})]})})]}),d.jsx("span",{className:"text-white",children:"Submit Website"})]}),d.jsx("div",{className:"shadow-md bg-gradient-to-r from-purple-500 to-pink-500 absolute bottom-0 translate-y-1/2 left-1/2 translate-x-full rotate-45 p-1"}),d.jsx("div",{className:"rounded-md bg-white group-hover:opacity-0 group-hover:scale-[115%] group-hover:delay-700 duration-500 w-full h-full absolute top-0 left-0",children:d.jsx("div",{className:"border-b border-r border-white bg-white absolute bottom-0 translate-y-1/2 left-1/2 translate-x-full rotate-45 p-1"})})]}),d.jsxs("div",{className:"shadow-md flex items-center group-hover:gap-2 bg-gradient-to-br from-gray-100 to-gray-200 dark:from-gray-700 dark:to-gray-800 p-2 rounded-full cursor-pointer duration-300",children:[d.jsx("svg",{fill:"none",viewBox:"0 0 24 24",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",className:"fill-gray-600 dark:fill-gray-300",children:d.jsx("path",{strokeLinejoin:"round",strokeLinecap:"round",d:"M15.4306 7.70172C7.55045 7.99826 3.43929 15.232 2.17021 19.3956C2.07701 19.7014 2.31139 20 2.63107 20C2.82491 20 3.0008 19.8828 3.08334 19.7074C6.04179 13.4211 12.7066 12.3152 15.514 12.5639C15.7583 12.5856 15.9333 12.7956 15.9333 13.0409V15.1247C15.9333 15.5667 16.4648 15.7913 16.7818
35315.4833L20.6976 11.6784C20.8723 11.5087 20.8993 11.2378 20.7615 11.037L16.8456 5.32965C16.5677 4.92457 15.9333 5.12126 15.9333 5.61253V7.19231C15.9333 7.46845 15.7065 7.69133 15.4306 7.70172Z"})}),d.jsx("span",{className:"text-[0px] group-hover:text-xs duration-300 text-gray-600 dark:text-gray-300",children:"Feature Your Site"})]})]}),mz=p.memo(()=>{const{data:e,isLoading:t,error:n}=nz();if(n)return console.error("Query error:",n),d.jsx("div",{className:"py-8",children:d.jsx("div",{className:"flex items-center justify-center",children:d.jsx("p",{className:"text-lg text-red-500",children:"Error loading featured websites. Please try again later."})})});const r=()=>d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(s=>d.jsxs("div",{className:"space-y-4",children:[d.jsx(zn,{className:"h-[200px] w-full rounded-lg"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(zn,{className:"h-4 w-3/4"}),d.jsx(zn,{className:"h-4 w-full"})]})]},s))});return d.jsxs("section",{className:"pt-8 pb-8",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-8",children:[d.jsx("h2",{className:"text-3xl font-bold bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-transparent animate-gradient-move",children:"Featured Tools"}),d.jsxs(uc,{children:[d.jsx(dc,{asChild:!0,children:d.jsx("div",{className:"cursor-pointer",children:d.jsx(pz,{})})}),d.jsxs(ha,{className:"max-w-2xl",children:[d.jsx(pa,{children:d.jsx(ma,{children:"Submit a Website"})}),d.jsx("div",{className:"mt-4",children:d.jsx(Ij,{})})]})]})]}),t?d.jsx(r,{}):d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e==null?void 0:e.map(s=>{var i;return d.jsx(hh,{id:s.id,title:s.title,description:s.description,imageUrl:s.image_url,thumbnailUrl:s.thumbnail_url,url:s.url,category:(i=s.categories)==null?void 0:i.name,tags:[]},s.id)})})]})}),gz=p.memo(()=>{const{data:e,isLoading:t,error:n}=qj(),{data:r,isLoading:s,error:i}=On({queryKey:["websites-preview"],queryFn:async()=>{const{data:l,error:c}=await be.from("websites").select(` 354 id, 355 title, 356 description, 357 image_url, 358 thumbnail_url, 359 url, 360 category_id, 361 categories!inner(name) 362 `).eq("approval_status","approved").order("created_at",{ascending:!1}).limit(200);if(c)throw console.error("Error fetching websites:",c),c;return l??[]},staleTime:1e3*60*5}),o=p.useMemo(()=>r?r.reduce((l,c)=>{var f;const u=(f=c.categories)==null?void 0:f.name;return l[u]||(l[u]=[]),l[u].length<8&&l[u].push({id:c.id,title:c.title,description:c.description,imageUrl:c.image_url,thumbnailUrl:c.thumbnail_url,url:c.url,category:u,tags:[]}),l},{}):{},[r]);if(n||i)return d.jsx("div",{className:"py-8 container",children:d.jsx("div",{className:"flex items-center justify-center",children:d.jsx("p",{className:"text-lg text-red-500",children:"Error loading content. Please try again later."})})});const a=()=>d.jsx("div",{className:"space-y-16",children:[1,2,3].map(l=>d.jsxs("section",{className:"mb-16",children:[d.jsxs("div",{className:"flex justify-between items-center mb-6",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(zn,{className:"h-8 w-8 rounded"}),d.jsx(zn,{className:"h-8 w-48"})]}),d.jsx(zn,{className:"h-10 w-24"})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:[1,2,3,4].map(c=>d.jsxs("div",{className:"space-y-4",children:[d.jsx(zn,{className:"h-[200px] w-full rounded-lg"}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(zn,{className:"h-4 w-3/4"}),d.jsx(zn,{className:"h-4 w-full"})]})]},c))})]},l))});return t||s?d.jsx("div",{className:"py-8",children:d.jsx(a,{})}):d.jsx("div",{className:"py-8",children:e==null?void 0:e.map(l=>{var c;return d.jsxs("section",{className:"mb-16",children:[d.jsxs("div",{className:"flex justify-between items-center mb-6",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-2xl",children:l.icon}),d.jsx("h2",{className:"text-2xl font-bold",children:l.name})]}),d.jsx(xt,{to:`/category/${l.name.toLowerCase()}`,children:d.jsxs(Ee,{variant:"ghost",className:"group",children:["View all",d.jsx(yE,{className:"w-4 h-4 ml-1 transition-transform group-hover:translate-x-1"})]})})]}),d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:(c=o==null?void 0:o[l.name])==null?void 0:c.map(u=>d.jsx(hh,{...u}
362,u.id))})]},l.id)})})}),vz=()=>d.jsxs("div",{className:"min-h-screen w-full transition-all duration-200",children:[d.jsx(mz,{}),d.jsx(gz,{})]}),yz=()=>{const{category:e}=TC(),{data:t,isLoading:n}=On({queryKey:["category",e],queryFn:async()=>{console.log("Fetching category details...");const{data:i,error:o}=await be.from("categories").select("*").ilike("name",e||"").maybeSingle();if(o)throw console.error("Error fetching category:",o),o;return i}}),{data:r,isLoading:s}=On({queryKey:["category-websites",e],queryFn:async()=>{console.log("Fetching websites for category...");const{data:i,error:o}=await be.from("websites").select("*, categories!inner(*), thumbnail_url").ilike("categories.name",e||"").eq("approval_status","approved");if(o)throw console.error("Error fetching websites:",o),o;return i},enabled:!!e});return n||s?d.jsx("div",{className:"container py-16",children:d.jsx("div",{className:"flex items-center justify-center",children:d.jsx("p",{className:"text-lg",children:"Loading category and websites..."})})}):t?d.jsxs("div",{className:"container py-16",children:[d.jsxs("div",{className:"flex items-center gap-2 mb-8",children:[d.jsx("span",{className:"text-4xl",children:t.icon}),d.jsx("h1",{className:"text-3xl font-bold",children:t.name})]}),r&&r.length>0?d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(i=>d.jsx(hh,{id:i.id,title:i.title,description:i.description,imageUrl:i.image_url,thumbnailUrl:i.thumbnail_url,url:i.url,category:i.categories.name,tags:[]},i.id))}):d.jsx("p",{className:"text-center text-gray-500",children:"No websites found in this category."})]}):d.jsx("div",{className:"container py-16",children:d.jsx("div",{className:"flex items-center justify-center",children:d.jsx("p",{className:"text-lg text-red-500",children:"Category not found."})})})},xz=()=>{const e="_coolMode_effect";let t=document.getElementById(e);if(t)return t;const n=document.createElement("div");return n.setAttribute("id",e),n.setAttribute("style","overflow:hidden; position:fixed; height:100%; top:0; left:0; right:0; bottom:0; pointer-events:none; z-index:2147483647"),document.body.appendChild(n),n};let Pb=0;const wz=(e,t)=>{Pb++;const r=(t==null?void 0:t.particle)||"circle",s=[15,20,25,35,45],i=45;let o=[],a=!1,l=0,c=0;const u=xz();function f(){const C=(t==null?void 0:t.size)||s[Math.floor(Math.random()*s.length)],M=(t==null?void 0:t.speedHorz)||Math.random()*10,I=(t==null?void 0:t.speedUp)||Math.random()*25,R=Math.random()*360,A=Math.random()*35*(Math.random()<=.5?-1:1),$=c-C/2,L=l-C/2,Z=Math.random()<=.5?-1:1,V=document.createElement("div");if(r==="circle"){const H="http://www.w3.org/2000/svg",j=document.createElementNS(H,"svg"),O=document.createElementNS(H,"circle");O.setAttributeNS(null,"cx",(C/2).toString()),O.setAttributeNS(null,"cy",(C/2).toString()),O.setAttributeNS(null,"r",(C/2).toString()),O.setAttributeNS(null,"fill",`hsl(${Math.random()*360}, 70%, 50%)`),j.appendChild(O),j.setAttribute("width",C.toString()),j.setAttribute("height",C.toString()),V.appendChild(j)}else V.innerHTML=`<img src="${r}" width="${C}" height="${C}" style="border-radius: 50%">`;V.style.position="absolute",V.style.transform=`translate3d(${L}px, ${$}px, 0px) rotate(${R}deg)`,u.appendChild(V),o.push({direction:Z,element:V,left:L,size:C,speedHorz:M,speedUp:I,spinSpeed:A,spinVal:R,top:$})}function h(){o.forEach(C=>{C.left=C.left-C.speedHorz*C.direction,C.top=C.top-C.speedUp,C.speedUp=Math.min(C.size,C.speedUp-1),C.spinVal=C.spinVal+C.spinSpeed,C.top>=Math.max(window.innerHeight,document.body.clientHeight)+C.size&&(o=o.filter(M=>M!==C),C.element.remove()),C.element.setAttribute("style",["position:absolute","will-change:transform",`top:${C.top}px`,`left:${C.left}px`,`transform:rotate(${C.spinVal}deg)`].join(";"))})}let m,y=0;const g=30;function w(){const C=performance.now();a&&o.length<i&&C-y>g&&(f(),y=C),h(),m=requestAnimationFrame(w)}w();const x="ontouchstart"in window,v=x?"touchstart":"mousedown",b=x?"touchend":"mouseup",_=x?"touchmove":"mousemove",S=C=>{var M,I;"touches"in C?(l=(M=C.touches)==null?void 0:M[0].clientX,c=(I=C.touches)==null?void 0:I[0].clientY):(l=C.clientX,c=C.clientY)},P=C=>{S(C),a=!0},T=()=>{a=!1};return e.addEventListener(_,S,{passive:!0}),e.addEventListener(v,P,{passive:!0}),e.addEventListener(b,T,{passive:!0}),e.addEventListener("mouseleave",T,{passive:!0}),()=>{e.removeEventListener(_,S),e.removeEventListener(v,P),e.removeEventListener(b,T),e.removeEventListener("mouseleave",T);const C=setInterval(()=>{m&&o.length===0&&(cancelAnimationFrame(m),clearInterval(C),--Pb===0&&u.remove())},500)}},bz=({children:e,options:t})=>{const n=p.useRef(null);return p.useEffect(()=>{if(n.current)return wz(n.current,t)},[t]),F.cloneElement(e,{ref:n})},_z=p.memo(()=>{var y;const{id:e}=TC(),[t,n]=p.useState(0),r=Af(),{data:s,isLoading:i,error:o}=rz(e),{data:a=[],isLoading:l}=sz(s==null?void 0:s.category_id,e),{data:c}=iz(e);p.useEffect(()=>{c&&n(c.count)},[c]);const u=ai({mutationFn:async()=>{const{data:{user:g}}=await be.auth.getUser();if(!g)throw new Error("User not authenticated");const{error:w}=await be.from("likes").insert([{website_id:e,user_id:g.id}]);if(w)throw w},onSuccess:()=>{r.invalidateQueries({queryKey:["likes",e]}),n(g=>g+1),Fe.success("Added like!")}
362,onError:()=>{Fe.error("Please sign in to like websites")}}),f=()=>{u.mutate()},h=()=>{navigator.clipboard.writeText(window.location.href),Fe.success("Link copied to clipboard")},m=g=>{try{return`https://image.thum.io/get/width/1200/crop/630/wait/2/${g}`}catch(w){return console.error("Error generating thumbnail URL:",w),(s==null?void 0:s.image_url)||"https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d"}};return i?d.jsx("div",{className:"container max-w-6xl py-4",children:d.jsx("div",{className:"flex items-center justify-center h-64",children:d.jsx("p",{className:"text-lg",children:"Loading website details..."})})}):o?d.jsx("div",{className:"container max-w-6xl py-4",children:d.jsxs("div",{className:"flex flex-col items-center justify-center h-64 space-y-4",children:[d.jsx("p",{className:"text-lg text-red-500",children:o instanceof Error?o.message:"Failed to load website details"}),d.jsx(Ee,{variant:"ghost",size:"sm",asChild:!0,children:d.jsxs(xt,{to:"/",className:"gap-2",children:[d.jsx(Xh,{className:"w-4 h-4"}),"Return Home"]})})]})}):s?d.jsx("div",{className:"min-h-screen bg-background",children:d.jsxs("div",{className:"container px-4 md:px-8 max-w-6xl py-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-8 flex-wrap gap-4",children:[d.jsx(Ee,{variant:"ghost",size:"sm",asChild:!0,children:d.jsxs(xt,{to:"/",className:"gap-2",children:[d.jsx(Xh,{className:"w-4 h-4"}),"Home"]})}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(Ee,{variant:"outline",size:"sm",onClick:h,children:[d.jsx(hI,{className:"w-4 h-4 mr-2"}),"Copy Link"]}),d.jsx(Ee,{className:"bg-[#9b87f5] hover:bg-[#7E69AB] text-white",size:"sm",asChild:!0,children:d.jsxs("a",{href:aL((s==null?void 0:s.url)||""),target:"_blank",rel:"noopener noreferrer",children:[d.jsx(lI,{className:"w-4 h-4 mr-2"}),"Visit"]})})]})]}),d.jsxs("div",{className:"space-y-6 md:space-y-8",children:[d.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg md:rounded-2xl shadow-lg overflow-hidden",children:[d.jsx("div",{className:"aspect-[16/10] relative",children:d.jsx("img",{src:m((s==null?void 0:s.url)||""),alt:s==null?void 0:s.title,className:"w-full h-full object-cover",onError:g=>{const w=g.target;w.src=(s==null?void 0:s.image_url)||"https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d"}})}),d.jsxs("div",{className:"p-4 md:p-8",children:[d.jsxs("div",{className:"flex items-start justify-between mb-4 flex-wrap gap-4",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl md:text-3xl font-bold mb-2",children:s==null?void 0:s.title}),d.jsxs("div",{className:"flex items-center gap-2 mb-4 flex-wrap",children:[d.jsx(vc,{variant:"secondary",children:(y=s==null?void 0:s.categories)==null?void 0:y.name}),d.jsx(vc,{variant:"outline",children:"Free"})]})]}),d.jsx(bz,{children:d.jsxs(Ee,{variant:"ghost",size:"icon",onClick:f,className:"flex items-center gap-2",children:[d.jsx(dI,{className:"w-6 h-6"}),d.jsx("span",{children:t})]})})]}),d.jsx("p",{className:"text-gray-600 dark:text-gray-300 text-base md:text-lg",children:s==null?void 0:s.description})]})]}),d.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg p-4 md:p-6",children:[d.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Similar Websites"}),l?d.jsx("div",{children:"Loading similar websites..."}):(a==null?void 0:a.length)>0?d.jsx("div",{className:"grid gap-4 md:gap-6 md:grid-cols-2 lg:grid-cols-3",children:a.map(g=>{var w;return d.jsx(hh,{id:g.id,title:g.title,description:g.description,imageUrl:g.image_url,thumbnailUrl:g.thumbnail_url,url:g.url,category:(w=g.categories)==null?void 0:w.name,tags:[]},g.id)})}):d.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"No similar websites found."})]})]})]})}):d.jsx("div",{className:"container max-w-6xl py-4",children:d.jsxs("div",{className:"flex flex-col items-center justify-center h-64 space-y-4",children:[d.jsx("p",{className:"text-lg",children:"Website not found"}),d.jsx(Ee,{variant:"ghost",size:"sm",asChild:!0,children:d.jsxs(xt,{to:"/",className:"gap-2",children:[d.jsx(Xh,{className:"w-4 h-4"}),"Return Home"]})})]})})});var i0="Tabs",[Sz,$H]=Zr(i0,[Yf]),Yj=Yf(),[Cz,o0]=Sz(i0),Zj=p.forwardRef((e,t)=>
362{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=qf(a),[f,h]=Bs({prop:r,onChange:s,defaultProp:i});return d.jsx(Cz,{scope:n,baseId:Gn(),value:f,onValueChange:h,orientation:o,dir:u,activationMode:l,children:d.jsx(ce.div,{dir:u,"data-orientation":o,...c,ref:t})})});Zj.displayName=i0;var Xj="TabsList",Jj=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=o0(Xj,n),o=Yj(n);return d.jsx(nT,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:d.jsx(ce.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});Jj.displayName=Xj;var eR="TabsTrigger",tR=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=o0(eR,n),a=Yj(n),l=sR(o.baseId,r),c=iR(o.baseId,r),u=r===o.value;return d.jsx(rT,{asChild:!0,...a,focusable:!s,active:u,children:d.jsx(ce.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:Y(e.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:Y(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{const f=o.activationMode!=="manual";!u&&!s&&f&&o.onValueChange(r)})})})});tR.displayName=eR;var nR="TabsContent",rR=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=o0(nR,n),l=sR(a.baseId,r),c=iR(a.baseId,r),u=r===a.value,f=p.useRef(u);return p.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),d.jsx(Zn,{present:s||u,children:({present:h})=>d.jsx(ce.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&i})})});rR.displayName=nR;function sR(e,t){return`${e}-trigger-${t}`}function iR(e,t){return`${e}-content-${t}`}var Ez=Zj,oR=Jj,aR=tR,lR=rR;const kz=Ez,cR=p.forwardRef(({className:e,...t},n)=>d.jsx(oR,{ref:n,className:U("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));cR.displayName=oR.displayName;const kg=p.forwardRef(({className:e,...t},n)=>d.jsx(aR,{ref:n,className:U("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));kg.displayName=aR.displayName;const Tg=p.forwardRef(({className:e,...t},n)=>d.jsx(lR,{ref:n,className:U("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Tg.displayName=lR.displayName;const Tz=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(""),[s,i]=p.useState(!1),[o,a]=p.useState(!1),l=Pa(),{toast:c}=ty(),u=async m=>{m.preventDefault(),i(!0);try{const{error:y}=await be.auth.signInWithPassword({email:e,password:n});if(y){let g="An error occurred during login";y.message==="Invalid login credentials"&&(g="Invalid email or password. Please try again."),c({variant:"destructive",title:"Login Failed",description:g})}else c({title:"Success",description:"Logged in successfully!"}),l("/")}catch{c({variant:"destructive",title:"Error",description:"An unexpected error occurred"})}finally{i(!1)}},f=async m=>{m.preventDefault(),i(!0);try{const{error:y}=await be.auth.signUp({email:e,password:n,options:{emailRedirectTo:`${window.location.origin}/auth/callback`}});if(y){let g=y.message;y.message.includes("User already registered")&&(g="This email is already registered. Please try logging in instead."),c({variant:"destructive",title:"Sign Up Failed",description:g})}else c({title:"Success",description:"Check your email to confirm your account!"})}catch{c({variant:"destructive",title:"Error",description:"An unexpected error occurred during sign up"})}finally{i(!1)}},h=async m=>{m.preventDefault(),i(!0);try{const{error:y}=await be.auth.resetPasswordForEmail(e,{redirectTo:`${window.location.origin}/auth/callback`});y?c({variant:"destructive",title:"Password Reset Failed",description:y.message}):(c({title:"Success",description:"Check your email for password reset instructions!"}),a(!1))}catch{c({variant:"destructive",title:"Error",description:"An unexpected error occurred during password reset"})}finally{i(!1)}};return o?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:d.jsxs(vr,{className:"w-full max-w-md",children:[d.jsxs(Ti,{children:[d.jsx(Pi,{children:"Reset Password"}),d.jsx(ji,{children:"Enter your email to receive reset instructions"})]}),d.jsx(Ri,{children:d.jsxs("form",{onSubmit:h,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"reset-email",className:"text-sm font-medium",children:"Email"}),d.jsx(Ct,{id:"reset-email",type:"email",placeholder:"Enter your email",value:e,onCh
362ange:m=>t(m.target.value),required:!0})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx(Ee,{type:"submit",className:"w-full",disabled:s,children:s?"Sending...":"Send Reset Instructions"}),d.jsx(Ee,{type:"button",variant:"ghost",className:"w-full",onClick:()=>a(!1),children:"Back to Login"})]})]})})]})}):d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:d.jsxs(vr,{className:"w-full max-w-md",children:[d.jsxs(Ti,{children:[d.jsx(Pi,{children:"Welcome"}),d.jsx(ji,{children:"Sign in to your account or create a new one"})]}),d.jsx(Ri,{children:d.jsxs(kz,{defaultValue:"login",className:"space-y-4",children:[d.jsxs(cR,{className:"grid w-full grid-cols-2",children:[d.jsx(kg,{value:"login",children:"Login"}),d.jsx(kg,{value:"signup",children:"Sign Up"})]}),d.jsx(Tg,{value:"login",children:d.jsxs("form",{onSubmit:u,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"email",className:"text-sm font-medium",children:"Email"}),d.jsx(Ct,{id:"email",type:"email",placeholder:"Enter your email",value:e,onChange:m=>t(m.target.value),required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"password",className:"text-sm font-medium",children:"Password"}),d.jsx(Ct,{id:"password",type:"password",placeholder:"Enter your password",value:n,onChange:m=>r(m.target.value),required:!0})]}),d.jsx(Ee,{type:"submit",className:"w-full",disabled:s,children:s?"Signing in...":"Sign in"}),d.jsx(Ee,{type:"button",variant:"ghost",className:"w-full",onClick:()=>a(!0),children:"Forgot password?"})]})}),d.jsx(Tg,{value:"signup",children:d.jsxs("form",{onSubmit:f,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"signup-email",className:"text-sm font-medium",children:"Email"}),d.jsx(Ct,{id:"signup-email",type:"email",placeholder:"Enter your email",value:e,onChange:m=>t(m.target.value),required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx("label",{htmlFor:"signup-password",className:"text-sm font-medium",children:"Password"}),d.jsx(Ct,{id:"signup-password",type:"password",placeholder:"Choose a password",value:n,onChange:m=>r(m.target.value),required:!0})]}),d.jsx(Ee,{type:"submit",className:"w-full",disabled:s,children:s?"Creating account...":"Create account"})]})})]})})]})})},Pg=p.forwardRef(({className:e,...t},n)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:n,className:U("w-full caption-bottom text-sm",e),...t})}));Pg.displayName="Table";const jg=p.forwardRef(({className:e,...t},n)=>d.jsx("thead",{ref:n,className:U("[&_tr]:border-b",e),...t}));jg.displayName="TableHeader";const Rg=p.forwardRef(({className:e,...t},n)=>d.jsx("tbody",{ref:n,className:U("[&_tr:last-child]:border-0",e),...t}));Rg.displayName="TableBody";const Pz=p.forwardRef(({className:e,...t},n)=>d.jsx("tfoot",{ref:n,className:U("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Pz.displayName="TableFooter";const vl=p.forwardRef(({className:e,...t},n)=>d.jsx("tr",{ref:n,className:U("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));vl.displayName="TableRow";const sr=p.forwardRef(({className:e,...t},n)=>d.jsx("th",{ref:n,className:U("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));sr.displayName="TableHead";const ir=p.forwardRef(({className:e,...t},n)=>d.jsx("td",{ref:n,className:U("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ir.displayName="TableCell";const jz=p.forwardRef(({className:e,...t},n)=>d.jsx("caption",{ref:n,className:U("mt-4 text-sm text-muted-foreground",e),...t}));jz.displayName="TableCaption";const Rz=()=>{const[e,t]=p.useState(!1),n=async r=>{var o;const s=(o=r.target.files)==null?void 0:o[0];if(!s)return;t(!0);const i=new FileReader;i.onload=async a=>{var l;try{const u=((l=a.target)==null?void 0:l.result).split(` 363`),f=u[0].split(","),h=u.slice(1).map(y=>{var w,x,v,b;const g=y.split(",");return{title:(w=g[0])==null?void 0:w.trim(),url:(x=g[1])==null?void 0:x.trim(),description:(v=g[2])==null?void 0:v.trim(),category_id:(b=g[3])==null?void 0:b.trim()}}).filter(y=>y.title&&y.url),{error:m}=await be.from("websites").insert(h);if(m)throw m;Fe.success(`Successfully uploaded ${h.length} websites`)}catch(c){console.error("Error uploading CSV:",c),Fe.error("Failed to upload CSV file")}finally{t(!1)}},i.readAsText(s)};return d.jsxs("div",{className:"mb-4",children:[d.jsxs(Ee,{variant:"outline",className:"relative",disabled:e,children:[d.jsx("input",{type:"file",accept:".csv",onChange:n,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),d.jsx(TI,{className:"h-4 w-4 mr-2"}),"Upload CSV"]}),e&&d.jsx("span",{className:"ml-2",children:"Uploading..."})]})};var uR="AlertDialog",[Nz,VH]=Zr(uR,[vk]),Xr=vk(),dR=e=>{const{__scopeAlertDialog:t,...n}=e,r=Xr(t);return d.jsx(Ay,{...r,...n,modal:!0})};dR.displayName=uR;var Az="AlertDialogTrigger",fR=p.forwardRef((e,t)=>
363{const{__scopeAlertDialog:n,...r}=e,s=Xr(n);return d.jsx(Oy,{...s,...r,ref:t})});fR.displayName=Az;var Oz="AlertDialogPortal",hR=e=>{const{__scopeAlertDialog:t,...n}=e,r=Xr(t);return d.jsx(My,{...r,...n})};hR.displayName=Oz;var Mz="AlertDialogOverlay",pR=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Xr(n);return d.jsx(Fc,{...s,...r,ref:t})});pR.displayName=Mz;var Wo="AlertDialogContent",[Dz,Iz]=Nz(Wo),mR=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...s}=e,i=Xr(n),o=p.useRef(null),a=De(t,o),l=p.useRef(null);return d.jsx(d4,{contentName:Wo,titleName:gR,docsSlug:"alert-dialog",children:d.jsx(Dz,{scope:n,cancelRef:l,children:d.jsxs($c,{role:"alertdialog",...i,...s,ref:a,onOpenAutoFocus:Y(s.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[d.jsx(ny,{children:r}),d.jsx(Fz,{contentRef:o})]})})})});mR.displayName=Wo;var gR="AlertDialogTitle",vR=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Xr(n);return d.jsx(Vc,{...s,...r,ref:t})});vR.displayName=gR;var yR="AlertDialogDescription",xR=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Xr(n);return d.jsx(Uc,{...s,...r,ref:t})});xR.displayName=yR;var Lz="AlertDialogAction",wR=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,s=Xr(n);return d.jsx(Gf,{...s,...r,ref:t})});wR.displayName=Lz;var bR="AlertDialogCancel",_R=p.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=Iz(bR,n),i=Xr(n),o=De(t,s);return d.jsx(Gf,{...i,...r,ref:o})});_R.displayName=bR;var Fz=({contentRef:e})=>{const t=`\`${Wo}\` requires a description for the component to be accessible for screen reader users. 364 365You can add a description to the \`${Wo}\` by passing a \`${yR}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 366 367Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Wo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 368 369For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},$z=dR,Vz=fR,Uz=hR,SR=pR,CR=mR,ER=wR,kR=_R,TR=vR,PR=xR;const jb=$z,Rb=Vz,Bz=Uz,jR=p.forwardRef(({className:e,...t},n)=>d.jsx(SR,{className:U("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}));jR.displayName=SR.displayName;const Ng=p.forwardRef(({className:e,...t},n)=>d.jsxs(Bz,{children:[d.jsx(jR,{}),d.jsx(CR,{ref:n,className:U("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),...t})]}));Ng.displayName=CR.displayName;const Ag=({className:e,...t})=>d.jsx("div",{className:U("flex flex-col space-y-2 text-center sm:text-left",e),...t});Ag.displayName="AlertDialogHeader";const Og=({className:e,...t})=>d.jsx("div",{className:U("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Og.displayName="AlertDialogFooter";const Mg=p.forwardRef(({className:e,...t},n)=>d.jsx(TR,{ref:n,className:U("text-lg font-semibold",e),...t}));Mg.displayName=TR.displayName;const Dg=p.forwardRef(({className:e,...t},n)=>d.jsx(PR,{ref:n,className:U("text-sm text-muted-foreground",e),...t}));Dg.displayName=PR.displayName;const Ig=p.forwardRef(({className:e,...t},n)=>d.jsx(ER,{ref:n,className:U(Cy(),e),...t}));Ig.displayName=ER.displayName;const Lg=p.forwardRef(({className:e,...t},n)=>d.jsx(kR,{ref:n,className:U(Cy({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Lg.displayName=kR.displayName;const zz=()=>{const e=Pa(),[t,n]=p.useState(!1),[r,s]=p.useState(!0),i=Af(),[o,a]=p.useState({name:"",description:"",icon:""}),[l,c]=p.useState(null),u=ai({mutationFn:async R=>{const{data:A,error:$}=await be.from("categories").insert([R]).select().single();if($)throw $;return A},onSuccess:()=>{i.invalidateQueries({queryKey:["categories"]}),Fe.success("Category created successfully"),a({name:"",description:"",icon:""})},onError:R=>{Fe.error("Failed to create category: "+R.message)}}),f=ai({mutationFn:async R=>{const{data:A,error:$}=await be.from("categories").update({name:R.name,description:R.description,icon:R.icon}).eq("id",R.id).select().single();if($)throw $;return A},onSuccess:()=>{i.invalidateQueries({queryKey:["categories"]}),Fe.success("Category updated successfully"),c(null)},onError:R=>{Fe.error("Failed to update category: "+R.message)}}),h=ai({mutationFn:async R=>{const{error:A}=await be.from("categories").delete().eq("id",R);if(A)throw A},onSuccess:()=>{i.invalidateQueries({queryKey:["categories"]}),Fe.success("Category deleted successfully")},onError:R=>{Fe.error("Failed to delete category: "+R.message)}}),m=ai({mutationFn:async({id:R,isFeatured:A})=>{const{data:$,error:L}=await be.from("websites").update({is_featured:!A}).eq("id",R).select().single();if(L)throw L;return $},onSuccess:()=>{i.invalidateQueries({queryKey:["websites"]}),Fe.success("Website featured status updated successfully")},onError:R=>{Fe.error("Failed to update featured status: "+R.message)}}),y=ai({mutationFn:async R=>{const{error:A}=await be.from("websites").delete().eq("id",R);if(A)throw A},onSuccess:()=>{i.invalidateQueries({queryKey:["websites"]}),Fe.success("Website deleted successfully")},onError:R=>{Fe.error("Failed to delete website: "+R.message)}}),g=async R=>{R.preventDefault(),u.mutate(o)},w=async R=>{R.preventDefault(),l&&f.mutate(l)},x=async R=>{h.mutate(R)},v=async(R,A)=>{m.mutate({id:R,isFeatured:A})},b=async R=>{y.mutate(R)},_=ai({mutationFn:async({id:R,status:A})=>{const{data:$,error:L}=await be.from("websites").update({approval_status:A}).eq("id",R).select().single();if(L)throw L;return $},onSuccess:()=>{i.invalidateQueries({queryKey:["websites"]}),Fe.success("Website status updated successfully")},onError:R=>{Fe.error("Failed to update website status: "+R.message)}}),S=R=>{_.mutate({id:R,status:"approved"})},P=R=>{_.mutate({id:R,status:"rejected"})};p.useEffect(()=>{(async()=>{const{data:{session:A}}=await be.auth.getSession();if(!A){Fe.error("Please login to access this page"),e("/login");return}const{data:$,error:L}=await be.from("user_roles").select("role").eq("user_id",A.user.id).maybeSingle();if(L){console.error("Error fetching user role:",L),Fe.error("An error occurred while checking permissions"),e("/");return}if(!$||$.role!=="admin"){Fe.error("You don't have permission to access this page"),e("/");return}n(!0),s(!1)})()},[e]);const{data:T,isLoading:C}=On({queryKey:["categories"],queryFn:async()=>{const{data:R,error:A}=await be.from("categories").select("*");if(A)throw Fe.error("Failed to load categories"),A;return R},enabled:t}),{data:M,isLoading:I}=On({queryKey:["websites"],queryFn:async()=>{const{data:R,error:A}=await be.from("websites").select("*, categories(name), created_by").order("created_at",{ascending:!1});if(A)throw A;const $=[...new Set(R==null?void 0:R.map(V=>
369V.created_by).filter(Boolean))],L={};if($.length>0)try{const{data:V,error:H}=await be.rpc("get_user_emails_for_admin",{user_ids:$});H?console.error("Error fetching user emails:",H):V==null||V.forEach(j=>{L[j.id]=j.email})}catch(V){console.error("Error fetching user emails:",V)}return R==null?void 0:R.map(V=>({...V,submitter_email:L[V.created_by]||null,submitter_id:V.created_by}))},enabled:t});return r||C||I?d.jsx("div",{className:"container py-8",children:"Loading..."}):t?d.jsxs("div",{className:"container py-8",children:[d.jsxs("div",{className:"mb-8",children:[d.jsxs("h2",{className:"text-2xl font-bold mb-4 flex items-center gap-2",children:[d.jsx(pI,{className:"h-6 w-6"}),"Categories"]}),d.jsxs(uc,{children:[d.jsx(dc,{asChild:!0,children:d.jsxs(Ee,{className:"mb-4",children:[d.jsx(_I,{className:"h-4 w-4 mr-2"}),"Add Category"]})}),d.jsxs(ha,{children:[d.jsx(pa,{children:d.jsx(ma,{children:"Add New Category"})}),d.jsxs("form",{onSubmit:g,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"name",children:"Name"}),d.jsx(Ct,{id:"name",value:o.name,onChange:R=>a({...o,name:R.target.value}),required:!0})]}),d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"icon",children:"Icon"}),d.jsx(Ct,{id:"icon",value:o.icon,onChange:R=>a({...o,icon:R.target.value}),required:!0})]}),d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"description",children:"Description"}),d.jsx(mc,{id:"description",value:o.description,onChange:R=>a({...o,description:R.target.value})})]}),d.jsx(Ee,{type:"submit",children:"Create Category"})]})]})]}),d.jsxs(Pg,{children:[d.jsx(jg,{children:d.jsxs(vl,{children:[d.jsx(sr,{children:"Name"}),d.jsx(sr,{children:"Description"}),d.jsx(sr,{children:"Actions"})]})}),d.jsx(Rg,{children:T==null?void 0:T.map(R=>d.jsxs(vl,{children:[d.jsx(ir,{className:"font-medium",children:R.name}),d.jsx(ir,{children:R.description}),d.jsxs(ir,{className:"space-x-2",children:[d.jsxs(uc,{children:[d.jsx(dc,{asChild:!0,children:d.jsxs(Ee,{variant:"ghost",size:"sm",onClick:()=>c(R),children:[d.jsx(bI,{className:"h-4 w-4 mr-2"}),"Edit"]})}),d.jsxs(ha,{children:[d.jsx(pa,{children:d.jsx(ma,{children:"Edit Category"})}),d.jsxs("form",{onSubmit:w,className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"edit-name",children:"Name"}),d.jsx(Ct,{id:"edit-name",value:l==null?void 0:l.name,onChange:A=>c({...l,name:A.target.value}),required:!0})]}),d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"edit-icon",children:"Icon"}),d.jsx(Ct,{id:"edit-icon",value:l==null?void 0:l.icon,onChange:A=>c({...l,icon:A.target.value}),required:!0})]}),d.jsxs("div",{children:[d.jsx(hs,{htmlFor:"edit-description",children:"Description"}),d.jsx(mc,{id:"edit-description",value:l==null?void 0:l.description,onChange:A=>c({...l,description:A.target.value})})]}),d.jsx(Ee,{type:"submit",children:"Update Category"})]})]})]}),d.jsxs(jb,{children:[d.jsx(Rb,{asChild:!0,children:d.jsxs(Ee,{variant:"ghost",size:"sm",children:[d.jsx(Cw,{className:"h-4 w-4 mr-2"}),"Delete"]})}),d.jsxs(Ng,{children:[d.jsxs(Ag,{children:[d.jsx(Mg,{children:"Delete Category"}),d.jsx(Dg,{children:"Are you sure you want to delete this category? This action cannot be undone."})]}),d.jsxs(Og,{children:[d.jsx(Lg,{children:"Cancel"}),d.jsx(Ig,{onClick:()=>x(R.id),children:"Delete"})]})]})]})]})]},R.id))})]})]}),d.jsxs("div",{children:[d.jsxs("h2",{className:"text-2xl font-bold mb-4 flex items-center gap-2",children:[d.jsx(Sw,{className:"h-6 w-6"}),"Websites"]}),d.jsx(Rz,{}),d.jsxs(Pg,{children:[d.jsx(jg,{children:d.jsxs(vl,{children:[d.jsx(sr,{children:"Title"}),d.jsx(sr,{children:"Category"}),d.jsx(sr,{children:"Status"}),d.jsx(sr,{children:"Featured"}),d.jsx(sr,{className:"min-w-[200px]",children:"Submitter"}),d.jsx(sr,{children:"Actions"})]})}),d.jsx(Rg,{children:M==null?void 0:M.map(R=>{var A;return d.jsxs(vl,{children:[d.jsx(ir,{className:"font-medium",children:R.title}),d.jsx(ir,{children:(A=R.categories)==null?void 0:A.name}),d.jsx(ir,{children:d.jsx(vc,{variant:R.approval_status==="approved"?"secondary":R.approval_status==="rejected"?"destructive":"outline",children:R.approval_status})}),d.jsx(ir,{children:R.is_featured?"Yes":"No"}),d.jsx(ir,{className:"text-sm text-gray-600 min-w-[200px]",children:R.created_by?d.jsx("div",{className:"space-y-2",children:R.submitter_email?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"text-sm font-medium text-blue-600 truncate",children:R.submitter_email}),d.jsxs(Ee,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs w-full justify-start",onClick:()=>{navigator.clipboard.writeText(R.submitter_email),Fe.success("Email copied to clipboard")},children:[d.jsx(xw,{className:"h-3 w-3 mr-1"}),"Copy Email"]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-mono text-xs text-gray-500",children:[R.created_by.slice(0,8),"..."]}),d.jsxs(Ee,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs w-full justify-start",onClick:()=>{navigator.clipboard.writeText(R.created_by),Fe.success("User ID copied to clipboard")},children:[d.jsx(xw,{className:"h-3 w-3 mr-1"}),"Copy ID"]})]})}):d.jsx("span",{className:"text-gray-400",children:"Anonymous"})}),d.jsxs(ir,{className:"space-x-2",children:[R.approval_status==="pending"&&d.jsxs(d.Fragment,{children:[d.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>S(R.id),className:"text-green-600 hover:text-green-700",children:"Approve"}),d.jsx(Ee,{variant:"outline",size:"sm",onClick:()=>
vendor: 37,472 bytes, line 369
369P(R.id),className:"text-red-600 hover:text-red-700",children:"Reject"})]}),d.jsxs(Ee,{variant:"ghost",size:"sm",onClick:()=>v(R.id,R.is_featured),children:[d.jsx(Sw,{className:`h-4 w-4 mr-2 ${R.is_featured?"fill-yellow-400":""}`}),"Toggle Featured"]}),d.jsxs(jb,{children:[d.jsx(Rb,{asChild:!0,children:d.jsxs(Ee,{variant:"ghost",size:"sm",children:[d.jsx(Cw,{className:"h-4 w-4 mr-2"}),"Delete"]})}),d.jsxs(Ng,{children:[d.jsxs(Ag,{children:[d.jsx(Mg,{children:"Delete Website"}),d.jsx(Dg,{children:"Are you sure you want to delete this website? This action cannot be undone."})]}),d.jsxs(Og,{children:[d.jsx(Lg,{children:"Cancel"}),d.jsx(Ig,{onClick:()=>b(R.id),children:"Delete"})]})]})]})]})]},R.id)})})]})]})]}):null},RR=p.createContext({});function Wz(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const a0=p.createContext(null),NR=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Hz(e=!0){const t=p.useContext(a0);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=p.useId();p.useEffect(()=>{e&&s(i)},[e]);const o=p.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const l0=typeof window<"u",Kz=l0?p.useLayoutEffect:p.useEffect,mn=e=>e;let Fg=mn;function c0(e){let t;return()=>(t===void 0&&(t=e()),t)}const ba=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Fr=e=>e*1e3,$r=e=>e/1e3,Gz={skipAnimations:!1,useManualTiming:!1};function qz(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,u=!1,f=!1)=>{const m=f&&r?t:n;return u&&i.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),i.delete(c)},process:c=>{if(o=c,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(c))}};return l}const Du=["read","resolveKeyframes","update","preRender","render","postRender"],Qz=40;function AR(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Du.reduce((x,v)=>(x[v]=qz(i),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=o,m=()=>{const x=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(x-s.timestamp,Qz),1),s.timestamp=x,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,s.isProcessing||e(m)};return{schedule:Du.reduce((x,v)=>{const b=o[v];return x[v]=(_,S=!1,P=!1)=>(n||y(),b.schedule(_,S,P)),x},{}),cancel:x=>{for(let v=0;v<Du.length;v++)o[Du[v]].cancel(x)},state:s,steps:o}}const{schedule:qe,cancel:qs,state:St,steps:xp}=AR(typeof requestAnimationFrame<"u"?requestAnimationFrame:mn,!0),OR=p.createContext({strict:!1}),Nb={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"]},_a={};for(const e in Nb)_a[e]={isEnabled:t=>Nb[e].some(n=>!!t[n])};function Yz(e){for(const t in e)_a[t]={..._a[t],...e[t]}}const Zz=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function cf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Zz.has(e)}let MR=e=>!cf(e);function Xz(e){e&&(MR=t=>t.startsWith("on")?!cf(t):e(t))}try{Xz(require("@emotion/is-prop-valid").default)}catch{}function Jz(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(MR(s)||n===!0&&cf(s)||!t&&!cf(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function e6(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const ph=p.createContext({});function yc(e){return typeof e=="string"||Array.isArray(e)}function mh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const u0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],d0=["initial",...u0];function gh(e){return mh(e.animate)||d0.some(t=>yc(e[t]))}function DR(e){return!!(gh(e)||e.variants)}function t6(e,t){if(gh(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yc(n)?n:void 0,animate:yc(r)?r:void 0}}return e.inherit!==!1?t:{}}function n6(e){const{initial:t,animate:n}=t6(e,p.useContext(ph));return p.useMemo(()=>({initial:t,animate:n}),[Ab(t),Ab(n)])}function Ab(e){return Array.isArray(e)?e.join(" "):e}const r6=Symbol.for("motionComponentSymbol");function To(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function s6(e,t,n){return p.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):To(n)&&(n.current=r))},[t])}const f0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),i6="framerAppearId",IR="data-"+f0(i6),{schedule:h0,cancel:UH}=AR(queueMicrotask,!1),LR=p.createContext({});function o6(e,t,n,r,s){var i,o;const{visualElement:a}=p.useContext(ph),l=p.useContext(OR),c=p.useContext(a0),u=p.useContext(NR).reducedMotion,f=p.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=f.current,m=p.useContext(LR);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&a6(f.current,n,s,m);const y=p.useRef(!1);p.useInsertionEffect(()=>{h&&y.current&&h.update(n,c)});const g=n[IR],w=p.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return Kz(()=>{h&&(y.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h0.render(h.render),w.current&&h.animationState&&h.animationState.animateChanges())}),p.useEffect(()=>{h&&(!w.current&&h.animationState&&h.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}),w.current=!1))}),h}function a6(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:FR(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&To(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function FR(e){if(e)return e.options.allowProjection!==!1?e.projection:FR(e.parent)}function l6({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&Yz(e);function a(c,u){let f;const h={...p.useContext(NR),...c,layoutId:c6(c)},{isStatic:m}=h,y=n6(c),g=r(c,m);if(!m&&l0){u6();const w=d6(h);f=w.MeasureLayout,y.visualElement=o6(s,g,h,t,w.ProjectionNode)}return d.jsxs(ph.Provider,{value:y,children:[f&&y.visualElement?d.jsx(f,{visualElement:y.visualElement,...h}):null,n(s,c,s6(g,y.visualElement,u),g,m,y.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=p.forwardRef(a);return l[r6]=s,l}function c6({layoutId:e}){const t=p.useContext(RR).id;return t&&e!==void 0?t+"-"+e:e}function u6(e,t){p.useContext(OR).strict}function d6(e){const{drag:t,layout:n}=_a;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const f6=["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 p0(e){return typeof e!="string"||e.includes("-")?!1:!!(f6.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ob(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function m0(e,t,n,r){if(typeof t=="function"){const[s,i]=Ob(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]=Ob(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const $g=e=>Array.isArray(e),h6=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),p6=e=>$g(e)?e[e.length-1]||0:e,Mt=e=>!!(e&&e.getVelocity);function rd(e){const t=Mt(e)?e.get():e;return h6(t)?t.toValue():t}function m6({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:g6(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const $R=e=>(t,n)=>{const r=p.useContext(ph),s=p.useContext(a0),i=()=>m6(e,t,r,s);return n?i():Wz(i)};function g6(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=rd(i[h]);let{initial:o,animate:a}=e;const l=gh(e),c=DR(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const f=u?a:o;if(f&&typeof f!="boolean"&&!mh(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const y=m0(e,h[m]);if(y){const{transitionEnd:g,transition:w,...x}=y;for(const v in x){let b=x[v];if(Array.isArray(b)){const _=u?b.length-1:0;b=b[_]}b!==null&&(s[v]=b)}for(const v in g)s[v]=g[v]}}}return s}const $a=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xi=new Set($a),VR=e=>t=>typeof t=="string"&&t.startsWith(e),g0=VR("--"),v6=VR("var(--"),v0=e=>v6(e)?y6.test(e.split("/*")[0].trim()):!1,y6=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,UR=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Qr=(e,t,n)=>n>t?t:n<e?e:n,Va={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xc={...Va,transform:e=>Qr(0,1,e)},Iu={...Va,default:1},Yc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),us=Yc("deg"),yr=Yc("%"),le=Yc("px"),x6=Yc("vh"),w6=Yc("vw"),Mb={...yr,parse:e=>yr.parse(e)/100,transform:e=>yr.transform(e*100)},b6={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,backgroundPositionX:le,backgroundPositionY:le},_6={rotate:us,rotateX:us,rotateY:us,rotateZ:us,scale:Iu,scaleX:Iu,scaleY:Iu,scaleZ:Iu,skew:us,skewX:us,skewY:us,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:xc,originX:Mb,originY:Mb,originZ:le},Db={...Va,transform:Math.round},y0={...b6,..._6,zIndex:Db,size:le,fillOpacity:xc,strokeOpacity:xc,numOctaves:Db},S6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},C6=$a.length;function E6(e,t,n){let r="",s=!0;for(let i=0;i<C6;i++){const o=$a[i],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=UR(a,y0[o]);if(!l){s=!1;const u=S6[o]||o;r+=`${u}(${c}) `}n&&(t[o]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function x0(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const c=t[l];if(Xi.has(l)){o=!0;continue}else if(g0(l)){s[l]=c;continue}else{const u=UR(c,y0[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(o||n?r.transform=E6(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}const k6={offset:"stroke-dashoffset",array:"stroke-dasharray"},T6={offset:"strokeDashoffset",array:"strokeDasharray"};function P6(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?k6:T6;e[i.offset]=le.transform(-r);const o=le.transform(t),a=le.transform(n);e[i.array]=`${o} ${a}`}function Ib(e,t,n){return typeof e=="string"?e:le.transform(t+n*e)}function j6(e,t,n){const r=Ib(t,e.x,e.width),s=Ib(n,e.y,e.height);return`${r} ${s}`}function w0(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(x0(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:y}=e;h.transform&&(y&&(m.transform=h.transform),delete h.transform),y&&(s!==void 0||i!==void 0||m.transform)&&(m.transformOrigin=j6(y,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&P6(h,o,a,l,!1)}const b0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),BR=()=>({...b0(),attrs:{}}),_0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zR(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const WR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function HR(e,t,n,r){zR(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(WR.has(s)?s:f0(s),t.attrs[s])}const wc={};function R6(e){for(const t in e)wc[t]=e[t],g0(t)&&(wc[t].isCSSVariable=!0)}function KR(e,{layout:t,layoutId:n}){return Xi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wc[e]||e==="opacity")}function S0(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(Mt(s[o])||t.style&&Mt(t.style[o])||KR(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function GR(e,t,n){const r=S0(e,t,n);for(const s in e)if(Mt(e[s])||Mt(t[s])){const i=$a.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function N6(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Lb=["x","y","width","height","cx","cy","r"],A6={useVisualState:$R({scrapeMotionValuesFromProps:GR,createRenderState:BR,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(Xi.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<Lb.length;a++){const l=Lb[a];e[l]!==t[l]&&(o=!0)}o&&qe.read(()=>{N6(n,r),qe.render(()=>{w0(r,s,_0(n.tagName),e.transformTemplate),HR(n,r)})})}})},O6={useVisualState:$R({scrapeMotionValuesFromProps:S0,createRenderState:b0})};function qR(e,t,n){for(const r in t)!Mt(t[r])&&!KR(r,n)&&(e[r]=t[r])}function M6({transformTemplate:e},t){return p.useMemo(()=>{const n=b0();return x0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function D6(e,t){const n=e.style||{},r={};return qR(r,n,e),Object.assign(r,M6(e,t)),r}function I6(e,t){const n={},r=D6(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}function L6(e,t,n,r){const s=p.useMemo(()=>{const i=BR();return w0(i,t,_0(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};qR(i,e.style,e),s.style={...i,...s.style}}return s}function F6(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(p0(n)?L6:I6)(r,i,o,n),c=Jz(r,typeof n=="string",e),u=n!==p.Fragment?{...c,...l,ref:s}:{},{children:f}=r,h=p.useMemo(()=>Mt(f)?f.get():f,[f]);return p.createElement(n,{...u,children:h})}}function $6(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...p0(r)?A6:O6,preloadedFeatures:e,useRender:F6(s),createVisualElement:t,Component:r};return l6(o)}}function QR(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}function vh(e,t,n){const r=e.getProps();return m0(r,t,n!==void 0?n:r.custom,e)}const V6=c0(()=>window.ScrollTimeline!==void 0);class U6{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(V6()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class B6 extends U6{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function C0(e,t){return e?e[t]||e.default||e:void 0}const Vg=2e4;function YR(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Vg;)t+=n,r=e.next(t);return t>=Vg?1/0:t}function E0(e){return typeof e=="function"}function Fb(e,t){e.timeline=t,e.onfinish=null}const k0=e=>Array.isArray(e)&&typeof e[0]=="number",z6={linearEasing:void 0};function W6(e,t){const n=c0(e);return()=>{var r;return(r=z6[t])!==null&&r!==void 0?r:n()}}const uf=W6(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ZR=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(ba(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function XR(e){return!!(typeof e=="function"&&uf()||!e||typeof e=="string"&&(e in Ug||uf())||k0(e)||Array.isArray(e)&&e.every(XR))}const yl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ug={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yl([0,.65,.55,1]),circOut:yl([.55,0,1,.45]),backIn:yl([.31,.01,.66,-.59]),backOut:yl([.33,1.53,.69,.99])};function JR(e,t){if(e)return typeof e=="function"&&uf()?ZR(e,t):k0(e)?yl(e):Array.isArray(e)?e.map(n=>JR(n,t)||Ug.easeOut):Ug[e]}const In={x:!1,y:!1};function eN(){return In.x||In.y}function H6(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function tN(e,t){const n=H6(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function $b(e){return!(e.pointerType==="touch"||eN())}function K6(e,t,n={}){const[r,s,i]=tN(e,n),o=a=>{if(!$b(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=f=>{$b(f)&&(c(f),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const nN=(e,t)=>t?e===t?!0:nN(e,t.parentElement):!1,T0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,G6=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function q6(e){return G6.has(e.tagName)||e.tabIndex!==-1}const xl=new WeakSet;function Vb(e){return t=>{t.key==="Enter"&&e(t)}}function wp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Q6=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vb(()=>{if(xl.has(n))return;wp(n,"down");const s=Vb(()=>{wp(n,"up")}),i=()=>wp(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 Ub(e){return T0(e)&&!eN()}function Y6(e,t,n={}){const[r,s,i]=tN(e,n),o=a=>{const l=a.currentTarget;if(!Ub(a)||xl.has(l))return;xl.add(l);const c=t(l,a),u=(m,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Ub(m)||!xl.has(l))&&(xl.delete(l),typeof c=="function"&&c(m,{success:y}))},f=m=>{u(m,n.useGlobalTarget||nN(l,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!q6(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",c=>Q6(c,s),s)}),i}function Z6(e){return e==="x"||e==="y"?In[e]?null:(In[e]=!0,()=>{In[e]=!1}):In.x||In.y?null:(In.x=In.y=!0,()=>{In.x=In.y=!1})}const rN=new Set(["width","height","top","left","right","bottom",...$a]);let sd;function X6(){sd=void 0}const xr={now:()=>(sd===void 0&&xr.set(St.isProcessing||Gz.useManualTiming?St.timestamp:performance.now()),sd),set:e=>{sd=e,queueMicrotask(X6)}};function P0(e,t){e.indexOf(t)===-1&&e.push(t)}function j0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class R0{constructor(){this.subscriptions=[]}add(t){return P0(this.subscriptions,t),()=>j0(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}}function sN(e,t){return t?e*(1e3/t):0}const Bb=30,J6=e=>!isNaN(parseFloat(e));class e8{constructor(t,n={}){this.version="12.0.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=xr.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=xr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=J6(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 R0);const r=this.events[t].add(n);return t==="change"?()=>{r(),qe.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,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}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()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=xr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Bb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bb);return sN(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(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bc(e,t){return new e8(e,t)}function t8(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,bc(n))}function n8(e,t){const n=vh(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=p6(i[o]);t8(e,o,a)}}function r8(e){return!!(Mt(e)&&e.add)}function Bg(e,t){const n=e.getValue("willChange");if(r8(n))return n.add(t)}function iN(e){return e.props[IR]}const oN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,s8=1e-7,i8=12;function o8(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=oN(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>s8&&++a<i8);return o}function Zc(e,t,n,r){if(e===t&&n===r)return mn;const s=i=>o8(i,0,1,e,n);return i=>i===0||i===1?i:oN(s(i),t,r)}const aN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lN=e=>t=>1-e(1-t),cN=Zc(.33,1.53,.69,.99),N0=lN(cN),uN=aN(N0),dN=e=>(e*=2)<1?.5*N0(e):.5*(2-Math.pow(2,-10*(e-1))),A0=e=>1-Math.sin(Math.acos(e)),fN=lN(A0),hN=aN(A0),pN=e=>/^0[^.\s]+$/u.test(e);function a8(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||pN(e):!0}const Il=e=>Math.round(e*1e5)/1e5,O0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function l8(e){return e==null}const c8=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,M0=(e,t)=>n=>!!(typeof n=="string"&&c8.test(n)&&n.startsWith(e)||t&&!l8(n)&&Object.prototype.hasOwnProperty.call(n,t)),mN=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(O0);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},u8=e=>Qr(0,255,e),bp={...Va,transform:e=>Math.round(u8(e))},vi={test:M0("rgb","red"),parse:mN("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+bp.transform(e)+", "+bp.transform(t)+", "+bp.transform(n)+", "+Il(xc.transform(r))+")"};function d8(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 zg={test:M0("#"),parse:d8,transform:vi.transform},Po={test:M0("hsl","hue"),parse:mN("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+yr.transform(Il(t))+", "+yr.transform(Il(n))+", "+Il(xc.transform(r))+")"},At={test:e=>vi.test(e)||zg.test(e)||Po.test(e),parse:e=>vi.test(e)?vi.parse(e):Po.test(e)?Po.parse(e):zg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?vi.transform(e):Po.transform(e)},f8=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function h8(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(O0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(f8))===null||n===void 0?void 0:n.length)||0)>0}const gN="number",vN="color",p8="var",m8="var(",zb="${}",g8=/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 _c(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(g8,l=>(At.test(l)?(r.color.push(i),s.push(vN),n.push(At.parse(l))):l.startsWith(m8)?(r.var.push(i),s.push(p8),n.push(l)):(r.number.push(i),s.push(gN),n.push(parseFloat(l))),++i,zb)).split(zb);return{values:n,split:a,indexes:r,types:s}}function yN(e){return _c(e).values}function xN(e){const{split:t,types:n}=_c(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const a=n[o];a===gN?i+=Il(s[o]):a===vN?i+=At.transform(s[o]):i+=s[o]}return i}}const v8=e=>typeof e=="number"?0:e;function y8(e){const t=yN(e);return xN(e)(t.map(v8))}const Qs={test:h8,parse:yN,createTransformer:xN,getAnimatableNone:y8},x8=new Set(["brightness","contrast","saturate","opacity"]);function w8(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(O0)||[];if(!r)return e;const s=n.replace(r,"");let i=x8.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const b8=/\b([a-z-]*)\(.*?\)/gu,Wg={...Qs,getAnimatableNone:e=>{const t=e.match(b8);return t?t.map(w8).join(" "):e}},_8={...y0,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Wg,WebkitFilter:Wg},D0=e=>_8[e];function wN(e,t){let n=D0(e);return n!==Wg&&(n=Qs),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const S8=new Set(["auto","none","0"]);function C8(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!S8.has(i)&&_c(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=wN(n,s)}const Wb=e=>e===Va||e===le,Hb=(e,t)=>parseFloat(e.split(", ")[t]),Kb=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Hb(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Hb(i[1],e):0}},E8=new Set(["x","y","z"]),k8=$a.filter(e=>!E8.has(e));function T8(e){const t=[];return k8.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sa={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Kb(4,13),y:Kb(5,14)};Sa.translateX=Sa.x;Sa.translateY=Sa.y;const Ni=new Set;let Hg=!1,Kg=!1;function bN(){if(Kg){const e=Array.from(Ni).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=T8(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 a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Kg=!1,Hg=!1,Ni.forEach(e=>e.complete()),Ni.clear()}function _N(){Ni.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Kg=!0)})}function P8(){_N(),bN()}class I0{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ni.add(this),Hg||(Hg=!0,qe.read(_N),qe.resolveKeyframes(bN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ni.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ni.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const SN=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),j8=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function R8(e){const t=j8.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function CN(e,t,n=1){const[r,s]=R8(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return SN(o)?parseFloat(o):o}return v0(s)?CN(s,t,n+1):s}const EN=e=>t=>t.test(e),N8={test:e=>e==="auto",parse:e=>e},kN=[Va,le,yr,us,w6,x6,N8],Gb=e=>kN.find(EN(e));class TN extends I0{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 l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),v0(c))){const u=CN(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!rN.has(r)||t.length!==2)return;const[s,i]=t,o=Gb(s),a=Gb(i);if(o!==a)if(Wb(o)&&Wb(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)a8(t[s])&&r.push(s);r.length&&C8(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=Sa[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 t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=Sa[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const qb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qs.test(e)||e==="0")&&!e.startsWith("url("));function A8(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 O8(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=qb(s,t),a=qb(i,t);return!o||!a?!1:A8(e)||(n==="spring"||E0(n))&&r}const M8=e=>e!==null;function yh(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(M8),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const D8=40;class PN{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=xr.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>D8?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&P8(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=xr.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!O8(t,r,s,i))if(o)this.options.duration=0;else{l&&l(yh(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const Xe=(e,t,n)=>e+(t-e)*n;function _p(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 I8({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 a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=_p(l,a,e+1/3),i=_p(l,a,e),o=_p(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function df(e,t){return n=>n>0?t:e}const Sp=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},L8=[zg,vi,Po],F8=e=>L8.find(t=>t.test(e));function Qb(e){const t=F8(e);if(!t)return!1;let n=t.parse(e);return t===Po&&(n=I8(n)),n}const Yb=(e,t)=>{const n=Qb(e),r=Qb(t);if(!n||!r)return df(e,t);const s={...n};return i=>(s.red=Sp(n.red,r.red,i),s.green=Sp(n.green,r.green,i),s.blue=Sp(n.blue,r.blue,i),s.alpha=Xe(n.alpha,r.alpha,i),vi.transform(s))},$8=(e,t)=>n=>t(e(n)),Xc=(...e)=>e.reduce($8),Gg=new Set(["none","hidden"]);function V8(e,t){return Gg.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function U8(e,t){return n=>Xe(e,t,n)}function L0(e){return typeof e=="number"?U8:typeof e=="string"?v0(e)?df:At.test(e)?Yb:W8:Array.isArray(e)?jN:typeof e=="object"?At.test(e)?Yb:B8:df}function jN(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>L0(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function B8(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=L0(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function z8(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],a=e.indexes[o][s[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[i]=l,s[o]++}return r}const W8=(e,t)=>{const n=Qs.createTransformer(t),r=_c(e),s=_c(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?Gg.has(e)&&!s.values.length||Gg.has(t)&&!r.values.length?V8(e,t):Xc(jN(z8(r,
vendor: 5,544 bytes, line 369
369s),s.values),n):df(e,t)};function RN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xe(e,t,n):L0(e)(e,t)}const H8=5;function NN(e,t,n){const r=Math.max(t-H8,0);return sN(n-e(r),t-r)}const st={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},Cp=.001;function K8({duration:e=st.duration,bounce:t=st.bounce,velocity:n=st.velocity,mass:r=st.mass}){let s,i,o=1-t;o=Qr(st.minDamping,st.maxDamping,o),e=Qr(st.minDuration,st.maxDuration,$r(e)),o<1?(s=c=>{const u=c*o,f=u*e,h=u-n,m=qg(c,o),y=Math.exp(-f);return Cp-h/m*y},i=c=>{const f=c*o*e,h=f*n+n,m=Math.pow(o,2)*Math.pow(c,2)*e,y=Math.exp(-f),g=qg(Math.pow(c,2),o);return(-s(c)+Cp>0?-1:1)*((h-m)*y)/g}):(s=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Cp+u*f},i=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=q8(s,i,a);if(e=Fr(e),isNaN(l))return{stiffness:st.stiffness,damping:st.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const G8=12;function q8(e,t,n){let r=n;for(let s=1;s<G8;s++)r=r-e(r)/t(r);return r}function qg(e,t){return e*Math.sqrt(1-t*t)}const Q8=["duration","bounce"],Y8=["stiffness","damping","mass"];function Zb(e,t){return t.some(n=>e[n]!==void 0)}function Z8(e){let t={velocity:st.velocity,stiffness:st.stiffness,damping:st.damping,mass:st.mass,isResolvedFromDuration:!1,...e};if(!Zb(e,Y8)&&Zb(e,Q8))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Qr(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:st.mass,stiffness:s,damping:i}}else{const n=K8(e);t={...t,...n,mass:st.mass},t.isResolvedFromDuration=!0}return t}function AN(e=st.visualDuration,t=st.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],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=Z8({...n,velocity:-$r(n.velocity||0)}),y=h||0,g=c/(2*Math.sqrt(l*u)),w=o-i,x=$r(Math.sqrt(l/u)),v=Math.abs(w)<5;r||(r=v?st.restSpeed.granular:st.restSpeed.default),s||(s=v?st.restDelta.granular:st.restDelta.default);let b;if(g<1){const S=qg(x,g);b=P=>{const T=Math.exp(-g*x*P);return o-T*((y+g*x*w)/S*Math.sin(S*P)+w*Math.cos(S*P))}}else if(g===1)b=S=>o-Math.exp(-x*S)*(w+(y+x*w)*S);else{const S=x*Math.sqrt(g*g-1);b=P=>{const T=Math.exp(-g*x*P),C=Math.min(S*P,300);return o-T*((y+g*x*w)*Math.sinh(C)+S*w*Math.cosh(C))/S}}const _={calculatedDuration:m&&f||null,next:S=>{const P=b(S);if(m)a.done=S>=f;else{let T=0;g<1&&(T=S===0?Fr(y):NN(b,S,P));const C=Math.abs(T)<=r,M=Math.abs(o-P)<=s;a.done=C&&M}return a.value=a.done?o:P,a},toString:()=>{const S=Math.min(YR(_),Vg),P=ZR(T=>_.next(S*T).value,S,30);return S+"ms "+P}};return _}function Xb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=C=>a!==void 0&&C<a||l!==void 0&&C>l,y=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let g=n*t;const w=f+g,x=o===void 0?w:o(w);x!==w&&(g=x-f);const v=C=>-g*Math.exp(-C/r),b=C=>x+v(C),_=C=>{const M=v(C),I=b(C);h.done=Math.abs(M)<=c,h.value=h.done?x:I};let S,P;const T=C=>{m(h.value)&&(S=C,P=AN({keyframes:[h.value,y(h.value)],velocity:NN(b,C,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:u}))};return T(0),{calculatedDuration:null,next:C=>{let M=!1;return!P&&S===void 0&&(M=!0,_(C),T(C)),S!==void 0&&C>=S?P.next(C-S):(!M&&_(C),h)}}}const X8=Zc(.42,0,1,1),J8=Zc(0,0,.58,1),ON=Zc(.42,0,.58,1),e9=e=>Array.isArray(e)&&typeof e[0]!="number",Jb={linear:mn,easeIn:X8,easeInOut:ON,easeOut:J8,circIn:A0,circInOut:hN,circOut:fN,backIn:N0,backInOut:uN,backOut:cN,anticipate:dN},e_=e=>{if(k0(e)){Fg(e.length===4);const[t,n,r,s]=e;return Zc(t,n,r,s)}else if(typeof e=="string")return Fg(Jb[e]!==void 0),Jb[e];return e};function t9(e,t,n){const r=[],s=n||RN,i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||mn:t;a=Xc(l,a)}r.push(a)}return r}function n9(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Fg(i===t.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 a=t9(t,r,s),l=a.length,c=u=>{if(o&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=ba(e[f],e[f+1],u);return a[f](h)};return n?u=>c(Qr(e[0],e[i-1],u)):c}function r9(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ba(0,t,r);e.push(Xe(n,1,s))}}function s9(e){const t=[0];return r9(t,e.length-1),t}function i9(e,t){return e.map(n=>n*t)}function o9(e,t){return e.map(()=>t||ON).splice(0,e.length-1)}function ff({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=e9(r)?r.map(e_):e_(r),i={done:!1,value:t[0]},o=i9(n&&n.length===t.length?n:s9(t),e),a=n9(o,t,{ease:Array.isArray(s)?s:o9(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const a9=e=>{const t=({timestamp:n})=>e(n);return{start:()=>qe.update(t,!0),stop:()=>qs(t),now:()=>St.isProcessing?St.timestamp:xr.now()}},l9={decay:Xb,inertia:Xb,tween:ff,keyframes:ff,spring:AN},c9=e=>e/100;class F0 extends PN{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>
vendor: 4,322 bytes, line 369
369{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||I0,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=E0(n)?n:l9[n]||ff;let l,c;a!==ff&&typeof t[0]!="number"&&(l=Xc(c9,RN(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=YR(u));const{calculatedDuration:f}=u,h=f+s,m=h*(r+1)-s;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:m,repeatType:y,repeatDelay:g,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-h*(this.speed>=0?1:-1),v=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let b=this.currentTime,_=i;if(m){const C=Math.min(this.currentTime,u)/f;let M=Math.floor(C),I=C%1;!I&&C>=1&&(I=1),I===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(y==="reverse"?(I=1-I,g&&(I-=g/f)):y==="mirror"&&(_=o)),b=Qr(0,1,I)*f}const S=v?{done:!1,value:l[0]}:_.next(b);a&&(S.value=a(S.value));let{done:P}=S;!v&&c!==null&&(P=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return T&&s!==void 0&&(S.value=yh(l,this.options,s)),w&&w(S.value),T&&this.finish(),S}get duration(){const{resolved:t}=this;return t?$r(t.calculatedDuration):0}get time(){return $r(this.currentTime)}set time(t){t=Fr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=$r(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=a9,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const u9=new Set(["opacity","clipPath","filter","transform"]);function d9(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:
vendor: 4,145 bytes, line 369
369o="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=JR(a,s);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const f9=c0(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hf=10,h9=2e4;function p9(e){return E0(e.type)||e.type==="spring"||!XR(e.ease)}function m9(e,t){const n=new F0({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<h9;)r=n.sample(i),s.push(r.value),i+=hf;return{times:void 0,keyframes:s,duration:i-hf,ease:"linear"}}const MN={anticipate:dN,backInOut:uN,circInOut:hN};function g9(e){return e in MN}class t_ extends PN{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new TN(i,(o,a)=>this.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&uf()&&g9(i)&&(i=MN[i]),p9(this.options)){const{onComplete:f,onUpdate:h,motionValue:m,element:y,...g}=this.options,w=m9(t,g);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,s=w.times,i=w.ease,o="keyframes"}const u=d9(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(Fb(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;a.set(yh(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return $r(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return $r(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Fr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return mn;const{animation:r}=n;Fb(r,t)}return mn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,element:h,...m}=this.options,y=new F0({...m,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),g=Fr(this.time);c.setWithVelocity(y.sample(g-hf).value,y.sample(g).value,hf)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return f9()&&r&&u9.has(r)&&!l&&!c&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const v9={type:"spring",stiffness:500,damping:25,restSpeed:10},y9=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),x9={type:"keyframes",duration:.8},w9={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},b9=(e,{keyframes:t})=>t.length>2?x9:Xi.has(e)?e.startsWith("scale")?y9(t[1]):v9:w9;function _9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:
vendor: 48,641 bytes, line 369
369o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const $0=(e,t,n,r={},s,i)=>o=>{const a=C0(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-Fr(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};_9(a)||(u={...u,...b9(e,u)}),u.duration&&(u.duration=Fr(u.duration)),u.repeatDelay&&(u.repeatDelay=Fr(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=yh(u.keyframes,a);if(h!==void 0)return qe.update(()=>{u.onUpdate(h),u.onComplete()}),new B6([])}return!i&&t_.supports(u)?new t_(u):new F0(u)};function S9({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function DN(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),m=l[f];if(m===void 0||u&&S9(u,f))continue;const y={delay:n,...C0(o||{},f)};let g=!1;if(window.MotionHandoffAnimation){const x=iN(e);if(x){const v=window.MotionHandoffAnimation(x,f,qe);v!==null&&(y.startTime=v,g=!0)}}Bg(e,f),h.start($0(f,h,m,e.shouldReduceMotion&&rN.has(f)?{type:!1}:y,e,g));const w=h.animation;w&&c.push(w)}return a&&Promise.all(c).then(()=>{qe.update(()=>{a&&n8(e,a)})}),c}function Qg(e,t,n={}){var r;const s=vh(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(DN(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=i;return C9(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[c,u]=l==="beforeChildren"?[o,a]:[a,o];return c().then(()=>u())}else return Promise.all([o(),a(n.delay)])}function C9(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(E9).forEach((c,u)=>{c.notify("AnimationStart",t),o.push(Qg(c,t,{...i,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function E9(e,t){return e.sortNodePosition(t)}function k9(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Qg(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Qg(e,t,n);else{const s=typeof t=="function"?vh(e,t,n.custom):t;r=Promise.all(DN(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const T9=d0.length;function IN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?IN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<T9;n++){const r=d0[n],s=e.props[r];(yc(s)||s===!1)&&(t[r]=s)}return t}const P9=[...u0].reverse(),j9=u0.length;function R9(e){return t=>Promise.all(t.map(({animation:n,options:r})=>k9(e,n,r)))}function N9(e){let t=R9(e),n=n_(),r=!0;const s=l=>(c,u)=>{var f;const h=vh(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:y,...g}=h;c={...c,...g,...y}}return c};function i(l){t=l(e)}function o(l){const{props:c}=e,u=IN(e.parent)||{},f=[],h=new Set;let m={},y=1/0;for(let w=0;w<j9;w++){const x=P9[w],v=n[x],b=c[x]!==void 0?c[x]:u[x],_=yc(b),S=x===l?v.isActive:null;S===!1&&(y=w);let P=b===u[x]&&b!==c[x]&&_;if(P&&r&&e.manuallyAnimateOnMount&&(P=!1),v.protectedKeys={...m},!v.isActive&&S===null||!b&&!v.prevProp||mh(b)||typeof b=="boolean")continue;const T=A9(v.prevProp,b);let C=T||x===l&&v.isActive&&!P&&_||w>y&&_,M=!1;const I=Array.isArray(b)?b:[b];let R=I.reduce(s(x),{});S===!1&&(R={});const{prevResolvedValues:A={}}=v,$={...A,...R},L=H=>{C=!0,h.has(H)&&(M=!0,h.delete(H)),v.needsAnimating[H]=!0;const j=e.getValue(H);j&&(j.liveStyle=!1)};for(const H in $){const j=R[H],O=A[H];if(m.hasOwnProperty(H))continue;let K=!1;$g(j)&&$g(O)?K=!QR(j,O):K=j!==O,K?j!=null?L(H):h.add(H):j!==void 0&&h.has(H)?L(H):v.protectedKeys[H]=!0}v.prevProp=b,v.prevResolvedValues=R,v.isActive&&(m={...m,...R}),r&&e.blockInitialAnimation&&(C=!1),C&&(!(P&&T)||M)&&f.push(...I.map(H=>({animation:H,options:{type:x}})))}if(h.size){const w={};h.forEach(x=>{const v=e.getBaseTarget(x),b=e.getValue(x);b&&(b.liveStyle=!0),w[x]=v??null}),f.push({animation:w})}let g=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=n_(),r=!0}}}function A9(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!QR(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function n_(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}class ni{constructor(t){this.isMounted=!1,this.node=t}update(){}}class O9 extends ni{constructor(t){super(t),t.animationState||(t.animationState=N9(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();mh(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===void 0||t.call(this)}}let M9=0;class D9 extends ni{constructor(){super(...arguments),this.id=M9++}update(){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;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const I9={animation:{Feature:O9},exit:{Feature:D9}};function Sc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Jc(e){return{point:{x:e.pageX,y:e.pageY}}}const L9=e=>t=>T0(t)&&e(t,Jc(t));function Ll(e,t,n,r){return Sc(e,t,L9(n),r)}const r_=(e,t)=>Math.abs(e-t);function F9(e,t){const n=r_(e.x,t.x),r=r_(e.y,t.y);return Math.sqrt(n**2+r**2)}class LN{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=kp(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=F9(f.offset,{x:0,y:0})>=3;if(!h&&!m)return;const{point:y}=f,{timestamp:g}=St;this.history.push({...y,timestamp:g});const{onStart:w,onMove:x}=this.handlers;h||(w&&w(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Ep(h,this.transformPagePoint),qe.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=kp(f.type==="pointercancel"?this.lastMoveEventInfo:Ep(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,w),y&&y(f,w)},!T0(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Jc(t),a=Ep(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=St;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,kp(a,this.history)),this.removeListeners=Xc(Ll(this.contextWindow,"pointermove",this.handlePointerMove),Ll(this.contextWindow,"pointerup",this.handlePointerUp),Ll(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qs(this.updatePoint)}}function Ep(e,t){return t?{point:t(e.point)}:e}function s_(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kp({point:e},t){return{point:e,delta:s_(e,FN(t)),offset:s_(e,$9(t)),velocity:V9(t,.1)}}function $9(e){return e[0]}function FN(e){return e[e.length-1]}function V9(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=FN(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Fr(t)));)n--;if(!r)return{x:0,y:0};const i=$r(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}const $N=1e-4,U9=1-$N,B9=1+$N,VN=.01,z9=0-VN,W9=0+VN;function Vt(e){return e.max-e.min}function H9(e,t,n){return Math.abs(e-t)<=n}function i_(e,t,n,r=.5){e.origin=r,e.originPoint=Xe(t.min,t.max,e.origin),e.scale=Vt(n)/Vt(t),e.translate=Xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=U9&&e.scale<=B9||isNaN(e.scale))&&(e.scale=1),(e.translate>=z9&&e.translate<=W9||isNaN(e.translate))&&(e.translate=0)}function Fl(e,t,n,r){i_(e.x,t.x,n.x,r?r.originX:void 0),i_(e.y,t.y,n.y,r?r.originY:void 0)}function o_(e,t,n){e.min=n.min+t.min,e.max=e.min+Vt(t)}function K9(e,t,n){o_(e.x,t.x,n.x),o_(e.y,t.y,n.y)}function a_(e,t,n){e.min=t.min-n.min,e.max=e.min+Vt(t)}function $l(e,t,n){a_(e.x,t.x,n.x),a_(e.y,t.y,n.y)}function G9(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Xe(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Xe(n,e,r.max):Math.min(e,n)),e}function l_(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 q9(e,{top:t,left:n,bottom:r,right:s}){return{x:l_(e.x,n,s),y:l_(e.y,t,r)}}function c_(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 Q9(e,t){return{x:c_(e.x,t.x),y:c_(e.y,t.y)}}function Y9(e,t){let n=.5;const r=Vt(e),s=Vt(t);return s>r?n=ba(t.min,t.max-r,e.min):r>s&&(n=ba(e.min,e.max-s,t.min)),Qr(0,1,n)}function Z9(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 Yg=.35;function X9(e=Yg){return e===!1?e=0:e===!0&&(e=Yg),{x:u_(e,"left","right"),y:u_(e,"top","bottom")}}function u_(e,t,n){return{min:d_(e,t),max:d_(e,n)}}function d_(e,t){return typeof e=="number"?e:e[t]||0}const f_=()=>({translate:0,scale:1,origin:0,originPoint:0}),jo=()=>({x:f_(),y:f_()}),h_=()=>({min:0,max:0}),at=()=>({x:h_(),y:h_()});function wn(e){return[e("x"),e("y")]}function UN({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function J9({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eW(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 Tp(e){return e===void 0||e===1}function Zg({scale:e,scaleX:t,scaleY:n}){return!Tp(e)||!Tp(t)||!Tp(n)}function ci(e){return Zg(e)||BN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function BN(e){return p_(e.x)||p_(e.y)}function p_(e){return e&&e!=="0%"}function pf(e,t,n){const r=e-n,s=t*r;return n+s}function m_(e,t,n,r,s){return s!==void 0&&(e=pf(e,s,r)),pf(e,n,r)+t}function Xg(e,t=0,n=1,r,s){e.min=m_(e.min,t,n,r,s),e.max=m_(e.max,t,n,r,s)}function zN(e,{x:t,y:n}){Xg(e.x,t.translate,t.scale,t.originPoint),Xg(e.y,n.translate,n.scale,n.originPoint)}const g_=.999999999999,v_=1.0000000000001;function tW(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;a<s;a++){i=n[a],o=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&No(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,zN(e,o)),r&&ci(i.latestValues)&&No(e,i.latestValues))}t.x<v_&&t.x>g_&&(t.x=1),t.y<v_&&t.y>g_&&(t.y=1)}function Ro(e,t){e.min=e.min+t,e.max=e.max+t}function y_(e,t,n,r,s=.5){const i=Xe(e.min,e.max,s);Xg(e,t,n,i,r)}function No(e,t){y_(e.x,t.x,t.scaleX,t.scale,t.originX),y_(e.y,t.y,t.scaleY,t.scale,t.originY)}function WN(e,t){return UN(eW(e.getBoundingClientRect(),t))}function nW(e,t,n){const r=WN(e,n),{scroll:s}=t;return s&&(Ro(r.x,s.offset.x),Ro(r.y,s.offset.y)),r}const HN=({current:e})=>e?e.ownerDocument.defaultView:null,rW=new WeakMap;class sW{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=at(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Jc(u).point)},i=(u,f)=>{const{drag:h,dragPropagation:m,onDragStart:y}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Z6(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),wn(w=>{let x=this.getAxisMotionValue(w).get()||0;if(yr.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const b=v.layout.layoutBox[w];b&&(x=Vt(b)*(parseFloat(x)/100))}}this.originPoint[w]=x}),y&&qe.postRender(()=>y(u,f)),Bg(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(u,f)=>{const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:w}=f;if(m&&this.currentDirection===null){this.currentDirection=iW(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,w),this.updateAxis("y",f.point,w),this.visualElement.render(),g&&g(u,f)},a=(u,f)=>this.stop(u,f),l=()=>wn(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new LN(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:HN(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&qe.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Lu(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=G9(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&To(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=q9(s.layoutBox,n):this.constraints=!1,this.elastic=X9(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&wn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Z9(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!To(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=nW(r,s.root,this.visualElement.getTransformPagePoint());let o=Q9(s.layout.layoutBox,i);if(n){const a=n(J9(o));this.hasMutatedConstraints=!!a,a&&(o=UN(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=wn(u=>{if(!Lu(u,n,this.currentDirection))return;let f=l&&l[u]||{};o&&(f={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Bg(this.visualElement,t),r.start($0(t,r,0,n,this.visualElement,!1))}stopAnimation(){wn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){wn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}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){wn(n=>{const{drag:r}=this.getProps();if(!Lu(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-Xe(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!To(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};wn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=Y9({min:l,max:l},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.resolveConstraints(),wn(o=>{if(!Lu(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(Xe(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;rW.set(this.visualElement,this);const t=this.visualElement.current,n=Ll(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();To(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),qe.read(r);const o=Sc(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(wn(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Yg,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Lu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function iW(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class oW extends ni{constructor(t){super(t),this.removeGroupControls=mn,this.removeListeners=mn,this.controls=new sW(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mn}unmount(){this.removeGroupControls(),this.removeListeners()}}const x_=e=>(t,n)=>{e&&qe.postRender(()=>e(t,n))};class aW extends ni{constructor(){super(...arguments),this.removePointerDownListener=mn}onPointerDown(t){this.session=new LN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:HN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:x_(t),onStart:x_(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&qe.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Ll(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const id={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function w_(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const il={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=w_(e,t.target.x),r=w_(e,t.target.y);return`${n}% ${r}%`}},lW={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Qs.parse(e);if(s.length>5)return r;const i=Qs.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const c=Xe(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),i(s)}};class cW extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;R6(uW),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),id.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||qe.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),h0.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;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 KN(e){const[t,n]=Hz(),r=p.useContext(RR);return d.jsx(cW,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(LR),isPresent:t,safeToRemove:n})}const uW={borderRadius:{...il,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:il,borderTopRightRadius:il,borderBottomLeftRadius:il,borderBottomRightRadius:il,boxShadow:lW};function dW(e,t,n){const r=Mt(e)?e:bc(e);return r.start($0("",r,t,n)),r.animation}function fW(e){return e instanceof SVGElement&&e.tagName!=="svg"}const hW=(e,t)=>e.depth-t.depth;class pW{constructor(){this.children=[],this.isDirty=!1}add(t){P0(this.children,t),this.isDirty=!0}remove(t){j0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(hW),this.isDirty=!1,this.children.forEach(t)}}function mW(e,t){const n=xr.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(qs(r),e(i-t))};return qe.read(r,!0),()=>qs(r)}const GN=["TopLeft","TopRight","BottomLeft","BottomRight"],gW=GN.length,b_=e=>typeof e=="string"?parseFloat(e):e,__=e=>typeof e=="number"||le.test(e);function vW(e,t,n,r,s,i){s?(e.opacity=Xe(0,n.opacity!==void 0?n.opacity:1,yW(r)),e.opacityExit=Xe(t.opacity!==void 0?t.opacity:1,0,xW(r))):i&&(e.opacity=Xe(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<gW;o++){const a=`border${GN[o]}Radius`;let l=S_(t,a),c=S_(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||__(l)===__(c)?(e[a]=Math.max(Xe(b_(l),b_(c),r),0),(yr.test(c)||yr.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=Xe(t.rotate||0,n.rotate||0,r))}function S_(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const yW=qN(0,.5,fN),xW=qN(.5,.95,mn);function qN(e,t,n){return r=>r<e?0:r>t?1:n(ba(e,t,r))}function C_(e,t){e.min=t.min,e.max=t.max}function xn(e,t){C_(e.x,t.x),C_(e.y,t.y)}function E_(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function k_(e,t,n,r,s){return e-=t,e=pf(e,1/n,r),s!==void 0&&(e=pf(e,1/s,r)),e}function wW(e,t=0,n=1,r=.5,s,i=e,o=e){if(yr.test(t)&&(t=parseFloat(t),t=Xe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=Xe(i.min,i.max,r);e===i&&(a-=t),e.min=k_(e.min,t,n,a,s),e.max=k_(e.max,t,n,a,s)}function T_(e,t,[n,r,s],i,o){wW(e,t[n],t[r],t[s],t.scale,i,o)}const bW=["x","scaleX","originX"],_W=["y","scaleY","originY"];function P_(e,t,n,r){T_(e.x,t,bW,n?n.x:void 0,r?r.x:void 0),T_(e.y,t,_W,n?n.y:void 0,r?r.y:void 0)}function j_(e){return e.translate===0&&e.scale===1}function QN(e){return j_(e.x)&&j_(e.y)}function R_(e,t){return e.min===t.min&&e.max===t.max}function SW(e,t){return R_(e.x,t.x)&&R_(e.y,t.y)}function N_(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function YN(e,t){return N_(e.x,t.x)&&N_(e.y,t.y)}function A_(e){return Vt(e.x)/Vt(e.y)}function O_(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CW{constructor(){this.members=[]}add(t){P0(this.members,t),t.scheduleRender()}remove(t){if(j0(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){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EW(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:c,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const ui={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},wl=typeof window<"u"&&window.MotionDebug!==void 0,Pp=["","X","Y","Z"],kW={visibility:"hidden"},M_=1e3;let TW=0;function jp(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ZN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=iN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",qe,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ZN(r)}function XN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=TW++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,wl&&(ui.totalNodes=ui.resolvedTargetDeltas=ui.recalculatedProjection=0),this.nodes.forEach(RW),this.nodes.forEach(DW),this.nodes.forEach(IW),this.nodes.forEach(NW),wl&&window.MotionDebug.record(ui)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new pW)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new R0),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=fW(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),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=mW(h,250),id.hasAnimatedSinceResize&&(id.hasAnimatedSinceResize=!1,this.nodes.forEach(I_))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||UW,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!YN(this.targetLayout,y),b=!h&&m;if(this.options.layoutRoot||this.resumeFrom||b||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const _={...C0(g,"layout"),onPlay:w,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_)}else h||I_(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}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,qs(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(LW),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&&ZN(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(D_);return}this.isUpdating||this.nodes.forEach(OW),this.isUpdating=!1,this.nodes.forEach(MW),this.nodes.forEach(PW),this.nodes.forEach(jW),this.clearAllSnapshots();const a=xr.now();St.delta=Qr(0,1e3/60,a-St.timestamp),St.timestamp=a,St.isProcessing=!0,xp.update.process(St),xp.preRender.process(St),xp.render.process(St),St.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,h0.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(AW),this.sharedNodes.forEach(FW)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,qe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){qe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Vt(this.snapshot.measuredBox.x)&&!Vt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=at(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!QN(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&(a||ci(this.latestValues)||u)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),BW(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return at();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(zW))){const{scroll:u}=this.root;u&&(Ro(l.x,u.offset.x),Ro(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=at();if(xn(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&xn(l,o),Ro(l.x,f.offset.x),Ro(l.y,f.offset.y))}return l}applyTransform(o,a=!1){const l=at();xn(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&No(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ci(u.latestValues)&&No(l,u.latestValues)}return ci(this.latestValues)&&No(l,this.latestValues),l}removeTransform(o){const a=at();xn(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ci(c.latestValues))continue;Zg(c.latestValues)&&c.updateSnapshot();const u=at(),f=c.measurePageBox();xn(u,f),P_(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ci(this.latestValues)&&P_(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==St.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;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||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=St.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),$l(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=at(),this.targetWithTransforms=at()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),K9(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):xn(this.target,this.layout.layoutBox),zN(this.target,this.targetDelta)):xn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=at(),this.relativeTargetOrigin=at(),$l(this.relativeTargetOrigin,this.target,m.target),xn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}wl&&ui.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Zg(this.parent.latestValues)||BN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===St.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=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||f))return;xn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;tW(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=at());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(E_(this.prevProjectionDelta.x,this.projectionDelta.x),E_(this.prevProjectionDelta.y,this.projectionDelta.y)),Fl(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!O_(this.projectionDelta.x,this.prevProjectionDelta.x)||!O_(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),wl&&ui.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=jo(),this.projectionDelta=jo(),this.projectionDeltaWithTransform=jo()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=jo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=at(),m=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=m!==y,w=this.getStack(),x=!w||w.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(VW));this.animationProgress=0;let b;this.mixTargetDelta=_=>{const S=_/1e3;L_(f.x,o.x,S),L_(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$W(this.relativeTarget,this.relativeTargetOrigin,h,S),b&&SW(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=at()),xn(b,this.relativeTarget)),g&&(this.animationValues=u,vW(u,c,this.latestValues,S,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(qs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qe.update(()=>{id.hasAnimatedSinceResize=!0,this.currentAnimation=dW(0,M_,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(M_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&JN(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||at();const f=Vt(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Vt(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}xn(a,l),No(a,u),Fl(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new CW),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&jp("z",o,c,this.animationValues);for(let u=0;u<Pp.length;u++)jp(`rotate${Pp[u]}`,o,c,this.animationValues),jp(`skew${Pp[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return kW;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=rd(o==null?void 0:o.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=rd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ci(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=EW(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:m,y}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in wc){if(h[g]===void 0)continue;const{correct:w,applyTo:x,isCSSVariable:v}=wc[g],b=c.transform==="none"?h[g]:w(h[g],f);if(x){const _=x.length;for(let S=0;S<_;S++)c[x[S]]=b}else v?this.options.visualElement.renderState.vars[g]=b:c[g]=b}return this.options.layoutId&&(c.pointerEvents=f===this?rd(o==null?void 0:o.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(D_),this.root.sharedNodes.clear()}}}function PW(e){e.updateLayout()}function jW(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?wn(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],m=Vt(h);h.min=r[f].min,h.max=h.min+m}):JN(i,n.layoutBox,r)&&wn(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],m=Vt(r[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=jo();Fl(a,r,n.layoutBox);const l=jo();o?Fl(l,e.applyTransform(s,!0),n.measuredBox):Fl(l,r,n.layoutBox);const c=!QN(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const y=at();$l(y,n.layoutBox,h.layoutBox);const g=at();$l(g,r,m.layoutBox),YN(y,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function RW(e){wl&&ui.totalNodes++,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 NW(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function AW(e){e.clearSnapshot()}function D_(e){e.clearMeasurements()}function OW(e){e.isLayoutDirty=!1}function MW(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function I_(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function DW(e){e.resolveTargetDelta()}function IW(e){e.calcProjection()}
vendor: 6,603 bytes, line 369
369function LW(e){e.resetSkewAndRotation()}function FW(e){e.removeLeadSnapshot()}function L_(e,t,n){e.translate=Xe(t.translate,0,n),e.scale=Xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function F_(e,t,n,r){e.min=Xe(t.min,n.min,r),e.max=Xe(t.max,n.max,r)}function $W(e,t,n,r){F_(e.x,t.x,n.x,r),F_(e.y,t.y,n.y,r)}function VW(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const UW={duration:.45,ease:[.4,0,.1,1]},$_=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),V_=$_("applewebkit/")&&!$_("chrome/")?Math.round:mn;function U_(e){e.min=V_(e.min),e.max=V_(e.max)}function BW(e){U_(e.x),U_(e.y)}function JN(e,t,n){return e==="position"||e==="preserve-aspect"&&!H9(A_(t),A_(n),.2)}function zW(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const WW=XN({attachResizeListener:(e,t)=>Sc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rp={current:void 0},eA=XN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Rp.current){const e=new WW({});e.mount(window),e.setOptions({layoutScroll:!0}),Rp.current=e}return Rp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),HW={pan:{Feature:aW},drag:{Feature:oW,ProjectionNode:eA,MeasureLayout:KN}};function B_(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&&qe.postRender(()=>i(t,Jc(t)))}class KW extends ni{mount(){const{current:t}=this.node;t&&(this.unmount=K6(t,(n,r)=>(B_(this.node,r,"Start"),s=>B_(this.node,s,"End"))))}unmount(){}}class GW extends ni{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=Xc(Sc(this.node.current,"focus",()=>this.onFocus()),Sc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function z_(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&qe.postRender(()=>i(t,Jc(t)))}class qW extends ni{mount(){const{current:t}=this.node;t&&(this.unmount=Y6(t,(n,r)=>(z_(this.node,r,"Start"),(s,{success:i})=>z_(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jg=new WeakMap,Np=new WeakMap,QW=e=>{const t=Jg.get(e.target);t&&t(e)},YW=e=>{e.forEach(QW)};function ZW({root:e,...t}){const n=e||document;Np.has(n)||Np.set(n,{});const r=Np.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(YW,{root:e,...t})),r[s]}function XW(e,t,n){const r=ZW(t);return Jg.set(e,n),r.observe(e),()=>{Jg.delete(e),r.unobserve(e)}}const JW={some:0,all:1};class eH extends ni{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();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:JW[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return XW(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tH(t,n))&&this.startObserver()}unmount(){}}function tH({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nH={inView:{Feature:eH},tap:{Feature:qW},focus:{Feature:GW},hover:{Feature:KW}},rH={layout:{ProjectionNode:eA,MeasureLayout:KN}},ev={current:null},tA={current:!1};function sH(){if(tA.current=!0,!!l0)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ev.current=e.matches;e.addListener(t),t()}else ev.current=!1}const iH=[...kN,At,Qs],oH=e=>iH.find(EN(e)),W_=new WeakMap;function aH(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Mt(s))e.addValue(r,s);else if(Mt(i))e.addValue(r,bc(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,bc(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const H_=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=I0,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=xr.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,qe.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=gh(n),this.isVariantNode=DR(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&Mt(y)&&y.set(l[m],!1)}}mount(t){this.current=t,W_.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.forEac
vendor: 6,244 bytes, line 369
369h((n,r)=>this.bindToMotionValue(r,n)),tA.current||sH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ev.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){W_.delete(this.current),this.projection&&this.projection.unmount(),qs(this.notifyUpdate),qs(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Xi.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&qe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),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 _a){const n=_a[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):at()}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<H_.length;r++){const s=H_[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=aH(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}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=bc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(SN(s)||pN(s))?s=parseFloat(s):!oH(s)&&Qs.test(n)&&(s=wN(t,n)),this.setBaseTarget(t,Mt(s)?s.get():s)),Mt(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=m0(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Mt(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new R0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class nA extends lH{constructor(){super(...arguments),this.KeyframeResolver=TN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;Mt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function cH(e){return window.getComputedStyle(e)}class uH extends nA{constructor(){super(...arguments),this.type="html",this.renderInstance=zR}readValueFromInstance(t,n){if(Xi.has(n)){const r=D0(n);return r&&r.default||0}else{const r=cH(t),s=(g0(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return WN(t,n)}build(t,n,r){x0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return S0(t,n,r)}}class dH extends nA{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=at}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xi.has(n)){const r=D0(n);return r&&r.default||0}return n=WR.has(n)?n:f0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return GR(t,n,r)}build(t,n,r){w0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){HR(t,n,r,s)}mount(t){this.isSVGTag=_0(t.tagName),super.mount(t)}}const fH=(e,t)=>p0(e)?new dH(t):new uH(t,{allowProjection:e!==p.Fragment}),hH=$6({...I9,...nH,...HW,...rH},fH),K_=e6(hH),pH=()=>d.jsx("section",{className:"py-16 px-4 -mx-8 bg-gradient-to-b from-background to-muted",children:d.jsxs("div",{className:"container mx-auto max-w-4xl",children:[d.jsxs(K_.div,{initial:{opacity:0,y:20}
369,animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-16",children:[d.jsx("h2",{className:"text-3xl font-bold mb-6",children:"Why Toolio?"}),d.jsxs("p",{className:"text-muted-foreground leading-relaxed mb-8",children:["With over ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"3,992,222 websites"})," created every day â that's about ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"46 new websites per second"})," â the internet is growing faster than we can keep up. But with so many websites popping up, how do you know which ones are truly useful? How do you filter through the noise to find the gems that can help you work smarter, learn faster, or create something amazing?"]}),d.jsxs("p",{className:"text-muted-foreground leading-relaxed",children:["I often find myself compiling lists of all the cool sites I come across, only to have them get lost in a sea of bookmarks. That's where ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"Toolio"})," comes in. Toolio is designed to be the ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"central point of truth"})," for the best, most useful websites on the internet. We aim to be the",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"global online repository"})," for curated, valuable sites, with transparent information about whether they're free, paid, or somewhere in between. Toolio is that place â a place where the world's knowledge and useful tools come together in one easily accessible spot."]})]}),d.jsxs(K_.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:[d.jsx("h2",{className:"text-3xl font-bold mb-8 text-center",children:"What's Next for Toolio?"}),d.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[d.jsxs(vr,{className:"p-6 hover:shadow-lg transition-shadow",children:[d.jsx(wE,{className:"w-12 h-12 mb-4 text-primary mx-auto"}),d.jsx("h3",{className:"text-xl font-semibold mb-3",children:"Step 1: Growing the Repo"}),d.jsxs("p",{className:"text-muted-foreground",children:["Our goal is to build a ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"global, ever-expanding database"})," of the most useful websites across every category. But we can't do it alone. That's why we're inviting the Toolio community to submit cool sites that they believe are worth sharing. The more people involved, the richer the repository becomes."]})]}),d.jsxs(vr,{className:"p-6 hover:shadow-lg transition-shadow",children:[d.jsx(PI,{className:"w-12 h-12 mb-4 text-primary mx-auto"}),d.jsx("h3",{className:"text-xl font-semibold mb-3",children:"Step 2: Community Voting"}),d.jsxs("p",{className:"text-muted-foreground",children:["As Toolio grows, we need to ensure the sites we feature maintain their quality and usefulness. That's why ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"community voting"})," will play a pivotal role in deciding which sites rise to the top. Every member of the Toolio community will have a say in what gets featured, ensuring that only the most impactful sites make it to the spotlight."]})]}),d.jsxs(vr,{className:"p-6 hover:shadow-lg transition-shadow",children:[d.jsx(xE,{className:"w-12 h-12 mb-4 text-primary mx-auto"}),d.jsx("h3",{className:"text-xl font-semibold mb-3",children:"Step 3: Toolio Coin"}),d.jsxs("p",{className:"text-muted-foreground",children:["We're also excited to announce ",d.jsx("span",{className:"font-semibold px-1 rounded animate-glow",children:"Toolio Coin (ERC20)"}),", a new token that will reward our contributors. When you submit sites, you'll be eligible for a share of the airdrop based on how many sites you've contributed. The more you contribute, the greater your stake in Toolio's growth and success."]})]})]})]})]})}),mH=()=>d.jsx(pH,{}),gH=()=>{const e=Pa(),[t,n]=p.useState(null),[r,s]=p.useState(!0);p.useEffect(()=>{(async()=>{try{const{data:f}=await be.auth.getSession();if(!f.session){Fe.error("Please login to view your profile"),e("/login");return}n(f.session.user.email),s(!1)}catch(f){console.error("Auth error:",f),Fe.error("Authentication error"),e("/login")}})();const{data:{subscription:u}}=be.auth.onAuthStateChange((f,h)=>
369{f==="SIGNED_OUT"||!h?e("/login"):h&&(n(h.user.email),s(!1))});return()=>{u.unsubscribe()}},[e]);const{data:i,isLoading:o}=On({queryKey:["userSubmittedSites"],queryFn:async()=>{const{data:c}=await be.auth.getSession();if(!c.session)return[];const{data:u}=await be.from("websites").select("*").eq("created_by",c.session.user.id).eq("approval_status","approved");return u||[]},enabled:!!t});if(r||o)return d.jsx("div",{className:"container max-w-4xl py-8",children:d.jsx("div",{className:"flex items-center justify-center",children:"Loading..."})});const a=(i==null?void 0:i.length)||0,l=a;return d.jsxs("div",{className:"container max-w-4xl py-8",children:[d.jsx("h1",{className:"text-4xl font-bold mb-8",children:"My Profile"}),d.jsxs("div",{className:"grid gap-6",children:[d.jsxs(vr,{children:[d.jsxs(Ti,{children:[d.jsx(Pi,{children:"Account Information"}),d.jsx(ji,{children:"Your basic account details"})]}),d.jsx(Ri,{children:d.jsxs("div",{className:"space-y-2",children:[d.jsx("p",{className:"text-sm text-muted-foreground",children:"Email"}),d.jsx("p",{className:"font-medium",children:t})]})})]}),d.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[d.jsxs(vr,{children:[d.jsxs(Ti,{children:[d.jsxs(Pi,{className:"flex items-center gap-2",children:[d.jsx(iI,{className:"h-5 w-5 text-primary"}),"Points Earned"]}),d.jsx(ji,{children:"Based on approved submissions"})]}),d.jsxs(Ri,{children:[d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsx("span",{className:"text-3xl font-bold",children:a}),d.jsx("span",{className:"text-muted-foreground",children:"points"})]}),d.jsxs("div",{className:"mt-4 flex items-center gap-2",children:[d.jsx(wE,{className:"h-4 w-4 text-muted-foreground"}),d.jsxs("span",{className:"text-sm text-muted-foreground",children:[(i==null?void 0:i.length)||0," approved submissions"]})]})]})]}),d.jsxs(vr,{children:[d.jsxs(Ti,{children:[d.jsxs(Pi,{className:"flex items-center gap-2",children:[d.jsx(xE,{className:"h-5 w-5 text-primary"}),"Toolio Coins"]}),d.jsx(ji,{children:"Your reward tokens"})]}),d.jsxs(Ri,{children:[d.jsxs("div",{className:"flex items-baseline gap-2",children:[d.jsxs("span",{className:"text-3xl font-bold text-muted-foreground",children:[d.jsx(gI,{className:"h-6 w-6 inline-block mr-2"}),l]}),d.jsx("span",{className:"text-muted-foreground",children:"TOOLIO"})]}),d.jsxs("div",{className:"mt-4 space-y-2",children:[d.jsx(Ee,{variant:"outline",disabled:!0,className:"w-full",children:"Connect Wallet"}),d.jsx(Ee,{variant:"outline",disabled:!0,className:"w-full",children:"Claim Tokens"})]})]})]})]})]})]})},vH=new HM({defaultOptions:{queries:{staleTime:1e3*60*5,gcTime:1e3*60*10,refetchOnWindowFocus:!1,refetchOnReconnect:"always",refetchIntervalInBackground:!1,retry:(e,t)=>{var n,r;return(n=t==null?void 0:t.message)!=null&&n.includes("not found")||(r=t==null?void 0:t.message)!=null&&r.includes("unauthorized")?!1:e<2}},mutations:{retry:1,networkMode:"online"}}}),yH=()=>d.jsx(YM,{client:vH,children:d.jsx(z4,{defaultTheme:"system",attribute:"class",enableSystem:!0,children:d.jsx(TM,{children:d.jsxs(_y,{children:[d.jsx(Fk,{children:d.jsxs("div",{className:"min-h-screen flex w-full",children:[d.jsx(oz,{}),d.jsxs("div",{className:"flex-1 flex flex-col w-full transition-all duration-200",children:[d.jsx(tz,{}),d.jsx("main",{className:"flex-1 container transition-all duration-200",children:d.jsxs(wM,{children:[d.jsx(is,{path:"/",element:d.jsx(vz,{})}),d.jsx(is,{path:"/category/:category",element:d.jsx(yz,{})}),d.jsx(is,{path:"/website/:id",element:d.jsx(_z,{})}),d.jsx(is,{path:"/login",element:d.jsx(Tz,{})}),d.jsx(is,{path:"/admin",element:d.jsx(zz,{})}),d.jsx(is,{path:"/about",element:d.jsx(mH,{})}),d.jsx(is,{path:"/profile",element:d.jsx(gH,{})})]})}),d.jsx(lz,{})]})]})}),d.jsx(dL,{}),d.jsx(DL,{})]})})})}),rA=document.getElementById("root");if(!rA)throw new Error("Root element not found");const xH=yC(rA);xH.render(d.jsx(p.StrictMode,{children:d.jsx(yH,{})}));export{r1 as g};
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.