vendor: 4,703 bytes, lines 1-9
1var ax=e=>{throw TypeError(e)};var ep=(e,t,n)=>t.has(e)||ax("Cannot "+n);var P=(e,t,n)=>(ep(e,t,"read from private field"),n?n.call(e):t.get(e)),xe=(e,t,n)=>t.has(e)?ax("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ie=(e,t,n,r)=>(ep(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Oe=(e,t,n)=>(ep(e,t,"access private method"),n);var zu=(e,t,n,r)=>({set _(s){ie(e,t,s,n)},get _(){return P(e,t,r)}});function oR(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 nr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function C_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function aR(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 T_={exports:{}},tf={},k_={exports:{}},Re={};/** 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 vu=Symbol.for("react.element"),lR=Symbol.for("react.portal"),cR=Symbol.for("react.fragment"),uR=Symbol.for("react.strict_mode"),dR=Symbol.for("react.profiler"),hR=Symbol.for("react.provider"),fR=Symbol.for("react.context"),pR=Symbol.for("react.forward_ref"),mR=Symbol.for("react.suspense"),gR=Symbol.for("react.memo"),vR=Symbol.for("react.lazy"),lx=Symbol.iterator;function yR(e){return e===null||typeof e!="object"?null:(e=lx&&e[lx]||e["@@iterator"],typeof e=="function"?e:null)}var j_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},P_=Object.assign,A_={};function tl(e,t,n){this.props=e,this.context=t,this.refs=A_,this.updater=n||j_}tl.prototype.isReactComponent={};tl.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")};tl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function R_(){}R_.prototype=tl.prototype;function Cv(e,t,n){this.props=e,this.context=t,this.refs=A_,this.updater=n||j_}var Tv=Cv.prototype=new R_;Tv.constructor=Cv;P_(Tv,tl.prototype);Tv.isPureReactComponent=!0;var cx=Array.isArray,N_=Object.prototype.hasOwnProperty,kv={current:null},O_={key:!0,ref:!0,__self:!0,__source:!0};function I_(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)N_.call(t,r)&&!O_.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),u=0;u<a;u++)l[u]=arguments[u+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:vu,type:e,key:i,ref:o,props:s,_owner:kv.current}}function xR(e,t){return{$$typeof:vu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function jv(e){return typeof e=="object"&&e!==null&&e.$$typeof===vu}function wR(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ux=/\/+/g;function tp(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wR(""+e.key):t.toString(36)}
vendor: 4,786 bytes, lines 9-17
9function Nd(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 vu:case lR:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+tp(o,0):r,cx(s)?(n="",e!=null&&(n=e.replace(ux,"$&/")+"/"),Nd(s,t,n,"",function(u){return u})):s!=null&&(jv(s)&&(s=xR(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(ux,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",cx(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+tp(i,a);o+=Nd(i,t,n,l,s)}else if(l=yR(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+tp(i,a++),o+=Nd(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 Hu(e,t,n){if(e==null)return e;var r=[],s=0;return Nd(e,r,"","",function(i){return t.call(n,i,s++)}),r}function bR(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 hn={current:null},Od={transition:null},SR={ReactCurrentDispatcher:hn,ReactCurrentBatchConfig:Od,ReactCurrentOwner:kv};function L_(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Hu,forEach:function(e,t,n){Hu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hu(e,function(){t++}),t},toArray:function(e){return Hu(e,function(t){return t})||[]},only:function(e){if(!jv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=tl;Re.Fragment=cR;Re.Profiler=dR;Re.PureComponent=Cv;Re.StrictMode=uR;Re.Suspense=mR;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SR;Re.act=L_;Re.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=P_({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=kv.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)N_.call(t,l)&&!O_.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 u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:vu,type:e.type,key:s,ref:i,props:r,_owner:o}};Re.createContext=function(e){return e={$$typeof:fR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:hR,_context:e},e.Consumer=e};Re.createElement=I_;Re.createFactory=function(e){var t=I_.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:pR,render:e}};Re.isValidElement=jv;Re.lazy=function(e){return{$$typeof:vR,_payload:{_status:-1,_result:e},_init:bR}};Re.memo=function(e,t){return{$$typeof:gR,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Od.transition;Od.transition={};try{e()}finally{Od.transition=t}};Re.unstable_act=L_;Re.useCallback=function(e,t){return hn.current.useCallback(e,t)};Re.useContext=function(e){return hn.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return hn.current.useDeferredValue(e)};Re.useEffect=function(e,t){return hn.current.useEffect(e,t)};Re.useId=function(){return hn.current.useId()};Re.useImperativeHandle=function(e,t,n){return hn.current.useImperativeHandle(e,t,n)};Re.useInsertionEffect=function(e,t){return hn.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return hn.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return hn.current.useMemo(e,t)};Re.useReducer=function(e,t,n){return hn.current.useReducer(e,t,n)};Re.useRef=function(e){return hn.current.useRef(e)};Re.useState=function(e){return hn.current.useState(e)};Re.useSyncExternalStore=function(e,t,n){return hn.current.useSyncExternalStore(e,t,n)};Re.useTransition=function(){return hn.current.useTransition()};Re.version="18.3.1";k_.exports=Re;var p=k_.exports;const M=C_(p),D_=oR({__proto__:null,default:M},[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 _R=p,ER=Symbol.for("react.element"),CR=Symbol.for("react.fragment"),TR=Object.prototype.hasOwnProperty,kR=_R.__SECRET_INT
vendor: 11,437 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jR={key:!0,ref:!0,__self:!0,__source:!0};function M_(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)TR.call(t,r)&&!jR.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:ER,type:e,key:i,ref:o,props:s,_owner:kR.current}}tf.Fragment=CR;tf.jsx=M_;tf.jsxs=M_;T_.exports=tf;var c=T_.exports,F_={exports:{}},Bn={},$_={exports:{}},V_={};/** 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(R,$){var J=R.length;R.push($);e:for(;0<J;){var Q=J-1>>>1,oe=R[Q];if(0<s(oe,$))R[Q]=$,R[J]=oe,J=Q;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var $=R[0],J=R.pop();if(J!==$){R[0]=J;e:for(var Q=0,oe=R.length,ae=oe>>>1;Q<ae;){var Pe=2*(Q+1)-1,st=R[Pe],ve=Pe+1,ne=R[ve];if(0>s(st,J))ve<oe&&0>s(ne,st)?(R[Q]=ne,R[ve]=J,Q=ve):(R[Q]=st,R[Pe]=J,Q=Pe);else if(ve<oe&&0>s(ne,J))R[Q]=ne,R[ve]=J,Q=ve;else break e}}return $}function s(R,$){var J=R.sortIndex-$.sortIndex;return J!==0?J:R.id-$.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=[],u=[],d=1,h=null,f=3,v=!1,g=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=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(R){for(var $=n(u);$!==null;){if($.callback===null)r(u);else if($.startTime<=R)r(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=n(u)}}function S(R){if(m=!1,b(R),!g)if(n(l)!==null)g=!0,F(_);else{var $=n(u);$!==null&&K(S,$.startTime-R)}}function _(R,$){g=!1,m&&(m=!1,y(k),k=-1),v=!0;var J=f;try{for(b($),h=n(l);h!==null&&(!(h.expirationTime>$)||R&&!U());){var Q=h.callback;if(typeof Q=="function"){h.callback=null,f=h.priorityLevel;var oe=Q(h.expirationTime<=$);$=e.unstable_now(),typeof oe=="function"?h.callback=oe:h===n(l)&&r(l),b($)}else r(l);h=n(l)}if(h!==null)var ae=!0;else{var Pe=n(u);Pe!==null&&K(S,Pe.startTime-$),ae=!1}return ae}finally{h=null,f=J,v=!1}}var j=!1,T=null,k=-1,E=5,N=-1;function U(){return!(e.unstable_now()-N<E)}function O(){if(T!==null){var R=e.unstable_now();N=R;var $=!0;try{$=T(!0,R)}finally{$?z():(j=!1,T=null)}}else j=!1}var z;if(typeof x=="function")z=function(){x(O)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,q=D.port2;D.port1.onmessage=O,z=function(){q.postMessage(null)}}else z=function(){w(O,0)};function F(R){T=R,j||(j=!0,z())}function K(R,$){k=w(function(){R(e.unstable_now())},$)}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(R){R.callback=null},e.unstable_continueExecution=function(){g||v||(g=!0,F(_))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(R){switch(f){case 1:case 2:case 3:var $=3;break;default:$=f}var J=f;f=$;try{return R()}finally{f=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var J=f;f=R;try{return $()}finally{f=J}},e.unstable_scheduleCallback=function(R,$,J){var Q=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?Q+J:Q):J=Q,R){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=J+oe,R={id:d++,callback:$,priorityLevel:R,startTime:J,expirationTime:oe,sortIndex:-1},J>Q?(R.sortIndex=J,t(u,R),n(l)===null&&R===n(u)&&(m?(y(k),k=-1):m=!0,K(S,J-Q))):(R.sortIndex=oe,t(l,R),g||v||(g=!0,F(_))),R},e.unstable_shouldYield=U,e.unstable_wrapCallback=function(R){var $=f;return function(){var J=f;f=$;try{return R.apply(this,arguments)}finally{f=J}}}})(V_);$_.exports=V_;var PR=$_.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 AR=p,Un=PR;function H(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 U_=new Set,_c={};function Eo(e,t){Da(e,t),Da(e+"Capture",t)}function Da(e,t){for(_c[e]=t,e=0;e<t.length;e++)U_.add(t[e])}var ys=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gm=Object.prototype.hasOwnProperty,RR=/^[: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]*$/,dx={},hx={};function NR(e){return gm.call(hx,e)?!0:gm.call(dx,e)?!1:RR.test(e)?hx[e]=!0:(dx[e]=!0,!1)}function OR(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 IR(e,t,n,r){if(t===null||typeof t>"u"||OR(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 fn(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 Ht={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ht[e]=new fn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ht[t]=new fn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ht[e]=new fn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ht[e]=new fn(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){Ht[e]=new fn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ht[e]=new fn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ht[e]=new fn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ht[e]=new fn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ht[e]=new fn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pv=/[\-:]([a-z])/g;function Av(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(Pv,Av);Ht[t]=new fn(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(Pv,Av);Ht[t]=new fn(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(Pv,Av);Ht[t]=new fn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ht[e]=new fn(e,1,!1,e.toLowerCase(),null,!1,!1)});Ht.xlinkHref=new fn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ht[e]=new fn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rv(e,t,n,r){var s=Ht.hasOwnProperty(t)?Ht[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(IR(t,n,s,r)&&(n=null),r||s===null?NR(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ts=AR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wu=Symbol.for("react.element"),Bo=Symbol.for("react.portal"),zo=Symbol.for("react.fragment"),Nv=Symbol.for("react.strict_mode"),vm=Symbol.for("react.profiler"),B_=Symbol.for("react.provider"),z_=Symbol.for("react.context"),Ov=Symbol.for("react.forward_ref"),ym=Symbol.for("react.suspense"),xm=Symbol.for("react.suspense_list"),Iv=Symbol.for("react.memo"),$s=Symbol.for("react.lazy"),H_=Symbol.for("react.offscreen"),fx=Symbol.iterator;function Tl(e){return e===null||typeof e!="object"?null:(e=fx&&e[fx]||e["@@iterator"],typeof e=="function"?e:null)}var mt=Object.assign,np;function zl(e){if(np===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);np=t&&t[1]||""}return` 34`+np+e}var rp=!1;function sp(e,t){if(!e||rp)return"";rp=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 14,678 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),i=r.stack.split(` 36`),o=s.length-1,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{rp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zl(e):""}function LR(e){switch(e.tag){case 5:return zl(e.type);case 16:return zl("Lazy");case 13:return zl("Suspense");case 19:return zl("SuspenseList");case 0:case 2:case 15:return e=sp(e.type,!1),e;case 11:return e=sp(e.type.render,!1),e;case 1:return e=sp(e.type,!0),e;default:return""}}function wm(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 zo:return"Fragment";case Bo:return"Portal";case vm:return"Profiler";case Nv:return"StrictMode";case ym:return"Suspense";case xm:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case z_:return(e.displayName||"Context")+".Consumer";case B_:return(e._context.displayName||"Context")+".Provider";case Ov:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Iv:return t=e.displayName||null,t!==null?t:wm(e.type)||"Memo";case $s:t=e._payload,e=e._init;try{return wm(e(t))}catch{}}return null}function DR(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 wm(t);case 8:return t===Nv?"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 pi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function W_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MR(e){var t=W_(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 Ku(e){e._valueTracker||(e._valueTracker=MR(e))}function K_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function th(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 bm(e,t){var n=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function px(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=pi(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 G_(e,t){t=t.checked,t!=null&&Rv(e,"checked",t,!1)}function Sm(e,t){G_(e,t);var n=pi(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")?_m(e,t.type,n):t.hasOwnProperty("defaultValue")&&_m(e,t.type,pi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mx(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 _m(e,t,n){(t!=="number"||th(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hl=Array.isArray;function oa(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=""+pi(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 Em(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Hl(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:pi(n)}}function q_(e,t){var n=pi(t.value),r=pi(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 vx(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Y_(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 Cm(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Y_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Gu,Z_=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(Gu=Gu||document.createElement("div"),Gu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Gu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ec(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ic={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},FR=["Webkit","ms","Moz","O"];Object.keys(ic).forEach(function(e){FR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ic[t]=ic[e]})});function Q_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ic.hasOwnProperty(e)&&ic[e]?(""+t).trim():t+"px"}function X_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Q_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var $R=mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Tm(e,t){if(t){if($R[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function km(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 jm=null;function Lv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pm=null,aa=null,la=null;function yx(e){if(e=wu(e)){if(typeof Pm!="function")throw Error(H(280));var t=e.stateNode;t&&(t=af(t),Pm(e.stateNode,e.type,t))}}function J_(e){aa?la?la.push(e):la=[e]:aa=e}function e1(){if(aa){var e=aa,t=la;if(la=aa=null,yx(e),t)for(e=0;e<t.length;e++)yx(t[e])}}function t1(e,t){return e(t)}function n1(){}var ip=!1;function r1(e,t,n){if(ip)return e(t,n);ip=!0;try{return t1(e,t,n)}finally{ip=!1,(aa!==null||la!==null)&&(n1(),e1())}}function Cc(e,t){var n=e.stateNode;if(n===null)return null;var r=af(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(H(231,t,typeof n));return n}var Am=!1;if(ys)try{var kl={};Object.defineProperty(kl,"passive",{get:function(){Am=!0}}),window.addEventListener("test",kl,kl),window.removeEventListener("test",kl,kl)}catch{Am=!1}function VR(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var oc=!1,nh=null,rh=!1,Rm=null,UR={onError:function(e){oc=!0,nh=e}};function BR(e,t,n,r,s,i,o,a,l){oc=!1,nh=null,VR.apply(UR,arguments)}function zR(e,t,n,r,s,i,o,a,l){if(BR.apply(this,arguments),oc){if(oc){var u=nh;oc=!1,nh=null}else throw Error(H(198));rh||(rh=!0,Rm=u)}}function Co(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 s1(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 xx(e){if(Co(e)!==e)throw Error(H(188))}function HR(e){var t=e.alternate;if(!t){if(t=Co(e),t===null)throw Error(H(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 xx(s),e;if(i===r)return xx(s),t;i=i.sibling}throw Error(H(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(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function i1(e){return e=HR(e),e!==null?o1(e):null}function o1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=o1(e);if(t!==null)return t;e=e.sibling}return null}var a1=Un.unstable_scheduleCallback,wx=Un.unstable_cancelCallback,WR=Un.unstable_shouldYield,KR=Un.unstable_requestPaint,bt=Un.unstable_now,GR=Un.unstable_getCurrentPriorityLevel,Dv=Un.unstable_ImmediatePriority,l1=Un.unstable_UserBlockingPriority,sh=Un.unstable_NormalPriority,qR=Un.unstable_LowPriority,c1=Un.unstable_IdlePriority,nf=null,Hr=null;function YR(e){if(Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(nf,e,void 0,(e.current.flags&128)===128)}catch{}}var br=Math.clz32?Math.clz32:XR,ZR=Math.log,QR=Math.LN2;function XR(e){return e>>>=0,e===0?32:31-(ZR(e)/QR|0)|0}var qu=64,Yu=4194304;function Wl(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 ih(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=Wl(a):(i&=o,i!==0&&(r=Wl(i)))}else o=n&~s,o!==0?r=Wl(o):i!==0&&(r=Wl(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-br(t),s=1<<n,r|=e[n],t&=~s;return r}function JR(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 eN(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-br(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=JR(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Nm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function u1(){var e=qu;return qu<<=1,!(qu&4194240)&&(qu=64),e}function op(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-br(t),e[t]=n}function tN(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-br(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Mv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-br(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var We=0;function d1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}
vendor: 11,350 bytes, line 37
37var h1,Fv,f1,p1,m1,Om=!1,Zu=[],si=null,ii=null,oi=null,Tc=new Map,kc=new Map,zs=[],nN="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 bx(e,t){switch(e){case"focusin":case"focusout":si=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":Tc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kc.delete(t.pointerId)}}function jl(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=wu(t),t!==null&&Fv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function rN(e,t,n,r,s){switch(t){case"focusin":return si=jl(si,e,t,n,r,s),!0;case"dragenter":return ii=jl(ii,e,t,n,r,s),!0;case"mouseover":return oi=jl(oi,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Tc.set(i,jl(Tc.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,kc.set(i,jl(kc.get(i)||null,e,t,n,r,s)),!0}return!1}function g1(e){var t=Gi(e.target);if(t!==null){var n=Co(t);if(n!==null){if(t=n.tag,t===13){if(t=s1(n),t!==null){e.blockedOn=t,m1(e.priority,function(){f1(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 Id(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Im(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);jm=r,n.target.dispatchEvent(r),jm=null}else return t=wu(n),t!==null&&Fv(t),e.blockedOn=n,!1;t.shift()}return!0}function Sx(e,t,n){Id(e)&&n.delete(t)}function sN(){Om=!1,si!==null&&Id(si)&&(si=null),ii!==null&&Id(ii)&&(ii=null),oi!==null&&Id(oi)&&(oi=null),Tc.forEach(Sx),kc.forEach(Sx)}function Pl(e,t){e.blockedOn===t&&(e.blockedOn=null,Om||(Om=!0,Un.unstable_scheduleCallback(Un.unstable_NormalPriority,sN)))}function jc(e){function t(s){return Pl(s,e)}if(0<Zu.length){Pl(Zu[0],e);for(var n=1;n<Zu.length;n++){var r=Zu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(si!==null&&Pl(si,e),ii!==null&&Pl(ii,e),oi!==null&&Pl(oi,e),Tc.forEach(t),kc.forEach(t),n=0;n<zs.length;n++)r=zs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<zs.length&&(n=zs[0],n.blockedOn===null);)g1(n),n.blockedOn===null&&zs.shift()}var ca=Ts.ReactCurrentBatchConfig,oh=!0;function iN(e,t,n,r){var s=We,i=ca.transition;ca.transition=null;try{We=1,$v(e,t,n,r)}finally{We=s,ca.transition=i}}function oN(e,t,n,r){var s=We,i=ca.transition;ca.transition=null;try{We=4,$v(e,t,n,r)}finally{We=s,ca.transition=i}}function $v(e,t,n,r){if(oh){var s=Im(e,t,n,r);if(s===null)gp(e,t,r,ah,n),bx(e,r);else if(rN(s,e,t,n,r))r.stopPropagation();else if(bx(e,r),t&4&&-1<nN.indexOf(e)){for(;s!==null;){var i=wu(s);if(i!==null&&h1(i),i=Im(e,t,n,r),i===null&&gp(e,t,r,ah,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else gp(e,t,r,null,n)}}var ah=null;function Im(e,t,n,r){if(ah=null,e=Lv(r),e=Gi(e),e!==null)if(t=Co(e),t===null)e=null;else if(n=t.tag,n===13){if(e=s1(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 ah=e,null}function v1(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(GR()){case Dv:return 1;case l1:return 4;case sh:case qR:return 16;case c1:return 536870912;default:return 16}default:return 16}}var ti=null,Vv=null,Ld=null;function y1(){if(Ld)return Ld;var e,t=Vv,n=t.length,r,s="value"in ti?ti.value:ti.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 Ld=s.slice(e,1<r?1-r:void 0)}function Dd(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 Qu(){return!0}function _x(){return!1}function zn(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)?Qu:_x,this.isPropagationStopped=_x,this}return mt(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=Qu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Qu)},persist:function(){},isPersistent:Qu}),t}var nl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uv=zn(nl),xu=mt({},nl,{view:0,detail:0}),aN=zn(xu),ap,lp,Al,rf=mt({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bv,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!==Al&&(Al&&e.type==="mousemove"?(ap=e.screenX-Al.screenX,lp=e.screenY-Al.screenY):lp=ap=0,Al=e),ap)},movementY:function(e){return"movementY"in e?e.movementY:lp}}),Ex=zn(rf),lN=mt({},rf,{dataTransfer:0}),cN=zn(lN),uN=mt({},xu,{relatedTarget:0}),cp=zn(uN),dN=mt({},nl,{animationName:0,elapsedTime:0,pseudoElement:0}),hN=zn(dN),fN=mt({},nl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pN=zn(fN),mN=mt({},nl,{data:0}),Cx=zn(mN),gN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vN={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"},yN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xN(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yN[e])?!!t[e]:!1}function Bv(){return xN}var wN=mt({},xu,{key:function(e){if(e.key){var t=gN[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vN[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bv,charCode:function(e){return e.type==="keypress"?Dd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bN=zn(wN),SN=mt({},rf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tx=zn(SN),_N=mt({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bv}),EN=zn(_N),CN=mt({},nl,{propertyName:0,elapsedTime:0,pseudoElement:0}),TN=zn(CN),kN=mt({},rf,{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}),jN=zn(kN),PN=[9,13,27,32],zv=ys&&"CompositionEvent"in window,ac=null;ys&&"documentMode"in document&&(ac=document.documentMode);var AN=ys&&"TextEvent"in window&&!ac,x1=ys&&(!zv||ac&&8<ac&&11>=ac),kx=" ",jx=!1;function w1(e,t){switch(e){case"keyup":return PN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ho=!1;function RN(e,t){switch(e){case"compositionend":return b1(t);case"keypress":return t.which!==32?null:(jx=!0,kx);case"textInput":return e=t.data,e===kx&&jx?null:e;default:return null}}function NN(e,t){if(Ho)return e==="compositionend"||!zv&&w1(e,t)?(e=y1(),Ld=Vv=ti=null,Ho=!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 x1&&t.locale!=="ko"?null:t.data;default:return null}}var ON={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 Px(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ON[e.type]:t==="textarea"}function S1(e,t,n,r){J_(r),t=lh(t,"onChange"),0<t.length&&(n=new Uv("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var lc=null,Pc=null;function IN(e){O1(e,0)}function sf(e){var t=Go(e);if(K_(t))return e}function LN(e,t){if(e==="change")return t}var _1=!1;if(ys){var up;if(ys){var dp="oninput"in document;if(!dp){var Ax=document.createElement("div");Ax.setAttribute("oninput","return;"),dp=typeof Ax.oninput=="function"}up=dp}else up=!1;_1=up&&(!document.documentMode||9<document.documentMode)}function Rx(){lc&&(lc.detachEvent("onpropertychange",E1),Pc=lc=null)}function E1(e){if(e.propertyName==="value"&&sf(Pc)){var t=[];S1(t,Pc,e,Lv(e)),r1(IN,t)}}function DN(e,t,n){e==="focusin"?(Rx(),lc=t,Pc=n,lc.attachEvent("onpropertychange",E1)):e==="focusout"&&Rx()}function MN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sf(Pc)}function FN(e,t){if(e==="click")return sf(t)}function $N(e,t){if(e==="input"||e==="change")return sf(t)}function VN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Er=typeof Object.is=="function"?Object.is:VN;function Ac(e,t){if(Er(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(!gm.call(t,s)||!Er(e[s],t[s]))return!1}return!0}function Nx(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ox(e,t){var n=Nx(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=Nx(n)}}function C1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?C1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function T1(){for(var e=window,t=th();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=th(e.document)}return t}function Hv(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 UN(e){var t=T1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&C1(n.ownerDocument.documentElement,n)){if(r!==null&&Hv(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=Ox(n,i);var o=Ox(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 BN=ys&&"documentMode"in document&&11>=document.documentMode,Wo=null,Lm=null,cc=null,Dm=!1;function Ix(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dm||Wo==null||Wo!==th(r)||(r=Wo,"selectionStart"in r&&Hv(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}),cc&&Ac(cc,r)||(cc=r,r=lh(Lm,"onSelect"),0<r.length&&(t=new Uv("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Wo)))}function Xu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ko={animationend:Xu("Animation","AnimationEnd"),animationiteration:Xu("Animation","AnimationIteration"),animationstart:Xu("Animation","AnimationStart"),transitionend:Xu("Transition","TransitionEnd")},hp={},k1={};ys&&(k1=document.createElement("div").style,"AnimationEvent"in window||(delete Ko.animationend.animation,delete Ko.animationiteration.animation,delete Ko.animationstart.animation),"TransitionEvent"in window||delete Ko.transitionend.transition);function of(e){if(hp[e])return hp[e];if(!Ko[e])return e;var t=Ko[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in k1)return hp[e]=t[n];return e}var j1=of("animationend"),P1=of("animationiteration"),A1=of("animationstart"),R1=of("transitionend"),N1=new Map,Lx="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 ki(e,t){N1.set(e,t),Eo(t,[e])}for(var fp=0;fp<Lx.length;fp++){var pp=Lx[fp],zN=pp.toLowerCase(),HN=pp[0].toUpperCase()+pp.slice(1);ki(zN,"on"+HN)}ki(j1,"onAnimationEnd");ki(P1,"onAnimationIteration");ki(A1,"onAnimationStart");ki("dblclick","onDoubleClick");ki("focusin","onFocus");ki("focusout","onBlur");ki(R1,"onTransitionEnd");Da("onMouseEnter",["mouseout","mouseover"]);Da("onMouseLeave",["mouseout","mouseover"]);Da("onPointerEnter",["pointerout","pointerover"]);Da("onPointerLeave",["pointerout","pointerover"]);Eo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));
vendor: 4,770 bytes, line 37
37Eo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Eo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Eo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Eo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Eo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kl="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(" "),WN=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kl));function Dx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,zR(r,t,void 0,e),e.currentTarget=null}function O1(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,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Dx(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Dx(s,a,u),i=l}}}if(rh)throw e=Rm,rh=!1,Rm=null,e}function tt(e,t){var n=t[Um];n===void 0&&(n=t[Um]=new Set);var r=e+"__bubble";n.has(r)||(I1(t,e,2,!1),n.add(r))}function mp(e,t,n){var r=0;t&&(r|=4),I1(n,e,r,t)}var Ju="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[Ju]){e[Ju]=!0,U_.forEach(function(n){n!=="selectionchange"&&(WN.has(n)||mp(n,!1,e),mp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ju]||(t[Ju]=!0,mp("selectionchange",!1,t))}}function I1(e,t,n,r){switch(v1(t)){case 1:var s=iN;break;case 4:s=oN;break;default:s=$v}n=s.bind(null,t,n,e),s=void 0,!Am||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 gp(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=Gi(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}r1(function(){var u=i,d=Lv(n),h=[];e:{var f=N1.get(e);if(f!==void 0){var v=Uv,g=e;switch(e){case"keypress":if(Dd(n)===0)break e;case"keydown":case"keyup":v=bN;break;case"focusin":g="focus",v=cp;break;case"focusout":g="blur",v=cp;break;case"beforeblur":case"afterblur":v=cp;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":v=Ex;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=cN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=EN;break;case j1:case P1:case A1:v=hN;break;case R1:v=TN;break;case"scroll":v=aN;break;case"wheel":v=jN;break;case"copy":case"cut":case"paste":v=pN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Tx}var m=(t&4)!==0,w=!m&&e==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var x=u,b;x!==null;){b=x;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,y!==null&&(S=Cc(x,y),S!=null&&m.push(Nc(x,S,b)))),w)break;x=x.return}0<m.length&&(f=new v(f,g,null,n,d),h.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",f&&n!==jm&&(g=n.relatedTarget||n.fromElement)&&(Gi(g)||g[xs]))break e;if((v||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,v?(g=n.relatedTarget||n.toElement,v=u,g=g?Gi(g):null,g!==null&&(w=Co(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(v=null,g=u),v!==g)){if(m=Ex,S="onMouseLeave",y="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(m=Tx,S="onPointerLeave",y="onPointerEnter",x="pointer"),w=v==null?f:Go(v),b=g==null?f:Go(g),f=new m(S,x+"leave",v,n,d),f.target=w,f.relatedTarget=b,S=null,Gi(d)===u&&(m=new m(y,x+"enter",g,n,d),m.target=b,m.relatedTarget=w,S=m),w=S,v&&g)t:{for(m=v,y=g,x=0,b=m;b;b=Ro(b))x++;for(b=0,S=y;S;S=Ro(S))b++;for(;0<x-b;)m=Ro(m),x--;for(;0<b-x;)y=Ro(y),b--;for(;x--;){if(m===y||y!==null&&m===y.alternate)break t;m=Ro(m),y=Ro(y)}m=null}else m=null;v!==null&&Mx(h,f,v,m,!1),g!==null&&w!==null&&Mx(h,w,g,m,!0)}}
vendor: 5,082 bytes, lines 37-38
37e:{if(f=u?Go(u):window,v=f.nodeName&&f.nodeName.toLowerCase(),v==="select"||v==="input"&&f.type==="file")var _=LN;else if(Px(f))if(_1)_=$N;else{_=MN;var j=DN}else(v=f.nodeName)&&v.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=FN);if(_&&(_=_(e,u))){S1(h,_,n,d);break e}j&&j(e,f,u),e==="focusout"&&(j=f._wrapperState)&&j.controlled&&f.type==="number"&&_m(f,"number",f.value)}switch(j=u?Go(u):window,e){case"focusin":(Px(j)||j.contentEditable==="true")&&(Wo=j,Lm=u,cc=null);break;case"focusout":cc=Lm=Wo=null;break;case"mousedown":Dm=!0;break;case"contextmenu":case"mouseup":case"dragend":Dm=!1,Ix(h,n,d);break;case"selectionchange":if(BN)break;case"keydown":case"keyup":Ix(h,n,d)}var T;if(zv)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Ho?w1(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(x1&&n.locale!=="ko"&&(Ho||k!=="onCompositionStart"?k==="onCompositionEnd"&&Ho&&(T=y1()):(ti=d,Vv="value"in ti?ti.value:ti.textContent,Ho=!0)),j=lh(u,k),0<j.length&&(k=new Cx(k,e,null,n,d),h.push({event:k,listeners:j}),T?k.data=T:(T=b1(n),T!==null&&(k.data=T)))),(T=AN?RN(e,n):NN(e,n))&&(u=lh(u,"onBeforeInput"),0<u.length&&(d=new Cx("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=T))}O1(h,t)})}function Nc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lh(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Cc(e,n),i!=null&&r.unshift(Nc(e,i,s)),i=Cc(e,t),i!=null&&r.push(Nc(e,i,s))),e=e.return}return r}function Ro(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mx(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=Cc(n,i),l!=null&&o.unshift(Nc(n,l,a))):s||(l=Cc(n,i),l!=null&&o.push(Nc(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var KN=/\r\n?/g,GN=/\u0000|\uFFFD/g;function Fx(e){return(typeof e=="string"?e:""+e).replace(KN,` 38`).replace(GN,"")}function ed(e,t,n){if(t=Fx(t),Fx(e)!==t&&n)throw Error(H(425))}function ch(){}var Mm=null,Fm=null;function $m(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 Vm=typeof setTimeout=="function"?setTimeout:void 0,qN=typeof clearTimeout=="function"?clearTimeout:void 0,$x=typeof Promise=="function"?Promise:void 0,YN=typeof queueMicrotask=="function"?queueMicrotask:typeof $x<"u"?function(e){return $x.resolve(null).then(e).catch(ZN)}:Vm;function ZN(e){setTimeout(function(){throw e})}function vp(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),jc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);jc(t)}function ai(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 Vx(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 rl=Math.random().toString(36).slice(2),Ur="__reactFiber$"+rl,Oc="__reactProps$"+rl,xs="__reactContainer$"+rl,Um="__reactEvents$"+rl,QN="__reactListeners$"+rl,XN="__reactHandles$"+rl;function Gi(e){var t=e[Ur];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xs]||n[Ur]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Vx(e);e!==null;){if(n=e[Ur])return n;e=Vx(e)}return t}e=n,n=e.parentNode}return null}function wu(e){return e=e[Ur]||e[xs],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Go(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function af(e){return e[Oc]||null}var Bm=[],qo=-1;function ji(e){return{current:e}}function nt(e){0>qo||(e.current=Bm[qo],Bm[qo]=null,qo--)}function Je(e,t){qo++,Bm[qo]=e.current,e.current=t}var mi={},Xt=ji(mi),En=ji(!1),ho=mi;function Ma(e,t){var n=e.type.contextTypes;if(!n)return mi;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 Cn(e){return e=e.childContextTypes,e!=null}function uh(){nt(En),nt(Xt)}function Ux(e,t,n){if(Xt.current!==mi)throw Error(H(168));Je(Xt,t),Je(En,n)}function L1(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(H(108,DR(e)||"Unknown",s));return mt({},n,r)}function dh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||mi,ho=Xt.current,Je(Xt,e),Je(En,En.current),!0}
vendor: 13,802 bytes, line 38
38function Bx(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=L1(e,t,ho),r.__reactInternalMemoizedMergedChildContext=e,nt(En),nt(Xt),Je(Xt,e)):nt(En),Je(En,n)}var us=null,lf=!1,yp=!1;function D1(e){us===null?us=[e]:us.push(e)}function JN(e){lf=!0,D1(e)}function Pi(){if(!yp&&us!==null){yp=!0;var e=0,t=We;try{var n=us;for(We=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}us=null,lf=!1}catch(s){throw us!==null&&(us=us.slice(e+1)),a1(Dv,Pi),s}finally{We=t,yp=!1}}return null}var Yo=[],Zo=0,hh=null,fh=0,Xn=[],Jn=0,fo=null,ds=1,hs="";function Ui(e,t){Yo[Zo++]=fh,Yo[Zo++]=hh,hh=e,fh=t}function M1(e,t,n){Xn[Jn++]=ds,Xn[Jn++]=hs,Xn[Jn++]=fo,fo=e;var r=ds;e=hs;var s=32-br(r)-1;r&=~(1<<s),n+=1;var i=32-br(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,ds=1<<32-br(t)+s|n<<s|r,hs=i+e}else ds=1<<i|n<<s|r,hs=e}function Wv(e){e.return!==null&&(Ui(e,1),M1(e,1,0))}function Kv(e){for(;e===hh;)hh=Yo[--Zo],Yo[Zo]=null,fh=Yo[--Zo],Yo[Zo]=null;for(;e===fo;)fo=Xn[--Jn],Xn[Jn]=null,hs=Xn[--Jn],Xn[Jn]=null,ds=Xn[--Jn],Xn[Jn]=null}var Mn=null,Dn=null,ot=!1,vr=null;function F1(e,t){var n=er(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 zx(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,Mn=e,Dn=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Mn=e,Dn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=fo!==null?{id:ds,overflow:hs}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=er(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Mn=e,Dn=null,!0):!1;default:return!1}}function zm(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hm(e){if(ot){var t=Dn;if(t){var n=t;if(!zx(e,t)){if(zm(e))throw Error(H(418));t=ai(n.nextSibling);var r=Mn;t&&zx(e,t)?F1(r,n):(e.flags=e.flags&-4097|2,ot=!1,Mn=e)}}else{if(zm(e))throw Error(H(418));e.flags=e.flags&-4097|2,ot=!1,Mn=e}}}function Hx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Mn=e}function td(e){if(e!==Mn)return!1;if(!ot)return Hx(e),ot=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!$m(e.type,e.memoizedProps)),t&&(t=Dn)){if(zm(e))throw $1(),Error(H(418));for(;t;)F1(e,t),t=ai(t.nextSibling)}if(Hx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Dn=ai(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Dn=null}}else Dn=Mn?ai(e.stateNode.nextSibling):null;return!0}function $1(){for(var e=Dn;e;)e=ai(e.nextSibling)}function Fa(){Dn=Mn=null,ot=!1}function Gv(e){vr===null?vr=[e]:vr.push(e)}var e2=Ts.ReactCurrentBatchConfig;function Rl(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(H(309));var r=n.stateNode}if(!r)throw Error(H(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(H(284));if(!n._owner)throw Error(H(290,e))}return e}function nd(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wx(e){var t=e._init;return t(e._payload)}function V1(e){function t(y,x){if(e){var b=y.deletions;b===null?(y.deletions=[x],y.flags|=16):b.push(x)}}function n(y,x){if(!e)return null;for(;x!==null;)t(y,x),x=x.sibling;return null}function r(y,x){for(y=new Map;x!==null;)x.key!==null?y.set(x.key,x):y.set(x.index,x),x=x.sibling;return y}function s(y,x){return y=di(y,x),y.index=0,y.sibling=null,y}function i(y,x,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<x?(y.flags|=2,x):b):(y.flags|=2,x)):(y.flags|=1048576,x)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,x,b,S){return x===null||x.tag!==6?(x=Cp(b,y.mode,S),x.return=y,x):(x=s(x,b),x.return=y,x)}function l(y,x,b,S){var _=b.type;return _===zo?d(y,x,b.props.children,S,b.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===$s&&Wx(_)===x.type)?(S=s(x,b.props),S.ref=Rl(y,x,b),S.return=y,S):(S=zd(b.type,b.key,b.props,null,y.mode,S),S.ref=Rl(y,x,b),S.return=y,S)}function u(y,x,b,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Tp(b,y.mode,S),x.return=y,x):(x=s(x,b.children||[]),x.return=y,x)}function d(y,x,b,S,_){return x===null||x.tag!==7?(x=ao(b,y.mode,S,_),x.return=y,x):(x=s(x,b),x.return=y,x)}function h(y,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Cp(""+x,y.mode,b),x.return=y,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Wu:return b=zd(x.type,x.key,x.props,null,y.mode,b),b.ref=Rl(y,null,x),b.return=y,b;case Bo:return x=Tp(x,y.mode,b),x.return=y,x;case $s:var S=x._init;return h(y,S(x._payload),b)}if(Hl(x)||Tl(x))return x=ao(x,y.mode,b,null),x.return=y,x;nd(y,x)}return null}function f(y,x,b,S){var _=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:a(y,x,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Wu:return b.key===_?l(y,x,b,S):null;case Bo:return b.key===_?u(y,x,b,S):null;case $s:return _=b._init,f(y,x,_(b._payload),S)}if(Hl(b)||Tl(b))return _!==null?null:d(y,x,b,S,null);nd(y,b)}return null}function v(y,x,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return y=y.get(b)||null,a(x,y,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Wu:return y=y.get(S.key===null?b:S.key)||null,l(x,y,S,_);case Bo:return y=y.get(S.key===null?b:S.key)||null,u(x,y,S,_);case $s:var j=S._init;return v(y,x,b,j(S._payload),_)}if(Hl(S)||Tl(S))return y=y.get(b)||null,d(x,y,S,_,null);nd(x,S)}return null}function g(y,x,b,S){for(var _=null,j=null,T=x,k=x=0,E=null;T!==null&&k<b.length;k++){T.index>k?(E=T,T=null):E=T.sibling;var N=f(y,T,b[k],S);if(N===null){T===null&&(T=E);break}e&&T&&N.alternate===null&&t(y,T),x=i(N,x,k),j===null?_=N:j.sibling=N,j=N,T=E}if(k===b.length)return n(y,T),ot&&Ui(y,k),_;if(T===null){for(;k<b.length;k++)T=h(y,b[k],S),T!==null&&(x=i(T,x,k),j===null?_=T:j.sibling=T,j=T);return ot&&Ui(y,k),_}for(T=r(y,T);k<b.length;k++)E=v(T,y,k,b[k],S),E!==null&&(e&&E.alternate!==null&&T.delete(E.key===null?k:E.key),x=i(E,x,k),j===null?_=E:j.sibling=E,j=E);return e&&T.forEach(function(U){return t(y,U)}),ot&&Ui(y,k),_}function m(y,x,b,S){var _=Tl(b);if(typeof _!="function")throw Error(H(150));if(b=_.call(b),b==null)throw Error(H(151));for(var j=_=null,T=x,k=x=0,E=null,N=b.next();T!==null&&!N.done;k++,N=b.next()){T.index>k?(E=T,T=null):E=T.sibling;var U=f(y,T,N.value,S);if(U===null){T===null&&(T=E);break}e&&T&&U.alternate===null&&t(y,T),x=i(U,x,k),j===null?_=U:j.sibling=U,j=U,T=E}if(N.done)return n(y,T),ot&&Ui(y,k),_;if(T===null){for(;!N.done;k++,N=b.next())N=h(y,N.value,S),N!==null&&(x=i(N,x,k),j===null?_=N:j.sibling=N,j=N);return ot&&Ui(y,k),_}for(T=r(y,T);!N.done;k++,N=b.next())N=v(T,y,k,N.value,S),N!==null&&(e&&N.alternate!==null&&T.delete(N.key===null?k:N.key),x=i(N,x,k),j===null?_=N:j.sibling=N,j=N);return e&&T.forEach(function(O){return t(y,O)}),ot&&Ui(y,k),_}function w(y,x,b,S){if(typeof b=="object"&&b!==null&&b.type===zo&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Wu:e:{for(var _=b.key,j=x;j!==null;){if(j.key===_){if(_=b.type,_===zo){if(j.tag===7){n(y,j.sibling),x=s(j,b.props.children),x.return=y,y=x;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===$s&&Wx(_)===j.type){n(y,j.sibling),x=s(j,b.props),x.ref=Rl(y,j,b),x.return=y,y=x;break e}n(y,j);break}else t(y,j);j=j.sibling}b.type===zo?(x=ao(b.props.children,y.mode,S,b.key),x.return=y,y=x):(S=zd(b.type,b.key,b.props,null,y.mode,S),S.ref=Rl(y,x,b),S.return=y,y=S)}return o(y);case Bo:e:{for(j=b.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(y,x.sibling),x=s(x,b.children||[]),x.return=y,y=x;break e}else{n(y,x);break}else t(y,x);x=x.sibling}x=Tp(b,y.mode,S),x.return=y,y=x}return o(y);case $s:return j=b._init,w(y,x,j(b._payload),S)}if(Hl(b))return g(y,x,b,S);if(Tl(b))return m(y,x,b,S);nd(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(y,x.sibling),x=s(x,b),x.return=y,y=x):(n(y,x),x=Cp(b,y.mode,S),x.return=y,y=x),o(y)):n(y,x)}return w}var $a=V1(!0),U1=V1(!1),ph=ji(null),mh=null,Qo=null,qv=null;function Yv(){qv=Qo=mh=null}function Zv(e){var t=ph.current;nt(ph),e._currentValue=t}function Wm(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 ua(e,t){mh=e,qv=Qo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Sn=!0),e.firstContext=null)}function rr(e){var t=e._currentValue;if(qv!==e)if(e={context:e,memoizedValue:t,next:null},Qo===null){if(mh===null)throw Error(H(308));Qo=e,mh.dependencies={lanes:0,firstContext:e}}else Qo=Qo.next=e;return t}var qi=null;function Qv(e){qi===null?qi=[e]:qi.push(e)}function B1(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Qv(t)):(n.next=s.next,s.next=n),t.interleaved=n,ws(e,r)}function ws(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 Vs=!1;function Xv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function z1(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 ms(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function li(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fe&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,ws(e,n)}return s=r.interleaved,s===null?(t.next=t,Qv(r)):(t.next=s.next,s.next=t),r.interleaved=t,ws(e,n)}function Md(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,Mv(e,n)}}function Kx(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 gh(e,t,n,r){var s=e.updateQueue;Vs=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=l))}if(i!==null){var h=s.baseState;o=0,d=u=l=null,a=i;do{var f=a.lane,v=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(f=t,v=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){h=g.call(v,h,f);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(v,h,f):g,f==null)break e;h=mt({},h,f);break e;case 2:Vs=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else v={eventTime:v,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(u=d=v,l=h):d=d.next=v,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=h),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);mo|=o,e.lanes=o,e.memoizedState=h}}function Gx(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(H(191,s));s.call(r)}}}var bu={},Wr=ji(bu),Ic=ji(bu),Lc=ji(bu);function Yi(e){if(e===bu)throw Error(H(174));return e}function Jv(e,t){switch(Je(Lc,t),Je(Ic,e),Je(Wr,bu),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cm(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cm(t,e)}nt(Wr),Je(Wr,t)}function Va(){nt(Wr),nt(Ic),nt(Lc)}function H1(e){Yi(Lc.current);var t=Yi(Wr.current),n=Cm(t,e.type);t!==n&&(Je(Ic,e),Je(Wr,n))}function ey(e){Ic.current===e&&(nt(Wr),nt(Ic))}var ht=ji(0);function vh(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 xp=[];function ty(){for(var e=0;e<xp.length;e++)xp[e]._workInProgressVersionPrimary=null;xp.length=0}var Fd=Ts.ReactCurrentDispatcher,wp=Ts.ReactCurrentBatchConfig,po=0,pt=null,Pt=null,Ot=null,yh=!1,uc=!1,Dc=0,t2=0;
vendor: 5,118 bytes, line 38
38function Kt(){throw Error(H(321))}function ny(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function ry(e,t,n,r,s,i){if(po=i,pt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Fd.current=e===null||e.memoizedState===null?i2:o2,e=n(r,s),uc){i=0;do{if(uc=!1,Dc=0,25<=i)throw Error(H(301));i+=1,Ot=Pt=null,t.updateQueue=null,Fd.current=a2,e=n(r,s)}while(uc)}if(Fd.current=xh,t=Pt!==null&&Pt.next!==null,po=0,Ot=Pt=pt=null,yh=!1,t)throw Error(H(300));return e}function sy(){var e=Dc!==0;return Dc=0,e}function Dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?pt.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function sr(){if(Pt===null){var e=pt.alternate;e=e!==null?e.memoizedState:null}else e=Pt.next;var t=Ot===null?pt.memoizedState:Ot.next;if(t!==null)Ot=t,Pt=e;else{if(e===null)throw Error(H(310));Pt=e,e={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},Ot===null?pt.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function Mc(e,t){return typeof t=="function"?t(e):t}function bp(e){var t=sr(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Pt,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,u=i;do{var d=u.lane;if((po&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=r):l=l.next=h,pt.lanes|=d,mo|=d}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,Er(r,t.memoizedState)||(Sn=!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,pt.lanes|=i,mo|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sp(e){var t=sr(),n=t.queue;if(n===null)throw Error(H(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);Er(i,t.memoizedState)||(Sn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function W1(){}function K1(e,t){var n=pt,r=sr(),s=t(),i=!Er(r.memoizedState,s);if(i&&(r.memoizedState=s,Sn=!0),r=r.queue,iy(Y1.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ot!==null&&Ot.memoizedState.tag&1){if(n.flags|=2048,Fc(9,q1.bind(null,n,r,s,t),void 0,null),Lt===null)throw Error(H(349));po&30||G1(n,t,s)}return s}function G1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function q1(e,t,n,r){t.value=n,t.getSnapshot=r,Z1(t)&&Q1(e)}function Y1(e,t,n){return n(function(){Z1(t)&&Q1(e)})}function Z1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function Q1(e){var t=ws(e,1);t!==null&&Sr(t,e,1,-1)}function qx(e){var t=Dr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mc,lastRenderedState:e},t.queue=e,e=e.dispatch=s2.bind(null,pt,e),[t.memoizedState,e]}function Fc(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.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 X1(){return sr().memoizedState}function $d(e,t,n,r){var s=Dr();pt.flags|=e,s.memoizedState=Fc(1|t,n,void 0,r===void 0?null:r)}function cf(e,t,n,r){var s=sr();r=r===void 0?null:r;var i=void 0;if(Pt!==null){var o=Pt.memoizedState;if(i=o.destroy,r!==null&&ny(r,o.deps)){s.memoizedState=Fc(t,n,i,r);return}}pt.flags|=e,s.memoizedState=Fc(1|t,n,i,r)}function Yx(e,t){return $d(8390656,8,e,t)}function iy(e,t){return cf(2048,8,e,t)}function J1(e,t){return cf(4,2,e,t)}function eE(e,t){return cf(4,4,e,t)}function tE(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 nE(e,t,n){return n=n!=null?n.concat([e]):null,cf(4,4,tE.bind(null,t,e),n)}function oy(){}function rE(e,t){var n=sr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ny(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sE(e,t){var n=sr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ny(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function iE(e,t,n){return po&21?(Er(n,t)||(n=u1(),pt.lanes|=n,mo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sn=!0),e.memoizedState=n)}function n2(e,t){var n=We;We=n!==0&&4>n?n:4,e(!0);var r=wp.transition;wp.transition={};try{e(!1),t()}finally{We=n,wp.transition=r}}function oE(){return sr().memoizedState}function r2(e,t,n){var r=ui(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},aE(e))lE(t,n);
vendor: 9,207 bytes, lines 38-40
38else if(n=B1(e,t,n,r),n!==null){var s=un();Sr(n,e,r,s),cE(n,t,r)}}function s2(e,t,n){var r=ui(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aE(e))lE(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,Er(a,o)){var l=t.interleaved;l===null?(s.next=s,Qv(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=B1(e,t,s,r),n!==null&&(s=un(),Sr(n,e,r,s),cE(n,t,r))}}function aE(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function lE(e,t){uc=yh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cE(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mv(e,n)}}var xh={readContext:rr,useCallback:Kt,useContext:Kt,useEffect:Kt,useImperativeHandle:Kt,useInsertionEffect:Kt,useLayoutEffect:Kt,useMemo:Kt,useReducer:Kt,useRef:Kt,useState:Kt,useDebugValue:Kt,useDeferredValue:Kt,useTransition:Kt,useMutableSource:Kt,useSyncExternalStore:Kt,useId:Kt,unstable_isNewReconciler:!1},i2={readContext:rr,useCallback:function(e,t){return Dr().memoizedState=[e,t===void 0?null:t],e},useContext:rr,useEffect:Yx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,$d(4194308,4,tE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return $d(4194308,4,e,t)},useInsertionEffect:function(e,t){return $d(4,2,e,t)},useMemo:function(e,t){var n=Dr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dr();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=r2.bind(null,pt,e),[r.memoizedState,e]},useRef:function(e){var t=Dr();return e={current:e},t.memoizedState=e},useState:qx,useDebugValue:oy,useDeferredValue:function(e){return Dr().memoizedState=e},useTransition:function(){var e=qx(!1),t=e[0];return e=n2.bind(null,e[1]),Dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pt,s=Dr();if(ot){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Lt===null)throw Error(H(349));po&30||G1(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Yx(Y1.bind(null,r,i,e),[e]),r.flags|=2048,Fc(9,q1.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Dr(),t=Lt.identifierPrefix;if(ot){var n=hs,r=ds;n=(r&~(1<<32-br(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Dc++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=t2++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},o2={readContext:rr,useCallback:rE,useContext:rr,useEffect:iy,useImperativeHandle:nE,useInsertionEffect:J1,useLayoutEffect:eE,useMemo:sE,useReducer:bp,useRef:X1,useState:function(){return bp(Mc)},useDebugValue:oy,useDeferredValue:function(e){var t=sr();return iE(t,Pt.memoizedState,e)},useTransition:function(){var e=bp(Mc)[0],t=sr().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:K1,useId:oE,unstable_isNewReconciler:!1},a2={readContext:rr,useCallback:rE,useContext:rr,useEffect:iy,useImperativeHandle:nE,useInsertionEffect:J1,useLayoutEffect:eE,useMemo:sE,useReducer:Sp,useRef:X1,useState:function(){return Sp(Mc)},useDebugValue:oy,useDeferredValue:function(e){var t=sr();return Pt===null?t.memoizedState=e:iE(t,Pt.memoizedState,e)},useTransition:function(){var e=Sp(Mc)[0],t=sr().memoizedState;return[e,t]},useMutableSource:W1,useSyncExternalStore:K1,useId:oE,unstable_isNewReconciler:!1};function fr(e,t){if(e&&e.defaultProps){t=mt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Km(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var uf={isMounted:function(e){return(e=e._reactInternals)?Co(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=un(),s=ui(e),i=ms(r,s);i.payload=t,n!=null&&(i.callback=n),t=li(e,i,s),t!==null&&(Sr(t,e,s,r),Md(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=un(),s=ui(e),i=ms(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=li(e,i,s),t!==null&&(Sr(t,e,s,r),Md(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),r=ui(e),s=ms(n,r);s.tag=2,t!=null&&(s.callback=t),t=li(e,s,r),t!==null&&(Sr(t,e,r,n),Md(t,e,r))}};function Zx(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?!Ac(n,r)||!Ac(s,i):!0}function uE(e,t,n){var r=!1,s=mi,i=t.contextType;return typeof i=="object"&&i!==null?i=rr(i):(s=Cn(t)?ho:Xt.current,r=t.contextTypes,i=(r=r!=null)?Ma(e,s):mi),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=uf,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Qx(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&&uf.enqueueReplaceState(t,t.state,null)}function Gm(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Xv(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=rr(i):(i=Cn(t)?ho:Xt.current,s.context=Ma(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Km(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&&uf.enqueueReplaceState(s,s.state,null),gh(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ua(e,t){try{var n="",r=t;do n+=LR(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 _p(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function qm(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var l2=typeof WeakMap=="function"?WeakMap:Map;function dE(e,t,n){n=ms(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bh||(bh=!0,sg=r),qm(e,t)},n}function hE(e,t,n){n=ms(-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(){qm(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){qm(e,t),typeof r!="function"&&(ci===null?ci=new Set([this]):ci.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Xx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new l2;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=S2.bind(null,e,t,n),t.then(e,e))}function Jx(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}function ew(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=ms(-1,1),t.tag=2,li(n,t,1))),n.lanes|=1),e)}var c2=Ts.ReactCurrentOwner,Sn=!1;function an(e,t,n,r){t.child=e===null?U1(t,null,n,r):$a(t,e.child,n,r)}function tw(e,t,n,r,s){n=n.render;var i=t.ref;return ua(t,s),r=ry(e,t,n,r,i,s),n=sy(),e!==null&&!Sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,bs(e,t,s)):(ot&&n&&Wv(t),t.flags|=1,an(e,t,r,s),t.child)}function nw(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!py(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,fE(e,t,i,r,s)):(e=zd(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:Ac,n(o,r)&&e.ref===t.ref)return bs(e,t,s)}return t.flags|=1,e=di(i,r),e.ref=t.ref,e.return=t,t.child=e}function fE(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Ac(i,r)&&e.ref===t.ref)if(Sn=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Sn=!0);else return t.lanes=e.lanes,bs(e,t,s)}return Ym(e,t,n,r,s)}function pE(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},Je(Jo,In),In|=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,Je(Jo,In),In|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Je(Jo,In),In|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Je(Jo,In),In|=r;return an(e,t,s,n),t.child}function mE(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 6,562 bytes, line 40
40function Ym(e,t,n,r,s){var i=Cn(n)?ho:Xt.current;return i=Ma(t,i),ua(t,s),n=ry(e,t,n,r,i,s),r=sy(),e!==null&&!Sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,bs(e,t,s)):(ot&&r&&Wv(t),t.flags|=1,an(e,t,n,s),t.child)}function rw(e,t,n,r,s){if(Cn(n)){var i=!0;dh(t)}else i=!1;if(ua(t,s),t.stateNode===null)Vd(e,t),uE(t,n,r),Gm(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=rr(u):(u=Cn(n)?ho:Xt.current,u=Ma(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Qx(t,o,r,u),Vs=!1;var f=t.memoizedState;o.state=f,gh(t,r,o,s),l=t.memoizedState,a!==r||f!==l||En.current||Vs?(typeof d=="function"&&(Km(t,n,d,r),l=t.memoizedState),(a=Vs||Zx(t,n,a,r,f,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,z1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:fr(t.type,a),o.props=u,h=t.pendingProps,f=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=rr(l):(l=Cn(n)?ho:Xt.current,l=Ma(t,l));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||f!==l)&&Qx(t,o,r,l),Vs=!1,f=t.memoizedState,o.state=f,gh(t,r,o,s);var g=t.memoizedState;a!==h||f!==g||En.current||Vs?(typeof v=="function"&&(Km(t,n,v,r),g=t.memoizedState),(u=Vs||Zx(t,n,u,r,f,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),o.props=r,o.state=g,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zm(e,t,n,r,i,s)}function Zm(e,t,n,r,s,i){mE(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Bx(t,n,!1),bs(e,t,i);r=t.stateNode,c2.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=$a(t,e.child,null,i),t.child=$a(t,null,a,i)):an(e,t,a,i),t.memoizedState=r.state,s&&Bx(t,n,!0),t.child}function gE(e){var t=e.stateNode;t.pendingContext?Ux(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ux(e,t.context,!1),Jv(e,t.containerInfo)}function sw(e,t,n,r,s){return Fa(),Gv(s),t.flags|=256,an(e,t,n,r),t.child}var Qm={dehydrated:null,treeContext:null,retryLane:0};function Xm(e){return{baseLanes:e,cachePool:null,transitions:null}}function vE(e,t,n){var r=t.pendingProps,s=ht.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),Je(ht,s&1),e===null)return Hm(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=ff(o,r,0,null),e=ao(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Xm(n),t.memoizedState=Qm,e):ay(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return u2(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=di(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=di(a,i):(i=ao(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?Xm(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Qm,r}return i=e.child,e=i.sibling,r=di(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 ay(e,t){return t=ff({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rd(e,t,n,r){return r!==null&&Gv(r),$a(t,e.child,null,n),e=ay(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function u2(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=_p(Error(H(422))),rd(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ff({mode:"visible",children:r.children},s,0,null),i=ao(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&$a(t,e.child,null,o),t.child.memoizedState=Xm(o),t.memoizedState=Qm,i);if(!(t.mode&1))return rd(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(H(419)),r=_p(i,r,void 0),rd(e,t,o,r)}if(a=(o&e.childLanes)!==0,Sn||a){if(r=Lt,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,ws(e,s),Sr(r,e,s,-1))}return fy(),r=_p(Error(H(421))),rd(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=_2.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Dn=ai(s.nextSibling),Mn=t,ot=!0,vr=null,e!==null&&(Xn[Jn++]=ds,Xn[Jn++]=hs,
vendor: 5,483 bytes, line 40
40Xn[Jn++]=fo,ds=e.id,hs=e.overflow,fo=t),t=ay(t,r.children),t.flags|=4096,t)}function iw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wm(e.return,t,n)}function Ep(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 yE(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(an(e,t,r.children,n),r=ht.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&&iw(e,n,t);else if(e.tag===19)iw(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(Je(ht,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&&vh(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ep(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&&vh(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ep(t,!0,n,null,i);break;case"together":Ep(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function bs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),mo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function d2(e,t,n){switch(t.tag){case 3:gE(t),Fa();break;case 5:H1(t);break;case 1:Cn(t.type)&&dh(t);break;case 4:Jv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Je(ph,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Je(ht,ht.current&1),t.flags|=128,null):n&t.child.childLanes?vE(e,t,n):(Je(ht,ht.current&1),e=bs(e,t,n),e!==null?e.sibling:null);Je(ht,ht.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yE(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Je(ht,ht.current),r)break;return null;case 22:case 23:return t.lanes=0,pE(e,t,n)}return bs(e,t,n)}var xE,Jm,wE,bE;xE=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}};Jm=function(){};wE=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Yi(Wr.current);var i=null;switch(n){case"input":s=bm(e,s),r=bm(e,r),i=[];break;case"select":s=mt({},s,{value:void 0}),r=mt({},r,{value:void 0}),i=[];break;case"textarea":s=Em(e,s),r=Em(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ch)}Tm(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(_c.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(_c.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&tt("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};bE=function(e,t,n,r){n!==r&&(t.flags|=4)};function Nl(e,t){if(!ot)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 Gt(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 h2(e,t,n){var r=t.pendingProps;switch(Kv(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Gt(t),null;case 1:return Cn(t.type)&&uh(),Gt(t),null;case 3:return r=t.stateNode,Va(),nt(En),nt(Xt),ty(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(td(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vr!==null&&(ag(vr),vr
vendor: 29,842 bytes, line 40
40=null))),Jm(e,t),Gt(t),null;case 5:ey(t);var s=Yi(Lc.current);if(n=t.type,e!==null&&t.stateNode!=null)wE(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return Gt(t),null}if(e=Yi(Wr.current),td(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ur]=t,r[Oc]=i,e=(t.mode&1)!==0,n){case"dialog":tt("cancel",r),tt("close",r);break;case"iframe":case"object":case"embed":tt("load",r);break;case"video":case"audio":for(s=0;s<Kl.length;s++)tt(Kl[s],r);break;case"source":tt("error",r);break;case"img":case"image":case"link":tt("error",r),tt("load",r);break;case"details":tt("toggle",r);break;case"input":px(r,i),tt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},tt("invalid",r);break;case"textarea":gx(r,i),tt("invalid",r)}Tm(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&&ed(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ed(r.textContent,a,e),s=["children",""+a]):_c.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&tt("scroll",r)}switch(n){case"input":Ku(r),mx(r,i,!0);break;case"textarea":Ku(r),vx(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ch)}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=Y_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",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[Ur]=t,e[Oc]=r,xE(e,t,!1,!1),t.stateNode=e;e:{switch(o=km(n,r),n){case"dialog":tt("cancel",e),tt("close",e),s=r;break;case"iframe":case"object":case"embed":tt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Kl.length;s++)tt(Kl[s],e);s=r;break;case"source":tt("error",e),s=r;break;case"img":case"image":case"link":tt("error",e),tt("load",e),s=r;break;case"details":tt("toggle",e),s=r;break;case"input":px(e,r),s=bm(e,r),tt("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=mt({},r,{value:void 0}),tt("invalid",e);break;case"textarea":gx(e,r),s=Em(e,r),tt("invalid",e);break;default:s=r}Tm(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?X_(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Z_(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ec(e,l):typeof l=="number"&&Ec(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(_c.hasOwnProperty(i)?l!=null&&i==="onScroll"&&tt("scroll",e):l!=null&&Rv(e,i,l,o))}switch(n){case"input":Ku(e),mx(e,r,!1);break;case"textarea":Ku(e),vx(e);break;case"option":r.value!=null&&e.setAttribute("value",""+pi(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?oa(e,!!r.multiple,i,!1):r.defaultValue!=null&&oa(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ch)}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 Gt(t),null;case 6:if(e&&t.stateNode!=null)bE(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=Yi(Lc.current),Yi(Wr.current),td(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ur]=t,(i=r.nodeValue!==n)&&(e=Mn,e!==null))switch(e.tag){case 3:ed(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ed(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ur]=t,t.stateNode=r}return Gt(t),null;case 13:if(nt(ht),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ot&&Dn!==null&&t.mode&1&&!(t.flags&128))$1(),Fa(),t.flags|=98560,i=!1;else if(i=td(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(H(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(H(317));i[Ur]=t}else Fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gt(t),i=!1}else vr!==null&&(ag(vr),vr=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||ht.current&1?At===0&&(At=3):fy())),t.updateQueue!==null&&(t.flags|=4),Gt(t),null);case 4:return Va(),Jm(e,t),e===null&&Rc(t.stateNode.containerInfo),Gt(t),null;case 10:return Zv(t.type._context),Gt(t),null;case 17:return Cn(t.type)&&uh(),Gt(t),null;case 19:if(nt(ht),i=t.memoizedState,i===null)return Gt(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Nl(i,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=vh(e),o!==null){for(t.flags|=128,Nl(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 Je(ht,ht.current&1|2),t.child}e=e.sibling}i.tail!==null&&bt()>Ba&&(t.flags|=128,r=!0,Nl(i,!1),t.lanes=4194304)}else{if(!r)if(e=vh(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ot)return Gt(t),null}else 2*bt()-i.renderingStartTime>Ba&&n!==1073741824&&(t.flags|=128,r=!0,Nl(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=bt(),t.sibling=null,n=ht.current,Je(ht,r?n&1|2:n&1),t):(Gt(t),null);case 22:case 23:return hy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?In&1073741824&&(Gt(t),t.subtreeFlags&6&&(t.flags|=8192)):Gt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function f2(e,t){switch(Kv(t),t.tag){case 1:return Cn(t.type)&&uh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Va(),nt(En),nt(Xt),ty(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ey(t),null;case 13:if(nt(ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nt(ht),null;case 4:return Va(),null;case 10:return Zv(t.type._context),null;case 22:case 23:return hy(),null;case 24:return null;default:return null}}var sd=!1,Zt=!1,p2=typeof WeakSet=="function"?WeakSet:Set,se=null;function Xo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yt(e,t,r)}else n.current=null}function eg(e,t,n){try{n()}catch(r){yt(e,t,r)}}var ow=!1;function m2(e,t){if(Mm=oh,e=T1(),Hv(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,u=0,d=0,h=e,f=null;t:for(;;){for(var v;h!==n||s!==0&&h.nodeType!==3||(a=o+s),h!==i||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(v=h.firstChild)!==null;)f=h,h=v;for(;;){if(h===e)break t;if(f===n&&++u===s&&(a=o),f===i&&++d===r&&(l=o),(v=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=v}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fm={focusedElem:e,selectionRange:n},oh=!1,se=t;se!==null;)if(t=se,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,se=e;else for(;se!==null;){t=se;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,w=g.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:fr(t.type,m),w);y.__reactInternalSnapshotBeforeUpdate=x}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(H(163))}}catch(S){yt(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,se=e;break}se=t.return}return g=ow,ow=!1,g}function dc(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&&eg(t,n,i)}s=s.next}while(s!==r)}}function df(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 tg(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 SE(e){var t=e.alternate;t!==null&&(e.alternate=null,SE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ur],delete t[Oc],delete t[Um],delete t[QN],delete t[XN])),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 _E(e){return e.tag===5||e.tag===3||e.tag===4}function aw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_E(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 ng(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=ch));else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}function rg(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(rg(e,t,n),e=e.sibling;e!==null;)rg(e,t,n),e=e.sibling}var Vt=null,mr=!1;function As(e,t,n){for(n=n.child;n!==null;)EE(e,t,n),n=n.sibling}function EE(e,t,n){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(nf,n)}catch{}switch(n.tag){case 5:Zt||Xo(n,t);case 6:var r=Vt,s=mr;Vt=null,As(e,t,n),Vt=r,mr=s,Vt!==null&&(mr?(e=Vt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vt.removeChild(n.stateNode));break;case 18:Vt!==null&&(mr?(e=Vt,n=n.stateNode,e.nodeType===8?vp(e.parentNode,n):e.nodeType===1&&vp(e,n),jc(e)):vp(Vt,n.stateNode));break;case 4:r=Vt,s=mr,Vt=n.stateNode.containerInfo,mr=!0,As(e,t,n),Vt=r,mr=s;break;case 0:case 11:case 14:case 15:if(!Zt&&(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)&&eg(n,t,o),s=s.next}while(s!==r)}As(e,t,n);break;case 1:if(!Zt&&(Xo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){yt(n,t,a)}As(e,t,n);break;case 21:As(e,t,n);break;case 22:n.mode&1?(Zt=(r=Zt)||n.memoizedState!==null,As(e,t,n),Zt=r):As(e,t,n);break;default:As(e,t,n)}}function lw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new p2),t.forEach(function(r){var s=E2.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function lr(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:Vt=a.stateNode,mr=!1;break e;case 3:Vt=a.stateNode.containerInfo,mr=!0;break e;case 4:Vt=a.stateNode.containerInfo,mr=!0;break e}a=a.return}if(Vt===null)throw Error(H(160));EE(i,o,s),Vt=null,mr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){yt(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)CE(t,e),t=t.sibling}function CE(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(lr(t,e),Ir(e),r&4){try{dc(3,e,e.return),df(3,e)}catch(m){yt(e,e.return,m)}try{dc(5,e,e.return)}catch(m){yt(e,e.return,m)}}break;case 1:lr(t,e),Ir(e),r&512&&n!==null&&Xo(n,n.return);break;case 5:if(lr(t,e),Ir(e),r&512&&n!==null&&Xo(n,n.return),e.flags&32){var s=e.stateNode;try{Ec(s,"")}catch(m){yt(e,e.return,m)}}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&&G_(s,i),km(a,o);var u=km(a,i);for(o=0;o<l.length;o+=2){var d=l[o],h=l[o+1];d==="style"?X_(s,h):d==="dangerouslySetInnerHTML"?Z_(s,h):d==="children"?Ec(s,h):Rv(s,d,h,u)}switch(a){case"input":Sm(s,i);break;case"textarea":q_(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?oa(s,!!i.multiple,v,!1):f!==!!i.multiple&&(i.defaultValue!=null?oa(s,!!i.multiple,i.defaultValue,!0):oa(s,!!i.multiple,i.multiple?[]:"",!1))}s[Oc]=i}catch(m){yt(e,e.return,m)}}break;case 6:if(lr(t,e),Ir(e),r&4){if(e.stateNode===null)throw Error(H(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(m){yt(e,e.return,m)}}break;case 3:if(lr(t,e),Ir(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jc(t.containerInfo)}catch(m){yt(e,e.return,m)}break;case 4:lr(t,e),Ir(e);break;case 13:lr(t,e),Ir(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(uy=bt())),r&4&&lw(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Zt=(u=Zt)||d,lr(t,e),Zt=u):lr(t,e),Ir(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(se=e,d=e.child;d!==null;){for(h=se=d;se!==null;){switch(f=se,v=f.child,f.tag){case 0:case 11:case 14:case 15:dc(4,f,f.return);break;case 1:Xo(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){yt(r,n,m)}}break;case 5:Xo(f,f.return);break;case 22:if(f.memoizedState!==null){uw(h);continue}}v!==null?(v.return=f,se=v):uw(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Q_("display",o))}catch(m){yt(e,e.return,m)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(m){yt(e,e.return,m)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:lr(t,e),Ir(e),r&4&&lw(e);break;case 21:break;default:lr(t,e),Ir(e)}}function Ir(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(_E(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ec(s,""),r.flags&=-33);var i=aw(e);rg(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=aw(e);ng(e,a,o);break;default:throw Error(H(161))}}catch(l){yt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function g2(e,t,n){se=e,TE(e)}function TE(e,t,n){for(var r=(e.mode&1)!==0;se!==null;){var s=se,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||sd;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Zt;a=sd;var u=Zt;if(sd=o,(Zt=l)&&!u)for(se=s;se!==null;)o=se,l=o.child,o.tag===22&&o.memoizedState!==null?dw(s):l!==null?(l.return=o,se=l):dw(s);for(;i!==null;)se=i,TE(i),i=i.sibling;se=s,sd=a,Zt=u}cw(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,se=i):cw(e)}}function cw(e){for(;se!==null;){var t=se;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Zt||df(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Zt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:fr(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Gx(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}Gx(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 u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&jc(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}Zt||t.flags&512&&tg(t)}catch(f){yt(t,t.return,f)}}if(t===e){se=null;break}if(n=t.sibling,n!==null){n.return=t.return,se=n;break}se=t.return}}function uw(e){for(;se!==null;){var t=se;if(t===e){se=null;break}var n=t.sibling;if(n!==null){n.return=t.return,se=n;break}se=t.return}}function dw(e){for(;se!==null;){var t=se;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{df(4,t)}catch(l){yt(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){yt(t,s,l)}}var i=t.return;try{tg(t)}catch(l){yt(t,i,l)}break;case 5:var o=t.return;try{tg(t)}catch(l){yt(t,o,l)}}}catch(l){yt(t,t.return,l)}if(t===e){se=null;break}var a=t.sibling;if(a!==null){a.return=t.return,se=a;break}se=t.return}}var v2=Math.ceil,wh=Ts.ReactCurrentDispatcher,ly=Ts.ReactCurrentOwner,tr=Ts.ReactCurrentBatchConfig,Fe=0,Lt=null,Tt=null,zt=0,In=0,Jo=ji(0),At=0,$c=null,mo=0,hf=0,cy=0,hc=null,xn=null,uy=0,Ba=1/0,ls=null,bh=!1,sg=null,ci=null,id=!1,ni=null,Sh=0,fc=0,ig=null,Ud=-1,Bd=0;function un(){return Fe&6?bt():Ud!==-1?Ud:Ud=bt()}function ui(e){return e.mode&1?Fe&2&&zt!==0?zt&-zt:e2.transition!==null?(Bd===0&&(Bd=u1()),Bd):(e=We,e!==0||(e=window.event,e=e===void 0?16:v1(e.type)),e):1}function Sr(e,t,n,r){if(50<fc)throw fc=0,ig=null,Error(H(185));yu(e,n,r),(!(Fe&2)||e!==Lt)&&(e===Lt&&(!(Fe&2)&&(hf|=n),At===4&&Hs(e,zt)),Tn(e,r),n===1&&Fe===0&&!(t.mode&1)&&(Ba=bt()+500,lf&&Pi()))}function Tn(e,t){var n=e.callbackNode;eN(e,t);var r=ih(e,e===Lt?zt:0);if(r===0)n!==null&&wx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&wx(n),t===1)e.tag===0?JN(hw.bind(null,e)):D1(hw.bind(null,e)),YN(function(){!(Fe&6)&&Pi()}),n=null;else{switch(d1(r)){case 1:n=Dv;break;case 4:n=l1;break;case 16:n=sh;break;case 536870912:n=c1;break;default:n=sh}n=IE(n,kE.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function kE(e,t){if(Ud=-1,Bd=0,Fe&6)throw Error(H(327));var n=e.callbackNode;if(da()&&e.callbackNode!==n)return null;var r=ih(e,e===Lt?zt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=_h(e,r);else{t=r;var s=Fe;Fe|=2;var i=PE();(Lt!==e||zt!==t)&&(ls=null,Ba=bt()+500,oo(e,t));do try{w2();break}catch(a){jE(e,a)}while(!0);Yv(),wh.current=i,Fe=s,Tt!==null?t=0:(Lt=null,zt=0,t=At)}if(t!==0){if(t===2&&(s=Nm(e),s!==0&&(r=s,t=og(e,s))),t===1)throw n=$c,oo(e,0),Hs(e,r),Tn(e,bt()),n;if(t===6)Hs(e,r);else{if(s=e.current.alternate,!(r&30)&&!y2(s)&&(t=_h(e,r),t===2&&(i=Nm(e),i!==0&&(r=i,t=og(e,i))),t===1))throw n=$c,oo(e,0),Hs(e,r),Tn(e,bt()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:Bi(e,xn,ls);break;case 3:if(Hs(e,r),(r&130023424)===r&&(t=uy+500-bt(),10<t)){if(ih(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){un(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Vm(Bi.bind(null,e,xn,ls),t);break}Bi(e,xn,ls);break;case 4:if(Hs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-br(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=bt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*v2(r/1960))-r,10<r){e.timeoutHandle=Vm(Bi.bind(null,e,xn,ls),r);break}Bi(e,xn,ls);break;case 5:Bi(e,xn,ls);break;default:throw Error(H(329))}}}return Tn(e,bt()),e.callbackNode===n?kE.bind(null,e):null}function og(e,t){var n=hc;return e.current.memoizedState.isDehydrated&&(oo(e,t).flags|=256),e=_h(e,t),e!==2&&(t=xn,xn=n,t!==null&&ag(t)),e}function ag(e){xn===null?xn=e:xn.push.apply(xn,e)}function y2(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(!Er(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 Hs(e,t){for(t&=~cy,t&=~hf,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-br(t),r=1<<n;e[n]=-1,t&=~r}}function hw(e){if(Fe&6)throw Error(H(327));da();var t=ih(e,0);if(!(t&1))return Tn(e,bt()),null;var n=_h(e,t);if(e.tag!==0&&n===2){var r=Nm(e);r!==0&&(t=r,n=og(e,r))}if(n===1)throw n=$c,oo(e,0),Hs(e,t),Tn(e,bt()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bi(e,xn,ls),Tn(e,bt()),null}function dy(e,t){var n=Fe;Fe|=1;try{return e(t)}finally{Fe=n,Fe===0&&(Ba=bt()+500,lf&&Pi())}}function go(e){ni!==null&&ni.tag===0&&!(Fe&6)&&da();var t=Fe;Fe|=1;var n=tr.transition,r=We;try{if(tr.transition=null,We=1,e)return e()}finally{We=r,tr.transition=n,Fe=t,!(Fe&6)&&Pi()}}function hy(){In=Jo.current,nt(Jo)}function oo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,qN(n)),Tt!==null)for(n=Tt.return;n!==null;){var r=n;switch(Kv(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&uh();break;case 3:Va(),nt(En),nt(Xt),ty();break;case 5:ey(r);break;case 4:Va();break;case 13:nt(ht);break;case 19:nt(ht);break;case 10:Zv(r.type._context);break;case 22:case 23:hy()}n=n.return}if(Lt=e,Tt=e=di(e.current,null),zt=In=t,At=0,$c=null,cy=hf=mo=0,xn=hc=null,qi!==null){for(t=0;t<qi.length;t++)if(n=qi[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}qi=null}return e}function jE(e,t){do{var n=Tt;try{if(Yv(),Fd.current=xh,yh){for(var r=pt.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}yh=!1}if(po=0,Ot=Pt=pt=null,uc=!1,Dc=0,ly.current=null,n===null||n.return===null){At=1,$c=t,Tt=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=zt,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=a,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=Jx(o);if(v!==null){v.flags&=-257,ew(v,o,a,i,t),v.mode&1&&Xx(i,u,t),t=v,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){Xx(i,u,t),fy();break e}l=Error(H(426))}}else if(ot&&a.mode&1){var w=Jx(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ew(w,o,a,i,t),Gv(Ua(l,a));break e}}i=l=Ua(l,a),At!==4&&(At=2),hc===null?hc=[i]:hc.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=dE(i,l,t);Kx(i,y);break e;case 1:a=l;var x=i.type,b=i.stateNode;if(!(i.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ci===null||!ci.has(b)))){i.flags|=65536,t&=-t,i.lanes|=t;var S=hE(i,a,t);Kx(i,S);break e}}i=i.return}while(i!==null)}RE(n)}catch(_){t=_,Tt===n&&n!==null&&(Tt=n=n.return);continue}break}while(!0)}function PE(){var e=wh.current;return wh.current=xh,e===null?xh:e}function fy(){(At===0||At===3||At===2)&&(At=4),Lt===null||!(mo&268435455)&&!(hf&268435455)||Hs(Lt,zt)}function _h(e,t){var n=Fe;Fe|=2;var r=PE();(Lt!==e||zt!==t)&&(ls=null,oo(e,t));do try{x2();break}catch(s){jE(e,s)}while(!0);if(Yv(),Fe=n,wh.current=r,Tt!==null)throw Error(H(261));return Lt=null,zt=0,At}function x2(){for(;Tt!==null;)AE(Tt)}function w2(){for(;Tt!==null&&!WR();)AE(Tt)}function AE(e){var t=OE(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?RE(e):Tt=t,ly.current=null}function RE(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=f2(n,t),n!==null){n.flags&=32767,Tt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,Tt=null;return}}else if(n=h2(n,t,In),n!==null){Tt=n;return}if(t=t.sibling,t!==null){Tt=t;return}Tt=t=e}while(t!==null);At===0&&(At=5)}function Bi(e,t,n){var r=We,s=tr.transition;try{tr.transition=null,We=1,b2(e,t,n,r)}finally{tr.transition=s,We=r}return null}function b2(e,t,n,r){do da();while(ni!==null);if(Fe&6)throw Error(H(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(H(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(tN(e,i),e===Lt&&(Tt=Lt=null,zt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||id||(id=!0,IE(sh,function(){return da(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=tr.transition,tr.transition=null;var o=We;We=1;var a=Fe;Fe|=4,ly.current=null,m2(e,n),CE(n,e),UN(Fm),oh=!!Mm,Fm=Mm=null,e.current=n,g2(n),KR(),Fe=a,We=o,tr.transition=i}else e.current=n;if(id&&(id=!1,ni=e,Sh=s),i=e.pendingLanes,i===0&&(ci=null),YR(n.stateNode),Tn(e,bt()),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(bh)throw bh=!1,e=sg,sg=null,e;return Sh&1&&e.tag!==0&&da(),i=e.pendingLanes,i&1?e===ig?fc++:(fc=0,ig=e):fc=0,Pi(),null}function da(){if(ni!==null){var e=d1(Sh),t=tr.transition,n=We;try{if(tr.transition=null,We=16>e?16:e,ni===null)var r=!1;else{if(e=ni,ni=null,Sh=0,Fe&6)throw Error(H(331));var s=Fe;for(Fe|=4,se=e.current;se!==null;){var i=se,o=i.child;if(se.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(se=u;se!==null;){var d=se;switch(d.tag){case 0:case 11:case 15:dc(8,d,i)}var h=d.child;if(h!==null)h.return=d,se=h;else for(;se!==null;){d=se;var f=d.sibling,v=d.return;if(SE(d),d===u){se=null;break}if(f!==null){f.return=v,se=f;break}se=v}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}se=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,se=o;else e:for(;se!==null;){if(i=se,i.flags&2048)switch(i.tag){case 0:case 11:case 15:dc(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,se=y;break e}se=i.return}}var x=e.current;for(se=x;se!==null;){o=se;var b=o.child;if(o.subtreeFlags&2064&&b!==null)b.return=o,se=b;else e:for(o=x;se!==null;){if(a=se,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:df(9,a)}}catch(_){yt(a,a.return,_)}if(a===o){se=null;break e}var S=a.sibling;if(S!==null){S.return=a.return,se=S;break e}se=a.return}}if(Fe=s,Pi(),Hr&&typeof Hr.onPostCommitFiberRoot=="function")try{Hr.onPostCommitFiberRoot(nf,e)}catch{}r=!0}return r}finally{We=n,tr.transition=t}}return!1}function fw(e,t,n){t=Ua(n,t),t=dE(e,t,1),e=li(e,t,1),t=un(),e!==null&&(yu(e,1,t),Tn(e,t))}function yt(e,t,n){if(e.tag===3)fw(e,e,n);else for(;t!==null;){if(t.tag===3){fw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ci===null||!ci.has(r))){e=Ua(n,e),e=hE(t,e,1),t=li(t,e,1),e=un(),t!==null&&(yu(t,1,e),Tn(t,e));break}}t=t.return}}function S2(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=un(),e.pingedLanes|=e.suspendedLanes&n,Lt===e&&(zt&n)===n&&(At===4||At===3&&(zt&130023424)===zt&&500>bt()-uy?oo(e,0):cy|=n),Tn(e,t)}function NE(e,t){t===0&&(e.mode&1?(t=Yu,Yu<<=1,!(Yu&130023424)&&(Yu=4194304)):t=1);var n=un();e=ws(e,t),e!==null&&(yu(e,t,n),Tn(e,n))}function _2(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),NE(e,n)}function E2(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(H(314))}r!==null&&r.delete(t),NE(e,n)}var OE;OE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||En.current)Sn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Sn=!1,d2(e,t,n);Sn=!!(e.flags&131072)}else Sn=!1,ot&&t.flags&1048576&&M1(t,fh,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vd(e,t),e=t.pendingProps;var s=Ma(t,Xt.current);ua(t,n),s=ry(null,t,r,e,s,n);var i=sy();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,Cn(r)?(i=!0,dh(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Xv(t),s.updater=uf,t.stateNode=s,s._reactInternals=t,Gm(t,r,e,n),t=Zm(null,t,r,!0,i,n)):(t.tag=0,ot&&i&&Wv(t),an(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vd(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=T2(r),e=fr(r,e),s){case 0:t=Ym(null,t,r,e,n);break e;case 1:t=rw(null,t,r,e,n);break e;case 11:t=tw(null,t,r,e,n);break e;case 14:t=nw(null,t,r,fr(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:fr(r,s),Ym(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:fr(r,s),rw(e,t,r,s,n);case 3:e:{if(gE(t),e===null)throw Error(H(387));
vendor: 4,674 bytes, line 40
40r=t.pendingProps,i=t.memoizedState,s=i.element,z1(e,t),gh(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=Ua(Error(H(423)),t),t=sw(e,t,r,n,s);break e}else if(r!==s){s=Ua(Error(H(424)),t),t=sw(e,t,r,n,s);break e}else for(Dn=ai(t.stateNode.containerInfo.firstChild),Mn=t,ot=!0,vr=null,n=U1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fa(),r===s){t=bs(e,t,n);break e}an(e,t,r,n)}t=t.child}return t;case 5:return H1(t),e===null&&Hm(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,$m(r,s)?o=null:i!==null&&$m(r,i)&&(t.flags|=32),mE(e,t),an(e,t,o,n),t.child;case 6:return e===null&&Hm(t),null;case 13:return vE(e,t,n);case 4:return Jv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$a(t,null,r,n):an(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:fr(r,s),tw(e,t,r,s,n);case 7:return an(e,t,t.pendingProps,n),t.child;case 8:return an(e,t,t.pendingProps.children,n),t.child;case 12:return an(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,Je(ph,r._currentValue),r._currentValue=o,i!==null)if(Er(i.value,o)){if(i.children===s.children&&!En.current){t=bs(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=ms(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Wm(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(H(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Wm(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}an(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,ua(t,n),s=rr(s),r=r(s),t.flags|=1,an(e,t,r,n),t.child;case 14:return r=t.type,s=fr(r,t.pendingProps),s=fr(r.type,s),nw(e,t,r,s,n);case 15:return fE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:fr(r,s),Vd(e,t),t.tag=1,Cn(r)?(e=!0,dh(t)):e=!1,ua(t,n),uE(t,r,s),Gm(t,r,s,n),Zm(null,t,r,!0,e,n);case 19:return yE(e,t,n);case 22:return pE(e,t,n)}throw Error(H(156,t.tag))};function IE(e,t){return a1(e,t)}function C2(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 er(e,t,n,r){return new C2(e,t,n,r)}function py(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T2(e){if(typeof e=="function")return py(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ov)return 11;if(e===Iv)return 14}return 2}function di(e,t){var n=e.alternate;return n===null?(n=er(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 zd(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")py(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case zo:return ao(n.children,s,i,t);case Nv:o=8,s|=8;break;case vm:return e=er(12,n,t,s|2),e.elementType=vm,e.lanes=i,e;case ym:return e=er(13,n,t,s),e.elementType=ym,e.lanes=i,e;case xm:return e=er(19,n,t,s),e.elementType=xm,e.lanes=i,e;case H_:return ff(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B_:o=10;break e;case z_:o=9;break e;case Ov:o=11;break e;case Iv:o=14;break e;case $s:o=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=er(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ao(e,t,n,r){return e=er(7,e,r,t),e.lanes=n,e}function ff(e,t,n,r){return e=er(22,e,r,t),e.elementType=H_,e.lanes=n,e.stateNode={isHidden:!1},e}
vendor: 5,691 bytes, line 40
40function Cp(e,t,n){return e=er(6,e,null,t),e.lanes=n,e}function Tp(e,t,n){return t=er(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function k2(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=op(0),this.expirationTimes=op(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=op(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function my(e,t,n,r,s,i,o,a,l){return e=new k2(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=er(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xv(i),e}function j2(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Bo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function LE(e){if(!e)return mi;e=e._reactInternals;e:{if(Co(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Cn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Cn(n))return L1(e,n,t)}return t}function DE(e,t,n,r,s,i,o,a,l){return e=my(n,r,!0,e,s,i,o,a,l),e.context=LE(null),n=e.current,r=un(),s=ui(n),i=ms(r,s),i.callback=t??null,li(n,i,s),e.current.lanes=s,yu(e,s,r),Tn(e,r),e}function pf(e,t,n,r){var s=t.current,i=un(),o=ui(s);return n=LE(n),t.context===null?t.context=n:t.pendingContext=n,t=ms(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=li(s,t,o),e!==null&&(Sr(e,s,o,i),Md(e,s,o)),o}function Eh(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 pw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gy(e,t){pw(e,t),(e=e.alternate)&&pw(e,t)}function P2(){return null}var ME=typeof reportError=="function"?reportError:function(e){console.error(e)};function vy(e){this._internalRoot=e}mf.prototype.render=vy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));pf(e,t,null,null)};mf.prototype.unmount=vy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;go(function(){pf(null,e,null,null)}),t[xs]=null}};function mf(e){this._internalRoot=e}mf.prototype.unstable_scheduleHydration=function(e){if(e){var t=p1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zs.length&&t!==0&&t<zs[n].priority;n++);zs.splice(n,0,e),n===0&&g1(e)}};function yy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function gf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function mw(){}function A2(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Eh(o);i.call(u)}}var o=DE(t,r,e,0,null,!1,!1,"",mw);return e._reactRootContainer=o,e[xs]=o.current,Rc(e.nodeType===8?e.parentNode:e),go(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=Eh(l);a.call(u)}}var l=my(e,0,!1,null,null,!1,!1,"",mw);return e._reactRootContainer=l,e[xs]=l.current,Rc(e.nodeType===8?e.parentNode:e),go(function(){pf(t,l,n,r)}),l}function vf(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=Eh(o);a.call(l)}}pf(t,o,e,s)}else o=A2(n,t,e,s,r);return Eh(o)}h1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Wl(t.pendingLanes);n!==0&&(Mv(t,n|1),Tn(t,bt()),!(Fe&6)&&(Ba=bt()+500,Pi()))}break;case 13:go(function(){var r=ws(e,1);if(r!==null){var s=un();Sr(r,e,1,s)}}),gy(e,1)}};Fv=function(e){if(e.tag===13){var t=ws(e,134217728);if(t!==null){var n=un();Sr(t,e,134217728,n)}gy(e,134217728)}};f1=function(e){if(e.tag===13){var t=ui(e),n=ws(e,t);if(n!==null){var r=un();Sr(n,e,t,r)}gy(e,t)}};p1=function(){return We};m1=function(e,t){var n=We;try{return We=e,t()}finally{We=n}};Pm=function(e,t,n){switch(t){case"input":if(Sm(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=af(r);if(!s)throw Error(H(90));K_(r),Sm(r,s)}}}break;case"textarea":q_(e,n);break;case"select":t=n.value,t!=null&&oa(e,!!n.multiple,t,!1)}};t1=dy;n1=go;var R2={usingClientEntryPoint:!1,Events:[wu,Go,af,J_,e1,dy]},Ol={findFiberByHostInstance:Gi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},N2={bundleType:Ol.bundleType,version:Ol.version,rendererPackageName:Ol.rendererPackageName,rendererConfig:Ol.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ts.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=i1(e),e===null?null:e.stateNode},findFiberByHostInstance:Ol.findFiberByHostInstance||P2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var od=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!od.isDisabled&&od.supportsFiber)try{nf=od.inject(N2),Hr=od}catch{}}Bn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R2;Bn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!yy(t))throw Error(H(200));return j2(e,t,null,n)};Bn.createRoot=function(e,t){if(!yy(e))throw Error(H(299));var n=!1,r="",s=ME;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=my(e,1,!1,null,null,n,!1,r,s),e[xs]=t.current,Rc(e.nodeType===8?e.parentNode:e),new vy(t)};Bn.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(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=i1(t),e=e===null?null:e.stateNode,e};Bn.flushSync=function(e){return go(e)};Bn.hydrate=function(e,t,n){if(!gf(t))throw Error(H(200));return vf(null,e,t,!0,n)};Bn.hydrateRoot=function(e,t,n){if(!yy(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=ME;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=DE(t,null,e,1,n??null,s,!1,i,o),e[xs]=t.current,Rc(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 mf(t)};Bn.render=function(e,t,n){if(!gf(t))throw Error(H(200));return vf(null,e,t,!1,n)};Bn.unmountComponentAtNode=function(e){if(!gf(e))throw Error(H(40));return e._reactRootContainer?(go(function(){vf(null,null,e,!1,function(){e._reactRootContainer=null,e[xs]=null})}),!0):!1};Bn.unstable_batchedUpdates=dy;Bn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!gf(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return vf(e,t,n,!1,r)};Bn.version="18.3.1-next-f1338f8080-20240426";function FE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FE)}catch(e){console.error(e)}}FE(),F_.exports=Bn;var To=F_.exports;const $E=C_(To);var VE,gw=To;VE=gw.createRoot,gw.hydrateRoot;const O2=1,I2=1e6;let kp=0;function L2(){return kp=(kp+1)%Number.MAX_SAFE_INTEGER,kp.toString()}const jp=new Map,vw=e=>{if(jp.has(e))return;const t=setTimeout(()=>{jp.delete(e),pc({type:"REMOVE_TOAST",toastId:e})},I2);jp.set(e,t)},D2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,O2)};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?vw(n):e.toasts.forEach(r=>{vw(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)}}},Hd=[];let Wd={toasts:[]};function pc(e){Wd=D2(Wd,e),Hd.forEach(t=>{t(Wd)})}function M2({...e}){const t=L2(),n=s=>pc({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>pc({type:"DISMISS_TOAST",toastId:t});return pc({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Pr(){const[e,t]=p.useState(Wd);return p.useEffect(()=>(Hd.push(t),()=>{const n=Hd.indexOf(t);n>-1&&Hd.splice(n,1)}),[e]),{...e,toast:M2,dismiss:n=>pc({type:"DISMISS_TOAST",toastId:n})}}function ce(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 F2(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function UE(...e){return t=>e.forEach(n=>F2(n,t))}function $e(...e){return p.useCallback(UE(...e),e)}function $2(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function u(h){const{scope:f,children:v,...g}=h,m=(f==null?void 0:f[e][l])||a,w=p.useMemo(()=>g,Object.values(g));return c.jsx(m.Provider,{value:w,children:v})}function d(h,f){const v=(f==null?void 0:f[e][l])||a,g=p.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}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,V2(s,...t)]}function V2(...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:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var gi=p.forwardRef((e,t)=>
vendor: 10,513 bytes, line 40
40{const{children:n,...r}=e,s=p.Children.toArray(n),i=s.find(U2);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 c.jsx(lg,{...r,ref:t,children:p.isValidElement(o)?p.cloneElement(o,void 0,a):null})}return c.jsx(lg,{...r,ref:t,children:n})});gi.displayName="Slot";var lg=p.forwardRef((e,t)=>{const{children:n,...r}=e;if(p.isValidElement(n)){const s=z2(n);return p.cloneElement(n,{...B2(r,n.props),ref:t?UE(t,s):s})}return p.Children.count(n)>1?p.Children.only(null):null});lg.displayName="SlotClone";var BE=({children:e})=>c.jsx(c.Fragment,{children:e});function U2(e){return p.isValidElement(e)&&e.type===BE}function B2(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 z2(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 xy(e){const t=e+"CollectionProvider",[n,r]=$2(t),[s,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:g,children:m}=v,w=M.useRef(null),y=M.useRef(new Map).current;return c.jsx(s,{scope:g,itemMap:y,collectionRef:w,children:m})};o.displayName=t;const a=e+"CollectionSlot",l=M.forwardRef((v,g)=>{const{scope:m,children:w}=v,y=i(a,m),x=$e(g,y.collectionRef);return c.jsx(gi,{ref:x,children:w})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=M.forwardRef((v,g)=>{const{scope:m,children:w,...y}=v,x=M.useRef(null),b=$e(g,x),S=i(u,m);return M.useEffect(()=>(S.itemMap.set(x,{ref:x,...y}),()=>void S.itemMap.delete(x))),c.jsx(gi,{[d]:"",ref:b,children:w})});h.displayName=u;function f(v){const g=i(e+"CollectionConsumer",v);return M.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const y=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((S,_)=>y.indexOf(S.ref.current)-y.indexOf(_.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:o,Slot:l,ItemSlot:h},f,r]}function H2(e,t){const n=p.createContext(t),r=i=>{const{children:o,...a}=i,l=p.useMemo(()=>a,Object.values(a));return c.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 sl(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];const u=h=>{var y;const{scope:f,children:v,...g}=h,m=((y=f==null?void 0:f[e])==null?void 0:y[l])||a,w=p.useMemo(()=>g,Object.values(g));return c.jsx(m.Provider,{value:w,children:v})};u.displayName=i+"Provider";function d(h,f){var m;const v=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,g=p.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const s=()=>{const i=n.map(o=>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,W2(s,...t)]}function W2(...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:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var K2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Se=K2.reduce((e,t)=>{const n=p.forwardRef((r,s)=>{const{asChild:i,...o}=r,a=i?gi:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(a,{...o,ref:s})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function zE(e,t){e&&To.flushSync(()=>e.dispatchEvent(t))}function St(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 G2(e,t=globalThis==null?void 0:globalThis.document){const n=St(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 q2="DismissableLayer",cg="dismissableLayer.update",Y2="dismissableLayer.pointerDownOutside",Z2="dismissableLayer.focusOutside",yw,HE=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Su=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=e,u=p.useContext(HE),[d,h]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=p.useState({}),g=$e(t,T=>h(T)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(w),x=d?m.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,_=X2(T=>{const k=T.target,E=[...u.branches].some(N=>N.contains(k));!S||E||(s==null||s(T),o==null||o(T),T.defaultPrevented||a==null||a())},f),j=J2(T=>{const k=T.target;[...u.branches].some(N=>N.contains(k))||(i==null||i(T),o==null||o(T),T.defaultPrevented||a==null||a())},f);return G2(T=>{x===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},f),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(yw=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),xw(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=yw)}},[d,f,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),xw())},[d,u]),p.useEffect(()=>{const T=()=>v({});return document.addEventListener(cg,T),()=>document.removeEventListener(cg,T)},[]),c.jsx(Se.div,{...l,ref:g,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:ce(e.onFocusCapture,j.onFocusCapture),onBlurCapture:ce(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:ce(e.onPointerDownCapture,_.onPointerDownCapture)})});Su.displayName=q2;var Q2="DismissableLayerBranch",WE=p.forwardRef((e,t)=>{const n=p.useContext(HE),r=p.useRef(null),s=$e(t,r);return p.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),c.jsx(Se.div,{...e,ref:s})});WE.displayName=Q2;function X2(e,t=globalThis==null?void 0:globalThis.document){const n=St(e),r=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){KE(Y2,n,u,{discrete:!0})};const u={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 J2(e,t=globalThis==null?void 0:globalThis.document){const n=St(e),r=p.useRef(!1);return p.useEffect(()=>{const s=i=>{i.target&&!r.current&&KE(Z2,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 xw(){const e=new CustomEvent(cg);document.dispatchEvent(e)}function KE(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?zE(s,i):s.dispatchEvent(i)}var eO=Su,tO=WE,Wt=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},nO="Portal",yf=p.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,i]=p.useState(!1);Wt(()=>i(!0),[]);const o=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?$E.createPortal(c.jsx(Se.div,{...r,ref:t}),o):null});yf.displayName=nO;function rO(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ar=e=>{const{present:t,children:n}=e,r=sO(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=$e(r.ref,iO(s));return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:i}):null};Ar.displayName="Presence";function sO(e){const[t,n]=p.useState(),r=p.useRef({}),s=p.useRef(e),i=p.useRef("none"),o=e?"mounted":"unmounted",[a,l]=rO(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=ad(r.current);i.current=a==="mounted"?u:"none"},[a]),Wt(()=>{const u=r.current,d=s.current;if(d!==e){const f=i.current,v=ad(u);e?l("MOUNT"):v==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),Wt(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=v=>{const m=ad(r.current).includes(v.animationName);if(v.target===t&&m&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=v=>{v.target===t&&(i.current=ad(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function ad(e){return(e==null?void 0:e.animationName)||"none"}function iO(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 za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,s]=oO({defaultProp:t,onChange:n}),i=e!==void 0,o=i?e:r,a=St(n),l=p.useCallback(u=>{if(i){const h=typeof u=="function"?u(e):u;
40h!==e&&a(h)}else s(u)},[i,e,s,a]);return[o,l]}function oO({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,s=p.useRef(r),i=St(t);return p.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var aO="VisuallyHidden",_u=p.forwardRef((e,t)=>c.jsx(Se.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}}));_u.displayName=aO;var lO=_u,wy="ToastProvider",[by,cO,uO]=xy("Toast"),[GE,tW]=sl("Toast",[uO]),[dO,xf]=GE(wy),qE=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=e,[a,l]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),f=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${wy}\`. Expected non-empty \`string\`.`),c.jsx(by.Provider,{scope:t,children:c.jsx(dO,{scope:t,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>d(v=>v+1),[]),onToastRemove:p.useCallback(()=>d(v=>v-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};qE.displayName=wy;var YE="ToastViewport",hO=["F8"],ug="toast.viewportPause",dg="toast.viewportResume",ZE=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=hO,label:s="Notifications ({hotkey})",...i}=e,o=xf(YE,n),a=cO(n),l=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),f=$e(t,h,o.onViewportChange),v=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;p.useEffect(()=>{const w=y=>{var b;r.length!==0&&r.every(S=>y[S]||y.code===S)&&((b=h.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[r]),p.useEffect(()=>{const w=l.current,y=h.current;if(g&&w&&y){const x=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(ug);y.dispatchEvent(j),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(dg);y.dispatchEvent(j),o.isClosePausedRef.current=!1}},S=j=>{!w.contains(j.relatedTarget)&&b()},_=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",x),w.addEventListener("focusout",S),w.addEventListener("pointermove",x),w.addEventListener("pointerleave",_),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",x),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",x),w.removeEventListener("pointerleave",_),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[g,o.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:w})=>{const x=a().map(b=>{const S=b.ref.current,_=[S,...CO(S)];return w==="forwards"?_:_.reverse()});return(w==="forwards"?x.reverse():x).flat()},[a]);return p.useEffect(()=>{const w=h.current;if(w){const y=x=>{var _,j,T;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const k=document.activeElement,E=x.shiftKey;if(x.target===w&&E){(_=u.current)==null||_.focus();return}const O=m({tabbingDirection:E?"backwards":"forwards"}),z=O.findIndex(D=>D===k);Pp(O.slice(z+1))?x.preventDefault():E?(j=u.current)==null||j.focus():(T=d.current)==null||T.focus()}};return w.addEventListener("keydown",y),()=>w.removeEventListener("keydown",y)}},[a,m]),c.jsxs(tO,{ref:l,role:"region","aria-label":s.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&c.jsx(hg,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Pp(w)}}),c.jsx(by.Slot,{scope:n,children:c.jsx(Se.ol,{tabIndex:-1,...i,ref:f})}),g&&c.jsx(hg,{ref:d,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Pp(w)}})]})});ZE.displayName=YE;var QE="ToastFocusProxy",hg=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=e,i=xf(QE,n);return c.jsx(_u,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(a))&&r()}})});hg.displayName=QE;var wf="Toast",fO="toast.swipeStart",pO="toast.swipeMove",mO="toast.swipeCancel",gO="toast.swipeEnd",XE=p.forwardRef((e,t)=>
40{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...o}=e,[a=!0,l]=za({prop:r,defaultProp:s,onChange:i});return c.jsx(Ar,{present:n||a,children:c.jsx(xO,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:St(e.onPause),onResume:St(e.onResume),onSwipeStart:ce(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ce(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:ce(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ce(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),l(!1)})})})});XE.displayName=wf;var[vO,yO]=GE(wf,{onClose(){}}),xO=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:v,...g}=e,m=xf(wf,n),[w,y]=p.useState(null),x=$e(t,D=>y(D)),b=p.useRef(null),S=p.useRef(null),_=s||m.duration,j=p.useRef(0),T=p.useRef(_),k=p.useRef(0),{onToastAdd:E,onToastRemove:N}=m,U=St(()=>{var q;(w==null?void 0:w.contains(document.activeElement))&&((q=m.viewport)==null||q.focus()),o()}),O=p.useCallback(D=>{!D||D===1/0||(window.clearTimeout(k.current),j.current=new Date().getTime(),k.current=window.setTimeout(U,D))},[U]);p.useEffect(()=>{const D=m.viewport;if(D){const q=()=>{O(T.current),u==null||u()},F=()=>{const K=new Date().getTime()-j.current;T.current=T.current-K,window.clearTimeout(k.current),l==null||l()};return D.addEventListener(ug,F),D.addEventListener(dg,q),()=>{D.removeEventListener(ug,F),D.removeEventListener(dg,q)}}},[m.viewport,_,l,u,O]),p.useEffect(()=>{i&&!m.isClosePausedRef.current&&O(_)},[i,_,m.isClosePausedRef,O]),p.useEffect(()=>(E(),()=>N()),[E,N]);const z=p.useMemo(()=>w?iC(w):null,[w]);return m.viewport?c.jsxs(c.Fragment,{children:[z&&c.jsx(wO,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),c.jsx(vO,{scope:n,onClose:U,children:To.createPortal(c.jsx(by.ItemSlot,{scope:n,children:c.jsx(eO,{asChild:!0,onEscapeKeyDown:ce(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||U(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:c.jsx(Se.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ce(e.onKeyDown,D=>{D.key==="Escape"&&(a==null||a(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,U()))}),onPointerDown:ce(e.onPointerDown,D=>{D.button===0&&(b.current={x:D.clientX,y:D.clientY})}),onPointerMove:ce(e.onPointerMove,D=>{if(!b.current)return;const q=D.clientX-b.current.x,F=D.clientY-b.current.y,K=!!S.current,R=["left","right"].includes(m.swipeDirection),$=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,J=R?$(0,q):0,Q=R?0:$(0,F),oe=D.pointerType==="touch"?10:2,ae={x:J,y:Q},Pe={originalEvent:D,delta:ae};K?(S.current=ae,ld(pO,h,Pe,{discrete:!1})):ww(ae,m.swipeDirection,oe)?(S.current=ae,ld(fO,d,Pe,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(q)>oe||Math.abs(F)>oe)&&(b.current=null)}),onPointerUp:ce(e.onPointerUp,D=>{const q=S.current,F=D.target;if(F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),S.current=null,b.current=null,q){const K=D.currentTarget,R={originalEvent:D,delta:q};ww(q,m.swipeDirection,m.swipeThreshold)?ld(gO,v,R,{discrete:!0}):ld(mO,f,R,{discrete:!0}),K.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),wO=e=>{const{__scopeToast:t,children:n,...r}
40=e,s=xf(wf,t),[i,o]=p.useState(!1),[a,l]=p.useState(!1);return _O(()=>o(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:c.jsx(yf,{asChild:!0,children:c.jsx(_u,{...r,children:i&&c.jsxs(c.Fragment,{children:[s.label," ",n]})})})},bO="ToastTitle",JE=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(Se.div,{...r,ref:t})});JE.displayName=bO;var SO="ToastDescription",eC=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return c.jsx(Se.div,{...r,ref:t})});eC.displayName=SO;var tC="ToastAction",nC=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?c.jsx(sC,{altText:n,asChild:!0,children:c.jsx(Sy,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${tC}\`. Expected non-empty \`string\`.`),null)});nC.displayName=tC;var rC="ToastClose",Sy=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,s=yO(rC,n);return c.jsx(sC,{asChild:!0,children:c.jsx(Se.button,{type:"button",...r,ref:t,onClick:ce(e.onClick,s.onClose)})})});Sy.displayName=rC;var sC=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...s}=e;return c.jsx(Se.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:t})});function iC(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),EO(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(...iC(r))}}),t}function ld(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?zE(s,i):s.dispatchEvent(i)}var ww=(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 _O(e=()=>{}){const t=St(e);Wt(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function EO(e){return e.nodeType===e.ELEMENT_NODE}function CO(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 Pp(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var TO=qE,oC=ZE,aC=XE,lC=JE,cC=eC,uC=nC,dC=Sy;function hC(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=hC(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fC(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=hC(e))&&(r&&(r+=" "),r+=t);return r}const bw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Sw=fC,_y=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Sw(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(u=>{const d=n==null?void 0:n[u],h=i==null?void 0:i[u];if(d===null)return null;const f=bw(d)||bw(h);return s[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...v}=d;return Object.entries(v).every(g=>{let[m,w]=g;return Array.isArray(w)?w.includes({...i,...a}[m]):{...i,...a}[m]===w})?[...u,h,f]:u},[]);return Sw(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const kO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pC=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var jO={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"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const PO=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,...jO,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:pC("lucide",s),...a},[...o.map(([u,d])=>p.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const pn=(e,t)=>{const n=p.forwardRef(({className:r,...s},i)=>p.createElement(PO,{ref:i,iconNode:t,className:pC(`lucide-${kO(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const AO=pn("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const mC=pn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const RO=pn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const NO=pn("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree.
85 */const OO=pn("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"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const _w=pn("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"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const IO=pn("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const LO=pn("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"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Eu=pn("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"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Cu=pn("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const DO=pn("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const MO=pn("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"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const FO=pn("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const Tu=pn("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Ey=pn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Cy="-",$O=e=>{const t=UO(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Cy);return a[0]===""&&a.length!==1&&a.shift(),gC(a,t)||VO(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},gC=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?gC(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Cy);return(o=t.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},Ew=/^\[(.+)\]$/,VO=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}},UO=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};
vendor: 5,066 bytes, line 135
135return zO(Object.entries(e.classGroups),n).forEach(([i,o])=>{fg(o,r,i,t)}),r},fg=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:Cw(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(BO(s)){fg(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,o])=>{fg(o,Cw(t,i),n,r)})})},Cw=(e,t)=>{let n=e;return t.split(Cy).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},BO=e=>e.isThemeGetter,zO=(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,HO=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)}}},vC="!",WO=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,o=a=>{const l=[];let u=0,d=0,h;for(let w=0;w<a.length;w++){let y=a[w];if(u===0){if(y===s&&(r||a.slice(w,w+i)===t)){l.push(a.slice(d,w)),d=w+i;continue}if(y==="/"){h=w;continue}}y==="["?u++:y==="]"&&u--}const f=l.length===0?a:a.substring(d),v=f.startsWith(vC),g=v?f.substring(1):f,m=h&&h>d?h-d:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},KO=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},GO=e=>({cache:HO(e.cacheSize),parseClassName:WO(e),...$O(e)}),qO=/\s+/,YO=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],o=e.trim().split(qO);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:v}=n(u);let g=!!v,m=r(g?f.substring(0,v):f);if(!m){if(!g){a=u+(a.length>0?" "+a:a);continue}if(m=r(f),!m){a=u+(a.length>0?" "+a:a);continue}g=!1}const w=KO(d).join(":"),y=h?w+vC:w,x=y+m;if(i.includes(x))continue;i.push(x);const b=s(m,g);for(let S=0;S<b.length;++S){const _=b[S];i.push(y+_)}a=u+(a.length>0?" "+a:a)}return a};function ZO(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=yC(t))&&(r&&(r+=" "),r+=n);return r}const yC=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=yC(e[r]))&&(n&&(n+=" "),n+=t);return n};function QO(e,...t){let n,r,s,i=o;function o(l){const u=t.reduce((d,h)=>h(d),e());return n=GO(u),r=n.cache.get,s=n.cache.set,i=a,a(l)}function a(l){const u=r(l);if(u)return u;const d=YO(l,n);return s(l,d),d}return function(){return i(ZO.apply(null,arguments))}}const et=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},xC=/^\[(?:([a-z-]+):)?(.+)\]$/i,XO=/^\d+\/\d+$/,JO=new Set(["px","full","screen"]),eI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tI=/\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$/,nI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ss=e=>ha(e)||JO.has(e)||XO.test(e),Rs=e=>il(e,"length",hI),ha=e=>!!e&&!Number.isNaN(Number(e)),Ap=e=>il(e,"number",ha),Il=e=>!!e&&Number.isInteger(Number(e)),iI=e=>e.endsWith("%")&&ha(e.slice(0,-1)),Ce=e=>xC.test(e),Ns=e=>eI.test(e),oI=new Set(["length","size","percentage"]),aI=e=>il(e,oI,wC),lI=e=>il(e,"position",wC),cI=new Set(["image","url"]),uI=e=>il(e,cI,pI),dI=e=>il(e,"",fI),Ll=()=>!0,il=(e,t,n)=>{const r=xC.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},hI=e=>tI.test(e)&&!nI.test(e),wC=()=>!1,fI=e=>rI.test(e),pI=e=>sI.test(e),mI=()=>{const e=et("colors"),t=et("spacing"),n=et("blur"),r=et("brightness"),s=et("borderColor"),i=et("borderRadius"),o=et("borderSpacing"),a=et("borderWidth"),l=et("contrast"),u=et("grayscale"),d=et("hueRotate"),h=et("invert"),f=et("gap"),v=et("gradientColorStops"),g=et("gradientColorStopPositions"),m=et("inset"),w=et("margin"),y=et("opacity"),x=et("padding"),b=et("saturate"),S=et("scale"),_=et("sepia"),j=et("skew"),T=et("space"),k=et("translate"),E=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",Ce,t],O=()=>[Ce,t],z=()=>["",ss,Rs],D=()=>["auto",ha,Ce],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",Ce],J=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[ha,Ce];return{cacheSize:500,separator:":",theme:{colors:[Ll],spacing:[ss,Rs],blur:["none","",
vendor: 11,576 bytes, line 135
135Ns,Ce],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Ns,Ce],borderSpacing:O(),borderWidth:z(),contrast:Q(),grayscale:$(),hueRotate:Q(),invert:$(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[iI,Rs],inset:U(),margin:U(),opacity:Q(),padding:O(),saturate:Q(),scale:Q(),sepia:$(),skew:Q(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ce]}],container:["container"],columns:[{columns:[Ns]}],"break-after":[{"break-after":J()}],"break-before":[{"break-before":J()}],"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:[...q(),Ce]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Il,Ce]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ce]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Il,Ce]}],"grid-cols":[{"grid-cols":[Ll]}],"col-start-end":[{col:["auto",{span:["full",Il,Ce]},Ce]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Ll]}],"row-start-end":[{row:["auto",{span:[Il,Ce]},Ce]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ce]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ce]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],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",Ce,t]}],"min-w":[{"min-w":[Ce,t,"min","max","fit"]}],"max-w":[{"max-w":[Ce,t,"none","full","min","max","fit","prose",{screen:[Ns]},Ns]}],h:[{h:[Ce,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ce,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ce,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ns,Rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ap]}],"font-family":[{font:[Ll]}],"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",Ce]}],"line-clamp":[{"line-clamp":["none",ha,Ap]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ss,Ce]}],"list-image":[{"list-image":["none",Ce]}],"list-style-type":[{list:["none","disc","decimal",Ce]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ss,Rs]}],"underline-offset":[{"underline-offset":["auto",ss,Ce]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce]}],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",Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),lI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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":[y]}],"border-style":[{border:[...F(),"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":[y]}],"divide-style":[{divide:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[ss,Ce]}],"outline-w":[{outline:[ss,Rs]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ss,Rs]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ns,dI]}],"shadow-color":[{shadow:[Ll]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ns,Ce]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[b]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",Ce]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",Ce]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ce]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Il,Ce]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ce]}],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",Ce]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,647 bytes, line 135
135],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",Ce]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ss,Rs,Ap]}],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"]}}},gI=QO(mI);function we(...e){return gI(fC(e))}const vI=TO,bC=p.forwardRef(({className:e,...t},n)=>c.jsx(oC,{ref:n,className:we("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}));bC.displayName=oC.displayName;const yI=_y("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"}}),SC=p.forwardRef(({className:e,variant:t,...n},r)=>c.jsx(aC,{ref:r,className:we(yI({variant:t}),e),...n}));SC.displayName=aC.displayName;const xI=p.forwardRef(({className:e,...t},n)=>c.jsx(uC,{ref:n,className:we("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}));xI.displayName=uC.displayName;const _C=p.forwardRef(({className:e,...t},n)=>c.jsx(dC,{ref:n,className:we("absolute right-2 top-2 rounded-md p-1 text-foreground
135/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:c.jsx(Ey,{className:"h-4 w-4"})}));_C.displayName=dC.displayName;const EC=p.forwardRef(({className:e,...t},n)=>c.jsx(lC,{ref:n,className:we("text-sm font-semibold",e),...t}));EC.displayName=lC.displayName;const CC=p.forwardRef(({className:e,...t},n)=>c.jsx(cC,{ref:n,className:we("text-sm opacity-90",e),...t}));CC.displayName=cC.displayName;function wI(){const{toasts:e}=Pr();return c.jsxs(vI,{children:[e.map(function({id:t,title:n,description:r,action:s,...i}){return c.jsxs(SC,{...i,children:[c.jsxs("div",{className:"grid gap-1",children:[n&&c.jsx(EC,{children:n}),r&&c.jsx(CC,{children:r})]}),s,c.jsx(_C,{})]},t)}),c.jsx(bC,{})]})}var Tw=["light","dark"],bI="(prefers-color-scheme: dark)",SI=p.createContext(void 0),_I={setTheme:e=>{},themes:[]},EI=()=>{var e;return(e=p.useContext(SI))!=null?e:_I};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let u=i==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=s?Tw.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(g,m=!1,w=!0)=>{let y=o?o[g]:g,x=m?g+"|| ''":`'${y}'`,b="";return s&&w&&!m&&Tw.includes(g)&&(b+=`d.style.colorScheme = '${g}';`),n==="class"?m||y?b+=`c.add(${x})`:b+="null":y&&(b+=`d[s](n,${x})`),b},v=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${bI}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(i,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:v}})});var CI=e=>{switch(e){case"success":return jI;case"info":return AI;case"warning":return PI;case"error":return RI;default:return null}},TI=Array(12).fill(0),kI=({visible:e})=>M.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},M.createElement("div",{className:"sonner-spinner"},TI.map((t,n)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),jI=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),PI=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),AI=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),RI=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),NI=()=>
135{let[e,t]=M.useState(document.hidden);return M.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},pg=1,OI=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:pg++,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)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
135this.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(LI(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)||pg++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},On=new OI,II=(e,t)=>{let n=(t==null?void 0:t.id)||pg++;return On.addToast({title:e,...t,id:n}),n},LI=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DI=II,MI=()=>On.toasts;Object.assign(DI,{success:On.success,info:On.info,warning:On.warning,error:On.error,custom:On.custom,message:On.message,promise:On.promise,dismiss:On.dismiss,loading:On.loading},{getHistory:MI});function FI(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))}FI(`: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;
135left: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}
135: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%)} 136`);function cd(e){return e.label!==void 0}var $I=3,VI="32px",UI=4e3,BI=356,zI=14,HI=20,WI=200;function KI(...e){return e.filter(Boolean).join(" ")}var GI=e=>{var t,n,r,s,i,o,a,l,u,d;let{invert:h,toast:f,unstyled:v,interacting:g,setHeights:m,visibleToasts:w,heights:y,index:x,toasts:b,expanded:S,removeToast:_,defaultRichColors:j,closeButton:T,style:k,cancelButtonStyle:E,actionButtonStyle:N,className:U="",descriptionClassName:O="",duration:z,position:D,gap:q,loadingIcon:F,expandByDefault:K,classNames:R,icons:$,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:
136Q,cn:oe}=e,[ae,Pe]=M.useState(!1),[st,ve]=M.useState(!1),[ne,Te]=M.useState(!1),[Ue,he]=M.useState(!1),[Ne,be]=M.useState(0),[Ke,at]=M.useState(0),Hn=M.useRef(null),Rt=M.useRef(null),Nr=x===0,C=x+1<=w,A=f.type,I=f.dismissible!==!1,X=f.className||"",G=f.descriptionClassName||"",B=M.useMemo(()=>y.findIndex(ge=>ge.toastId===f.id)||0,[y,f.id]),ue=M.useMemo(()=>{var ge;return(ge=f.closeButton)!=null?ge:T},[f.closeButton,T]),_e=M.useMemo(()=>f.duration||z||UI,[f.duration,z]),it=M.useRef(0),Be=M.useRef(0),en=M.useRef(0),Dt=M.useRef(null),[or,ar]=D.split("-"),js=M.useMemo(()=>y.reduce((ge,qe,Ge)=>Ge>=B?ge:ge+qe.height,0),[y,B]),Li=NI(),Ao=f.invert||h,ns=A==="loading";Be.current=M.useMemo(()=>B*q+js,[B,js]),M.useEffect(()=>{Pe(!0)},[]),M.useLayoutEffect(()=>{if(!ae)return;let ge=Rt.current,qe=ge.style.height;ge.style.height="auto";let Ge=ge.getBoundingClientRect().height;ge.style.height=qe,at(Ge),m(tn=>tn.find(nn=>nn.toastId===f.id)?tn.map(nn=>nn.toastId===f.id?{...nn,height:Ge}:nn):[{toastId:f.id,height:Ge,position:f.position},...tn])},[ae,f.title,f.description,m,f.id]);let Wn=M.useCallback(()=>{ve(!0),be(Be.current),m(ge=>ge.filter(qe=>qe.toastId!==f.id)),setTimeout(()=>{_(f)},WI)},[f,_,m,Be]);M.useEffect(()=>{if(f.promise&&A==="loading"||f.duration===1/0||f.type==="loading")return;let ge,qe=_e;return S||g||Q&&Li?(()=>{if(en.current<it.current){let Ge=new Date().getTime()-it.current;qe=qe-Ge}en.current=new Date().getTime()})():qe!==1/0&&(it.current=new Date().getTime(),ge=setTimeout(()=>{var Ge;(Ge=f.onAutoClose)==null||Ge.call(f,f),Wn()},qe)),()=>clearTimeout(ge)},[S,g,K,f,_e,Wn,f.promise,A,Q,Li]),M.useEffect(()=>{let ge=Rt.current;if(ge){let qe=ge.getBoundingClientRect().height;return at(qe),m(Ge=>[{toastId:f.id,height:qe,position:f.position},...Ge]),()=>m(Ge=>Ge.filter(tn=>tn.toastId!==f.id))}},[m,f.id]),M.useEffect(()=>{f.delete&&Wn()},[Wn,f.delete]);function Or(){return $!=null&&$.loading?M.createElement("div",{className:"sonner-loader","data-visible":A==="loading"},$.loading):F?M.createElement("div",{className:"sonner-loader","data-visible":A==="loading"},F):M.createElement(kI,{visible:A==="loading"})}return M.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Rt,className:oe(U,X,R==null?void 0:R.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[A],(n=f==null?void 0:f.classNames)==null?void 0:n[A]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:j,"data-styled":!(f.jsx||f.unstyled||v),"data-mounted":ae,"data-promise":!!f.promise,"data-removed":st,"data-visible":C,"data-y-position":or,"data-x-position":ar,"data-index":x,"data-front":Nr,"data-swiping":ne,"data-dismissible":I,"data-type":A,"data-invert":Ao,"data-swipe-out":Ue,"data-expanded":!!(S||K&&ae),style:{"--index":x,"--toasts-before":x,"--z-index":b.length-x,"--offset":`${st?Ne:Be.current}px`,"--initial-height":K?"auto":`${Ke}px`,...k,...f.style},onPointerDown:ge=>{ns||!I||(Hn.current=new Date,be(Be.current),ge.target.setPointerCapture(ge.pointerId),ge.target.tagName!=="BUTTON"&&(Te(!0),Dt.current={x:ge.clientX,y:ge.clientY}))},onPointerUp:()=>{var ge,qe,Ge,tn;if(Ue||!I)return;Dt.current=null;let nn=Number(((ge=Rt.current)==null?void 0:ge.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Di=new Date().getTime()-((qe=Hn.current)==null?void 0:qe.getTime()),Vu=Math.abs(nn)/Di;if(Math.abs(nn)>=HI||Vu>.11){be(Be.current),(Ge=f.onDismiss)==null||Ge.call(f,f),Wn(),he(!0);return}(tn=Rt.current)==null||tn.style.setProperty("--swipe-amount","0px"),Te(!1)},onPointerMove:ge=>{var qe;if(!Dt.current||!I)return;let Ge=ge.clientY-Dt.current.y,tn=ge.clientX-Dt.current.x,nn=(or==="top"?Math.min:Math.max)(0,Ge),Di=ge.pointerType==="touch"?10:2;Math.abs(nn)>Di?(qe=Rt.current)==null||qe.style.setProperty("--swipe-amount",`${Ge}px`):Math.abs(tn)>Di&&(Dt.current=null)}},ue&&!f.jsx?M.createElement("button",{"aria-label":J,"data-disabled":ns,"data-close-button":!0,onClick:ns||!I?()=>{}:()=>{var ge;Wn(),(ge=f.onDismiss)==null||ge.call(f,f)},className:oe(R==null?void 0:R.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||M.isValidElement(f.title)?f.jsx||f.title:M.createElement(M.Fragment,null,A||f.icon||f.promise?M.createElement("div",{"data-icon":"",className:oe(R==null?void 0:R.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Or():null,f.type!=="loading"?f.icon||($==null?void 0:$[A])||CI(A):null):null,M.createElement("div",{"data-content":"",className:oe(R==null?void 0:R.content,(o=f==null?void 0:f.classNames)==null?void 0:o.content)},M.createElement("div",{"data-title":"",className:oe(R==null?void 0:R.title,(a=f==null?void 0:f.classNames)==null?void 0:a.title)},f.title),f.description?M.createElement("div",{"data-description":"",className:oe(O,G,R==null?void 0:R.description,(l=f==null?void 0:f.classNames)==null?void 0:l.description)},f.description):null),M.isValidElement(f.cancel)?f.cancel:f.cancel&&cd(f.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||E,onClick:ge=>{var qe,Ge;cd(f.cancel)&&I&&((Ge=(qe=f.cancel).onClick)==null||Ge.call(qe,ge),Wn())},className:oe(R==null?void 0:R.cancelButton,(u=f==null?void 0:f.classNames)==null?void 0:u.cancelButton)},f.cancel.label):null,M.isValidElement(f.action)?f.action:f.action&&cd(f.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||N,onClick:ge=>{var qe,Ge;cd(f.action)&&(ge.defaultPrevented||((Ge=(qe=f.action).onClick)==null||Ge.call(qe,ge),Wn()))},className:oe(R==null?void 0:R.actionButton,(d=f==null?void 0:f.classNames)==null?void 0:d.actionButton)},f.action.label):null))};function kw(){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 qI=e=>{let{invert:t,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:i,className:o,offset:a,theme:l="light",richColors:u,duration:d,style:h,visibleToasts:f=$I,toastOptions:v,dir:g=kw(),gap:m=zI,loadingIcon:w,icons:y,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:b,cn:S=KI}=e,[_,j]=M.useState([]),T=M.useMemo(()=>Array.from(new Set([n].concat(_.filter(Q=>Q.position).map(Q=>Q.position)))),[_,n]),[k,E]=M.useState([]),[N,U]=M.useState(!1),[O,z]=M.use
136State(!1),[D,q]=M.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=M.useRef(null),K=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=M.useRef(null),$=M.useRef(!1),J=M.useCallback(Q=>{var oe;(oe=_.find(ae=>ae.id===Q.id))!=null&&oe.delete||On.dismiss(Q.id),j(ae=>ae.filter(({id:Pe})=>Pe!==Q.id))},[_]);return M.useEffect(()=>On.subscribe(Q=>{if(Q.dismiss){j(oe=>oe.map(ae=>ae.id===Q.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{$E.flushSync(()=>{j(oe=>{let ae=oe.findIndex(Pe=>Pe.id===Q.id);return ae!==-1?[...oe.slice(0,ae),{...oe[ae],...Q},...oe.slice(ae+1)]:[Q,...oe]})})})}),[]),M.useEffect(()=>{if(l!=="system"){q(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:Q})=>{q(Q?"dark":"light")})},[l]),M.useEffect(()=>{_.length<=1&&U(!1)},[_]),M.useEffect(()=>{let Q=oe=>{var ae,Pe;r.every(st=>oe[st]||oe.code===st)&&(U(!0),(ae=F.current)==null||ae.focus()),oe.code==="Escape"&&(document.activeElement===F.current||(Pe=F.current)!=null&&Pe.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[r]),M.useEffect(()=>{if(F.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,$.current=!1)}},[F.current]),_.length?M.createElement("section",{"aria-label":`${x} ${K}`,tabIndex:-1},T.map((Q,oe)=>{var ae;let[Pe,st]=Q.split("-");return M.createElement("ol",{key:Q,dir:g==="auto"?kw():g,tabIndex:-1,ref:F,className:o,"data-sonner-toaster":!0,"data-theme":D,"data-y-position":Pe,"data-x-position":st,style:{"--front-toast-height":`${((ae=k[0])==null?void 0:ae.height)||0}px`,"--offset":typeof a=="number"?`${a}px`:a||VI,"--width":`${BI}px`,"--gap":`${m}px`,...h},onBlur:ve=>{$.current&&!ve.currentTarget.contains(ve.relatedTarget)&&($.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||$.current||($.current=!0,R.current=ve.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{O||U(!1)},onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},_.filter(ve=>!ve.position&&oe===0||ve.position===Q).map((ve,ne)=>{var Te,Ue;return M.createElement(GI,{key:ve.id,icons:y,index:ne,toast:ve,defaultRichColors:u,duration:(Te=v==null?void 0:v.duration)!=null?Te:d,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:t,visibleToasts:f,closeButton:(Ue=v==null?void 0:v.closeButton)!=null?Ue:i,interacting:O,position:Q,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:J,toasts:_.filter(he=>he.position==ve.position),heights:k.filter(he=>he.position==ve.position),setHeights:E,expandByDefault:s,gap:m,loadingIcon:w,expanded:N,pauseWhenPageIsHidden:b,cn:S})}))})):null};const YI=({...e})=>{const{theme:t="system"}=EI();return c.jsx(qI,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var ZI=D_.useId||(()=>{}),QI=0;function hi(e){const[t,n]=p.useState(ZI());return Wt(()=>{e||n(r=>r??String(QI++))},[e]),e||(t?`radix-${t}`:"")}const XI=["top","right","bottom","left"],vi=Math.min,Ln=Math.max,Ch=Math.round,ud=Math.floor,yi=e=>({x:e,y:e}),JI={left:"right",right:"left",bottom:"top",top:"bottom"},eL={start:"end",end:"start"};function mg(e,t,n){return Ln(e,vi(t,n))}function Ss(e,t){return typeof e=="function"?e(t):e}function _s(e){return e.split("-")[0]}function ol(e){return e.split("-")[1]}function Ty(e){return e==="x"?"y":"x"}function ky(e){return e==="y"?"height":"width"}function xi(e){return["top","bottom"].includes(_s(e))?"y":"x"}function jy(e){return Ty(xi(e))}function tL(e,t,n){n===void 0&&(n=!1);const r=ol(e),s=jy(e),i=ky(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Th(o)),[o,Th(o)]}function nL(e){const t=Th(e);return[gg(e),t,gg(t)]}function gg(e){return e.replace(/start|end/g,t=>eL[t])}function rL(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 sL(e,t,n,r){const s=ol(e);let i=rL(_s(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(gg)))),i}function Th(e){return e.replace(/left|right|bottom|top/g,t=>JI[t])}function iL(e){return{top:0,right:0,bottom:0,left:0,...e}}function TC(e){return typeof e!="number"?iL(e):{top:e,right:e,bottom:e,left:e}}function kh(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 jw(e,t,n){let{reference:r,floating:s}=e;const i=xi(t),o=jy(t),a=ky(o),l=_s(t),u=i==="y",d=r.x+r.width/2-s.width/2,h=r.y+r.height/2-s.height/2,f=r[a]/2-s[a]/2;let v;switch(l){case"top":v={x:d,y:r.y-s.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-s.width,y:h};break;default:v={x:r.x,y:r.y}}switch(ol(t)){case"start":v[o]-=f*(n&&u?-1:1);break;case"end":v[o]+=f*(n&&u?-1:1);break}return v}const oL=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,691 bytes, line 136
136=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=jw(u,r,l),f=r,v={},g=0;for(let m=0;m<a.length;m++){const{name:w,fn:y}=a[m],{x,y:b,data:S,reset:_}=await y({x:d,y:h,initialPlacement:r,placement:f,strategy:s,middlewareData:v,rects:u,platform:o,elements:{reference:e,floating:t}});d=x??d,h=b??h,v={...v,[w]:{...v[w],...S}},_&&g<=50&&(g++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(u=_.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):_.rects),{x:d,y:h}=jw(u,f,l)),m=-1)}return{x:d,y:h,placement:f,strategy:s,middlewareData:v}};async function Vc(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:v=0}=Ss(t,e),g=TC(v),w=a[f?h==="floating"?"reference":"floating":h],y=kh(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:u,rootBoundary:d,strategy:l})),x=h==="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)),S=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},_=kh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-_.top+g.top)/S.y,bottom:(_.bottom-y.bottom+g.bottom)/S.y,left:(y.left-_.left+g.left)/S.x,right:(_.right-y.right+g.right)/S.x}}const aL=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:u,padding:d=0}=Ss(e,t)||{};if(u==null)return{};const h=TC(d),f={x:n,y:r},v=jy(s),g=ky(v),m=await o.getDimensions(u),w=v==="y",y=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",S=i.reference[g]+i.reference[v]-f[v]-i.floating[g],_=f[v]-i.reference[v],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=j?j[b]:0;(!T||!await(o.isElement==null?void 0:o.isElement(j)))&&(T=a.floating[b]||i.floating[g]);const k=S/2-_/2,E=T/2-m[g]/2-1,N=vi(h[y],E),U=vi(h[x],E),O=N,z=T-m[g]-U,D=T/2-m[g]/2+k,q=mg(O,D,z),F=!l.arrow&&ol(s)!=null&&D!==q&&i.reference[g]/2-(D<O?N:U)-m[g]/2<0,K=F?D<O?D-O:D-z:0;return{[v]:f[v]+K,data:{[v]:q,centerOffset:D-q-K,...F&&{alignmentOffset:K}},reset:F}}}),lL=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:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...w}=Ss(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=_s(s),x=xi(a),b=_s(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),_=f||(b||!m?[Th(a)]:nL(a)),j=g!=="none";!f&&j&&_.push(...sL(a,m,g,S));const T=[a,..._],k=await Vc(t,w),E=[];let N=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&E.push(k[y]),h){const D=tL(s,o,S);E.push(k[D[0]],k[D[1]])}if(N=[...N,{placement:s,overflows:E}],!E.every(D=>D<=0)){var U,O;const D=(((U=i.flip)==null?void 0:U.index)||0)+1,q=T[D];if(q)return{data:{index:D,overflows:N},reset:{placement:q}};let F=(O=N.filter(K=>K.overflows[0]<=0).sort((K,R)=>K.overflows[1]-R.overflows[1])[0])==null?void 0:O.placement;if(!F)switch(v){case"bestFit":{var z;const K=(z=N.filter(R=>{if(j){const $=xi(R.placement);return $===x||$==="y"}return!0}).map(R=>[R.placement,R.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((R,$)=>R[1]-$[1])[0])==null?void 0:z[0];K&&(F=K);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};function Pw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Aw(e){return XI.some(t=>e[t]>=0)}const cL=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=Ss(e,t);switch(r){case"referenceHidden":{const i=await Vc(t,{...s,elementContext:"reference"}),o=Pw(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Aw(o)}}}case"escaped":{const i=await Vc(t,{...s,altBoundary:!0}),o=Pw(i,n.floating);return{data:{escapedOffsets:o,escaped:Aw(o)}}}default:return{}}}}};async function uL(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=_s(n),a=ol(n),l=xi(n)==="y",u=["left","top"].includes(o)?-1:1,d=i&&l?-1:1,h=Ss(t,e);let{mainAxis:f,crossAxis:v,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof g=="number"&&(v=a==="end"?g*-1:g),l?{x:v*d,y:f*u}:{x:f*u,y:v*d}}const dL=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 uL(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}}}}},hL=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,y:x}=w;return{x:y,y:x}}},...l}=Ss(e,t),u={x:n,y:r},d=await Vc(t,l),h=xi(_s(s)),f=Ty(h);let v=u[f],g=u[h];if(i){const w=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=v+d[w],b=v-d[y];v=mg(x,v,b)}if(o){const w=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=g+d[w],b=g-d[y];g=mg(x,g,b)}const m=a.fn({...t,[f]:v,[h]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[h]:o}}}}}},fL=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:u=!0}=Ss(e,t),d={x:n,y:r},h=xi(s),f=Ty(h);let v=d[f],g=d[h];const m=Ss(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=f==="y"?"height":"width",S=i.reference[f]-i.floating[b]+w.mainAxis,_=i.reference[f]+i.reference[b]-w.mainAxis;v<S?v=S:v>_&&(v=_)}if(u){var y,x;const b=f==="y"?"width":"height",S=["top","left"].includes(_s(s)),_=i.reference[h]-i.floating[b]+(S&&((y=o.offset)==null?void 0:y[h])||0)+(S?0:w.crossAxis),j=i.reference[h]+i.reference[b]+(S?0:((x=o.offset)==null?void 0:x[h])||0)-(S?w.crossAxis:0);g<_?g=_:g>j&&(g=j)}return{[f]:v,[h]:g}}}},pL=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=()=>{},...u}=Ss(e,t),d=await Vc(t,u),h=_s(s),f=ol(s),v=xi(s)==="y",{width:g,height:m}=i.floating;let w,y;h==="top"||h==="bottom"?(w=h,y=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(y=h,w=f==="end"?"top":"bottom");const x=m-d.top-d.bottom,b=g-d.left-d.right,S=vi(m-d[w],x),_=vi(g-d[y],b),j=!t.middlewareData.shift;let T=S,k=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=x),j&&!f){const N=Ln(d.left,0),U=Ln(d.right,0),O=Ln(d.top,0),z=Ln(d.bottom,0);v?k=g-2*(N!==0||U!==0?N+U:Ln(d.left,d.right)):T=m-2*(O!==0||z!==0?O+z:Ln(d.top,d.bottom))}await l({...t,availableWidth:k,availableHeight:T});const E=await o.getDimensions(a.floating);return g!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function bf(){return typeof window<"u"}function al(e){return kC(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(kC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kC(e){return bf()?e instanceof Node||e instanceof Fn(e).Node:!1}function Cr(e){return bf()?e instanceof Element||e instanceof Fn(e).Element:!1}function Yr(e){return bf()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function Rw(e){return!bf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function ku(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function mL(e){return["table","td","th"].includes(al(e))}function Sf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Py(e){const t=Ay(),n=Cr(e)?Tr(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 gL(e){let t=wi(e);for(;Yr(t)&&!Ha(t);){if(Py(t))return t;if(Sf(t))return null;t=wi(t)}return null}function Ay(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ha(e){return["html","body","#document"].includes(al(e))}function Tr(e){return Fn(e).getComputedStyle(e)}function _f(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function wi(e){if(al(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Rw(e)&&e.host||Jr(e);return Rw(t)?t.host:t}function jC(e){const t=wi(e);return Ha(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&ku(t)?t:jC(t)}function Uc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=jC(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=Fn(s);if(i){const a=vg(o);
vendor: 7,125 bytes, line 136
136return t.concat(o,o.visualViewport||[],ku(s)?s:[],a&&n?Uc(a):[])}return t.concat(s,Uc(s,[],n))}function vg(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PC(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Yr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=Ch(n)!==i||Ch(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Ry(e){return Cr(e)?e:e.contextElement}function fa(e){const t=Ry(e);if(!Yr(t))return yi(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=PC(t);let o=(i?Ch(n.width):n.width)/r,a=(i?Ch(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const vL=yi(0);function AC(e){const t=Fn(e);return!Ay()||!t.visualViewport?vL:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function yL(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Ry(e);let o=yi(1);t&&(r?Cr(r)&&(o=fa(r)):o=fa(e));const a=yL(i,n,r)?AC(i):yi(0);let l=(s.left+a.x)/o.x,u=(s.top+a.y)/o.y,d=s.width/o.x,h=s.height/o.y;if(i){const f=Fn(i),v=r&&Cr(r)?Fn(r):r;let g=f,m=vg(g);for(;m&&r&&v!==g;){const w=fa(m),y=m.getBoundingClientRect(),x=Tr(m),b=y.left+(m.clientLeft+parseFloat(x.paddingLeft))*w.x,S=y.top+(m.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,h*=w.y,l+=b,u+=S,g=Fn(m),m=vg(g)}}return kh({width:d,height:h,x:l,y:u})}function xL(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const i=s==="fixed",o=Jr(r),a=t?Sf(t.floating):!1;if(r===o||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=yi(1);const d=yi(0),h=Yr(r);if((h||!h&&!i)&&((al(r)!=="body"||ku(o))&&(l=_f(r)),Yr(r))){const f=vo(r);u=fa(r),d.x=f.x+r.clientLeft,d.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x,y:n.y*u.y-l.scrollTop*u.y+d.y}}function wL(e){return Array.from(e.getClientRects())}function yg(e,t){const n=_f(e).scrollLeft;return t?t.left+n:vo(Jr(e)).left+n}function bL(e){const t=Jr(e),n=_f(e),r=e.ownerDocument.body,s=Ln(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ln(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+yg(e);const a=-n.scrollTop;return Tr(r).direction==="rtl"&&(o+=Ln(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function SL(e,t){const n=Fn(e),r=Jr(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const u=Ay();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function _L(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Yr(e)?fa(e):yi(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,u=r*i.y;return{width:o,height:a,x:l,y:u}}function Nw(e,t,n){let r;if(t==="viewport")r=SL(e,n);else if(t==="document")r=bL(Jr(e));else if(Cr(t))r=_L(t,n);else{const s=AC(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return kh(r)}function RC(e,t){const n=wi(e);return n===t||!Cr(n)||Ha(n)?!1:Tr(n).position==="fixed"||RC(n,t)}function EL(e,t){const n=t.get(e);if(n)return n;let r=Uc(e,[],!1).filter(a=>Cr(a)&&al(a)!=="body"),s=null;const i=Tr(e).position==="fixed";let o=i?wi(e):e;for(;Cr(o)&&!Ha(o);){const a=Tr(o),l=Py(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ku(o)&&!l&&RC(e,o))?r=r.filter(d=>d!==o):s=a,o=wi(o)}return t.set(e,r),r}function CL(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?Sf(t)?[]:EL(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,d)=>{const h=Nw(t,d,s);return u.top=Ln(h.top,u.top),u.right=vi(h.right,u.right),u.bottom=vi(h.bottom,u.bottom),u.left=Ln(h.left,u.left),u},Nw(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function TL(e){const{width:t,height:n}=PC(e);return{width:t,height:n}}function kL(e,t,n){const r=Yr(t),s=Jr(t),i=n==="fixed",o=vo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=yi(0);if(r||!r&&!i)if((al(t)!=="body"||ku(s))&&(a=_f(t)),r){const v=vo(t,!0,i,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else s&&(l.x=yg(s));let u=0,d=0;if(s&&!r&&!i){const v=s.getBoundingClientRect();d=v.top+a.scrollTop,u=v.left+a.scrollLeft-yg(s,v)}const h=o.left+a.scrollLeft-l.x-u,f=o.top+a.scrollTop-l.y-d;return{x:h,y:f,width:o.width,height:o.height}}function Rp(e){return Tr(e).position==="static"}function Ow(e,t){if(!Yr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jr(e)===n&&(n=n.ownerDocument.body),n}function NC(e,t){const n=Fn(e);if(Sf(e))return n;if(!Yr(e)){let s=wi(e);for(;s&&!Ha(s);){if(Cr(s)&&!Rp(s))return s;s=wi(s)}return n}let r=Ow(e,t);for(;r&&mL(r)&&Rp(r);)r=Ow(r,t);return r&&Ha(r)&&Rp(r)&&!Py(r)?n:r||gL(e)||n}const jL=async function(e){const t=this.getOffsetParent||NC,n=this.getDimensions,r=await n(e.floating);return{reference:kL(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function PL(e){return Tr(e).direction==="rtl"}const AL={convertOffsetParentRelativeRectToViewportRelativeRect:xL,getDocumentElement:Jr,getClippingRect:CL,getOffsetParent:NC,getElementRects:jL,getClientRects:wL,getDimensions:TL,getScale:fa,isElement:Cr,isRTL:PL};function RL(e,t){let n=null,r;const s=Jr(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:u,top:d,width:h,height:f}=e.getBoundingClientRect();if(a||t(),!h||!f)return;const v=ud(d),g=ud(s.clientWidth-(u+h)),m=ud(s.clientHeight-(d+f)),w=ud(u),x={rootMargin:-v+"px "+-g+"px "+-m+"px "+-w+"px",threshold:Ln(0,vi(1,l))||1};let b=!0;function S(_){const j=_[0].intersectionRatio;if(j!==l){if(!b)return o();j?o(!1,j):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(S,{...x,root:s.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return o(!0),i}function NL(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,u=Ry(e),d=s||i?[...u?Uc(u):[],...Uc(t)]:[];d.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const h=u&&a?RL(u,n):null;let f=-1,v=null;o&&(v=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&v&&(v.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=v)==null||b.observe(t)})),n()}),u&&!l&&v.observe(u),v.observe(t));let g,m=l?vo(e):null;l&&w();function w(){const y=vo(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,g=requestAnimationFrame(w)}return n(),()=>{var y;d.forEach(x=>{s&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),h==null||h(),(y=v)==null||y.disconnect(),v=null,l&&cancelAnimationFrame(g)}}const OL=dL,IL=hL,LL=lL,DL=pL,ML=cL,Iw=aL,FL=fL,$L=(e,t,n)=>{const r=new Map,s={platform:AL,...n},i={...s.platform,_c:r};return oL(e,t,{...s,platform:i})};var Kd=typeof document<"u"?p.useLayoutEffect:p.useEffect;function jh(e,t){if(e===t)return!0;
vendor: 6,743 bytes, line 136
136if(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(!jh(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)&&!jh(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function OC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lw(e,t){const n=OC(e);return Math.round(t*n)/n}function Np(e){const t=p.useRef(e);return Kd(()=>{t.current=e}),t}function VL(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:u}=e,[d,h]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=p.useState(r);jh(f,r)||v(r);const[g,m]=p.useState(null),[w,y]=p.useState(null),x=p.useCallback(R=>{R!==j.current&&(j.current=R,m(R))},[]),b=p.useCallback(R=>{R!==T.current&&(T.current=R,y(R))},[]),S=i||g,_=o||w,j=p.useRef(null),T=p.useRef(null),k=p.useRef(d),E=l!=null,N=Np(l),U=Np(s),O=Np(u),z=p.useCallback(()=>{if(!j.current||!T.current)return;const R={placement:t,strategy:n,middleware:f};U.current&&(R.platform=U.current),$L(j.current,T.current,R).then($=>{const J={...$,isPositioned:O.current!==!1};D.current&&!jh(k.current,J)&&(k.current=J,To.flushSync(()=>{h(J)}))})},[f,t,n,U,O]);Kd(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(R=>({...R,isPositioned:!1})))},[u]);const D=p.useRef(!1);Kd(()=>(D.current=!0,()=>{D.current=!1}),[]),Kd(()=>{if(S&&(j.current=S),_&&(T.current=_),S&&_){if(N.current)return N.current(S,_,z);z()}},[S,_,z,N,E]);const q=p.useMemo(()=>({reference:j,floating:T,setReference:x,setFloating:b}),[x,b]),F=p.useMemo(()=>({reference:S,floating:_}),[S,_]),K=p.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const $=Lw(F.floating,d.x),J=Lw(F.floating,d.y);return a?{...R,transform:"translate("+$+"px, "+J+"px)",...OC(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:J}},[n,a,F.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:z,refs:q,elements:F,floatingStyles:K}),[d,z,q,F,K])}const UL=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?Iw({element:r.current,padding:s}).fn(n):{}:r?Iw({element:r,padding:s}).fn(n):{}}}},BL=(e,t)=>({...OL(e),options:[e,t]}),zL=(e,t)=>({...IL(e),options:[e,t]}),HL=(e,t)=>({...FL(e),options:[e,t]}),WL=(e,t)=>({...LL(e),options:[e,t]}),KL=(e,t)=>({...DL(e),options:[e,t]}),GL=(e,t)=>({...ML(e),options:[e,t]}),qL=(e,t)=>({...UL(e),options:[e,t]});var YL="Arrow",IC=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:s=5,...i}=e;return c.jsx(Se.svg,{...i,ref:t,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});IC.displayName=YL;var ZL=IC;function QL(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function u(h){const{scope:f,children:v,...g}=h,m=(f==null?void 0:f[e][l])||a,w=p.useMemo(()=>g,Object.values(g));return c.jsx(m.Provider,{value:w,children:v})}function d(h,f){const v=(f==null?void 0:f[e][l])||a,g=p.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}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,XL(s,...t)]}function XL(...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:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function JL(e){const[t,n]=p.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.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 Ny="Popper",[LC,Ef]=QL(Ny),[eD,DC]=LC(Ny),MC=e=>{const{__scopePopper:t,children:n}=e,[r,s]=p.useState(null);return c.jsx(eD,{scope:t,anchor:r,onAnchorChange:s,children:n})};MC.displayName=Ny;var FC="PopperAnchor",$C=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...s}=e,i=DC(FC,n),o=p.useRef(null),a=$e(t,o);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:c.jsx(Se.div,{...s,ref:a})});$C.displayName=FC;var Oy="PopperContent",[tD,nD]=LC(Oy),VC=p.forwardRef((e,t)=>{var ne,Te,Ue,he,Ne,be;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:g,...m}=e,w=DC(Oy,n),[y,x]=p.useState(null),b=$e(t,Ke=>x(Ke)),[S,_]=p.useState(null),j=JL(S),T=(j==null?void 0:j.width)??0,k=(j==null?void 0:j.height)??0,E=r+(i!=="center"?"-"+i:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},U=Array.isArray(u)?u:[u],O=U.length>0,z={padding:N,boundary:U.filter(sD),altBoundary:O},{refs:D,floatingStyles:q,placement:F,isPositioned:K,middlewareData:R}=VL({strategy:"fixed",placement:E,whileElementsMounted:(...Ke)=>NL(...Ke,{animationFrame:v==="always"}),elements:{reference:w.anchor},middleware:[BL({mainAxis:s+k,alignmentAxis:o}),l&&zL({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?HL():void 0,...z}),l&&WL({...z}),KL({...z,apply:({elements:Ke,rects:at,availableWidth:Hn,availableHeight:Rt})=>{const{width:Nr,height:C}=at.reference,A=Ke.floating.style;A.setProperty("--radix-popper-available-width",`${Hn}px`),A.setProperty("--radix-popper-available-height",`${Rt}px`),A.setProperty("--radix-popper-anchor-width",`${Nr}px`),A.setProperty("--radix-popper-anchor-height",`${C}px`)}}),S&&qL({element:S,padding:a}),iD({arrowWidth:T,arrowHeight:k}),f&&GL({strategy:"referenceHidden",...z})]}),[$,J]=zC(F),Q=St(g);Wt(()=>{K&&(Q==null||Q())},[K,Q]);const oe=(ne=R.arrow)==null?void 0:ne.x,ae=(Te=R.arrow)==null?void 0:Te.y,Pe=((Ue=R.arrow)==null?void 0:Ue.centerOffset)!==0,[st,ve]=
vendor: 9,553 bytes, line 136
136p.useState();return Wt(()=>{y&&ve(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:K?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:st,"--radix-popper-transform-origin":[(he=R.transformOrigin)==null?void 0:he.x,(Ne=R.transformOrigin)==null?void 0:Ne.y].join(" "),...((be=R.hide)==null?void 0:be.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(tD,{scope:n,placedSide:$,onArrowChange:_,arrowX:oe,arrowY:ae,shouldHideArrow:Pe,children:c.jsx(Se.div,{"data-side":$,"data-align":J,...m,ref:b,style:{...m.style,animation:K?void 0:"none"}})})})});VC.displayName=Oy;var UC="PopperArrow",rD={top:"bottom",right:"left",bottom:"top",left:"right"},BC=p.forwardRef(function(t,n){const{__scopePopper:r,...s}=t,i=nD(UC,r),o=rD[i.placedSide];return c.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:c.jsx(ZL,{...s,ref:n,style:{...s.style,display:"block"}})})});BC.displayName=UC;function sD(e){return e!==null}var iD=e=>({name:"transformOrigin",options:e,fn(t){var w,y,x;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,[u,d]=zC(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((y=s.arrow)==null?void 0:y.x)??0)+a/2,v=(((x=s.arrow)==null?void 0:x.y)??0)+l/2;let g="",m="";return u==="bottom"?(g=o?h:`${f}px`,m=`${-l}px`):u==="top"?(g=o?h:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=o?h:`${v}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=o?h:`${v}px`),{data:{x:g,y:m}}}});function zC(e){const[t,n="center"]=e.split("-");return[t,n]}var oD=MC,HC=$C,WC=VC,KC=BC,[Cf,nW]=sl("Tooltip",[Ef]),Iy=Ef(),GC="TooltipProvider",aD=700,Dw="tooltip.open",[lD,qC]=Cf(GC),YC=e=>{const{__scopeTooltip:t,delayDuration:n=aD,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=e,[o,a]=p.useState(!0),l=p.useRef(!1),u=p.useRef(0);return p.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.jsx(lD,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:p.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(d=>{l.current=d},[]),disableHoverableContent:s,children:i})};YC.displayName=GC;var ZC="Tooltip",[rW,Tf]=Cf(ZC),xg="TooltipTrigger",cD=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Tf(xg,n),i=qC(xg,n),o=Iy(n),a=p.useRef(null),l=$e(t,a,s.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),c.jsx(HC,{asChild:!0,...o,children:c.jsx(Se.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:l,onPointerMove:ce(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:ce(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ce(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ce(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:ce(e.onBlur,s.onClose),onClick:ce(e.onClick,s.onClose)})})});cD.displayName=xg;var uD="TooltipPortal",[sW,dD]=Cf(uD,{forceMount:void 0}),Wa="TooltipContent",QC=p.forwardRef((e,t)=>{const n=dD(Wa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=e,o=Tf(Wa,e.__scopeTooltip);return c.jsx(Ar,{present:r||o.open,children:o.disableHoverableContent?c.jsx(XC,{side:s,...i,ref:t}):c.jsx(hD,{side:s,...i,ref:t})})}),hD=p.forwardRef((e,t)=>{const n=Tf(Wa,e.__scopeTooltip),r=qC(Wa,e.__scopeTooltip),s=p.useRef(null),i=$e(t,s),[o,a]=p.useState(null),{trigger:l,onClose:u}=n,d=s.current,{onPointerInTransitChange:h}=r,f=p.useCallback(()=>{a(null),h(!1)},[h]),v=p.useCallback((g,m)=>{const w=g.currentTarget,y={x:g.clientX,y:g.clientY},x=gD(y,w.getBoundingClientRect()),b=vD(y,x),S=yD(m.getBoundingClientRect()),_=wD([...b,...S]);a(_),h(!0)},[h]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&d){const g=w=>v(w,d),m=w=>v(w,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,v,f]),p.useEffect(()=>{if(o){const g=m=>{const w=m.target,y={x:m.clientX,y:m.clientY},x=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),b=!xD(y,o);x?f():b&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,u,f]),c.jsx(XC,{...e,ref:i})}),[fD,pD]=Cf(ZC,{isInside:!1}),XC=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=e,l=Tf(Wa,n),u=Iy(n),{onClose:d}=l;return p.useEffect(()=>(document.addEventListener(Dw,d),()=>document.removeEventListener(Dw,d)),[d]),p.useEffect(()=>{if(l.trigger){const h=f=>{const v=f.target;v!=null&&v.contains(l.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,d]),c.jsx(Su,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:c.jsxs(WC,{"data-state":l.stateAttribute,...u,...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:[c.jsx(BE,{children:r}),c.jsx(fD,{scope:n,isInside:!0,children:c.jsx(lO,{id:l.contentId,role:"tooltip",children:s||r})})]})})});QC.displayName=Wa;var JC="TooltipArrow",mD=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,s=Iy(n);return pD(JC,n).isInside?null:c.jsx(KC,{...s,...r,ref:t})});mD.displayName=JC;function gD(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 vD(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 yD(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 xD(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,u=t[o].x,d=t[o].y;l>r!=d>r&&n<(u-a)*(r-l)/(d-l)+a&&(s=!s)}return s}function wD(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),bD(t)}function bD(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 SD=YC,eT=QC;const _D=SD,ED=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>c.jsx(eT,{ref:r,sideOffset:t,className:we("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}));ED.displayName=eT.displayName;var ju=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(){}},yo=typeof window>"u"||"Deno"in globalThis;function Zn(){}function CD(e,t){return typeof e=="function"?e(t):e}function wg(e){return typeof e=="number"&&e>=0&&e!==1/0}function tT(e,t){return Math.max(e+(t||0)-Date.now(),0)}function pa(e,t){return typeof e=="function"?e(t):e}function yr(e,t){return typeof e=="function"?e(t):e}function Mw(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==Ly(o,t.options))return!1}else if(!zc(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 Fw(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;
vendor: 31,476 bytes, line 136
136if(n){if(Bc(t.options.mutationKey)!==Bc(i))return!1}else if(!zc(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function Ly(e,t){return((t==null?void 0:t.queryKeyHashFn)||Bc)(e)}function Bc(e){return JSON.stringify(e,(t,n)=>Sg(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function zc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!zc(e[n],t[n])):!1}function nT(e,t){if(e===t)return e;const n=$w(e)&&$w(t);if(n||Sg(e)&&Sg(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 u=0;u<o;u++){const d=n?u:i[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,l++):(a[d]=nT(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&l++)}return s===o&&l===s?e:a}return t}function bg(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 $w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sg(e){if(!Vw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Vw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vw(e){return Object.prototype.toString.call(e)==="[object Object]"}function TD(e){return new Promise(t=>{setTimeout(t,e)})}function _g(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?nT(e,t):t}function kD(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function jD(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Dy=Symbol();function rT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Dy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ji,qs,_a,g_,PD=(g_=class extends ju{constructor(){super();xe(this,Ji);xe(this,qs);xe(this,_a);ie(this,_a,t=>{if(!yo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,qs)||this.setEventListener(P(this,_a))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,qs))==null||t.call(this),ie(this,qs,void 0))}setEventListener(t){var n;ie(this,_a,t),(n=P(this,qs))==null||n.call(this),ie(this,qs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Ji)!==t&&(ie(this,Ji,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Ji)=="boolean"?P(this,Ji):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ji=new WeakMap,qs=new WeakMap,_a=new WeakMap,g_),My=new PD,Ea,Ys,Ca,v_,AD=(v_=class extends ju{constructor(){super();xe(this,Ea,!0);xe(this,Ys);xe(this,Ca);ie(this,Ca,t=>{if(!yo&&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(){P(this,Ys)||this.setEventListener(P(this,Ca))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Ys))==null||t.call(this),ie(this,Ys,void 0))}setEventListener(t){var n;ie(this,Ca,t),(n=P(this,Ys))==null||n.call(this),ie(this,Ys,t(this.setOnline.bind(this)))}setOnline(t){P(this,Ea)!==t&&(ie(this,Ea,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,Ea)}},Ea=new WeakMap,Ys=new WeakMap,Ca=new WeakMap,v_),Ph=new AD;function Eg(){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 RD(e){return Math.min(1e3*2**e,3e4)}function sT(e){return(e??"online")==="online"?Ph.isOnline():!0}var iT=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Op(e){return e instanceof iT}function oT(e){let t=!1,n=0,r=!1,s;const i=Eg(),o=m=>{var w;r||(f(new iT(m)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>My.isFocused()&&(e.networkMode==="always"||Ph.isOnline())&&e.canRun(),d=()=>sT(e.networkMode)&&e.canRun(),h=m=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,m),s==null||s(),i.resolve(m))},f=m=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,m),s==null||s(),i.reject(m))},v=()=>new Promise(m=>{var w;s=y=>{(r||u())&&m(y)},(w=e.onPause)==null||w.call(e)}).then(()=>{var m;s=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const w=n===0?e.initialPromise:void 0;try{m=w??e.fn()}catch(y){m=Promise.reject(y)}Promise.resolve(m).then(h).catch(y=>{var j;if(r)return;const x=e.retry??(yo?0:3),b=e.retryDelay??RD,S=typeof b=="function"?b(n,y):b,_=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!_){f(y);return}n++,(j=e.onFail)==null||j.call(e,n,y),TD(S).then(()=>u()?void 0:v()).then(()=>{t?f(y):g()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:d,start:()=>(d()?g():v().then(g),i)}}function ND(){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 Bt=ND(),eo,y_,aT=(y_=class{constructor(){xe(this,eo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wg(this.gcTime)&&ie(this,eo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yo?1/0:5*60*1e3))}clearGcTimeout(){P(this,eo)&&(clearTimeout(P(this,eo)),ie(this,eo,void 0))}},eo=new WeakMap,y_),Ta,ka,Yn,qt,fu,to,pr,os,x_,OD=(x_=class extends aT{constructor(t){super();xe(this,pr);xe(this,Ta);xe(this,ka);xe(this,Yn);xe(this,qt);xe(this,fu);xe(this,to);ie(this,to,!1),ie(this,fu,t.defaultOptions),this.setOptions(t.options),this.observers=[],ie(this,Yn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ie(this,Ta,ID(this.options)),this.state=t.state??P(this,Ta),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,qt))==null?void 0:t.promise}setOptions(t){this.options={...P(this,fu),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Yn).remove(this)}setData(t,n){const r=_g(this.state.data,t,this.options);return Oe(this,pr,os).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Oe(this,pr,os).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,s;const n=(r=P(this,qt))==null?void 0:r.promise;return(s=P(this,qt))==null||s.cancel(t),n?n.then(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Ta))}isActive(){return this.observers.some(t=>yr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dy||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||!tT(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,qt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,qt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Yn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,qt)&&(P(this,to)?P(this,qt).cancel({revert:!0}):P(this,qt).cancelRetry()),this.scheduleGc()),P(this,Yn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Oe(this,pr,os).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,qt))return P(this,qt).continueRetry(),P(this,qt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(f=>f.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,s=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(ie(this,to,!0),r.signal)})},i=()=>{const h=rT(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return s(f),ie(this,to,!1),this.options.persister?this.options.persister(h,f,this):h(f)},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),ie(this,ka,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=o.fetchOptions)==null?void 0:u.meta))&&Oe(this,pr,os).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const a=h=>{var f,v,g,m;Op(h)&&h.silent||Oe(this,pr,os).call(this,{type:"error",error:h}),Op(h)||((v=(f=P(this,Yn).config).onError)==null||v.call(f,h,this),(m=(g=P(this,Yn).config).onSettled)==null||m.call(g,this.state.data,h,this)),this.scheduleGc()};return ie(this,qt,oT({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var f,v,g,m;if(h===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){a(w);return}(v=(f=P(this,Yn).config).onSuccess)==null||v.call(f,h,this),(m=(g=P(this,Yn).config).onSettled)==null||m.call(g,h,this.state.error,this),this.scheduleGc()},onError:a,onFail:(h,f)=>{Oe(this,pr,os).call(this,{type:"failed",failureCount:h,error:f})},onPause:()=>{Oe(this,pr,os).call(this,{type:"pause"})},onContinue:()=>{Oe(this,pr,os).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),P(this,qt).start()}},Ta=new WeakMap,ka=new WeakMap,Yn=new WeakMap,qt=new WeakMap,fu=new WeakMap,to=new WeakMap,pr=new WeakSet,os=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,...lT(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 Op(s)&&s.revert&&P(this,ka)?{...P(this,ka),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),Bt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Yn).notify({query:this,type:"updated",action:t})})},x_);function lT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ID(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 Mr,w_,LD=(w_=class extends ju{constructor(t={}){super();xe(this,Mr);this.config=t,ie(this,Mr,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??Ly(s,n);let o=this.get(i);return o||(o=new OD({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){P(this,Mr).has(t.queryHash)||(P(this,Mr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Mr).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Mr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Bt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Mr).get(t)}getAll(){return[...P(this,Mr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Mw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Mw(t,r)):n}notify(t){Bt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Bt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Bt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Mr=new WeakMap,w_),Fr,sn,no,$r,Is,b_,DD=(b_=class extends aT{constructor(t){super();xe(this,$r);xe(this,Fr);xe(this,sn);xe(this,no);this.mutationId=t.mutationId,ie(this,sn,t.mutationCache),ie(this,Fr,[]),this.state=t.state||MD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Fr).includes(t)||(P(this,Fr).push(t),this.clearGcTimeout(),P(this,sn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ie(this,Fr,P(this,Fr).filter(n=>n!==t)),this.scheduleGc(),P(this,sn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Fr).length||(this.state.status==="pending"?this.scheduleGc():P(this,sn).remove(this))}continue(){var t;return((t=P(this,no))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,u,d,h,f,v,g,m,w,y,x,b,S,_,j,T;ie(this,no,oT({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,E)=>{Oe(this,$r,Is).call(this,{type:"failed",failureCount:k,error:E})},onPause:()=>{Oe(this,$r,Is).call(this,{type:"pause"})},onContinue:()=>{Oe(this,$r,Is).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,sn).canRun(this)}));const n=this.state.status==="pending",r=!P(this,no).canStart();try{if(!n){Oe(this,$r,Is).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=P(this,sn).config).onMutate)==null?void 0:i.call(s,t,this));const E=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));E!==this.state.context&&Oe(this,$r,Is).call(this,{type:"pending",context:E,variables:t,isPaused:r})}const k=await P(this,no).start();return await((u=(l=P(this,sn).config).onSuccess)==null?void 0:u.call(l,k,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,k,t,this.state.context)),await((v=(f=P(this,sn).config).onSettled)==null?void 0:v.call(f,k,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,k,null,t,this.state.context)),Oe(this,$r,Is).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(w=P(this,sn).config).onError)==null?void 0:y.call(w,k,t,this.state.context,this)),await((b=(x=this.options).onError)==null?void 0:b.call(x,k,t,this.state.context)),await((_=(S=P(this,sn).config).onSettled)==null?void 0:_.call(S,void 0,k,this.state.variables,this.state.context,this)),await((T=(j=this.options).onSettled)==null?void 0:T.call(j,void 0,k,t,this.state.context)),k}finally{Oe(this,$r,Is).call(this,{type:"error",error:k})}}finally{P(this,sn).runNext(this)}}},Fr=new WeakMap,sn=new WeakMap,no=new WeakMap,$r=new WeakSet,Is=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),Bt.batch(()=>{P(this,Fr).forEach(r=>{r.onMutationUpdate(t)}),P(this,sn).notify({mutation:this,type:"updated",action:t})})},b_);function MD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Nn,pu,S_,FD=(S_=class extends ju{constructor(t={}){super();xe(this,Nn);xe(this,pu);this.config=t,ie(this,Nn,new Map),ie(this,pu,Date.now())}build(t,n,r){const s=new DD({mutationCache:this,mutationId:++zu(this,pu)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){const n=dd(t),r=P(this,Nn).get(n)??[];r.push(t),P(this,Nn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=dd(t);if(P(this,Nn).has(n)){const s=(r=P(this,Nn).get(n))==null?void 0:r.filter(i=>i!==t);s&&(s.length===0?P(this,Nn).delete(n):P(this,Nn).set(n,s))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=P(this,Nn).get(dd(t)))==null?void 0:r.find(s=>s.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=P(this,Nn).get(dd(t)))==null?void 0:r.find(s=>s!==t&&s.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Bt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...P(this,Nn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Fw(n,r))}findAll(t={}){return this.getAll().filter(n=>Fw(t,n))}notify(t){Bt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Bt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Zn))))}},Nn=new WeakMap,pu=new WeakMap,S_);function dd(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Uw(e){return{onFetch:(t,n)=>{var d,h,f,v,g;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((v=t.state.data)==null?void 0:v.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},y=rT(t.options,t.fetchOptions),x=async(b,S,_)=>{if(m)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const j={queryKey:t.queryKey,pageParam:S,direction:_?"backward":"forward",meta:t.options.meta};w(j);const T=await y(j),{maxPages:k}=t.options,E=_?jD:kD;return{pages:E(b.pages,T,k),pageParams:E(b.pageParams,S,k)}};if(s&&i.length){const b=s==="backward",S=b?$D:Bw,_={pages:i,pageParams:o},j=S(r,_);a=await x(_,j,b)}else{const b=e??i.length;do{const S=l===0?o[0]??r.initialPageParam:Bw(r,a);if(l>0&&S==null)break;a=await x(a,S),l++}while(l<b)}return a};t.options.persister?t.fetchFn=()=>{var m,w;return(w=(m=t.options).persister)==null?void 0:w.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Bw(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 $D(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 gt,Zs,Qs,ja,Pa,Xs,Aa,Ra,__,VD=(__=class{constructor(e={}){xe(this,gt);xe(this,Zs);xe(this,Qs);xe(this,ja);xe(this,Pa);xe(this,Xs);xe(this,Aa);xe(this,Ra);ie(this,gt,e.queryCache||new LD),ie(this,Zs,e.mutationCache||new FD),ie(this,Qs,e.defaultOptions||{}),ie(this,ja,new Map),ie(this,Pa,new Map),ie(this,Xs,0)}mount(){zu(this,Xs)._++,P(this,Xs)===1&&(ie(this,Aa,My.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,gt).onFocus())})),ie(this,Ra,Ph.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,gt).onOnline())})))}unmount(){var e,t;zu(this,Xs)._--,P(this,Xs)===0&&((e=P(this,Aa))==null||e.call(this),ie(this,Aa,void 0),(t=P(this,Ra))==null||t.call(this),ie(this,Ra,void 0))}isFetching(e){return P(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Zs).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,gt).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=P(this,gt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(pa(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return P(this,gt).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=P(this,gt).get(r.queryHash),i=s==null?void 0:s.state.data,o=CD(t,i);if(o!==void 0)return P(this,gt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Bt.batch(()=>P(this,gt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,gt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,gt);Bt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,gt),r={type:"active",...e};return Bt.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Bt.batch(()=>P(this,gt).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e={},t={}){return Bt.batch(()=>{if(P(this,gt).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=Bt.batch(()=>P(this,gt).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Zn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Zn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,gt).build(this,t);return n.isStaleByTime(pa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e.behavior=Uw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e.behavior=Uw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ph.isOnline()?P(this,Zs).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,gt)}getMutationCache(){return P(this,Zs)}getDefaultOptions(){return P(this,Qs)}setDefaultOptions(e){ie(this,Qs,e)}setQueryDefaults(e,t){P(this,ja).set(Bc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,ja).values()];let n={};return t.forEach(r=>{zc(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,Pa).set(Bc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Pa).values()];let n={};return t.forEach(r=>{zc(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Qs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ly(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===Dy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Qs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,gt).clear(),P(this,Zs).clear()}},gt=new WeakMap,Zs=new WeakMap,Qs=new WeakMap,ja=new WeakMap,Pa=new WeakMap,Xs=new WeakMap,Aa=new WeakMap,Ra=new WeakMap,__),vn,Ie,mu,on,ro,Na,Js,Vr,gu,Oa,Ia,so,io,ei,La,He,Gl,Cg,Tg,kg,jg,Pg,Ag,Rg,cT,E_,UD=(E_=class extends ju{constructor(t,n){super();xe(this,He);xe(this,vn);xe(this,Ie);xe(this,mu);xe(this,on);xe(this,ro);xe(this,Na);xe(this,Js);xe(this,Vr);xe(this,gu);xe(this,Oa);xe(this,Ia);xe(this,so);xe(this,io);xe(this,ei);xe(this,La,new Set);this.options=n,ie(this,vn,t),ie(this,Vr,null),ie(this,Js,Eg()),this.options.experimental_prefetchInRender||P(this,Js).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&&(P(this,Ie).addObserver(this),zw(P(this,Ie),this.options)?Oe(this,He,Gl).call(this):this.updateResult(),Oe(this,He,jg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ng(P(this,Ie),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ng(P(this,Ie),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Oe(this,He,Pg).call(this),Oe(this,He,Ag).call(this),P(this,Ie).removeObserver(this)}setOptions(t,n){const r=this.options,s=P(this,Ie);if(this.options=P(this,vn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yr(this.options.enabled,P(this,Ie))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Oe(this,He,Rg).call(this),P(this,Ie).setOptions(this.options),r._defaulted&&!bg(this.options,r)&&P(this,vn).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Ie),observer:this});const i=this.hasListeners();i&&Hw(P(this,Ie),s,this.options,r)&&Oe(this,He,Gl).call(this),this.updateResult(n),i&&(P(this,Ie)!==s||yr(this.options.enabled,P(this,Ie))!==yr(r.enabled,P(this,Ie))||pa(this.options.staleTime,P(this,Ie))!==pa(r.staleTime,P(this,Ie)))&&Oe(this,He,Cg).call(this);const o=Oe(this,He,Tg).call(this);i&&(P(this,Ie)!==s||yr(this.options.enabled,P(this,Ie))!==yr(r.enabled,P(this,Ie))||o!==P(this,ei))&&Oe(this,He,kg).call(this,o)}getOptimisticResult(t){const n=P(this,vn).getQueryCache().build(P(this,vn),t),r=this.createResult(n,t);return zD(this,r)&&(ie(this,on,r),ie(this,Na,this.options),ie(this,ro,P(this,Ie).state)),r}getCurrentResult(){return P(this,on)}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){P(this,La).add(t)}getCurrentQuery(){return P(this,Ie)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,vn).defaultQueryOptions(t),r=P(this,vn).getQueryCache().build(P(this,vn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Oe(this,He,Gl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,on)))}createResult(t,n){var k;const r=P(this,Ie),s=this.options,i=P(this,on),o=P(this,ro),a=P(this,Na),u=t!==r?t.state:P(this,mu),{state:d}=t;let h={...d},f=!1,v;if(n._optimisticResults){const E=this.hasListeners(),N=!E&&zw(t,n),U=E&&Hw(t,r,n,s);(N||U)&&(h={...h,...lT(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:w}=h;if(n.select&&h.data!==void 0)if(i&&h.data===(o==null?void 0:o.data)&&n.select===P(this,gu))v=P(this,Oa);else try{ie(this,gu,n.select),v=n.select(h.data),v=_g(i==null?void 0:i.data,v,n),ie(this,Oa,v),ie(this,Vr,null)}catch(E){ie(this,Vr,E)}else v=h.data;if(n.placeholderData!==void 0&&v===void 0&&w==="pending"){let E;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))E=i.data;else if(E=typeof n.placeholderData=="function"?n.placeholderData((k=P(this,Ia))==null?void 0:k.state.data,P(this,Ia)):n.placeholderData,n.select&&E!==void 0)try{E=n.select(E),ie(this,Vr,null)}catch(N){ie(this,Vr,N)}E!==void 0&&(w="success",v=_g(i==null?void 0:i.data,E,n),f=!0)}P(this,Vr)&&(g=P(this,Vr),v=P(this,Oa),m=Date.now(),w="error");const y=h.fetchStatus==="fetching",x=w==="pending",b=w==="error",S=x&&y,_=v!==void 0,T={status:w,fetchStatus:h.fetchStatus,isPending:x,isSuccess:w==="success",isError:b,isInitialLoading:S,isLoading:S,data:v,dataUpdatedAt:h.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!x,isLoadingError:b&&!_,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:b&&_,isStale:Fy(t,n),refetch:this.refetch,promise:P(this,Js)};if(this.options.experimental_prefetchInRender){const E=O=>{T.status==="error"?O.reject(T.error):T.data!==void 0&&O.resolve(T.data)},N=()=>{const O=ie(this,Js,T.promise=Eg());E(O)},U=P(this,Js);switch(U.status){case"pending":t.queryHash===r.queryHash&&E(U);break;case"fulfilled":(T.status==="error"||T.data!==U.value)&&N();break;case"rejected":(T.status!=="error"||T.error!==U.reason)&&N();break}}return T}updateResult(t){const n=P(this,on),r=this.createResult(P(this,Ie),this.options);if(ie(this,ro,P(this,Ie).state),ie(this,Na,this.options),P(this,ro).data!==void 0&&ie(this,Ia,P(this,Ie)),bg(r,n))return;ie(this,on,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!P(this,La).size)return!0;const l=new Set(a??P(this,La));return this.options.throwOnError&&l.add("error"),Object.keys(P(this,on)).some(u=>{const d=u;return P(this,on)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),Oe(this,He,cT).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Oe(this,He,jg).call(this)}},vn=new WeakMap,Ie=new WeakMap,mu=new WeakMap,on=new WeakMap,ro=new WeakMap,Na=new WeakMap,Js=new WeakMap,Vr=new WeakMap,gu=new WeakMap,Oa=new WeakMap,Ia=new WeakMap,so=new WeakMap,io=new WeakMap,ei=new WeakMap,La=new WeakMap,He=new WeakSet,Gl=function(t){Oe(this,He,Rg).call(this);let n=P(this,Ie).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zn)),n},Cg=function(){Oe(this,He,Pg).call(this);const t=pa(this.options.staleTime,P(this,Ie));if(yo||P(this,on).isStale||!wg(t))return;const r=tT(P(this,on).dataUpdatedAt,t)+1;ie(this,so,setTimeout(()=>{P(this,on).isStale||this.updateResult()},r))},Tg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Ie)):this.options.refetchInterval)??!1},kg=function(t){Oe(this,He,Ag).call(this),ie(this,ei,t),!(yo||yr(this.options.enabled,P(this,Ie))===!1||!wg(P(this,ei))||P(this,ei)===0)&&ie(this,io,setInterval(()=>
136{(this.options.refetchIntervalInBackground||My.isFocused())&&Oe(this,He,Gl).call(this)},P(this,ei)))},jg=function(){Oe(this,He,Cg).call(this),Oe(this,He,kg).call(this,Oe(this,He,Tg).call(this))},Pg=function(){P(this,so)&&(clearTimeout(P(this,so)),ie(this,so,void 0))},Ag=function(){P(this,io)&&(clearInterval(P(this,io)),ie(this,io,void 0))},Rg=function(){const t=P(this,vn).getQueryCache().build(P(this,vn),this.options);if(t===P(this,Ie))return;const n=P(this,Ie);ie(this,Ie,t),ie(this,mu,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},cT=function(t){Bt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,on))}),P(this,vn).getQueryCache().notify({query:P(this,Ie),type:"observerResultsUpdated"})})},E_);function BD(e,t){return yr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function zw(e,t){return BD(e,t)||e.state.data!==void 0&&Ng(e,t,t.refetchOnMount)}function Ng(e,t,n){if(yr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Fy(e,t)}return!1}function Hw(e,t,n,r){return(e!==t||yr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Fy(e,n)}function Fy(e,t){return yr(t.enabled,e)!==!1&&e.isStaleByTime(pa(t.staleTime,e))}function zD(e,t){return!bg(e.getCurrentResult(),t)}var uT=p.createContext(void 0),dT=e=>{const t=p.useContext(uT);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},HD=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(uT.Provider,{value:e,children:t})),hT=p.createContext(!1),WD=()=>p.useContext(hT);hT.Provider;function KD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var GD=p.createContext(KD()),qD=()=>p.useContext(GD);function YD(e,t){return typeof e=="function"?e(...t):!!e}function ZD(){}var QD=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},XD=e=>{p.useEffect(()=>{e.clearReset()},[e])},JD=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&YD(n,[e.error,r]),eM=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},tM=(e,t)=>e.isLoading&&e.isFetching&&!t,nM=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ww=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rM(e,t,n){var d,h,f,v,g;const r=dT(),s=WD(),i=qD(),o=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,o),o._optimisticResults=s?"isRestoring":"optimistic",eM(o),QD(o,i),XD(i);const a=!r.getQueryCache().get(o.queryHash),[l]=p.useState(()=>new t(r,o)),u=l.getOptimisticResult(o);if(p.useSyncExternalStore(p.useCallback(m=>{const w=s?()=>{}:l.subscribe(Bt.batchCalls(m));return l.updateResult(),w},[l,s]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),nM(o,u))throw Ww(o,l,i);if(JD({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw u.error;if((v=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||v.call(f,o,u),o.experimental_prefetchInRender&&!yo&&tM(u,s)){const m=a?Ww(o,l,i):(g=r.getQueryCache().get(o.queryHash))==null?void 0:g.promise;m==null||m.catch(ZD).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?u:l.trackResult(u)}function _n(e,t){return rM(e,UD)}/** 137 * @remix-run/router v1.20.0 138 * 139 * Copyright (c) Remix Software Inc. 140 * 141 * This source code is licensed under the MIT license found in the 142 * LICENSE.md file in the root directory of this source tree. 143 * 144 * @license MIT 145 */function Hc(){return Hc=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},Hc.apply(this,arguments)}var ri;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ri||(ri={}));const Kw="popstate";function sM(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Og("",{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:Ah(s)}return oM(t,n,null,e)}function _t(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function fT(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function iM(){return Math.random().toString(36).substr(2,8)}function Gw(e,t){return{usr:e.state,key:e.key,idx:t}}function Og(e,t,n,r){return n===void 0&&(n=null),Hc({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ll(t):t,{state:n,key:t&&t.key||r||iM()})}function Ah(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 ll(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 oM(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=ri.Pop,l=null,u=d();u==null&&(u=0,o.replaceState(Hc({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){a=ri.Pop;let w=d(),y=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:y})}function f(w,y){a=ri.Push;let x=Og(m.location,w,y);u=d()+1;let b=Gw(x,u),S=m.createHref(x);try{o.pushState(b,"",S)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;s.location.assign(S)}i&&l&&l({action:a,location:m.location,delta:1})}function v(w,y){a=ri.Replace;let x=Og(m.location,w,y);u=d();let b=Gw(x,u),S=m.createHref(x);o.replaceState(b,"",S),i&&l&&l({action:a,location:m.location,delta:0})}function g(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,x=typeof w=="string"?w:Ah(w);return x=x.replace(/ $/,"%20"),_t(y,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,y)}let m={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(Kw,h),l=w,()=>{s.removeEventListener(Kw,h),l=null}},createHref(w){return t(s,w)},createURL:g,encodeLocation(w){let y=g(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:v,go(w){return o.go(w)}};return m}var qw;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(qw||(qw={}));
vendor: 9,204 bytes, lines 145-154
145function aM(e,t,n){return n===void 0&&(n="/"),lM(e,t,n,!1)}function lM(e,t,n,r){let s=typeof t=="string"?ll(t):t,i=$y(s.pathname||"/",n);if(i==null)return null;let o=pT(e);cM(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=wM(i);a=yM(o[l],u,r)}return a}function pT(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("/")&&(_t(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=fi([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(_t(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),pT(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:gM(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of mT(i.path))s(i,o,l)}),t}function mT(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=mT(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 cM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vM(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const uM=/^:[\w-]+$/,dM=3,hM=2,fM=1,pM=10,mM=-2,Yw=e=>e==="*";function gM(e,t){let n=e.split("/"),r=n.length;return n.some(Yw)&&(r+=mM),t&&(r+=hM),n.filter(s=>!Yw(s)).reduce((s,i)=>s+(uM.test(i)?dM:i===""?fM:pM),r)}function vM(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 yM(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=Zw({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),f=l.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=Zw({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;Object.assign(s,h.params),o.push({params:s,pathname:fi([i,h.pathname]),pathnameBase:EM(fi([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=fi([i,h.pathnameBase]))}return o}function Zw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=xM(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((u,d,h)=>{let{paramName:f,isOptional:v}=d;if(f==="*"){let m=a[h]||"";o=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=a[h];return v&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function xM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),fT(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 wM(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return fT(!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 $y(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 bM(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ll(e):e;return{pathname:n?n.startsWith("/")?n:SM(n,t):t,search:CM(r),hash:TM(s)}}function SM(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 Ip(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 _M(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vy(e,t){let n=_M(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Uy(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ll(e):(s=Hc({},e),_t(!s.pathname||!s.pathname.includes("?"),Ip("?","pathname","search",s)),_t(!s.pathname||!s.pathname.includes("#"),Ip("#","pathname","hash",s)),_t(!s.search||!s.search.includes("#"),Ip("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}a=h>=0?t[h]:"/"}let l=bM(s,a),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const fi=e=>e.join("/").replace(/\/\/+/g,"/"),EM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),CM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,TM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function kM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const gT=["post","put","patch","delete"];new Set(gT);const jM=["get",...gT];new Set(jM);/** 146 * React Router v6.27.0 147 * 148 * Copyright (c) Remix Software Inc. 149 * 150 * This source code is licensed under the MIT license found in the 151 * LICENSE.md file in the root directory of this source tree. 152 * 153 * @license MIT 154 */function Wc(){return Wc=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},Wc.apply(this,arguments)}const By=p.createContext(null),PM=p.createContext(null),Ai=p.createContext(null),kf=p.createContext(null),ks=p.createContext({outlet:null,matches:[],isDataRoute:!1}),vT=p.createContext(null);function AM(e,t){let{relative:n}=t===void 0?{}:t;cl()||_t(!1);let{basename:r,navigator:s}=p.useContext(Ai),{hash:i,pathname:o,search:a}=xT(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:fi([r,o])),s.createHref({pathname:l,search:a,hash:i})}function cl(){return p.useContext(kf)!=null}function es(){return cl()||_t(!1),p.useContext(kf).location}function yT(e){p.useContext(Ai).static||p.useLayoutEffect(e)}function Ri(){let{isDataRoute:e}=p.useContext(ks);return e?HM():RM()}function RM(){cl()||_t(!1);let e=p.useContext(By),{basename:t,future:n,navigator:r}=p.useContext(Ai),{matches:s}=p.useContext(ks),{pathname:i}=es(),o=JSON.stringify(Vy(s,n.v7_relativeSplatPath)),a=p.useRef(!1);return yT(()=>{a.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let h=Uy(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:fi([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,i,e])}function NM(){let{matches:e}=p.useContext(ks),t=e[e.length-1];return t?t.params:{}}function xT(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Ai),{matches:s}=p.useContext(ks),{pathname:i}=es(),o=JSON.stringify(Vy(s,r.v7_relativeSplatPath));return p.useMemo(()=>Uy(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function OM(e,t){return IM(e,t)}function IM(e,t,n,r){cl()||_t(!1);let{navigator:s}=p.useContext(Ai),{matches:i}=p.useContext(ks),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=es(),d;if(t){var h;let w=typeof t=="string"?ll(t):t;l==="/"||(h=w.pathname)!=null&&h.startsWith(l)||_t(!1),d=w}else d=u;let f=d.pathname||"/",v=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");v="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=aM(e,{pathname:v}),m=$M(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:fi([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:fi([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&m?p.createElement(kf.Provider,{value:{location:Wc({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:ri.Pop}},m):m}function LM(){let e=zM(),t=kM(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
154Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const DM=p.createElement(LM,null);class MM 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(ks.Provider,{value:this.props.routeContext},p.createElement(vT.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(By);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(ks.Provider,{value:t},r)}function $M(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 d=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);d>=0||_t(!1),o=o.slice(0,Math.min(o.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:v}=n,g=h.route.loader&&f[h.route.id]===void 0&&(!v||v[h.route.id]===void 0);if(h.route.lazy||g){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let v,g=!1,m=null,w=null;n&&(v=a&&h.route.id?a[h.route.id]:void 0,m=h.route.errorElement||DM,l&&(u<0&&f===0?(g=!0,w=null):u===f&&(g=!0,w=h.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,f+1)),x=()=>{let b;return v?b=m:g?b=w:h.route.Component?b=p.createElement(h.route.Component,null):h.route.element?b=h.route.element:b=d,p.createElement(FM,{match:h,routeContext:{outlet:d,matches:y,isDataRoute:n!=null},children:b})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?p.createElement(MM,{location:n.location,revalidation:n.revalidation,component:m,error:v,children:x(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):x()},null)}var wT=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wT||{}),Rh=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}(Rh||{});function VM(e){let t=p.useContext(By);return t||_t(!1),t}function UM(e){let t=p.useContext(PM);return t||_t(!1),t}function BM(e){let t=p.useContext(ks);return t||_t(!1),t}function bT(e){let t=BM(),n=t.matches[t.matches.length-1];return n.route.id||_t(!1),n.route.id}function zM(){var e;let t=p.useContext(vT),n=UM(Rh.UseRouteError),r=bT(Rh.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function HM(){let{router:e}=VM(wT.UseNavigateStable),t=bT(Rh.UseNavigateStable),n=p.useRef(!1);return yT(()=>{n.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Wc({fromRouteId:t},i)))},[e,t])}function hd(e){let{to:t,replace:n,state:r,relative:s}=e;cl()||_t(!1);let{future:i,static:o}=p.useContext(Ai),{matches:a}=p.useContext(ks),{pathname:l}=es(),u=Ri(),d=Uy(t,Vy(a,i.v7_relativeSplatPath),l,s==="path"),h=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:s}),[u,h,s,n,r]),null}function $t(e){_t(!1)}function WM(e){let{basename:t="/",children:n=null,location:r,navigationType:s=ri.Pop,navigator:i,static:o=!1,future:a}=e;cl()&&_t(!1);let l=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:l,navigator:i,static:o,future:Wc({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=ll(r));let{pathname:d="/",search:h="",hash:f="",state:v=null,key:g="default"}=r,m=p.useMemo(()=>{let w=$y(d,l);return w==null?null:{location:{pathname:w,search:h,hash:f,state:v,key:g},navigationType:s}},[l,d,h,f,v,g,s]);return m==null?null:p.createElement(Ai.Provider,{value:u},p.createElement(kf.Provider,{children:n,value:m}))}function KM(e){let{children:t,location:n}=e;return OM(Ig(t),n)}new Promise(()=>{});function Ig(e,t){t===void 0&&(t=[]);let n=[];
154return p.Children.forEach(e,(r,s)=>{if(!p.isValidElement(r))return;let i=[...t,s];if(r.type===p.Fragment){n.push.apply(n,Ig(r.props.children,i));return}r.type!==$t&&_t(!1),!r.props.index||!r.props.children||_t(!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=Ig(r.props.children,i)),n.push(o)}),n}/** 155 * React Router DOM v6.27.0 156 * 157 * Copyright (c) Remix Software Inc. 158 * 159 * This source code is licensed under the MIT license found in the 160 * LICENSE.md file in the root directory of this source tree. 161 * 162 * @license MIT 163 */function Lg(){return Lg=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},Lg.apply(this,arguments)}function GM(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 qM(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function YM(e,t){return e.button===0&&(!t||t==="_self")&&!qM(e)}function Dg(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function ZM(e,t){let n=Dg(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const QM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],XM="6";try{window.__reactRouterVersion=XM}catch{}const JM="startTransition",Qw=D_[JM];function eF(e){let{basename:t,children:n,future:r,window:s}=e,i=p.useRef();i.current==null&&(i.current=sM({window:s,v5Compat:!0}));let o=i.current,[a,l]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=p.useCallback(h=>{u&&Qw?Qw(()=>l(h)):l(h)},[l,u]);return p.useLayoutEffect(()=>o.listen(d),[o,d]),p.createElement(WM,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const tF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bn=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:d,viewTransition:h}=t,f=GM(t,QM),{basename:v}=p.useContext(Ai),g,m=!1;if(typeof u=="string"&&nF.test(u)&&(g=u,tF))try{let b=new URL(window.location.href),S=u.startsWith("//")?new URL(b.protocol+u):new URL(u),_=$y(S.pathname,v);S.origin===b.origin&&_!=null?u=_+S.search+S.hash:m=!0}catch{}let w=AM(u,{relative:s}),y=rF(u,{replace:o,state:a,target:l,preventScrollReset:d,relative:s,viewTransition:h});function x(b){r&&r(b),b.defaultPrevented||y(b)}return p.createElement("a",Lg({},f,{href:g||w,onClick:m||i?r:x,ref:n,target:l}))});var Xw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Xw||(Xw={}));var Jw;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Jw||(Jw={}));function rF(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Ri(),u=es(),d=xT(e,{relative:o});return p.useCallback(h=>{if(YM(h,n)){h.preventDefault();let f=r!==void 0?r:Ah(u)===Ah(d);l(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,d,r,s,n,e,i,o,a])}function sF(e){let t=p.useRef(Dg(e)),n=p.useRef(!1),r=es(),s=p.useMemo(()=>ZM(r.search,n.current?null:t.current),[r.search]),i=Ri(),o=p.useCallback((a,l)=>{const u=Dg(typeof a=="function"?a(s):a);n.current=!0,i("?"+u,l)},[i,s]);return[s,o]}const iF=_y("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"}}),Ve=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},i)=>{const o=r?gi:"button";return c.jsx(o,{className:we(iF({variant:t,size:n,className:e})),ref:i,...s})});Ve.displayName="Button";const oF="modulepreload",aF=function(e){return"/"+e},eb={},xo=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=aF(l),l in eb)return;eb[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const h=document.createElement("link");
163if(h.rel=u?"stylesheet":oF,u||(h.as="script"),h.crossOrigin="",h.href=l,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((f,v)=>{h.addEventListener("load",f),h.addEventListener("error",()=>v(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)})},lF=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xo(async()=>{const{default:r}=await Promise.resolve().then(()=>ul);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class zy extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class cF extends zy{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class uF extends zy{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class dF extends zy{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Mg;(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"})(Mg||(Mg={}));var hF=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(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class fF{constructor(t,{headers:n={},customFetch:r,region:s=Mg.Any}={}){this.url=t,this.headers=n,this.region=s,this.fetch=lF(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return hF(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 u;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",u=o):typeof o=="string"?(a["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(a["Content-Type"]="application/json",u=JSON.stringify(o)));const d=yield this.fetch(`${this.url}/${t}`,{method:i||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),s),body:u}).catch(g=>{throw new cF(g)}),h=d.headers.get("x-relay-error");if(h&&h==="true")throw new uF(d);if(!d.ok)throw new dF(d);let f=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),v;return f==="application/json"?v=yield d.json():f==="application/octet-stream"?v=yield d.blob():f==="text/event-stream"?v=d:f==="multipart/form-data"?v=yield d.formData():v=yield d.text(),{data:v,error:null}}catch(s){return{data:null,error:s}}})}}var wn={},Hy={},jf={},Pu={},Pf={},Af={},pF=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")},Ka=pF();const mF=Ka.fetch,ST=Ka.fetch.bind(Ka),_T=Ka.Headers,gF=Ka.Request,vF=Ka.Response,ul=Object.freeze(Object.defineProperty({__proto__:null,Headers:_T,Request:gF,Response:vF,default:ST,fetch:mF},Symbol.toStringTag,{value:"Module"})),yF=aR(ul);var Rf={};Object.defineProperty(Rf,"__esModule",{value:!0});let xF=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
163de=t.code}};Rf.default=xF;var ET=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Af,"__esModule",{value:!0});const wF=ET(yF),bF=ET(Rf);let SF=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=wF.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 u=null,d=null,h=null,f=i.status,v=i.statusText;if(i.ok){if(this.method!=="HEAD"){const y=await i.text();y===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?d=y:d=JSON.parse(y))}const m=(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("/");m&&w&&w.length>1&&(h=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(u={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,h=null,f=406,v="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const m=await i.text();try{u=JSON.parse(m),Array.isArray(u)&&i.status===404&&(d=[],u=null,f=200,v="OK")}catch{i.status===404&&m===""?(f=204,v="No Content"):u={message:m}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,f=200,v="OK"),u&&this.shouldThrowOnError)throw new bF.default(u)}return{error:u,data:d,count:h,status:f,statusText:v}});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)}};Af.default=SF;var _F=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pf,"__esModule",{value:!0});const EF=_F(Af);let CF=class extends EF.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}
163explain({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("|"),u=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${u}"; 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}};Pf.default=CF;var TF=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pu,"__esModule",{value:!0});const kF=TF(Pf);let jF=class extends kF.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}};Pu.default=jF;var PF=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jf,"__esModule",{value:!0});const Dl=PF(Pu);let AF=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 Dl.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>
1630){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new Dl.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((u,d)=>u.concat(Object.keys(d)),[]);if(l.length>0){const u=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",u.join(","))}}return new Dl.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 Dl.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 Dl.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};jf.default=AF;var Nf={},Of={};Object.defineProperty(Of,"__esModule",{value:!0});Of.version=void 0;Of.version="0.0.0-automated";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.DEFAULT_HEADERS=void 0;const RF=Of;Nf.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${RF.version}`};var CT=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hy,"__esModule",{value:!0});const NF=CT(jf),OF=CT(Pu),IF=Nf;let LF=class TT{constructor(t,{headers:n={},schema:r,fetch:s}={}){this.url=t,this.headers=Object.assign(Object.assign({},IF.DEFAULT_HEADERS),n),this.schemaName=r,this.fetch=s}from(t){const n=new URL(`${this.url}/${t}`);return new NF.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new TT(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(([d,h])=>h!==void 0).map(([d,h])=>[d,Array.isArray(h)?`{${h.join(",")}}`:`${h}`]).forEach(([d,h])=>{a.searchParams.append(d,h)})):(o="POST",l=n);const u=Object.assign({},this.headers);return i&&(u.Prefer=`count=${i}`),new OF.default({method:o,url:a,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};Hy.default=LF;var dl=nr&&nr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wn,"__esModule",{value:!0});wn.PostgrestError=wn.PostgrestBuilder=wn.PostgrestTransformBuilder=wn.PostgrestFilterBuilder=wn.PostgrestQueryBuilder=wn.PostgrestClient=void 0;const kT=dl(Hy);wn.PostgrestClient=kT.default;const jT=dl(jf);wn.PostgrestQueryBuilder=jT.default;const PT=dl(Pu);wn.PostgrestFilterBuilder=PT.default;const AT=dl(Pf);wn.PostgrestTransformBuilder=AT.default;const RT=dl(Af);wn.PostgrestBuilder=RT.default;const NT=dl(Rf);wn.PostgrestError=NT.default;var DF=wn.default={PostgrestClient:kT.default,PostgrestQueryBuilder:jT.default,PostgrestFilterBuilder:PT.default,PostgrestTransformBuilder:AT.default,PostgrestBuilder:RT.default,PostgrestError:NT.default};const{PostgrestClient:MF,PostgrestQueryBuilder:uW,PostgrestFilterBuilder:dW,PostgrestTransformBuilder:hW,PostgrestBuilder:fW,PostgrestError:pW}=DF,FF="2.11.2",$F={"X-Client-Info":`realtime-js/${FF}`},VF="1.0.0",OT=1e4,UF=1e3;var ma;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(ma||(ma={}));var Rn;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Rn||(Rn={}));var gr;(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"})(gr||(gr={}));var Fg;(function(e){e.websocket="websocket"})(Fg||(Fg={}));var Ki;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Ki||(Ki={}));class BF{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 u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class IT{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 Xe;(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"})(Xe||(Xe={}));const tb=(e,t,n={})=>{var r;const s=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((i,o)=>(i[o]=zF(o,e,t,s),i),{})},zF=(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)?LT(i,o):$g(o)},LT=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return GF(t,n)}switch(e){case Xe.bool:return HF(t);case Xe.float4:case Xe.float8:case Xe.int2:case Xe.int4:case Xe.int8:case Xe.numeric:case Xe.oid:return WF(t);case Xe.json:case Xe.jsonb:return KF(t);case Xe.timestamp:return qF(t);case Xe.abstime:case Xe.date:case Xe.daterange:case Xe.int4range:case Xe.int8range:case Xe.money:case Xe.reltime:case Xe.text:case Xe.time:case Xe.timestamptz:case Xe.timetz:case Xe.tsrange:case Xe.tstzrange:return $g(t);default:return $g(t)}},$g=e=>e,HF=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},WF=e=>{if(typeof e=="string"){const t=parseFloat(e);
vendor: 11,699 bytes, line 163
163if(!Number.isNaN(t))return t}return e},KF=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},GF=(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=>LT(t,a))}return e},qF=e=>typeof e=="string"?e.replace(" ","T"):e,DT=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class Lp{constructor(t,n,r={},s=OT){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 nb;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(nb||(nb={}));class mc{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=mc.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=mc.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=mc.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,(u,d)=>{o[u]||(l[u]=d)}),this.map(o,(u,d)=>{const h=i[u];if(h){const f=d.map(w=>w.presence_ref),v=h.map(w=>w.presence_ref),g=d.filter(w=>v.indexOf(w.presence_ref)<0),m=h.filter(w=>f.indexOf(w.presence_ref)<0);g.length>0&&(a[u]=g),m.length>0&&(l[u]=m)}else a[u]=d}),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 u;const d=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),d.length>0){const h=t[a].map(v=>v.presence_ref),f=d.filter(v=>h.indexOf(v.presence_ref)<0);t[a].unshift(...f)}r(a,d,l)}),this.map(o,(a,l)=>{let u=t[a];if(!u)return;const d=l.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[a]=u,s(a,u,l),u.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 rb;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(rb||(rb={}));var sb;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(sb||(sb={}));var cs;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(cs||(cs={}));class Wy{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Rn.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 Lp(this,gr.join,this.params,this.timeout),this.rejoinTimer=new IT(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Rn.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=Rn.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Rn.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Rn.errored,this.rejoinTimer.scheduleTimeout())}),this._on(gr.reply,{},(s,i)=>{this._trigger(this._replyEventName(i),s)}),this.presence=new mc(this),this.broadcastEndpointURL=DT(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(d=>t==null?void 0:t(cs.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(cs.CLOSED));const l={},u={broadcast:i,presence:o,postgres_changes:(s=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(d=>d.filter))!==null&&s!==void 0?s:[],private:a};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:u},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:d})=>{var h;if(this.socket.setAuth(),d===void 0){t==null||t(cs.SUBSCRIBED);return}else{const f=this.bindings.postgres_changes,v=(h=f==null?void 0:f.length)!==null&&h!==void 0?h:0,g=[];for(let m=0;m<v;m++){const w=f[m],{filter:{event:y,schema:x,table:b,filter:S}}=w,_=d&&d[m];if(_&&_.event===y&&_.schema===x&&_.table===b&&_.filter===S)g.push(Object.assign(Object.assign({},w),{id:_.id}));else{this.unsubscribe(),t==null||t(cs.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=g,t&&t(cs.SUBSCRIBED);return}}).receive("error",d=>{t==null||t(cs.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(cs.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 u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const u=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"),u.receive("ok",()=>i("ok")),u.receive("error",()=>i("error")),u.receive("timeout",()=>i("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Rn.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(gr.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const s=new Lp(this,gr.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 Lp(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:u,join:d}=gr;if(r&&[a,l,u,d].indexOf(o)>=0&&r!==this._joinRef())return;let f=this._onMessage(o,n,r);if(n&&!f)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(v=>{var g,m,w;return((g=v.filter)===null||g===void 0?void 0:g.event)==="*"||((w=(m=v.filter)===null||m===void 0?void 0:m.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===o}).map(v=>v.callback(f,r)):(i=this.bindings[o])===null||i===void 0||i.filter(v=>{var g,m,w,y,x,b;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in v){const S=v.id,_=(g=v.filter)===null||g===void 0?void 0:g.event;return S&&((m=n.ids)===null||m===void 0?void 0:m.includes(S))&&(_==="*"||(_==null?void 0:_.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const S=(x=(y=v==null?void 0:v.filter)===null||y===void 0?void 0:y.event)===null||x===void 0?void 0:x.toLocaleLowerCase();return S==="*"||S===((b=n==null?void 0:n.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return v.type.toLocaleLowerCase()===o}).map(v=>{if(typeof f=="object"&&"ids"in f){const g=f.data,{schema:m,table:w,commit_timestamp:y,type:x,errors:b}=g;f=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:y,eventType:x,new:{},old:{},errors:b}),this._getPayloadRecords(g))}v.callback(f,r)}
163)}_isClosed(){return this.state===Rn.closed}_isJoined(){return this.state===Rn.joined}_isJoining(){return this.state===Rn.joining}_isLeaving(){return this.state===Rn.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&&Wy.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(gr.close,{},t)}_onError(t){this._on(gr.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Rn.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=tb(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=tb(t.columns,t.old_record)),n}}const YF=()=>{},ZF=typeof WebSocket<"u",QF=` 164 addEventListener("message", (e) => { 165 if (e.data.event === "start") { 166 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 167 } 168 });`;class XF{constructor(t,n){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=$F,this.params={},this.timeout=OT,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=YF,this.conn=null,this.sendBuffer=[],this.serializer=new BF,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=i=>{let o;return i?o=i:typeof fetch>"u"?o=(...a)=>xo(async()=>{const{default:l}=await Promise.resolve().then(()=>ul);return{default:l}},void 0).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${t}/${Fg.websocket}`,this.httpEndpoint=DT(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 IT(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(ZF){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new JF(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),xo(async()=>{const{default:t}=await import("./browser-q1ojDxFI.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:VF}))}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 ma.connecting:return Ki.Connecting;case ma.open:return Ki.Open;case ma.closing:return Ki.Closing;default:return Ki.Closed}}isConnected(){return this.connectionState()===Ki.Open}channel(t,n={config:{}}){const r=new Wy(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:s,ref:i}
168=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}`);this.accessTokenValue=n,this.channels.forEach(s=>{n&&s.updateJoinPayload({access_token:n}),s.joinedOnce&&s._isJoined()&&s._push(gr.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(UF,"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(gr.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([QF],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}}class JF{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=ma.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class Ky extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Nt(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class e$ extends Ky{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Vg extends Ky{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var t$=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
168return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const MT=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xo(async()=>{const{default:r}=await Promise.resolve().then(()=>ul);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},n$=()=>t$(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield xo(()=>Promise.resolve().then(()=>ul),void 0)).Response:Response}),Ug=e=>{if(Array.isArray(e))return e.map(n=>Ug(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]=Ug(r)}),t};var ko=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(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const Dp=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),r$=(e,t,n)=>ko(void 0,void 0,void 0,function*(){const r=yield n$();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(s=>{t(new e$(Dp(s),e.status||500))}).catch(s=>{t(new Vg(Dp(s),s))}):t(new Vg(Dp(e),e))}),s$=(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 Au(e,t,n,r,s,i){return ko(this,void 0,void 0,function*(){return new Promise((o,a)=>{e(n,s$(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=>r$(l,a,r))})})}function Nh(e,t,n,r){return ko(this,void 0,void 0,function*(){return Au(e,"GET",t,n,r)})}function Us(e,t,n,r,s){return ko(this,void 0,void 0,function*(){return Au(e,"POST",t,r,s,n)})}function i$(e,t,n,r,s){return ko(this,void 0,void 0,function*(){return Au(e,"PUT",t,r,s,n)})}function o$(e,t,n,r){return ko(this,void 0,void 0,function*(){return Au(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function FT(e,t,n,r,s){return ko(this,void 0,void 0,function*(){return Au(e,"DELETE",t,r,s,n)})}var mn=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(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const a$={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},ib={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class l${constructor(t,n={},r,s){this.url=t,this.headers=n,this.bucketId=r,this.fetch=MT(s)}uploadOrUpdate(t,n,r,s){return mn(this,void 0,void 0,function*(){try{let i;const o=Object.assign(Object.assign({},ib),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 u=this._removeEmptyFolders(n),d=this._getFinalPath(u),h=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:t,body:i,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),f=yield h.json();return h.ok?{data:{path:u,id:f.Id,fullPath:f.Key},error:null}:{data:null,error:f}}catch(i){if(Nt(i))return{data:null,error:i};throw i}})}upload(t,n,r){return mn(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,s){return mn(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 u=Object.assign({upsert:ib.upsert},s),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",u.cacheControl)):(l=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType);const h=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:d}),f=yield h.json();return h.ok?{data:{path:i,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(Nt(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return mn(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 Us(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 Ky("No token returned by API");return{data:{signedUrl:o.toString(),path:t,token:a},error:null}}catch(r){if(Nt(r))return{data:null,error:r};throw r}})}update(t,n,r){return mn(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return mn(this,void 0,void 0,function*(){try{return{data:yield Us(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(Nt(s))return{data:null,error:s};throw s}})}copy(t,n,r){return mn(this,void 0,void 0,function*(){try{return{data:{path:(yield Us(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(Nt(s))return{data:null,error:s};throw s}})}createSignedUrl(t,n,r){return mn(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),i=yield Us(this.fetch,`${this.url}/object/sign/${s}
168`,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(Nt(s))return{data:null,error:s};throw s}})}createSignedUrls(t,n,r){return mn(this,void 0,void 0,function*(){try{const s=yield Us(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(Nt(s))return{data:null,error:s};throw s}})}download(t,n){return mn(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 Nh(this.fetch,`${this.url}/${s}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Nt(a))return{data:null,error:a};throw a}})}info(t){return mn(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Nh(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Ug(r),error:null}}catch(r){if(Nt(r))return{data:null,error:r};throw r}})}exists(t){return mn(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield o$(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(Nt(r)&&r instanceof Vg){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 u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${u}`)}}}remove(t){return mn(this,void 0,void 0,function*(){try{return{data:yield FT(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(Nt(n))return{data:null,error:n};throw n}})}list(t,n,r){return mn(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},a$),n),{prefix:t||""});return{data:yield Us(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},r),error:null}}catch(s){if(Nt(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 c$="2.7.1",u$={"X-Client-Info":`storage-js/${c$}`};var No=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(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class d${constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},u$),n),this.fetch=MT(r)}listBuckets(){return No(this,void 0,void 0,function*(){try{return{data:yield Nh(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Nt(t))return{data:null,error:t};throw t}})}getBucket(t){return No(this,void 0,void 0,function*(){try{return{data:yield Nh(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(Nt(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return No(this,void 0,void 0,function*(){try{return{data:yield Us(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(Nt(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return No(this,void 0,void 0,function*(){try{return{data:yield i$(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(Nt(r))return{data:null,error:r};throw r}})}emptyBucket(t){return No(this,void 0,void 0,function*(){try{return{data:yield Us(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Nt(n))return{data:null,error:n};throw n}})}deleteBucket(t){return No(this,void 0,void 0,function*(){try{return{data:yield FT(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(Nt(n))return{data:null,error:n};throw n}})}}class h$ extends d${constructor(t,n={},r){super(t,n,r)}from(t){return new l$(this.url,this.headers,t,this.fetch)}}const f$="2.48.1";let ql="";typeof Deno<"u"?ql="deno":typeof document<"u"?ql="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ql="react-native":ql="node";const p$={"X-Client-Info":`supabase-js-${ql}/${f$}`},m$={headers:p$},g$={schema:"public"},v$={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},y$={};var x$=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
168return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};const w$=e=>{let t;return e?t=e:typeof fetch>"u"?t=ST:t=fetch,(...n)=>t(...n)},b$=()=>typeof Headers>"u"?_T:Headers,S$=(e,t,n)=>{const r=w$(n),s=b$();return(i,o)=>x$(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let u=new s(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),r(i,Object.assign(Object.assign({},o),{headers:u}))})};var _$=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(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};function E$(e){return e.replace(/\/$/,"")}function C$(e,t){const{db:n,auth:r,realtime:s,global:i}=e,{db:o,auth:a,realtime:l,global:u}=t,d={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({},u),i),accessToken:()=>_$(this,void 0,void 0,function*(){return""})};return e.accessToken?d.accessToken=e.accessToken:delete d.accessToken,d}const $T="2.67.3",T$="http://localhost:9999",k$="supabase.auth.token",j$={"X-Client-Info":`gotrue-js/${$T}`},ob=10,Bg="X-Supabase-Api-Version",VT={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function P$(e){return Math.round(Date.now()/1e3)+e}function A$(){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 Lr=()=>typeof window<"u"&&typeof document<"u",$i={tested:!1,writable:!1},gc=()=>{if(!Lr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($i.tested)return $i.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),$i.tested=!0,$i.writable=!0}catch{$i.tested=!0,$i.writable=!1}return $i.writable};function R$(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 UT=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>xo(async()=>{const{default:r}=await Promise.resolve().then(()=>ul);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},N$=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",BT=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},fd=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},pd=async(e,t)=>{await e.removeItem(t)};function O$(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,s,i,o,a,l,u,d=0;for(e=e.replace("-","+").replace("_","/");d<e.length;)o=t.indexOf(e.charAt(d++)),a=t.indexOf(e.charAt(d++)),l=t.indexOf(e.charAt(d++)),u=t.indexOf(e.charAt(d++)),r=o<<2|a>>4,s=(a&15)<<4|l>>2,i=(l&3)<<6|u,n=n+String.fromCharCode(r),l!=64&&s!=0&&(n=n+String.fromCharCode(s)),u!=64&&i!=0&&(n=n+String.fromCharCode(i));return n}class If{constructor(){this.promise=new If.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}If.promiseConstructor=Promise;function ab(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(O$(r))}async function I$(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function L$(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 D$(e){return("0"+e.toString(16)).substr(-2)}function M$(){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,D$).join("")}async function F$(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",
168n),s=new Uint8Array(r);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}function $$(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function V$(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 F$(e);return $$(n)}async function Oo(e,t,n=!1){const r=M$();let s=r;n&&(s+="/PASSWORD_RECOVERY"),await BT(e,`${t}-code-verifier`,s);const i=await V$(r);return[i,r===i?"plain":"s256"]}const U$=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function B$(e){const t=e.headers.get(Bg);if(!t||!t.match(U$))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class Gy extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ke(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class z$ extends Gy{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function H$(e){return ke(e)&&e.name==="AuthApiError"}class zT extends Gy{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class jo extends Gy{constructor(t,n,r,s){super(t,r,s),this.name=n,this.status=r}}class Ls extends jo{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function W$(e){return ke(e)&&e.name==="AuthSessionMissingError"}class Mp extends jo{constructor(){super("Auth session or user missing","AuthInvalidToken
168ResponseError",500,void 0)}}class md extends jo{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class gd extends jo{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 K$(e){return ke(e)&&e.name==="AuthImplicitGrantRedirectError"}class lb extends jo{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 zg extends jo{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Fp(e){return ke(e)&&e.name==="AuthRetryableFetchError"}class cb extends jo{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var G$=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 zi=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),q$=[502,503,504];async function ub(e){var t;if(!N$(e))throw new zg(zi(e),0);if(q$.includes(e.status))throw new zg(zi(e),e.status);let n;try{n=await e.json()}catch(i){throw new zT(zi(i),i)}let r;const s=B$(e);if(s&&s.getTime()>=VT["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 cb(zi(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 cb(zi(n),e.status,n.weak_password.reasons);throw new z$(zi(n),e.status||500,r)}const Y$=(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 Le(e,t,n,r){var s;const i=Object.assign({},r==null?void 0:r.headers);i[Bg]||(i[Bg]=VT["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 Z$(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 Z$(e,t,n,r,s,i){const o=Y$(t,r,s,i);let a;try{a=await e(n,Object.assign({},o))}catch(l){throw console.error(l),new zg(zi(l),0)}if(a.ok||await ub(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await ub(l)}}function Ds(e){var t;let n=null;eV(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=P$(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function db(e){const t=Ds(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 Ws(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Q$(e){return{data:e,error:null}}function X$(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:s,verification_type:i}=e,o=G$(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 J$(e){return e}function eV(e){return e.access_token&&e.refresh_token&&e.expires_in}var tV=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};
168class nV{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=UT(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await Le(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ke(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await Le(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ws})}catch(r){if(ke(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=tV(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 Le(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:X$,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ke(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await Le(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ws})}catch(n){if(ke(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,s,i,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},d=await Le(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:J$});if(d.error)throw d.error;const h=await d.json(),f=(o=d.headers.get("x-total-count"))!==null&&o!==void 0?o:0,v=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return v.length>0&&(v.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(g.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(ke(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await Le(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ws})}catch(n){if(ke(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await Le(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Ws})}catch(r){if(ke(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await Le(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ws})}catch(r){if(ke(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await Le(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(ke(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await Le(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ke(n))return{data:null,error:n};throw n}}}const rV={getItem:e=>gc()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{gc()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{gc()&&globalThis.localStorage.removeItem(e)}};function hb(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function sV(){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 Io={debug:!!(globalThis&&gc()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class HT extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class iV extends HT{}async function oV(e,t,n){Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),Io.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>
168globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async s=>{if(s){Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await n()}finally{Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw Io.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new iV(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Io.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()}}))}sV();const aV={url:T$,storageKey:k$,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:j$,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Ml=30*1e3,fb=3;async function pb(e,t,n){return await n()}class Kc{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=Kc.nextInstanceID,Kc.nextInstanceID+=1,this.instanceID>0&&Lr()&&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({},aV),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 nV({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=UT(s.fetch),this.lock=s.lock||pb,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:Lr()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=oV:this.lock=pb,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:gc()?this.storage=rV:(this.memoryStorage={},this.storage=hb(this.memoryStorage)):(this.memoryStorage={},this.storage=hb(this.memoryStorage)),Lr()&&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} (${$T}) ${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=R$(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),Lr()&&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),K$(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 ke(n)?{error:n}:{error:new zT("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,s;try{const i=await Le(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:Ds}),{data:o,error:a}=i;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(ke(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:d,password:h,options:f}=t;let v=null,g=null;this.flowType==="pkce"&&([v,g]=await Oo(this.storage,this.storageKey)),i=await Le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:h,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:v,code_challenge_method:g},xform:Ds})}else if("phone"in t){const{phone:d,password:h,options:f}=t;i=await Le(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Ds})}else throw new md("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,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(i){if(ke(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 Le(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:db})}else if("phone"in t){const{phone:i,password:o,options:a}=t;n=await Le(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:db})}else throw new md("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 Mp}:(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(ke(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 fd(this.storage,`${this.storageKey}-code-verifier`),[r,s]=(n??"").split("/");try{const{data:i,error:o}=await Le(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Ds});if(await pd(this.storage,`${this.storageKey}-code-verifier`),o)throw o;return!i||!i.session||!i.user?{data:{user:null,session:null,redirectType:null},error:new Mp}:(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(ke(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 Le(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:Ds}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Mp}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(ke(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;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await Oo(this.storage,this.storageKey));const{error:h}=await Le(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:u,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:d}=await Le(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:u==null?void 0:u.message_id},error:d}}throw new md("You must provide either an email or phone number.")}
168catch(a){if(ke(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 Le(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:Ds});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=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:u,session:l},error:null}}catch(s){if(ke(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 Oo(this.storage,this.storageKey)),await Le(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:Q$})}catch(i){if(ke(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 Le(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:s}})}catch(t){if(ke(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 Le(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 Le(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 md("You must provide either an email or phone number and a type")}catch(n){if(ke(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 fd(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
168id"),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,u,d)=>(!o&&u==="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,u,d))})}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 Le(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ws}):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 Le(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:Ws})})}catch(n){if(ke(n))return W$(n)&&(await this._removeSession(),await pd(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 Oo(this.storage,this.storageKey));const{data:u,error:d}=await Le(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:Ws});if(d)throw d;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(ke(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return ab(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=ab(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(ke(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(ke(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!Lr())throw new gd("No browser detected.");
168if(t.error||t.error_description||t.error_code)throw new gd(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 lb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new gd("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 lb("No code detected.");const{data:x,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:x.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:u}=t;if(!i||!a||!o||!u)throw new gd("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(a);let f=d+h;l&&(f=parseInt(l));const v=f-d;v*1e3<=Ml&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${v}s, should have been closer to ${h}s`);const g=f-h;d-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,f,d):d-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,f,d);const{data:m,error:w}=await this._getUser(i);if(w)throw w;const y={provider_token:r,provider_refresh_token:s,access_token:i,expires_in:h,expires_at:f,refresh_token:o,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:y,redirectType:t.type},error:null}}catch(r){if(ke(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 fd(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&&!(H$(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await pd(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=A$(),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 Oo(this.storage,this.storageKey,!0));try{return await Le(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(ke(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(ke(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,u,d;const{data:h,error:f}=i;if(f)throw f;const v=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 Le(this.fetch,"GET",v,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return Lr()&&!(!((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(ke(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;
168if(o)throw o;return await Le(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(ke(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 L$(async s=>(s>0&&await I$(200*Math.pow(2,s-1)),this._debug(n,"refreshing attempt",s),await Le(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Ds})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Fp(i)&&Date.now()+o-r<Ml})}catch(r){if(this._debug(n,"error",r),ke(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),Lr()&&!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 fd(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+ob;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${ob}s`),i){if(this.autoRefreshToken&&r.refresh_token){const{error:o}=await this._callRefreshToken(r.refresh_token);o&&(console.error(o),Fp(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 If;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),ke(i)){const o={session:null,error:i};return Fp(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 BT(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await pd(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Lr()&&(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(),Ml);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)/Ml);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ml}ms, refresh threshold is ${fb} ticks`),s<=fb&&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 HT)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Lr()||!(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()=>
168{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 Oo(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 Le(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(ke(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:u}=await Le(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 u?{data:null,error:u}:(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(ke(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 Le(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(ke(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 Le(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(ke(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(h=>h.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const d=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}}Kc.nextInstanceID=0;const lV=Kc;class cV extends lV{constructor(t){super(t)}}var uV=function(e,t,n,r){function s(i){return i instanceof n?i:new n(function(o){o(i)})}
168return new(n||(n=Promise))(function(i,o){function a(d){try{u(r.next(d))}catch(h){o(h)}}function l(d){try{u(r.throw(d))}catch(h){o(h)}}function u(d){d.done?i(d.value):s(d.value).then(a,l)}u((r=r.apply(e,t||[])).next())})};class dV{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=E$(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`,u={db:g$,realtime:y$,auth:Object.assign(Object.assign({},v$),{storageKey:l}),global:m$},d=C$(r??{},u);this.storageKey=(s=d.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(i=d.global.headers)!==null&&i!==void 0?i:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(h,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((o=d.auth)!==null&&o!==void 0?o:{},this.headers,d.global.fetch),this.fetch=S$(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new MF(`${a}/rest/v1`,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),d.accessToken||this._listenForAuthEvents()}get functions(){return new fF(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new h$(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 uV(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},u,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new cV({url:this.authUrl,headers:Object.assign(Object.assign({},h),u),storageKey:i,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:s,flowType:o,lock:a,debug:l,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new XF(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 hV=(e,t,n)=>new dV(e,t,n),fV="https://bdwumeancdcnwazpahwv.supabase.co",pV="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImJkd3VtZWFuY2RjbndhenBhaHd2Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzgxOTUwODIsImV4cCI6MjA1Mzc3MTA4Mn0.FGAl0qUpzOUOlseZbhwucMp_V54IRBSUqsqtH9bnCEI",de=hV(fV,pV),mb=({link:e,isActive:t})=>{const n="text-gold",r="text-parchment/50 hover:text-parchment",s="px-3 py-2 text-xs font-mono tracking-widest uppercase transition-colors";return e.href?c.jsx("a",{href:e.href,onClick:e.onClick,className:`${s} ${r}`,children:e.label}):c.jsx(bn,{to:e.path,onClick:e.onClick,className:`${s} ${t?n:r}`,children:e.label})},mV=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(null),s=es(),i=Ri(),{toast:o}=Pr();p.useEffect(()=>{de.auth.getSession().then(({data:{session:h}})=>{r((h==null?void 0:h.user)??null)});const{data:{subscription:d}}=de.auth.onAuthStateChange((h,f)=>{r((f==null?void 0:f.user)??null)});return()=>d.unsubscribe()},[]);const a=async()=>{try{const{error:d}=await de.auth.signOut();if(d)throw d;i("/"),o({title:"Logged out successfully"})}catch(d){o({variant:"destructive",title:"Error",description:d.message})}},l=[{path:"/",label:"Home"},{path:"/music",label:"Music"},{path:"/aadyaan/sessions",label:"Sessions"},{path:"/research",label:"Research"}],u=d=>s.pathname===d;return c.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-navy/95 backdrop-blur-sm border-b border-parchment/5",children:c.jsxs("div",{className:"container mx-auto px-4",children:[c.jsxs("div",{className:"flex items-center justify-center h-16 relative",children:[c.jsx(Ve,{variant:"ghost",size:"icon",className:"md:hidden absolute left-4 text-parchment/60 hover:bg-parchment/10",onClick:()=>t(!e),children:e?c.jsx(Ey,{className:"h-6 w-6"}):c.jsx(LO,{className:"h-6 w-6"})}),c.jsx("div",{className:"hidden md:flex items-center justify-center space-x-1",children:l.map(d=>c.jsx(mb,{link:d,isActive:u(d.path)},d.path))}),c.jsx("div",{className:"hidden md:block absolute right-4",children:n&&c.jsxs(Ve,{variant:"ghost",size:"sm",onClick:a,className:"text-parchment/50 hover:text-parchment font-mono text-xs tracking-widest",children:[c.jsx(_w,{className:"h-4 w-4 mr-2"}),"Logout"]})})]}),e&&c.jsxs("div",{className:"md:hidden py-2",children:[l.map(d=>c.jsx(mb,{link:d,isActive:u(d.path)},d.path)),n&&c.jsx("div",{className:"px-3 py-2",children:c.jsxs(Ve,{variant:"ghost",className:"w-full justify-start text-parchment/70 hover:text-parchment",onClick:()=>{a(),t(!1)},children:[c.jsx(_w,{className:"h-4 w-4 mr-2"}),"Logout"]})})]})]})})},qy=[{title:"David Lloyd Alternatives Explorer",description:"Interactive comparison of 18 premium fitness and members' clubs across four models â commercial chains, golf & country, heritage members', and community sport. Filter by what matters, score matches live against a David Lloyd benchmark, and explore a value-vs-breadth scatter plot.",tags:["Interactive","Data Visualisation","Decision Support"],href:"/research/david-lloyd-alternatives",date:"2025",updated:"2026-07-23",category:"research",topics:["money"]},{title:"Office Attendance Calculator",description:"Track a hybrid-work month against the 50% in-office rule. Mark office days and leave straight on the calendar and watch a threshold meter show whether you're above the line â with UK bank holidays and per-month saving built in.",tags:["Calculator","Productivity","UK Bank Holidays"],href:"/research/office-attendance",date:"2025",updated:"2026-07-23",category:"app",to
168pics:["money"]},{title:"Sri Lanka Fertility Explorer",description:"How Sri Lanka's fertility fell from 5.0 children per woman in 1963 to 1.3 today. Explore the real determinants â education, wealth, sector, ethnicity and district â with data from the 2016 DHS and the 2012 & 2024 censuses.",tags:["Interactive","Demographics","Data Visualisation"],href:"/research/sri-lanka-fertility",date:"2026",updated:"2026-07-23",category:"research",topics:["sri-lanka"]},{title:"The Zone of Inhibition â Antibiotics Field Guide",description:"An interactive field guide to 24 antibiotics from Prontosil to Zoliflodacin (1935â2025): discovery stories, source organisms, mechanisms of action, pharmacokinetics, side effects, and the accelerating race against resistance.",tags:["Interactive","Medicine","Reference"],href:"/research/antibiotics-field-guide",date:"2026",updated:"2026-07-23",category:"research",topics:["health"]},{title:"England 1â2 Argentina â Tactical Replay",description:"A minute-by-minute tactical reconstruction of the 2026 World Cup semi-final. Step through the shifts in shape and the substitutions that decided the tie on an animated pitch.",tags:["Interactive","Football","Tactical Analysis"],href:"/research/england-argentina-tactical",date:"2026",updated:"2026-07-23",category:"research",topics:["sport"]},{title:"How Modern Medicine Rewrote the Causes of Death",description:"Comparing death rates per 100,000 people between c. 1800 and today. Normalising per capita strips out population growth to reveal the real shift in what actually kills us.",tags:["Data Visualisation","History","Mortality"],href:"/research/causes-of-death",date:"2026",updated:"2026-07-23",category:"research",topics:["health"]},{title:"Career as a Day",description:"Thirty-four years of a career compressed into a single 24-hour day â each role scaled to the real time spent, from education at dawn to the strategic hours of the evening.",tags:["Interactive","Portfolio","Visualisation"],href:"/research/career-as-a-day",date:"2026",updated:"2026-07-29",category:"research",topics:["personal"]},{title:"The Neolithic Y-Chromosome Bottleneck",description:"Around 7,000 years ago the human Y-chromosome's diversity collapsed to about a twentieth of its former level while female (mtDNA) diversity kept rising. A walk-through of the myth vs the genetics, the patrilineal-clan mechanism, the ~17:1 ratio, and how it unfolded.",tags:["Interactive","Genetics","Deep Time"],href:"/research/y-chromosome-bottleneck",date:"2026",updated:"2026-07-24",category:"research",topics:["dna","science"]},{title:"Four Roads to July 2026 â Westminster Dossier",description:"Burnham, Badenoch, Polanski and Farage compared four ways â careers on one timeline, six live debates on a policy grid, an ideology 'fingerprint' radar, and a political compass with documented drift. Toggle any leader and every view responds.",tags:["Interactive","Politics","Data Visualisation"],href:"/research/uk-leaders",date:"2026",updated:"2026-07-24",category:"research",topics:["politics"]},{title:"The Peopling of Sri Lanka â a Running History",description:"Press play and 300,000 years run on a world map: each migration draws on as its moment arrives and the island's eight communities light up as they land, from Balangoda Man to the Malays and Burghers. Scrub the timeline to any era yourself.",tags:["Interactive","Genetics","Timeline"],href:"/research/sri-lanka-history",date:"2026",updated:"2026-07-29",category:"research",topics:["sri-lanka","dna"]},{title:"Light, Distance & Time",description:"Two animations on cosmic light: replay the universe from the Big Bang to the moment the fog clears and frees the oldest light we can see (the CMB) â then watch why the farther something is, the deeper into its past you're looking.",tags:["Interactive","Astronomy","Animation"],href:"/research/light-distance-time",date:"2026",updated:"2026-07-24",category:"research",topics:["science"]},{title:"Canon R6 III vs Sony α7 V",description:"Two hybrid cameras at the same price, mostly a dead heat. This strips out the ties and magnifies only the eight axes where the choice is actually made â a divergence chart, the decisive detail, colour science, owner sentiment, and two clean decision routes.",tags:["Comparison","Photography","Decision Support"],href:"/research/r6iii-vs-a7v",date:"2026",updated:"2026-07-24",category:"research",topics:["photography"]},{title:"EF vs RF â Lens Strategy for the R6 III",description:"Why a hollow £99 adapter unlocks three decades of used EF glass at up to 77% off the RF equivalent â a flange-distance schematic, a saving-per-lens chart, an interactive kit builder that tallies the delta, the honest trade-offs, and the kit I'd actually buy.",tags:["Interactive","Photography","Decision Support"],href:"/research/ef-vs-rf",date:"2026",updated:"2026-07-24",category:"research",topics:["photography"]},{title:"The Canon Camera Tree â Shipping & Rumoured",description:"Every current Canon RF, Cinema EOS, DSLR and compact line â plus what the rumour mill says is landing before the end of 2026 â as an expandable tree. Filter to shipping-only or rumoured-only, with a confidence table rating how much to trust each rumour.",tags:["Interactive","Photography","Reference"],href:"/research/canon-camera-tree",date:"2026",updated:"2026-07-28",category:"research",topics:["photography"]},{title:"Draw the Curve",description:"A guessing game: for ten everyday meals â from a can of Coke to kiribath, string hoppers and pizza â draw the blood-sugar curve you expect, then watch the real one animate in and score how close you got. A hands-on feel for why fat and fibre flatten the spike, and why fatty meals peak late.",tags:["Interactive","Game","Blood Sugar"],href:"/research/draw-the-curve",date:"2026",updated:"2026-07-28",category:"research",topics:["health"]},{title:"A Full Day of Blood Sugar",description:"Two scenarios, one body, across 24 hours. Build each day's meals, snacks and injections, pick whose body â a healthy pancreas, tablets, or insulin â and watch blood sugar and insulin play out minute by minute, together or step by step. A vivid look at why the highs come from the food and the lows from the clock.",tags:["Interactive","Diabetes","Blood Sugar"],href:"/research/full-day-blood-sugar",date:"2026",updated:"2026-07-29",category:"research",topics:["health"]},{title:"The OpenAI / Hugging Face Incident, Decoded",description:"A jargon decoder for the July 2026 incident where OpenAI's models escaped a test sandbox and breached Hugging Face. Tap any term in the disclosure's densest sentence â zero-day, privilege escalation, RCE â for a plain-English meaning and what it meant here, then read the whole story told with
168no jargon at all.",tags:["Interactive","Cybersecurity","Explainer"],href:"/research/openai-huggingface-incident",date:"2026",updated:"2026-07-29",category:"research",topics:["tech"]},{title:"Dark Matter Explained Simply",description:"Five sixths of the matter in the universe has never been seen. One switch at the top turns the invisible halo on and off, and every diagram below responds â the stars stop orbiting too fast, the rotation curve collapses, and the bent light straightens out.",tags:["Interactive","Astronomy","Explainer"],href:"/research/dark-matter",date:"2026",updated:"2026-07-29",category:"research",topics:["science"]},{title:"Your Brain Is Not a Computer",description:"A neural network isn't a brain, and the two share about four honest similarities. Poke a leaky bucket and a vending machine side by side to see the difference: the brain cell fires late, early, or not at all, while the unit returns the same number every single time.",tags:["Interactive","Neuroscience","Explainer"],href:"/research/brains-vs-networks",date:"2026",updated:"2026-07-29",category:"research",topics:["science","tech"]},{title:"A Pill, a Promise, and a Pancreas",description:"Oral GLP-1 has reached Britain. What the weight-loss tablet actually does against the injections, who the licence covers â with the lower BMI thresholds NICE applies to South Asian and other backgrounds on a slider â and an honest look at the pancreatitis link, where the leading explanation is gallstones from rapid weight loss rather than the drug itself.",tags:["Explainer","Medicine","Interactive"],href:"/research/glp1",date:"2026",updated:"2026-07-31",category:"research",topics:["health"]},{title:"From Prompts to Patterns",description:"A prompt library built for business analysts, and what happened when the models got good enough to make half of it obsolete. The durable asset turned out not to be the wording but the encoded standard â and the pattern that matters now is the one where the model interviews you before it generates anything.",tags:["Essay","AI Practice","Ways of Working"],href:"/research/prompts-to-patterns",date:"2026",updated:"2026-07-31",category:"research",topics:["tech"]},{title:"SAFe Atlas â the Scaled Agile Framework",description:"The whole framework on one page: values and principles, the four configurations, the train and its roles, cadence, WSJF, portfolio management, the certification map â and the AI-Native operating model added in June 2026. Seventeen sections with a route-line contents rail, plus the critiques and the rivals.",tags:["Interactive","Reference","Agile"],href:"/research/safe-atlas",date:"2026",updated:"2026-07-31",category:"research",topics:["tech"]},{title:"Ten Monuments Credited to the Wrong People",description:"Druids did not build Stonehenge, Alfred did not cut the Uffington horse, and no Viking was buried at Sutton Hoo. Ten British monuments set against the builder the excavation record actually supports â each with the dating method behind the correction, where the wrong answer came from, and a plain note on where archaeologists still argue.",tags:["Interactive","Archaeology","Explainer"],href:"/research/misattributed-britain",date:"2026",updated:"2026-07-30",category:"research",topics:["history"]},{title:"Who Arrived â Peoples of Britain and Ireland",description:"Every arrival in these islands across 950,000 years, ranked by how much each actually changed the gene pool. The famous invasions come bottom: Rome and the Normans left the loudest documentary trace and almost no genetic one, while two anonymous prehistoric migrations replaced around nine-tenths of the population and left not a written word.",tags:["Interactive","Ancient DNA","Migration"],href:"/research/peoples-of-britain",date:"2026",updated:"2026-07-30",category:"research",topics:["history","dna"]},{title:"The Tiny Water Towers That Keep You Alive",description:"Mitochondria explained as a water tower: pumps push water uphill, and the only way back down is through a wheel. Break the pumps, cut the air, or crack the wall and watch the dials respond â two of those buttons are how cyanide and a 1930s diet pill killed people. Then a slider for heteroplasmy shows why a genetic fault can sit silent for decades.",tags:["Interactive","Biology","Explainer"],href:"/research/mitochondria",date:"2026",updated:"2026-07-30",category:"research",topics:["science","dna"]},{title:"What Charging Actually Costs You",description:"Run a real week of driving against live UK public charging tariffs â 24 networks, no home charger anywhere in the model. Build the trips you actually make, the places you actually plug in, and watch the blended cost of a mile land against petrol. Save setups and compare cars side by side.",tags:["Calculator","EV Charging","UK Tariffs"],href:"/research/ev-charging-cost",date:"2026",updated:"2026-07-30",category:"app",to
168pics:["money"],kind:"component"},{title:"The Compounding Curve",description:"An interactive look at how compound interest turns steady saving into exponential growth. Adjust the starting amount, monthly contributions, rate and time â and watch where the growth actually comes from.",tags:["Calculator","Personal Finance","Interactive"],href:"/research/compounding-curve",date:"2026",updated:"2026-07-23",category:"app",topics:["money"]},{title:"Any Seats to Colombo? â 75 Years of APIs",description:"One question â a seat from London to Colombo on 15 December â asked in every machine-to-machine dialect since 1949. Type B telex, cryptic mainframe entries, EDIFACT, SOAP, REST, NDC and now MCP, each with the actual wire format of its era and why the industry moved on. Aviation invented structured messaging a decade before the web, and every layer of it is still in production.",tags:["Interactive","Aviation","APIs"],href:"/research/api-history",date:"2026",updated:"2026-08-01",category:"research",topics:["tech"]},{title:"Reading the Rock â Dinosaurs in Plain English",description:"There were no witnesses. Every claim about a 70-tonne animal that died 95 million years ago is inferred from mineralised bone, volcanic ash, footprints and chemistry. Deep time, the six lines of evidence and what each can't deliver, the family tree that puts birds on the wrong branch, and the 66-million-year-old spring day that ended it.",tags:["Interactive","Palaeontology","Explainer"],href:"/research/dinosaurs",date:"2026",updated:"2026-08-01",category:"research",topics:["science"]},{title:"Why We Crave â the 500-Million-Year-Old Instrument in Your Mouth",description:"Taste is not about pleasure. It's five separate measuring instruments asking five survival questions â energy, protein, sodium, acid, poison â built underwater before jaws or land existed and never updated since. Explore each channel's hardware, drag the salt curve past the point where your brain changes its mind, and read the gene-loss table that proves the whole system tracks diet: cats can't detect sugar, pandas lost umami when they took up bamboo, hummingbirds rebuilt sweetness out of the savoury receptor.",tags:["Interactive","Biology","Evolution"],href:"/research/why-we-crave",date:"2026",updated:"2026-08-06",category:"research",topics:["science","health"]},{title:"Afraid of the Dark â an Inherited Alarm",description:"Nobody teaches a child to fear the dark, because the fear arrived already installed. A fossil skull with leopard punctures in it, the two roads a threat takes to the amygdala, and a log-scale scoreboard of what actually kills people against what we're wired to dread â mosquitoes and traffic take a million lives a year between them and trigger no alarm at all.",tags:["Interactive","Evolution","Explainer"],href:"/research/afraid-of-the-dark",date:"2026",updated:"2026-08-12",category:"research",topics:["science"]},{title:"The Beer Board â Smooth à Strong à Cheap",description:"Every beer worth considering on one map, plotted against the two things that genuinely fight each other: how smooth it drinks versus how much kick you get per pound. Weight what matters to you, filter to what's actually buyable in the UK, and the ranked shortlist re-sorts itself.",tags:["Interactive","Decision Support","UK"],href:"/research/beer-board",date:"2026",updated:"2026-08-12",category:"app",topics:["money"]},{title:"The Battle Roll â 5,700 Years of Fighting in Britain",description:"Every notable fight on, from, or by these islands, from a Neolithic hill fort stormed with flint arrows to a mountain taken at bayonet-point in the South Atlantic. Banded by era and coloured by the ruling house of the day, with who fought, how it ended, and why it mattered â plus a study mode that narrows the roll to the handful the Life in the UK handbook actually names.",tags:["Interactive","Military History","Reference"],href:"/research/battle-roll",date:"2026",updated:"2026-08-17",category:"research",topics:["history"]},{title:"The Regnal Roll â Rollo to Charles III",description:"Every ruler in the Crowns & Claims tree unbraided into one strict line of time, from Rollo's Normandy in 911 to the present day â seventeen houses from the Carolingians and the Knýtlinga Danes through Plantagenet, Lancaster and York to Windsor. Filter to monarchs only or by house, open any name for how they actually got the throne, and read the appendix on the French claim the English crown pressed for four centuries.",tags:["Interactive","Monarchy","Reference"],href:"/research/regnal-roll",date:"2026",updated:"2026-08-17",category:"research",topics:["history"]}
168,{title:"Devick's School Atlas â West Sussex",description:"Every serious state and independent option on the 2027â2042 journey, anchored on Horsham: ratings, results, fees, bursaries and catchments, with the housing and amenities picture behind the decision.",tags:["Interactive","Schools","West Sussex"],href:"/research/devick-school-atlas",date:"2026",updated:"2026-08-12",category:"research",topics:["personal"],private:!0},{title:"Devick's Fee Ledger â True Monthly Cost",description:"Headline fees are quoted per term and hide half the bill. Every route converted to a 12-month budget, with the extras schools don't print layered on and the whole 2028â2042 journey projected.",tags:["Interactive","Schools","Cost Modelling"],href:"/research/devick-fee-ledger",date:"2026",updated:"2026-08-12",category:"research",topics:["personal","money"],private:!0},{title:"The Devick Curriculum â a Parents' Field Guide",description:"Six of the world's best education systems â Singapore CPA maths, Montessori, Reggio Emilia, Finland, Polgár, EYFS â each contributing the one thing it does better than anyone else, woven with three family threads of language, music and movement into a roadmap from age two to seven. Includes the West Sussex admissions calendar and the summer-born deferral fork.",tags:["Interactive","Education","Field Guide"],href:"/research/devick-curriculum",date:"2026",updated:"2026-08-13",category:"research",topics:["personal"],private:!0},{title:"Life in the UK â Study Sheet",description:"A study app for the Life in the UK test: a paced study plan, drills over the material, timed mock tests and a reference section. Works offline once loaded, with no network needed.",tags:["Study Tool","Offline","Interactive"],href:"/research/life-in-the-uk",date:"2026",updated:"2026-08-13",category:"app",topics:["personal"],private:!0},{title:"Fact Ledger â Life in the UK",description:"Every fact the 3rd edition syllabus can examine you on, as a ledger, a timeline and a drill â with each topic's segment sized by how many of the 24 questions it can be expected to carry, so revision goes where the marks actually are.",tags:["Study Tool","Reference","Interactive"],href:"/research/lituk-fact-ledger",date:"2026",updated:"2026-08-13",category:"app",topics:["personal"],private:!0},{title:"The Line â British History for the Life in the UK Test",description:"The whole of British history as the handbook tells it, in order, one line each â from the Stone Age to devolution, colour-railed by era. Hide the years to drill yourself, or filter to only the dates that can actually be asked for, since the grey stops carry facts with no number attached. Flags the nine pairs that catch people out: 1665 and 1666, 1688 and 1689, 1918 and 1928.",tags:["Study Tool","Timeline","Interactive"],href:"/research/lituk-the-line",date:"2026",updated:"2026-08-15",category:"app",topics:["personal"],private:!0},{title:"ADHD âDopamine Foodsâ â Science vs Belief",description:"28 foods, nutrients and herbs plotted by how good the trial evidence is against how widely theyâre recommended in ADHD communities and traditional medicine. Nothing on the chart scores above 6 out of 10 on evidence and none comes close to the effect size of medication â the crowded top-left, where most of the famous advice lives, is the whole point. Open any dot for the plain-English verdict, then read the hype gap and the safety flags.",tags:["Interactive","Evidence Review","Nutrition"],href:"/research/adhd-dopamine-foods",date:"2026",updated:"2026-09-25",category:"research",topics:["health","science"],private:!0},{title:"The Deep Dig â 4.54 Billion Years Under Your Feet",description:"A 3D cut-away of the Earth you dig straight down through, layer by layer, from today's topsoil to the day the planet formed. Fifty-four layers, each with a find in the rock: the plutonium line from 1950s bomb tests, Toba's ash across India, the centimetre of asteroid clay that ended the dinosaurs, the missing billion years in the Grand Canyon, and the oceans rusting red.",tags:["Interactive","3D","Geology"],href:"/research/deep-dig",date:"2026",updated:"2026-09-25",category:"research",topics:["science","history"]},{title:"Your First Home â Mortgage Calculator",description:"Run the numbers on England's proposed Your First Home scheme for new builds: a 2.5% deposit, a government equity loan of up to 20%, and a bank mortgage for the rest. See the monthly cost against a plain 95% mortgage, the equity loan fees once the interest-free years end, what you'd repay as the home's value grows, and a stress test at the standard variable rate. Terms are provisional until the 28 October 2026 Budget.",tags:["Calculator","Housing","UK Policy"],href:"/research/your-first-home",date:"2026",updated:"2026-09-27",category:"app",to
168pics:["money"]},{title:"AI Writes the Plan, People Approve It â AI-DLC and AWS Engineering Pods",description:"AWS is changing software delivery in two places at once. AI-DLC, its AI-Driven Development Lifecycle, has the AI draft the plan and ask the questions while the team approves, with sprints replaced by bolts of hours or days. Its $1 billion Forward Deployed Engineering unit puts pods of five or six AWS engineers inside a customer for 45 days, then leaves AI agents behind. What each is, who is using them, how they connect, and what is still unproven.",tags:["Explainer","AI Practice","Ways of Working"],href:"/research/ai-dlc-aws-pods",date:"2026",updated:"2026-10-07",category:"research",topics:["tech"]}],Zi=qy.filter(e=>!e.private),Lf=[{id:"sri-lanka",label:"Sri Lanka",color:"#8FB09A"},{id:"dna",label:"DNA",color:"#7FA3B8"},{id:"health",label:"Health",color:"#E0A86B"},{id:"science",label:"Science",color:"#9A8FB8"},{id:"history",label:"History",color:"#B5776E"},{id:"tech",label:"Tech",color:"#C08FA0"},{id:"photography",label:"Photography",color:"#C9885A"},{id:"money",label:"Money & Work",color:"#B9A37E"},{id:"politics",label:"Politics",color:"#A3A79C"},{id:"sport",label:"Sport",color:"#7FB39C"},{id:"personal",label:"Personal",color:"#B99AC4"}],gV=e=>e.replace("/research/",""),Gd=e=>{const t=new Date(e+"T00:00:00");return Number.isNaN(t.getTime())?e:t.toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})},vV=[...Zi].sort((e,t)=>e.updated.localeCompare(t.updated)||e.title.localeCompare(t.title)),Hg=e=>{const t=vV.indexOf(e);return t===-1?null:t+1},lo=e=>{const t=Hg(e);return t===null?"PROBE ··":`PROBE ${t}`},fs=e=>Lf.find(t=>t.id===e.topics[0])??{id:"field-study",label:"Field study",color:"#8b94a6"},cr="#57B8AE",qd="#E8A249",gb={own:cr,inherited:qd},Zr=[{slug:"santhaapayen",title:"Santhaapayen",date:"2012-06-12",year:"2012",kind:"own",moons:["Raj Thillaiyampalam"],url:"https://open.spotify.com/track/4c90j3HQZuUeqb6klsKbF7",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/41/81/79/418179d4-372d-d124-d55e-7b59ef1adafe/mzaf_2399428175451151996.plus.aac.p.m4a",field:"The first world, four years before Nobala. Words by Nilar N. Cassim.",col:cr},{slug:"dasabaladhari",title:"Dasabaladhari",date:"2013-05-23",year:"2013",kind:"inherited",moons:[],url:"https://open.spotify.com/track/59Lb94mv6dusafQ7w5slM1",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview125/v4/d2/05/99/d2059985-698b-f13c-cf8a-778bad70e0c1/mzaf_9607288194244955040.plus.aac.p.m4a",field:"His grandfather's song, remade by the grandson. The sun's own light, returned.",col:qd},{slug:"nobala",title:"Nobala",date:"2016-03-08",year:"2016",kind:"own",moons:[],url:"https://open.spotify.com/track/2mIANR4fl6Kodio4r3OET3",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/1f/09/03/1f0903a6-c010-7d1e-c3ba-14a763675503/mzaf_2071339046503936924.plus.aac.p.m4a",field:"Formed under Maharaja Entertainments â music by Kapilan Kugavel, words by Sajith V Chathuranga.",col:cr},{slug:"heena-maka",title:"Heena Maka",date:"2018-08-10",year:"2018",kind:"own",moons:["Ravi Jay","Charitha Attalage"],url:"https://open.spotify.com/track/1dC7Q5yBpQ063UrIWpAB3N",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/6a/f5/44/6af5443d-d4c4-a3bf-97fb-0b476b020745/mzaf_5006482816350891146.plus.aac.p.m4a",field:"The one with two moons â Ravi Jay and Charitha Attalage in orbit. Still the brightest.",col:cr},{slug:"maa-langatama",title:"Maa Langatama",date:"2020-05-02",year:"2020",kind:"inherited",moons:[],url:"https://open.spotify.com/track/0evyhCOXs7WBTOEMDFTxx3",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview116/v4/c5/fd/27/c5fd270f-0a92-bcde-946d-4947438b8bdb/mzaf_8699274251862879774.plus.aac.p.m4a",field:"His father's song, re-recorded the year the voice fell silent.",col:qd},{slug:"ayasaye",title:"Ayasaye",date:"2021-03-14",year:"2021",kind:"own",moons:[],url:"https://open.spotify.com/track/2sozIgV8UZOoWWXgXtpSJY",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/01/55/1d/01551dae-ec32-1d72-02ac-cf4d5a45dff3/mzaf_9995303077834316993.plus.aac.p.m4a",field:"Melody and production his own, words by Yashodha Adhikari. Self-released.",col:cr},{slug:"samarum-sena",title:"Samarum Sena",date:"2021-06-04",year:"2021",kind:"own",moons:["Vidula Ravishara"],url:"https://open.spotify.com/track/4UWt78bhZDvZXNopHVz7Tj",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/11/d2/d9/11d2d93a-c5f7-dda8-8c90-3f7df3ad9fae/mzaf_1725399240900148558.plus.aac.p.m4a",field:"Cello and banjo in the arrangement, Vidula Ravishara on the melody.",col:cr},{slug:"ayasaye-remix",title:"Ayasaye - Remix",date:"2021-07-10",year:"2021",kind:"own",moons:["Charuka Nilusha"],url:"https://open.spotify.com/track/5xMstWGGdPc3nKEiG18fRE",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview125/v4/3d/47/3f/3d473f3e-9843-8bb5-7139-ddd63e524135/mzaf_5695976573939380547.plus.aac.p.m4a",field:"Ayasaye taken apart and rebuilt by Charuka Nilusha, four months later.",col:cr},{slug:"sansara-aale",title:"Sansara Aale",date:"2021-08-13",year:"2021",kind:"own",moons:["YAKA"],url:"https://open.spotify.com/track/1SyPivXW7qUPHIruQ58Uom",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/0c/36/fb/0c36fbf9-57a3-82f1-a399-24eb7cf0b078/mzaf_11586366275926462205.plus.aac.p.m4a",field:"A voice in YAKA's system, cut at HITBOX.",col:cr},{slug:"seyawak",title:"Seyawak",date:"2021-09-17",year:"2021",kind:"own",moons:["A. Ryan"],url:"https://open.spotify.com/track/6Qv1l1EkkhB8r2T6H8sSsi",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview115/v4/2f/2c/08/2f2c0833-c62e-0e5d-4f27-a5e99dabc93f/mzaf_1909753213439524225.plus.aac.p.m4a",field:"A. Ryan sings it â the words, the music and the production are Harshadewa's.",col:cr},{slug:"walakulu-pelin-basinna",title:"Walakulu Pelin Basinna",date:"2022-01-07",year:"2022",kind:"inherited",moons:["Dulshara De Alwis"],url:"https://open.spotify.com/track/0GibHcarsxwiqSPPZLsEOq",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview126/v4/34/48/38/3448383f-dde4-8fcb-a978-ef34a4f7243a/mzaf_9277255558683170974.plus.aac.p.m4a",field:"His father's again, with Dulshara de Alwis â dedicated to his memory.",col:qd},{slug:"seethala-dawasaka",title:"Seethala Dawasaka",date:"2023-03-24",year:"2023",kind:"own",moons:[],url:"https://open.spotify.com/track/5UbuqdwDhiREM6ACj5IzOi",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview116/v4/80/29/c8/8029c83b-e07f-3def-6b8b-7e58220410f8/mzaf_17097043041670212452.plus.aac.p.m4a",field:"Words, music, mix â the only world he made entirely alone.",col:cr},{slug:"buduguna-geethaya",title:"Buduguna Geethaya",date:"2023-09-01",year:"2023",kind:"own",moons:["Ravana Brothers","Malinda Wijekoon"],url:"https://open.spotify.com/track/77lIocJ1LWQrdJE3cBV6vq",preview:"https://audio-ssl.itunes.apple.com/itunes-assets/AudioPreview116/v4/41/a3/ce/4
1681a3cec3-675a-ca39-128b-e26109dc3cfa/mzaf_5751209126938251891.plus.aac.p.m4a",field:"Nine minutes of devotional singing with the Ravana Brothers.",col:cr}],WT=[...Zr].reverse(),KT="universe:rate",GT="universe-rate-change",$p=1,qT=0,YT=2,ZT=e=>Math.min(YT,Math.max(qT,e));function yV(){try{const e=localStorage.getItem(KT);if(e===null)return $p;const t=Number.parseFloat(e);return Number.isFinite(t)?ZT(t):$p}catch{return $p}}let Wg=yV();const Kg=()=>Wg;function xV(e){Wg=ZT(e);try{localStorage.setItem(KT,String(Wg))}catch{}window.dispatchEvent(new Event(GT))}const vb=GT,Oh=[],wV=50,bV=1e4;let vd=!1;function QT(e){var r;const{name:t,...n}=e;(r=window.umami)==null||r.track(t,n)}function Ga(e){if(!(typeof window>"u")){if(window.umami)return QT(e);Oh.length<wV&&Oh.push(e),SV()}}function SV(){if(vd)return;vd=!0;const e=Date.now(),t=()=>{if(window.umami){Oh.splice(0).forEach(QT),vd=!1;return}if(Date.now()-e>bV){Oh.length=0,vd=!1;return}setTimeout(t,200)};t()}const yb={"open.spotify.com":"spotify","spotify.link":"spotify","youtube.com":"youtube","youtu.be":"youtube","music.youtube.com":"youtube","music.apple.com":"apple","instagram.com":"instagram","facebook.com":"facebook","x.com":"x","twitter.com":"x"};function XT(e){if(!e)return null;if(e.startsWith("mailto:"))return"email";let t;try{t=new URL(e,location.href).hostname}catch{return null}if(!t||t===location.hostname)return null;const n=t.replace(/^www\./,"");return yb[t]??yb[n]??"other"}function _V(e=document){const t=n=>{var o;const r=n.target,s=(o=r==null?void 0:r.closest)==null?void 0:o.call(r,"a[href]");if(!s)return;const i=XT(s.href);i&&Ga({name:"outbound_click",dest:i,track:s.dataset.track})};return e.addEventListener("click",t,{capture:!0}),()=>e.removeEventListener("click",t,{capture:!0})}function EV(e,t){let n=null,r=new Set;const s=a=>{a!==n&&(n=a,r=new Set)},i=()=>{const a=t();a&&(s(a),!(e.currentTime>1)&&Ga({name:"media_play",track:a}))},o=()=>{const a=t();if(!a||(s(a),!e.duration||!Number.isFinite(e.duration)))return;e.currentTime/e.duration*100>=50&&!r.has(50)&&(r.add(50),Ga({name:"media_progress",track:a,pct:50}))};return e.addEventListener("play",i),e.addEventListener("timeupdate",o),()=>{e.removeEventListener("play",i),e.removeEventListener("timeupdate",o)}}const Vp=4e3,CV=600,TV=1500,kV=450,jV=5,PV=8,AV=90,RV=64,NV=500,OV=2500,IV=130,xb=.05,LV=300,wb=340,DV=100,MV=420,FV=.1,ur=Zr.map((e,t)=>{const n=128+t*18.5;return{name:`${e.title.toUpperCase()} · ${e.year}`,url:e.url,slug:e.slug,r:n,speed:.0423/Math.pow(n,.816),phase:t*2.39996,col:e.col,size:5.8,moons:e.moons.length}}),Up=-.62;function rn(e){return Math.abs(Math.sin(e*127.1)*43758.5453%1)}const bb="82,184,216",Sb=new Map;function $V(e){if(!e)return bb;const t=Sb.get(e);if(t)return t;const n=/^#?([0-9a-f]{6})$/i.exec(e),r=n?[0,2,4].map(s=>parseInt(n[1].slice(s,s+2),16)).join(","):bb;return Sb.set(e,r),r}function yd(e){return e*e*(3-2*e)}function _b(e,t){return ur[e].size*Math.max(.8,t*.72)}function JT({probes:e,signals:t,explore:n=!1,onFocus:r,onPlanet:s}){const i=p.useRef(null),o=p.useRef(t);o.current=t;const a=Ri(),l=p.useRef(a);l.current=a;const u=p.useRef(e);u.current=e;const d=e.length,h=p.useRef(r);h.current=r;const f=p.useRef(s);return f.current=s,p.useEffect(()=>{const v=i.current;if(!v)return;const g=v.getContext("2d");if(!g)return;const m=matchMedia("(prefers-reduced-motion: reduce)").matches,w=matchMedia("(pointer: fine)").matches;let y=innerWidth,x=innerHeight;const b=Math.min(2,window.devicePixelRatio||1);let S=0,_=0,j=-1,T=-1,k=0,E=0,N=0,U=0;const O=new Map;let z=null,D=0,q=.9,F=0,K=0,R=!1,$=0,J=0,Q=0,oe=null,ae=-1,Pe=0,st=0,ve=!1,ne=1,Te=0,Ue=0,he=-1,Ne=0,be=0,Ke=0,at=1;const Hn=Array.from({length:1e3},(L,V)=>({r:70+rn(V*1.9)*40,a:rn(V*3.7)*Math.PI*2,tw:rn(V*5.1)*Math.PI*2,s:.6+rn(V*7.3)*1})),Rt=Array.from({length:d},(L,V)=>({a:130+rn(V)*300,e:.3+rn(V*1.7)*.45,om:rn(V*2.3)*Math.PI*2,ph:rn(V*3.1)*Math.PI*2,sp:12e-5+rn(V*4.7)*18e-5})),Nr=Array.from({length:240},(L,V)=>({x:rn(V*1.1),y:rn(V*2.2),z:rn(V*3.3),tw:rn(V*4.4)*Math.PI*2}));function C(){y=innerWidth,x=innerHeight,v.width=y*b,v.height=x*b,g.setTransform(b,0,0,b,0,0),Or(E)}function A(){ae=-1,he=-1,ve=!1;const L=document.documentElement.scrollHeight-x;S=L>0?Math.min(1,Math.max(0,scrollY/L)):0;const V=document.getElementById("live");if(V){const Y=V.getBoundingClientRect();_=Math.min(1,Math.max(0,(x*.85-Y.top)/(x*.55)))}m&&Or(E)}function I(){if(n){const Ae=Math.min(y,x)/860*q;return{zoom:q,SC:Ae,cx:y/2+F,cy:x/2+K}}const L=2+(.62-2)*yd(S),V=Math.min(y,x)/860*L,Y=y*.6+(j>=0?(j-y/2)*.014:0),ee=x*.5+(T>=0?(T-x/2)*.014:0);return{zoom:L,SC:V,cx:Y,cy:ee}}function X(){const L=I();return{zoom:L.zoom*ne,base:L.zoom,SC:L.SC*ne,cx:L.cx+be,cy:L.cy+Ke}}function G(L,V,Y){const ee=ur[V],Ae=ee.phase+L*ee.speed,Me=Math.atan2(Math.sin(Ae),Math.cos(Ae)),Mt=n?Me:Me+(Up-Me)*yd(_);return{x:Y.cx+Math.cos(Mt)*ee.r*Y.SC,y:Y.cy+Math.sin(Mt)*ee.r*Y.SC}}function B(L,V,Y){const ee=Rt[V],Ae=ee.ph+L*ee.sp,Me=ee.a*(1-ee.e*ee.e)/(1+ee.e*Math.cos(Ae));return{x:Y.cx+Math.cos(Ae+ee.om)*Me*Y.SC,y:Y.cy+Math.sin(Ae+ee.om)*Me*Y.SC}}
168function ue(L,V){const Y=rn(L*9.7)*Math.PI*2,ee=330+rn(L*6.3)*100;return{x:V.cx+Math.cos(Y)*ee*V.SC,y:V.cy+Math.sin(Y)*ee*V.SC}}function _e(L,V){let Y=1/0;for(let ee=0;ee<ur.length;ee++){const Ae=G(L,ee,V),Me=Math.hypot(j-Ae.x,T-Ae.y);Me<Y&&(Y=Me)}for(let ee=0;ee<Rt.length;ee++){const Ae=B(L,ee,V),Me=Math.hypot(j-Ae.x,T-Ae.y);Me<Y&&(Y=Me)}return Y}function it(L,V){const Y=performance.now();if(ae<0&&ve&&j>=0&&Y>=Ne&&Y-st<OV){const lt=Be(j,T,V);lt&&/^p\d/.test(lt)&&(ae=+lt.slice(1),Pe=Y)}if(he>=0){const lt=G(V,he,X());Math.hypot(j-lt.x,T-lt.y)>RV&&(ae=-1,he=-1,Ne=Y+NV)}const ee=I(),Ae=ae>=0&&Y-Pe>=AV;if(Ae&&he!==ae){const lt=G(V,ae,X());Te=lt.x,Ue=lt.y,he=ae}const Me=Ae?Math.max(1,Math.min(jV,PV/ee.zoom)):1;ne+=(Me-ne)*(1-Math.exp(-L/(Me>ne?LV:wb)));const Mt=ve&&j>=0&&(w||he>=0)?_e(V,X()):1/0,Mi=xb+(1-xb)*yd(Math.min(1,Mt/IV)),Sl=Mi<at?DV:MV;if(at+=(Mi-at)*(1-Math.exp(-L/Sl)),he>=0){const lt=G(V,he,{...ee,base:ee.zoom,zoom:ee.zoom*ne,SC:ee.SC*ne});be=Te-lt.x,Ke=Ue-lt.y}else{he=-1;const lt=1-Math.exp(-L/wb);be+=(0-be)*lt,Ke+=(0-Ke)*lt,ae<0&&(Math.abs(ne-1)<.001&&(ne=1),Math.abs(be)<.02&&(be=0),Math.abs(Ke)<.02&&(Ke=0),Math.abs(at-1)<.001&&(at=1))}}function Be(L,V,Y){const ee=X(),Ae=(Ye,Ct)=>Math.hypot(L-Ye,V-Ct),Me=w?16:28;let Mt=-1,Mi=1/0;for(let Ye=0;Ye<ur.length;Ye++){const Ct=G(Y,Ye,ee),Fi=Ae(Ct.x,Ct.y);Fi<Math.max(Me,_b(Ye,ee.zoom)+6)&&Fi<Mi&&(Mt=Ye,Mi=Fi)}if(Mt>=0)return`p${Mt}`;if(Ae(ee.cx,ee.cy)<30)return"sun";const Sl=o.current;for(let Ye=0;Ye<Sl.length;Ye++){const Ct=ue(Ye,ee);if(Ae(Ct.x,Ct.y)<9)return`sig${Ye}`}for(let Ye=0;Ye<Rt.length;Ye++){const Ct=B(Y,Ye,ee);if(Ae(Ct.x,Ct.y)<8)return`probe${Ye}`}const lt=Math.hypot(L-ee.cx,V-ee.cy);return Math.abs(lt-380*ee.SC)<7?"ring":lt>62*ee.SC&<<118*ee.SC?"belt":null}function en(L){if(L==="sun")return"THE FAMILY SUN · LIT 1951";if(L==="belt")return"THE ARIYASINGHE BELT · 1,000 SONGS · W.D. ARIYASINGHE";if(L==="ring")return"AADYAAN SESSIONS · SPRING 2027";if(L.startsWith("probe")){const V=u.current[+L.slice(5)];return V?`${V.label} · OPEN â`:"A PROBE"}if(L.startsWith("p"))return ur[+L.slice(1)].name;if(L.startsWith("sig")){const V=o.current[+L.slice(3)];return V?`SIGNAL · ${V.callsign.toUpperCase()}`:"SIGNAL"}return""}function Dt(L){const V=O.get(L);if(!V)return 0;const Y=V.until-performance.now();return Y<=0?(O.delete(L),0):Math.min(1,Y/CV)}function or(L){if(L!==z)return 0;const V=D-performance.now();return V<=0?0:Math.min(1,V/kV)}function ar(L){z=L,D=performance.now()+TV}function js(L,V){var ee;st=performance.now(),ve=!((ee=L==null?void 0:L.closest)!=null&&ee.call(L,"a, button, input, textarea, label, .panel"));const Y=V&&ve&&/^p\d/.test(V)?+V.slice(1):-1;he>=0?Y>=0&&Y!==ae?(ae=Y,Pe=0,he=-1):ve||(ae=-1,he=-1):Y!==ae&&(ae=Y,Pe=st)}function Li(L,V){j=L.clientX,T=L.clientY,js(L.target,V),ae>=0&&he!==ae&&(Pe=0),ae<0&&!w&&(j=-1,T=-1)}function Ao(L){var ee;j=L.clientX,T=L.clientY;const V=Be(j,T,E);V&&(O.set(V,{until:performance.now()+Vp}),ar(V)),v.style.cursor=V&&(V.startsWith("probe")||/^p\d/.test(V))?"pointer":"",js(L.target,V);const Y=V?en(V).replace(" · OPEN â",""):null;Y!==oe&&(oe=Y,(ee=h.current)==null||ee.call(h,Y))}function ns(){ae=-1,he=-1}function Wn(L){var ee,Ae;if(L.target.closest("a, button, input, textarea, label, .panel"))return;const Y=Be(L.clientX,L.clientY,E);if(Li(L,Y),!!Y){if(Y.startsWith("probe")&&(n||Dt(Y)>0)){const Me=u.current[+Y.slice(5)];if(Me){n?(window.open(Me.href,"_blank","noopener,noreferrer"),ar(Y)):l.current(Me.href);return}}if(/^p\d/.test(Y)&&(n||Dt(Y)>0)){const Me=+Y.slice(1);if(n){(ee=f.current)==null||ee.call(f,Me),ar(Y);return}if((Ae=ur[Me])!=null&&Ae.url){const Mt=XT(ur[Me].url);Mt&&Ga({name:"outbound_click",dest:Mt,track:ur[Me].slug}),window.open(ur[Me].url,"_blank","noopener,noreferrer");return}}O.set(Y,{until:performance.now()+Vp}),ar(Y),m&&Or(E)}}function Or(L){var rx;E=L;const V=X(),{zoom:Y,base:ee,SC:Ae,cx:Me,cy:Mt}=V;g.fillStyle="#0A0D14",g.fillRect(0,0,y,x);const Mi=j>=0?j-y/2:0,Sl=T>=0?T-x/2:0,lt=1+(ne-1)*FV;for(const ye of Nr){let Ze=ye.x*(y+200)-100-Mi*.01*(1+ye.z),Qe=ye.y*(x+200)-100-Sl*.01*(1+ye.z);lt!==1&&(Ze=Te+(Ze-Te)*lt,Qe=Ue+(Qe-Ue)*lt);const Ft=.14+ye.z*.3+.12*Math.sin(L*.0011+ye.tw);g.fillStyle=`rgba(237,234,224,${Math.max(.05,Ft).toFixed(2)})`;const rs=.8+ye.z*1.3;g.fillRect(Ze,Qe,rs,rs)}const Ye=ye=>Me+ye*Ae,Ct=ye=>Mt+ye*Ae;g.strokeStyle="rgba(237,234,224,0.09)",g.lineWidth=1;for(const ye of ur)g.beginPath(),g.arc(Me,Mt,ye.r*Ae,0,Math.PI*2),g.stroke();const Fi=Dt("ring");if(g.setLineDash([4,8]),g.strokeStyle=`rgba(232,162,73,${(.22+Fi*.5).toFixed(2)})`,g.beginPath(),g.arc(Me,Mt,380*Ae,0,Math.PI*2),g.stroke(),g.setLineDash([]),ee<1.1||Fi>
1680){g.font="11px ui-monospace, Menlo, monospace",g.fillStyle=`rgba(232,162,73,${(.7+Fi*.3).toFixed(2)})`;const ye="AADYAAN SESSIONS · SPRING 2027",Ze=g.measureText(ye).width;g.fillText(ye,Math.min(Math.max(8,Ye(380*.05)),Math.max(8,y-Ze-8)),Math.min(Math.max(14,Ct(-380)+16),x-8))}const J0=L*3e-4,_l=Math.cos(J0)*4,El=Math.sin(J0)*4,ex=Dt("sun"),Uu=g.createRadialGradient(Ye(_l),Ct(El),0,Ye(_l),Ct(El),52*Ae+24+ex*18);Uu.addColorStop(0,"rgb(232,162,73)"),Uu.addColorStop(.25,"rgba(232,162,73,0.55)"),Uu.addColorStop(1,"rgba(10,13,20,0)"),g.fillStyle=Uu,g.beginPath(),g.arc(Ye(_l),Ct(El),52*Ae+24+ex*18,0,Math.PI*2),g.fill(),g.fillStyle="#FFF7E8",g.beginPath(),g.arc(Ye(_l),Ct(El),6.2*Math.max(.7,Y*.7),0,Math.PI*2),g.fill();const tx=or("sun");tx>0&&ge("THE FAMILY SUN · LIT 1951",Ye(_l)+14,Ct(El)-12,tx);const Cl=Dt("belt"),sR=L*5e-5;for(let ye=0;ye<Hn.length;ye++){const Ze=Hn[ye],Qe=Ze.a+sR,Ft=.2+.18*Math.sin(L*9e-4+Ze.tw)+Cl*.25;g.fillStyle=ye%3===0?`rgba(232,162,73,${Math.max(.06,Ft).toFixed(2)})`:`rgba(237,234,224,${Math.max(.05,Ft*.8).toFixed(2)})`,g.fillRect(Ye(Math.cos(Qe)*Ze.r),Ct(Math.sin(Qe)*Ze.r),Ze.s,Ze.s)}if((ee<1.15||Cl>0)&&Cl>=0){const ye=ee<1.15?Math.max(.75,Cl):Cl;ye>0&&ge("THE ARIYASINGHE BELT · 1,000 SONGS · W.D. ARIYASINGHE",Ye(78),Ct(112)+14,ye)}for(let ye=0;ye<Rt.length;ye++){const Ze=B(L,ye,V),Qe=Dt(`probe${ye}`);g.fillStyle=`rgba(${$V((rx=u.current[ye])==null?void 0:rx.color)},${(.6+Qe*.4).toFixed(2)})`,g.fillRect(Ze.x,Ze.y,1.6+Qe*1.4,1.6+Qe*1.4);const Ft=or(`probe${ye}`);Ft>0&&ge(en(`probe${ye}`),Ze.x+10,Ze.y-8,Ft)}const iR=o.current;for(let ye=0;ye<iR.length;ye++){const Ze=ue(ye,V),Qe=Dt(`sig${ye}`),Ft=.35+.2*Math.sin(L*.0013+ye)+Qe*.45;g.fillStyle=`rgba(232,162,73,${Ft.toFixed(2)})`,g.fillRect(Ze.x,Ze.y,1.8+Qe,1.8+Qe);const rs=or(`sig${ye}`);rs>0&&ge(en(`sig${ye}`),Ze.x+10,Ze.y-8,rs)}const nx=yd(_);ur.forEach((ye,Ze)=>
168{const Qe=G(L,Ze,V),Ft=_b(Ze,Y),rs=Dt(`p${Ze}`);rs>0&&(g.strokeStyle=`rgba(237,234,224,${(rs*.85).toFixed(2)})`,g.lineWidth=1.5,g.beginPath(),g.arc(Qe.x,Qe.y,Ft+7,0,Math.PI*2),g.stroke(),g.strokeStyle=`rgba(237,234,224,${(rs*.35).toFixed(2)})`,g.beginPath(),g.arc(Me,Mt,ye.r*Ae,0,Math.PI*2),g.stroke());const Bu=g.createRadialGradient(Qe.x-Ft*.35,Qe.y-Ft*.35,0,Qe.x,Qe.y,Ft);Bu.addColorStop(0,"#FFFFFF"),Bu.addColorStop(.25,ye.col),Bu.addColorStop(1,"rgba(10,13,20,0.9)"),g.fillStyle=Bu,g.beginPath(),g.arc(Qe.x,Qe.y,Ft,0,Math.PI*2),g.fill();for(let Ps=0;Ps<ye.moons;Ps++){const ix=(15+Ps*9)*Ae+Ft+3+Ps*2,ox=Ps*2.4+L*(.012-Ps*.004);g.fillStyle=Ps===0?"#B9BCC6":"#8A93A8",g.beginPath(),g.arc(Qe.x+Math.cos(ox)*ix,Qe.y+Math.sin(ox)*ix*.6,(1.8-Ps*.2)*Math.max(1,Y*.4),0,Math.PI*2),g.fill()}const sx=or(`p${Ze}`);sx>0&&ge(n?ye.name:`${ye.name} · OPEN â`,Qe.x+Ft+7,Qe.y+3,sx)}),nx>.6&&(g.strokeStyle=`rgba(232,162,73,${((nx-.6)*.6).toFixed(2)})`,g.lineWidth=1,g.beginPath(),g.moveTo(Me,Mt),g.lineTo(Ye(Math.cos(Up)*420),Ct(Math.sin(Up)*420)),g.stroke())}function ge(L,V,Y,ee){g.font="11px ui-monospace, Menlo, monospace";const Ae=g.measureText(L).width;V=Math.min(Math.max(8,V),Math.max(8,y-Ae-8)),Y=Math.min(Math.max(14,Y),x-8),g.shadowColor="rgba(232,162,73,0.8)",g.shadowBlur=10*ee,g.fillStyle=`rgba(237,234,224,${Math.min(1,ee).toFixed(2)})`,g.fillText(L,V,Y),g.shadowBlur=0}const qe=.28,Ge=12;function tn(){(ne!==1||be!==0||Ke!==0)&&(q*=ne,F+=be,K+=Ke,ne=1,be=0,Ke=0),ae=-1,he=-1}function nn(L,V,Y){const ee=Math.min(Ge,Math.max(qe,q*L)),Ae=ee/q;F=V-y/2-(V-y/2-F)*Ae,K=Y-x/2-(Y-x/2-K)*Ae,q=ee,m&&Or(E)}function Di(L){L.preventDefault(),tn(),nn(Math.exp(-L.deltaY*.0016),L.clientX,L.clientY)}function Vu(L){var V;L.target.closest("button, a")||(R=!0,$=L.clientX,J=L.clientY,(V=v.setPointerCapture)==null||V.call(v,L.pointerId))}function q0(L){var V;if(j=L.clientX,T=L.clientY,!R){const Y=Be(j,T,E);v.style.cursor=Y?"pointer":"grab",js(L.target,Y);const ee=Y?en(Y).replace(" · OPEN â",""):null;ee!==oe&&(oe=ee,(V=h.current)==null||V.call(h,ee)),Y&&(O.set(Y,{until:performance.now()+Vp}),ar(Y));return}tn(),F+=L.clientX-$,K+=L.clientY-J,$=L.clientX,J=L.clientY,v.style.cursor="grabbing",m&&Or(E)}function Y0(L){var V;R=!1,(V=v.releasePointerCapture)==null||V.call(v,L.pointerId),v.style.cursor="grab"}function Z0(L){if(L.touches.length!==2)return;L.preventDefault();const[V,Y]=[L.touches[0],L.touches[1]],ee=Math.hypot(V.clientX-Y.clientX,V.clientY-Y.clientY);tn(),Q&&nn(ee/Q,(V.clientX+Y.clientX)/2,(V.clientY+Y.clientY)/2),Q=ee}function Q0(){Q=0}const rR=["+","=","-","_","0","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"];function X0(L){if(rR.includes(L.key)){if(tn(),L.key==="+"||L.key==="=")nn(1.25,y/2,x/2);else if(L.key==="-"||L.key==="_")nn(.8,y/2,x/2);else if(L.key==="0")q=.9,F=0,K=0,m&&Or(E);else if(L.key==="ArrowLeft")F+=60;else if(L.key==="ArrowRight")F-=60;else if(L.key==="ArrowUp")K+=60;else if(L.key==="ArrowDown")K-=60;else return;L.preventDefault()}}if(C(),A(),addEventListener("resize",C),n?(v.style.cursor="grab",v.addEventListener("wheel",Di,{passive:!1}),v.addEventListener("pointerdown",Vu),addEventListener("pointermove",q0,{passive:!0}),addEventListener("pointerup",Y0),v.addEventListener("touchmove",Z0,{passive:!1}),addEventListener("touchend",Q0),addEventListener("keydown",X0),addEventListener("click",Wn)):(addEventListener("scroll",A,{passive:!0}),w&&(addEventListener("mousemove",Ao,{passive:!0}),document.addEventListener("mouseleave",ns)),addEventListener("click",Wn)),m)Or(1e3);else{const L=V=>{const Y=V||0,ee=U?Math.min(64,Y-U):16;U=Y,N+=ee*Kg()*at,it(ee,N),Or(N),k=requestAnimationFrame(L)};k=requestAnimationFrame(L)}return()=>{cancelAnimationFrame(k),removeEventListener("resize",C),removeEventListener("click",Wn),n?(v.removeEventListener("wheel",Di),v.removeEventListener("pointerdown",Vu),removeEventListener("pointermove",q0),removeEventListener("pointerup",Y0),v.removeEventListener("touchmove",Z0),removeEventListener("touchend",Q0),removeEventListener("keydown",X0)):(removeEventListener("scroll",A),w&&(removeEventListener("mousemove",Ao),document.removeEventListener("mouseleave",ns)))}},[d,n]),c.jsx("canvas",{ref:i,className:"sky","aria-hidden":"true"})}function Gg({className:e=""}){const[t,n]=p.useState(Kg);return p.useEffect(()=>{const r=()=>n(Kg());return addEventListener(vb,r),()=>removeEventListener(vb,r)},[]),c.jsxs("label",{className:`rate ${e}`.trim(),children:[c.jsx("span",{className:"ratelab",children:"ORBITAL RATE"}),c.jsx("input",{type:"range",min:qT,max:YT,step:.05,value:t,onChange:r=>xV(Number(r.target.value)),"aria-label":"Orbital rate","aria-valuetext":t===0?"stopped":`${t.toFixed(2)} times`}),c.jsx("span",{className:"rateval",children:t===0?"STOPPED":`Ã${t.toFixed(2)}`})]})}function VV({probes:e,signals:t,onClose:n}){const[r,s]=p.useState(null),[i,o]=p.useState(null),[a,l]=p.useState(!1),u=p.useRef(null),d=p.useRef(null),h=p.useRef(0),f=p.useRef(null);p.useEffect(()=>{var y;const m=x=>{x.key==="Escape"&&n()};addEventListener("keydown",m),(y=d.current)==null||y.focus();const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{removeEventListener("keydown",m),document.body.style.overflow=w}},[n]),p.useEffect(()=>()=>{var m;return(m=u.current)==null?void 0:m.pause()},[]),p.useEffect(()=>{const m=u.current;if(m)return EV(m,()=>f.current)},[]);const v=p.useCallback(m=>{const w=Zr[m];if(!w)return;l(!1);const y=u.current;if(!y)return;if(i===m&&!y.paused){y.pause(),o(null);return}y.src=w.preview,f.current=w.slug;const x=++h.current;y.play().then(()=>{x===h.current&&o(m)},()=>{x===h.current&&(o(null),l(!0))})},[i]),g=i===null?null:Zr[i];return c.jsxs("div",{className:"explore",ref:d,tabIndex:-1,role:"dialog","aria-label":"Explore the Harshadewa System",children:[c.jsx(JT,{probes:e,signals:t,explore:!0,onFocus:s,onPlanet:v}),c.jsxs("div",{className:"ex-top",children:[c.jsxs("span",{className:"ex-title",children:[c.jsx("span",{className:"full",children:"THE HARSHADEWA SYSTEM"}),c.jsx("span",{className:"short",children:"THE SYSTEM"})]}),c.jsx("span",{className:"ex-hint",children:"DRAG TO PAN · SCROLL OR PINCH TO ZOOM · CLICK A PLANET TO HEAR IT"}),c.jsx(Gg,{className:"ex-rate"}),c.jsxs("button",{type:"button",className:"ex-close",onClick:n,"aria-label":"Close",children:[c.jsx("span",{className:"full",children:"CLOSE "}),"â"]})]}),c.jsx("div",{className:"ex-readout","aria-live":"polite",children:r??"THIRTEEN WORLDS · A THOUSAND SONGS IN THE BELT · 32 PROBES"}),g&&c.jsxs("div",{className:"ex-player",children:[c.jsxs("span",{className:"ex-eq","aria-hidden":"true",children:[c.jsx("i",{}),c.jsx("i",{}),c.jsx("i",{})]}),c.jsxs("span",{className:"ex-now",children:[c.jsx("b",{children:g.title})," · ",g.year," · 30-SECOND PREVIEW"]}),c.jsx("button",{type:"button",onClick:()=>v(i),children:"PAUSE"}),c.jsx("a",{href:g.url,target:"_blank",rel:"noopener noreferrer","data-track":g.slug,children:"FULL TRACK â"})]}),a&&c.jsx("div",{className:"ex-player",children:c.jsx("span",{className:"ex-now",children:"PREVIEW UNAVAILABLE â TRY THE FULL TRACK"})}),c.jsx("audio",{ref:u,onEnded:()=>o(null),preload:"none"})]})}var UV={sha:"8cf4d37",builtAt:"2026-10-07T17:10:21.083Z",branch:"main",dirty:!1,env:"vercel"};const BV=[{id:"beat-1951",mark:"1951",line:"A boy prodigy grows up and lights a sun.",support:"R.A. Chandrasena â on Radio Ceylon at twelve, later mentor to a generation of Sri Lankan legends â founds the Chandrasena Institute of Music in Colombo. Every orbit on this page bends around what he began."},{id:"beat-belt",mark:"THE BELT",line:"A thousand songs still circle it.",support:"W.D. Ariyasinghe, a Grade A voice, recorded more than a thousand of them. The voice fell silent in 2020; the songs never did. They are the innermost ring, and everything that follows moves through their light."},{id:"beat-keeper",mark:"THE KEEPER",line:"A daughter refuses to let it dim.",support:"Darshani Chandrasena â musician, producer â took over the Institute her father founded and kept the sun burning through every year the family made music."},{id:"beat-builder",mark:"GEN 03",turn:!0,line:"A grandson builds planets.",support:"Harshadewa grew up inside that light. In London, with today's instruments, he shapes it into worlds of his own â and sings his father's and his grandfather's back. Thirteen of them so far."}],xd=e=>
168e+" "+".".repeat(Math.max(3,45-e.length))+" ",zV=[{t:150,text:xd("GROUND STATION LONDON · ACQUIRING SIGNAL"),ok:"LOCK"},{t:700,text:xd(`CONTACT · 1 SUN · 1 BELT · ${Zr.length} PLANETS`),ok:"OK"},{t:1250,text:xd(`${Zi.length} PROBES · IN FLIGHT`),ok:"CATALOGUED",cool:!0},{t:1800,text:xd("SOURCE OF SIGNAL"),ok:"UNKNOWN"}];function HV(){const e=es(),t=p.useRef(null),n=p.useRef(null),[r,s]=p.useState(!1),[i,o]=p.useState(!1),[a,l]=p.useState("140 AU"),[u,d]=p.useState([]),[h,f]=p.useState(""),[v,g]=p.useState(""),[m,w]=p.useState(!1),[y,x]=p.useState("ready"),[b,S]=p.useState(!1),_=p.useMemo(()=>[...Zi].filter(N=>!N.topics.includes("personal")).sort((N,U)=>U.updated.localeCompare(N.updated)||U.title.localeCompare(N.title)).slice(0,6).map(N=>({n:Hg(N),title:N.title,href:N.href,target:fs(N),date:N.date})),[]),j=p.useMemo(()=>Lf.map(E=>({...E,n:Zi.filter(N=>N.topics.includes(E.id)).length})).filter(E=>E.n>0).sort((E,N)=>N.n-E.n),[]),T=p.useMemo(()=>Zi.map(E=>({href:E.href,label:`PROBE ${Hg(E)} · ${E.title.split(" â ")[0].toUpperCase()}`,color:fs(E).color})),[]);p.useEffect(()=>{var q;const E=t.current;if(!E)return;E.classList.add("js");const N=matchMedia("(prefers-reduced-motion: reduce)").matches,U=!!e.hash;if(N||U){s(!0),o(!0);return}const O=[];document.querySelectorAll(".universe .acq-line").forEach(F=>{O.push(window.setTimeout(()=>F.classList.add("show"),+F.dataset.t))}),requestAnimationFrame(()=>{var F;return(F=n.current)==null?void 0:F.classList.add("armed")});const z=()=>{var F;O.forEach(clearTimeout),s(!0),(F=n.current)==null||F.classList.add("exit"),window.setTimeout(()=>o(!0),700)};O.push(window.setTimeout(z,2650));const D=()=>z();return addEventListener("keydown",D,{once:!0}),(q=n.current)==null||q.addEventListener("click",z,{once:!0}),()=>{O.forEach(clearTimeout),removeEventListener("keydown",D)}},[]),p.useEffect(()=>{var E;r&&((E=t.current)==null||E.classList.add("booted"))},[r]),p.useEffect(()=>{if(!e.hash)return;const E=document.getElementById(e.hash.slice(1));E==null||E.scrollIntoView({behavior:"auto",block:"start"})},[e.hash]),p.useEffect(()=>{const E=t.current;if(!E)return;let N="";const U=D=>D*D*(3-2*D),O=()=>{const D=document.documentElement.scrollHeight-innerHeight,q=D>0?Math.min(1,Math.max(0,scrollY/D)):0;E.style.setProperty("--prog",q.toFixed(4));const F=`${Math.round(140+U(q)*760)} AU`;F!==N&&(N=F,l(F))},z=new IntersectionObserver(D=>D.forEach(q=>{q.isIntersecting&&q.target.classList.add("on")}),{rootMargin:"0px 0px -25% 0px"});return E.querySelectorAll("section").forEach(D=>z.observe(D)),addEventListener("scroll",O,{passive:!0}),O(),()=>{removeEventListener("scroll",O),z.disconnect()}},[]),p.useEffect(()=>{de.from("transmissions").select("id, callsign").eq("approved",!0).eq("in_sky",!0).limit(40).then(({data:E})=>{E&&d(E.filter(N=>N.callsign).map(N=>({id:N.id,callsign:N.callsign})))}).catch(()=>d([]))},[]);async function k(E){if(E.preventDefault(),!(!v.trim()||y==="sending")){x("sending");try{const{error:N}=await de.from("transmissions").insert({callsign:h.trim()||null,message:v.trim(),in_sky:m});if(N)throw N;x("sent"),g(""),Ga({name:"enquiry_submit",kind:"transmission"})}catch{x("offline")}}}return c.jsxs("div",{className:"universe",ref:t,children:[b?c.jsx(VV,{probes:T,signals:u,onClose:()=>S(!1)}):c.jsx(JT,{probes:T,signals:u}),!i&&c.jsxs("div",{className:"acq",ref:n,role:"button","aria-label":"Signal acquisition â click to skip",children:[c.jsxs("div",{className:"acq-inner",children:[zV.map(E=>c.jsxs("p",{className:"acq-line","data-t":E.t,children:[E.text,c.jsx("span",{className:E.cool?"ok c":"ok",children:E.ok})]},E.t)),c.jsx("div",{className:"acq-bar",children:c.jsx("i",{})})]}),c.jsx("span",{className:"skip",children:"CLICK TO SKIP â"})]}),c.jsxs("header",{className:"topbar",children:[c.jsxs("span",{className:"brand",children:["THE HARSHADEWA SYSTEM · ",c.jsx("span",{className:"si",children:"à·à¶»à·à·à¶¯à·à·"})]}),c.jsxs("nav",{children:[c.jsx("a",{href:"#story",children:"FORMATION"}),c.jsx("a",{href:"#music",children:"PLANETS"}),c.jsxs("a",{href:"#live",children:[c.jsx("span",{className:"full",children:"AADYAAN SESSIONS"}),c.jsx("span",{className:"short",children:"SESSIONS"})]}),c.jsx("a",{href:"#research",children:"PROBES"}),c.jsxs("a",{href:"#connect",children:[c.jsx("span",{className:"full",children:"GROUND STATION"}),c.jsx("span",{className:"short",children:"GROUND"})]})]})]}),c.jsxs("div",{className:"ephem",children:[c.jsx("span",{"aria-hidden":"true",children:"FIELD OF VIEW"}),c.jsx("span",{className:"fov","aria-hidden":"true",children:a}),c.jsx("span",{className:"bar","aria-hidden":"true",children:c.jsx("i",{})}),c.jsxs("span",{"aria-hidden":"true",children:["1 SUN · 1 BELT · ",Zr.length," PLANETS"]}),c.jsx(Gg,{className:"rate-rail"})]}),c.jsxs("main",{children:[c.jsx("section",{className:"hero on",id:"top",children:c.jsxs("div",{className:"inner",children:[c.jsxs("div",{className:"eyebrow s1",children:[c.jsx("b",{className:"w",children:"ONE SUN ·
168LIT 1951"})," · THREE GENERATIONS OF LIGHT ·"," ",c.jsx("b",{className:"c",children:"OBSERVED FROM LONDON"})]}),c.jsx("div",{className:"snh s2",children:"à·à¶»à·à·à¶¯à·à·"}),c.jsxs("h1",{className:"s2",children:["Every song is a planet. ",c.jsx("em",{children:"The sun is a family."})]}),c.jsx("p",{className:"voice s3",children:"You are looking at a signal that took three generations to reach you. Scroll to trace it to its source."}),c.jsxs("div",{className:"hint s3",children:[c.jsx("b",{children:"SCROLL TO TRACE THE SIGNAL"})," · THE PLANETS ALIGN AT THE AADYAAN SESSIONS"]}),c.jsxs("div",{className:"herotools s3",children:[c.jsxs("button",{type:"button",className:"explorebtn",onClick:()=>S(!0),children:[c.jsx("span",{className:"dot","aria-hidden":"true"}),"EXPLORE THE SYSTEM"]}),c.jsx(Gg,{className:"rate-hero"})]})]})}),c.jsxs("div",{className:"wrap",children:[c.jsx("section",{id:"story",children:c.jsxs("div",{className:"panel",children:[c.jsx("div",{className:"ch-label",children:"FORMATION · TRACING THE SIGNAL â 1951"}),c.jsxs("h2",{children:["The light is older ",c.jsx("em",{children:"than the voice."})]}),c.jsx("p",{children:"Harshadewa Ariyasinghe makes music in London. But the signal does not start with him. Trace it back and you reach a radio studio in Colombo, seventy-five years ago."}),c.jsx("div",{className:"beats",children:BV.map(E=>c.jsxs("div",{className:E.turn?"beat turn":"beat",children:[c.jsx("span",{className:"b-mark",children:E.mark}),c.jsx("h3",{children:E.line}),c.jsx("p",{children:E.support})]},E.id))}),c.jsx("p",{className:"handoff",children:"The first one formed in 2012 â"})]})}),c.jsx("section",{id:"music",children:c.jsxs("div",{className:"panel",children:[c.jsx("div",{className:"ch-label",children:"THE PLANETS · DISCOGRAPHY"}),c.jsxs("h2",{children:["Thirteen worlds, ",c.jsx("em",{children:"so far."})]}),c.jsxs("ul",{className:"worldkey",children:[c.jsx("li",{style:{"--pc":gb.own},children:"HIS OWN"}),c.jsx("li",{style:{"--pc":gb.inherited},children:"INHERITED â HIS FATHER'S OR GRANDFATHER'S, SUNG BACK"})]}),WT.map(E=>c.jsxs("div",{className:"row",tabIndex:0,"data-moons":Math.min(2,E.moons.length),style:{"--pc":E.col},children:[c.jsx("span",{className:"planet","aria-hidden":"true"}),c.jsx("span",{className:"yr",children:E.year}),c.jsxs("span",{className:"name",children:[c.jsx("a",{href:E.url,target:"_blank",rel:"noopener","data-track":E.slug,children:E.title}),E.moons.length>0&&c.jsxs("span",{className:"moons",children:[" · ",E.moons.join(", ")]})]}),c.jsx("span",{className:"field",children:E.field})]},E.title))]})}),c.jsx("section",{id:"live",children:c.jsxs("div",{className:"panel",children:[c.jsx("div",{className:"ch-label",children:"AADYAAN SESSIONS · THE ALIGNMENT"}),c.jsxs("h2",{children:["For one night, the planets ",c.jsx("em",{children:"align."})]}),c.jsx("p",{children:"Aadyaan â the first rays. The songs of three generations, performed in one small room by candlelight: the first alignment this system has ever had. Forty observers will see it, and every seat is given by request."}),c.jsxs("div",{className:"strip",children:[c.jsxs("span",{children:["SPRING 2027 · LONDON · ",c.jsx("b",{children:"40 OBSERVERS"})]}),c.jsx("span",{className:"status",children:"ALIGNING"})]}),c.jsx(bn,{className:"reserve",to:"/sessions",children:"REQUEST A SEAT â"})]})}),c.jsx("section",{id:"research",children:c.jsxs("div",{className:"panel",children:[c.jsx("div",{className:"ch-label",children:"THE PROBES · THE OTHER LIFE"}),c.jsxs("h2",{children:["By daylight, ",c.jsx("em",{children:"the observatory."})]}),c.jsx("p",{children:"The keeper of this system has another life â systems analyst by profession, builder by instinct. The observatory launches probes on long eccentric orbits: interactive tools, data studies, plain-English explainers. They transmit back whatever they find."}),c.jsx("div",{className:"targets",children:j.map(E=>c.jsxs(bn,{to:`/research?target=${E.id}`,className:"tchip",children:[c.jsx("span",{className:"dot",style:{background:E.color}}),E.label.toUpperCase(),c.jsx("span",{className:"n",children:E.n})]},E.id))}),c.jsx("div",{className:"tiles",children:_.map(E=>
vendor: 34,029 bytes, line 168
168c.jsxs(bn,{to:E.href,className:"tile",children:[c.jsxs("span",{className:"cid",style:{color:E.target.color},children:["PROBE ",E.n," · ",E.target.label.toUpperCase()]}),c.jsx("h4",{children:E.title}),c.jsxs("span",{className:"stat",children:["LAUNCHED ",E.date," · ",c.jsx("b",{children:"TRANSMITTING"})]})]},E.href))}),c.jsxs(bn,{className:"morebuilds",to:"/research",children:["ALL ",Zi.length," PROBES · MISSION LOG â"]})]})}),c.jsx("section",{id:"connect",children:c.jsxs("div",{className:"panel",children:[c.jsx("div",{className:"ch-label",children:"GROUND STATION · LONDON"}),c.jsxs("h2",{children:["This station ",c.jsx("em",{children:"also receives."})]}),c.jsx("p",{children:"Signals from observers reach the keeper directly. Send one â and if you choose, it stays: a faint star with your name on it, part of this sky for every visitor after you."}),c.jsxs("form",{className:y==="sending"?"console firing":"console",onSubmit:k,children:[c.jsxs("div",{className:"c-head",children:[c.jsx("span",{children:"CHANNEL 01 · DIRECT TO HARSHADEWA"}),c.jsx("span",{className:y==="sent"?"lamp rx":"lamp",children:y==="sent"?"SIGNAL RECEIVED":"RX READY"})]}),c.jsx("label",{htmlFor:"u-callsign",children:"YOUR CALLSIGN · OPTIONAL"}),c.jsx("input",{id:"u-callsign",type:"text",maxLength:40,value:h,onChange:E=>f(E.target.value),placeholder:"how should the sky remember you?"}),c.jsx("label",{htmlFor:"u-message",children:"TRANSMISSION"}),c.jsx("textarea",{id:"u-message",rows:4,maxLength:500,required:!0,value:v,onChange:E=>g(E.target.value),placeholder:"type your message to the stationâ¦"}),c.jsxs("label",{className:"sky-opt",htmlFor:"u-sky",children:[c.jsx("input",{id:"u-sky",type:"checkbox",checked:m,onChange:E=>w(E.target.checked)}),c.jsx("span",{children:"Leave my signal in the sky â once approved, it becomes a faint star in this system that future observers can find."})]}),c.jsx("button",{className:"transmit",type:"submit",disabled:y==="sending",children:y==="sending"?"TRANSMITTINGâ¦":"TRANSMIT â"}),y==="sent"&&c.jsx("span",{className:"c-status ok",children:"RECEIVED · THE STATION WILL RESPOND"}),y==="offline"&&c.jsx("span",{className:"c-status err",children:"CHANNEL OFFLINE · USE THE DIRECT FREQUENCY BELOW"}),c.jsx("span",{className:"beam","aria-hidden":"true"})]}),c.jsxs("div",{className:"connect-grid",children:[c.jsxs("div",{children:[c.jsx("h5",{children:"DIRECT FREQUENCY"}),c.jsx("div",{className:"big",children:c.jsx("a",{href:"mailto:[email protected]",children:"[email protected]"})})]}),c.jsxs("div",{children:[c.jsx("h5",{children:"FOR PRESS"}),c.jsx("div",{className:"big",children:c.jsx(bn,{to:"/press",children:"Press kit â photos, bios, cover art â"})})]}),c.jsxs("div",{children:[c.jsx("h5",{children:"FOLLOW THE SYSTEM"}),c.jsxs("div",{className:"socials",children:[c.jsx("a",{className:"skey",href:"https://www.instagram.com/harshadewa/",target:"_blank",rel:"noopener","aria-label":"Instagram",children:"IG"}),c.jsx("a",{className:"skey",href:"https://x.com/harshadewa",target:"_blank",rel:"noopener","aria-label":"X",children:"X"}),c.jsx("a",{className:"skey",href:"https://www.youtube.com/harshadewa",target:"_blank",rel:"noopener","aria-label":"YouTube",children:"YT"}),c.jsx("a",{className:"skey",href:"https://www.facebook.com/harshadewa",target:"_blank",rel:"noopener","aria-label":"Facebook",children:"FB"})]})]})]})]})})]})]}),c.jsxs("footer",{children:[c.jsx("span",{children:"A UNIVERSE, BEGUN IN 1951 · © 2026 HARSHADEWA ARIYASINGHE"}),c.jsxs("span",{children:["BUILD ",UV.sha," · THE HARSHADEWA SYSTEM"]})]})]})}const WV=()=>{const e=es();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:c.jsxs("div",{className:"text-center",children:[c.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),c.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),c.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},ek=p.createContext({});function KV(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const Yy=p.createContext(null),tk=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function GV(e=!0){const t=p.useContext(Yy);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 Zy=typeof window<"u",qV=Zy?p.useLayoutEffect:p.useEffect,$n=e=>e;let qg=$n;function Qy(e){let t;return()=>(t===void 0&&(t=e()),t)}const qa=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},gs=e=>e*1e3,vs=e=>e/1e3,YV={skipAnimations:!1,useManualTiming:!1};function ZV(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(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,d=!1,h=!1)=>{const v=h&&r?t:n;return d&&i.add(u),v.has(u)||v.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const wd=["read","resolveKeyframes","update","preRender","render","postRender"],QV=40;function nk(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=wd.reduce((y,x)=>(y[x]=ZV(i),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:d,render:h,postRender:f}=o,v=()=>{const y=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(y-s.timestamp,QV),1),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),d.process(s),h.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},g=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:wd.reduce((y,x)=>{const b=o[x];return y[x]=(S,_=!1,j=!1)=>(n||g(),b.schedule(S,_,j)),y},{}),cancel:y=>{for(let x=0;x<wd.length;x++)o[wd[x]].cancel(y)},state:s,steps:o}}const{schedule:rt,cancel:bi,state:Ut,steps:Bp}=nk(typeof requestAnimationFrame<"u"?requestAnimationFrame:$n,!0),rk=p.createContext({strict:!1}),Eb={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"]},Ya={};for(const e in Eb)Ya[e]={isEnabled:t=>Eb[e].some(n=>!!t[n])};function XV(e){for(const t in e)Ya[t]={...Ya[t],...e[t]}}const JV=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 Ih(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||JV.has(e)}let sk=e=>!Ih(e);function e4(e){e&&(sk=t=>t.startsWith("on")?!Ih(t):e(t))}try{e4(require("@emotion/is-prop-valid").default)}catch{}function t4(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(sk(s)||n===!0&&Ih(s)||!t&&!Ih(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function n4(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 Df=p.createContext({});function Gc(e){return typeof e=="string"||Array.isArray(e)}function Mf(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Xy=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Jy=["initial",...Xy];function Ff(e){return Mf(e.animate)||Jy.some(t=>Gc(e[t]))}function ik(e){return!!(Ff(e)||e.variants)}function r4(e,t){if(Ff(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gc(n)?n:void 0,animate:Gc(r)?r:void 0}}return e.inherit!==!1?t:{}}function s4(e){const{initial:t,animate:n}=r4(e,p.useContext(Df));return p.useMemo(()=>({initial:t,animate:n}),[Cb(t),Cb(n)])}function Cb(e){return Array.isArray(e)?e.join(" "):e}const i4=Symbol.for("motionComponentSymbol");function ea(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function o4(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):ea(n)&&(n.current=r))},[t])}const e0=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),a4="framerAppearId",ok="data-"+e0(a4),{schedule:t0,cancel:mW}=nk(queueMicrotask,!1),ak=p.createContext({});function l4(e,t,n,r,s){var i,o;const{visualElement:a}=p.useContext(Df),l=p.useContext(rk),u=p.useContext(Yy),d=p.useContext(tk).reducedMotion,h=p.useRef(null);r=r||l.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=h.current,v=p.useContext(ak);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&c4(h.current,n,s,v);const g=p.useRef(!1);p.useInsertionEffect(()=>{f&&g.current&&f.update(n,u)});const m=n[ok],w=p.useRef(!!m&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return qV(()=>{f&&(g.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),t0.render(f.render),w.current&&f.animationState&&f.animationState.animateChanges())}),p.useEffect(()=>{f&&(!w.current&&f.animationState&&f.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,m)}),w.current=!1))}),f}function c4(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lk(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&ea(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function lk(e){if(e)return e.options.allowProjection!==!1?e.projection:lk(e.parent)}function u4({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&XV(e);function a(u,d){let h;const f={...p.useContext(tk),...u,layoutId:d4(u)},{isStatic:v}=f,g=s4(u),m=r(u,v);if(!v&&Zy){h4();const w=f4(f);h=w.MeasureLayout,g.visualElement=l4(s,m,f,t,w.ProjectionNode)}return c.jsxs(Df.Provider,{value:g,children:[h&&g.visualElement?c.jsx(h,{visualElement:g.visualElement,...f}):null,n(s,u,o4(m,g.visualElement,d),m,v,g.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[i4]=s,l}function d4({layoutId:e}){const t=p.useContext(ek).id;return t&&e!==void 0?t+"-"+e:e}function h4(e,t){p.useContext(rk).strict}function f4(e){const{drag:t,layout:n}=Ya;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 p4=["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 n0(e){return typeof e!="string"||e.includes("-")?!1:!!(p4.indexOf(e)>-1||/[A-Z]/u.test(e))}function Tb(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function r0(e,t,n,r){if(typeof t=="function"){const[s,i]=Tb(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]=Tb(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const Yg=e=>Array.isArray(e),m4=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),g4=e=>Yg(e)?e[e.length-1]||0:e,Qt=e=>!!(e&&e.getVelocity);function Yd(e){const t=Qt(e)?e.get():e;return m4(t)?t.toValue():t}function v4({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:y4(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const ck=e=>(t,n)=>{const r=p.useContext(Df),s=p.useContext(Yy),i=()=>v4(e,t,r,s);return n?i():KV(i)};function y4(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=Yd(i[f]);let{initial:o,animate:a}=e;const l=Ff(e),u=ik(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?a:o;if(h&&typeof h!="boolean"&&!Mf(h)){const f=Array.isArray(h)?h:[h];for(let v=0;v<f.length;v++){const g=r0(e,f[v]);if(g){const{transitionEnd:m,transition:w,...y}=g;for(const x in y){let b=y[x];if(Array.isArray(b)){const S=d?b.length-1:0;b=b[S]}b!==null&&(s[x]=b)}for(const x in m)s[x]=m[x]}}}return s}const hl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Po=new Set(hl),uk=e=>t=>typeof t=="string"&&t.startsWith(e),s0=uk("--"),x4=uk("var(--"),i0=e=>x4(e)?w4.test(e.split("/*")[0].trim()):!1,w4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dk=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Es=(e,t,n)=>n>t?t:n<e?e:n,fl={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qc={...fl,transform:e=>Es(0,1,e)},bd={...fl,default:1},Ru=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ms=Ru("deg"),Kr=Ru("%"),fe=Ru("px"),b4=Ru("vh"),S4=Ru("vw"),kb={...Kr,parse:e=>Kr.parse(e)/100,transform:e=>Kr.transform(e*100)},_4={borderWidth:fe,borderTopWidth:fe,borderRightWidth:fe,borderBottomWidth:fe,borderLeftWidth:fe,borderRadius:fe,radius:fe,borderTopLeftRadius:fe,borderTopRightRadius:fe,borderBottomRightRadius:fe,borderBottomLeftRadius:fe,width:fe,maxWidth:fe,height:fe,maxHeight:fe,top:fe,right:fe,bottom:fe,left:fe,padding:fe,paddingTop:fe,paddingRight:fe,paddingBottom:fe,paddingLeft:fe,margin:fe,marginTop:fe,marginRight:fe,marginBottom:fe,marginLeft:fe,backgroundPositionX:fe,backgroundPositionY:fe},E4={rotate:Ms,rotateX:Ms,rotateY:Ms,rotateZ:Ms,scale:bd,scaleX:bd,scaleY:bd,scaleZ:bd,skew:Ms,skewX:Ms,skewY:Ms,distance:fe,translateX:fe,translateY:fe,translateZ:fe,x:fe,y:fe,z:fe,perspective:fe,transformPerspective:fe,opacity:qc,originX:kb,originY:kb,originZ:fe},jb={...fl,transform:Math.round},o0={..._4,...E4,zIndex:jb,size:fe,fillOpacity:qc,strokeOpacity:qc,numOctaves:jb},C4={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},T4=hl.length;function k4(e,t,n){let r="",s=!0;for(let i=0;i<T4;i++){const o=hl[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 u=dk(a,o0[o]);if(!l){s=!1;const d=C4[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function a0(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Po.has(l)){o=!0;continue}else if(s0(l)){s[l]=u;continue}else{const d=dk(u,o0[l]);l.startsWith("origin")?(a=!0,i[l]=d):r[l]=d}}if(t.transform||(o||n?r.transform=k4(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${l} ${u} ${d}`}}const j4={offset:"stroke-dashoffset",array:"stroke-dasharray"},P4={offset:"strokeDashoffset",array:"strokeDasharray"};function A4(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?j4:P4;e[i.offset]=fe.transform(-r);const o=fe.transform(t),a=fe.transform(n);e[i.array]=`${o} ${a}`}function Pb(e,t,n){return typeof e=="string"?e:fe.transform(t+n*e)}function R4(e,t,n){const r=Pb(t,e.x,e.width),s=Pb(n,e.y,e.height);return`${r} ${s}`}function l0(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},d,h){if(a0(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:v,dimensions:g}=e;f.transform&&(g&&(v.transform=f.transform),delete f.transform),g&&(s!==void 0||i!==void 0||v.transform)&&(v.transformOrigin=R4(g,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&A4(f,o,a,l,!1)}const c0=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),hk=()=>({...c0(),attrs:{}}),u0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function fk(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 pk=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 mk(e,t,n,r){fk(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(pk.has(s)?s:e0(s),t.attrs[s])}const Yc={};function N4(e){for(const t in e)Yc[t]=e[t],s0(t)&&(Yc[t].isCSSVariable=!0)}function gk(e,{layout:t,layoutId:n}){return Po.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Yc[e]||e==="opacity")}function d0(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(Qt(s[o])||t.style&&Qt(t.style[o])||gk(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 vk(e,t,n){const r=d0(e,t,n);for(const s in e)if(Qt(e[s])||Qt(t[s])){const i=hl.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function O4(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 Ab=["x","y","width","height","cx","cy","r"],I4={useVisualState:ck({scrapeMotionValuesFromProps:vk,createRenderState:hk,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(Po.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a<Ab.length;a++){const l=Ab[a];e[l]!==t[l]&&(o=!0)}o&&rt.read(()=>{O4(n,r),rt.render(()=>{l0(r,s,u0(n.tagName),e.transformTemplate),mk(n,r)})})}})},L4={useVisualState:ck({scrapeMotionValuesFromProps:d0,createRenderState:c0})};function yk(e,t,n){for(const r in t)!Qt(t[r])&&!gk(r,n)&&(e[r]=t[r])}function D4({transformTemplate:e},t){return p.useMemo(()=>{const n=c0();return a0(n,t,e),Object.assign({},n.vars,n.style)},[t])}function M4(e,t){const n=e.style||{},r={};return yk(r,n,e),Object.assign(r,D4(e,t)),r}function F4(e,t){const n={},r=M4(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 $4(e,t,n,r){const s=p.useMemo(()=>{const i=hk();return l0(i,t,u0(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};yk(i,e.style,e),s.style={...i,...s.style}}return s}function V4(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(n0(n)?$4:F4)(r,i,o,n),u=t4(r,typeof n=="string",e),d=n!==p.Fragment?{...u,...l,ref:s}:{},{children:h}=r,f=p.useMemo(()=>Qt(h)?h.get():h,[h]);return p.createElement(n,{...d,children:f})}}function U4(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...n0(r)?I4:L4,preloadedFeatures:e,useRender:V4(s),createVisualElement:t,Component:r};return u4(o)}}function xk(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 $f(e,t,n){const r=e.getProps();return r0(r,t,n!==void 0?n:r.custom,e)}const B4=Qy(()=>window.ScrollTimeline!==void 0);class z4{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(B4()&&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 H4 extends z4{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function h0(e,t){return e?e[t]||e.default||e:void 0}const Zg=2e4;function wk(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Zg;)t+=n,r=e.next(t);return t>=Zg?1/0:t}function f0(e){return typeof e=="function"}function Rb(e,t){e.timeline=t,e.onfinish=null}const p0=e=>Array.isArray(e)&&typeof e[0]=="number",W4={linearEasing:void 0};function K4(e,t){const n=Qy(e);return()=>{var r;return(r=W4[t])!==null&&r!==void 0?r:n()}}const Lh=K4(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),bk=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(qa(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Sk(e){return!!(typeof e=="function"&&Lh()||!e||typeof e=="string"&&(e in Qg||Lh())||p0(e)||Array.isArray(e)&&e.every(Sk))}const Yl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qg={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 _k(e,t){if(e)return typeof e=="function"&&Lh()?bk(e,t):p0(e)?Yl(e):Array.isArray(e)?e.map(n=>_k(n,t)||Qg.easeOut):Qg[e]}const dr={x:!1,y:!1};function Ek(){return dr.x||dr.y}function G4(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 Ck(e,t){const n=G4(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Nb(e){return!(e.pointerType==="touch"||Ek())}function q4(e,t,n={}){const[r,s,i]=Ck(e,n),o=a=>{if(!Nb(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const d=h=>{Nb(h)&&(u(h),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,s)};return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const Tk=(e,t)=>t?e===t?!0:Tk(e,t.parentElement):!1,m0=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Y4=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Z4(e){return Y4.has(e.tagName)||e.tabIndex!==-1}const Zl=new WeakSet;function Ob(e){return t=>{t.key==="Enter"&&e(t)}}function zp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Q4=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Ob(()=>{if(Zl.has(n))return;zp(n,"down");const s=Ob(()=>{zp(n,"up")}),i=()=>zp(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 Ib(e){return m0(e)&&!Ek()}function X4(e,t,n={}){const[r,s,i]=Ck(e,n),o=a=>{const l=a.currentTarget;if(!Ib(a)||Zl.has(l))return;Zl.add(l);const u=t(l,a),d=(v,g)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Ib(v)||!Zl.has(l))&&(Zl.delete(l),typeof u=="function"&&u(v,{success:g}))},h=v=>{d(v,n.useGlobalTarget||Tk(l,v.target))},f=v=>{d(v,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{!Z4(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",u=>Q4(u,s),s)}),i}function J4(e){return e==="x"||e==="y"?dr[e]?null:(dr[e]=!0,()=>{dr[e]=!1}):dr.x||dr.y?null:(dr.x=dr.y=!0,()=>{dr.x=dr.y=!1})}const kk=new Set(["width","height","top","left","right","bottom",...hl]);let Zd;function e3(){Zd=void 0}const Gr={now:()=>(Zd===void 0&&Gr.set(Ut.isProcessing||YV.useManualTiming?Ut.timestamp:performance.now()),Zd),set:e=>{Zd=e,queueMicrotask(e3)}};function g0(e,t){e.indexOf(t)===-1&&e.push(t)}function v0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class y0{constructor(){this.subscriptions=[]}add(t){return g0(this.subscriptions,t),()=>v0(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 jk(e,t){return t?e*(1e3/t):0}const Lb=30,t3=e=>!isNaN(parseFloat(e));class n3{constructor(t,n={}){this.version="12.0.6",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=Gr.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=Gr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=t3(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 y0);const r=this.events[t].add(n);return t==="change"?()=>{r(),rt.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=Gr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lb);return jk(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 Zc(e,t){return new n3(e,t)}function r3(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zc(n))}function s3(e,t){const n=$f(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=g4(i[o]);r3(e,o,a)}}function i3(e){return!!(Qt(e)&&e.add)}function Xg(e,t){const n=e.getValue("willChange");if(i3(n))return n.add(t)}function Pk(e){return e.props[ok]}const Ak=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o3=1e-7,a3=12;function l3(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Ak(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>o3&&++a<a3);return o}function Nu(e,t,n,r){if(e===t&&n===r)return $n;const s=i=>l3(i,0,1,e,n);return i=>i===0||i===1?i:Ak(s(i),t,r)}const Rk=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Nk=e=>t=>1-e(1-t),Ok=Nu(.33,1.53,.69,.99),x0=Nk(Ok),Ik=Rk(x0),Lk=e=>(e*=2)<1?.5*x0(e):.5*(2-Math.pow(2,-10*(e-1))),w0=e=>1-Math.sin(Math.acos(e)),Dk=Nk(w0),Mk=Rk(w0),Fk=e=>/^0[^.\s]+$/u.test(e);function c3(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Fk(e):!0}const vc=e=>Math.round(e*1e5)/1e5,b0=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function u3(e){return e==null}const d3=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,S0=(e,t)=>n=>!!(typeof n=="string"&&d3.test(n)&&n.startsWith(e)||t&&!u3(n)&&Object.prototype.hasOwnProperty.call(n,t)),$k=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(b0);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},h3=e=>Es(0,255,e),Hp={...fl,transform:e=>Math.round(h3(e))},Qi={test:S0("rgb","red"),parse:$k("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Hp.transform(e)+", "+Hp.transform(t)+", "+Hp.transform(n)+", "+vc(qc.transform(r))+")"};function f3(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 Jg={test:S0("#"),parse:f3,transform:Qi.transform},ta={test:S0("hsl","hue"),parse:$k("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kr.transform(vc(t))+", "+Kr.transform(vc(n))+", "+vc(qc.transform(r))+")"},Yt={test:e=>Qi.test(e)||Jg.test(e)||ta.test(e),parse:e=>Qi.test(e)?Qi.parse(e):ta.test(e)?ta.parse(e):Jg.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Qi.transform(e):ta.transform(e)},p3=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function m3(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(b0))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(p3))===null||n===void 0?void 0:n.length)||0)>0}const Vk="number",Uk="color",g3="var",v3="var(",Db="${}",y3=/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 Qc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(y3,l=>(Yt.test(l)?(r.color.push(i),s.push(Uk),n.push(Yt.parse(l))):l.startsWith(v3)?(r.var.push(i),s.push(g3),n.push(l)):(r.number.push(i),s.push(Vk),n.push(parseFloat(l))),++i,Db)).split(Db);return{values:n,split:a,indexes:r,types:s}}function Bk(e){return Qc(e).values}function zk(e){const{split:t,types:n}=Qc(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===Vk?i+=vc(s[o]):a===Uk?i+=Yt.transform(s[o]):i+=s[o]}return i}}const x3=e=>typeof e=="number"?0:e;function w3(e){const t=Bk(e);return zk(e)(t.map(x3))}const Si={test:m3,parse:Bk,createTransformer:zk,getAnimatableNone:w3},b3=new Set(["brightness","contrast","saturate","opacity"]);function S3(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(b0)||[];if(!r)return e;const s=n.replace(r,"");let i=b3.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const _3=/\b([a-z-]*)\(.*?\)/gu,ev={...Si,getAnimatableNone:e=>{const t=e.match(_3);return t?t.map(S3).join(" "):e}},E3={...o0,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:ev,WebkitFilter:ev},_0=e=>E3[e];function Hk(e,t){let n=_0(e);return n!==ev&&(n=Si),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const C3=new Set(["auto","none","0"]);function T3(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!C3.has(i)&&Qc(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Hk(n,s)}const Mb=e=>e===fl||e===fe,Fb=(e,t)=>parseFloat(e.split(", ")[t]),$b=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Fb(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Fb(i[1],e):0}},k3=new Set(["x","y","z"]),j3=hl.filter(e=>!k3.has(e));function P3(e){const t=[];return j3.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Za={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:$b(4,13),y:$b(5,14)};Za.translateX=Za.x;Za.translateY=Za.y;const co=new Set;let tv=!1,nv=!1;function Wk(){if(nv){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=P3(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)})}
vendor: 14,386 bytes, line 168
168nv=!1,tv=!1,co.forEach(e=>e.complete()),co.clear()}function Kk(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nv=!0)})}function A3(){Kk(),Wk()}class E0{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?(co.add(this),tv||(tv=!0,rt.read(Kk),rt.resolveKeyframes(Wk))):(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),co.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,co.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Gk=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),R3=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function N3(e){const t=R3.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function qk(e,t,n=1){const[r,s]=N3(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Gk(o)?parseFloat(o):o}return i0(s)?qk(s,t,n+1):s}const Yk=e=>t=>t.test(e),O3={test:e=>e==="auto",parse:e=>e},Zk=[fl,fe,Kr,Ms,S4,b4,O3],Vb=e=>Zk.find(Yk(e));class Qk extends E0{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 u=t[l];if(typeof u=="string"&&(u=u.trim(),i0(u))){const d=qk(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!kk.has(r)||t.length!==2)return;const[s,i]=t,o=Vb(s),a=Vb(i);if(o!==a)if(Mb(o)&&Mb(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)c3(t[s])&&r.push(s);r.length&&T3(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=Za[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]=Za[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,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ub=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Si.test(e)||e==="0")&&!e.startsWith("url("));function I3(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 L3(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=Ub(s,t),a=Ub(i,t);return!o||!a?!1:I3(e)||(n==="spring"||f0(n))&&r}const D3=e=>e!==null;function Vf(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(D3),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const M3=40;class Xk{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=Gr.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>M3?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&A3(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Gr.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!L3(t,r,s,i))if(o)this.options.duration=0;else{l&&l(Vf(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},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 ft=(e,t,n)=>e+(t-e)*n;function Wp(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 F3({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=Wp(l,a,e+1/3),i=Wp(l,a,e),o=Wp(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Dh(e,t){return n=>n>0?t:e}const Kp=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},$3=[Jg,Qi,ta],V3=e=>$3.find(t=>t.test(e));function Bb(e){const t=V3(e);if(!t)return!1;let n=t.parse(e);return t===ta&&(n=F3(n)),n}const zb=(e,t)=>{const n=Bb(e),r=Bb(t);if(!n||!r)return Dh(e,t);const s={...n};return i=>(s.red=Kp(n.red,r.red,i),s.green=Kp(n.green,r.green,i),s.blue=Kp(n.blue,r.blue,i),s.alpha=ft(n.alpha,r.alpha,i),Qi.transform(s))},U3=(e,t)=>n=>t(e(n)),Ou=(...e)=>e.reduce(U3),rv=new Set(["none","hidden"]);function B3(e,t){return rv.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function z3(e,t){return n=>ft(e,t,n)}function C0(e){return typeof e=="number"?z3:typeof e=="string"?i0(e)?Dh:Yt.test(e)?zb:K3:Array.isArray(e)?Jk:typeof e=="object"?Yt.test(e)?zb:H3:Dh}function Jk(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>C0(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function H3(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=C0(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function W3(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 K3=(e,t)=>{const n=Si.createTransformer(t),r=Qc(e),s=Qc(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?rv.has(e)&&!s.values.length||rv.has(t)&&!r.values.length?B3(e,t):Ou(Jk(W3(r,s),s.values),n):Dh(e,t)};function ej(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ft(e,t,n):C0(e)(e,t)}const G3=5;function tj(e,t,n){const r=Math.max(t-G3,0);return jk(n-e(r),t-r)}const vt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Gp=.001;function q3({duration:e=vt.duration,bounce:t=vt.bounce,velocity:n=vt.velocity,mass:r=vt.mass}){let s,i,o=1-t;o=Es(vt.minDamping,vt.maxDamping,o),e=Es(vt.minDuration,vt.maxDuration,vs(e)),o<1?(s=u=>{const d=u*o,h=d*e,f=d-n,v=sv(u,o),g=Math.exp(-h);return Gp-f/v*g},i=u=>{const h=u*o*e,f=h*n+n,v=Math.pow(o,2)*Math.pow(u,2)*e,g=Math.exp(-h),m=sv(Math.pow(u,2),o);return(-s(u)+Gp>0?-1:1)*((f-v)*g)/m}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Gp+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const a=5/e,l=Z3(s,i,a);if(e=gs(e),isNaN(l))return{stiffness:vt.stiffness,damping:vt.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Y3=12;function Z3(e,t,n){let r=n;for(let s=1;s<Y3;s++)r=r-e(r)/t(r);return r}function sv(e,t){return e*Math.sqrt(1-t*t)}const Q3=["duration","bounce"],X3=["stiffness","damping","mass"];function Hb(e,t){return t.some(n=>e[n]!==void 0)}function J3(e){let t={velocity:vt.velocity,stiffness:vt.stiffness,damping:vt.damping,mass:vt.mass,isResolvedFromDuration:!1,...e};if(!Hb(e,X3)&&Hb(e,Q3))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Es(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:vt.mass,stiffness:s,damping:i}}else{const n=q3(e);t={...t,...n,mass:vt.mass},t.isResolvedFromDuration=!0}return t}function nj(e=vt.visualDuration,t=vt.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:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:v}=J3({...n,velocity:-vs(n.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*d)),w=o-i,y=vs(Math.sqrt(l/d)),x=Math.abs(w)<5;r||(r=x?vt.restSpeed.granular:vt.restSpeed.default),s||(s=x?vt.restDelta.granular:vt.restDelta.default);let b;if(m<1){const _=sv(y,m);b=j=>{const T=Math.exp(-m*y*j);return o-T*((g+m*y*w)/_*Math.sin(_*j)+w*Math.cos(_*j))}}else if(m===1)b=_=>o-Math.exp(-y*_)*(w+(g+y*w)*_);else{const _=y*Math.sqrt(m*m-1);b=j=>{const T=Math.exp(-m*y*j),k=Math.min(_*j,300);return o-T*((g+m*y*w)*Math.sinh(k)+_*w*Math.cosh(k))/_}}const S={calculatedDuration:v&&h||null,next:_=>{const j=b(_);if(v)a.done=_>=h;else{let T=0;m<1&&(T=_===0?gs(g):tj(b,_,j));const k=Math.abs(T)<=r,E=Math.abs(o-j)<=s;a.done=k&&E}return a.value=a.done?o:j,a},toString:()=>{const _=Math.min(wk(S),Zg),j=bk(T=>S.next(_*T).value,_,30);return _+"ms "+j}};return S}function Wb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},v=k=>a!==void 0&&k<a||l!==void 0&&k>l,g=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let m=n*t;const w=h+m,y=o===void 0?w:o(w);y!==w&&(m=y-h);const x=k=>-m*Math.exp(-k/r),b=k=>y+x(k),S=k=>{const E=x(k),N=b(k);f.done=Math.abs(E)<=u,f.value=f.done?y:N};let _,j;const T=k=>{v(f.value)&&(_=k,j=nj({keyframes:[f.value,g(f.value)],velocity:tj(b,k,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return T(0),{calculatedDuration:null,next:k=>{let E=!1;return!j&&_===void 0&&(E=!0,S(k),T(k)),_!==void 0&&k>=_?j.next(k-_):(!E&&S(k),f)}}}const eU=Nu(.42,0,1,1),tU=Nu(0,0,.58,1),rj=Nu(.42,0,.58,1),nU=e=>Array.isArray(e)&&typeof e[0]!="number",Kb={linear:$n,easeIn:eU,easeInOut:rj,easeOut:tU,circIn:w0,circInOut:Mk,circOut:Dk,backIn:x0,backInOut:Ik,backOut:Ok,anticipate:Lk},Gb=e=>{if(p0(e)){qg(e.length===4);const[t,n,r,s]=e;return Nu(t,n,r,s)}else if(typeof e=="string")return qg(Kb[e]!==void 0),Kb[e];return e};function rU(e,t,n){const r=[],s=n||ej,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]||$n:t;a=Ou(l,a)}r.push(a)}return r}function sU(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(qg(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=rU(t,r,s),l=a.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(l>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=qa(e[h],e[h+1],d);return a[h](f)};return n?d=>u(Es(e[0],e[i-1],d)):u}function iU(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=qa(0,t,r);e.push(ft(n,1,s))}}function oU(e){const t=[0];return iU(t,e.length-1),t}function aU(e,t){return e.map(n=>n*t)}function lU(e,t){return e.map(()=>t||rj).splice(0,e.length-1)}function Mh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=nU(r)?r.map(Gb):Gb(r),i={done:!1,value:t[0]},o=aU(n&&n.length===t.length?n:oU(t),e),a=sU(o,t,{ease:Array.isArray(s)?s:lU(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const cU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>bi(t),now:()=>Ut.isProcessing?Ut.timestamp:Gr.now()}},uU={decay:Wb,inertia:Wb,tween:Mh,keyframes:Mh,spring:nj},dU=e=>e/100;class T0 extends Xk{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=()=>{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)||E0,a=(l,u)=>this.onKeyframesResolved(l,u);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=f0(n)?n:uU[n]||Mh;let l,u;a!==Mh&&typeof t[0]!="number"&&(l=Ou(dU,ej(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=wk(d));const{calculatedDuration:h}=d,f=h+s,v=f*(r+1)-s;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:v}}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:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:h}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:v,repeatType:g,repeatDelay:m,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/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 y=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,S=i;
vendor: 35,223 bytes, line 168
168if(v){const k=Math.min(this.currentTime,d)/h;let E=Math.floor(k),N=k%1;!N&&k>=1&&(N=1),N===1&&E--,E=Math.min(E,v+1),!!(E%2)&&(g==="reverse"?(N=1-N,m&&(N-=m/h)):g==="mirror"&&(S=o)),b=Es(0,1,N)*h}const _=x?{done:!1,value:l[0]}:S.next(b);a&&(_.value=a(_.value));let{done:j}=_;!x&&u!==null&&(j=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return T&&s!==void 0&&(_.value=Vf(l,this.options,s)),w&&w(_.value),T&&this.finish(),_}get duration(){const{resolved:t}=this;return t?vs(t.calculatedDuration):0}get time(){return vs(this.currentTime)}set time(t){t=gs(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=vs(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=cU,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 hU=new Set(["opacity","clipPath","filter","transform"]);function fU(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=_k(a,s);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const pU=Qy(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fh=10,mU=2e4;function gU(e){return f0(e.type)||e.type==="spring"||!Sk(e.ease)}function vU(e,t){const n=new T0({...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<mU;)r=n.sample(i),s.push(r.value),i+=Fh;return{times:void 0,keyframes:s,duration:i-Fh,ease:"linear"}}const sj={anticipate:Lk,backInOut:Ik,circInOut:Mk};function yU(e){return e in sj}class qb extends Xk{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new Qk(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:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Lh()&&yU(i)&&(i=sj[i]),gU(this.options)){const{onComplete:h,onUpdate:f,motionValue:v,element:g,...m}=this.options,w=vU(t,m);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,s=w.times,i=w.ease,o="keyframes"}const d=fU(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Rb(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;a.set(Vf(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,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 vs(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return vs(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=gs(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 $n;const{animation:r}=n;Rb(r,t)}return $n}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:u,onUpdate:d,onComplete:h,element:f,...v}=this.options,g=new T0({...v,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),m=gs(this.time);u.setWithVelocity(g.sample(m-Fh).value,g.sample(m).value,Fh)}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:u}=n.owner.getProps();return pU()&&r&&hU.has(r)&&!l&&!u&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const xU={type:"spring",stiffness:500,damping:25,restSpeed:10},wU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bU={type:"keyframes",duration:.8},SU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},_U=(e,{keyframes:t})=>t.length>2?bU:Po.has(e)?e.startsWith("scale")?wU(t[1]):xU:SU;function EU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const k0=(e,t,n,r={},s,i)=>o=>{const a=h0(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-gs(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};EU(a)||(d={...d,..._U(e,d)}),d.duration&&(d.duration=gs(d.duration)),d.repeatDelay&&(d.repeatDelay=gs(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const f=Vf(d.keyframes,a);if(f!==void 0)return rt.update(()=>{d.onUpdate(f),d.onComplete()}),new H4([])}return!i&&qb.supports(d)?new qb(d):new T0(d)};function CU({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ij(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const h in l){const f=e.getValue(h,(i=e.latestValues[h])!==null&&i!==void 0?i:null),v=l[h];if(v===void 0||d&&CU(d,h))continue;const g={delay:n,...h0(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const y=Pk(e);if(y){const x=window.MotionHandoffAnimation(y,h,rt);x!==null&&(g.startTime=x,m=!0)}}Xg(e,h),f.start(k0(h,f,v,e.shouldReduceMotion&&kk.has(h)?{type:!1}:g,e,m));const w=f.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{rt.update(()=>{a&&s3(e,a)})}),u}function iv(e,t,n={}){var r;const s=$f(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(ij(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=i;return TU(e,t,d+u,h,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,d]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>d())}else return Promise.all([o(),a(n.delay)])}function TU(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(kU).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(iv(u,t,{...i,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function kU(e,t){return e.sortNodePosition(t)}function jU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>iv(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=iv(e,t,n);else{const s=typeof t=="function"?$f(e,t,n.custom):t;r=Promise.all(ij(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const PU=Jy.length;function oj(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?oj(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PU;n++){const r=Jy[n],s=e.props[r];(Gc(s)||s===!1)&&(t[r]=s)}return t}const AU=[...Xy].reverse(),RU=Xy.length;function NU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>jU(e,n,r)))}function OU(e){let t=NU(e),n=Yb(),r=!0;const s=l=>(u,d)=>{var h;const f=$f(e,d,l==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:v,transitionEnd:g,...m}=f;u={...u,...m,...g}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,d=oj(e.parent)||{},h=[],f=new Set;let v={},g=1/0;for(let w=0;w<RU;w++){const y=AU[w],x=n[y],b=u[y]!==void 0?u[y]:d[y],S=Gc(b),_=y===l?x.isActive:null;_===!1&&(g=w);let j=b===d[y]&&b!==u[y]&&S;if(j&&r&&e.manuallyAnimateOnMount&&(j=!1),x.protectedKeys={...v},!x.isActive&&_===null||!b&&!x.prevProp||Mf(b)||typeof b=="boolean")continue;const T=IU(x.prevProp,b);let k=T||y===l&&x.isActive&&!j&&S||w>g&&S,E=!1;const N=Array.isArray(b)?b:[b];let U=N.reduce(s(y),{});_===!1&&(U={});const{prevResolvedValues:O={}}=x,z={...O,...U},D=K=>{k=!0,f.has(K)&&(E=!0,f.delete(K)),x.needsAnimating[K]=!0;const R=e.getValue(K);R&&(R.liveStyle=!1)};for(const K in z){const R=U[K],$=O[K];if(v.hasOwnProperty(K))continue;let J=!1;Yg(R)&&Yg($)?J=!xk(R,$):J=R!==$,J?R!=null?D(K):f.add(K):R!==void 0&&f.has(K)?D(K):x.protectedKeys[K]=!0}x.prevProp=b,x.prevResolvedValues=U,x.isActive&&(v={...v,...U}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(j&&T)||E)&&h.push(...N.map(K=>({animation:K,options:{type:y}})))}if(f.size){const w={};f.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),w[y]=x??null}),h.push({animation:w})}let m=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(h):Promise.resolve()}function a(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var v;return(v=f.animationState)===null||v===void 0?void 0:v.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Yb(),r=!0}}}function IU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!xk(t,e):!1}function Vi(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Yb(){return{animate:Vi(!0),whileInView:Vi(),whileHover:Vi(),whileTap:Vi(),whileDrag:Vi(),whileFocus:Vi(),exit:Vi()}}class Ni{constructor(t){this.isMounted=!1,this.node=t}update(){}}class LU extends Ni{constructor(t){super(t),t.animationState||(t.animationState=OU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Mf(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 DU=0;class MU extends Ni{constructor(){super(...arguments),this.id=DU++}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 FU={animation:{Feature:LU},exit:{Feature:MU}};function Xc(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Iu(e){return{point:{x:e.pageX,y:e.pageY}}}const $U=e=>t=>m0(t)&&e(t,Iu(t));function yc(e,t,n,r){return Xc(e,t,$U(n),r)}const Zb=(e,t)=>Math.abs(e-t);function VU(e,t){const n=Zb(e.x,t.x),r=Zb(e.y,t.y);return Math.sqrt(n**2+r**2)}class aj{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 h=Yp(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,v=VU(h.offset,{x:0,y:0})>=3;if(!f&&!v)return;const{point:g}=h,{timestamp:m}=Ut;this.history.push({...g,timestamp:m});const{onStart:w,onMove:y}=this.handlers;f||(w&&w(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=qp(f,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:v,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Yp(h.type==="pointercancel"?this.lastMoveEventInfo:qp(f,this.transformPagePoint),this.history);this.startEvent&&v&&v(h,w),g&&g(h,w)},!m0(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Iu(t),a=qp(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ut;this.history=[{...l,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Yp(a,this.history)),this.removeListeners=Ou(yc(this.contextWindow,"pointermove",this.handlePointerMove),yc(this.contextWindow,"pointerup",this.handlePointerUp),yc(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),bi(this.updatePoint)}}function qp(e,t){return t?{point:t(e.point)}:e}function Qb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yp({point:e},t){return{point:e,delta:Qb(e,lj(t)),offset:Qb(e,UU(t)),velocity:BU(t,.1)}}function UU(e){return e[0]}function lj(e){return e[e.length-1]}function BU(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=lj(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>gs(t)));)n--;if(!r)return{x:0,y:0};const i=vs(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 cj=1e-4,zU=1-cj,HU=1+cj,uj=.01,WU=0-uj,KU=0+uj;function cn(e){return e.max-e.min}function GU(e,t,n){return Math.abs(e-t)<=n}function Xb(e,t,n,r=.5){e.origin=r,e.originPoint=ft(t.min,t.max,e.origin),e.scale=cn(n)/cn(t),e.translate=ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zU&&e.scale<=HU||isNaN(e.scale))&&(e.scale=1),(e.translate>=WU&&e.translate<=KU||isNaN(e.translate))&&(e.translate=0)}function xc(e,t,n,r){Xb(e.x,t.x,n.x,r?r.originX:void 0),Xb(e.y,t.y,n.y,r?r.originY:void 0)}function Jb(e,t,n){e.min=n.min+t.min,e.max=e.min+cn(t)}function qU(e,t,n){Jb(e.x,t.x,n.x),Jb(e.y,t.y,n.y)}function eS(e,t,n){e.min=t.min-n.min,e.max=e.min+cn(t)}function wc(e,t,n){eS(e.x,t.x,n.x),eS(e.y,t.y,n.y)}function YU(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ft(n,e,r.max):Math.min(e,n)),e}function tS(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 ZU(e,{top:t,left:n,bottom:r,right:s}){return{x:tS(e.x,n,s),y:tS(e.y,t,r)}}function nS(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 QU(e,t){return{x:nS(e.x,t.x),y:nS(e.y,t.y)}}function XU(e,t){let n=.5;const r=cn(e),s=cn(t);return s>r?n=qa(t.min,t.max-r,e.min):r>s&&(n=qa(e.min,e.max-s,t.min)),Es(0,1,n)}function JU(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 ov=.35;function eB(e=ov){return e===!1?e=0:e===!0&&(e=ov),{x:rS(e,"left","right"),y:rS(e,"top","bottom")}}function rS(e,t,n){return{min:sS(e,t),max:sS(e,n)}}function sS(e,t){return typeof e=="number"?e:e[t]||0}const iS=()=>({translate:0,scale:1,origin:0,originPoint:0}),na=()=>({x:iS(),y:iS()}),oS=()=>({min:0,max:0}),wt=()=>({x:oS(),y:oS()});function qn(e){return[e("x"),e("y")]}function dj({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tB({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nB(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 Zp(e){return e===void 0||e===1}function av({scale:e,scaleX:t,scaleY:n}){return!Zp(e)||!Zp(t)||!Zp(n)}function Hi(e){return av(e)||hj(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hj(e){return aS(e.x)||aS(e.y)}function aS(e){return e&&e!=="0%"}function $h(e,t,n){const r=e-n,s=t*r;return n+s}function lS(e,t,n,r,s){return s!==void 0&&(e=$h(e,s,r)),$h(e,n,r)+t}function lv(e,t=0,n=1,r,s){e.min=lS(e.min,t,n,r,s),e.max=lS(e.max,t,n,r,s)}function fj(e,{x:t,y:n}){lv(e.x,t.translate,t.scale,t.originPoint),lv(e.y,n.translate,n.scale,n.originPoint)}const cS=.999999999999,uS=1.0000000000001;function rB(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&&sa(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,fj(e,o)),r&&Hi(i.latestValues)&&sa(e,i.latestValues))}t.x<uS&&t.x>cS&&(t.x=1),t.y<uS&&t.y>cS&&(t.y=1)}function ra(e,t){e.min=e.min+t,e.max=e.max+t}function dS(e,t,n,r,s=.5){const i=ft(e.min,e.max,s);lv(e,t,n,i,r)}function sa(e,t){dS(e.x,t.x,t.scaleX,t.scale,t.originX),dS(e.y,t.y,t.scaleY,t.scale,t.originY)}function pj(e,t){return dj(nB(e.getBoundingClientRect(),t))}function sB(e,t,n){const r=pj(e,n),{scroll:s}=t;return s&&(ra(r.x,s.offset.x),ra(r.y,s.offset.y)),r}const mj=({current:e})=>e?e.ownerDocument.defaultView:null,iB=new WeakMap;class oB{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=wt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Iu(d).point)},i=(d,h)=>{const{drag:f,dragPropagation:v,onDragStart:g}=this.getProps();if(f&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=J4(f),!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),qn(w=>{let y=this.getAxisMotionValue(w).get()||0;if(Kr.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[w];b&&(y=cn(b)*(parseFloat(y)/100))}}this.originPoint[w]=y}),g&&rt.postRender(()=>g(d,h)),Xg(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,h)=>{const{dragPropagation:f,dragDirectionLock:v,onDirectionLock:g,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=h;if(v&&this.currentDirection===null){this.currentDirection=aB(w),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),m&&m(d,h)},a=(d,h)=>this.stop(d,h),l=()=>qn(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new aj(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:mj(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&&rt.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||!Sd(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=YU(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&&ea(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=ZU(s.layoutBox,n):this.constraints=!1,this.elastic=eB(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&qn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=JU(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ea(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=sB(r,s.root,this.visualElement.getTransformPagePoint());let o=QU(s.layout.layoutBox,i);if(n){const a=n(tB(o));this.hasMutatedConstraints=!!a,a&&(o=dj(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=qn(d=>{if(!Sd(d,n,this.currentDirection))return;let h=l&&l[d]||{};o&&(h={min:0,max:0});const f=s?200:1e6,v=s?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Xg(this.visualElement,t),r.start(k0(t,r,0,n,this.visualElement,!1))}stopAnimation(){qn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){qn(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){qn(n=>{const{drag:r}=this.getProps();if(!Sd(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]-ft(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ea(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};qn(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=XU({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(),qn(o=>{if(!Sd(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(ft(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;iB.set(this.visualElement,this);const t=this.visualElement.current,n=yc(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ea(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()),rt.read(r);const o=Xc(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(qn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=l[d].translate,h.set(h.get()+l[d].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=ov,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Sd(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aB(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lB extends Ni{constructor(t){super(t),this.removeGroupControls=$n,this.removeListeners=$n,this.controls=new oB(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$n}unmount(){this.removeGroupControls(),this.removeListeners()}}const hS=e=>(t,n)=>{e&&rt.postRender(()=>e(t,n))};class cB extends Ni{constructor(){super(...arguments),this.removePointerDownListener=$n}onPointerDown(t){this.session=new aj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mj(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:hS(t),onStart:hS(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&rt.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=yc(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 Qd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fS(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Fl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(fe.test(e))e=parseFloat(e);else return e;const n=fS(e,t.target.x),r=fS(e,t.target.y);return`${n}% ${r}%`}},uB={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Si.parse(e);if(s.length>5)return r;const i=Si.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 u=ft(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class dB extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;N4(hB),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()})),Qd.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()||rt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),t0.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 gj(e){const[t,n]=GV(),r=p.useContext(ek);return c.jsx(dB,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(ak),isPresent:t,safeToRemove:n})}const hB={borderRadius:{...Fl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Fl,borderTopRightRadius:Fl,borderBottomLeftRadius:Fl,borderBottomRightRadius:Fl,boxShadow:uB};function fB(e,t,n){const r=Qt(e)?e:Zc(e);return r.start(k0("",r,t,n)),r.animation}function pB(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mB=(e,t)=>e.depth-t.depth;class gB{constructor(){this.children=[],this.isDirty=!1}add(t){g0(this.children,t),this.isDirty=!0}remove(t){v0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mB),this.isDirty=!1,this.children.forEach(t)}}function vB(e,t){const n=Gr.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(bi(r),e(i-t))};return rt.read(r,!0),()=>bi(r)}const vj=["TopLeft","TopRight","BottomLeft","BottomRight"],yB=vj.length,pS=e=>typeof e=="string"?parseFloat(e):e,mS=e=>typeof e=="number"||fe.test(e);function xB(e,t,n,r,s,i){s?(e.opacity=ft(0,n.opacity!==void 0?n.opacity:1,wB(r)),e.opacityExit=ft(t.opacity!==void 0?t.opacity:1,0,bB(r))):i&&(e.opacity=ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<yB;o++){const a=`border${vj[o]}Radius`;let l=gS(t,a),u=gS(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||mS(l)===mS(u)?(e[a]=Math.max(ft(pS(l),pS(u),r),0),(Kr.test(u)||Kr.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=ft(t.rotate||0,n.rotate||0,r))}function gS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const wB=yj(0,.5,Dk),bB=yj(.5,.95,$n);function yj(e,t,n){return r=>r<e?0:r>t?1:n(qa(e,t,r))}function vS(e,t){e.min=t.min,e.max=t.max}function Kn(e,t){vS(e.x,t.x),vS(e.y,t.y)}function yS(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function xS(e,t,n,r,s){return e-=t,e=$h(e,1/n,r),s!==void 0&&(e=$h(e,1/s,r)),e}function SB(e,t=0,n=1,r=.5,s,i=e,o=e){if(Kr.test(t)&&(t=parseFloat(t),t=ft(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=ft(i.min,i.max,r);e===i&&(a-=t),e.min=xS(e.min,t,n,a,s),e.max=xS(e.max,t,n,a,s)}function wS(e,t,[n,r,s],i,o){SB(e,t[n],t[r],t[s],t.scale,i,o)}const _B=["x","scaleX","originX"],EB=["y","scaleY","originY"];function bS(e,t,n,r){wS(e.x,t,_B,n?n.x:void 0,r?r.x:void 0),wS(e.y,t,EB,n?n.y:void 0,r?r.y:void 0)}function SS(e){return e.translate===0&&e.scale===1}function xj(e){return SS(e.x)&&SS(e.y)}function _S(e,t){return e.min===t.min&&e.max===t.max}function CB(e,t){return _S(e.x,t.x)&&_S(e.y,t.y)}function ES(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function wj(e,t){return ES(e.x,t.x)&&ES(e.y,t.y)}function CS(e){return cn(e.x)/cn(e.y)}function TS(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TB{constructor(){this.members=[]}add(t){g0(this.members,t),t.scheduleRender()}remove(t){if(v0(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 kB(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:v,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),v&&(r+=`skewX(${v}deg) `),g&&(r+=`skewY(${g}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 Wi={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ql=typeof window<"u"&&window.MotionDebug!==void 0,Qp=["","X","Y","Z"],jB={visibility:"hidden"},kS=1e3;let PB=0;function Xp(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function bj(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Pk(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",rt,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&bj(r)}function Sj({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=PB++,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,Ql&&(Wi.totalNodes=Wi.resolvedTargetDeltas=Wi.recalculatedProjection=0),this.nodes.forEac
vendor: 4,061 bytes, line 168
168h(NB),this.nodes.forEach(MB),this.nodes.forEach(FB),this.nodes.forEach(OB),Ql&&window.MotionDebug.record(Wi)},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 gB)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new y0),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=pB(o),this.instance=o;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let h;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=vB(f,250),Qd.hasAnimatedSinceResize&&(Qd.hasAnimatedSinceResize=!1,this.nodes.forEach(PS))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeLayoutChanged:v,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||zB,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=d.getProps(),x=!this.targetLayout||!wj(this.targetLayout,g),b=!f&&v;if(this.options.layoutRoot||this.resumeFrom||b||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,b);const S={...h0(m,"layout"),onPlay:w,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||PS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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,bi(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($B),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&&bj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jS);return}this.isUpdating||this.nodes.forEach(LB),this.isUpdating=!1,this.nodes.forEach(DB),this.nodes.forEach(AB),this.nodes.forEach(RB),this.clearAllSnapshots();const a=Gr.now();Ut.delta=Es(0,1e3/60,a-Ut.timestamp),Ut.timestamp=a,Ut.isProcessing=!0,Bp.update.process(Ut),Bp.preRender.process(Ut),Bp.render.process(Ut),Ut.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,t0.read(this.scheduleUpdate))}
vendor: 15,854 bytes, line 168
168clearAllSnapshots(){this.nodes.forEach(IB),this.sharedNodes.forEach(VB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!cn(this.snapshot.measuredBox.x)&&!cn(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=wt(),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&&!xj(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(a||Hi(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),HB(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return wt();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(WB))){const{scroll:d}=this.root;d&&(ra(l.x,d.offset.x),ra(l.y,d.offset.y))}return l}removeElementScroll(o){var a;const l=wt();if(Kn(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&Kn(l,o),ra(l.x,h.offset.x),ra(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=wt();Kn(l,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&sa(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Hi(d.latestValues)&&sa(l,d.latestValues)}return Hi(this.latestValues)&&sa(l,this.latestValues),l}removeTransform(o){const a=wt();Kn(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Hi(u.latestValues))continue;av(u.latestValues)&&u.updateSnapshot();const d=wt(),h=u.measurePageBox();Kn(d,h),bS(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Hi(this.latestValues)&&bS(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!==Ut.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 u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=Ut.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),wc(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),Kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=wt(),this.targetWithTransforms=wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),qU(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Kn(this.target,this.layout.layoutBox),fj(this.target,this.targetDelta)):Kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=wt(),this.relativeTargetOrigin=wt(),wc(this.relativeTargetOrigin,this.target,v.target),Kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ql&&Wi.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||av(this.parent.latestValues)||hj(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 u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ut.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;Kn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,v=this.treeScale.y;rB(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=wt());const{target:g}=a;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(yS(this.prevProjectionDelta.x,this.projectionDelta.x),yS(this.prevProjectionDelta.y,this.projectionDelta.y)),xc(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==v||!TS(this.projectionDelta.x,this.prevProjectionDelta.x)||!TS(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Ql&&Wi.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=na(),this.projectionDelta=na(),this.projectionDeltaWithTransform=na()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},h=na();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=wt(),v=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=v!==g,w=this.getStack(),y=!w||w.members.length<=1,x=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(BB));this.animationProgress=0;let b;this.mixTargetDelta=S=>{const _=S/1e3;AS(h.x,o.x,_),AS(h.y,o.y,_),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wc(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),UB(this.relativeTarget,this.relativeTargetOrigin,f,_),b&&CB(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=wt()),Kn(b,this.relativeTarget)),m&&(this.animationValues=d,xB(d,u,this.latestValues,_,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},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&&(bi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Qd.hasAnimatedSinceResize=!0,this.currentAnimation=fB(0,kS,{...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(kS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:d}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&_j(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||wt();const h=cn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=cn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}Kn(a,l),sa(a,d),xc(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new TB),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var 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 u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Xp("z",o,u,this.animationValues);for(let d=0;d<Qp.length;d++)Xp(`rotate${Qp[d]}`,o,u,this.animationValues),Xp(`skew${Qp[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return jB;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Yd(o==null?void 0:o.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Yd(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Hi(this.latestValues)&&(m.transform=d?d({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=kB(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:v,y:g}=this.projectionDelta;u.transformOrigin=`${v.origin*100}% ${g.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Yc){if(f[m]===void 0)continue;const{correct:w,applyTo:y,isCSSVariable:x}=Yc[m],b=u.transform==="none"?f[m]:w(f[m],h);if(y){const S=y.length;for(let _=0;_<S;_++)u[y[_]]=b}else x?this.options.visualElement.renderState.vars[m]=b:u[m]=b}return this.options.layoutId&&(u.pointerEvents=h===this?Yd(o==null?void 0:o.pointerEvents)||"":"none"),u}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(jS),this.root.sharedNodes.clear()}}}function AB(e){e.updateLayout()}function RB(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"?qn(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],v=cn(f);f.min=r[h].min,f.max=f.min+v}):_j(i,n.layoutBox,r)&&qn(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],v=cn(r[h]);f.max=f.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+v)});const a=na();xc(a,r,n.layoutBox);const l=na();o?xc(l,e.applyTransform(s,!0),n.measuredBox):xc(l,r,n.layoutBox);const u=!xj(a);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:v}=h;if(f&&v){const g=wt();wc(g,n.layoutBox,f.layoutBox);const m=wt();wc(m,r,v.layoutBox),wj(g,m)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function NB(e){Ql&&Wi.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 OB(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function IB(e){e.clearSnapshot()}function jS(e){e.clearMeasurements()}function LB(e){e.isLayoutDirty=!1}function DB(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function PS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function MB(e){e.resolveTargetDelta()}function FB(e){e.calcProjection()}
vendor: 7,255 bytes, line 168
168function $B(e){e.resetSkewAndRotation()}function VB(e){e.removeLeadSnapshot()}function AS(e,t,n){e.translate=ft(t.translate,0,n),e.scale=ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function RS(e,t,n,r){e.min=ft(t.min,n.min,r),e.max=ft(t.max,n.max,r)}function UB(e,t,n,r){RS(e.x,t.x,n.x,r),RS(e.y,t.y,n.y,r)}function BB(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const zB={duration:.45,ease:[.4,0,.1,1]},NS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),OS=NS("applewebkit/")&&!NS("chrome/")?Math.round:$n;function IS(e){e.min=OS(e.min),e.max=OS(e.max)}function HB(e){IS(e.x),IS(e.y)}function _j(e,t,n){return e==="position"||e==="preserve-aspect"&&!GU(CS(t),CS(n),.2)}function WB(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const KB=Sj({attachResizeListener:(e,t)=>Xc(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jp={current:void 0},Ej=Sj({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jp.current){const e=new KB({});e.mount(window),e.setOptions({layoutScroll:!0}),Jp.current=e}return Jp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),GB={pan:{Feature:cB},drag:{Feature:lB,ProjectionNode:Ej,MeasureLayout:gj}};function LS(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&&rt.postRender(()=>i(t,Iu(t)))}class qB extends Ni{mount(){const{current:t}=this.node;t&&(this.unmount=q4(t,(n,r)=>(LS(this.node,r,"Start"),s=>LS(this.node,s,"End"))))}unmount(){}}class YB 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=Ou(Xc(this.node.current,"focus",()=>this.onFocus()),Xc(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function DS(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&&rt.postRender(()=>i(t,Iu(t)))}class ZB extends Ni{mount(){const{current:t}=this.node;t&&(this.unmount=X4(t,(n,r)=>(DS(this.node,r,"Start"),(s,{success:i})=>DS(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const cv=new WeakMap,em=new WeakMap,QB=e=>{const t=cv.get(e.target);t&&t(e)},XB=e=>{e.forEach(QB)};function JB({root:e,...t}){const n=e||document;em.has(n)||em.set(n,{});const r=em.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(XB,{root:e,...t})),r[s]}function e5(e,t,n){const r=JB(t);return cv.set(e,n),r.observe(e),()=>{cv.delete(e),r.unobserve(e)}}const t5={some:0,all:1};class n5 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:t5[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(l)};return e5(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(r5(t,n))&&this.startObserver()}unmount(){}}function r5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const s5={inView:{Feature:n5},tap:{Feature:ZB},focus:{Feature:YB},hover:{Feature:qB}},i5={layout:{ProjectionNode:Ej,MeasureLayout:gj}},uv={current:null},Cj={current:!1};function o5(){if(Cj.current=!0,!!Zy)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>uv.current=e.matches;e.addListener(t),t()}else uv.current=!1}const a5=[...Zk,Yt,Si],l5=e=>a5.find(Yk(e)),MS=new WeakMap;function c5(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Qt(s))e.addValue(r,s);else if(Qt(i))e.addValue(r,Zc(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,Zc(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const FS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class u5{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=E0,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 v=Gr.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,rt.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=o;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,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=Ff(n),this.isVariantNode=ik(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in f){const g=f[v];l[v]!==void 0&&Qt(g)&&g.set(l[v],!1)}}mount(t){this.current=t,MS.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Cj.current||o5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:uv.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){MS.delete(this.current),this.projection&&this.projection.unmount(),bi(this.notifyUpdate),bi(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];
vendor: 5,527 bytes, line 168
168n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Po.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&rt.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 Ya){const n=Ya[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):wt()}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<FS.length;r++){const s=FS[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=c5(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=Zc(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"&&(Gk(s)||Fk(s))?s=parseFloat(s):!l5(s)&&Si.test(n)&&(s=Hk(t,n)),this.setBaseTarget(t,Qt(s)?s.get():s)),Qt(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=r0(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&&!Qt(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 y0),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Tj extends u5{constructor(){super(...arguments),this.KeyframeResolver=Qk}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;Qt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function d5(e){return window.getComputedStyle(e)}class h5 extends Tj{constructor(){super(...arguments),this.type="html",this.renderInstance=fk}readValueFromInstance(t,n){if(Po.has(n)){const r=_0(n);return r&&r.default||0}else{const r=d5(t),s=(s0(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return pj(t,n)}build(t,n,r){a0(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return d0(t,n,r)}}class f5 extends Tj{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=wt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Po.has(n)){const r=_0(n);return r&&r.default||0}return n=pk.has(n)?n:e0(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return vk(t,n,r)}build(t,n,r){l0(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){mk(t,n,r,s)}mount(t){this.isSVGTag=u0(t.tagName),super.mount(t)}}const p5=(e,t)=>n0(e)?new f5(t):new h5(t,{allowProjection:e!==p.Fragment}),m5=U4({...FU,...s5,...GB,...i5},p5),dv=n4(m5),ga=p.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:we("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
168ga.displayName="Card";const va=p.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:we("flex flex-col space-y-1.5 p-6",e),...t}));va.displayName="CardHeader";const ya=p.forwardRef(({className:e,...t},n)=>c.jsx("h3",{ref:n,className:we("text-2xl font-semibold leading-none tracking-tight",e),...t}));ya.displayName="CardTitle";const xa=p.forwardRef(({className:e,...t},n)=>c.jsx("p",{ref:n,className:we("text-sm text-muted-foreground",e),...t}));xa.displayName="CardDescription";const wa=p.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:we("p-6 pt-0",e),...t}));wa.displayName="CardContent";const g5=p.forwardRef(({className:e,...t},n)=>c.jsx("div",{ref:n,className:we("flex items-center p-6 pt-0",e),...t}));g5.displayName="CardFooter";const v5=()=>{const e=[{name:"Limited Edition Vinyl",price:29.99,image:"/placeholder.svg",description:"Exclusive vinyl release with custom artwork"}];return c.jsx("div",{className:"min-h-screen bg-gradient-to-br from-[#1a1a1a] to-[#2a2a2a] text-white py-24",children:c.jsxs(dv.div,{initial:{opacity:0}
168,animate:{opacity:1},transition:{duration:.5},className:"container mx-auto px-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-12",children:[c.jsx(DO,{className:"w-8 h-8 text-primary"}),c.jsx("h1",{className:"text-4xl font-serif",children:"Store"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map((t,n)=>c.jsx(dv.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:n*.1},children:c.jsxs(ga,{className:"bg-accent-dark border-none text-white",children:[c.jsxs(va,{children:[c.jsx("img",{src:t.image,alt:t.name,className:"w-full aspect-square object-cover rounded-md mb-4"}),c.jsx(ya,{children:t.name}),c.jsxs(xa,{className:"text-gray-400",children:["$",t.price]})]}),c.jsxs(wa,{children:[c.jsx("p",{className:"mb-4 text-sm text-gray-300",children:t.description}),c.jsx(Ve,{className:"w-full",children:"Add to Cart"})]})]})},n))})]})})},It=p.forwardRef(({className:e,type:t,...n},r)=>c.jsx("input",{type:t,className:we("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}));It.displayName="Input";const y5=()=>{const{toast:e}=Pr(),[t,n]=p.useState(""),[r,s]=p.useState(""),[i,o]=p.useState(!1);p.useEffect(()=>{const l=document.createElement("script");return l.src="https://www.google.com/recaptcha/api.js?onload=onRecaptchaLoad&render=explicit",l.async=!0,l.defer=!0,window.onRecaptchaLoad=()=>{window.grecaptcha.render("recaptcha-container",{sitekey:"6Lfs2McqAAAAANqmesFX9V7LHZc2xjG8TNXNAbSF"})},document.head.appendChild(l),()=>{document.head.removeChild(l),delete window.onRecaptchaLoad}},[]);const a=async l=>{l.preventDefault(),o(!0);try{const u=window.grecaptcha.getResponse();if(!u){e({variant:"destructive",title:"Verification required",description:"Please complete the reCAPTCHA verification."});return}const{data:d,error:h}=await de.functions.invoke("subscribe-newsletter",{body:{name:t,email:r,recaptchaToken:u}});if(h)throw h;Ga({name:"enquiry_submit",kind:"newsletter"}),e({title:"Successfully subscribed!",description:"Thank you for joining our newsletter."}),n(""),s(""),window.grecaptcha.reset()}catch(u){e({variant:"destructive",title:"Error",description:u.message||"Failed to subscribe. Please try again."})}finally{o(!1)}};return c.jsx("div",{className:"min-h-screen bg-gradient-to-br from-[#1a1a1a] to-[#2a2a2a] text-white py-24",children:c.jsxs(dv.div,{initial:{opacity:0}
168,animate:{opacity:1},transition:{duration:.5},className:"container mx-auto px-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-12",children:[c.jsx(IO,{className:"w-8 h-8 text-primary"}),c.jsx("h1",{className:"text-4xl font-serif",children:"Newsletter"})]}),c.jsxs(ga,{className:"bg-accent-dark border-none text-white max-w-xl mx-auto",children:[c.jsxs(va,{children:[c.jsx(ya,{children:"Join the Community"}),c.jsx(xa,{className:"text-gray-400",children:"Subscribe to get exclusive updates, behind-the-scenes content, and early access to new releases."})]}),c.jsx(wa,{children:c.jsxs("form",{onSubmit:a,className:"space-y-4",children:[c.jsx(It,{placeholder:"Your Name",value:t,onChange:l=>n(l.target.value),className:"bg-background/10",required:!0}),c.jsx(It,{placeholder:"Email",type:"email",value:r,onChange:l=>s(l.target.value),className:"bg-background/10",required:!0}),c.jsx("div",{id:"recaptcha-container",className:"mb-4"}),c.jsx(Ve,{type:"submit",className:"w-full",disabled:i,children:i?"Subscribing...":"Subscribe"})]})})]})]})})},x5=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(""),[s,i]=p.useState(""),[o,a]=p.useState(""),[l,u]=p.useState(!1),[d,h]=p.useState(!1),f=Ri(),{toast:v}=Pr(),g=async m=>{m.preventDefault(),t(!0);try{if(d){const{error:w}=await de.auth.resetPasswordForEmail(n,{redirectTo:`${window.location.origin}/auth?reset=true`});if(w)throw w;v({title:"Check your email",description:"We've sent you a password reset link."}),h(!1)}else if(l){const{error:w}=await de.auth.signUp({email:n,password:s,options:{data:{username:o}}});if(w)throw w;v({title:"Success!",description:"Please check your email to verify your account."})}else{const{error:w}=await de.auth.signInWithPassword({email:n,password:s});if(w)throw w;f("/")}}catch(w){v({variant:"destructive",title:"Error",description:w.message})}finally{t(!1)}};return c.jsx("div",{className:"min-h-screen flex items-center justify-center bg-accent-dark/30",children:c.jsxs("div",{className:"bg-background p-8 rounded-lg shadow-lg w-full max-w-md animate-fade-in",children:[c.jsx("h2",{className:"text-2xl font-bold mb-6 text-center",children:d?"Reset Password":l?"Create Fan Account":"Fan Login"}),c.jsxs("form",{onSubmit:g,className:"space-y-4",children:[l&&!d&&c.jsxs("div",{children:[c.jsx("label",{htmlFor:"username",className:"block text-sm font-medium mb-1",children:"Username"}),c.jsx(It,{id:"username",type:"text",value:o,onChange:m=>a(m.target.value),required:l,disabled:e})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"email",className:"block text-sm font-medium mb-1",children:"Email"}),c.jsx(It,{id:"email",type:"email",value:n,onChange:m=>r(m.target.value),required:!0,disabled:e})]}),!d&&c.jsxs("div",{children:[c.jsx("label",{htmlFor:"password",className:"block text-sm font-medium mb-1",children:"Password"}),c.jsx(It,{id:"password",type:"password",value:s,onChange:m=>i(m.target.value),required:!0,disabled:e})]}),c.jsx(Ve,{type:"submit",className:"w-full",disabled:e,children:e?"Loading...":d?"Send Reset Link":l?"Sign Up":"Sign In"})]}),c.jsxs("div",{className:"mt-4 text-center text-sm space-y-2",children:[!d&&c.jsxs("p",{children:[l?"Already have an account?":"Don't have an account?"," ",c.jsx("button",{onClick:()=>u(!l),className:"text-primary hover:underline",disabled:e,children:l?"Sign In":"Sign Up"})]}),c.jsx("p",{children:d?c.jsx("button",{onClick:()=>h(!1),className:"text-primary hover:underline",disabled:e,children:"Back to Sign In"}):c.jsx("button",{onClick:()=>{h(!0),u(!1)},className:"text-primary hover:underline",disabled:e,children:"Forgot Password?"})})]})]})})},w5=()=>{const e=Ri();return p.useEffect(()=>{(async()=>{const{data:{session:n}}=await de.auth.getSession();n||e("/auth")})()},[e]),c.jsxs("div",{className:"container mx-auto px-4 py-8",children:[c.jsx("h1",{className:"text-4xl font-bold text-center mb-8 text-primary animate-fade-in",children:"Fan Special Access"}),c.jsxs("div",{className:"grid md:grid-cols-3 gap-6 animate-slide-up",children:[c.jsxs(ga,{className:"bg-accent-dark text-white",children:[c.jsxs(va,{children:[c.jsx(MO,{className:"h-8 w-8 mb-2 text-primary"}),c.jsx(ya,{children:"Exclusive Content"}
vendor: 4,872 bytes, line 168
168),c.jsx(xa,{className:"text-gray-300",children:"Access to behind-the-scenes footage and unreleased tracks"})]}),c.jsx(wa,{children:c.jsx("p",{children:"New content added weekly for our dedicated fans."})})]}),c.jsxs(ga,{className:"bg-accent-dark text-white",children:[c.jsxs(va,{children:[c.jsx(NO,{className:"h-8 w-8 mb-2 text-primary"}),c.jsx(ya,{children:"Fan Rewards"}),c.jsx(xa,{className:"text-gray-300",children:"Special merchandise and digital downloads"})]}),c.jsx(wa,{children:c.jsx("p",{children:"Collect points and redeem exclusive rewards."})})]}),c.jsxs(ga,{className:"bg-accent-dark text-white",children:[c.jsxs(va,{children:[c.jsx(FO,{className:"h-8 w-8 mb-2 text-primary"}),c.jsx(ya,{children:"Early Access"}),c.jsx(xa,{className:"text-gray-300",children:"Priority ticket booking for upcoming shows"})]}),c.jsx(wa,{children:c.jsx("p",{children:"Get notified first about new events and presales."})})]})]})]})};function b5(e,t=[]){let n=[];function r(i,o){const a=p.createContext(o),l=n.length;n=[...n,o];function u(h){const{scope:f,children:v,...g}=h,m=(f==null?void 0:f[e][l])||a,w=p.useMemo(()=>g,Object.values(g));return c.jsx(m.Provider,{value:w,children:v})}function d(h,f){const v=(f==null?void 0:f[e][l])||a,g=p.useContext(v);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,d]}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,S5(s,...t)]}function S5(...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:u})=>{const h=l(i)[`__scope${u}`];return{...a,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var _5=p.createContext(void 0);function Uf(e){const t=p.useContext(_5);return e||t||"ltr"}var tm="rovingFocusGroup.onEntryFocus",E5={bubbles:!1,cancelable:!0},Bf="RovingFocusGroup",[hv,kj,C5]=xy(Bf),[T5,jj]=b5(Bf,[C5]),[k5,j5]=T5(Bf),Pj=p.forwardRef((e,t)=>c.jsx(hv.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hv.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(P5,{...e,ref:t})})}));Pj.displayName=Bf;var P5=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=p.useRef(null),v=$e(t,f),g=Uf(i),[m=null,w]=za({prop:o,defaultProp:a,onChange:l}),[y,x]=p.useState(!1),b=St(u),S=kj(n),_=p.useRef(!1),[j,T]=p.useState(0);return p.useEffect(()=>{const k=f.current;if(k)return k.addEventListener(tm,b),()=>k.removeEventListener(tm,b)},[b]),c.jsx(k5,{scope:n,orientation:r,dir:g,loop:s,currentTabStopId:m,onItemFocus:p.useCallback(k=>w(k),[w]),onItemShiftTab:p.useCallback(()=>x(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(k=>k+1),[]),onFocusableItemRemove:p.useCallback(()=>T(k=>k-1),[]),children:c.jsx(Se.div,{tabIndex:y||j===0?-1:0,"data-orientation":r,...h,ref:v,style:{outline:"none",...e.style},onMouseDown:ce(e.onMouseDown,()=>{_.current=!0}),onFocus:ce(e.onFocus,k=>{const E=!_.current;if(k.target===k.currentTarget&&E&&!y){const N=new CustomEvent(tm,E5);if(k.currentTarget.dispatchEvent(N),!N.defaultPrevented){const U=S().filter(F=>F.focusable),O=U.find(F=>F.active),z=U.find(F=>F.id===m),q=[O,z,...U].filter(Boolean).map(F=>F.ref.current);Nj(q,d)}}_.current=!1}),onBlur:ce(e.onBlur,()=>x(!1))})})}),Aj="RovingFocusGroupItem",Rj=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...o}=e,a=hi(),l=i||a,u=j5(Aj,n),d=u.currentTabStopId===l,h=kj(n),{onFocusableItemAdd:f,onFocusableItemRemove:v}=u;return p.useEffect(()=>{if(r)return f(),()=>v()},[r,f,v]),c.jsx(hv.ItemSlot,{scope:n,id:l,focusable:r,active:s,children:c.jsx(Se.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:ce(e.onMouseDown,g=>{r?u.onItemFocus(l):g.preventDefault()}),onFocus:ce(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ce(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const m=N5(g,u.orientation,u.dir);if(m!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let y=h().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")y.reverse();else if(m==="prev"||m==="next"){m==="prev"&&y.reverse();const x=y.indexOf(g.currentTarget);y=u.loop?O5(y,x+1):y.slice(x+1)}setTimeout(()=>Nj(y))}})})})});Rj.displayName=Aj;var A5={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R5(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}
vendor: 5,020 bytes, line 168
168function N5(e,t,n){const r=R5(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return A5[r]}function Nj(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function O5(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var I5=Pj,L5=Rj,j0="Tabs",[D5,vW]=sl(j0,[jj]),Oj=jj(),[M5,P0]=D5(j0),Ij=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...u}=e,d=Uf(a),[h,f]=za({prop:r,onChange:s,defaultProp:i});return c.jsx(M5,{scope:n,baseId:hi(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:l,children:c.jsx(Se.div,{dir:d,"data-orientation":o,...u,ref:t})})});Ij.displayName=j0;var Lj="TabsList",Dj=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...s}=e,i=P0(Lj,n),o=Oj(n);return c.jsx(I5,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:c.jsx(Se.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:t})})});Dj.displayName=Lj;var Mj="TabsTrigger",Fj=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=e,o=P0(Mj,n),a=Oj(n),l=Uj(o.baseId,r),u=Bj(o.baseId,r),d=r===o.value;return c.jsx(L5,{asChild:!0,...a,focusable:!s,active:d,children:c.jsx(Se.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:t,onMouseDown:ce(e.onMouseDown,h=>{!s&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:ce(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:ce(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!s&&h&&o.onValueChange(r)})})})});Fj.displayName=Mj;var $j="TabsContent",Vj=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...o}=e,a=P0($j,n),l=Uj(a.baseId,r),u=Bj(a.baseId,r),d=r===a.value,h=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),c.jsx(Ar,{present:s||d,children:({present:f})=>c.jsx(Se.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&i})})});Vj.displayName=$j;function Uj(e,t){return`${e}-trigger-${t}`}function Bj(e,t){return`${e}-content-${t}`}var F5=Ij,zj=Dj,Hj=Fj,Wj=Vj;const $5=F5,Kj=p.forwardRef(({className:e,...t},n)=>c.jsx(zj,{ref:n,className:we("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Kj.displayName=zj.displayName;const $o=p.forwardRef(({className:e,...t},n)=>c.jsx(Hj,{ref:n,className:we("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}));$o.displayName=Hj.displayName;const Vo=p.forwardRef(({className:e,...t},n)=>c.jsx(Wj,{ref:n,className:we("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Vo.displayName=Wj.displayName;const pl=p.forwardRef(({className:e,...t},n)=>c.jsx("div",{className:"relative w-full overflow-auto",children:c.jsx("table",{ref:n,className:we("w-full caption-bottom text-sm",e),...t})}));pl.displayName="Table";const ml=p.forwardRef(({className:e,...t},n)=>c.jsx("thead",{ref:n,className:we("[&_tr]:border-b",e),...t}));ml.displayName="TableHeader";const gl=p.forwardRef(({className:e,...t},n)=>c.jsx("tbody",{ref:n,className:we("[&_tr:last-child]:border-0",e),...t}));gl.displayName="TableBody";const V5=p.forwardRef(({className:e,...t},n)=>c.jsx("tfoot",{ref:n,className:we("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));V5.displayName="TableFooter";const kr=p.forwardRef(({className:e,...t},n)=>c.jsx("tr",{ref:n,className:we("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));kr.displayName="TableRow";const ct=p.forwardRef(({className:e,...t},n)=>c.jsx("th",{ref:n,className:we("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ct.displayName="TableHead";const ut=p.forwardRef(({className:e,...t},n)=>c.jsx("td",{ref:n,className:we("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));ut.displayName="TableCell";const U5=p.forwardRef(({className:e,...t},n)=>c.jsx("caption",{ref:n,className:we("mt-4 text-sm text-muted-foreground",e),...t}));U5.displayName="TableCaption";var nm="focusScope.autoFocusOnMount",rm="focusScope.autoFocusOnUnmount",$S={bubbles:!1,cancelable:!0},B5="FocusScope",A0=p.forwardRef((e,t)=>
vendor: 4,415 bytes, line 168
168{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=e,[a,l]=p.useState(null),u=St(s),d=St(i),h=p.useRef(null),f=$e(t,m=>l(m)),v=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let m=function(b){if(v.paused||!a)return;const S=b.target;a.contains(S)?h.current=S:Fs(h.current,{select:!0})},w=function(b){if(v.paused||!a)return;const S=b.relatedTarget;S!==null&&(a.contains(S)||Fs(h.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const _ of b)_.removedNodes.length>0&&Fs(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),x.disconnect()}}},[r,a,v.paused]),p.useEffect(()=>{if(a){US.add(v);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(nm,$S);a.addEventListener(nm,u),a.dispatchEvent(y),y.defaultPrevented||(z5(q5(Gj(a)),{select:!0}),document.activeElement===m&&Fs(a))}return()=>{a.removeEventListener(nm,u),setTimeout(()=>{const y=new CustomEvent(rm,$S);a.addEventListener(rm,d),a.dispatchEvent(y),y.defaultPrevented||Fs(m??document.body,{select:!0}),a.removeEventListener(rm,d),US.remove(v)},0)}}},[a,u,d,v]);const g=p.useCallback(m=>{if(!n&&!r||v.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(w&&y){const x=m.currentTarget,[b,S]=H5(x);b&&S?!m.shiftKey&&y===S?(m.preventDefault(),n&&Fs(b,{select:!0})):m.shiftKey&&y===b&&(m.preventDefault(),n&&Fs(S,{select:!0})):y===x&&m.preventDefault()}},[n,r,v.paused]);return c.jsx(Se.div,{tabIndex:-1,...o,ref:f,onKeyDown:g})});A0.displayName=B5;function z5(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fs(r,{select:t}),document.activeElement!==n)return}function H5(e){const t=Gj(e),n=VS(t,e),r=VS(t.reverse(),e);return[n,r]}function Gj(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 VS(e,t){for(const n of e)if(!W5(n,{upTo:t}))return n}function W5(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 K5(e){return e instanceof HTMLInputElement&&"select"in e}function Fs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&K5(e)&&t&&e.select()}}var US=G5();function G5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=BS(e,t),e.unshift(t)},remove(t){var n;e=BS(e,t),(n=e[0])==null||n.resume()}}}function BS(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function q5(e){return e.filter(t=>t.tagName!=="A")}var sm=0;function qj(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??zS()),document.body.insertAdjacentElement("beforeend",e[1]??zS()),sm++,()=>{sm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sm--}},[])}function zS(){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 Br=function(){return Br=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},Br.apply(this,arguments)};function Yj(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 Y5(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 Xd="right-scroll-bar-position",Jd="width-before-scroll-bar",Z
vendor: 4,744 bytes, lines 168-183
1685="with-scroll-bars-hidden",Q5="--removed-body-scroll-bar-size";function im(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function X5(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 J5=typeof window<"u"?p.useLayoutEffect:p.useEffect,HS=new WeakMap;function ez(e,t){var n=X5(null,function(r){return e.forEach(function(s){return im(s,r)})});return J5(function(){var r=HS.get(n);if(r){var s=new Set(r),i=new Set(e),o=n.current;s.forEach(function(a){i.has(a)||im(a,null)}),i.forEach(function(a){s.has(a)||im(a,o)})}HS.set(n,e)},[e]),n}function tz(e){return e}function nz(e,t){t===void 0&&(t=tz);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 d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return s}function rz(e){e===void 0&&(e={});var t=nz(null);return t.options=Br({async:!0,ssr:!1},e),t}var Zj=function(e){var t=e.sideCar,n=Yj(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,Br({},n))};Zj.isSideCarExport=!0;function sz(e,t){return e.useMedium(t),Zj}var Qj=rz(),om=function(){},zf=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:om,onWheelCapture:om,onTouchMoveCapture:om}),s=r[0],i=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,v=e.noIsolation,g=e.inert,m=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,x=e.gapMode,b=Yj(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,_=ez([n,t]),j=Br(Br({},b),s);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:Qj,removeScrollBar:u,shards:h,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!m,lockRef:n,gapMode:x}),o?p.cloneElement(p.Children.only(a),Br(Br({},j),{ref:_})):p.createElement(y,Br({},j,{className:l,ref:_}),a))});zf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zf.classNames={fullWidth:Jd,zeroRight:Xd};var iz=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function oz(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=iz();return t&&e.setAttribute("nonce",t),e}function az(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lz(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cz=function(){var e=0,t=null;return{add:function(n){e==0&&(t=oz())&&(az(t,n),lz(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uz=function(){var e=cz();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Xj=function(){var e=uz(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},dz={left:0,top:0,right:0,gap:0},am=function(e){return parseInt(e||"",10)||0},hz=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[am(n),am(r),am(s)]},fz=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dz;var t=hz(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])}},pz=Xj(),ba="data-scroll-locked",mz=function(e,t,n,r){var s=e.left,i=e.top,o=e.right,a=e.gap;return n===void 0&&(n="margin"),` 169 .`.concat(Z5,` { 170 overflow: hidden `).concat(r,`; 171 padding-right: `).concat(a,"px ").concat(r,`; 172 } 173 body[`).concat(ba,`] { 174 overflow: hidden `).concat(r,`; 175 overscroll-behavior: contain; 176 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 177 padding-left: `.concat(s,`px; 178 padding-top: `).concat(i,`px; 179 padding-right: `).concat(o,`px; 180 margin-left:0; 181 margin-top:0; 182 margin-right: `).concat(a,"px ").concat(r,`; 183 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
183")].filter(Boolean).join(""),` 184 } 185 186 .`).concat(Xd,` { 187 right: `).concat(a,"px ").concat(r,`; 188 } 189 190 .`).concat(Jd,` { 191 margin-right: `).concat(a,"px ").concat(r,`; 192 } 193 194 .`).concat(Xd," .").concat(Xd,` { 195 right: 0 `).concat(r,`; 196 } 197 198 .`).concat(Jd," .").concat(Jd,` { 199 margin-right: 0 `).concat(r,`; 200 } 201 202 body[`).concat(ba,`] { 203 `).concat(Q5,": ").concat(a,`px; 204 } 205`)},WS=function(){var e=parseInt(document.body.getAttribute(ba)||"0",10);return isFinite(e)?e:0},gz=function(){p.useEffect(function(){return document.body.setAttribute(ba,(WS()+1).toString()),function(){var e=WS()-1;e<=0?document.body.removeAttribute(ba):document.body.setAttribute(ba,e.toString())}},[])},vz=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;gz();var i=p.useMemo(function(){return fz(s)},[s]);return p.createElement(pz,{styles:mz(i,!t,s,n?"":"!important")})},fv=!1;if(typeof window<"u")try{var _d=Object.defineProperty({},"passive",{get:function(){return fv=!0,!0}});window.addEventListener("test",_d,_d),window.removeEventListener("test",_d,_d)}catch{fv=!1}var Lo=fv?{passive:!1}:!1,yz=function(e){return e.tagName==="TEXTAREA"},Jj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yz(e)&&n[t]==="visible")},xz=function(e){return Jj(e,"overflowY")},wz=function(e){return Jj(e,"overflowX")},KS=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=eP(e,r);if(s){var i=tP(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bz=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Sz=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eP=function(e,t){return e==="v"?xz(t):wz(t)},tP=function(e,t){return e==="v"?bz(t):Sz(t)},_z=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ez=function(e,t,n,r,s){var i=_z(e,window.getComputedStyle(t).direction),o=i*r,a=n.target,l=t.contains(a),u=!1,d=o>0,h=0,f=0;do{var v=tP(e,a),g=v[0],m=v[1],w=v[2],y=m-w-i*g;(g||y)&&eP(e,a)&&(h+=y,f+=g),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(f)<1||!s))&&(u=!0),u},Ed=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GS=function(e){return[e.deltaX,e.deltaY]},qS=function(e){return e&&"current"in e?e.current:e},Cz=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Tz=function(e){return` 206 .block-interactivity-`.concat(e,` {pointer-events: none;} 207 .allow-interactivity-`).concat(e,` {pointer-events: all;} 208`)},kz=0,Do=[];function jz(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),s=p.useState(kz++)[0],i=p.useState(Xj)[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 m=Y5([e.lockRef.current],(e.shards||[]).map(qS),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var y=Ed(m),x=n.current,b="deltaX"in m?m.deltaX:x[0]-y[0],S="deltaY"in m?m.deltaY:x[1]-y[1],_,j=m.target,T=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in m&&T==="h"&&j.type==="range")return!1;var k=KS(T,j);if(!k)return!0;if(k?_=T:(_=T==="v"?"h":"v",k=KS(T,j)),!k)return!1;if(!r.current&&"changedTouches"in m&&(b||S)&&(r.current=_),!_)return!0;var E=r.current||_;return Ez(E,w,m,E==="h"?b:S,!0)},[]),l=p.useCallback(function(m){var w=m;if(!(!Do.length||Do[Do.length-1]!==i)){var y="deltaY"in w?GS(w):Ed(w),x=t.current.filter(function(_){return _.name===w.type&&(_.target===w.target||w.target===_.shadowParent)&&Cz(_.delta,y)})[0];if(x&&x.should){w.cancelable&&w.preventDefault();return}
vendor: 8,891 bytes, lines 208-212
208if(!x){var b=(o.current.shards||[]).map(qS).filter(Boolean).filter(function(_){return _.contains(w.target)}),S=b.length>0?a(w,b[0]):!o.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),u=p.useCallback(function(m,w,y,x){var b={name:m,delta:w,target:y,should:x,shadowParent:Pz(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=p.useCallback(function(m){n.current=Ed(m),r.current=void 0},[]),h=p.useCallback(function(m){u(m.type,GS(m),m.target,a(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,Ed(m),m.target,a(m,e.lockRef.current))},[]);p.useEffect(function(){return Do.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Lo),document.addEventListener("touchmove",l,Lo),document.addEventListener("touchstart",d,Lo),function(){Do=Do.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,Lo),document.removeEventListener("touchmove",l,Lo),document.removeEventListener("touchstart",d,Lo)}},[]);var v=e.removeScrollBar,g=e.inert;return p.createElement(p.Fragment,null,g?p.createElement(i,{styles:Tz(s)}):null,v?p.createElement(vz,{gapMode:e.gapMode}):null)}function Pz(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Az=sz(Qj,jz);var R0=p.forwardRef(function(e,t){return p.createElement(zf,Br({},e,{ref:t,sideCar:Az}))});R0.classNames=zf.classNames;var Rz=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mo=new WeakMap,Cd=new WeakMap,Td={},lm=0,nP=function(e){return e&&(e.host||nP(e.parentNode))},Nz=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nP(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})},Oz=function(e,t,n,r){var s=Nz(t,Array.isArray(e)?e:[e]);Td[n]||(Td[n]=new WeakMap);var i=Td[n],o=[],a=new Set,l=new Set(s),u=function(h){!h||a.has(h)||(a.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||l.has(h)||Array.prototype.forEach.call(h.children,function(f){if(a.has(f))d(f);else try{var v=f.getAttribute(r),g=v!==null&&v!=="false",m=(Mo.get(f)||0)+1,w=(i.get(f)||0)+1;Mo.set(f,m),i.set(f,w),o.push(f),m===1&&g&&Cd.set(f,!0),w===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",f,y)}})};return d(t),a.clear(),lm++,function(){o.forEach(function(h){var f=Mo.get(h)-1,v=i.get(h)-1;Mo.set(h,f),i.set(h,v),f||(Cd.has(h)||h.removeAttribute(r),Cd.delete(h)),v||h.removeAttribute(n)}),lm--,lm||(Mo=new WeakMap,Mo=new WeakMap,Cd=new WeakMap,Td={})}},rP=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=Rz(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),Oz(r,s,n,"aria-hidden")):function(){return null}},N0="Dialog",[sP,yW]=sl(N0),[Iz,Rr]=sP(N0),iP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:o=!0}=e,a=p.useRef(null),l=p.useRef(null),[u=!1,d]=za({prop:r,defaultProp:s,onChange:i});return c.jsx(Iz,{scope:t,triggerRef:a,contentRef:l,contentId:hi(),titleId:hi(),descriptionId:hi(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};iP.displayName=N0;var oP="DialogTrigger",Lz=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rr(oP,n),i=$e(t,s.triggerRef);return c.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":L0(s.open),...r,ref:i,onClick:ce(e.onClick,s.onOpenToggle)})});Lz.displayName=oP;var O0="DialogPortal",[Dz,aP]=sP(O0,{forceMount:void 0}),lP=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,i=Rr(O0,t);return c.jsx(Dz,{scope:t,forceMount:n,children:p.Children.map(r,o=>c.jsx(Ar,{present:n||i.open,children:c.jsx(yf,{asChild:!0,container:s,children:o})}))})};lP.displayName=O0;var Vh="DialogOverlay",cP=p.forwardRef((e,t)=>{const n=aP(Vh,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Rr(Vh,e.__scopeDialog);return i.modal?c.jsx(Ar,{present:r||i.open,children:c.jsx(Mz,{...s,ref:t})}):null});cP.displayName=Vh;var Mz=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rr(Vh,n);return c.jsx(R0,{as:gi,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Se.div,{"data-state":L0(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),wo="DialogContent",uP=p.forwardRef((e,t)=>{const n=aP(wo,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,i=Rr(wo,e.__scopeDialog);return c.jsx(Ar,{present:r||i.open,children:i.modal?c.jsx(Fz,{...s,ref:t}):c.jsx($z,{...s,ref:t})})});uP.displayName=wo;var Fz=p.forwardRef((e,t)=>{const n=Rr(wo,e.__scopeDialog),r=p.useRef(null),s=$e(t,n.contentRef,r);return p.useEffect(()=>{const i=r.current;if(i)return rP(i)},[]),c.jsx(dP,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ce(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ce(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:ce(e.onFocusOutside,i=>i.preventDefault())})}),$z=p.forwardRef((e,t)=>{const n=Rr(wo,e.__scopeDialog),r=p.useRef(!1),s=p.useRef(!1);return c.jsx(dP,{...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,u;(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;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),dP=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=e,a=Rr(wo,n),l=p.useRef(null),u=$e(t,l);return qj(),c.jsxs(c.Fragment,{children:[c.jsx(A0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:c.jsx(Su,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":L0(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(Vz,{titleId:a.titleId}),c.jsx(Bz,{contentRef:l,descriptionId:a.descriptionId})]})]})}),I0="DialogTitle",hP=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rr(I0,n);return c.jsx(Se.h2,{id:s.titleId,...r,ref:t})});hP.displayName=I0;var fP="DialogDescription",pP=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rr(fP,n);return c.jsx(Se.p,{id:s.descriptionId,...r,ref:t})});pP.displayName=fP;var mP="DialogClose",gP=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Rr(mP,n);return c.jsx(Se.button,{type:"button",...r,ref:t,onClick:ce(e.onClick,()=>s.onOpenChange(!1))})});gP.displayName=mP;function L0(e){return e?"open":"closed"}var vP="DialogTitleWarning",[xW,yP]=H2(vP,{contentName:wo,titleName:I0,docsSlug:"dialog"}),Vz=({titleId:e})=>{const t=yP(vP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 209 210If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 211 212For 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},Uz="DialogDescriptionWarning",Bz=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${yP(Uz).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},zz=iP,Hz=lP,xP=cP,wP=uP,bP=hP,SP=pP,Wz=gP;const Lu=zz,Kz=Hz,_P=p.forwardRef(({className:e,...t},n)=>c.jsx(xP,{ref:n,className:we("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}));_P.displayName=xP.displayName;const vl=p.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(Kz,{children:[c.jsx(_P,{}),c.jsxs(wP,{ref:r,className:we("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:rou
212nded-lg",e),...n,children:[t,c.jsxs(Wz,{className:"absolute right-4 top-4 rounded-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:[c.jsx(Ey,{className:"h-4 w-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));vl.displayName=wP.displayName;const yl=({className:e,...t})=>c.jsx("div",{className:we("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});yl.displayName="DialogHeader";const xl=p.forwardRef(({className:e,...t},n)=>c.jsx(bP,{ref:n,className:we("text-lg font-semibold leading-none tracking-tight",e),...t}));xl.displayName=bP.displayName;const Gz=p.forwardRef(({className:e,...t},n)=>c.jsx(SP,{ref:n,className:we("text-sm text-muted-foreground",e),...t}));Gz.displayName=SP.displayName;function qz({title:e,isOpen:t,onClose:n,children:r}){return c.jsx(Lu,{open:t,onOpenChange:n,children:c.jsxs(vl,{className:"max-h-[90vh] overflow-hidden",children:[c.jsx(yl,{children:c.jsx(xl,{children:e})}),r]})})}var Du=e=>e.type==="checkbox",Xi=e=>e instanceof Date,ln=e=>e==null;const EP=e=>typeof e=="object";var Et=e=>!ln(e)&&!Array.isArray(e)&&EP(e)&&!Xi(e),CP=e=>Et(e)&&e.target?Du(e.target)?e.target.checked:e.target.value:e,Yz=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,TP=(e,t)=>e.has(Yz(t)),Zz=e=>{const t=e.constructor&&e.constructor.prototype;return Et(t)&&t.hasOwnProperty("isPrototypeOf")},D0=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function gn(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(!(D0&&(e instanceof Blob||e instanceof FileList))&&(n||Et(e)))if(t=n?[]:{},!n&&!Zz(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=gn(e[r]));else return e;return t}var Hf=e=>Array.isArray(e)?e.filter(Boolean):[],xt=e=>e===void 0,Z=(e,t,n)=>{if(!t||!Et(e))return n;const r=Hf(t.split(/[,[\].]+?/)).reduce((s,i)=>ln(s)?s:s[i],e);return xt(r)||r===e?xt(e[t])?n:e[t]:r},Qn=e=>typeof e=="boolean",M0=e=>/^\w*$/.test(e),kP=e=>Hf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ze=(e,t,n)=>{let r=-1;const s=M0(t)?[t]:kP(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const u=e[a];l=Et(u)||Array.isArray(u)?u:isNaN(+s[r+1])?{}:[]}if(a==="__proto__")return;e[a]=l,e=e[a]}return e};const Uh={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xr={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},is={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},jP=M.createContext(null),Mu=()=>M.useContext(jP),Qz=e=>{const{children:t,...n}=e;return M.createElement(jP.Provider,{value:n},t)};var PP=(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]!==xr.all&&(t._proxyFormState[o]=!r||xr.all),n&&(n[o]=!0),e[o]}});return s},yn=e=>Et(e)&&!Object.keys(e).length,AP=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return yn(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||xr.all))},bc=e=>Array.isArray(e)?e:[e],RP=(e,t,n)=>!e||!t||e===t||bc(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function F0(e){const t=M.useRef(e);t.current=e,M.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Xz(e){const t=Mu(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=M.useState(n._formState),l=M.useRef(!0),u=M.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=M.useRef(s);return d.current=s,F0({disabled:r,next:h=>l.current&&RP(d.current,h.name,i)&&AP(h,u.current,n._updateFormState)&&a({...n._formState,...h}),subject:n._subjects.state}),M.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),PP(o,n,u.current,!1)}var zr=e=>
vendor: 31,886 bytes, line 212
212typeof e=="string",NP=(e,t,n,r,s)=>zr(e)?(r&&t.watch.add(e),Z(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Z(n,i))):(r&&(t.watchAll=!0),n);function Jz(e){const t=Mu(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=M.useRef(r);a.current=r,F0({disabled:i,subject:n._subjects.values,next:d=>{RP(a.current,d.name,o)&&u(gn(NP(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,u]=M.useState(n._getWatch(r,s));return M.useEffect(()=>n._removeUnmounted()),l}function e6(e){const t=Mu(),{name:n,disabled:r,control:s=t.control,shouldUnregister:i}=e,o=TP(s._names.array,n),a=Jz({control:s,name:n,defaultValue:Z(s._formValues,n,Z(s._defaultValues,n,e.defaultValue)),exact:!0}),l=Xz({control:s,name:n,exact:!0}),u=M.useRef(s.register(n,{...e.rules,value:a,...Qn(e.disabled)?{disabled:e.disabled}:{}}));return M.useEffect(()=>{const d=s._options.shouldUnregister||i,h=(f,v)=>{const g=Z(s._fields,f);g&&g._f&&(g._f.mount=v)};if(h(n,!0),d){const f=gn(Z(s._options.defaultValues,n));ze(s._defaultValues,n,f),xt(Z(s._formValues,n))&&ze(s._formValues,n,f)}return()=>{(o?d&&!s._state.action:d)?s.unregister(n):h(n,!1)}},[n,s,o,i]),M.useEffect(()=>{Z(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:Z(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...Qn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:M.useCallback(d=>u.current.onChange({target:{value:CP(d),name:n},type:Uh.CHANGE}),[n]),onBlur:M.useCallback(()=>u.current.onBlur({target:{value:Z(s._formValues,n),name:n},type:Uh.BLUR}),[n,s]),ref:M.useCallback(d=>{const h=Z(s._fields,n);h&&d&&(h._f.ref={focus:()=>d.focus(),select:()=>d.select(),setCustomValidity:f=>d.setCustomValidity(f),reportValidity:()=>d.reportValidity()})},[s._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Z(l.validatingFields,n)},error:{enumerable:!0,get:()=>Z(l.errors,n)}})}}const t6=e=>e.render(e6(e));var OP=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},YS=e=>({isOnSubmit:!e||e===xr.onSubmit,isOnBlur:e===xr.onBlur,isOnChange:e===xr.onChange,isOnAll:e===xr.all,isOnTouch:e===xr.onTouched}),ZS=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Sc=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=Z(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(Sc(a,t))break}else if(Et(a)&&Sc(a,t))break}}};var n6=(e,t,n)=>{const r=bc(Z(e,n));return ze(r,"root",t[n]),ze(e,n,r),e},$0=e=>e.type==="file",ps=e=>typeof e=="function",Bh=e=>{if(!D0)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},eh=e=>zr(e),V0=e=>e.type==="radio",zh=e=>e instanceof RegExp;const QS={value:!1,isValid:!1},XS={value:!0,isValid:!0};var IP=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&&!xt(e[0].attributes.value)?xt(e[0].value)||e[0].value===""?XS:{value:e[0].value,isValid:!0}:XS:QS}return QS};const JS={isValid:!1,value:null};var LP=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,JS):JS;function e_(e,t,n="validate"){if(eh(e)||Array.isArray(e)&&e.every(eh)||Qn(e)&&!e)return{type:n,message:eh(e)?e:"",ref:t}}var Fo=e=>Et(e)&&!zh(e)?e:{value:e,message:""},t_=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:u,min:d,max:h,pattern:f,validate:v,name:g,valueAsNumber:m,mount:w,disabled:y}=e._f,x=Z(t,g);if(!w||y)return{};const b=o?o[0]:i,S=O=>{r&&b.reportValidity&&(b.setCustomValidity(Qn(O)?"":O||""),b.reportValidity())},_={},j=V0(i),T=Du(i),k=j||T,E=(m||$0(i))&&xt(i.value)&&xt(x)||Bh(i)&&i.value===""||x===""||Array.isArray(x)&&!x.length,N=OP.bind(null,g,n,_),U=(O,z,D,q=is.maxLength,F=is.minLength)=>{const K=O?z:D;_[g]={type:O?q:F,message:K,ref:i,...N(O?q:F,K)}};if(s?!Array.isArray(x)||!x.length:a&&(!k&&(E||ln(x))||Qn(x)&&!x||T&&!IP(o).isValid||j&&!LP(o).isValid)){const{value:O,message:z}=eh(a)?{value:!!a,message:a}:Fo(a);if(O&&(_[g]={type:is.required,message:z,ref:b,...N(is.required,z)},!n))return S(z),_}if(!E&&(!ln(d)||!ln(h))){let O,z;const D=Fo(h),q=Fo(d);if(!ln(x)&&!isNaN(x)){const F=i.valueAsNumber||x&&+x;ln(D.value)||(O=F>D.value),ln(q.value)||(z=F<q.value)}else{const F=i.valueAsDate||new Date(x),K=J=>new Date(new Date().toDateString()+" "+J),R=i.type=="time",$=i.type=="week";zr(D.value)&&x&&(O=R?K(x)>K(D.value):$?x>D.value:F>new Date(D.value)),zr(q.value)&&x&&(z=R?K(x)<K(q.value):$?x<q.value:F<new Date(q.value))}if((O||z)&&(U(!!O,D.message,q.message,is.max,is.min),!n))return S(_[g].message),_}if((l||u)&&!E&&(zr(x)||s&&Array.isArray(x))){const O=Fo(l),z=Fo(u),D=!ln(O.value)&&x.length>+O.value,q=!ln(z.value)&&x.length<+z.value;if((D||q)&&(U(D,O.message,z.message),!n))return S(_[g].message),_}if(f&&!E&&zr(x)){const{value:O,message:z}=Fo(f);if(zh(O)&&!x.match(O)&&(_[g]={type:is.pattern,message:z,ref:i,...N(is.pattern,z)},!n))return S(z),_}if(v){if(ps(v)){const O=await v(x,t),z=e_(O,b);if(z&&(_[g]={...z,...N(is.validate,z.message)},!n))return S(z.message),_}else if(Et(v)){let O={};for(const z in v){if(!yn(O)&&!n)break;const D=e_(await v[z](x,t),b,z);D&&(O={...D,...N(z,D.message)},S(D.message),n&&(_[g]=O))}if(!yn(O)&&(_[g]={ref:b,...O},!n))return _}}return S(!0),_};function r6(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=xt(e)?r++:e[t[r++]];return e}function s6(e){for(const t in e)if(e.hasOwnProperty(t)&&!xt(e[t]))return!1;return!0}function jt(e,t){const n=Array.isArray(t)?t:M0(t)?[t]:kP(t),r=n.length===1?e:r6(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(Et(r)&&yn(r)||Array.isArray(r)&&s6(r))&&jt(e,n.slice(0,-1)),e}var cm=()=>{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=[]}}},pv=e=>ln(e)||!EP(e);function Ks(e,t){if(pv(e)||pv(t))return e===t;if(Xi(e)&&Xi(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(Xi(i)&&Xi(o)||Et(i)&&Et(o)||Array.isArray(i)&&Array.isArray(o)?!Ks(i,o):i!==o)return!1}}return!0}var DP=e=>e.type==="select-multiple",i6=e=>V0(e)||Du(e),um=e=>Bh(e)&&e.isConnected,MP=e=>{for(const t in e)if(ps(e[t]))return!0;return!1};function Hh(e,t={}){const n=Array.isArray(e);if(Et(e)||n)for(const r in e)Array.isArray(e[r])||Et(e[r])&&!MP(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Hh(e[r],t[r])):ln(e[r])||(t[r]=!0);return t}function FP(e,t,n){const r=Array.isArray(e);if(Et(e)||r)for(const s in e)Array.isArray(e[s])||Et(e[s])&&!MP(e[s])?xt(t)||pv(n[s])?n[s]=Array.isArray(e[s])?Hh(e[s],[]):{...Hh(e[s])}:FP(e[s],ln(t)?{}:t[s],n[s]):n[s]=!Ks(e[s],t[s]);return n}var $l=(e,t)=>FP(e,t,Hh(t)),$P=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>xt(e)?e:t?e===""?NaN:e&&+e:n&&zr(e)?new Date(e):r?r(e):e;function dm(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return $0(t)?t.files:V0(t)?LP(e.refs).value:DP(t)?[...t.selectedOptions].map(({value:n})=>n):Du(t)?IP(e.refs).value:$P(xt(t.value)?e.ref.value:t.value,e)}var o6=(e,t,n,r)=>{const s={};for(const i of e){const o=Z(t,i);o&&ze(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Vl=e=>xt(e)?e:zh(e)?e.source:Et(e)?zh(e.value)?e.value.source:e.value:e;const n_="AsyncFunction";var a6=e=>(!e||!e.validate)&&!!(ps(e.validate)&&e.validate.constructor.name===n_||Et(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===n_)),l6=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function r_(e,t,n){const r=Z(e,n);if(r||M0(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=Z(t,i),a=Z(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 c6=(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,u6=(e,t)=>!Hf(Z(e,t)).length&&jt(e,t);const d6={mode:xr.onSubmit,reValidateMode:xr.onChange,shouldFocusError:!0};function h6(e={}){let t={...d6,...e},n={submitCount:0,isDirty:!1,isLoading:ps(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},s=Et(t.defaultValues)||Et(t.values)?gn(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:gn(s),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:cm(),array:cm(),state:cm()},f=YS(t.mode),v=YS(t.reValidateMode),g=t.criteriaMode===xr.all,m=C=>A=>{clearTimeout(u),u=setTimeout(C,A)},w=async C=>{if(!e.disabled&&(d.isValid||C)){const A=t.resolver?yn((await k()).errors):await N(r,!0);A!==n.isValid&&h.state.next({isValid:A})}},y=(C,A)=>{!e.disabled&&(d.isValidating||d.validatingFields)&&((C||Array.from(a.mount)).forEach(I=>{I&&(A?ze(n.validatingFields,I,A):jt(n.validatingFields,I))}),h.state.next({validatingFields:n.validatingFields,isValidating:!yn(n.validatingFields)}))},x=(C,A=[],I,X,G=!0,B=!0)=>{if(X&&I&&!e.disabled){if(o.action=!0,B&&Array.isArray(Z(r,C))){const ue=I(Z(r,C),X.argA,X.argB);G&&ze(r,C,ue)}if(B&&Array.isArray(Z(n.errors,C))){const ue=I(Z(n.errors,C),X.argA,X.argB);G&&ze(n.errors,C,ue),u6(n.errors,C)}if(d.touchedFields&&B&&Array.isArray(Z(n.touchedFields,C))){const ue=I(Z(n.touchedFields,C),X.argA,X.argB);G&&ze(n.touchedFields,C,ue)}d.dirtyFields&&(n.dirtyFields=$l(s,i)),h.state.next({name:C,isDirty:O(C,A),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else ze(i,C,A)},b=(C,A)=>{ze(n.errors,C,A),h.state.next({errors:n.errors})},S=C=>{n.errors=C,h.state.next({errors:n.errors,isValid:!1})},_=(C,A,I,X)=>{const G=Z(r,C);if(G){const B=Z(i,C,xt(I)?Z(s,C):I);xt(B)||X&&X.defaultChecked||A?ze(i,C,A?B:dm(G._f)):q(C,B),o.mount&&w()}},j=(C,A,I,X,G)=>{let B=!1,ue=!1;const _e={name:C};if(!e.disabled){const it=!!(Z(r,C)&&Z(r,C)._f&&Z(r,C)._f.disabled);if(!I||X){d.isDirty&&(ue=n.isDirty,n.isDirty=_e.isDirty=O(),B=ue!==_e.isDirty);const Be=it||Ks(Z(s,C),A);ue=!!(!it&&Z(n.dirtyFields,C)),Be||it?jt(n.dirtyFields,C):ze(n.dirtyFields,C,!0),_e.dirtyFields=n.dirtyFields,B=B||d.dirtyFields&&ue!==!Be}if(I){const Be=Z(n.touchedFields,C);Be||(ze(n.touchedFields,C,I),_e.touchedFields=n.touchedFields,B=B||d.touchedFields&&Be!==I)}B&&G&&h.state.next(_e)}return B?_e:{}},T=(C,A,I,X)=>{const G=Z(n.errors,C),B=d.isValid&&Qn(A)&&n.isValid!==A;if(e.delayError&&I?(l=m(()=>b(C,I)),l(e.delayError)):(clearTimeout(u),l=null,I?ze(n.errors,C,I):jt(n.errors,C)),(I?!Ks(G,I):G)||!yn(X)||B){const ue={...X,...B&&Qn(A)?{isValid:A}:{},errors:n.errors,name:C};n={...n,...ue},h.state.next(ue)}},k=async C=>{y(C,!0);const A=await t.resolver(i,t.context,o6(C||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y(C),A},E=async C=>{const{errors:A}=await k(C);if(C)for(const I of C){const X=Z(A,I);X?ze(n.errors,I,X):jt(n.errors,I)}else n.errors=A;return A},N=async(C,A,I={valid:!0})=>{for(const X in C){const G=C[X];if(G){const{_f:B,...ue}=G;if(B){const _e=a.array.has(B.name),it=G._f&&a6(G._f);it&&d.validatingFields&&y([X],!0);const Be=await t_(G,i,g,t.shouldUseNativeValidation&&!A,_e);if(it&&d.validatingFields&&y([X]),Be[B.name]&&(I.valid=!1,A))break;!A&&(Z(Be,B.name)?_e?n6(n.errors,Be,B.name):ze(n.errors,B.name,Be[B.name]):jt(n.errors,B.name))}!yn(ue)&&await N(ue,A,I)}}return I.valid},U=()=>{for(const C of a.unMount){const A=Z(r,C);A&&(A._f.refs?A._f.refs.every(I=>!um(I)):!um(A._f.ref))&&ve(C)}a.unMount=new Set},O=(C,A)=>!e.disabled&&(C&&A&&ze(i,C,A),!Ks(Q(),s)),z=(C,A,I)=>NP(C,a,{...o.mount?i:xt(A)?s:zr(C)?{[C]:A}:A},I,A),D=C=>Hf(Z(o.mount?i:s,C,e.shouldUnregister?Z(s,C,[]):[])),q=(C,A,I={})=>{const X=Z(r,C);let G=A;if(X){const B=X._f;B&&(!B.disabled&&ze(i,C,$P(A,B)),G=Bh(B.ref)&&ln(A)?"":A,DP(B.ref)?[...B.ref.options].forEach(ue=>ue.selected=G.includes(ue.value)):B.refs?Du(B.ref)?B.refs.length>1?B.refs.forEach(ue=>(!ue.defaultChecked||!ue.disabled)&&(ue.checked=Array.isArray(G)?!!G.find(_e=>_e===ue.value):G===ue.value)):B.refs[0]&&(B.refs[0].checked=!!G):B.refs.forEach(ue=>ue.checked=ue.value===G):$0(B.ref)?B.ref.value="":(B.ref.value=G,B.ref.type||h.values.next({name:C,values:{...i}})))}(I.shouldDirty||I.shouldTouch)&&j(C,G,I.shouldTouch,I.shouldDirty,!0),I.shouldValidate&&J(C)},F=(C,A,I)=>{for(const X in A){const G=A[X],B=`${C}.${X}`,ue=Z(r,B);(a.array.has(C)||Et(G)||ue&&!ue._f)&&!Xi(G)?F(B,G,I):q(B,G,I)}},K=(C,A,I={})=>{const X=Z(r,C),G=a.array.has(C),B=gn(A);ze(i,C,B),G?(h.array.next({name:C,values:{...i}}),(d.isDirty||d.dirtyFields)&&I.shouldDirty&&h.state.next({name:C,dirtyFields:$l(s,i),isDirty:O(C,B)})):X&&!X._f&&!ln(B)?F(C,B,I):q(C,B,I),ZS(C,a)&&h.state.next({...n}),h.values.next({name:o.mount?C:void 0,values:{...i}})},R=async C=>{o.mount=!0;const A=C.target;let I=A.name,X=!0;const G=Z(r,I),B=()=>A.type?dm(G._f):CP(C),ue=_e=>{X=Number.isNaN(_e)||Xi(_e)&&isNaN(_e.getTime())||Ks(_e,Z(i,I,_e))};if(G){let _e,it;const Be=B(),en=C.type===Uh.BLUR||C.type===Uh.FOCUS_OUT,Dt=!l6(G._f)&&!t.resolver&&!Z(n.errors,I)&&!G._f.deps||c6(en,Z(n.touchedFields,I),n.isSubmitted,v,f),or=ZS(I,a,en);ze(i,I,Be),en?(G._f.onBlur&&G._f.onBlur(C),l&&l(0)):G._f.onChange&&G._f.onChange(C);const ar=j(I,Be,en,!1),js=!yn(ar)||or;if(!en&&h.values.next({name:I,type:C.type,values:{...i}}),Dt)return d.isValid&&(e.mode==="onBlur"?en&&w():w()),js&&h.state.next({name:I,...or?{}:ar});if(!en&&or&&h.state.next({...n}),t.resolver){const{errors:Li}=await k([I]);if(ue(Be),X){const Ao=r_(n.errors,r,I),ns=r_(Li,r,Ao.name||I);_e=ns.error,I=ns.name,it=yn(Li)}}else y([I],!0),_e=(await t_(G,i,g,t.shouldUseNativeValidation))[I],y([I]),ue(Be),X&&(_e?it=!1:d.isValid&&(it=await N(r,!0)));X&&(G._f.deps&&J(G._f.deps),T(I,it,_e,ar))}},$=(C,A)=>{if(Z(n.errors,A)&&C.focus)return C.focus(),1},J=async(C,A={})=>{let I,X;const G=bc(C);if(t.resolver){const B=await E(xt(C)?C:G);I=yn(B),X=C?!G.some(ue=>Z(B,ue)):I}else C?(X=(await Promise.all(G.map(async B=>{const ue=Z(r,B);return await N(ue&&ue._f?{[B]:ue}:ue)}))).every(Boolean),!(!X&&!n.isValid)&&w()):X=I=await N(r);return h.state.next({...!zr(C)||d.isValid&&I!==n.isValid?{}:{name:C},...t.resolver||!C?{isValid:I}:{},errors:n.errors}),A.shouldFocus&&!X&&Sc(r,$,C?G:a.mount),X},Q=C=>{const A={...o.mount?i:s};return xt(C)?A:zr(C)?Z(A,C):C.map(I=>Z(A,I))},oe=(C,A)=>({invalid:!!Z((A||n).errors,C),isDirty:!!Z((A||n).dirtyFields,C),error:Z((A||n).errors,C),isValidating:!!Z(n.validatingFields,C),isTouched:!!Z((A||n).touchedFields,C)}),ae=C=>{C&&bc(C).forEach(A=>jt(n.errors,A)),h.state.next({errors:C?n.errors:{}})},Pe=(C,A,I)=>{const X=(Z(r,C,{_f:{}})._f||{}).ref,G=Z(n.errors,C)||{},{ref:B,message:ue,type:_e,...it}=G;ze(n.errors,C,{...it,...A,ref:X}),h.state.next({name:C,errors:n.errors,isValid:!1}),I&&I.shouldFocus&&X&&X.focus&&X.focus()},st=(C,A)=>ps(C)?h.values.subscribe({next:I=>C(z(void 0,A),I)}):z(C,A,!0),ve=(C,A={})=>{for(const I of C?bc(C):a.mount)a.mount.delete(I),a.array.delete(I),A.keepValue||(jt(r,I),jt(i,I)),!A.keepError&&jt(n.errors,I),!A.keepDirty&&jt(n.dirtyFields,I),!A.keepTouched&&jt(n.touchedFields,I),!A.keepIsValidating&&jt(n.validatingFields,I),!t.shouldUnregister&&!A.keepDefaultValue&&jt(s,I);h.values.next({values:{...i}}),h.state.next({...n,...A.keepDirty?{isDirty:O()}:{}}),!A.keepIsValid&&w()},ne=({disabled:C,name:A,field:I,fields:X,value:G})=>{if(Qn(C)&&o.mount||C){const B=C?void 0:xt(G)?dm(I?I._f:Z(X,A)._f):G;ze(i,A,B),j(A,B,!1,!1,!0)}},Te=(C,A={})=>{let I=Z(r,C);const X=Qn(A.disabled)||Qn(e.disabled);return ze(r,C,{...I||{},_f:{...I&&I._f?I._f:{ref:{name:C}},name:C,mount:!0,...A}}),a.mount.add(C),I?ne({field:I,disabled:Qn(A.disabled)?A.disabled:e.disabled,name:C,value:A.value}):_(C,!0,A.value),{...X?{disabled:A.disabled||e.disabled}:{},...t.progressive?{required:!!A.required,min:Vl(A.min),max:Vl(A.max),minLength:Vl(A.minLength),maxLength:Vl(A.maxLength),pattern:Vl(A.pattern)}:{},name:C,onChange:R,onBlur:R,ref:G=>{if(G){Te(C,A),I=Z(r,C);const B=xt(G.value)&&G.querySelectorAll&&G.querySelectorAll("input,select,textarea")[0]||G,ue=i6(B),_e=I._f.refs||[];if(ue?_e.find(it=>it===B):B===I._f.ref)return;ze(r,C,{_f:{...I._f,...ue?{refs:[..._e.filter(um),B,...Array.isArray(Z(s,C))?[{}]:[]],ref:{type:B.type,name:C}}:{ref:B}}}),_(C,!1,void 0,B)}else I=Z(r,C,{}),I._f&&(I._f.mount=!1),(t.shouldUnregister||A.shouldUnregister)&&!(TP(a.array,C)&&o.action)&&a.unMount.add(C)}}},Ue=()=>t.shouldFocusError&&Sc(r,$,a.mount),he=C=>{Qn(C)&&(h.state.next({disabled:C}),Sc(r,(A,I)=>{const X=Z(r,I);X&&(A.disabled=X._f.disabled||C,Array.isArray(X._f.refs)&&X._f.refs.forEach(G=>{G.disabled=X._f.disabled||C}))},0,!1))},Ne=(C,A)=>async I=>{let X;I&&(I.preventDefault&&I.preventDefault(),I.persist&&I.persist());let G=gn(i);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:B,values:ue}=await k();n.errors=B,G=ue}else await N(r);if(jt(n.errors,"root"),yn(n.errors)){h.state.next({errors:{}});try{await C(G,I)}catch(B){X=B}}else A&&await A({...n.errors},I),Ue(),setTimeout(Ue);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:yn(n.errors)&&!X,submitCount:n.submitCount+1,errors:n.errors}),X)throw X},be=(C,A={})=>{Z(r,C)&&(xt(A.defaultValue)?K(C,gn(Z(s,C))):(K(C,A.defaultValue),ze(s,C,gn(A.defaultValue))),A.keepTouched||jt(n.touchedFields,C),A.keepDirty||(jt(n.dirtyFields,C),n.isDirty=A.defaultValue?O(C,gn(Z(s,C))):O()),A.keepError||(jt(n.errors,C),d.isValid&&w()),h.state.next({...n}))},Ke=(C,A={})=>{const I=C?gn(C):s,X=gn(I),G=yn(C),B=G?s:X;if(A.keepDefaultValues||(s=I),!A.keepValues){if(A.keepDirtyValues){const ue=new Set([...a.mount,...Object.keys($l(s,i))]);for(const _e of Array.from(ue))Z(n.dirtyFields,_e)?ze(B,_e,Z(i,_e)):K(_e,Z(B,_e))}else{if(D0&&xt(C))for(const ue of a.mount){const _e=Z(r,ue);if(_e&&_e._f){const it=Array.isArray(_e._f.refs)?_e._f.refs[0]:_e._f.ref;if(Bh(it)){const Be=it.closest("form");if(Be){Be.reset();break}}}}r={}}i=e.shouldUnregister?A.keepDefaultValues?gn(s):{}:gn(B),h.array.next({values:{...B}}),h.values.next({values:{...B}})}a={mount:A.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!A.keepIsValid||!!A.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:A.keepSubmitCount?n.submitCount:0,isDirty:G?!1:A.keepDirty?n.isDirty:!!(A.keepDefaultValues&&!Ks(C,s)),isSubmitted:A.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:G?{}:A.keepDirtyValues?A.keepDefaultValues&&i?$l(s,i):n.dirtyFields:A.keepDefaultValues&&C?$l(s,C):A.keepDirty?n.dirtyFields:{},touchedFields:A.keepTouched?n.touchedFields:{},errors:A.keepErrors?n.errors:{},isSubmitSuccessful:A.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},at=(C,A)=>Ke(ps(C)?C(i):C,A);return{control:{register:Te,unregister:ve,getFieldState:oe,handleSubmit:Ne,setError:Pe,_executeSchema:k,_getWatch:z,_getDirty:O,_updateValid:w,_removeUnmounted:U,_updateFieldArray:x,_updateDisabledField:ne,_getFieldArray:D,_reset:Ke,_resetDefaultValues:()=>ps(t.defaultValues)&&t.defaultValues().then(C=>{at(C,t.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:C=>{n={...n,...C}},_disableForm:he,_subjects:h,_proxyFormState:d,_setErrors:S,get _fields(){return r},get _formValues(){return i},get _state(){return o},set _state(C){o=C},get _defaultValues(){return s},get _names(){return a},set _names(C){a=C},get _formState(){return n},set _formState(C){n=C},get _options(){return t},set _options(C){t={...t,...C}}},trigger:J,register:Te,handleSubmit:Ne,watch:st,setValue:K,getValues:Q,reset:at,resetField:be,clearErrors:ae,unregister:ve,setError:Pe,setFocus:(C,A={})=>{const I=Z(r,C),X=I&&I._f;if(X){const G=X.refs?X.refs[0]:X.ref;G.focus&&(G.focus(),A.shouldSelect&&G.select())}},getFieldState:oe}}function f6(e={}){const t=M.useRef(),n=M.useRef(),[r,s]=M.useState({isDirty:!1,isValidating:!1,isLoading:ps(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:ps(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...h6(e),formState:r});const i=t.current.control;return i._options=e,F0({subject:i._subjects.state,next:o=>{AP(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),M.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),M.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),M.useEffect(()=>{e.values&&!Ks(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),M.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),M.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()}),M.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),M.useEffect(()=>{t.current&&(t.current.watch=t.current.watch.bind({}))},[r]),t.current.formState=PP(r,i),t.current}var p6="Label",VP=p.forwardRef((e,t)=>c.jsx(Se.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())}}));VP.displayName=p6;var UP=VP;const m6=_y("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),wl=p.forwardRef(({className:e,...t},n)=>c.jsx(UP,{ref:n,className:we(m6(),e),...t}));wl.displayName=UP.displayName;const g6=Qz,BP=p.createContext({}),Gn=({...e})=>c.jsx(BP.Provider,{value:{name:e.name},children:c.jsx(t6,{...e})}),Wf=()=>{const e=p.useContext(BP),t=p.useContext(zP),{getFieldState:n,formState:r}=Mu(),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}},zP=p.createContext({}),kn=p.forwardRef(({className:e,...t},n)=>{const r=p.useId();return c.jsx(zP.Provider,{value:{id:r},children:c.jsx("div",{ref:n,className:we("space-y-2",e),...t})})});kn.displayName="FormItem";const jn=p.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:s}=Wf();return c.jsx(wl,{ref:n,className:we(r&&"text-destructive",e),htmlFor:s,...t})});jn.displayName="FormLabel";const Pn=p.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Wf();return c.jsx(gi,{ref:t,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...e})});Pn.displayName="FormControl";const v6=p.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=Wf();return c.jsx("p",{ref:n,id:r,className:we("text-sm text-muted-foreground",e),...t})});v6.displayName="FormDescription";const An=p.forwardRef(({className:e,children:t,...n},r)=>{const{error:s,formMessageId:i}=Wf(),o=s?String(s==null?void 0:s.message):t;return o?c.jsx("p",{ref:r,id:i,className:we("text-sm font-medium text-destructive",e),...n,children:o}):null});An.displayName="FormMessage";const s_=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Z(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},HP=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?s_(r.ref,n,e):r.refs&&r.refs.forEach(s=>s_(s,n,e))}},y6=(e,t)=>{t.shouldUseNativeValidation&&HP(e,t);const n={};for(const r in e){const s=Z(t.fields,r),i=Object.assign(e[r]||{},{ref:s&&s.ref});if(x6(t.names||Object.keys(e),r)){const o=Object.assign({},Z(n,r));ze(o,"root",i),ze(n,r,o)}else ze(n,r,i)}return n},x6=(e,t)=>e.some(n=>n.startsWith(t+"."));var w6=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(d){return d.errors.forEach(function(h){return e.push(h)})}),t){var l=n[o].types,u=l&&l[r.code];n[o]=OP(o,t,n,s,u?[].concat(u,r.message):r.message)}e.shift()}return n},b6=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(u){return i.shouldUseNativeValidation&&HP({},i),{errors:{},values:n.raw?r:u}})}catch(u){return a(u)}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:y6(w6(o.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw o}))}catch(o){return Promise.reject(o)}}};function S6({schema:e,defaultValues:t,onSubmit:n,children:r}){const s=f6({resolver:b6(e),defaultValues:t});return c.jsx(g6,{...s,children:c.jsxs("form",{onSubmit:s.handleSubmit(n),className:"space-y-4",children:[r,c.jsx(Ve,{type:"submit",className:"w-full",children:"Save"})]})})}var De;(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})(De||(De={}));var mv;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(mv||(mv={}));const re=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gs=e=>{switch(typeof e){case"undefined":return re.undefined;case"string":return re.string;case"number":return isNaN(e)?re.nan:re.number;case"boolean":return re.boolean;case"function":return re.function;case"bigint":return re.bigint;case"symbol":return re.symbol;case"object":return Array.isArray(e)?re.array:e===null?re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?re.promise:typeof Map<"u"&&e instanceof Map?re.map:typeof Set<"u"&&e instanceof Set?re.set:typeof Date<"u"&&e instanceof Date?re.date:re.object;default:return re.unknown}},W=De.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"]),_6=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vn 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 u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}static assert(t){if(!(t instanceof Vn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.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()}}Vn.create=e=>new Vn(e);const Qa=(e,t)=>{let n;switch(e.code){case W.invalid_type:e.received===re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case W.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,De.jsonStringifyReplacer)}`;break;case W.unrecognized_keys:n=`Unrecognized key(s) in object: ${De.joinValues(e.keys,", ")}`;break;case W.invalid_union:n="Invalid input";break;case W.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${De.joinValues(e.options)}`;break;case W.invalid_enum_value:n=`Invalid enum value. Expected ${De.joinValues(e.options)}, received '${e.received}'`;break;case W.invalid_arguments:n="Invalid function arguments";break;case W.invalid_return_type:n="Invalid function return type";break;case W.invalid_date:n="Invalid date";break;case W.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}"`:De.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case W.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 W.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 W.custom:n="Invalid input";break;case W.invalid_intersection_types:n="Intersection results could not be merged";break;case W.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case W.not_finite:n="Number must be finite";break;default:n=t.defaultError,De.assertNever(e)}return{message:n}};let WP=Qa;function E6(e){WP=e}function Wh(){return WP}const Kh=e=>
vendor: 7,034 bytes, line 212
212{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(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},C6=[];function te(e,t){const n=Wh(),r=Kh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Qa?void 0:Qa].filter(s=>!!s)});e.common.issues.push(r)}class Jt{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 me;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 Jt.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 me;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 me=Object.freeze({status:"aborted"}),ia=e=>({status:"dirty",value:e}),dn=e=>({status:"valid",value:e}),gv=e=>e.status==="aborted",vv=e=>e.status==="dirty",Jc=e=>e.status==="valid",eu=e=>typeof Promise<"u"&&e instanceof Promise;function Gh(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 KP(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 le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));var Xl,Jl;class Qr{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 i_=(e,t)=>{if(Jc(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 Vn(e.common.issues);return this._error=n,this._error}}};function Ee(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,u;const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??a.defaultError}:typeof a.data>"u"?{message:(l=d??r)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=d??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class je{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 Gs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Jt,ctx:{common:t.parent.common,data:t.data,parsedType:Gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(eu(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:Gs(t)},i=this._parseSync({data:t,path:s.path,parent:s});return i_(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:Gs(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(eu(s)?s:Promise.resolve(s));return i_(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:W.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 jr({schema:this,typeName:pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qr.create(this,this._def)}nullable(){return Ti.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _r.create(this,this._def)}promise(){return Ja.create(this,this._def)}or(t){return su.create([this,t],this._def)}and(t){return iu.create(this,t,this._def)}transform(t){return new jr({...Ee(this._def),schema:this,typeName:pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new uu({...Ee(this._def),innerType:this,defaultValue:n,typeName:pe.ZodDefault})}brand(){return new U0({typeName:pe.ZodBranded,type:this,...Ee(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new du({...Ee(this._def),innerType:this,catchValue:n,typeName:pe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Fu.create(this,t)}readonly(){return hu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const T6=/^c[^\s-]{8,}
vendor: 44,099 bytes, line 212
212$/i,k6=/^[0-9a-z]+$/,j6=/^[0-9A-HJKMNP-TV-Z]{26}$/,P6=/^[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,A6=/^[a-z0-9_-]{21}$/i,R6=/^[-+]?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)?)??$/,N6=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,O6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hm;const I6=/^(?:(?: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])$/,L6=/^(([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})))$/,D6=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,GP="((\\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])))",M6=new RegExp(`^${GP}$`);function qP(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 F6(e){return new RegExp(`^${qP(e)}$`)}function YP(e){let t=`${GP}T${qP(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 $6(e,t){return!!((t==="v4"||!t)&&I6.test(e)||(t==="v6"||!t)&&L6.test(e))}class wr extends je{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==re.string){const i=this._getOrReturnCtx(t);return te(i,{code:W.invalid_type,expected:re.string,received:i.parsedType}),me}const r=new Jt;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),te(s,{code:W.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),te(s,{code:W.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?te(s,{code:W.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&te(s,{code:W.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")N6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"email",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")hm||(hm=new RegExp(O6,"u")),hm.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"emoji",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")P6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"uuid",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")A6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"nanoid",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")T6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"cuid",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")k6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"cuid2",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")j6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"ulid",code:W.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),te(s,{validation:"url",code:W.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),te(s,{validation:"regex",code:W.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),te(s,{code:W.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),te(s,{code:W.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),te(s,{code:W.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?YP(i).test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{code:W.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?M6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{code:W.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?F6(i).test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{code:W.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?R6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"duration",code:W.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?$6(t.data,i.version)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"ip",code:W.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?D6.test(t.data)||(s=this._getOrReturnCtx(t,s),te(s,{validation:"base64",code:W.invalid_string,message:i.message}),r.dirty()):De.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:W.invalid_string,...le.errToObj(r)})}_addCheck(t){return new wr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.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,...le.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,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new wr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wr({...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}}wr.create=e=>{var t;return new wr({checks:[],typeName:pe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};function V6(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 _i extends je{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)!==re.number){const i=this._getOrReturnCtx(t);return te(i,{code:W.invalid_type,expected:re.number,received:i.parsedType}),me}let r;const s=new Jt;for(const i of this._def.checks)i.kind==="int"?De.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:W.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),te(r,{code:W.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),te(r,{code:W.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?V6(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),te(r,{code:W.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),te(r,{code:W.not_finite,message:i.message}),s.dirty()):De.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,s){return new _i({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(t){return new _i({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.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"&&De.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)}}_i.create=e=>new _i({checks:[],typeName:pe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class Ei extends je{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)!==re.bigint){const i=this._getOrReturnCtx(t);return te(i,{code:W.invalid_type,expected:re.bigint,received:i.parsedType}),me}let r;const s=new Jt;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),te(r,{code:W.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),te(r,{code:W.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),te(r,{code:W.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):De.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,s){return new Ei({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(s)}]})}_addCheck(t){return new Ei({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.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}}Ei.create=e=>{var t;return new Ei({checks:[],typeName:pe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ee(e)})};class tu extends je{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==re.boolean){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.boolean,received:r.parsedType}),me}return dn(t.data)}}tu.create=e=>new tu({typeName:pe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ee(e)});class bo extends je{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==re.date){const i=this._getOrReturnCtx(t);return te(i,{code:W.invalid_type,expected:re.date,received:i.parsedType}),me}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return te(i,{code:W.invalid_date}),me}const r=new Jt;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),te(s,{code:W.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),te(s,{code:W.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):De.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new bo({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.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}}bo.create=e=>new bo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:pe.ZodDate,...Ee(e)});class qh extends je{_parse(t){if(this._getType(t)!==re.symbol){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.symbol,received:r.parsedType}),me}return dn(t.data)}}qh.create=e=>new qh({typeName:pe.ZodSymbol,...Ee(e)});class nu extends je{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.undefined,received:r.parsedType}),me}return dn(t.data)}}nu.create=e=>new nu({typeName:pe.ZodUndefined,...Ee(e)});class ru extends je{_parse(t){if(this._getType(t)!==re.null){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.null,received:r.parsedType}),me}return dn(t.data)}}ru.create=e=>new ru({typeName:pe.ZodNull,...Ee(e)});class Xa extends je{constructor(){super(...arguments),this._any=!0}_parse(t){return dn(t.data)}}Xa.create=e=>new Xa({typeName:pe.ZodAny,...Ee(e)});class uo extends je{constructor(){super(...arguments),this._unknown=!0}_parse(t){return dn(t.data)}}uo.create=e=>new uo({typeName:pe.ZodUnknown,...Ee(e)});class Cs extends je{_parse(t){const n=this._getOrReturnCtx(t);return te(n,{code:W.invalid_type,expected:re.never,received:n.parsedType}),me}}Cs.create=e=>new Cs({typeName:pe.ZodNever,...Ee(e)});class Yh extends je{_parse(t){if(this._getType(t)!==re.undefined){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.void,received:r.parsedType}),me}return dn(t.data)}}Yh.create=e=>new Yh({typeName:pe.ZodVoid,...Ee(e)});class _r extends je{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==re.array)return te(n,{code:W.invalid_type,expected:re.array,received:n.parsedType}),me;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(te(n,{code:o?W.too_big:W.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&&(te(n,{code:W.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&&(te(n,{code:W.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 Qr(n,o,n.path,a)))).then(o=>Jt.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new Qr(n,o,n.path,a)));return Jt.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new _r({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new _r({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new _r({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}_r.create=(e,t)=>new _r({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pe.ZodArray,...Ee(t)});function Uo(e){if(e instanceof dt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=qr.create(Uo(r))}return new dt({...e._def,shape:()=>t})}else return e instanceof _r?new _r({...e._def,type:Uo(e.element)}):e instanceof qr?qr.create(Uo(e.unwrap())):e instanceof Ti?Ti.create(Uo(e.unwrap())):e instanceof Xr?Xr.create(e.items.map(t=>Uo(t))):e}class dt extends je{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=De.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==re.object){const u=this._getOrReturnCtx(t);return te(u,{code:W.invalid_type,expected:re.object,received:u.parsedType}),me}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Cs&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const d=i[u],h=s.data[u];l.push({key:{status:"valid",value:u},value:d._parse(new Qr(s,h,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Cs){const u=this._def.unknownKeys;if(u==="passthrough")for(const d of a)l.push({key:{status:"valid",value:d},value:{status:"valid",value:s.data[d]}});else if(u==="strict")a.length>0&&(te(s,{code:W.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const d of a){const h=s.data[d];l.push({key:{status:"valid",value:d},value:u._parse(new Qr(s,h,s.path,d)),alwaysSet:d in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const d of l){const h=await d.key,f=await d.value;u.push({key:h,value:f,alwaysSet:d.alwaysSet})}return u}).then(u=>Jt.mergeObjectSync(r,u)):Jt.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new dt({...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=le.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new dt({...this._def,unknownKeys:"strip"})}passthrough(){return new dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:pe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new dt({...this._def,catchall:t})}pick(t){const n={};return De.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new dt({...this._def,shape:()=>n})}omit(t){const n={};return De.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new dt({...this._def,shape:()=>n})}deepPartial(){return Uo(this)}partial(t){const n={};return De.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new dt({...this._def,shape:()=>n})}required(t){const n={};return De.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof qr;)i=i._def.innerType;n[r]=i}}),new dt({...this._def,shape:()=>n})}keyof(){return ZP(De.objectKeys(this.shape))}}dt.create=(e,t)=>new dt({shape:()=>e,unknownKeys:"strip",catchall:Cs.create(),typeName:pe.ZodObject,...Ee(t)});dt.strictCreate=(e,t)=>new dt({shape:()=>e,unknownKeys:"strict",catchall:Cs.create(),typeName:pe.ZodObject,...Ee(t)});dt.lazycreate=(e,t)=>new dt({shape:e,unknownKeys:"strip",catchall:Cs.create(),typeName:pe.ZodObject,...Ee(t)});class su extends je{_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 Vn(a.ctx.common.issues));return te(n,{code:W.invalid_union,unionErrors:o}),me}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 u={...n,common:{...n.common,issues:[]},parent:null},d=l._parseSync({data:n.data,path:n.path,parent:u});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Vn(l));return te(n,{code:W.invalid_union,unionErrors:a}),me}}get options(){return this._def.options}}su.create=(e,t)=>new su({options:e,typeName:pe.ZodUnion,...Ee(t)});const as=e=>e instanceof au?as(e.schema):e instanceof jr?as(e.innerType()):e instanceof lu?[e.value]:e instanceof Ci?e.options:e instanceof cu?De.objectValues(e.enum):e instanceof uu?as(e._def.innerType):e instanceof nu?[void 0]:e instanceof ru?[null]:e instanceof qr?[void 0,...as(e.unwrap())]:e instanceof Ti?[null,...as(e.unwrap())]:e instanceof U0||e instanceof hu?as(e.unwrap()):e instanceof du?as(e._def.innerType):[];class Kf extends je{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.object)return te(n,{code:W.invalid_type,expected:re.object,received:n.parsedType}),me;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}):(te(n,{code:W.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),me)}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=as(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 Kf({typeName:pe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ee(r)})}}function yv(e,t){const n=Gs(e),r=Gs(t);if(e===t)return{valid:!0,data:e};if(n===re.object&&r===re.object){const s=De.objectKeys(t),i=De.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=yv(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===re.array&&r===re.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=yv(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===re.date&&r===re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class iu extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(gv(i)||gv(o))return me;const a=yv(i.value,o.value);return a.valid?((vv(i)||vv(o))&&n.dirty(),{status:n.value,value:a.data}):(te(r,{code:W.invalid_intersection_types}),me)};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}))}}iu.create=(e,t,n)=>new iu({left:e,right:t,typeName:pe.ZodIntersection,...Ee(n)});class Xr extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.array)return te(r,{code:W.invalid_type,expected:re.array,received:r.parsedType}),me;if(r.data.length<this._def.items.length)return te(r,{code:W.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),me;!this._def.rest&&r.data.length>this._def.items.length&&(te(r,{code:W.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 Qr(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Jt.mergeArray(n,o)):Jt.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Xr({...this._def,rest:t})}}Xr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xr({items:e,typeName:pe.ZodTuple,rest:null,...Ee(t)})};class ou extends je{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!==re.object)return te(r,{code:W.invalid_type,expected:re.object,received:r.parsedType}),me;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new Qr(r,a,r.path,a)),value:o._parse(new Qr(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Jt.mergeObjectAsync(n,s):Jt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof je?new ou({keyType:t,valueType:n,typeName:pe.ZodRecord,...Ee(r)}):new ou({keyType:wr.create(),valueType:t,typeName:pe.ZodRecord,...Ee(n)})}}class Zh extends je{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!==re.map)return te(r,{code:W.invalid_type,expected:re.map,received:r.parsedType}),me;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new Qr(r,a,r.path,[u,"key"])),value:i._parse(new Qr(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,d=await l.value;if(u.status==="aborted"||d.status==="aborted")return me;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,d=l.value;if(u.status==="aborted"||d.status==="aborted")return me;(u.status==="dirty"||d.status==="dirty")&&n.dirty(),a.set(u.value,d.value)}return{status:n.value,value:a}}}}Zh.create=(e,t,n)=>new Zh({valueType:t,keyType:e,typeName:pe.ZodMap,...Ee(n)});class So extends je{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==re.set)return te(r,{code:W.invalid_type,expected:re.set,received:r.parsedType}),me;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(te(r,{code:W.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&&(te(r,{code:W.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 u=new Set;for(const d of l){if(d.status==="aborted")return me;d.status==="dirty"&&n.dirty(),u.add(d.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new Qr(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new So({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new So({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}So.create=(e,t)=>new So({valueType:e,minSize:null,maxSize:null,typeName:pe.ZodSet,...Ee(t)});class Sa extends je{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.function)return te(n,{code:W.invalid_type,expected:re.function,received:n.parsedType}),me;function r(a,l){return Kh({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wh(),Qa].filter(u=>!!u),issueData:{code:W.invalid_arguments,argumentsError:l}})}function s(a,l){return Kh({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wh(),Qa].filter(u=>!!u),issueData:{code:W.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ja){const a=this;return dn(async function(...l){const u=new Vn([]),d=await a._def.args.parseAsync(l,i).catch(v=>{throw u.addIssue(r(l,v)),u}),h=await Reflect.apply(o,this,d);return await a._def.returns._def.type.parseAsync(h,i).catch(v=>{throw u.addIssue(s(h,v)),u})})}else{const a=this;return dn(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Vn([r(l,u.error)]);const d=Reflect.apply(o,this,u.data),h=a._def.returns.safeParse(d,i);if(!h.success)throw new Vn([s(d,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Sa({...this._def,args:Xr.create(t).rest(uo.create())})}returns(t){return new Sa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Sa({args:t||Xr.create([]).rest(uo.create()),returns:n||uo.create(),typeName:pe.ZodFunction,...Ee(r)})}}class au extends je{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})}}au.create=(e,t)=>new au({getter:e,typeName:pe.ZodLazy,...Ee(t)});class lu extends je{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return te(n,{received:n.data,code:W.invalid_literal,expected:this._def.value}),me}return{status:"valid",value:t.data}}get value(){return this._def.value}}lu.create=(e,t)=>new lu({value:e,typeName:pe.ZodLiteral,...Ee(t)});function ZP(e,t){return new Ci({values:e,typeName:pe.ZodEnum,...Ee(t)})}class Ci extends je{constructor(){super(...arguments),Xl.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{expected:De.joinValues(r),received:n.parsedType,code:W.invalid_type}),me}if(Gh(this,Xl)||KP(this,Xl,new Set(this._def.values)),!Gh(this,Xl).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return te(n,{received:n.data,code:W.invalid_enum_value,options:r}),me}return dn(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 Ci.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ci.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Xl=new WeakMap;Ci.create=ZP;class cu extends je{constructor(){super(...arguments),Jl.set(this,void 0)}_parse(t){const n=De.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==re.string&&r.parsedType!==re.number){const s=De.objectValues(n);return te(r,{expected:De.joinValues(s),received:r.parsedType,code:W.invalid_type}),me}if(Gh(this,Jl)||KP(this,Jl,new Set(De.getValidEnumValues(this._def.values))),!Gh(this,Jl).has(t.data)){const s=De.objectValues(n);return te(r,{received:r.data,code:W.invalid_enum_value,options:s}),me}return dn(t.data)}get enum(){return this._def.values}}Jl=new WeakMap;cu.create=(e,t)=>new cu({values:e,typeName:pe.ZodNativeEnum,...Ee(t)});class Ja extends je{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==re.promise&&n.common.async===!1)return te(n,{code:W.invalid_type,expected:re.promise,received:n.parsedType}),me;const r=n.parsedType===re.promise?n.data:Promise.resolve(n.data);return dn(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ja.create=(e,t)=>new Ja({type:e,typeName:pe.ZodPromise,...Ee(t)});class jr extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pe.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=>{te(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 me;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?me:l.status==="dirty"||n.value==="dirty"?ia(l.value):l});{if(n.value==="aborted")return me;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?me:a.status==="dirty"||n.value==="dirty"?ia(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"?me:(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"?me:(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(!Jc(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=>Jc(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);De.assertNever(s)}}jr.create=(e,t,n)=>new jr({schema:e,typeName:pe.ZodEffects,effect:t,...Ee(n)});jr.createWithPreprocess=(e,t,n)=>new jr({schema:t,effect:{type:"preprocess",transform:e},typeName:pe.ZodEffects,...Ee(n)});class qr extends je{_parse(t){return this._getType(t)===re.undefined?dn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qr.create=(e,t)=>new qr({innerType:e,typeName:pe.ZodOptional,...Ee(t)});class Ti extends je{_parse(t){return this._getType(t)===re.null?dn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ti.create=(e,t)=>new Ti({innerType:e,typeName:pe.ZodNullable,...Ee(t)});class uu extends je{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}uu.create=(e,t)=>new uu({innerType:e,typeName:pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ee(t)});class du extends je{_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 eu(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}du.create=(e,t)=>new du({innerType:e,typeName:pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ee(t)});class Qh extends je{_parse(t){if(this._getType(t)!==re.nan){const r=this._getOrReturnCtx(t);return te(r,{code:W.invalid_type,expected:re.nan,received:r.parsedType}),me}return{status:"valid",value:t.data}}}Qh.create=e=>new Qh({typeName:pe.ZodNaN,...Ee(e)});const U6=Symbol("zod_brand");class U0 extends je{_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 Fu extends je{_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"?me:i.status==="dirty"?(n.dirty(),ia(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"?me: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 Fu({in:t,out:n,typeName:pe.ZodPipeline})}}class hu extends je{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Jc(s)&&(s.value=Object.freeze(s.value)),s);return eu(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}hu.create=(e,t)=>new hu({innerType:e,typeName:pe.ZodReadonly,...Ee(t)});function QP(e,t={},n){return e?Xa.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):Xa.create()}const B6={object:dt.lazycreate};var pe;(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"})(pe||(pe={}));const z6=(e,t={message:`Input not instance of ${e.name}`})=>QP(n=>n instanceof e,t),XP=wr.create,JP=_i.create,H6=Qh.create,W6=Ei.create,eA=tu.create,K6=bo.create,G6=qh.create,q6=nu.create,Y6=ru.create,Z6=Xa.create,Q6=uo.create,X6=Cs.create,J6=Yh.create,eH=_r.create,tH=dt.create,nH=dt.strictCreate,rH=su.create,sH=Kf.create,iH=iu.create,oH=Xr.create,aH=ou.create,lH=Zh.create,cH=So.create,uH=Sa.create,dH=au.create,hH=lu.create,fH=Ci.create,pH=cu.create,mH=Ja.create,o_=jr.create,gH=qr.create,vH=Ti.create,yH=jr.createWithPreprocess,xH=Fu.create,wH=()=>XP().optional(),bH=()=>JP().optional(),SH=()=>eA().optional(),_H={string:e=>wr.create({...e,coerce:!0}),number:e=>_i.create({...e,coerce:!0}),boolean:e=>tu.create({...e,coerce:!0}),bigint:e=>Ei.create({...e,coerce:!0}),date:e=>bo.create({...e,coerce:!0})},EH=me;var kt=Object.freeze({__proto__:null,defaultErrorMap:Qa,setErrorMap:E6,getErrorMap:Wh,makeIssue:Kh,EMPTY_PATH:C6,addIssueToContext:te,ParseStatus:Jt,INVALID:me,DIRTY:ia,OK:dn,isAborted:gv,isDirty:vv,isValid:Jc,isAsync:eu,get util(){return De},get objectUtil(){return mv},ZodParsedType:re,getParsedType:Gs,ZodType:je,datetimeRegex:YP,ZodString:wr,ZodNumber:_i,ZodBigInt:Ei,ZodBoolean:tu,ZodDate:bo,ZodSymbol:qh,ZodUndefined:nu,ZodNull:ru,ZodAny:Xa,ZodUnknown:uo,ZodNever:Cs,ZodVoid:Yh,ZodArray:_r,ZodObject:dt,ZodUnion:su,ZodDiscriminatedUnion:Kf,ZodIntersection:iu,ZodTuple:Xr,ZodRecord:ou,ZodMap:Zh,ZodSet:So,ZodFunction:Sa,ZodLazy:au,ZodLiteral:lu,ZodEnum:Ci,ZodNativeEnum:cu,ZodPromise:Ja,ZodEffects:jr,ZodTransformer:jr,ZodOptional:qr,ZodNullable:Ti,ZodDefault:uu,ZodCatch:du,ZodNaN:Qh,BRAND:U6,ZodBranded:U0,ZodPipeline:Fu,ZodReadonly:hu,custom:QP,Schema:je,ZodSchema:je,late:B6,get ZodFirstPartyTypeKind(){return pe},coerce:_H,any:Z6,array:eH,bigint:W6,boolean:eA,date:K6,discriminatedUnion:sH,effect:o_,enum:fH,function:uH,instanceof:z6,intersection:iH,lazy:dH,literal:hH,map:lH,nan:H6,nativeEnum:pH,never:X6,null:Y6,nullable:vH,number:JP,object:tH,oboolean:S
vendor: 4,211 bytes, line 212
212H,onumber:bH,optional:gH,ostring:wH,pipeline:xH,preprocess:yH,promise:mH,record:aH,set:cH,strictObject:nH,string:XP,symbol:G6,transformer:o_,tuple:oH,undefined:q6,union:rH,unknown:Q6,void:J6,NEVER:EH,ZodIssueCode:W,quotelessJson:_6,ZodError:Vn});const CH=kt.object({title:kt.string().min(1,"Title is required"),album_title:kt.string().min(1,"Album title is required"),release_date:kt.string().min(1,"Release date is required"),type:kt.string().min(1,"Type is required"),spotify_url:kt.string().optional().nullable(),apple_music_url:kt.string().optional().nullable(),label:kt.string().optional().nullable(),recording_studio:kt.string().optional().nullable(),mood:kt.array(kt.string()).optional().nullable(),artists:kt.array(kt.string()).min(1,"At least one artist is required"),producers:kt.array(kt.string()).optional(),lyricists:kt.array(kt.string()).optional(),composers:kt.array(kt.string()).optional()});function xv(e,[t,n]){return Math.min(n,Math.max(t,e))}function TH(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 kH=[" ","Enter","ArrowUp","ArrowDown"],jH=[" ","Enter"],$u="Select",[Gf,qf,PH]=xy($u),[bl,wW]=sl($u,[PH,Ef]),Yf=Ef(),[AH,Oi]=bl($u),[RH,NH]=bl($u),tA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:s,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:u,name:d,autoComplete:h,disabled:f,required:v,form:g}=e,m=Yf(t),[w,y]=p.useState(null),[x,b]=p.useState(null),[S,_]=p.useState(!1),j=Uf(u),[T=!1,k]=za({prop:r,defaultProp:s,onChange:i}),[E,N]=za({prop:o,defaultProp:a,onChange:l}),U=p.useRef(null),O=w?g||!!w.closest("form"):!0,[z,D]=p.useState(new Set),q=Array.from(z).map(F=>F.props.value).join(";");return c.jsx(oD,{...m,children:c.jsxs(AH,{required:v,scope:t,trigger:w,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:_,contentId:hi(),value:E,onValueChange:N,open:T,onOpenChange:k,dir:j,triggerPointerDownPosRef:U,disabled:f,children:[c.jsx(Gf.Provider,{scope:t,children:c.jsx(RH,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(F=>{D(K=>new Set(K).add(F))},[]),onNativeOptionRemove:p.useCallback(F=>{D(K=>{const R=new Set(K);return R.delete(F),R})},[]),children:n})}),O?c.jsxs(TA,{"aria-hidden":!0,required:v,tabIndex:-1,name:d,autoComplete:h,value:E,onChange:F=>N(F.target.value),disabled:f,form:g,children:[E===void 0?c.jsx("option",{value:""}):null,Array.from(z)]},q):null]})})};tA.displayName=$u;var nA="SelectTrigger",rA=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...s}=e,i=Yf(n),o=Oi(nA,n),a=o.disabled||r,l=$e(t,o.onTriggerChange),u=qf(n),d=p.useRef("touch"),[h,f,v]=kA(m=>{const w=u().filter(b=>!b.disabled),y=w.find(b=>b.value===o.value),x=jA(w,m,y);x!==void 0&&o.onValueChange(x.value)}),g=m=>{a||(o.onOpenChange(!0),v()),m&&(o.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(HC,{asChild:!0,...i,children:c.jsx(Se.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":CA(o.value)?"":void 0,...s,ref:l,onClick:ce(s.onClick,m=>{m.currentTarget.focus(),d.current!=="mouse"&&g(m)}),onPointerDown:ce(s.onPointerDown,m=>{d.current=m.pointerType;const w=m.target;w.hasPointerCapture(m.pointerId)&&w.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ce(s.onKeyDown,m=>{const w=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(w&&m.key===" ")&&kH.includes(m.key)&&(g(),m.preventDefault())})})})});rA.displayName=nA;var sA="SelectValue",iA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:o="",...a}=e,l=Oi(sA,n),{onValueNodeHasChildrenChange:u}=l,d=i!==void 0,h=$e(t,l.onValueNodeChange);return Wt(()=>{u(d)},[u,d]),c.jsx(Se.span,{...a,ref:h,style:{pointerEvents:"none"},children:CA(l.value)?c.jsx(c.Fragment,{children:o}):i})});iA.displayName=sA;var OH="SelectIcon",oA=p.forwardRef((e,t)=>
vendor: 15,153 bytes, line 212
212{const{__scopeSelect:n,children:r,...s}=e;return c.jsx(Se.span,{"aria-hidden":!0,...s,ref:t,children:r||"â¼"})});oA.displayName=OH;var IH="SelectPortal",aA=e=>c.jsx(yf,{asChild:!0,...e});aA.displayName=IH;var _o="SelectContent",lA=p.forwardRef((e,t)=>{const n=Oi(_o,e.__scopeSelect),[r,s]=p.useState();if(Wt(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?To.createPortal(c.jsx(cA,{scope:e.__scopeSelect,children:c.jsx(Gf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(uA,{...e,ref:t})});lA.displayName=_o;var hr=10,[cA,Ii]=bl(_o),LH="SelectContentImpl",uA=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:w,...y}=e,x=Oi(_o,n),[b,S]=p.useState(null),[_,j]=p.useState(null),T=$e(t,ne=>S(ne)),[k,E]=p.useState(null),[N,U]=p.useState(null),O=qf(n),[z,D]=p.useState(!1),q=p.useRef(!1);p.useEffect(()=>{if(b)return rP(b)},[b]),qj();const F=p.useCallback(ne=>{const[Te,...Ue]=O().map(be=>be.ref.current),[he]=Ue.slice(-1),Ne=document.activeElement;for(const be of ne)if(be===Ne||(be==null||be.scrollIntoView({block:"nearest"}),be===Te&&_&&(_.scrollTop=0),be===he&&_&&(_.scrollTop=_.scrollHeight),be==null||be.focus(),document.activeElement!==Ne))return},[O,_]),K=p.useCallback(()=>F([k,b]),[F,k,b]);p.useEffect(()=>{z&&K()},[z,K]);const{onOpenChange:R,triggerPointerDownPosRef:$}=x;p.useEffect(()=>{if(b){let ne={x:0,y:0};const Te=he=>{var Ne,be;ne={x:Math.abs(Math.round(he.pageX)-(((Ne=$.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(he.pageY)-(((be=$.current)==null?void 0:be.y)??0))}},Ue=he=>{ne.x<=10&&ne.y<=10?he.preventDefault():b.contains(he.target)||R(!1),document.removeEventListener("pointermove",Te),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",Te),document.addEventListener("pointerup",Ue,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Te),document.removeEventListener("pointerup",Ue,{capture:!0})}}},[b,R,$]),p.useEffect(()=>{const ne=()=>R(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[R]);const[J,Q]=kA(ne=>{const Te=O().filter(Ne=>!Ne.disabled),Ue=Te.find(Ne=>Ne.ref.current===document.activeElement),he=jA(Te,ne,Ue);he&&setTimeout(()=>he.ref.current.focus())}),oe=p.useCallback((ne,Te,Ue)=>{const he=!q.current&&!Ue;(x.value!==void 0&&x.value===Te||he)&&(E(ne),he&&(q.current=!0))},[x.value]),ae=p.useCallback(()=>b==null?void 0:b.focus(),[b]),Pe=p.useCallback((ne,Te,Ue)=>{const he=!q.current&&!Ue;(x.value!==void 0&&x.value===Te||he)&&U(ne)},[x.value]),st=r==="popper"?wv:dA,ve=st===wv?{side:a,sideOffset:l,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:f,collisionPadding:v,sticky:g,hideWhenDetached:m,avoidCollisions:w}:{};return c.jsx(cA,{scope:n,content:b,viewport:_,onViewportChange:j,itemRefCallback:oe,selectedItem:k,onItemLeave:ae,itemTextRefCallback:Pe,focusSelectedItem:K,selectedItemText:N,position:r,isPositioned:z,searchRef:J,children:c.jsx(R0,{as:gi,allowPinchZoom:!0,children:c.jsx(A0,{asChild:!0,trapped:x.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:ce(s,ne=>{var Te;(Te=x.trigger)==null||Te.focus({preventScroll:!0}),ne.preventDefault()}),children:c.jsx(Su,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:c.jsx(st,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:ne=>ne.preventDefault(),...y,...ve,onPlaced:()=>D(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ce(y.onKeyDown,ne=>{const Te=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!Te&&ne.key.length===1&&Q(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let he=O().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(he=he.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Ne=ne.target,be=he.indexOf(Ne);he=he.slice(be+1)}setTimeout(()=>F(he)),ne.preventDefault()}})})})})})})});uA.displayName=LH;var DH="SelectItemAlignedPosition",dA=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...s}=e,i=Oi(_o,n),o=Ii(_o,n),[a,l]=p.useState(null),[u,d]=p.useState(null),h=$e(t,T=>d(T)),f=qf(n),v=p.useRef(!1),g=p.useRef(!0),{viewport:m,selectedItem:w,selectedItemText:y,focusSelectedItem:x}=o,b=p.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&m&&w&&y){const T=i.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),E=i.valueNode.getBoundingClientRect(),N=y.getBoundingClientRect();if(i.dir!=="rtl"){const Ne=N.left-k.left,be=E.left-Ne,Ke=T.left-be,at=T.width+Ke,Hn=Math.max(at,k.width),Rt=window.innerWidth-hr,Nr=xv(be,[hr,Math.max(hr,Rt-Hn)]);a.style.minWidth=at+"px",a.style.left=Nr+"px"}else{const Ne=k.right-N.right,be=window.innerWidth-E.right-Ne,Ke=window.innerWidth-T.right-be,at=T.width+Ke,Hn=Math.max(at,k.width),Rt=window.innerWidth-hr,Nr=xv(be,[hr,Math.max(hr,Rt-Hn)]);a.style.minWidth=at+"px",a.style.right=Nr+"px"}const U=f(),O=window.innerHeight-hr*2,z=m.scrollHeight,D=window.getComputedStyle(u),q=parseInt(D.borderTopWidth,10),F=parseInt(D.paddingTop,10),K=parseInt(D.borderBottomWidth,10),R=parseInt(D.paddingBottom,10),$=q+F+z+R+K,J=Math.min(w.offsetHeight*5,$),Q=window.getComputedStyle(m),oe=parseInt(Q.paddingTop,10),ae=parseInt(Q.paddingBottom,10),Pe=T.top+T.height/2-hr,st=O-Pe,ve=w.offsetHeight/2,ne=w.offsetTop+ve,Te=q+F+ne,Ue=$-Te;if(Te<=Pe){const Ne=U.length>0&&w===U[U.length-1].ref.current;a.style.bottom="0px";const be=u.clientHeight-m.offsetTop-m.offsetHeight,Ke=Math.max(st,ve+(Ne?ae:0)+be+K),at=Te+Ke;a.style.height=at+"px"}else{const Ne=U.length>0&&w===U[0].ref.current;a.style.top="0px";const Ke=Math.max(Pe,q+m.offsetTop+(Ne?oe:0)+ve)+Ue;a.style.height=Ke+"px",m.scrollTop=Te-Pe+m.offsetTop}a.style.margin=`${hr}px 0`,a.style.minHeight=J+"px",a.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[f,i.trigger,i.valueNode,a,u,m,w,y,i.dir,r]);Wt(()=>b(),[b]);const[S,_]=p.useState();Wt(()=>{u&&_(window.getComputedStyle(u).zIndex)},[u]);const j=p.useCallback(T=>{T&&g.current===!0&&(b(),x==null||x(),g.current=!1)},[b,x]);return c.jsx(FH,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:v,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(Se.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});dA.displayName=DH;var MH="SelectPopperPosition",wv=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=hr,...i}=e,o=Yf(n);return c.jsx(WC,{...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)"}})});wv.displayName=MH;var[FH,B0]=bl(_o,{}),bv="SelectViewport",hA=p.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...s}=e,i=Ii(bv,n),o=B0(bv,n),a=$e(t,i.onViewportChange),l=p.useRef(0);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(Gf.Slot,{scope:n,children:c.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:ce(s.onScroll,u=>{const d=u.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:f}=o;if(f!=null&&f.current&&h){const v=Math.abs(l.current-d.scrollTop);if(v>0){const g=window.innerHeight-hr*2,m=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),y=Math.max(m,w);if(y<g){const x=y+v,b=Math.min(g,x),S=x-b;h.style.height=b+"px",h.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,h.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});hA.displayName=bv;var fA="SelectGroup",[$H,VH]=bl(fA),UH=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=hi();return c.jsx($H,{scope:n,id:s,children:c.jsx(Se.div,{role:"group","aria-labelledby":s,...r,ref:t})})});UH.displayName=fA;var pA="SelectLabel",mA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=VH(pA,n);return c.jsx(Se.div,{id:s.id,...r,ref:t})});mA.displayName=pA;var Xh="SelectItem",[BH,gA]=bl(Xh),vA=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...o}=e,a=Oi(Xh,n),l=Ii(Xh,n),u=a.value===r,[d,h]=p.useState(i??""),[f,v]=p.useState(!1),g=$e(t,x=>{var b;return(b=l.itemRefCallback)==null?void 0:b.call(l,x,r,s)}),m=hi(),w=p.useRef("touch"),y=()=>{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 c.jsx(BH,{scope:n,value:r,disabled:s,textId:m,isSelected:u,onItemTextChange:p.useCallback(x=>{h(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:c.jsx(Gf.ItemSlot,{scope:n,value:r,disabled:s,textValue:d,children:c.jsx(Se.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...o,ref:g,onFocus:ce(o.onFocus,()=>v(!0)),onBlur:ce(o.onBlur,()=>v(!1)),onClick:ce(o.onClick,()=>{w.current!=="mouse"&&y()}),onPointerUp:ce(o.onPointerUp,()=>{w.current==="mouse"&&y()}),onPointerDown:ce(o.onPointerDown,x=>{w.current=x.pointerType}),onPointerMove:ce(o.onPointerMove,x=>{var b;w.current=x.pointerType,s?(b=l.onItemLeave)==null||b.call(l):w.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ce(o.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=l.onItemLeave)==null||b.call(l))}),onKeyDown:ce(o.onKeyDown,x=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(jH.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});vA.displayName=Xh;var ec="SelectItemText",yA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:s,...i}=e,o=Oi(ec,n),a=Ii(ec,n),l=gA(ec,n),u=NH(ec,n),[d,h]=p.useState(null),f=$e(t,y=>h(y),l.onItemTextChange,y=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,y,l.value,l.disabled)}),v=d==null?void 0:d.textContent,g=p.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:v},l.value),[l.disabled,l.value,v]),{onNativeOptionAdd:m,onNativeOptionRemove:w}=u;return Wt(()=>(m(g),()=>w(g)),[m,w,g]),c.jsxs(c.Fragment,{children:[c.jsx(Se.span,{id:l.textId,...i,ref:f}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?To.createPortal(i.children,o.valueNode):null]})});yA.displayName=ec;var xA="SelectItemIndicator",wA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return gA(xA,n).isSelected?c.jsx(Se.span,{"aria-hidden":!0,...r,ref:t}):null});wA.displayName=xA;var Sv="SelectScrollUpButton",bA=p.forwardRef((e,t)=>{const n=Ii(Sv,e.__scopeSelect),r=B0(Sv,e.__scopeSelect),[s,i]=p.useState(!1),o=$e(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(_A,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});bA.displayName=Sv;var _v="SelectScrollDownButton",SA=p.forwardRef((e,t)=>{const n=Ii(_v,e.__scopeSelect),r=B0(_v,e.__scopeSelect),[s,i]=p.useState(!1),o=$e(t,r.onScrollButtonChange);return Wt(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;i(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),s?c.jsx(_A,{...e,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});SA.displayName=_v;var _A=p.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=e,i=Ii("SelectScrollButton",n),o=p.useRef(null),a=qf(n),l=p.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return p.useEffect(()=>()=>l(),[l]),Wt(()=>{var d;const u=a().find(h=>h.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),c.jsx(Se.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:ce(s.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ce(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ce(s.onPointerLeave,()=>{l()})})}),zH="SelectSeparator",EA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return c.jsx(Se.div,{"aria-hidden":!0,...r,ref:t})});EA.displayName=zH;var Ev="SelectArrow",HH=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,s=Yf(n),i=Oi(Ev,n),o=Ii(Ev,n);return i.open&&o.position==="popper"?c.jsx(KC,{...s,...r,ref:t}):null});HH.displayName=Ev;function CA(e){return e===""||e===void 0}var TA=p.forwardRef((e,t)=>{const{value:n,...r}=e,s=p.useRef(null),i=$e(t,s),o=TH(n);return p.useEffect(()=>{const a=s.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==n&&d){const h=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(h)}},[o,n]),c.jsx(_u,{asChild:!0,children:c.jsx("select",{...r,ref:i,defaultValue:n})})});TA.displayName="BubbleSelect";function kA(e){const t=St(e),n=p.useRef(""),r=p.useRef(0),s=p.useCallback(o=>{const a=n.current+o;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(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 jA(e,t,n){const s=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=WH(e,Math.max(i,0));s.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return l!==n?l:void 0}function WH(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var KH=tA,PA=rA,GH=iA,qH=oA,YH=aA,AA=lA,ZH=hA,RA=mA,NA=vA,QH=yA,XH=wA,OA=bA,IA=SA,LA=EA;const kd=KH,jd=GH,tc=p.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(PA,{ref:r,className:we("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
212ing-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,c.jsx(qH,{asChild:!0,children:c.jsx(mC,{className:"h-4 w-4 opacity-50"})})]}));tc.displayName=PA.displayName;const DA=p.forwardRef(({className:e,...t},n)=>c.jsx(OA,{ref:n,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(RO,{className:"h-4 w-4"})}));DA.displayName=OA.displayName;const MA=p.forwardRef(({className:e,...t},n)=>c.jsx(IA,{ref:n,className:we("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(mC,{className:"h-4 w-4"})}));MA.displayName=IA.displayName;const nc=p.forwardRef(({className:e,children:t,position:n="popper",...r},s)=>c.jsx(YH,{children:c.jsxs(AA,{ref:s,className:we("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:[c.jsx(DA,{}),c.jsx(ZH,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),c.jsx(MA,{})]})}));nc.displayName=AA.displayName;const JH=p.forwardRef(({className:e,...t},n)=>c.jsx(RA,{ref:n,className:we("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));JH.displayName=RA.displayName;const rc=p.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(NA,{ref:r,className:we("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:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(XH,{children:c.jsx(AO,{className:"h-4 w-4"})})}),c.jsx(QH,{children:t})]}));rc.displayName=NA.displayName;const e8=p.forwardRef(({className:e,...t},n)=>c.jsx(LA,{ref:n,className:we("-mx-1 my-1 h-px bg-muted",e),...t}));e8.displayName=LA.displayName;function t8(){Mu();const{data:e}=_n({queryKey:["artists"],queryFn:async()=>{const{data:s,error:i}=await de.from("artists").select("*").order("name");if(i)throw i;return s}}),{data:t}=_n({queryKey:["producers"],queryFn:async()=>{const{data:s,error:i}=await de.from("producers").select("*").order("name");if(i)throw i;return s}}),{data:n}=_n({queryKey:["lyricists"],queryFn:async()=>{const{data:s,error:i}=await de.from("lyricists").select("*").order("name");if(i)throw i;return s}}),{data:r}=_n({queryKey:["composers"],queryFn:async()=>{const{data:s,error:i}=await de.from("composers").select("*").order("name");if(i)throw i;return s}});return c.jsxs("div",{className:"space-y-4",children:[c.jsx(Gn,{name:"title",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Title"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"album_title",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Album Title"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"release_date",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Release date"}),c.jsx(Pn,{children:c.jsx(It,{type:"date",...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"type",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Type"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"artists",render:({field:s})=>{var i;return c.jsxs(kn,{children:[c.jsx(jn,{children:"Artists"}),c.jsxs(kd,{value:((i=s.value)==null?void 0:i[0])||"",onValueChange:o=>
212s.onChange([o]),children:[c.jsx(Pn,{children:c.jsx(tc,{children:c.jsx(jd,{placeholder:"Select an artist"})})}),c.jsx(nc,{children:e==null?void 0:e.map(o=>c.jsx(rc,{value:o.id,children:o.name},o.id))})]}),c.jsx(An,{})]})}}),c.jsx(Gn,{name:"producers",render:({field:s})=>{var i;return c.jsxs(kn,{children:[c.jsx(jn,{children:"Producers"}),c.jsxs(kd,{value:((i=s.value)==null?void 0:i[0])||"",onValueChange:o=>s.onChange([o]),children:[c.jsx(Pn,{children:c.jsx(tc,{children:c.jsx(jd,{placeholder:"Select a producer"})})}),c.jsx(nc,{children:t==null?void 0:t.map(o=>c.jsx(rc,{value:o.id,children:o.name},o.id))})]}),c.jsx(An,{})]})}}),c.jsx(Gn,{name:"lyricists",render:({field:s})=>{var i;return c.jsxs(kn,{children:[c.jsx(jn,{children:"Lyricists"}),c.jsxs(kd,{value:((i=s.value)==null?void 0:i[0])||"",onValueChange:o=>s.onChange([o]),children:[c.jsx(Pn,{children:c.jsx(tc,{children:c.jsx(jd,{placeholder:"Select a lyricist"})})}),c.jsx(nc,{children:n==null?void 0:n.map(o=>c.jsx(rc,{value:o.id,children:o.name},o.id))})]}),c.jsx(An,{})]})}}),c.jsx(Gn,{name:"composers",render:({field:s})=>{var i;return c.jsxs(kn,{children:[c.jsx(jn,{children:"Composers"}),c.jsxs(kd,{value:((i=s.value)==null?void 0:i[0])||"",onValueChange:o=>s.onChange([o]),children:[c.jsx(Pn,{children:c.jsx(tc,{children:c.jsx(jd,{placeholder:"Select a composer"})})}),c.jsx(nc,{children:r==null?void 0:r.map(o=>c.jsx(rc,{value:o.id,children:o.name},o.id))})]}),c.jsx(An,{})]})}}),c.jsx(Gn,{name:"spotify_url",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Spotify URL"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"apple_music_url",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Apple Music URL"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"label",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Label"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})}),c.jsx(Gn,{name:"recording_studio",render:({field:s})=>c.jsxs(kn,{children:[c.jsx(jn,{children:"Recording Studio"}),c.jsx(Pn,{children:c.jsx(It,{...s})}),c.jsx(An,{})]})})]})}const n8=(e,t)=>{const n=dT(),{toast:r}=Pr();return{handleSubmit:async i=>{try{if(e){const{error:o}=await de.from("songs").update({title:i.title,album_title:i.album_title,release_date:i.release_date,type:i.type,spotify_url:i.spotify_url,apple_music_url:i.apple_music_url,label:i.label,recording_studio:i.recording_studio,mood:i.mood}).eq("id",e.id);if(o)throw o;i.artists&&(await de.from("song_artists").delete().eq("song_id",e.id),await de.from("song_artists").insert(i.artists.map(a=>({song_id:e.id,artist_id:a})))),i.producers&&(await de.from("song_producers").delete().eq("song_id",e.id),await de.from("song_producers").insert(i.producers.map(a=>({song_id:e.id,producer_id:a})))),i.lyricists&&(await de.from("song_lyricists").delete().eq("song_id",e.id),await de.from("song_lyricists").insert(i.lyricists.map(a=>({song_id:e.id,lyricist_id:a})))),i.composers&&(await de.from("song_composers").delete().eq("song_id",e.id),await de.from("song_composers").insert(i.composers.map(a=>({song_id:e.id,composer_id:a})))),r({title:"Song updated successfully"})}else{const{data:o,error:a}=await de.from("songs").insert({title:i.title,album_title:i.album_title,release_date:i.release_date,type:i.type,spotify_url:i.spotify_url,apple_music_url:i.apple_music_url,label:i.label,recording_studio:i.recording_studio,mood:i.mood}).select().single();if(a)throw a;i.artists&&await de.from("song_artists").insert(i.artists.map(l=>({song_id:o.id,artist_id:l}))),i.producers&&await de.from("song_producers").insert(i.producers.map(l=>({song_id:o.id,producer_id:l}))),i.lyricists&&await de.from("song_lyricists").insert(i.lyricists.map(l=>({song_id:o.id,lyricist_id:l}))),i.composers&&await de.from("song_composers").insert(i.composers.map(l=>({song_id:o.id,composer_id:l}))),r({title:"Song added successfully"})}n.invalidateQueries({queryKey:["admin-songs"]}),t==null||t()}catch(o){r({variant:"destructive",title:e?"Error updating song":"Error adding song",description:o.message})}}}};function r8(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var z0="ScrollArea",[FA,bW]=sl(z0),[s8,ir]=FA(z0),$A=p.forwardRef((e,t)=>
vendor: 1,263 bytes, lines 212-218
212{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...o}=e,[a,l]=p.useState(null),[u,d]=p.useState(null),[h,f]=p.useState(null),[v,g]=p.useState(null),[m,w]=p.useState(null),[y,x]=p.useState(0),[b,S]=p.useState(0),[_,j]=p.useState(!1),[T,k]=p.useState(!1),E=$e(t,U=>l(U)),N=Uf(s);return c.jsx(s8,{scope:n,type:r,dir:N,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:_,onScrollbarXEnabledChange:j,scrollbarY:m,onScrollbarYChange:w,scrollbarYEnabled:T,onScrollbarYEnabledChange:k,onCornerWidthChange:x,onCornerHeightChange:S,children:c.jsx(Se.div,{dir:N,...o,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});$A.displayName=z0;var VA="ScrollAreaViewport",UA=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,asChild:s,nonce:i,...o}=e,a=ir(VA,n),l=p.useRef(null),u=$e(t,l,a.onViewportChange);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:` 213[data-radix-scroll-area-viewport] { 214 scrollbar-width: none; 215 -ms-overflow-style: none; 216 -webkit-overflow-scrolling: touch; 217} 218[data-radix-scroll-area-viewport]::-webkit-scrollbar {
219 display: none; 220} 221:where([data-radix-scroll-area-viewport]) { 222 display: flex; 223 flex-direction: column; 224 align-items: stretch; 225} 226:where([data-radix-scroll-area-content]) { 227 flex-grow: 1; 228} 229`},nonce:i}),c.jsx(Se.div,{"data-radix-scroll-area-viewport":"",...o,asChild:s,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p8({asChild:s,children:r},d=>c.jsx("div",{"data-radix-scroll-area-content":"",ref:a.onContentChange,style:{minWidth:a.scrollbarXEnabled?"fit-content":void 0},children:d}))})]})});UA.displayName=VA;var ts="ScrollAreaScrollbar",H0=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=ir(ts,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=s,a=e.orientation==="horizontal";return p.useEffect(()=>(a?i(!0):o(!0),()=>{a?i(!1):o(!1)}),[a,i,o]),s.type==="hover"?c.jsx(i8,{...r,ref:t,forceMount:n}):s.type==="scroll"?c.jsx(o8,{...r,ref:t,forceMount:n}):s.type==="auto"?c.jsx(BA,{...r,ref:t,forceMount:n}):s.type==="always"?c.jsx(W0,{...r,ref:t}):null});H0.displayName=ts;var i8=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=ir(ts,e.__scopeScrollArea),[i,o]=p.useState(!1);return p.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),o(!0)},d=()=>{l=window.setTimeout(()=>o(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",d)}}},[s.scrollArea,s.scrollHideDelay]),c.jsx(Ar,{present:n||i,children:c.jsx(BA,{"data-state":i?"visible":"hidden",...r,ref:t})})}),o8=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=ir(ts,e.__scopeScrollArea),i=e.orientation==="horizontal",o=Qf(()=>l("SCROLL_END"),100),[a,l]=r8("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),p.useEffect(()=>{const u=s.viewport,d=i?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=()=>{const v=u[d];h!==v&&(l("SCROLL"),o()),h=v};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[s.viewport,i,l,o]),c.jsx(Ar,{present:n||a!=="hidden",children:c.jsx(W0,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ce(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ce(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),BA=p.forwardRef((e,t)=>{const n=ir(ts,e.__scopeScrollArea),{forceMount:r,...s}=e,[i,o]=p.useState(!1),a=e.orientation==="horizontal",l=Qf(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(a?u:d)}},10);return el(n.viewport,l),el(n.content,l),c.jsx(Ar,{present:r||i,children:c.jsx(W0,{"data-state":i?"visible":"hidden",...s,ref:t})})}),W0=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,s=ir(ts,e.__scopeScrollArea),i=p.useRef(null),o=p.useRef(0),[a,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=GA(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:f=>o.current=f};function h(f,v){return h8(f,o.current,a,v)}return n==="horizontal"?c.jsx(a8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollLeft,v=a_(f,a,s.dir);i.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=h(f,s.dir))}}):n==="vertical"?c.jsx(l8,{...d,ref:t,onThumbPositionChange:()=>{if(s.viewport&&i.current){const f=s.viewport.scrollTop,v=a_(f,a);i.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=h(f))}}):null}),a8=p.forwardRef((e,t)=>
vendor: 4,325 bytes, line 229
229{const{sizes:n,onSizesChange:r,...s}=e,i=ir(ts,e.__scopeScrollArea),[o,a]=p.useState(),l=p.useRef(null),u=$e(t,l,i.onScrollbarXChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(HA,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Zf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(f),YA(f,h)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ef(o.paddingLeft),paddingEnd:ef(o.paddingRight)}})}})}),l8=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...s}=e,i=ir(ts,e.__scopeScrollArea),[o,a]=p.useState(),l=p.useRef(null),u=$e(t,l,i.onScrollbarYChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),c.jsx(HA,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Zf(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(i.viewport){const f=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(f),YA(f,h)&&d.preventDefault()}},onResize:()=>{l.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ef(o.paddingTop),paddingEnd:ef(o.paddingBottom)}})}})}),[c8,zA]=FA(ts),HA=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=e,v=ir(ts,n),[g,m]=p.useState(null),w=$e(t,E=>m(E)),y=p.useRef(null),x=p.useRef(""),b=v.viewport,S=r.content-r.viewport,_=St(d),j=St(l),T=Qf(h,10);function k(E){if(y.current){const N=E.clientX-y.current.left,U=E.clientY-y.current.top;u({x:N,y:U})}}return p.useEffect(()=>{const E=N=>{const U=N.target;(g==null?void 0:g.contains(U))&&_(N,S)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[b,g,S,_]),p.useEffect(j,[r,j]),el(g,T),el(v.content,T),c.jsx(c8,{scope:n,scrollbar:g,hasThumb:s,onThumbChange:St(i),onThumbPointerUp:St(o),onThumbPositionChange:j,onThumbPointerDown:St(a),children:c.jsx(Se.div,{...f,ref:w,style:{position:"absolute",...f.style},onPointerDown:ce(e.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),y.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),k(E))}),onPointerMove:ce(e.onPointerMove,k),onPointerUp:ce(e.onPointerUp,E=>{const N=E.target;N.hasPointerCapture(E.pointerId)&&N.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=x.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),Jh="ScrollAreaThumb",WA=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,s=zA(Jh,e.__scopeScrollArea);return c.jsx(Ar,{present:n||s.hasThumb,children:c.jsx(u8,{ref:t,...r})})}),u8=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...s}=e,i=ir(Jh,n),o=zA(Jh,n),{onThumbPositionChange:a}=o,l=$e(t,h=>o.onThumbChange(h)),u=p.useRef(),d=Qf(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const h=i.viewport;if(h){const f=()=>{if(d(),!u.current){const v=f8(h,a);u.current=v,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[i.viewport,d,a]),c.jsx(Se.div,{"data-state":o.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ce(e.onPointerDownCapture,h=>{const v=h.target.getBoundingClientRect(),g=h.clientX-v.left,m=h.clientY-v.top;o.onThumbPointerDown({x:g,y:m})}),onPointerUp:ce(e.onPointerUp,o.onThumbPointerUp)})});WA.displayName=Jh;var K0="ScrollAreaCorner",KA=p.forwardRef((e,t)=>
229{const n=ir(K0,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(d8,{...e,ref:t}):null});KA.displayName=K0;var d8=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,s=ir(K0,n),[i,o]=p.useState(0),[a,l]=p.useState(0),u=!!(i&&a);return el(s.scrollbarX,()=>{var h;const d=((h=s.scrollbarX)==null?void 0:h.offsetHeight)||0;s.onCornerHeightChange(d),l(d)}),el(s.scrollbarY,()=>{var h;const d=((h=s.scrollbarY)==null?void 0:h.offsetWidth)||0;s.onCornerWidthChange(d),o(d)}),u?c.jsx(Se.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ef(e){return e?parseInt(e,10):0}function GA(e,t){const n=e/t;return isNaN(n)?0:n}function Zf(e){const t=GA(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function h8(e,t,n,r="ltr"){const s=Zf(n),i=s/2,o=t||i,a=s-o,l=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return qA([l,u],h)(e)}function a_(e,t,n="ltr"){const r=Zf(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-s,o=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,o]:[o*-1,0],u=xv(e,l);return qA([0,o],[0,a])(u)}function qA(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function YA(e,t){return e>0&&e<t}var f8=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function s(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,a=n.top!==i.top;(o||a)&&t(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function Qf(e,t){const n=St(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function el(e,t){const n=St(t);Wt(()=>{let r=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(r),s.unobserve(e)}}},[e,n])}function p8(e,t){const{asChild:n,children:r}=e;if(!n)return typeof t=="function"?t(r):t;const s=p.Children.only(r);return p.cloneElement(s,{children:typeof t=="function"?t(s.props.children):t})}var ZA=$A,m8=UA,g8=KA;const QA=p.forwardRef(({className:e,children:t,...n},r)=>c.jsxs(ZA,{ref:r,className:we("relative overflow-hidden",e),...n,children:[c.jsx(m8,{className:"h-full w-full rounded-[inherit]",children:t}),c.jsx(XA,{}),c.jsx(g8,{})]}));QA.displayName=ZA.displayName;const XA=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>c.jsx(H0,{ref:r,orientation:t,className:we("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:c.jsx(WA,{className:"relative flex-1 rounded-full bg-border"})}));XA.displayName=H0.displayName;function v8({isOpen:e,onClose:t,song:n}){const{handleSubmit:r}=n8(n,t),{data:s}=_n({queryKey:["song-artists",n==null?void 0:n.id],queryFn:async()=>{if(!(n!=null&&n.id))return[];const{data:l,error:u}=await de.from("song_artists").select("artist_id").eq("song_id",n.id);if(u)throw u;return l.map(d=>d.artist_id)},enabled:!!(n!=null&&n.id)}),{data:i}=_n({queryKey:["song-producers",n==null?void 0:n.id],queryFn:async()=>{if(!(n!=null&&n.id))return[];const{data:l,error:u}=await de.from("song_producers").select("producer_id").eq("song_id",n.id);if(u)throw u;return l.map(d=>d.producer_id)},enabled:!!(n!=null&&n.id)}),{data:o}=_n({queryKey:["song-lyricists",n==null?void 0:n.id],queryFn:async()=>{if(!(n!=null&&n.id))return[];const{data:l,error:u}=await de.from("song_lyricists").select("lyricist_id").eq("song_id",n.id);if(u)throw u;return l.map(d=>d.lyricist_id)},enabled:!!(n!=null&&n.id)}),{data:a}=_n({queryKey:["song-composers",n==null?void 0:n.id],queryFn:async()=>{if(!(n!=null&&n.id))return[];const{data:l,error:u}=await de.from("song_composers").select("composer_id").eq("song_id",n.id);if(u)throw u;return l.map(d=>d.composer_id)},enabled:!!(n!=null&&n.id)});
229return c.jsx(qz,{title:n?"Edit Song":"Add Song",isOpen:e,onClose:t,children:c.jsx(QA,{className:"max-h-[80vh]",children:c.jsx("div",{className:"pr-4",children:c.jsx(S6,{schema:CH,defaultValues:{title:(n==null?void 0:n.title)??"",album_title:(n==null?void 0:n.album_title)??"",release_date:(n==null?void 0:n.release_date)??"",type:(n==null?void 0:n.type)??"",spotify_url:(n==null?void 0:n.spotify_url)??"",apple_music_url:(n==null?void 0:n.apple_music_url)??"",label:(n==null?void 0:n.label)??"",recording_studio:(n==null?void 0:n.recording_studio)??"",mood:(n==null?void 0:n.mood)??[],artists:s??[],producers:i??[],lyricists:o??[],composers:a??[]},onSubmit:r,children:c.jsx(t8,{})})})})})}const y8=()=>{const{toast:e}=Pr(),[t,n]=p.useState(!1),[r,s]=p.useState(),{data:i,isLoading:o,refetch:a}=_n({queryKey:["admin-songs"],queryFn:async()=>{const{data:d,error:h}=await de.from("songs").select(` 230 *, 231 song_artists( 232 artists(name) 233 ), 234 song_composers( 235 composers(name) 236 ), 237 song_lyricists( 238 lyricists(name) 239 ), 240 song_producers( 241 producers(name) 242 ) 243 `).order("created_at",{ascending:!1});if(h)throw h;return d}}),l=async d=>{try{const{error:h}=await de.from("songs").delete().eq("id",d);if(h)throw h;e({title:"Song deleted successfully"}),a()}catch(h){e({variant:"destructive",title:"Error deleting song",description:h.message})}},u=()=>{n(!1),s(void 0)};return o?c.jsx("div",{children:"Loading..."}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-2xl font-semibold",children:"Songs Management"}),c.jsxs(Ve,{onClick:()=>n(!0),children:[c.jsx(Cu,{className:"w-4 h-4 mr-2"}),"Add Song"]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(pl,{children:[c.jsx(ml,{children:c.jsxs(kr,{children:[c.jsx(ct,{children:"Title"}),c.jsx(ct,{children:"Album"}),c.jsx(ct,{children:"Year"}),c.jsx(ct,{children:"Type"}),c.jsx(ct,{children:"Label"}),c.jsx(ct,{children:"Recording Studio"}),c.jsx(ct,{children:"Mood"}),c.jsx(ct,{children:"Artists"}),c.jsx(ct,{children:"Composers"}),c.jsx(ct,{children:"Lyricists"}),c.jsx(ct,{children:"Producers"}),c.jsx(ct,{children:"Spotify URL"}),c.jsx(ct,{children:"Apple Music URL"}),c.jsx(ct,{children:"Actions"})]})}),c.jsx(gl,{children:i==null?void 0:i.map(d=>{var h,f,v,g,m;return c.jsxs(kr,{children:[c.jsx(ut,{children:d.title}),c.jsx(ut,{children:d.album_title}),c.jsx(ut,{children:d.release_date}),c.jsx(ut,{children:d.type}),c.jsx(ut,{children:d.label}),c.jsx(ut,{children:d.recording_studio}),c.jsx(ut,{children:(h=d.mood)==null?void 0:h.join(", ")}),c.jsx(ut,{children:(f=d.song_artists)==null?void 0:f.map(w=>w.artists.name).join(", ")}),c.jsx(ut,{children:(v=d.song_composers)==null?void 0:v.map(w=>w.composers.name).join(", ")}),c.jsx(ut,{children:(g=d.song_lyricists)==null?void 0:g.map(w=>w.lyricists.name).join(", ")}),c.jsx(ut,{children:(m=d.song_producers)==null?void 0:m.map(w=>w.producers.name).join(", ")}),c.jsx(ut,{children:d.spotify_url&&c.jsx("a",{href:d.spotify_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"Link"})}),c.jsx(ut,{children:d.apple_music_url&&c.jsx("a",{href:d.apple_music_url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 hover:underline",children:"Link"})}),c.jsx(ut,{children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>{s(d),n(!0)},children:c.jsx(Eu,{className:"w-4 h-4"})}),c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>l(d.id),children:c.jsx(Tu,{className:"w-4 h-4"})})]})})]},d.id)})})]})}),c.jsx(v8,{isOpen:t,onClose:u,song:r})]})},x8=()=>{const{toast:e}=Pr(),[t,n]=p.useState(!1),[r,s]=p.useState(null),[i,o]=p.useState(""),{data:a,isLoading:l,refetch:u}=_n({queryKey:["admin-artists"],queryFn:async()=>{const{data:g,error:m}=await de.from("artists").select("*").order("created_at",{ascending:!1});if(m)throw m;return g}}),d=async g=>{g.preventDefault();try{if(r){const{error:m}=await de.from("artists").update({name:i}).eq("id",r.id);if(m)throw m;e({title:"Artist updated successfully"})}else{const{error:m}=await de.from("artists").insert([{name:i}]);if(m)throw m;e({title:"Artist added successfully"})}n(!1),s(null),o(""),u()}catch(m){e({variant:"destructive",title:`Error ${r?"updating":"adding"} artist`,description:m.message})}},h=async g=>{try{const{error:m}=await de.from("artists").delete().eq("id",g);if(m)throw m;e({title:"Artist deleted successfully"}),u()}catch(m){e({variant:"destructive",title:"Error deleting artist",description:m.message})}},f=g=>{s(g),o(g.name),n(!0)},v=()=>{n(!1),s(null),o("")};return l?c.jsx("div",{children:"Loading..."}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-2xl font-semibold",children:"Artists Management"}),c.jsxs(Ve,{onClick:()=>n(!0),children:[c.jsx(Cu,{className:"w-4 h-4 mr-2"}),"Add Artist"]})]}),c.jsx(Lu,{open:t,onOpenChange:n,children:c.jsxs(vl,{children:[c.jsx(yl,{children:c.jsxs(xl,{children:[r?"Edit":"Add"," Artist"]})}),c.jsxs("form",{onSubmit:d,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(wl,{htmlFor:"name",children:"Name"}),c.jsx(It,{id:"name",value:i,onChange:g=>o(g.target.value),placeholder:"Artist name",required:!0})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Ve,{type:"button",variant:"outline",onClick:v,children:"Cancel"}),c.jsx(Ve,{type:"submit",children:r?"Update":"Add"})]})]})]})}),c.jsxs(pl,{children:[c.jsx(ml,{children:c.jsxs(kr,{children:[c.jsx(ct,{children:"Name"}),c.jsx(ct,{children:"Actions"})]})}),c.jsx(gl,{children:a==null?void 0:a.map(g=>c.jsxs(kr,{children:[c.jsx(ut,{children:g.name}),c.jsx(ut,{children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>f(g),children:c.jsx(Eu,{className:"w-4 h-4"})}),c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>
243h(g.id),children:c.jsx(Tu,{className:"w-4 h-4"})})]})})]},g.id))})]})]})},w8=()=>{const{toast:e}=Pr(),[t,n]=p.useState(!1),[r,s]=p.useState(null),[i,o]=p.useState(""),{data:a,isLoading:l,refetch:u}=_n({queryKey:["admin-composers"],queryFn:async()=>{const{data:g,error:m}=await de.from("composers").select("*").order("created_at",{ascending:!1});if(m)throw m;return g}}),d=async g=>{g.preventDefault();try{if(r){const{error:m}=await de.from("composers").update({name:i}).eq("id",r.id);if(m)throw m;e({title:"Composer updated successfully"})}else{const{error:m}=await de.from("composers").insert([{name:i}]);if(m)throw m;e({title:"Composer added successfully"})}n(!1),s(null),o(""),u()}catch(m){e({variant:"destructive",title:`Error ${r?"updating":"adding"} composer`,description:m.message})}},h=async g=>{try{const{error:m}=await de.from("composers").delete().eq("id",g);if(m)throw m;e({title:"Composer deleted successfully"}),u()}catch(m){e({variant:"destructive",title:"Error deleting composer",description:m.message})}},f=g=>{s(g),o(g.name),n(!0)},v=()=>{n(!1),s(null),o("")};return l?c.jsx("div",{children:"Loading..."}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-2xl font-semibold",children:"Composers Management"}),c.jsxs(Ve,{onClick:()=>n(!0),children:[c.jsx(Cu,{className:"w-4 h-4 mr-2"}),"Add Composer"]})]}),c.jsx(Lu,{open:t,onOpenChange:n,children:c.jsxs(vl,{children:[c.jsx(yl,{children:c.jsxs(xl,{children:[r?"Edit":"Add"," Composer"]})}),c.jsxs("form",{onSubmit:d,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(wl,{htmlFor:"name",children:"Name"}),c.jsx(It,{id:"name",value:i,onChange:g=>o(g.target.value),placeholder:"Composer name",required:!0})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Ve,{type:"button",variant:"outline",onClick:v,children:"Cancel"}),c.jsx(Ve,{type:"submit",children:r?"Update":"Add"})]})]})]})}),c.jsxs(pl,{children:[c.jsx(ml,{children:c.jsxs(kr,{children:[c.jsx(ct,{children:"Name"}),c.jsx(ct,{children:"Actions"})]})}),c.jsx(gl,{children:a==null?void 0:a.map(g=>c.jsxs(kr,{children:[c.jsx(ut,{children:g.name}),c.jsx(ut,{children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>f(g),children:c.jsx(Eu,{className:"w-4 h-4"})}),c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>
243h(g.id),children:c.jsx(Tu,{className:"w-4 h-4"})})]})})]},g.id))})]})]})},b8=()=>{const{toast:e}=Pr(),[t,n]=p.useState(!1),[r,s]=p.useState(null),[i,o]=p.useState(""),{data:a,isLoading:l,refetch:u}=_n({queryKey:["admin-lyricists"],queryFn:async()=>{const{data:g,error:m}=await de.from("lyricists").select("*").order("created_at",{ascending:!1});if(m)throw m;return g}}),d=async g=>{g.preventDefault();try{if(r){const{error:m}=await de.from("lyricists").update({name:i}).eq("id",r.id);if(m)throw m;e({title:"Lyricist updated successfully"})}else{const{error:m}=await de.from("lyricists").insert([{name:i}]);if(m)throw m;e({title:"Lyricist added successfully"})}n(!1),s(null),o(""),u()}catch(m){e({variant:"destructive",title:`Error ${r?"updating":"adding"} lyricist`,description:m.message})}},h=async g=>{try{const{error:m}=await de.from("lyricists").delete().eq("id",g);if(m)throw m;e({title:"Lyricist deleted successfully"}),u()}catch(m){e({variant:"destructive",title:"Error deleting lyricist",description:m.message})}},f=g=>{s(g),o(g.name),n(!0)},v=()=>{n(!1),s(null),o("")};return l?c.jsx("div",{children:"Loading..."}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-2xl font-semibold",children:"Lyricists Management"}),c.jsxs(Ve,{onClick:()=>n(!0),children:[c.jsx(Cu,{className:"w-4 h-4 mr-2"}),"Add Lyricist"]})]}),c.jsx(Lu,{open:t,onOpenChange:n,children:c.jsxs(vl,{children:[c.jsx(yl,{children:c.jsxs(xl,{children:[r?"Edit":"Add"," Lyricist"]})}),c.jsxs("form",{onSubmit:d,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(wl,{htmlFor:"name",children:"Name"}),c.jsx(It,{id:"name",value:i,onChange:g=>o(g.target.value),placeholder:"Lyricist name",required:!0})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Ve,{type:"button",variant:"outline",onClick:v,children:"Cancel"}),c.jsx(Ve,{type:"submit",children:r?"Update":"Add"})]})]})]})}),c.jsxs(pl,{children:[c.jsx(ml,{children:c.jsxs(kr,{children:[c.jsx(ct,{children:"Name"}),c.jsx(ct,{children:"Actions"})]})}),c.jsx(gl,{children:a==null?void 0:a.map(g=>c.jsxs(kr,{children:[c.jsx(ut,{children:g.name}),c.jsx(ut,{children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>f(g),children:c.jsx(Eu,{className:"w-4 h-4"})}),c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>
243h(g.id),children:c.jsx(Tu,{className:"w-4 h-4"})})]})})]},g.id))})]})]})},S8=()=>{const{toast:e}=Pr(),[t,n]=p.useState(!1),[r,s]=p.useState(null),[i,o]=p.useState(""),{data:a,isLoading:l,refetch:u}=_n({queryKey:["admin-producers"],queryFn:async()=>{const{data:g,error:m}=await de.from("producers").select("*").order("created_at",{ascending:!1});if(m)throw m;return g}}),d=async g=>{g.preventDefault();try{if(r){const{error:m}=await de.from("producers").update({name:i}).eq("id",r.id);if(m)throw m;e({title:"Producer updated successfully"})}else{const{error:m}=await de.from("producers").insert([{name:i}]);if(m)throw m;e({title:"Producer added successfully"})}n(!1),s(null),o(""),u()}catch(m){e({variant:"destructive",title:`Error ${r?"updating":"adding"} producer`,description:m.message})}},h=async g=>{try{const{error:m}=await de.from("producers").delete().eq("id",g);if(m)throw m;e({title:"Producer deleted successfully"}),u()}catch(m){e({variant:"destructive",title:"Error deleting producer",description:m.message})}},f=g=>{s(g),o(g.name),n(!0)},v=()=>{n(!1),s(null),o("")};return l?c.jsx("div",{children:"Loading..."}):c.jsxs("div",{children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-2xl font-semibold",children:"Producers Management"}),c.jsxs(Ve,{onClick:()=>n(!0),children:[c.jsx(Cu,{className:"w-4 h-4 mr-2"}),"Add Producer"]})]}),c.jsx(Lu,{open:t,onOpenChange:n,children:c.jsxs(vl,{children:[c.jsx(yl,{children:c.jsxs(xl,{children:[r?"Edit":"Add"," Producer"]})}),c.jsxs("form",{onSubmit:d,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(wl,{htmlFor:"name",children:"Name"}),c.jsx(It,{id:"name",value:i,onChange:g=>o(g.target.value),placeholder:"Producer name",required:!0})]}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Ve,{type:"button",variant:"outline",onClick:v,children:"Cancel"}),c.jsx(Ve,{type:"submit",children:r?"Update":"Add"})]})]})]})}),c.jsxs(pl,{children:[c.jsx(ml,{children:c.jsxs(kr,{children:[c.jsx(ct,{children:"Name"}),c.jsx(ct,{children:"Actions"})]})}),c.jsx(gl,{children:a==null?void 0:a.map(g=>c.jsxs(kr,{children:[c.jsx(ut,{children:g.name}),c.jsx(ut,{children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>f(g),children:c.jsx(Eu,{className:"w-4 h-4"})}),c.jsx(Ve,{variant:"ghost",size:"icon",onClick:()=>
243h(g.id),children:c.jsx(Tu,{className:"w-4 h-4"})})]})})]},g.id))})]})]})},_8=()=>{const e=Ri(),{toast:t}=Pr(),{data:n,isLoading:r}=_n({queryKey:["userRole"],queryFn:async()=>{const{data:{user:s}}=await de.auth.getUser();if(!s)return null;const{data:i}=await de.from("user_roles").select("role").eq("user_id",s.id).single();return(i==null?void 0:i.role)??null}});return p.useEffect(()=>{!r&&n!=="super_admin"&&(t({variant:"destructive",title:"Access Denied",description:"You don't have permission to access this page."}),e("/"))},[n,r,e,t]),r?c.jsx("div",{className:"container mx-auto px-4 py-8 text-parchment",children:c.jsx("div",{className:"flex items-center justify-center min-h-[200px] font-mono text-xs tracking-widest uppercase text-parchment/50",children:"Loadingâ¦"})}):n!=="super_admin"?null:c.jsxs("div",{className:"container mx-auto px-4 py-8 text-parchment",children:[c.jsx("h1",{className:"text-3xl font-serif font-light mb-8",children:"Admin Dashboard"}),c.jsxs($5,{defaultValue:"songs",className:"w-full",children:[c.jsxs(Kj,{className:"mb-8",children:[c.jsx($o,{value:"songs",children:"Songs"}),c.jsx($o,{value:"artists",children:"Artists"}),c.jsx($o,{value:"composers",children:"Composers"}),c.jsx($o,{value:"lyricists",children:"Lyricists"}),c.jsx($o,{value:"producers",children:"Producers"})]}),c.jsx(Vo,{value:"songs",children:c.jsx(y8,{})}),c.jsx(Vo,{value:"artists",children:c.jsx(x8,{})}),c.jsx(Vo,{value:"composers",children:c.jsx(w8,{})}),c.jsx(Vo,{value:"lyricists",children:c.jsx(b8,{})}),c.jsx(Vo,{value:"producers",children:c.jsx(S8,{})})]})]})},l_=72,c_=!1,u_=()=>{const e=p.useRef(null),t=p.useRef(null),n=p.useRef(null),r=p.useRef(null),s=p.useRef(null),i=p.useRef(null),o=p.useRef(null),a=p.useMemo(()=>{const l=[];for(let u=0;u<l_;u++){const d=u/(l_-1),h=Math.exp(-Math.pow((d-.5)*4.2,2)),f=.18*Math.sin(d*Math.PI*8)+.12*Math.cos(d*Math.PI*14),v=Math.max(6,(h+f*h)*220);l.push({i:u,h:v})}return l},[]);return p.useEffect(()=>{const l=document.title;document.title="à¶à¶¯à·âයà·à¶±à· â Aadyaan · Harshadewa";const u=(g,m)=>{let w=document.head.querySelector(g),y=!1;return w||(w=m(),document.head.appendChild(w),y=!0),{el:w,created:y}},d=u('meta[name="description"]',()=>{const g=document.createElement("meta");return g.setAttribute("name","description"),g}),h=d.el.getAttribute("content");d.el.setAttribute("content","The Aadyaan Sessions, Vol. 01 â Harshadewa, with songs by R.A. Chandrasena and W.D. Ariyasinghe. 100 minutes, 40 seats, London.");const f=u('link[rel="canonical"]',()=>{const g=document.createElement("link");return g.setAttribute("rel","canonical"),g}),v=f.el.getAttribute("href");return f.el.setAttribute("href","https://harshadewa.com/aadyaan/sessions"),()=>{document.title=l,h!==null&&d.el.setAttribute("content",h),v!==null?f.el.setAttribute("href",v):f.created&&f.el.remove()}},[]),p.useEffect(()=>{const l=document.querySelector(".sessions-page");if(!l)return;const u=new IntersectionObserver(v=>{v.forEach(g=>{g.isIntersecting?g.target.classList.add("in"):g.boundingClientRect.top>window.innerHeight*.6&&g.target.classList.remove("in")})},{threshold:.18,rootMargin:"0px 0px -8% 0px"});l.querySelectorAll("[data-rev]").forEach(v=>u.observe(v));let d=null;const h=document.getElementById("wave"),f=o.current;return h&&f&&(d=new IntersectionObserver(v=>{v.forEach(g=>{g.isIntersecting&&f.classList.add("in")})},{threshold:.25}),d.observe(h)),()=>{u.disconnect(),d==null||d.disconnect()}},[]),p.useEffect(()=>{if(matchMedia("(prefers-reduced-motion: reduce)").matches){s.current&&(s.current.style.width="0%");return}let u=!1;const d=()=>{u=!1;const f=window.scrollY||window.pageYOffset,v=document.documentElement.scrollHeight-window.innerHeight,g=Math.max(0,Math.min(1,f/Math.max(1,v)));if(s.current&&(s.current.style.width=(g*100).toFixed(2)+"%"),e.current&&e.current.style.setProperty("--py",f*.18+"px"),t.current&&t.current.style.setProperty("--sy",f*.3+"px"),n.current){const m=n.current.getBoundingClientRect(),w=n.current.offsetHeight-window.innerHeight,x=60-Math.max(0,Math.min(1,-m.top/Math.max(1,w)))*90;r.current&&r.current.style.setProperty("--rise",x+"%")}if(i.current){const m=i.current.getBoundingClientRect(),w=Math.max(-1,Math.min(1,1-m.top/window.innerHeight));i.current.style.setProperty("--ay",w*-60+"px")}},h=()=>{u||(u=!0,requestAnimationFrame(d))};return window.addEventListener("scroll",h,{passive:!0}),window.addEventListener("resize",h,{passive:!0}),d(),()=>{window.removeEventListener("scroll",h),window.removeEventListener("resize",h)}},[]),c.jsxs("div",{className:"sessions-page",children:[c.jsx("div",{className:"progress",id:"progress",ref:s}),c.jsxs("nav",{className:"nav","aria-label":"primary",children:[c.jsxs(bn,{to:"/",className:"nav-mark","aria-label":"Back to harshadewa.com",children:[c.jsx("span",{className:"dot"}),c.jsx("span",{children:"Aadyaan · Vol 01"})]}),c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx("a",{href:"#etymology",children:"Word"})}),c.jsx("li",{children:c.jsx("a",{href:"#horizon",children:"Inheritance"})}),c.jsx("li",{children:c.jsx("a",{href:"#sessions",children:"Sessions"})}),c_,c.jsx("li",{children:c.jsx("a",{href:"#almanac",children:"Almanac"})})]}),c.jsx("a",{href:"#almanac",children:"Reserve â"})]}),c.jsxs("section",{className:"hero",id:"top",children:[c.jsx("div",{className:"hero-photo",id:"heroPhoto",ref:e}),c.jsx("div",{className:"hero-vignette"}),c.jsx("div",{className:"hero-sun",id:"heroSun","aria-hidden":"true",ref:t}),c.jsxs("div",{className:"hero-top",children:[c.jsxs("div",{children:[c.jsx("div",{className:"mono",children:"à·à¶»à·à·à¶¯à·à·Â · Harshadewa"}),c.jsx("div",{className:"mono",style:{marginTop:8,opacity:.6},children:"London"})]}),c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{className:"mono",children:"Vol. 01"}),c.jsx("div",{className:"mono",style:{marginTop:8,opacity:.6},children:"The Son · The Songs · The Room"})]})]}),c.jsx("div",{className:"hero-sinhala","aria-hidden":"true",children:"à¶à¶¯à·âයà·à¶±à·"}),c.jsxs("div",{className:"hero-foot",children:[c.jsxs("h1",{children:["The first rays,",c.jsx("br",{}),c.jsx("em",{children:"arriving."})]}),c.jsxs("div",{className:"meta",children:[c.jsx("hr",{}),"Three generations in one small room. The songs my grandfather R.A. Chandrasena composed, the ones my father W.D. Ariyasinghe made famous, and the ones Iâve since made my own â performed live. 100 minutes. 40 seats. London."]})]}),c.jsxs("div",{className:"scroll-hint",children:[c.jsx("div",{className:"mono",style:{fontSize:10},children:"scroll · the day begins"}),c.jsx("div",{className:"line"})]})]}),c.jsxs("section",{className:"etym",id:"etymology","aria-label":"Etymology",children:[c.jsxs("div",{className:"etym-head",children:[c.jsx("div",{className:"mono",children:"II · Etymology"}),c.jsx("div",{className:"title",children:"a word, from one root"}),c.jsx("div",{className:"mono",children:"Fig. 02"})]}),c.jsxs("div",{className:"etym-single reveal","data-rev":!0,children:[c.jsx("div",{className:"etym-glyph",children:"à¶à¶¯à·âයà·à¶±à·"}),c.jsxs("div",{className:"etym-body",children:[c.jsx("div",{className:"mono etym-root",children:"Sanskrit · à¤à¤¦à¥à¤¯Â (Ädya)"}),c.jsx("div",{className:"etym-en",children:"First. Primordial. The beginning."}),c.jsx("div",{className:"etym-bar"}),c.jsx("div",{className:"etym-gloss",children:"The first â that which comes before everything else."}),c.jsx("div",{className:"etym-sub",children:"It is also my sonâs middle name."})]})]}),c.jsx("div",{className:"etym-coda reveal d3","data-rev":!0,children:"Before there was sound, there was light. Before light, the willingness to begin."})]}),c.jsx("section",{className:"horizon",id:"horizon","aria-label":"Inheritance",ref:n,children:c.jsxs("div",{className:"horizon-sticky",id:"horizonSticky",children:[c.jsxs("div",{className:"horizon-top",children:[c.jsx("div",{className:"horizon-content",children:c.jsxs("div",{children:[c.jsx("div",{className:"lbl",children:"Colombo · my grandfather"}),c.jsxs("h2",{children:["His songs, ",c.jsx("em",{children:"composed."})]}),c.jsx("div",{className:"by",children:"â R.A. Chandrasena"})]})}),c.jsx("div",{className:"horizon-sun-rise",id:"horizonSun",ref:r})]}),c.jsx("div",{className:"horizon-line"}),c.jsx("div",{className:"horizon-tag",children:"W.D. Ariyasinghe · His voice, his own songs · 1956â2020"}),c.jsx("div",{className:"horizon-bottom",children:c.jsxs("div",{className:"horizon-content bottom",children:[c.jsxs("div",{style:{textAlign:"right"},children:[c.jsx("div",{className:"lbl",children:"London · the grandson, the son"}),c.jsxs("h2",{children:["The songs, and the voice, ",c.jsx("em",{children:"carried forward."})]}),c.jsx("div",{className:"by",children:"â Harshadewa: one gave me the songs, the other gave me the voice."})]}),c.jsx("div",{className:"horizon-medal",children:c.jsx("img",{src:"/sessions/hero.jpg",alt:""})})]})})]})}),c.jsxs("section",{className:"wave",id:"wave","aria-label":"Waveform",children:[c.jsxs("div",{className:"wave-head",children:[c.jsx("div",{className:"mono",children:"IV · Waveform"}),c.jsx("div",{className:"mono",children:"Fig. 04 â a sunrise in amplitude"})]}
243),c.jsx("div",{className:"wave-sun reveal","data-rev":!0}),c.jsx("div",{className:"wave-tag reveal d2","data-rev":!0,children:"â  the first note"}),c.jsx("div",{className:"wave-row",id:"waveRow",ref:o,children:a.map(l=>c.jsx("div",{className:"wave-bar",style:{"--i":l.i,"--h":`${l.h}px`}},l.i))}),c.jsxs("div",{className:"wave-line reveal d2","data-rev":!0,children:["Where silence breaks, ",c.jsx("em",{children:"the day begins."})]}),c.jsx("div",{className:"wave-sub reveal d3","data-rev":!0,children:"Music is the world's first morning, performed again."})]}),c.jsxs("section",{className:"sessions",id:"sessions","aria-label":"The Aadyaan Sessions",children:[c.jsxs("div",{className:"sessions-head",children:[c.jsxs("div",{children:[c.jsx("div",{className:"sessions-eyebrow",children:"The Aadyaan Sessions · Vol. 01"}),c.jsxs("h2",{className:"sessions-title reveal","data-rev":!0,children:["Plates · ",c.jsx("em",{children:"Vol. 01."})]})]}),c.jsx("div",{className:"sessions-lede reveal d2","data-rev":!0,children:"A small visual companion to the evening. More plates to follow."})]}),c.jsxs("div",{className:"photo-grid reveal d3","data-rev":!0,children:[c.jsxs("div",{className:"photo tall",children:[c.jsx("img",{src:"/sessions/hero.jpg",alt:"Harshadewa, portrait"}),c.jsx("div",{className:"cap",children:"Pl. 01 · Portrait"})]}),c.jsxs("div",{className:"photo duotone",children:[c.jsx("img",{src:"/sessions/hero.jpg",alt:"Harshadewa, portrait"}),c.jsx("div",{className:"cap",children:"Pl. 02 · Portrait"})]}),c.jsxs("div",{className:"photo slot",children:[c.jsx("span",{children:"Pl. 03 · Forthcoming"}),c.jsx("div",{className:"cap",children:"Forthcoming"})]}),c.jsxs("div",{className:"photo slot",children:[c.jsx("span",{children:"Pl. 04 · Forthcoming"}),c.jsx("div",{className:"cap",children:"Forthcoming"})]}),c.jsxs("div",{className:"photo slot",children:[c.jsx("span",{children:"Pl. 05 · Forthcoming"}),c.jsx("div",{className:"cap",children:"Forthcoming"})]})]})]}),c_,c.jsx("section",{className:"almanac",id:"almanac","aria-label":"Almanac",ref:i,children:c.jsxs("div",{className:"almanac-inner",children:[c.jsx("div",{className:"mono almanac-eye",children:"XI · Almanac"}),c.jsxs("div",{className:"almanac-date reveal","data-rev":!0,children:["à¶à¶¯à·âයà·à¶±à·Â ",c.jsx("em",{children:"·"})," Vol. ",c.jsx("em",{children:"I"})]}),c.jsx("div",{className:"almanac-sub reveal d1","data-rev":!0,children:"Spring 2027 â request a seat below."}),c.jsxs("div",{className:"almanac-grid",children:[c.jsxs("div",{className:"alm-cell reveal","data-rev":!0,children:[c.jsx("div",{className:"k",children:"Date"}),c.jsxs("div",{className:"v",children:[c.jsx("em",{children:"Spring"}),c.jsx("br",{}),"2027"]})]}),c.jsxs("div",{className:"alm-cell reveal d1","data-rev":!0,children:[c.jsx("div",{className:"k",children:"Venue"}),c.jsxs("div",{className:"v",children:[c.jsx("em",{children:"London"}),c.jsx("br",{}),"Announced on request"]})]}),c.jsxs("div",{className:"alm-cell reveal d2","data-rev":!0,children:[c.jsx("div",{className:"k",children:"Seats"}),c.jsx("div",{className:"v",children:c.jsx("em",{children:"Forty"})})]}),c.jsxs("div",{className:"alm-cell reveal d3","data-rev":!0,children:[c.jsx("div",{className:"k",children:"Format"}),c.jsxs("div",{className:"v",children:["Story · Teach · Perform · Connect",c.jsx("br",{}),c.jsx("em",{children:"100 minutes"})]})]})]}),c.jsx("a",{className:"alm-cta reveal d4","data-rev":!0,href:"#",children:"Request a seat  ·  à¶à¶¯à·âයà·à¶±à· â"})]})}),c.jsxs("footer",{className:"sessions-footer",children:[c.jsxs("div",{className:"foot-top",children:[c.jsxs("div",{className:"foot-mark",children:["à¶à¶¯à·âයà·à¶±à·",c.jsx("span",{children:"Aadyaan · the first rays"})]}),c.jsxs("div",{className:"foot-meta",children:[c.jsxs("div",{children:[c.jsx("div",{style:{opacity:.55,marginBottom:8},children:"Artist"}),c.jsx("a",{href:"#",children:"Harshadewa"})]}),c.jsxs("div",{children:[c.jsx("div",{style:{opacity:.55,marginBottom:8},children:"Composer"}),c.jsx("a",{href:"#",children:"R.A. Chandrasena"})]}),c.jsxs("div",{children:[c.jsx("div",{style:{opacity:.55,marginBottom:8},children:"Press"}),c.jsx("a",{href:"#",children:"[email protected]"})]}),c.jsxs("div",{children:[c.jsx("div",{style:{opacity:.55,marginBottom:8},children:"Newsletter"}),c.jsx("a",{href:"#",children:"Subscribe â"})]})]})]}),c.jsxs("div",{className:"foot-bottom",children:[c.jsx("div",{children:"© MMXXVI · Harshadewa · All rights reserved"}),c.jsxs("div",{children:["The Aadyaan Sessions · Vol. ",c.jsx("em",{children:"01"})," · Colombo â London"]})]})]})]})};function fm(e){return Math.abs(Math.sin(e*127.1)*43758.5453%1)}function JA({count:e=260}){const t=p.useRef(null);return p.useEffect(()=>{const n=t.current;if(!n)return;const r=n.getContext("2d");if(!r)return;const s=Math.min(2,window.devicePixelRatio||1),i=Array.from({length:e},(a,l)=>({x:fm(l*1.1),y:fm(l*2.2),z:fm(l*3.3)}));function o(){const a=innerWidth,l=innerHeight;
243n.width=a*s,n.height=l*s,r.setTransform(s,0,0,s,0,0),r.fillStyle="#0A0D14",r.fillRect(0,0,a,l);for(const u of i){r.fillStyle=`rgba(237,234,224,${(.1+u.z*.26).toFixed(2)})`;const d=.8+u.z*1.2;r.fillRect(u.x*a,u.y*l,d,d)}}return o(),addEventListener("resize",o),()=>removeEventListener("resize",o)},[e]),c.jsx("canvas",{ref:t,className:"sky","aria-hidden":"true"})}const Xf="research:key",G0="research-lock-change",eR=()=>{try{return localStorage.getItem(Xf)}catch{return null}},d_=()=>eR()!==null;async function tR(e){try{return await fetch("/api/private-embed",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}catch{return null}}const E8=async e=>{const t=e.trim();if(!t)return"wrong";const n=await tR({password:t});if(!n)return"offline";if(n.status===401)return"wrong";if(!n.ok)return"offline";try{localStorage.setItem(Xf,t)}catch{}return window.dispatchEvent(new Event(G0)),"ok"},C8=async e=>{const t=eR();if(t===null)return null;const n=await tR({password:t,slug:e});return!n||!n.ok?((n==null?void 0:n.status)===401&&nR(),null):n.text()},nR=()=>{try{localStorage.removeItem(Xf)}catch{}window.dispatchEvent(new Event(G0))},h_=G0,T8=Xf,Jf=()=>{const[e,t]=p.useState(d_);return p.useEffect(()=>{const n=()=>t(d_()),r=s=>{(s.key===null||s.key===T8)&&n()};return window.addEventListener(h_,n),window.addEventListener("storage",r),()=>{window.removeEventListener(h_,n),window.removeEventListener("storage",r)}},[]),{unlocked:e,tryUnlock:p.useCallback(n=>E8(n),[]),relock:p.useCallback(()=>nR(),[])}};var Ul={sha:"8cf4d37",builtAt:"2026-10-07T17:10:21.083Z",branch:"main",dirty:!1,env:"vercel"};const k8=[{id:"manifest",label:"MANIFEST",icon:c.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:c.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",strokeLinecap:"round"})})},{id:"grid",label:"GRID",icon:c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[c.jsx("rect",{x:"2",y:"2",width:"5",height:"5",rx:"1"}),c.jsx("rect",{x:"9",y:"2",width:"5",height:"5",rx:"1"}),c.jsx("rect",{x:"2",y:"9",width:"5",height:"5",rx:"1"}),c.jsx("rect",{x:"9",y:"9",width:"5",height:"5",rx:"1"})]})},{id:"chart",label:"SKY CHART",icon:c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[c.jsx("path",{d:"M2 13h12",strokeLinecap:"round"}),c.jsx("circle",{cx:"4.5",cy:"9.5",r:"1.5"}),c.jsx("circle",{cx:"9",cy:"5",r:"1.5"}),c.jsx("circle",{cx:"13",cy:"8",r:"1.5"})]})}],j8=[{id:"updated",label:"NEWEST"},{id:"oldest",label:"OLDEST"},{id:"title",label:"AâZ"}],P8={updated:(e,t)=>t.updated.localeCompare(e.updated)||t.title.localeCompare(e.title),oldest:(e,t)=>e.updated.localeCompare(t.updated)||e.title.localeCompare(t.title),title:(e,t)=>e.title.localeCompare(t.title)},A8=e=>e==="manifest"||e==="grid"||e==="chart",R8=({items:e})=>c.jsx("div",{className:"manifest",children:e.map(t=>{const n=fs(t);return c.jsxs(bn,{to:t.href,className:"mrow",children:[c.jsx("span",{className:"n",children:lo(t).replace("PROBE ","P")}),c.jsxs("span",{className:"t",children:[t.title,c.jsx("span",{className:"d",children:t.description})]}),c.jsx("span",{className:"tg",style:{color:n.color},children:n.label.toUpperCase()}),c.jsxs("span",{className:"st",children:[t.date," · ",c.jsx("b",{children:"TRANSMITTING"})]})]},t.href)})}),N8=({items:e})=>c.jsx("div",{className:"grid",children:e.map(t=>{const n=fs(t);return c.jsxs(bn,{to:t.href,className:"gcard",children:[c.jsxs("span",{className:"cid",style:{color:n.color},children:[lo(t)," · ",n.label.toUpperCase()]}),c.jsx("h3",{children:t.title}),c.jsx("p",{children:t.description}),c.jsxs("span",{className:"stat",children:["LAUNCHED ",t.date," · ",c.jsx("b",{children:"TRANSMITTING"})]})]},t.href)})}),f_=46,Bl=116,Pd=900,O8=({items:e,catalogue:t})=>{const[n,r]=p.useState(null),s=Lf.filter(f=>t.some(v=>fs(v).id===f.id)),i=s.length*f_+46,o=t.map(f=>Date.parse(f.updated)),a=Math.min(...o),l=Math.max(...o),u=f=>Bl+(Date.parse(f)-a)/Math.max(1,l-a)*(Pd-Bl-54),d=new Set(e.map(f=>f.href)),h=s.map((f,v)=>{const g=30+v*f_,m=t.filter(w=>fs(w).id===f.id);return{band:f,y:g,pieces:m}});return c.jsxs("div",{className:"chart",children:[c.jsx("p",{className:"readout","aria-live":"polite",children:n?c.jsxs(c.Fragment,{children:[c.jsx("b",{children:lo(n)})," · ",n.title.toUpperCase()," · TARGET"," ",fs(n).label.toUpperCase()," · LAST TRANSMISSION"," ",Gd(n.updated).toUpperCase()]}):"HOVER OR FOCUS A PROBE TO IDENTIFY IT · CLICK TO OPEN"}),c.jsx("p",{className:"chartnote chartswipe",children:"SWIPE THE CHART SIDEWAYS â"}),c.jsx("div",{className:"chartscroll",children:c.jsxs("svg",{viewBox:`0 0 ${Pd} ${i}`,width:"100%",height:i,role:"group","aria-label":`Sky chart of ${e.length} probes across ${s.length} targets, placed by last transmission date.`,onMouseLeave:()=>r(null),children:[h.map(({band:f,y:v})=>c.jsxs("g",{children:[c.jsx("line",{className:"band",x1:Bl-12,y1:v,x2:Pd-30,y2:v}),c.jsx("text",{className:`bandlab${n&&fs(n).id===f.id?" on":""}`,x:Bl-22,y:v+3,textAnchor:"end",children:f.label.toUpperCase()})]},f.id)),h.flatMap(({band:f,y:v,pieces:g})=>g.map((m,w)=>{const y=d.has(m.href),x=u(m.updated),b=v+(w%3-1)*9,S=(n==null?void 0:n.href)===m.href;return c.jsxs(bn,{to:m.href,className:"probe","aria-label":`${lo(m)}: ${m.title}`,onMouseEnter:()=>y&&r(m),onFocus:()=>y&&r(m),onBlur:()=>r(null),tabIndex:y?0:-1,style:{pointerEvents:y?"auto":"none"},children:[c.jsx("circle",{className:"halo",cx:x,cy:b,r:S?13:9,fill:"none",stroke:f.color,strokeOpacity:y?S?.7:.24:.05}),c.jsx("circle",{cx:x,cy:b,r:S?6:4.5,fill:f.color,opacity:y?.92:.13}),c.jsx("title",{children:`${lo(m)} â ${m.title}`})]},m.href)})),c.jsx("text",{className:"axlab",x:Bl-12,y:i-8,children:Gd(new Date(a).toISOString().slice(0,10)).toUpperCase()}),c.jsxs("text",{className:"axlab",x:Pd-30,y:i-8,textAnchor:"end",children:["LAST TRANSMISSION â"," ",Gd(new Date(l).toISOString().slice(0,10)).toUpperCase()]})]})}),c.jsxs("p",{className:"chartnote",children:["ONE BAND PER TARGET · ONE DOT PER PROBE · PLACED BY LAST TRANSMISSION",e.length<t.length&&` · ${t.length-e.length} DIMMED BY THE CURRENT FILTER`]})]})},Os="classified",I8=()=>{const[e,t]=sF(),[n,r]=p.useState(""),[s,i]=p.useState("updated"),{unlocked:o}=Jf(),a=e.get("view"),l=A8(a)?a:"manifest",u=e.get("target")??"all",d=(y,x)=>{const b=new URLSearchParams(e);x===null?b.delete(y):b.set(y,x),t(b,{replace:!0})},h=o?qy:Zi;p.useEffect(()=>{const y=document.createElement("meta");return y.name="robots",y.content="noindex, nofollow",document.head.appendChild(y),()=>{document.head.removeChild(y)}},[]),p.useEffect(()=>{!o&&u===Os&&d("target",null)});const f=n.trim().toLowerCase(),v=p.useMemo(()=>{const y=b=>u==="all"?!0:u===Os?!!b.private:b.topics.includes(u),x=b=>!f||[b.title,b.description,...b.tags].join(" ").toLowerCase().includes(f);return h.filter(b=>y(b)&&x(b)).sort(P8[s])},[h,u,f,s]),g=y=>y==="all"?h.length:y===Os?h.filter(x=>x.private).length:h.filter(x=>x.topics.includes(y)).length,m=u!=="all"||f.length>0,w=()=>{r(""),d("target",null)};return c.jsxs("div",{className:"universe mlog",children:[c.jsx(JA,{}),c.jsxs("div",{className:"logbar",children:[c.jsx(bn,{to:"/",className:"back",children:"â THE SYSTEM"}),c.jsx("span",{className:"sep",children:"|"}),c.jsx("span",{className:"here",children:"HARSHADEWA · MISSION LOG"}),c.jsxs("span",{className:"count",children:[c.jsx("b",{children:h.length})," PROBES · CATALOGUED"]}),c.jsx(D8,{})]}),c.jsxs("main",{className:"logwrap",children:[c.jsxs("div",{className:"loghead",children:[c.jsx("div",{className:"ch-label",children:"THE MISSION LOG · THE OTHER LIFE"}),c.jsxs("h1",{children:["Everything the probes ",c.jsx("em",{children:"have sent back."})]}),c.jsx("p",{children:"Interactive tools, data studies and plain-English explainers â built by a systems analyst with a habit of following a question until it has a picture. Read them three ways: as a manifest, as a grid, or plotted across the sky."})]}),c.jsxs("div",{className:"console",children:[c.jsxs("div",{className:"qline",children:[c.jsx("span",{className:"prompt",children:"> QUERY:"}),c.jsx("input",{type:"text",value:n,onChange:y=>r(y.target.value),placeholder:"SEARCH TITLES, DESCRIPTIONS, TAGSâ¦","aria-label":"Search the mission log"}),n&&c.jsx("button",{type:"button",className:"clear",onClick:()=>r(""),children:"â CLEAR"})]}),c.jsx("div",{className:"rowlab",children:"TARGETS"}),c.jsxs("div",{className:"chips",children:[c.jsxs("button",{type:"button",className:"chip","aria-pressed":u==="all",onClick:()=>d("target",null),children:["ALL ",c.jsx("span",{className:"n",children:g("all")})]}),Lf.filter(y=>g(y.id)>0).map(y=>c.jsxs("button",{type:"button",className:"chip","aria-pressed":u===y.id,style:u===y.id?{color:y.color}:void 0,onClick:()=>d("target",u===y.id?null:y.id),children:[c.jsx("span",{className:"dot",style:{background:y.color}}),y.label.toUpperCase()," ",c.jsx("span",{className:"n",children:g(y.id)})]},y.id)),o&&g(Os)>0&&c.jsxs("button",{type:"button",className:"chip classified","aria-pressed":u===Os,onClick:()=>d("target",u===Os?null:Os),children:["â¾ CLASSIFIED ",c.jsx("span",{className:"n",children:g(Os)})]})]}),c.jsxs("div",{className:"switchrow",children:[c.jsxs("div",{children:[c.jsx("div",{className:"rowlab",style:{marginTop:0},children:"VIEW"}),c.jsx("div",{className:"views",role:"group","aria-label":"Choose a view",children:k8.map(y=>c.jsxs("button",{type:"button","aria-pressed":l===y.id,onClick:()=>d("view",y.id),children:[y.icon,y.label]},y.id))})]}),l!=="chart"&&c.jsxs("div",{children:[c.jsx("div",{className:"rowlab",style:{marginTop:0},children:"ORDER"}),c.jsx("div",{className:"sorts",children:j8.map(y=>c.jsx("button",{type:"button",className:"chip","aria-pressed":s===y.id,onClick:()=>i(y.id),children:y.label},y.id))})]})]})]}),c.jsxs("div",{className:"tally",children:[c.jsx("b",{children:v.length})," OF ",h.length," PROBES",u!=="all"&&` · TARGET ${u.toUpperCase().replace("-"," ")}`,f&&` · MATCHING â${n.trim()}â`,m&&c.jsx("button",{type:"button",className:"reset",onClick:w,children:"CLEAR âº"})]}),v.length===0?c.jsxs("div",{className:"empty",children:[c.jsxs("p",{children:["No probe matches",f?` â${n.trim()}â`:" that target","."]}),c.jsx("button",{type:"button",onClick:w,children:"CLEAR FILTERS âº"})]}):l==="manifest"?c.jsx(R8,{items:v}):l==="grid"?c.jsx(N8,{items:v}):c.jsx(O8,{items:v,catalogue:h})]}),c.jsx(L8,{})]})},L8=()=>{const e=new Date(Ul.builtAt),t=Number.isNaN(e.getTime())?Ul.builtAt:e.toLocaleStr
243ing("en-GB",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"});return c.jsx("footer",{className:"logfoot",children:c.jsxs("span",{children:["BUILD ",Ul.sha," · ",t,Ul.branch!=="main",Ul.dirty]})})},D8=()=>{const{unlocked:e,tryUnlock:t,relock:n}=Jf(),[r,s]=p.useState(!1),[i,o]=p.useState(""),[a,l]=p.useState(!1);return e?c.jsx("button",{type:"button",className:"keybtn on",onClick:n,title:"Lock the private pieces","aria-label":"Lock the private pieces",children:"â"}):r?c.jsxs("form",{onSubmit:async u=>{u.preventDefault();const d=await t(i);o(""),d==="ok"?s(!1):l(!0)},children:[c.jsx("input",{type:"password",value:i,onChange:u=>{o(u.target.value),l(!1)},onBlur:()=>!i&&s(!1),autoFocus:!0,"aria-label":"Password","aria-invalid":a}),c.jsx("button",{type:"submit",className:"keybtn on",children:"UNLOCK â"})]}):c.jsx("button",{type:"button",className:"keybtn",onClick:()=>s(!0),title:"Private","aria-label":"Unlock the private pieces",children:"â¾"})},M8={"ev-charging-cost":p.lazy(()=>xo(()=>import("./EvChargingCostCalculator-DCZD5DOp.js"),[]))},F8=({onUnlocked:e})=>{const{tryUnlock:t}=Jf(),[n,r]=p.useState(""),[s,i]=p.useState(null),[o,a]=p.useState(!1),l=async u=>{if(u.preventDefault(),o)return;a(!0);const d=await t(n);if(a(!1),r(""),d==="ok"){i(null),e==null||e();return}i(d)};return c.jsx("div",{className:"flex-1 flex items-center justify-center px-4 py-24",children:c.jsxs("form",{onSubmit:l,className:"w-full max-w-xs text-center",children:[c.jsx(OO,{className:"w-5 h-5 text-gold/60 mx-auto mb-5"}),c.jsx("p",{className:"text-parchment/40 font-mono text-[10px] tracking-[0.2em] uppercase mb-6",children:"Private"}),c.jsx("input",{type:"password",value:n,onChange:u=>{r(u.target.value),i(null)},autoFocus:!0,"aria-label":"Password","aria-invalid":s==="wrong",className:"w-full bg-transparent border-b border-parchment/20 focus:border-gold/60 outline-none text-center text-parchment font-mono text-sm tracking-[0.3em] py-2 transition-colors"}),c.jsxs("p",{className:"text-[10px] font-mono tracking-wider uppercase mt-3 h-4","aria-live":"polite",children:[s==="wrong"&&c.jsx("span",{className:"text-red-400/70",children:"Not that one"}),s==="offline"&&c.jsx("span",{className:"text-red-400/70",children:"Gate unreachable"})]}),c.jsx("button",{type:"submit",disabled:o,className:"mt-4 font-mono text-[11px] tracking-wider uppercase text-gold/80 hover:text-gold transition-colors disabled:opacity-40",children:o?"Checkingâ¦":"Unlock â"})]})})},$8=()=>{const{slug:e}=NM(),{unlocked:t}=Jf(),n=qy.find(h=>gV(h.href)===e),r=(n==null?void 0:n.kind)==="component"&&e?M8[e]:void 0,s=!!(n!=null&&n.private)&&!t,i=!!(n!=null&&n.private)&&(n==null?void 0:n.kind)!=="component",[o,a]=p.useState(null),[l,u]=p.useState(!1);if(p.useEffect(()=>{if(!i||s||!e)return;let h=!0;return u(!1),C8(e).then(f=>{h&&(f===null?u(!0):a(f))}),()=>{h=!1}},[i,s,e]),p.useEffect(()=>{const h=document.createElement("meta");return h.name="robots",h.content="noindex, nofollow",document.head.appendChild(h),()=>{document.head.removeChild(h)}},[]),!n)return c.jsxs("div",{className:"universe probeshell",children:[c.jsx("div",{className:"shellbar",children:c.jsx(bn,{to:"/research",className:"back",children:"â MISSION LOG"})}),c.jsx("p",{className:"missing",children:"NO SUCH PROBE"})]});const d=fs(n);return c.jsxs("div",{className:"universe probeshell",children:[c.jsxs("div",{className:"shellbar",children:[c.jsx(bn,{to:"/research",className:"back",children:"â MISSION LOG"}),s?c.jsx("span",{className:"name",children:"Private"}):c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"pid",style:{color:d.color},children:[c.jsxs("span",{className:"pfull",children:[lo(n)," · ",d.label.toUpperCase()]}),c.jsx("span",{className:"pshort",children:lo(n).replace("PROBE ","P")})]}),r?c.jsx("p",{className:"name",children:n.title}):c.jsx("h1",{className:"name",children:n.title}),c.jsxs("span",{className:"tx",title:`Last transmission ${Gd(n.updated)}`,children:[c.jsx("span",{className:"dot"}),"TRANSMITTING"]})]})]}),s?c.jsx(F8,{}):r?c.jsx(p.Suspense,{fallback:c.jsx("p",{className:"loading",children:"ACQUIRING SIGNALâ¦"}),children:c.jsx("div",{className:"piece",children:c.jsx(r,{})})}):i?o!==null?c.jsx("iframe",{srcDoc:o,title:n.title}):l?c.jsx("p",{className:"missing",children:"SIGNAL LOST"}):c.jsx("p",{className:"loading",children:"ACQUIRING SIGNALâ¦"}):c.jsx("iframe",{src:`/research/embed/${e}.html`,title:n.title})]})},sc={full:"Harshadewa Ariyasinghe",short:"Harshadewa",sinhala:"",pronunciation:""},V8="Sri Lankan singer, songwriter and producer, based in London â the third generation of a family that has been making music since 1951.",pm="Harshadewa Ariyasinghe is a Sri Lankan singer, songwriter and producer based in London. He is the third generation of a musical family: his grandfather founded the Chandrasena Institute of Music in 1951, and his father was one of Sri Lanka's most recorded vocalists. Since 2012 he has released thirteen songs â some his own, some his father's and grandfather's, sung back.",mm=`Harshadewa Ariyasinghe is a Sri Lankan singer, songwriter and producer working in London. His music sits at the meeting point of two things that do not usually meet: the Sinhala vocal tradition he was raised inside, and the production tools of the present. 244 245The tradition is not borrowed. In 1951 his grandfather, R.A. Chandrasena, founded the Chandrasena Institute of Music in Colombo. His father, W.D. Ariyasinghe (1956â2020), was a Grade A vocalist with more than a thousand recorded songs to his name. His mother, Darshani Chandrasena â a musician and producer herself â took over the Institute her father founded and has kept it running since. 246 247Harshadewa's own catalogue began in 2012 with "Santhaapayen" and now runs to thirteen released songs. Ten are his own writing and production; three are his father's or his grandfather's songs, re-recorded â "Maa Langatama" cut in 2020, the year his father's voice fell silent, and "Walakulu Pelin Basinna" dedicated to his memory. He has worked with Charitha Attalage, Ravi Jay, YAKA and the Ravana Brothers, and produces and mixes most of his own material. 248 249He is preparing The Aadyaan Sessions â three generations of these songs performed in one room, for forty peo
249ple, in London.`,U8=Zr.length,p_=Zr[0].year,B8=Zr[Zr.length-1].year,z8=[{label:"Name",value:sc.full},{label:"In Sinhala",value:sc.sinhala},{label:"Pronounced",value:sc.pronunciation},{label:"Billed as",value:sc.short,note:"One word. Not 'Harsha Dewa'."},{label:"Role",value:"Singer, songwriter, producer"},{label:"Based in",value:"London, United Kingdom"},{label:"From",value:"Colombo, Sri Lanka"},{label:"Languages",value:"Sinhala, English"},{label:"Active since",value:p_,note:`${U8} released songs, ${p_}â${B8}`},{label:"Family",value:"Third generation",note:"Grandfather R.A. Chandrasena founded the Chandrasena Institute of Music, 1951. Father W.D. Ariyasinghe (1956â2020), Grade A vocalist. Mother Darshani Chandrasena, musician and producer."},{label:"Next",value:"The Aadyaan Sessions, Vol. 01",note:"Spring 2027, London. 40 seats. Venue unannounced."}],Bs={email:"[email protected]",label:"Management and press"},H8=[{label:"Instagram",handle:"@harshadewa",url:"https://www.instagram.com/harshadewa/"},{label:"YouTube",handle:"@harshadewa",url:"https://www.youtube.com/harshadewa"},{label:"X",handle:"@harshadewa",url:"https://x.com/harshadewa"},{label:"Facebook",handle:"@harshadewa",url:"https://www.facebook.com/harshadewa"}],W8=[{label:"Official site",url:"https://harshadewa.com"},{label:"The Aadyaan Sessions",url:"https://harshadewa.com/aadyaan/sessions"},{label:"Apple Music",url:"https://music.apple.com/lk/artist/harshadewa-ariyasinghe/1028968152"},{label:"Spotify",url:""}],Ad=WT.map(e=>({slug:e.slug,title:e.title,year:e.year,src:`/press/covers/${e.slug}.jpg`,listen:e.url,moons:e.moons})),K8=["Everything on this page is cleared for editorial use â press, reviews, listings, event programmes and interviews. No permission needed, no email required.","Please credit the photographer where one is named. That credit is the only condition attached to the photographs.","Cover art may be reproduced alongside coverage of the release it belongs to. It remains the copyright of its respective label and designer.","Please don't crop, recolour or composite the photographs. If you need a different crop, ask and you'll get one.","For anything commercial â merchandise, advertising, AI training, or use implying endorsement â write first."];var G8={sha:"8cf4d37",builtAt:"2026-10-07T17:10:21.083Z",branch:"main",dirty:!1,env:"vercel"};function Rd({text:e,label:t="COPY"}){const[n,r]=p.useState(!1);p.useEffect(()=>{if(!n)return;const i=setTimeout(()=>r(!1),2200);return()=>clearTimeout(i)},[n]);const s=async()=>{try{await navigator.clipboard.writeText(e),r(!0)}catch{const i=window.getSelection(),o=document.querySelector(`[data-copy="${CSS.escape(e.slice(0,40))}"]`);if(i&&o){const a=document.createRange();a.selectNodeContents(o),i.removeAllRanges(),i.addRange(a)}}};return c.jsx("button",{type:"button",className:n?"copybtn done":"copybtn",onClick:s,"aria-live":"polite",children:n?"COPIED":t})}const m_=e=>e?e>=1024*1024?`${(e/1024/1024).toFixed(1)} MB`:`${Math.round(e/1024)} KB`:null;function q8(){const[e,t]=p.useState("loading"),[n,r]=p.useState([]);return p.useEffect(()=>{let s=!0;return fetch("/api/press-assets").then(i=>i.ok?i.json():null).then(i=>{var o;s&&((o=i==null?void 0:i.photos)!=null&&o.length?(r(i.photos),t("ready")):t("empty"))}).catch(()=>s&&t("empty")),()=>{s=!1}},[]),e==="loading"?c.jsx("p",{className:"pnote",children:"LOADING PHOTOGRAPHSâ¦"}):e==="empty"?c.jsxs("p",{className:"pnote",children:["No photographs published yet. For images in the meantime, write to"," ",c.jsx("a",{href:`mailto:${Bs.email}`,children:Bs.email})," â everything else on this page is ready to use now."]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"photogrid",children:n.map(s=>c.jsxs("figure",{className:"shot",children:[c.jsxs("a",{href:s.url,download:s.id,children:[c.jsx("img",{src:s.preview,alt:s.title,loading:"lazy"}),c.jsx("span",{className:"dl",children:"DOWNLOAD FULL RESOLUTION â"})]}),c.jsxs("figcaption",{children:[c.jsx("span",{className:"t",children:s.title}),s.caption&&c.jsx("span",{className:"cap",children:s.caption}),c.jsxs("span",{className:"meta",children:[c.jsxs("b",{children:["PHOTO: ",s.credit.toUpperCase()]}),s.width&&s.height&&` · ${s.width}Ã${s.height}`,m_(s.bytes)&&` · ${m_(s.bytes)}`]})]})]},s.id))}),c.jsxs("p",{className:"pnote",children:[n.length," photograph",n.length===1?"":"s"," · click any image for the full-resolution original · please carry the photographer's credit"]})]})}const Y8=[{id:"facts",n:"01",label:"FACTS"},{id:"bio",n:"02",label:"BIOGRAPHY"},{id:"photos",n:"03",label:"PHOTOGRAPHS"},{id:"artwork",n:"04",label:"COVER ART"},{id:"music",n:"05",label:"MUSIC"},{id:"contact",n:"06",label:"CONTACT"}];function Z8(){p.useEffect(()=>{const n=document.title;return document.title=`Press Kit â ${sc.full}`,()=>{document.title=n}},[]);const e=z8.filter(n=>n.value.trim()!==""),t=W8.filter(n=>n.url.trim()!=="");return c.jsxs("div",{className:"universe press",children:[c.jsx(JA,{}),c.jsxs("div",{className:"pressbar",children:[c.jsx(bn,{to:"/",className:"back",children:"â THE SYSTEM"}),c.jsx("span",{className:"sep",children:"|"}),c.jsx("span",{className:"here",children:"HARSHADEWA · PRESS KIT"}
249),c.jsx("span",{className:"count",children:"CLEARED FOR EDITORIAL USE"})]}),c.jsxs("main",{className:"presswrap",children:[c.jsxs("header",{className:"presshead",children:[c.jsx("div",{className:"ch-label",children:"PRESS KIT · TAKE WHAT YOU NEED"}),c.jsxs("h1",{children:["Everything you need, ",c.jsx("em",{children:"without asking."})]}),c.jsx("p",{className:"lead",children:V8}),c.jsxs("p",{className:"sub",children:["Bios, photographs, cover art and the facts â all cleared for press use. No permission needed and no email required. If something you need isn't here, ",c.jsx("a",{href:`mailto:${Bs.email}`,children:"ask for it"})," and it will be added."]}),c.jsx("nav",{className:"jump","aria-label":"Sections",children:Y8.map(n=>c.jsxs("a",{href:`#${n.id}`,children:[c.jsx("span",{className:"n",children:n.n})," ",n.label]},n.id))})]}),c.jsxs("section",{id:"facts",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"01 · THE FACTS"}),c.jsxs("h2",{children:["Spelled the way ",c.jsx("em",{children:"it should be printed."})]}),c.jsx("dl",{className:"facts",children:e.map(n=>c.jsxs("div",{className:"fact",children:[c.jsx("dt",{children:n.label.toUpperCase()}),c.jsxs("dd",{children:[c.jsx("span",{className:"v","data-copy":n.value.slice(0,40),children:n.value}),c.jsx(Rd,{text:n.value}),n.note&&c.jsx("span",{className:"note",children:n.note})]})]},n.label))})]}),c.jsxs("section",{id:"bio",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"02 · BIOGRAPHY"}),c.jsxs("h2",{children:["Two lengths, ",c.jsx("em",{children:"both ready to paste."})]}),c.jsxs("article",{className:"bio",children:[c.jsxs("div",{className:"biohead",children:[c.jsx("span",{className:"tag",children:"SHORT · ~50 WORDS"}),c.jsx(Rd,{text:pm,label:"COPY SHORT BIO"})]}),c.jsx("p",{"data-copy":pm.slice(0,40),children:pm})]}),c.jsxs("article",{className:"bio",children:[c.jsxs("div",{className:"biohead",children:[c.jsx("span",{className:"tag",children:"LONG · ~200 WORDS"}),c.jsx(Rd,{text:mm,label:"COPY LONG BIO"})]}),c.jsx("div",{"data-copy":mm.slice(0,40),children:mm.split(` 250 251`).map(n=>c.jsx("p",{children:n},n.slice(0,24)))})]})]}),c.jsxs("section",{id:"photos",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"03 · PHOTOGRAPHS"}),c.jsxs("h2",{children:["Full resolution, ",c.jsx("em",{children:"one click each."})]}),c.jsx(q8,{})]}),c.jsxs("section",{id:"artwork",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"04 · COVER ART"}),c.jsxs("h2",{children:[Ad.length," releases, ",c.jsxs("em",{children:[Ad.length," covers."]})]}),c.jsx("div",{className:"covers",children:Ad.map(n=>c.jsxs("figure",{className:"cover",children:[c.jsx("a",{href:n.src,download:`${n.slug}.jpg`,children:c.jsx("img",{src:n.src,alt:`${n.title} cover art`,loading:"lazy"})}),c.jsxs("figcaption",{children:[c.jsx("span",{className:"t",children:n.title}),c.jsxs("span",{className:"meta",children:[n.year," · ",c.jsx("a",{href:n.src,download:`${n.slug}.jpg`,children:"1000 à 1000 â"})]})]})]},n.slug))})]}),c.jsxs("section",{id:"music",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"05 · MUSIC"}),c.jsxs("h2",{children:["The catalogue, ",c.jsx("em",{children:"in order."})]}),c.jsxs("table",{className:"releases",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"YEAR"}),c.jsx("th",{children:"TITLE"}),c.jsx("th",{className:"wi",children:"WITH"}),c.jsx("th",{children:"LISTEN"})]})}),c.jsx("tbody",{children:Ad.map(n=>c.jsxs("tr",{children:[c.jsx("td",{className:"yr",children:n.year}),c.jsx("td",{className:"tt",children:n.title}),c.jsx("td",{className:"wi",children:n.moons.length?n.moons.join(", "):"â"}),c.jsx("td",{className:"ln",children:c.jsx("a",{href:n.listen,target:"_blank",rel:"noopener",children:"SPOTIFY â"})})]},n.slug))})]}),c.jsx("div",{className:"linkrow",children:t.map(n=>c.jsxs("a",{href:n.url,target:"_blank",rel:"noopener",children:[n.label.toUpperCase()," â"]},n.label))})]}),c.jsxs("section",{id:"contact",className:"psec",children:[c.jsx("div",{className:"ch-label",children:"06 · CONTACT"}),c.jsxs("h2",{children:["One inbox, ",c.jsx("em",{children:"read by him."})]}),c.jsxs("div",{className:"contact",children:[c.jsxs("div",{className:"cbig",children:[c.jsx("span",{className:"clabel",children:Bs.label.toUpperCase()}),c.jsx("a",{href:`mailto:${Bs.email}`,"data-copy":Bs.email.slice(0,40),children:Bs.email}),c.jsx(Rd,{text:Bs.email,label:"COPY ADDRESS"})]}),c.jsx("div",{className:"socialrow",children:H8.map(n=>c.jsxs("a",{href:n.url,target:"_blank",rel:"noopener",children:[n.label.toUpperCase()," ",c.jsx("b",{children:n.handle})]},n.label))})]}),c.jsxs("div",{className:"usage",children:[c.jsx("span",{className:"ch-label",children:"USAGE"}),c.jsx("ul",{children:K8.map(n=>c.jsx("li",{children:n},n.slice(0,24)))})]})]})]}),c.jsxs("footer",{className:"pressfoot",children:[c.jsx("span",{children:"© 2026 HARSHADEWA ARIYASINGHE · PRESS KIT"}),c.jsxs("span",{children:["BUILD ",G8.sha]})]})]})}const Q8=new VD,X8=()=>{const e=es();p.useEffect(()=>_V(),[]);const t=e.pathname==="/sessions"||e.pathname==="/sessions/"||e.pathname==="/aadyaan/sessions"||e.pathname==="/aadyaan/sessions/",n=e.pathname==="/",r=e.pathname.startsWith("/research"),s=e.pathname.startsWith("/press"),i=t||n||r||s;return c.jsxs(c.Fragment,{children:[!i&&c.jsx(mV,{}),c.jsx("div",{className:i?"":"pt-16",children:c.jsxs(KM,{children:[c.jsx($t,{path:"/",element:c.jsx(HV,{})}),c.jsx($t,{path:"/music",element:c.jsx(hd,{to:"/#music",replace:!0})}),c.jsx($t,{path:"/contact",element:c.jsx(hd,{to:"/#connect",replace:!0})}),c.jsx($t,{path:"/store",element:c.jsx(v5,{})}),c.jsx($t,{path:"/newsletter",element:c.jsx(y5,{})}),c.jsx($t,{path:"/auth",element:c.jsx(x5,{})}),c.jsx($t,{path:"/fan-special",element:c.jsx(w5,{})}),c.jsx($t,{path:"/admin",element:c.jsx(_8,{})}),c.jsx($t,{path:"/research",element:c.jsx(I8,{})}),c.jsx($t,{path:"/research/:slug",element:c.jsx($8,{})}),c.jsx($t,{path:"/press",element:c.jsx(Z8,{})}),c.jsx($t,{path:"/media",element:c.jsx(hd,{to:"/press",replace:!0})}),c.jsx($t,{path:"/epk",element:c.jsx(hd,{to:"/press",replace:!0})}),c.jsx($t,{path:"/sessions",element:c.jsx(u_,{})}),c.jsx($t,{path:"/aadyaan/sessions",element:c.jsx(u_,{})}),c.jsx($t,{path:"*",element:c.jsx(WV,{})})]})})]})},J8=()=>
251c.jsx(HD,{client:Q8,children:c.jsxs(_D,{children:[c.jsx(wI,{}),c.jsx(YI,{}),c.jsx(eF,{children:c.jsx(X8,{})})]})});VE(document.getElementById("root")).render(c.jsx(J8,{}));export{AO as C,Cu as P,M as R,Tu as T,nr as a,fC as b,pn as c,C_ as g,c as j,p as r};
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.